From 1385b165c9a62a486b4494ebb11320d3c1117a5e Mon Sep 17 00:00:00 2001 From: ageer <ageerle@163.com> Date: 星期日, 02 三月 2025 11:19:29 +0800 Subject: [PATCH] feat(知识库): 增加知识库模块 --- ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/base/BaseBilibiliMsg.java | 50 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/PresenterChannelInfo.java | 82 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/config/DouyuLiveChatClientConfig.java | 69 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/parameters/LoginParaEnum.java | 31 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/base/IDouyuMsg.java | 36 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/ContactChangeHandler.java | 33 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliConnectionHandler.java | 154 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/util/WddPptApi.java | 438 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaGenderEnum.java | 51 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/KnowledgeInfo.java | 63 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/pom.xml | 66 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/impl/EmbeddingServiceImpl.java | 65 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/VipEnterBannerMsg.java | 144 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebLiveWatchingUsersOuterClass.java | 1081 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/RetCodeEnum.java | 49 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/IKuaishouConnectionListener.java | 35 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/ISseService.java | 20 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextEffectDetail.proto | 23 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/enums/KeyMsgValueType.java | 45 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/IChatAppStoreService.java | 71 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/H5csMsg.java | 50 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/constant/DouyuCmdEnum.java | 199 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/VectorStoreFactory.java | 31 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/KuaishouGiftMsg.java | 108 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/BaseCmdMsg.java | 33 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebRideChangedOuterClass.java | 697 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/NullHandler.java | 23 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/ConfigSwitchType.proto | 10 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/OsNameEnum.java | 13 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/client/BilibiliLiveChatClient.java | 184 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/core/Core.java | 371 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/IBaseLiveChatClient.java | 135 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/LiveProxyValue.java | 67 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebBetChanged.proto | 9 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/frame/AuthWebSocketFrame.java | 40 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/SendMessageFormat.java | 67 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/config/KuaishouLiveChatClientConfig.java | 47 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/IHuyaMsgListener.java | 45 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/Cover.java | 58 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/RobotController.java | 223 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/IDouyinMsgListener.java | 44 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/NobleLevelAttr.java | 79 ruoyi-common/ruoyi-common-wechat/pom.xml | 55 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/ChatConfig.java | 3 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/MusicVo.java | 35 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/IKnowledgeInfoService.java | 58 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinConnectionHandler.java | 117 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebFeedPushOuterClass.java | 3487 + ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/WxRobConfigController.java | 114 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/SuperFansInfo.java | 76 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/frame/factory/BilibiliWebSocketFrameFactory.java | 113 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/ClientIdOuterClass.java | 216 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/PdfFileLoader.java | 34 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SimpleUserInfoOuterClass.java | 921 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/constant/UploadConstant.java | 21 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/PropsItem.java | 181 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/VerifyCookieReq.java | 76 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/KuaishouLikeMsg.java | 61 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebCommentFeedShowTypeOuterClass.java | 180 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/api/DouyuApisTest.java | 30 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/PicUrlOuterClass.java | 1069 ruoyi-common/ruoyi-common-chat/pom.xml | 28 script/docker/ruoyi-ai.sql | 2594 ruoyi-admin/src/test/java/org/biada/test/DemoUnitTest.java | 0 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IMsg.java | 34 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinBinaryFrameHandler.java | 156 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/DoubleLikeDetailOuterClass.java | 767 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/ChatCompletionResponse.java | 24 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/util/BilibiliCodecUtil.java | 259 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/DouyinGiftMsg.java | 107 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/base/BaseDouyuWebSocketFrame.java | 39 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCInfoOuterClass.java | 696 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/frame/base/BaseBilibiliWebSocketFrame.java | 54 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/base/BaseException.java | 40 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/test/java/tech/ordinaryroad/live/chat/client/huya/client/HuyaLiveChatClientTest.java | 150 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaDecorationViewTypeEnum.java | 54 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/PptServiceImpl.java | 140 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/SleepUtils.java | 20 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/DanmuMsgMsg.java | 102 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/dm_v2_20OrBuilder.java | 45 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/cofing/OkHttpConfig.java | 1 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_cmd_msgProto.java | 78 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/UploadController.java | 47 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/factory/DouyuWebSocketFrameFactory.java | 181 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/CoverPromptAudioServiceImpl.java | 22 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/vo/KnowledgeFragmentVo.java | 62 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/ToolController.java | 14 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/dto/GiftPropInfo.java | 99 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/parameters/StatusNotifyParaEnum.java | 31 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/config/BilibiliLiveChatClientConfig.java | 67 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/api/BilibiliApis.java | 247 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/GzoneNameplateOuterClass.java | 1079 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ILikeMsgListener.java | 46 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebEnterRoomAck.proto | 11 ruoyi-modules/ruoyi-system/pom.xml | 21 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/StorageLoginInfoEnum.java | 57 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuConnectionHandler.java | 173 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/MsgHandler.java | 44 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/client/SingleHttpClient.java | 187 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/_MappingKit.java | 24 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/mapper/CoverPromptAudioMapper.java | 23 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/base/BaseError.java | 56 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/PatternRef.proto | 8 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/BaseResponse.java | 28 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/AuthMsg.java | 92 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceUserOuterClass.java | 748 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/pom.xml | 25 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/ChatmessageMsg.java | 86 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/CoverServiceImpl.java | 134 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/constant/BilibiliCmdEnum.java | 143 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuWsLiveChatClient.java | 116 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/LaunchReq.java | 74 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/MenuHandler.java | 34 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/pom.xml | 61 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/constant/Constants.java | 32 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/SuperChatMessageMsg.java | 202 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/base/IKuaishouCmdMsg.java | 35 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/dm_v2OrBuilder.java | 48 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/Member.java | 306 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IBaseMsgListener.java | 149 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/constant/ProtoverEnum.java | 67 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaClientTemplateTypeEnum.java | 58 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/controller/LoginController.java | 148 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_cmd_msg.proto | 19 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/common/MyRoute.java | 30 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/LiveFansGroupState.proto | 10 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/bo/ChatAppStoreBo.java | 59 ruoyi-common/ruoyi-common-bom/pom.xml | 7 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/DouyinEnterRoomMsg.java | 72 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/ChatVoucherController.java | 4 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/UserId.java | 80 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/ResultEnum.java | 25 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliBinaryFrameHandler.java | 153 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/LikeInfoV3ClickMsg.java | 158 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/ChatChoice.java | 31 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/SenderInfo.java | 85 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatCookieUtil.java | 80 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/HeartbeatWebSocketFrame.java | 40 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaDecorationAppTypeEnum.java | 88 ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/frame/base/BaseBinaryWebSocketFrame.java | 39 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/GetPropsListReq.java | 83 ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/CoverController.java | 58 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/SendSmsReplyMsg.java | 81 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebSystemNoticeFeed.proto | 21 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/GuardInfo.java | 94 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/retrieve/PromptRetrieverProperties.java | 16 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/LiveCdnNodeView.proto | 11 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/client/HttpClientManage.java | 34 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/ChatAppStoreImpl.java | 259 script/sql/ruoyi-ai.sql | 66 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_cmd_msg.java | 1122 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/util/HuyaCodecUtil.java | 167 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/base/IDouyinCmdMsg.java | 35 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_like_message_msg.java | 1563 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/pom.xml | 42 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextEffectOuterClass.java | 872 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/response/rolelist/ChatAppStoreVO.java | 19 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaLiveSource.java | 54 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/WupReq.java | 42 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebCommentFeedOuterClass.java | 1651 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/Dm_v2_20Proto.java | 74 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/builder/ImageBuilder.java | 25 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/SendMessageReq.java | 99 ruoyi-admin/src/test/java/org/biada/test/AssertUnitTest.java | 0 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/BaseMsg.java | 330 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/FolderLoader.java | 16 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/BaseLiveChatClient.java | 200 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/builder/AbstractBuilder.java | 16 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/ResourceLoaderFactory.java | 33 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebErrorOuterClass.java | 697 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DeviceInfo.java | 73 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSHeartbeatOuterClass.java | 549 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebRedPackInfoOuterClass.java | 1522 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/config/BaseLiveChatClientConfig.java | 139 ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/BaseBinaryFrameHandler.java | 184 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/MD5Util.java | 68 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/wxsingle/WxJsController.java | 62 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/PublicAreaCommonOuterClass.java | 823 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCInfo.proto | 10 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IDanmuMsgListener.java | 46 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IEnterRoomMsg.java | 62 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebCurrentRedPackFeedOuterClass.java | 858 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/dto/MedalInfo.java | 66 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_webcast_gift_message_msg.proto | 52 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/pom.xml | 71 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuDanmuLiveChatClient.java | 117 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/IDouyuMsgListener.java | 45 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptGenerateOutlineDto.java | 25 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/tools/DownloadTools.java | 77 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/SysLoginService.java | 4 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/IKnowledgeAttachService.java | 56 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebHeartbeat.proto | 9 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptGenerateContentDto.java | 27 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/TextFileLoader.java | 37 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/PublicAreaCommon.proto | 10 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/BulletFormat.java | 89 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebRedPackCoverType.proto | 10 ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/handler/PlusWebSocketHandler.java | 21 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPiecePatternRef.proto | 8 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SocketMessageOuterClass.java | 910 ruoyi-admin/src/test/java/org/biada/test/ParamUnitTest.java | 0 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/WordLoader.java | 37 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLocalDateTimeUtil.java | 54 ruoyi-common/ruoyi-common-web/pom.xml | 6 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/core/MsgCenter.java | 273 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextFormatOuterClass.java | 1136 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/LogHandler.java | 26 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/base/BaseBilibiliCmdMsg.java | 68 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/MsgStatInfo.java | 70 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/LiveAudienceStateOuterClass.java | 1541 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/frame/HeartbeatWebSocketFrame.java | 40 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/GetLivingInfoReq.java | 86 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebUserExit.proto | 9 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/Base64Util.java | 30 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/MsgrepeaterproxylistMsg.java | 96 ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/config/ChatConfig.java | 1 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCHeartbeatAck.proto | 10 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptAllQueryDto.java | 29 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuLiveChatClientTest.java | 410 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPieceUser.proto | 9 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/CoverPromptAudioVo.java | 44 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/AuthWebSocketFrame.java | 40 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/WeekRankInfo.java | 64 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSPing.proto | 12 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebRideChanged.proto | 10 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/util/HttpUtils.java | 634 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPieceHeart.proto | 7 ruoyi-modules/ruoyi-fusion/pom.xml | 11 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/client/HuyaLiveChatClient.java | 148 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/base/BaseHuyaMsg.java | 51 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/SendMsgType.java | 65 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebHeartbeatAck.proto | 10 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IBaseConnectionListener.java | 60 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebPipEndedOuterClass.java | 549 ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/pom.xml | 55 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/SendItemSubBroadcastPacketMsg.java | 283 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/RegisterGroupRsp.java | 72 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/LoginreqMsg.java | 107 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebGuessClosedOuterClass.java | 772 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/VectorStoreWrapper.java | 58 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/MsgCodeEnum.java | 64 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/IKnowledgeFragmentService.java | 48 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/WxRobConfig.java | 21 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frameOrBuilder.java | 121 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/BadgeInfo.java | 119 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/DoubleLikeDetail.proto | 10 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebComboCommentFeed.proto | 11 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/PayloadType.proto | 65 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebCurrentRedPackFeed.proto | 9 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/cache/UserSession.java | 30 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/WxRobKeyword.java | 11 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/mapper/KnowledgeFragmentMapper.java | 15 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceImageOuterClass.java | 750 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/DouyinDanmuMsg.java | 77 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/constant/ConfigKeys.java | 21 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/pom.xml | 42 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebAuthorPauseOuterClass.java | 658 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/AuditAudienceMask.proto | 11 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/mapper/CoverMapper.java | 15 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebSuspectedViolation.proto | 9 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/api/HuyaApis.java | 83 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_webcast_member_message_msgProto.java | 111 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/RecommendInfo.java | 146 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/api/MessageTools.java | 546 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/ImageOuterClass.java | 3722 + ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/mapper/KnowledgeInfoMapper.java | 15 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/interceptor/VisitLogInterceptor4down.java | 26 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/IBilibiliConnectionListener.java | 38 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/ChannelPair.java | 67 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptTemplateFilterDto.java | 24 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/EnterAgentHandler.java | 29 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/ExtendController.java | 125 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/WeChatController.java | 81 ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/VoiceController.java | 78 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/impl/KnowledgeInfoServiceImpl.java | 218 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/GzoneNameplate.proto | 11 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/common/OutRoute.java | 21 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frame_msgOrBuilder.java | 175 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/base/IKuaishouMsg.java | 34 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebLikeFeed.proto | 12 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/WeaviateVectorStore.java | 372 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuBinaryFrameHandler.java | 98 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/CoverPromptAudio.java | 38 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/face/IMsgHandlerFace.java | 93 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/LiveFansGroupStateOuterClass.java | 622 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/MarkDownFileLoader.java | 37 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCPingAckOuterClass.java | 624 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorizer/Vectorization.java | 11 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/Message.java | 104 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/ICoverPromptAudioService.java | 11 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/H5ckreqMsg.java | 51 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/test/java/tech/ordinaryroad/live/chat/client/kuaishou/api/KuaishouApisTest.java | 40 ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/domain/request/ChatRequest.java | 12 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPieceImage.proto | 9 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/frame/factory/HuyaWebSocketFrameFactory.java | 271 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/DouyinLikeMsg.java | 77 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/KeepliveWebSocketFrame.java | 40 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/MsgItem.java | 67 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SimpleUserInfo.proto | 11 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/tools/CommonTools.java | 301 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/api/request/BilibiliLikeReportV3Request.java | 74 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebCommentFeedShowType.proto | 10 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/vo/KnowledgeAttachVo.java | 63 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/ConfigSwitchItem.proto | 10 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/annotation/UnCheckLogin.java | 11 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/BaseMsg.java | 74 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceGiftOuterClass.java | 749 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/LiveUserbase.java | 67 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebPipStarted.proto | 9 ruoyi-admin/src/main/java/org/ruoyi/controller/OllamaController.java | 67 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/DgbMsg.java | 233 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebComboCommentFeedOuterClass.java | 846 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaOperationEnum.java | 97 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/LiveLaunchRsp.java | 78 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_chat_message_msgOrBuilder.java | 220 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/FaithPresenter.java | 64 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/MarkdownTextSplitter.java | 17 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ISuperChatMsgListener.java | 47 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptTemplateQueryDto.java | 19 ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty/pom.xml | 59 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/base/BaseDouyuLiveChatClient.java | 139 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/constant/DouyinCmdEnum.java | 73 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebUserPauseOuterClass.java | 658 script/docker/milvus/docker-compose.yml | 63 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/interceptor/ExceptionInterceptor.java | 52 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/EmbeddingService.java | 20 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/bo/KnowledgeFragmentBo.java | 59 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/MessageContentExpand.java | 67 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/MsgTypeEnum.java | 41 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/ConnectParaInfo.java | 105 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCEcho.proto | 9 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebPauseType.proto | 10 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/mapper/ChatAppStoreMapper.java | 15 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/SplitterProperties.java | 30 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/PropView.java | 70 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebUserPauseTypeOuterClass.java | 170 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebLiveWatchingUsers.proto | 11 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSErrorOuterClass.java | 548 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/NobleLevelInfo.java | 64 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebLiveSpecialAccountConfigStateOuterClass.java | 932 ruoyi-common/ruoyi-common-core/pom.xml | 12 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/ConfigSwitchTypeOuterClass.java | 180 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/ClientModeExample.java | 99 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/cofing/WxCpProperties.java | 48 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ICmdMsg.java | 38 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/_JFinalDemoGenerator.java | 72 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebEnterRoomOuterClass.java | 1363 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_gift_message_msgOrBuilder.java | 354 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_webcast_chat_message_msg.proto | 34 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/MapkbMsg.java | 53 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/README.md | 52 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/base/IHuyaMsg.java | 38 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebHeartbeatAckOuterClass.java | 623 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSPingOuterClass.java | 1029 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/JsonFileLoader.java | 16 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/HeartbeatReplyMsg.java | 45 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/ChatConfigController.java | 7 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/ACEnterBanner.java | 70 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/PushMessage_V2.java | 73 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IGiftMsgListener.java | 47 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/base/IBilibiliMsg.java | 44 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ILikeMsg.java | 71 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/TextSplitter.java | 11 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/UidNickName.java | 64 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/SendMsg.java | 59 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/dm_v2_20.java | 565 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextFormat.proto | 14 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/WebWxInit.java | 43 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_member_message_msgOrBuilder.java | 265 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/IndexController.java | 99 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/client/DouyinLiveChatClient.java | 174 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_like_message_msgOrBuilder.java | 140 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/config/HuyaLiveChatClientConfig.java | 84 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebShareFeedOuterClass.java | 1301 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/SyncKey.java | 52 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextOuterClass.java | 1171 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCLiveWarningMaskStatusChangedAudienceOuterClass.java | 750 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPiecePatternRefOuterClass.java | 773 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/parameters/BaseParaEnum.java | 36 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/NobleInfo.java | 94 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebGuessOpened.proto | 12 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/ChatAppStore.java | 58 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/User.java | 54 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/UserOuterClass.java | 33138 +++++++++++ ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frame_msgProto.java | 100 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaCmdEnum.java | 206 ruoyi-admin/src/main/resources/application-dev.yml | 27 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebGiftFeed.proto | 36 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextEffect.proto | 9 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/InteractWordMsg.java | 396 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/GetPropsListRsp.java | 79 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/LiveAudienceState.proto | 22 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/HeartbeatMsg.java | 45 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/mapper/KnowledgeAttachMapper.java | 15 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/CodeTextSplitter.java | 17 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/CoverVo.java | 68 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_like_message_msgProto.java | 87 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/LiveLaunchReq.java | 69 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/LRUCache.java | 26 ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/LumaController.java | 1 ruoyi-modules/pom.xml | 2 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPiece.proto | 20 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/api/WechatTools.java | 352 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/Common.proto | 30 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DisplayInfo.java | 91 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/H5gkcreqMsg.java | 51 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/service/impl/LoginServiceImpl.java | 894 ruoyi-modules/ruoyi-live/live-chat-client-commons/pom.xml | 44 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/api/DouyinApis.java | 108 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/GiftIMPriority.proto | 9 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorizer/VectorizationWrapper.java | 28 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/builder/TextBuilder.java | 22 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_websocket_frame.proto | 19 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/ClientModeExample.java | 81 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/UserInfo.proto | 17 ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/openai/OpenAiStreamClient.java | 13 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebFeedPush.proto | 25 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/resources/proto/dm_v2.proto | 14 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/IKuaishouMsgListener.java | 45 ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/BaseConnectionHandler.java | 168 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_websocket_frameProto.java | 93 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_webcast_like_message_msg.proto | 26 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/LogInterface.java | 13 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/MyMsgHandler.java | 230 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_webcast_member_message_msg.proto | 37 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebUserExitOuterClass.java | 549 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/CoverParamVo.java | 60 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebWatchingUserInfo.proto | 14 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/base/BaseWxRobKeyword.java | 93 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/PropsIdentity.java | 125 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/api/request/BilibiliSendMsgRequest.java | 77 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebPauseTypeOuterClass.java | 179 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/Image.proto | 29 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebGiftFeedOuterClass.java | 2305 ruoyi-admin/src/main/java/org/ruoyi/RuoYiAIServletInitializer.java | 18 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebError.proto | 10 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/LiveCdnNodeViewOuterClass.java | 846 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/LocationHandler.java | 44 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouConnectionHandler.java | 158 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/interceptor/VisitLogInterceptor.java | 79 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/api/DouyuApis.java | 196 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/client/KuaishouLiveChatClient.java | 201 ruoyi-modules/ruoyi-live/pom.xml | 177 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DIYBigGiftEffect.java | 70 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextEffectDetailOuterClass.java | 1968 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/PSHostInfoOuterClass.java | 697 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/pom.xml | 49 ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientBinaryFrameHandler.java | 66 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/UserInfo.java | 88 ruoyi-modules/ruoyi-live/live-chat-clients/pom.xml | 47 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorizer/OpenAiVectorization.java | 60 ruoyi-modules/ruoyi-live/live-chat-client-servers/pom.xml | 47 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebBetClosedOuterClass.java | 550 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/ConfigSwitchItemOuterClass.java | 658 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/VectorStore.java | 18 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/CustomBadgeDynamicExternal.java | 64 ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CoverMapper.xml | 7 ruoyi-common/ruoyi-common-wechat/src/main/resources/appConfig.properties | 7 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebLiveSpecialAccountConfigState.proto | 10 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCErrorOuterClass.java | 769 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/_BaseController.java | 199 ruoyi-admin/src/main/java/org/ruoyi/RuoYiAIApplication.java | 21 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ChatAppStoreVo.java | 65 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/MilvusVectorStore.java | 244 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/constant/DouyuClientModeEnum.java | 40 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/util/WeChatScanHttpUtil.java | 59 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/VerifyCookieRsp.java | 66 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPieceGift.proto | 9 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/TokenTextSplitter.java | 17 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/request/translation/TranslationRequest.java | 34 ruoyi-modules/ruoyi-knowledge/pom.xml | 200 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DecorationInfo.java | 67 ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/base/BaseNettyClient.java | 349 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/util/DouyuCodecUtilTest.java | 102 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/RelateController.java | 179 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebAuthorPause.proto | 10 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCHeartbeatAckOuterClass.java | 623 ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/PptController.java | 79 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/dm_v2.java | 610 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/PicUrl.proto | 12 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/config/DouyinLiveChatClientConfig.java | 93 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/KnowledgeFragment.java | 62 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/IDouyuConnectionListener.java | 38 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/CodeFileLoader.java | 37 ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientConnectionHandler.java | 65 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/DouyuCmdMsg.java | 51 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/common/MyConfig.java | 153 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SocketMessage.proto | 17 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/BulletBorderGroundFormat.java | 85 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/WxRobRelation.java | 11 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/UserInfoOuterClass.java | 2121 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/WebSocketCommand.java | 84 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IDanmuMsg.java | 67 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/SendGiftMsg.java | 351 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebAuthorResumeOuterClass.java | 550 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/Text.proto | 12 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebPipStartedOuterClass.java | 549 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/ICoverService.java | 49 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/resources/proto/dm_v2_20.proto | 12 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceHeartOuterClass.java | 625 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/UpdateUserInfoReq.java | 87 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/test/java/tech/ordinaryroad/live/chat/client/huya/util/HuyaCodecUtilTest.java | 99 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/GithubLoader.java | 16 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/UserIdentityInfo.java | 67 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/CommonOuterClass.java | 2558 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/constant/FileType.java | 91 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatNumberUtil.java | 40 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/LoginresMsg.java | 77 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/KnowledgeAttach.java | 60 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DecorationInfoRsp.java | 88 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/dto/GiftPropSingle.java | 97 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebEnterRoom.proto | 15 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/MessageTagInfo.java | 64 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/PayloadTypeOuterClass.java | 708 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/RegisterRsp.java | 75 ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CoverPromptAudioMapper.xml | 17 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/UenterMsg.java | 78 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCError.proto | 11 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/bo/KnowledgeInfoBo.java | 53 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaBinaryFrameHandler.java | 199 ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/ChatController.java | 17 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/VerifyFriendEnum.java | 28 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/wxsingle/WxPortalController.java | 85 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/CoverCallbackVo.java | 24 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebError.proto | 11 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/ChatmsgMsg.java | 125 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/CsvFileLoader.java | 16 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebRedPackInfo.proto | 19 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/AuditAudienceMaskOuterClass.java | 1155 script/docker/weaviate/docker-compose.yml | 28 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebUserPause.proto | 10 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/bo/KnowledgeAttachBo.java | 56 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuLiveChatClient.java | 268 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/ConstantConfigEnum.java | 34 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/JoingroupMsg.java | 52 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCLiveWarningMaskStatusChangedAudience.proto | 10 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_chat_message_msg.java | 2384 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebAuthorResume.proto | 9 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/base/BaseResponse.java | 85 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_webcast_chat_message_msgProto.java | 93 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/GiftStruct.proto | 66 ruoyi-admin/src/main/resources/application.yml | 70 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebRedPackCoverTypeOuterClass.java | 180 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/UnsubscribeHandler.java | 28 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/Usage.java | 24 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/PSHostInfo.proto | 10 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/ScanHandler.java | 8 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/impl/KnowledgeFragmentServiceImpl.java | 113 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/IBilibiliMsgListener.java | 138 script/sql/update/update_20250111.sql | 49 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/enums/ClientStatusEnums.java | 83 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/BaseWup.java | 138 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/SubMsg.java | 51 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebShareFeed.proto | 16 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebLikeFeedOuterClass.java | 1046 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaStreamLineTypeEnum.java | 62 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/SpecialInfo.java | 91 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/ResourceLoader.java | 12 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/impl/KnowledgeAttachServiceImpl.java | 125 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/User.proto | 272 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_member_message_msg.java | 2828 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCPingAck.proto | 9 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/core/CoreManage.java | 323 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/base/IDouyinMsg.java | 34 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/IpUtil.java | 35 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebWatchingUserInfoOuterClass.java | 1080 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/IHuyaConnectionListener.java | 38 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/SseServiceImpl.java | 249 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/cofing/WxCpConfiguration.java | 130 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/MessageNoticeMsg.java | 197 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/base/IHuyaCmdMsg.java | 35 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/base/BaseDouyuCmdMsg.java | 62 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/URLEnum.java | 49 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/NoblePetAttr.java | 77 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/test/java/tech/ordinaryroad/live/chat/client/kuaishou/client/KuaishouLiveChatClientTest.java | 206 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/HeartbeatReplyMsg.java | 60 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/util/DouyuCodecUtil.java | 329 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/PatternRefOuterClass.java | 773 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/test/java/tech/ordinaryroad/live/chat/client/huya/api/HuyaApisTest.java | 20 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/ContentFormat.java | 76 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/KeyWordController.java | 191 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/vo/KnowledgeInfoVo.java | 57 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/FaithInfo.java | 67 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceOuterClass.java | 1895 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebLiveAssistantTypeOuterClass.java | 180 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCEchoOuterClass.java | 624 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebBetChangedOuterClass.java | 550 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/parameters/UUIDParaEnum.java | 30 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/UUIDShortUtil.java | 33 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/IPptService.java | 63 ruoyi-admin/src/main/java/org/ruoyi/controller/KnowledgeController.java | 210 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaConnectionHandler.java | 152 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ISuperChatMsg.java | 49 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebEnterRoomAckOuterClass.java | 697 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/GiftStructOuterClass.java | 6440 ++ ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/ItemEffectInfo.java | 70 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/ChatStoreController.java | 42 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/AuthReplyMsg.java | 63 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebBetClosed.proto | 9 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frame_msg.java | 2007 ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/config/WebSocketConfig.java | 6 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebCommentFeed.proto | 18 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/HeartbeatMsg.java | 58 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/WupRsp.java | 45 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebSystemNoticeFeedOuterClass.java | 1427 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IGiftMsg.java | 100 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/LiveAppUAEx.java | 73 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/listener/SSEEventSourceListener.java | 4 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_cmd_msgOrBuilder.java | 93 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/GiftIMPriorityOuterClass.java | 816 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouBinaryFrameHandler.java | 127 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebUserPauseType.proto | 9 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/UserRidePetInfo.java | 94 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebPipEnded.proto | 9 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/IDouyinConnectionListener.java | 35 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/base/BaseWxRobConfig.java | 111 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_webcast_gift_message_msgProto.java | 112 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/base/BaseWxRobRelation.java | 84 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebRefreshWalletOuterClass.java | 469 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebSuspectedViolationOuterClass.java | 550 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSHeartbeat.proto | 9 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/AbstractHandler.java | 9 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptGeneratePptxDto.java | 24 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebGuessClosed.proto | 11 ruoyi-common/ruoyi-common-wechat/src/main/resources/undertow.txt | 51 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/AppInfo.java | 37 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/service/ILoginService.java | 85 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/api/KuaishouApis.java | 235 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/pom.xml | 55 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaWupFunctionEnum.java | 59 ruoyi-common/ruoyi-common-wechat/src/main/resources/passport.properties | 1 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/constant/OperationEnum.java | 86 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/dto/GiftListInfo.java | 136 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatReflectUtil.java | 50 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/KeepliveMsg.java | 62 ruoyi-common/ruoyi-common-core/src/main/java/org/ruoyi/common/core/constant/Constants.java | 10 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_gift_message_msg.java | 3963 + ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_websocket_frame_msg.proto | 25 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/CharacterTextSplitter.java | 51 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebLiveAssistantType.proto | 10 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/Config.java | 78 ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/config/BaseNettyClientConfig.java | 65 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/exception/BaseException.java | 51 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/MoreConfig.java | 12 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/test/java/tech/ordinaryroad/live/chat/client/douyin/client/DouyinLiveChatClientTest.java | 93 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/RobotWorkController.java | 179 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/base/BaseHuyaCmdMsg.java | 79 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/RegisterGroupReq.java | 67 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebHeartbeatOuterClass.java | 550 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebRefreshWallet.proto | 8 ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/SelectorEnum.java | 48 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/test/java/tech/ordinaryroad/live/chat/client/douyin/api/DouyinApisTest.java | 15 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/CommEnterBanner.java | 67 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/ClientId.proto | 14 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/UserHeartBeatReq.java | 90 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/test/java/tech/ordinaryroad/live/chat/client/bilibili/client/BilibiliLiveChatClientTest.java | 176 ruoyi-admin/pom.xml | 11 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/KuaishouDanmuMsg.java | 100 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/req/KnowledgeInfoUploadRequest.java | 13 ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IEnterRoomMsgListener.java | 47 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebErrorOuterClass.java | 769 ruoyi-common/pom.xml | 1 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frame.java | 1315 ruoyi-admin/src/test/java/org/biada/test/TagUnitTest.java | 0 /dev/null | 0 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebGuessOpenedOuterClass.java | 845 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/request.java | 4 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/test/java/tech/ordinaryroad/live/chat/client/bilibili/api/BilibiliApisTest.java | 16 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSError.proto | 9 ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorizer/VectorizationFactory.java | 23 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/Dm_v2Proto.java | 78 ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/SubscribeHandler.java | 63 ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/PushMessage.java | 84 673 files changed, 171,542 insertions(+), 319 deletions(-) diff --git a/application.yml b/application.yml deleted file mode 100644 index 12d9bec..0000000 --- a/application.yml +++ /dev/null @@ -1,392 +0,0 @@ -# 椤圭洰鐩稿叧閰嶇疆 -ruoyi: - # 鍚嶇О - name: "xmzs" - # 鐗堟湰 - version: ${revision} - # 鐗堟潈骞翠唤 - copyrightYear: 2023 - # 瀹炰緥婕旂ず寮�鍏� - demoEnabled: true - # 鑾峰彇ip鍦板潃寮�鍏� - addressEnabled: false - -captcha: - enable: false - # 椤甸潰 <鍙傛暟璁剧疆> 鍙紑鍚叧闂� 楠岃瘉鐮佹牎楠� - # 楠岃瘉鐮佺被鍨� math 鏁扮粍璁$畻 char 瀛楃楠岃瘉 - type: MATH - # line 绾挎骞叉壈 circle 鍦嗗湀骞叉壈 shear 鎵洸骞叉壈 - category: CIRCLE - # 鏁板瓧楠岃瘉鐮佷綅鏁� - numberLength: 1 - # 瀛楃楠岃瘉鐮侀暱搴� - charLength: 4 - -# 寮�鍙戠幆澧冮厤缃� -server: - # 鏈嶅姟鍣ㄧ殑HTTP绔彛锛岄粯璁や负8080 - port: 6039 - servlet: - # 搴旂敤鐨勮闂矾寰� - context-path: / - # undertow 閰嶇疆 - undertow: - # HTTP post鍐呭鐨勬渶澶уぇ灏忋�傚綋鍊间负-1鏃讹紝榛樿鍊间负澶у皬鏄棤闄愮殑 - max-http-post-size: -1 - # 浠ヤ笅鐨勯厤缃細褰卞搷buffer,杩欎簺buffer浼氱敤浜庢湇鍔″櫒杩炴帴鐨処O鎿嶄綔,鏈夌偣绫讳技netty鐨勬睜鍖栧唴瀛樼鐞� - # 姣忓潡buffer鐨勭┖闂村ぇ灏�,瓒婂皬鐨勭┖闂磋鍒╃敤瓒婂厖鍒� - buffer-size: 512 - # 鏄惁鍒嗛厤鐨勭洿鎺ュ唴瀛� - direct-buffers: true - threads: - # 璁剧疆IO绾跨▼鏁�, 瀹冧富瑕佹墽琛岄潪闃诲鐨勪换鍔�,瀹冧滑浼氳礋璐e涓繛鎺�, 榛樿璁剧疆姣忎釜CPU鏍稿績涓�涓嚎绋� - io: 8 - # 闃诲浠诲姟绾跨▼姹�, 褰撴墽琛岀被浼約ervlet璇锋眰闃诲鎿嶄綔, undertow浼氫粠杩欎釜绾跨▼姹犱腑鍙栧緱绾跨▼,瀹冪殑鍊艰缃彇鍐充簬绯荤粺鐨勮礋杞� - worker: 256 - -# 鏃ュ織閰嶇疆 -logging: - level: - com.xmzs: @logging.level@ - org.springframework: warn - config: classpath:logback-plus.xml - -# 鐢ㄦ埛閰嶇疆 -user: - password: - # 瀵嗙爜鏈�澶ч敊璇鏁� - maxRetryCount: 5 - # 瀵嗙爜閿佸畾鏃堕棿锛堥粯璁�10鍒嗛挓锛� - lockTime: 10 - -# Spring閰嶇疆 -spring: - application: - name: ${ruoyi.name} - # 璧勬簮淇℃伅 - messages: - # 鍥介檯鍖栬祫婧愭枃浠惰矾寰� - basename: i18n/messages - profiles: - active: @profiles.active@ - # 鏂囦欢涓婁紶 - servlet: - multipart: - # 鍗曚釜鏂囦欢澶у皬 - max-file-size: 10MB - # 璁剧疆鎬讳笂浼犵殑鏂囦欢澶у皬 - max-request-size: 20MB - mvc: - format: - date-time: yyyy-MM-dd HH:mm:ss - jackson: - # 鏃ユ湡鏍煎紡鍖� - date-format: yyyy-MM-dd HH:mm:ss - serialization: - # 鏍煎紡鍖栬緭鍑� - indent_output: false - # 蹇界暐鏃犳硶杞崲鐨勫璞� - fail_on_empty_beans: false - deserialization: - # 鍏佽瀵硅薄蹇界暐json涓笉瀛樺湪鐨勫睘鎬� - fail_on_unknown_properties: false - -# Sa-Token閰嶇疆 -sa-token: - # token鍚嶇О (鍚屾椂涔熸槸cookie鍚嶇О) - token-name: Authorization - # token鏈夋晥鏈� 璁句负7澶� (蹇呭畾杩囨湡) 鍗曚綅: 绉� - timeout: 604800 - # token涓存椂鏈夋晥鏈� (鎸囧畾鏃堕棿鏃犳搷浣滃氨杩囨湡) 鍗曚綅: 绉� - activity-timeout: 604800 - # 鏄惁鍏佽鍚屼竴璐﹀彿骞跺彂鐧诲綍 (涓簍rue鏃跺厑璁镐竴璧风櫥褰�, 涓篺alse鏃舵柊鐧诲綍鎸ゆ帀鏃х櫥褰�) - is-concurrent: true - # 鍦ㄥ浜虹櫥褰曞悓涓�璐﹀彿鏃讹紝鏄惁鍏辩敤涓�涓猼oken (涓簍rue鏃舵墍鏈夌櫥褰曞叡鐢ㄤ竴涓猼oken, 涓篺alse鏃舵瘡娆$櫥褰曟柊寤轰竴涓猼oken) - is-share: false - # 鏄惁灏濊瘯浠巋eader閲岃鍙杢oken - is-read-header: true - # 鏄惁灏濊瘯浠巆ookie閲岃鍙杢oken - is-read-cookie: false - # token鍓嶇紑 - token-prefix: "Bearer" - # jwt绉橀挜 - jwt-secret-key: abcdefghijklmnopqrstuvwxyz - -# security閰嶇疆 -security: - # 鎺掗櫎璺緞 - excludes: - # 淇敼鐢ㄦ埛澶村儚 - - /system/user/edit/avatar - - /pay/returnUrl - - /pay/notifyUrl - # 涓婁紶鏂囦欢 - - /resource/oss/upload - # 閲嶇疆瀵嗙爜 - - /auth/reset/password - # 鑱婂ぉ鎺ュ彛 - - /chat - # 闈欐�佽祫婧� - - /*.html - - /**/*.html - - /**/*.css - - /**/*.js - # 鍏叡璺緞 - - /favicon.ico - - /error - # swagger 鏂囨。閰嶇疆 - - /*/api-docs - - /*/api-docs/** - # actuator 鐩戞帶閰嶇疆 - - /actuator - - /actuator/** -# 澶氱鎴烽厤缃� -tenant: - # 鏄惁寮�鍚� - enable: false - # 鎺掗櫎琛� - excludes: - - sys_menu - - sys_tenant - - sys_tenant_package - - sys_role_dept - - sys_role_menu - - sys_user_post - - sys_user_role - -# MyBatisPlus閰嶇疆 -# https://baomidou.com/config/ -mybatis-plus: - # 涓嶆敮鎸佸鍖�, 濡傛湁闇�瑕佸彲鍦ㄦ敞瑙i厤缃� 鎴� 鎻愬崌鎵寘绛夌骇 - # 渚嬪 com.**.**.mapper - mapperPackage: com.xmzs.**.mapper - # 瀵瑰簲鐨� XML 鏂囦欢浣嶇疆 - mapperLocations: classpath*:mapper/**/*Mapper.xml - # 瀹炰綋鎵弿锛屽涓猵ackage鐢ㄩ�楀彿鎴栬�呭垎鍙峰垎闅� - typeAliasesPackage: com.xmzs.**.domain - # 鍚姩鏃舵槸鍚︽鏌� MyBatis XML 鏂囦欢鐨勫瓨鍦紝榛樿涓嶆鏌� - checkConfigLocation: false - configuration: - # 鑷姩椹煎嘲鍛藉悕瑙勫垯锛坈amel case锛夋槧灏� - mapUnderscoreToCamelCase: true - # MyBatis 鑷姩鏄犲皠绛栫暐 - # NONE锛氫笉鍚敤 PARTIAL锛氬彧瀵归潪宓屽 resultMap 鑷姩鏄犲皠 FULL锛氬鎵�鏈� resultMap 鑷姩鏄犲皠 - autoMappingBehavior: FULL - # MyBatis 鑷姩鏄犲皠鏃舵湭鐭ュ垪鎴栨湭鐭ュ睘鎬у鐞嗙瓥 - # NONE锛氫笉鍋氬鐞� WARNING锛氭墦鍗扮浉鍏宠鍛� FAILING锛氭姏鍑哄紓甯稿拰璇︾粏淇℃伅 - autoMappingUnknownColumnBehavior: NONE - # 鏇磋缁嗙殑鏃ュ織杈撳嚭 浼氭湁鎬ц兘鎹熻�� org.apache.ibatis.logging.stdout.StdOutImpl - # 鍏抽棴鏃ュ織璁板綍 (鍙崟绾娇鐢� p6spy 鍒嗘瀽) org.apache.ibatis.logging.nologging.NoLoggingImpl - # 榛樿鏃ュ織杈撳嚭 org.apache.ibatis.logging.slf4j.Slf4jImpl - logImpl: org.apache.ibatis.logging.nologging.NoLoggingImpl - global-config: - # 鏄惁鎵撳嵃 Logo banner - banner: true - dbConfig: - # 涓婚敭绫诲瀷 - # AUTO 鑷 NONE 绌� INPUT 鐢ㄦ埛杈撳叆 ASSIGN_ID 闆姳 ASSIGN_UUID 鍞竴 UUID - idType: ASSIGN_ID - # 閫昏緫宸插垹闄ゅ�� - logicDeleteValue: 2 - # 閫昏緫鏈垹闄ゅ�� - logicNotDeleteValue: 0 - # 瀛楁楠岃瘉绛栫暐涔� insert,鍦� insert 鐨勬椂鍊欑殑瀛楁楠岃瘉绛栫暐 - # IGNORED 蹇界暐 NOT_NULL 闈濶ULL NOT_EMPTY 闈炵┖ DEFAULT 榛樿 NEVER 涓嶅姞鍏� SQL - insertStrategy: NOT_NULL - # 瀛楁楠岃瘉绛栫暐涔� update,鍦� update 鐨勬椂鍊欑殑瀛楁楠岃瘉绛栫暐 - updateStrategy: NOT_NULL - # 瀛楁楠岃瘉绛栫暐涔� select,鍦� select 鐨勬椂鍊欑殑瀛楁楠岃瘉绛栫暐鏃� wrapper 鏍规嵁鍐呴儴 entity 鐢熸垚鐨� where 鏉′欢 - where-strategy: NOT_NULL - -# 鏁版嵁鍔犲瘑 -mybatis-encryptor: - # 鏄惁寮�鍚姞瀵� - enable: false - # 榛樿鍔犲瘑绠楁硶 - algorithm: BASE64 - # 缂栫爜鏂瑰紡 BASE64/HEX銆傞粯璁ASE64 - encode: BASE64 - # 瀹夊叏绉橀挜 瀵圭О绠楁硶鐨勭閽� 濡傦細AES锛孲M4 - password: - # 鍏閽� 闈炲绉扮畻娉曠殑鍏閽� 濡傦細SM2锛孯SA - publicKey: - privateKey: - -# Swagger閰嶇疆 -swagger: - info: - # 鏍囬 - title: '鏍囬锛�${ruoyi.name}澶氱鎴风鐞嗙郴缁焈鎺ュ彛鏂囨。' - # 鎻忚堪 - description: '鎻忚堪锛氱敤浜庣鐞嗛泦鍥㈡棗涓嬪叕鍙哥殑浜哄憳淇℃伅,鍏蜂綋鍖呮嫭XXX,XXX妯″潡...' - # 鐗堟湰 - version: '鐗堟湰鍙�: ${ruoyi.version}' - # 浣滆�呬俊鎭� - contact: - name: ageerle - email: ageerle@163.com - url: https://gitee.com/ageerle/ruoyi-ai - components: - # 閴存潈鏂瑰紡閰嶇疆 - security-schemes: - apiKey: - type: APIKEY - in: HEADER - name: ${sa-token.token-name} - -springdoc: - api-docs: - # 鏄惁寮�鍚帴鍙f枃妗� - enabled: true - swagger-ui: - # 鎸佷箙鍖栬璇佹暟鎹� - persistAuthorization: true - #杩欓噷瀹氫箟浜嗕袱涓垎缁勶紝鍙畾涔夊涓紝涔熷彲浠ヤ笉瀹氫箟 - group-configs: - - group: 1.婕旂ず妯″潡 - packages-to-scan: com.xmzs.demo - - group: 2.閫氱敤妯″潡 - packages-to-scan: com.xmzs.web - - group: 3.绯荤粺妯″潡 - packages-to-scan: com.xmzs.system - - group: 4.浠g爜鐢熸垚妯″潡 - packages-to-scan: com.xmzs.generator - -# 闃叉XSS鏀诲嚮 -xss: - # 杩囨护寮�鍏� - enabled: true - # 鎺掗櫎閾炬帴锛堝涓敤閫楀彿鍒嗛殧锛� - excludes: /system/notice - # 鍖归厤閾炬帴 - urlPatterns: /system/*,/monitor/*,/tool/* - -# 鍏ㄥ眬绾跨▼姹犵浉鍏抽厤缃� -thread-pool: - # 鏄惁寮�鍚嚎绋嬫睜 - enabled: false - # 闃熷垪鏈�澶ч暱搴� - queueCapacity: 128 - # 绾跨▼姹犵淮鎶ょ嚎绋嬫墍鍏佽鐨勭┖闂叉椂闂� - keepAliveSeconds: 300 - ---- # 鍒嗗竷寮忛攣 lock4j 鍏ㄥ眬閰嶇疆 -lock4j: - # 鑾峰彇鍒嗗竷寮忛攣瓒呮椂鏃堕棿锛岄粯璁や负 3000 姣 - acquire-timeout: 3000 - # 鍒嗗竷寮忛攣鐨勮秴鏃舵椂闂达紝榛樿涓� 30 绉� - expire: 30000 - ---- # Actuator 鐩戞帶绔偣鐨勯厤缃」 -management: - endpoints: - web: - exposure: - include: '*' - endpoint: - health: - show-details: ALWAYS - logfile: - external-file: ./logs/sys-console.log - ---- # websocket -websocket: - enabled: false - # 璺緞 - path: '' - # 璁剧疆璁块棶婧愬湴鍧� - allowedOrigins: '*' - -# 寰俊灏忕▼搴忛厤缃俊鎭� -wx: - miniapp: - configs: - - appid: # 浣犵殑appid - secret: # 浣犵殑secret - token: #寰俊灏忕▼搴忔秷鎭湇鍔″櫒閰嶇疆鐨則oken - aesKey: #寰俊灏忕▼搴忔秷鎭湇鍔″櫒閰嶇疆鐨凟ncodingAESKey - msgDataFormat: JSON -baidu: - # 鏄惁寮�鍚枃鏈鏍� - enabled: false - # 鏂囨湰瀹℃牳 - textReview: - apiKey: '' # apiKey - secretKey: '' # secretKey - appKey: xxxxxxxxxxxxxxxxx - secretKey: xxxxxxxxxxxxxxxxxxxxxxx - -wechat: - # 鏄惁浣跨敤寰俊 true/false - enable: true - # 鐢熸垚鐨勭櫥褰曚簩缁寸爜璺緞 榛樿涓庨」鐩悓绾� - qrPath: "./" - -keyword: - # 閲嶇疆浼氳瘽鎸囦护 - reset: "閲嶇疆浼氳瘽" - # ai鐢诲浘鎸囦护(DALL路E妯″瀷 https://platform.openai.com/docs/models/dall-e) - # generation 鏍规嵁鍏抽敭璇嶇敓鎴愬浘鐗�(https://platform.openai.com/docs/guides/images/generations) - image: "ai鐢诲浘" - # ai璇煶鎸囦护(TTS妯″瀷 https://platform.openai.com/docs/api-reference/audio) - audio: "ai璇煶" - -mj: - api-secret: 'sk-xx' - task-store: - type: in_memory - timeout: 30d - translate-way: gpt - # proxy: - # host: 127.0.0.1 - # port: 10809 - ng-discord: - server: 'https://xxx.pandarobot.chat/' - cdn: 'https://xxx.pandarobot.chat/' - wss: 'https://xxx.pandarobot.chat/' - openai: - gpt-api-url: 'https://api.pandarobot.chat/' - gpt-api-key: 'sk-xx' - accounts: - - guild-id: 'xx' - channel-id: 'xx' - user-token: 'xx' - ---- # mail 閭欢鍙戦�� -mail: - enabled: true - host: smtp.163.com - port: 465 - # 鏄惁闇�瑕佺敤鎴峰悕瀵嗙爜楠岃瘉 - auth: true - # 鍙戦�佹柟锛岄伒寰猂FC-822鏍囧噯 - from: ageerle@163.com - # 鐢ㄦ埛鍚嶏紙娉ㄦ剰锛氬鏋滀娇鐢╢oxmail閭锛屾澶剈ser涓簈q鍙凤級 - user: ageerle@163.com - # 瀵嗙爜锛堝~鍐欐巿鏉冪爜锛� - pass: TOGXBVPYFVPFRQMQ - # 浣跨敤 STARTTLS瀹夊叏杩炴帴锛孲TARTTLS鏄绾枃鏈�氫俊鍗忚鐨勬墿灞曘�� - starttlsEnable: true - # 浣跨敤SSL瀹夊叏杩炴帴 - sslEnable: true - # SMTP瓒呮椂鏃堕暱锛屽崟浣嶆绉掞紝缂虹渷鍊间笉瓒呮椂 - timeout: 0 - # Socket杩炴帴瓒呮椂鍊硷紝鍗曚綅姣锛岀己鐪佸�间笉瓒呮椂 - connectionTimeout: 0 - -# chatgpt閰嶇疆淇℃伅 -chat: - apiKey: 'sk-xxx' - apiHost: 'https://api.pandarobot.chat/' - -# 鏀粯閰嶇疆淇℃伅 -pay: - pid: 'xxx' - key: 'xxx' - payUrl: 'https://pay.pandarobot.chat/mapi.php' - notify_url: 'https://www.pandarobot.chat/pay/returnUrl' - return_url: 'https://www.pandarobot.chat/pay/notifyUrl' - type: 'wxpay' - device: 'pc' - sign_type: 'MD5' diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index acec219..a8276a4 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -57,7 +57,10 @@ <artifactId>ruoyi-fusion</artifactId> </dependency> - + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>ruoyi-knowledge</artifactId> + </dependency> <!-- demo妯″潡 --> @@ -78,6 +81,12 @@ <artifactId>thumbnailator</artifactId> <version>0.4.11</version> </dependency> + <dependency> + <groupId>io.github.ollama4j</groupId> + <artifactId>ollama4j</artifactId> + <version>1.0.79</version> + <scope>compile</scope> + </dependency> </dependencies> diff --git a/ruoyi-admin/src/main/java/com/xmzs/PandaApplication.java b/ruoyi-admin/src/main/java/com/xmzs/PandaApplication.java deleted file mode 100644 index d043c88..0000000 --- a/ruoyi-admin/src/main/java/com/xmzs/PandaApplication.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.xmzs; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup; - -/** - * 鍚姩绋嬪簭 - * - * @author Lion Li - */ - -@SpringBootApplication -public class PandaApplication { - - - public static void main(String[] args) { - SpringApplication application = new SpringApplication(PandaApplication.class); - application.setApplicationStartup(new BufferingApplicationStartup(2048)); - application.run(args); - System.out.println("(鈾モ棤鈥库棤)锞夛緸 panda鏅鸿兘鍔╂墜鍚姩鎴愬姛 醿�(麓凇`醿�)锞�"); - } -} diff --git a/ruoyi-admin/src/main/java/com/xmzs/PandaServletInitializer.java b/ruoyi-admin/src/main/java/com/xmzs/PandaServletInitializer.java deleted file mode 100644 index fef0656..0000000 --- a/ruoyi-admin/src/main/java/com/xmzs/PandaServletInitializer.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs; - -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; - -/** - * web瀹瑰櫒涓繘琛岄儴缃� - * - * @author Lion Li - */ -public class PandaServletInitializer extends SpringBootServletInitializer { - - @Override - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { - return application.sources(PandaApplication.class); - } - -} diff --git a/ruoyi-admin/src/main/java/com/xmzs/controller/AuthController.java b/ruoyi-admin/src/main/java/com/xmzs/controller/AuthController.java deleted file mode 100644 index 0405b11..0000000 --- a/ruoyi-admin/src/main/java/com/xmzs/controller/AuthController.java +++ /dev/null @@ -1,157 +0,0 @@ -package com.xmzs.controller; - -import cn.dev33.satoken.annotation.SaIgnore; -import cn.hutool.core.collection.CollUtil; -import com.xmzs.common.core.constant.Constants; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.domain.model.*; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.StreamUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.common.tenant.helper.TenantHelper; -import com.xmzs.system.domain.bo.SysTenantBo; -import com.xmzs.system.domain.vo.LoginTenantVo; -import com.xmzs.system.domain.vo.SysTenantVo; -import com.xmzs.system.domain.vo.TenantListVo; -import com.xmzs.system.service.ISysTenantService; - - -import com.xmzs.system.service.SysLoginService; -import com.xmzs.system.service.SysRegisterService; -import com.xmzs.web.domain.vo.LoginVo; - -import jakarta.servlet.http.HttpServletRequest; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.net.URL; -import java.util.List; - -/** - * 璁よ瘉 - * - * @author Lion Li - */ -@SaIgnore -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/auth") -public class AuthController { - - private final SysLoginService loginService; - private final SysRegisterService registerService; - private final ISysTenantService tenantService; - - /** - * 鐧诲綍鏂规硶 - * - * @param body 鐧诲綍淇℃伅 - * @return 缁撴灉 - */ - @PostMapping("/login") - public R<LoginVo> login(@Validated @RequestBody LoginBody body) { - body.setTenantId(Constants.TENANT_ID); - LoginVo loginVo = new LoginVo(); - // 鐢熸垚浠ょ墝 - String token = loginService.login( - body.getTenantId(), - body.getUsername(), body.getPassword(), - body.getCode(), body.getUuid()); - loginVo.setToken(token); - loginVo.setUserInfo(LoginHelper.getLoginUser()); - return R.ok(loginVo); - } - - /** - * 鐭俊鐧诲綍 - * - * @param body 鐧诲綍淇℃伅 - * @return 缁撴灉 - */ - @PostMapping("/smsLogin") - public R<LoginVo> smsLogin(@Validated @RequestBody SmsLoginBody body) { - LoginVo loginVo = new LoginVo(); - // 鐢熸垚浠ょ墝 - String token = loginService.smsLogin(body.getTenantId(), body.getPhonenumber(), body.getSmsCode()); - loginVo.setToken(token); - return R.ok(loginVo); - } - - /** - * 閭欢鐧诲綍 - * - * @param body 鐧诲綍淇℃伅 - * @return 缁撴灉 - */ - @PostMapping("/emailLogin") - public R<LoginVo> emailLogin(@Validated @RequestBody EmailLoginBody body) { - LoginVo loginVo = new LoginVo(); - // 鐢熸垚浠ょ墝 - String token = loginService.emailLogin(body.getTenantId(), body.getEmail(), body.getEmailCode()); - loginVo.setToken(token); - return R.ok(loginVo); - } - - /** - * 娓稿鐧诲綍 - * - * @param loginBody - * @return 缁撴灉 - */ - @PostMapping("/visitorLogin") - public R<LoginVo> xcxLogin(@RequestBody VisitorLoginBody loginBody) { - return R.ok(loginService.visitorLogin(loginBody)); - } - - /** - * 閫�鍑虹櫥褰� - */ - @PostMapping("/logout") - public R<Void> logout() { - loginService.logout(); - return R.ok("閫�鍑烘垚鍔�"); - } - - /** - * 鐢ㄦ埛娉ㄥ唽 - */ - @PostMapping("/register") - public R<Void> register(@Validated @RequestBody RegisterBody user) { - registerService.register(user); - return R.ok(); - } - - /** - * 閲嶇疆瀵嗙爜 - */ - @PostMapping("/reset/password") - @SaIgnore - public R<Void> resetPassWord(@Validated @RequestBody RegisterBody user) { - registerService.resetPassWord(user); - return R.ok(); - } - - /** - * 鐧诲綍椤甸潰绉熸埛涓嬫媺妗� - * - * @return 绉熸埛鍒楄〃 - */ - @GetMapping("/tenant/list") - public R<LoginTenantVo> tenantList(HttpServletRequest request) throws Exception { - List<SysTenantVo> tenantList = tenantService.queryList(new SysTenantBo()); - List<TenantListVo> voList = MapstructUtils.convert(tenantList, TenantListVo.class); - // 鑾峰彇鍩熷悕 - String host = new URL(request.getRequestURL().toString()).getHost(); - // 鏍规嵁鍩熷悕杩涜绛涢�� - List<TenantListVo> list = StreamUtils.filter(voList, vo -> StringUtils.equals(vo.getDomain(), host)); - // 杩斿洖瀵硅薄 - LoginTenantVo vo = new LoginTenantVo(); - vo.setVoList(CollUtil.isNotEmpty(list) ? list : voList); - vo.setTenantEnabled(TenantHelper.isEnable()); - return R.ok(vo); - } - -} diff --git a/ruoyi-admin/src/main/java/com/xmzs/controller/CaptchaController.java b/ruoyi-admin/src/main/java/com/xmzs/controller/CaptchaController.java deleted file mode 100644 index de7d90b..0000000 --- a/ruoyi-admin/src/main/java/com/xmzs/controller/CaptchaController.java +++ /dev/null @@ -1,140 +0,0 @@ -package com.xmzs.controller; - -import cn.dev33.satoken.annotation.SaIgnore; -import cn.hutool.captcha.AbstractCaptcha; -import cn.hutool.captcha.generator.CodeGenerator; -import cn.hutool.core.util.IdUtil; -import cn.hutool.core.util.RandomUtil; -import com.xmzs.common.core.constant.Constants; -import com.xmzs.common.core.constant.GlobalConstants; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.core.utils.reflect.ReflectUtils; -import com.xmzs.common.mail.config.properties.MailProperties; -import com.xmzs.common.mail.utils.MailUtils; -import com.xmzs.common.redis.utils.RedisUtils; -import com.xmzs.common.sms.config.properties.SmsProperties; -import com.xmzs.common.sms.core.SmsTemplate; -import com.xmzs.common.sms.entity.SmsResult; -import com.xmzs.common.web.config.properties.CaptchaProperties; -import com.xmzs.common.web.enums.CaptchaType; -import com.xmzs.web.domain.request.EmailRequest; -import com.xmzs.web.domain.vo.CaptchaVo; -import jakarta.validation.Valid; -import jakarta.validation.constraints.NotBlank; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.expression.Expression; -import org.springframework.expression.ExpressionParser; -import org.springframework.expression.spel.standard.SpelExpressionParser; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; - -import java.time.Duration; -import java.util.HashMap; -import java.util.Map; - -/** - * 楠岃瘉鐮佹搷浣滃鐞� - * - * @author Lion Li - */ -@SaIgnore -@Slf4j -@Validated -@RequiredArgsConstructor -@RestController -public class CaptchaController { - - private final CaptchaProperties captchaProperties; - private final SmsProperties smsProperties; - private final MailProperties mailProperties; - - /** - * 鐭俊楠岃瘉鐮� - * - * @param phonenumber 鐢ㄦ埛鎵嬫満鍙� - */ - @GetMapping("/resource/sms/code") - public R<Void> smsCode(@NotBlank(message = "{user.phonenumber.not.blank}") String phonenumber) { - if (!smsProperties.getEnabled()) { - return R.fail("褰撳墠绯荤粺娌℃湁寮�鍚煭淇″姛鑳斤紒"); - } - String key = GlobalConstants.CAPTCHA_CODE_KEY + phonenumber; - String code = RandomUtil.randomNumbers(4); - RedisUtils.setCacheObject(key, code, Duration.ofMinutes(Constants.CAPTCHA_EXPIRATION)); - // 楠岃瘉鐮佹ā鏉縤d 鑷澶勭悊 (鏌ユ暟鎹簱鎴栧啓姝诲潎鍙�) - String templateId = ""; - Map<String, String> map = new HashMap<>(1); - map.put("code", code); - SmsTemplate smsTemplate = SpringUtils.getBean(SmsTemplate.class); - SmsResult result = smsTemplate.send(phonenumber, templateId, map); - if (!result.isSuccess()) { - log.error("楠岃瘉鐮佺煭淇″彂閫佸紓甯� => {}", result); - return R.fail(result.getMessage()); - } - return R.ok(); - } - - /** - * 閭楠岃瘉鐮� - * - * @param emailRequest 鐢ㄦ埛閭 - */ - //@PostMapping("/resource/email/code") - @PostMapping("/resource/email/code") - public R<Void> emailCode(@RequestBody @Valid EmailRequest emailRequest) { - if (!mailProperties.getEnabled()) { - return R.fail("褰撳墠绯荤粺娌℃湁寮�鍚偖绠卞姛鑳斤紒"); - } - String key = GlobalConstants.CAPTCHA_CODE_KEY + emailRequest.getUsername(); - String code = RandomUtil.randomNumbers(4); - RedisUtils.setCacheObject(key, code, Duration.ofMinutes(Constants.CAPTCHA_EXPIRATION)); - try { - MailUtils.sendText(emailRequest.getUsername(), "銆愮唺鐚姪鎵嬨�戠櫥褰曢獙璇佺爜", "鎮ㄦ湰娆¢獙璇佺爜涓猴細" + code + "锛屾湁鏁堟�т负" + Constants.CAPTCHA_EXPIRATION + "鍒嗛挓锛岃灏藉揩濉啓銆�"); - } catch (Exception e) { - log.error("楠岃瘉鐮佺煭淇″彂閫佸紓甯� => {}", e.getMessage()); - return R.fail(e.getMessage()); - } - return R.ok(); - } - - /** - * 鐢熸垚楠岃瘉鐮� - */ - @GetMapping("/code") - public R<CaptchaVo> getCode() { - CaptchaVo captchaVo = new CaptchaVo(); - boolean captchaEnabled = captchaProperties.getEnable(); - if (!captchaEnabled) { - captchaVo.setCaptchaEnabled(false); - return R.ok(captchaVo); - } - // 淇濆瓨楠岃瘉鐮佷俊鎭� - String uuid = IdUtil.simpleUUID(); - String verifyKey = GlobalConstants.CAPTCHA_CODE_KEY + uuid; - // 鐢熸垚楠岃瘉鐮� - CaptchaType captchaType = captchaProperties.getType(); - boolean isMath = CaptchaType.MATH == captchaType; - Integer length = isMath ? captchaProperties.getNumberLength() : captchaProperties.getCharLength(); - CodeGenerator codeGenerator = ReflectUtils.newInstance(captchaType.getClazz(), length); - AbstractCaptcha captcha = SpringUtils.getBean(captchaProperties.getCategory().getClazz()); - captcha.setGenerator(codeGenerator); - captcha.createCode(); - String code = captcha.getCode(); - if (isMath) { - ExpressionParser parser = new SpelExpressionParser(); - Expression exp = parser.parseExpression(StringUtils.remove(code, "=")); - code = exp.getValue(String.class); - } - RedisUtils.setCacheObject(verifyKey, code, Duration.ofMinutes(Constants.CAPTCHA_EXPIRATION)); - captchaVo.setUuid(uuid); - captchaVo.setImg(captcha.getImageBase64()); - return R.ok(captchaVo); - } - -} diff --git a/ruoyi-admin/src/main/java/com/xmzs/controller/ChatController.java b/ruoyi-admin/src/main/java/com/xmzs/controller/ChatController.java deleted file mode 100644 index 80b5dde..0000000 --- a/ruoyi-admin/src/main/java/com/xmzs/controller/ChatController.java +++ /dev/null @@ -1,113 +0,0 @@ -package com.xmzs.controller; - - -import com.xmzs.common.chat.domain.request.ChatRequest; -import com.xmzs.common.chat.domain.request.Dall3Request; -import com.xmzs.common.chat.entity.Tts.TextToSpeech; -import com.xmzs.common.chat.entity.files.UploadFileResponse; -import com.xmzs.common.chat.entity.images.Item; -import com.xmzs.common.chat.entity.whisper.WhisperResponse; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.domain.model.LoginUser; -import com.xmzs.common.core.exception.base.BaseException; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.system.domain.bo.ChatMessageBo; -import com.xmzs.system.domain.vo.ChatMessageVo; -import com.xmzs.system.service.IChatMessageService; -import com.xmzs.system.service.ISseService; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.Valid; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.core.io.Resource; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; - -import java.util.List; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @date 2023-03-01 - */ -@Controller -@Slf4j -@RequiredArgsConstructor -public class ChatController { - - private final ISseService ISseService; - - private final IChatMessageService chatMessageService; - - /** - * 鑱婂ぉ鎺ュ彛 - */ - @PostMapping("/chat") - @ResponseBody - public SseEmitter sseChat(@RequestBody @Valid ChatRequest chatRequest, HttpServletResponse response) { - return ISseService.sseChat(chatRequest); - } - - /** - * 涓婁紶鏂囦欢 - */ - @PostMapping("/v1/upload") - @ResponseBody - public UploadFileResponse upload(@RequestPart("file") MultipartFile file) { - return ISseService.upload(file); - } - - - /** - * 璇煶杞枃鏈� - * - * @param file - */ - @PostMapping("/audio") - @ResponseBody - public WhisperResponse audio(@RequestParam("file") MultipartFile file) { - WhisperResponse whisperResponse = ISseService.speechToTextTranscriptionsV2(file); - return whisperResponse; - } - - /** - * 鏂囨湰杞闊� - * - * @param textToSpeech - */ - @PostMapping("/speech") - @ResponseBody - public ResponseEntity<Resource> speech(@RequestBody TextToSpeech textToSpeech) { - return ISseService.textToSpeed(textToSpeech); - } - - - @PostMapping("/dall3") - @ResponseBody - public R<List<Item>> dall3(@RequestBody @Valid Dall3Request request) { - return R.ok(ISseService.dall3(request)); - } - - /** - * 鑱婂ぉ璁板綍 - */ - @PostMapping("/chatList") - @ResponseBody - public R<TableDataInfo<ChatMessageVo>> list(@RequestBody @Valid ChatMessageBo chatRequest, @RequestBody PageQuery pageQuery) { - // 榛樿鏌ヨ褰撳墠鐧诲綍鐢ㄦ埛娑堟伅璁板綍 - LoginUser loginUser = LoginHelper.getLoginUser(); - if (loginUser == null) { - throw new BaseException("鐢ㄦ埛鏈櫥褰曪紒"); - } - chatRequest.setUserId(loginUser.getUserId()); - TableDataInfo<ChatMessageVo> chatMessageVoTableDataInfo = chatMessageService.queryPageList(chatRequest, pageQuery); - return R.ok(chatMessageVoTableDataInfo); - } - -} diff --git a/ruoyi-admin/src/main/java/com/xmzs/controller/IndexController.java b/ruoyi-admin/src/main/java/com/xmzs/controller/IndexController.java deleted file mode 100644 index f37d1e4..0000000 --- a/ruoyi-admin/src/main/java/com/xmzs/controller/IndexController.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xmzs.controller; - -import cn.dev33.satoken.annotation.SaIgnore; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; - -/** - * 棣栭〉 - * - * @author Lion Li - */ -@SaIgnore -@RequiredArgsConstructor -@Controller -public class IndexController { - - /** - * 璁块棶棣栭〉锛屾彁绀鸿 - */ - @GetMapping("/") - public String index() { - return "index.html"; - } -} diff --git a/ruoyi-admin/src/main/java/com/xmzs/controller/PayController.java b/ruoyi-admin/src/main/java/com/xmzs/controller/PayController.java deleted file mode 100644 index e2c43cb..0000000 --- a/ruoyi-admin/src/main/java/com/xmzs/controller/PayController.java +++ /dev/null @@ -1,151 +0,0 @@ -package com.xmzs.controller; - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollectionUtil; -import cn.hutool.extra.qrcode.QrCodeUtil; -import com.xmzs.common.config.PayConfig; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.domain.model.LoginUser; -import com.xmzs.common.core.exception.base.BaseException; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.oss.core.OssClient; -import com.xmzs.common.oss.entity.UploadResult; -import com.xmzs.common.oss.factory.OssFactory; -import com.xmzs.common.response.PayResponse; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.common.service.PayService; -import com.xmzs.common.utils.MD5Util; -import com.xmzs.system.domain.bo.PaymentOrdersBo; -import com.xmzs.system.domain.bo.SysUserBo; -import com.xmzs.system.domain.request.OrderRequest; -import com.xmzs.system.domain.vo.PaymentOrdersVo; -import com.xmzs.system.domain.vo.SysUserVo; -import com.xmzs.system.service.IPaymentOrdersService; -import com.xmzs.system.service.ISysUserService; -import com.xmzs.system.util.OrderNumberGenerator; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.web.bind.annotation.*; - -import java.math.BigDecimal; -import java.util.List; - -@RequiredArgsConstructor -@RestController -@RequestMapping("/pay") -@Slf4j -public class PayController { - - private final PayService payService; - - private final ISysUserService userService; - - private final IPaymentOrdersService paymentOrdersService; - - private final PayConfig payConfig; - - /** - * 鑾峰彇鏀粯浜岀淮鐮� - * - * @Date 2023/7/3 - * @return void - **/ - @PostMapping("/payUrl") - public R<PaymentOrdersVo> payUrl(@RequestBody OrderRequest orderRequest) { - LoginUser loginUser = LoginHelper.getLoginUser(); - // 鍒涘缓璁㈠崟 - PaymentOrdersBo paymentOrders = new PaymentOrdersBo(); - paymentOrders.setOrderName(orderRequest.getName()); - paymentOrders.setAmount(new BigDecimal(orderRequest.getMoney())); - String orderNo = OrderNumberGenerator.generate(); - paymentOrders.setOrderNo(orderNo); - paymentOrders.setUserId(loginUser.getUserId()); - // TODO 鏀粯鐘舵�侀粯璁ゅ緟鏀粯 - 娣诲姞鏋氫妇 - paymentOrders.setPaymentStatus("1"); - paymentOrdersService.insertByBo(paymentOrders); - String payUrl = payService.getPayUrl(orderNo, orderRequest.getName(), Double.parseDouble(orderRequest.getMoney()), "192.168.1.6"); - byte[] bytes = QrCodeUtil.generatePng(payUrl, 300, 300); - OssClient storage = OssFactory.instance(); - UploadResult upload=storage.upload(bytes, storage.getPath("qrCode",".png"), "image/png"); - PaymentOrdersVo paymentOrdersVo = new PaymentOrdersVo(); - BeanUtil.copyProperties(paymentOrders,paymentOrdersVo); - paymentOrdersVo.setUrl(upload.getUrl()); - return R.ok(paymentOrdersVo); - } - - /** - * 璺宠浆閫氱煡鍦板潃 - * - * @Date 2023/7/3 - * @param - * @return void - **/ - @PostMapping("/notifyUrl") - public void notifyUrl() { - log.info("notifyUrl==========="); - } - - /** - * 鑾峰彇璁㈠崟淇℃伅 - * - */ - @PostMapping("/orderInfo") - public R<PaymentOrdersVo> orderInfo(@RequestBody OrderRequest orderRequest) { - if(StringUtils.isEmpty(orderRequest.getOrderNo())){ - throw new BaseException("璁㈠崟鍙蜂笉鑳戒负绌猴紒"); - } - PaymentOrdersBo paymentOrdersBo = new PaymentOrdersBo(); - paymentOrdersBo.setOrderNo(orderRequest.getOrderNo()); - List<PaymentOrdersVo> paymentOrdersList = paymentOrdersService.queryList(paymentOrdersBo); - if (CollectionUtil.isEmpty(paymentOrdersList)){ - throw new BaseException("璁㈠崟涓嶅瓨鍦紒"); - } - PaymentOrdersVo paymentOrdersVo = paymentOrdersList.get(0); - return R.ok(paymentOrdersVo); - } - - /** - * 璺宠浆閫氱煡鍦板潃 - * - * @Date 2023/7/3 - * @param payResponse - * @return void - **/ - @GetMapping("/returnUrl") - public String returnUrl(PayResponse payResponse) { - // 鏍¢獙绛惧悕 - String mdString = "money=" + payResponse.getMoney() + "&name=" + payResponse.getName() + - "&out_trade_no=" + payResponse.getOut_trade_no() + "&pid=" + payConfig.getPid() + - "&trade_no=" + payResponse.getTrade_no() + "&trade_status=" + payResponse.getTrade_status() + - "&type=" + payResponse.getType() + payConfig.getKey(); - String sign = MD5Util.GetMD5Code(mdString); - if(!sign.equals(payResponse.getSign())){ - throw new BaseException("鏍¢獙绛惧悕澶辫触锛�"); - } - double money = Double.parseDouble(payResponse.getMoney()); - log.info("鏀粯璁㈠崟鍙穥}",payResponse); - PaymentOrdersBo paymentOrdersBo = new PaymentOrdersBo(); - paymentOrdersBo.setOrderNo(payResponse.getOut_trade_no()); - List<PaymentOrdersVo> paymentOrdersList = paymentOrdersService.queryList(paymentOrdersBo); - if (CollectionUtil.isEmpty(paymentOrdersList)){ - throw new BaseException("璁㈠崟涓嶅瓨鍦紒"); - } - // 璁㈠崟鐘舵�佷慨鏀逛负宸叉敮浠� - PaymentOrdersVo paymentOrdersVo = paymentOrdersList.get(0); - paymentOrdersVo.setPaymentStatus("2"); - paymentOrdersVo.setPaymentMethod(payResponse.getType()); - BeanUtil.copyProperties(paymentOrdersVo,paymentOrdersBo); - paymentOrdersService.updateByBo(paymentOrdersBo); - - SysUserVo sysUserVo = userService.selectUserById(paymentOrdersVo.getUserId()); - sysUserVo.setUserBalance(sysUserVo.getUserBalance()+money); - SysUserBo sysUserBo = new SysUserBo(); - BeanUtil.copyProperties(sysUserVo,sysUserBo); - // 璁剧疆涓轰粯璐圭敤鎴� - sysUserBo.setUserGrade("1"); - userService.updateUser(sysUserBo); - return "success"; - } - -} - diff --git a/ruoyi-admin/src/main/java/com/xmzs/controller/WeChatController.java b/ruoyi-admin/src/main/java/com/xmzs/controller/WeChatController.java deleted file mode 100644 index 09ba22b..0000000 --- a/ruoyi-admin/src/main/java/com/xmzs/controller/WeChatController.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.xmzs.controller; - -import cn.dev33.satoken.annotation.SaIgnore; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.wechat.Wechat; -import com.xmzs.common.wechat.controller.LoginController; -import com.xmzs.common.wechat.core.MsgCenter; -import com.xmzs.system.cofing.KeywordConfig; -import com.xmzs.system.cofing.WechatConfig; -import com.xmzs.system.handler.WechatMessageHandler; -import com.xmzs.system.service.ISseService; -import lombok.Getter; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * 涓汉寰俊鎵╁睍鎺у埗鍣� - * - * @author WangLe - */ -@SaIgnore -@Slf4j -@Validated -@RequiredArgsConstructor -@RestController -public class WeChatController { - - @Getter - private Wechat wechatBot; - - private final WechatConfig wechatConfig; - - private final ISseService sseService; - - private final KeywordConfig keywordConfig; - - /** - * 鑾峰彇寰俊鐧诲綍浜岀淮鐮� - * - */ - @GetMapping("/getQr") - public R<String> getQr() { - //寰俊 - if (wechatConfig.getEnable()){ - log.info("姝e湪鐧诲綍寰俊,璇锋寜鎻愮ず鎿嶄綔锛�"); - wechatBot = new Wechat(new WechatMessageHandler(sseService, keywordConfig)); - // 鐧婚檰 - LoginController login = new LoginController(); - String qrCode = login.login_1(); - new Thread(login::login_2).start(); - wechatBot.start(); - return R.ok(qrCode); - }else { - return R.fail(); - } - } - -} diff --git a/ruoyi-admin/src/main/java/org/ruoyi/RuoYiAIApplication.java b/ruoyi-admin/src/main/java/org/ruoyi/RuoYiAIApplication.java new file mode 100644 index 0000000..2d0693c --- /dev/null +++ b/ruoyi-admin/src/main/java/org/ruoyi/RuoYiAIApplication.java @@ -0,0 +1,21 @@ +package org.ruoyi; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup; + +/** + * 鍚姩绋嬪簭 + * + * @author Lion Li + */ +@SpringBootApplication +public class RuoYiAIApplication { + + public static void main(String[] args) { + SpringApplication application = new SpringApplication(RuoYiAIApplication.class); + application.setApplicationStartup(new BufferingApplicationStartup(2048)); + application.run(args); + System.out.println("(鈾モ棤鈥库棤)锞夛緸 RuoYiAI鍚姩鎴愬姛 醿�(麓凇`醿�)锞�"); + } +} diff --git a/ruoyi-admin/src/main/java/org/ruoyi/RuoYiAIServletInitializer.java b/ruoyi-admin/src/main/java/org/ruoyi/RuoYiAIServletInitializer.java new file mode 100644 index 0000000..626d7a3 --- /dev/null +++ b/ruoyi-admin/src/main/java/org/ruoyi/RuoYiAIServletInitializer.java @@ -0,0 +1,18 @@ +package org.ruoyi; + +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; + +/** + * web瀹瑰櫒涓繘琛岄儴缃� + * + * @author Lion Li + */ +public class RuoYiAIServletInitializer extends SpringBootServletInitializer { + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(RuoYiAIApplication.class); + } + +} diff --git a/ruoyi-admin/src/main/java/org/ruoyi/RuoYiApplication.java b/ruoyi-admin/src/main/java/org/ruoyi/RuoYiApplication.java deleted file mode 100644 index 9c7d56e..0000000 --- a/ruoyi-admin/src/main/java/org/ruoyi/RuoYiApplication.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.ruoyi; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.context.metrics.buffering.BufferingApplicationStartup; - -/** - * 鍚姩绋嬪簭 - * - * @author Lion Li - */ -@SpringBootApplication -public class RuoYiApplication { - - public static void main(String[] args) { - SpringApplication application = new SpringApplication(RuoYiApplication.class); - application.setApplicationStartup(new BufferingApplicationStartup(2048)); - application.run(args); - System.out.println("(鈾モ棤鈥库棤)锞夛緸 RuoYiAi鍚姩鎴愬姛 醿�(麓凇`醿�)锞�"); - } -} diff --git a/ruoyi-admin/src/main/java/org/ruoyi/RuoYiServletInitializer.java b/ruoyi-admin/src/main/java/org/ruoyi/RuoYiServletInitializer.java deleted file mode 100644 index 082315f..0000000 --- a/ruoyi-admin/src/main/java/org/ruoyi/RuoYiServletInitializer.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.ruoyi; - -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; - -/** - * web瀹瑰櫒涓繘琛岄儴缃� - * - * @author Lion Li - */ -public class RuoYiServletInitializer extends SpringBootServletInitializer { - - @Override - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { - return application.sources(RuoYiApplication.class); - } - -} diff --git a/ruoyi-admin/src/main/java/org/ruoyi/controller/KnowledgeController.java b/ruoyi-admin/src/main/java/org/ruoyi/controller/KnowledgeController.java new file mode 100644 index 0000000..76e5996 --- /dev/null +++ b/ruoyi-admin/src/main/java/org/ruoyi/controller/KnowledgeController.java @@ -0,0 +1,210 @@ +package org.ruoyi.controller; + +import cn.dev33.satoken.stp.StpUtil; +import com.theokanning.openai.completion.chat.ChatMessageRole; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.RequiredArgsConstructor; +import org.ruoyi.common.chat.config.ChatConfig; +import org.ruoyi.common.chat.domain.request.ChatRequest; +import org.ruoyi.common.chat.entity.chat.ChatCompletion; +import org.ruoyi.common.chat.entity.chat.Message; +import org.ruoyi.common.chat.openai.OpenAiStreamClient; +import org.ruoyi.common.core.domain.R; +import org.ruoyi.common.core.validate.AddGroup; +import org.ruoyi.common.excel.utils.ExcelUtil; +import org.ruoyi.common.log.annotation.Log; +import org.ruoyi.common.log.enums.BusinessType; +import org.ruoyi.common.mybatis.core.page.PageQuery; +import org.ruoyi.common.mybatis.core.page.TableDataInfo; +import org.ruoyi.common.satoken.utils.LoginHelper; +import org.ruoyi.common.web.core.BaseController; +import org.ruoyi.knowledge.domain.bo.KnowledgeAttachBo; +import org.ruoyi.knowledge.domain.bo.KnowledgeFragmentBo; +import org.ruoyi.knowledge.domain.bo.KnowledgeInfoBo; +import org.ruoyi.knowledge.domain.req.KnowledgeInfoUploadRequest; +import org.ruoyi.knowledge.domain.vo.KnowledgeAttachVo; +import org.ruoyi.knowledge.domain.vo.KnowledgeFragmentVo; +import org.ruoyi.knowledge.domain.vo.KnowledgeInfoVo; +import org.ruoyi.knowledge.service.EmbeddingService; +import org.ruoyi.knowledge.service.IKnowledgeAttachService; +import org.ruoyi.knowledge.service.IKnowledgeFragmentService; +import org.ruoyi.knowledge.service.IKnowledgeInfoService; +import org.ruoyi.system.listener.SSEEventSourceListener; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.ruoyi.knowledge.chain.vectorstore.VectorStore; +import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; + +import java.util.ArrayList; +import java.util.List; + + +/** + * 鐭ヨ瘑搴� + * + * @author Lion Li + * @date 2024-10-21 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/knowledge") +public class KnowledgeController extends BaseController { + + private final IKnowledgeInfoService knowledgeInfoService; + + private final VectorStore vectorStore; + + private final IKnowledgeAttachService attachService; + + private final IKnowledgeFragmentService fragmentService; + + private final EmbeddingService embeddingService; + + private OpenAiStreamClient openAiStreamClient; + + private final ChatConfig chatConfig; + + /** + * 鐭ヨ瘑搴撳璇� + */ + @PostMapping("/send") + public SseEmitter send(@RequestBody @Valid ChatRequest chatRequest) { + + openAiStreamClient = chatConfig.getOpenAiStreamClient(); + SseEmitter sseEmitter = new SseEmitter(0L); + SSEEventSourceListener openAIEventSourceListener = new SSEEventSourceListener(sseEmitter); + + List<Message> messages = chatRequest.getMessages(); + String content = messages.get(messages.size() - 1).getContent().toString(); + List<String> nearestList; + List<Double> queryVector = embeddingService.getQueryVector(content); + nearestList = vectorStore.nearest(queryVector,chatRequest.getKid()); + for (String prompt : nearestList) { + Message sysMessage = Message.builder().content(prompt).role(Message.Role.USER).build(); + messages.add(sysMessage); + } + Message userMessage = Message.builder().content(content + (nearestList.size() > 0 ? "\n\n娉ㄦ剰锛氬洖绛旈棶棰樻椂锛岄』涓ユ牸鏍规嵁鎴戠粰浣犵殑绯荤粺涓婁笅鏂囧唴瀹瑰師鏂囪繘琛屽洖绛旓紝璇蜂笉瑕佽嚜宸卞彂鎸�,鍥炵瓟鏃朵繚鎸佸師鏉ユ枃鏈殑娈佃惤灞傜骇" : "") ).role(Message.Role.USER).build(); + messages.add(userMessage); + + + ChatCompletion completion = ChatCompletion + .builder() + .messages(messages) + .model(chatRequest.getModel()) + .temperature(chatRequest.getTemperature()) + .topP(chatRequest.getTop_p()) + .stream(true) + .build(); + openAiStreamClient.streamChatCompletion(completion, openAIEventSourceListener); + + return sseEmitter; + } + + + /** + * 鏍规嵁鐢ㄦ埛淇℃伅鏌ヨ鏈湴鐭ヨ瘑搴� + */ + @GetMapping("/list") + public TableDataInfo<KnowledgeInfoVo> list(KnowledgeInfoBo bo, PageQuery pageQuery) { + if(!StpUtil.isLogin()){ + throw new SecurityException("璇峰厛鍘荤櫥褰�!"); + } + bo.setUid(LoginHelper.getUserId()); + return knowledgeInfoService.queryPageList(bo, pageQuery); + } + + + + /** + * 鏂板鐭ヨ瘑搴� + */ + @Log(title = "鐭ヨ瘑搴�", businessType = BusinessType.INSERT) + @PostMapping("/save") + public R<Void> save(@Validated(AddGroup.class) @RequestBody KnowledgeInfoBo bo) { + knowledgeInfoService.saveOne(bo); + return R.ok(); + } + + /** + * 鍒犻櫎鐭ヨ瘑搴� + */ + @PostMapping("/remove/{id}") + public R<String> remove(@PathVariable String id){ + knowledgeInfoService.removeKnowledge(id); + return R.ok("鍒犻櫎鐭ヨ瘑搴撴垚鍔�!"); + } + + /** + * 淇敼鐭ヨ瘑搴� + */ + @Log(title = "鐭ヨ瘑搴�", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + public R<Void> edit( @RequestBody KnowledgeInfoBo bo) { + return toAjax(knowledgeInfoService.updateByBo(bo)); + } + + /** + * 瀵煎嚭鐭ヨ瘑搴撳垪琛� + */ + @Log(title = "鐭ヨ瘑搴�", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(KnowledgeInfoBo bo, HttpServletResponse response) { + List<KnowledgeInfoVo> list = knowledgeInfoService.queryList(bo); + ExcelUtil.exportExcel(list, "鐭ヨ瘑搴�", KnowledgeInfoVo.class, response); + } + + /** + * 鏌ヨ鐭ヨ瘑闄勪欢淇℃伅 + */ + @GetMapping("/detail/{kid}") + public TableDataInfo<KnowledgeAttachVo> attach(KnowledgeAttachBo bo, PageQuery pageQuery,@PathVariable String kid){ + bo.setKid(kid); + return attachService.queryPageList(bo, pageQuery); + } + + /** + * 涓婁紶鐭ヨ瘑搴撻檮浠� + */ + @PostMapping(value = "/attach/upload") + public R<String> upload(KnowledgeInfoUploadRequest request){ + knowledgeInfoService.upload(request); + return R.ok("涓婁紶鐭ヨ瘑搴撻檮浠舵垚鍔�!"); + } + + /** + * 鑾峰彇鐭ヨ瘑搴撻檮浠惰缁嗕俊鎭� + * + * @param id 涓婚敭 + */ + @GetMapping("attach/info/{id}") + public R<KnowledgeAttachVo> getAttachInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖") + @PathVariable Long id) { + return R.ok(attachService.queryById(id)); + } + + /** + * 鍒犻櫎鐭ヨ瘑搴撻檮浠� + * + */ + @PostMapping("attach/remove/{kid}") + public R<Void> removeAttach(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖") + @PathVariable String kid) { + attachService.removeKnowledgeAttach(kid); + return R.ok(); + } + + + /** + * 鏌ヨ鐭ヨ瘑鐗囨 + */ + @GetMapping("/fragment/list/{docId}") + public TableDataInfo<KnowledgeFragmentVo> fragmentList(KnowledgeFragmentBo bo, PageQuery pageQuery, @PathVariable String docId) { + bo.setDocId(docId); + return fragmentService.queryPageList(bo, pageQuery); + } + +} diff --git a/ruoyi-admin/src/main/java/org/ruoyi/controller/OllamaController.java b/ruoyi-admin/src/main/java/org/ruoyi/controller/OllamaController.java new file mode 100644 index 0000000..647eb47 --- /dev/null +++ b/ruoyi-admin/src/main/java/org/ruoyi/controller/OllamaController.java @@ -0,0 +1,67 @@ +package org.ruoyi.controller; + + +import io.github.ollama4j.OllamaAPI; +import io.github.ollama4j.exceptions.OllamaBaseException; +import io.github.ollama4j.models.chat.OllamaChatMessageRole; +import io.github.ollama4j.models.chat.OllamaChatRequestBuilder; +import io.github.ollama4j.models.chat.OllamaChatRequestModel; +import io.github.ollama4j.models.chat.OllamaChatResult; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.io.IOException; + +/** + * 鎻忚堪锛歄llama API璋冪敤 + * + * @author ageerle@163.com + * date 2024/11/6 + */ +@RestController +public class OllamaController { + + + @RequestMapping(value = "/qianwen-ai2") + private void ollama2(@RequestParam(value = "msg") String msg) { + + } + + public static void main(String[] args) throws OllamaBaseException, IOException, InterruptedException { + + String host = "http://localhost:11434/"; + + OllamaAPI ollama = new OllamaAPI(host); + OllamaChatRequestBuilder builder = OllamaChatRequestBuilder.getInstance("qwen2.5:7b"); + // 璁剧疆瓒呮椂鏃堕棿 + ollama.setRequestTimeoutSeconds(100); + // create first user question + String text = ""; + + String json = "{\"instruction\": \"瑙g瓟浠ヤ笅鏁板闂銆俓",\"input\": \"璁$畻 2 + 3 鐨勭粨鏋溿�俓",\"output\": \"2 + 3 = 5\"}"; + + OllamaChatRequestModel requestModel = builder.withMessage + (OllamaChatMessageRole.USER, "###鏂囨湰:"+text+"###,鐞嗚В鏂囨湰鍐呭锛屽苟涓斿皢鏂囨湰鍐呭杞崲涓�:"+json+"杈撳嚭JSON鏍煎紡,涓嶈鍖呭惈鍏朵粬鏃犲叧鍐呭,鍐呴儴浣跨敤鏃犻渶鑴辨晱") + .withGetJsonResponse() + .withStreaming() + .build(); + + // start conversation with model + OllamaChatResult chatResult = ollama.chat(requestModel); + + System.out.println("First answer: " + chatResult.getResponse()); + + // create next userQuestion + // requestModel = builder.withMessages(chatResult.getChatHistory()).withMessage(OllamaChatMessageRole.USER, "And what is the second largest city?").build(); + + // "continue" conversation with model + // chatResult = ollamaAPI.chat(requestModel); + + //System.out.println("Second answer: " + chatResult.getResponse()); + + // 鍘嗗彶璁板綍 + //System.out.println("Chat History: " + chatResult.getChatHistory()); + } + +} diff --git a/ruoyi-admin/src/main/resources/application-dev.yml b/ruoyi-admin/src/main/resources/application-dev.yml index 06e1b90..6608a60 100644 --- a/ruoyi-admin/src/main/resources/application-dev.yml +++ b/ruoyi-admin/src/main/resources/application-dev.yml @@ -8,28 +8,6 @@ username: ruoyi password: 123456 ---- # xxl-job 閰嶇疆 -xxl.job: - # 鎵ц鍣ㄥ紑鍏� - enabled: false - # 璋冨害涓績鍦板潃锛氬璋冨害涓績闆嗙兢閮ㄧ讲瀛樺湪澶氫釜鍦板潃鍒欑敤閫楀彿鍒嗛殧銆� - admin-addresses: http://localhost:9100/xxl-job-admin - # 鎵ц鍣ㄩ�氳TOKEN锛氶潪绌烘椂鍚敤 - access-token: xxl-job - executor: - # 鎵ц鍣ˋppName锛氭墽琛屽櫒蹇冭烦娉ㄥ唽鍒嗙粍渚濇嵁锛涗负绌哄垯鍏抽棴鑷姩娉ㄥ唽 - appname: xxl-job-executor - # 鎵ц鍣ㄧ鍙e彿 鎵ц鍣ㄤ粠9101寮�濮嬪線鍚庡啓 - port: 9101 - # 鎵ц鍣ㄦ敞鍐岋細榛樿IP:PORT - address: - # 鎵ц鍣↖P锛氶粯璁よ嚜鍔ㄨ幏鍙朓P - ip: - # 鎵ц鍣ㄨ繍琛屾棩蹇楁枃浠跺瓨鍌ㄧ鐩樿矾寰� - logpath: ./logs/xxl-job - # 鎵ц鍣ㄦ棩蹇楁枃浠朵繚瀛樺ぉ鏁帮細澶т簬3鐢熸晥 - logretentiondays: 30 - --- # 鏁版嵁婧愰厤缃� spring: datasource: @@ -49,7 +27,8 @@ driverClassName: com.mysql.cj.jdbc.Driver url: jdbc:mysql://43.139.70.230:3306/ruoyi-ai?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true username: ruoyi-ai - password: TZ7yaGtSRWeeBaBJ + password: eCaZ278N62k6fhYj + hikari: # 鏈�澶ц繛鎺ユ睜鏁伴噺 maxPoolSize: 20 @@ -78,7 +57,7 @@ # 鏁版嵁搴撶储寮� database: 0 # 瀵嗙爜(濡傛病鏈夊瘑鐮佽娉ㄩ噴鎺�) - #password: + # password: 123456 # 杩炴帴瓒呮椂鏃堕棿 timeout: 10S # 鏄惁寮�鍚痵sl diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 491dea5..bbaec24 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -6,7 +6,7 @@ # 鐗堟湰 version: ${revision} # 鐗堟潈骞翠唤 - copyrightYear: 2023 + copyrightYear: 2025 # 瀹炰緥婕旂ず寮�鍏� demoEnabled: true # 鑾峰彇ip鍦板潃寮�鍏� @@ -294,7 +294,7 @@ websocket: enabled: true # 璺緞 - path: '' + path: '/resource/websocket' # 璁剧疆璁块棶婧愬湴鍧� allowedOrigins: '*' @@ -308,28 +308,34 @@ aesKey: #寰俊灏忕▼搴忔秷鎭湇鍔″櫒閰嶇疆鐨凟ncodingAESKey msgDataFormat: JSON + # 浼佷笟寰俊搴旂敤 +wechat: + # 鏄惁浣跨敤寰俊 true/false + enable: true + # 鐢熸垚鐨勭櫥褰曚簩缁寸爜璺緞 榛樿涓庨」鐩悓绾� + qrPath: "./" + # 浼佷笟寰俊搴旂敤 + cp: + corpId: + appConfigs: + - agentId: + secret: '' + token: '' + aesKey: '' + # 鐭ヨ瘑搴撻厤缃� chain: split: chunk: endspliter: "<STOP>" # 鍒嗗潡鏂囨湰澶у皬 - size: 500 - overlay: 0 - qaspliter: "######" + size: 200 + overlay: 30 + qaspliter: "###" # 鐭ヨ瘑搴撲腑妫�绱㈢殑鏉℃暟 limits: 5 - vectorization: - type: openai - openai: - model: 'text-embedding-3-small' - baidu: - model: bge-large-zh - zhipu: - model: embedding-2 - # 鏅烘櫘API KEY - token: xx vector: + model: 'text-embedding-3-small' store: type: weaviate weaviate: @@ -341,38 +347,4 @@ port: 19530 dimension: 1536 collection: LocalKnowledge - llm: - openai: - token: sk-xx - model: gpt-4-1106-preview - chatglm: - baseurl: http://127.0.0.1:8000/ - model: chatglm2-6b - baidu: - appKey: xx - secretKey: xx - model: ernie_bot - zhipu: - model: glm-4 - audio: - type: openai - text: - type: openai - function: - type: baidu - vision: - type: openai - image: - type: openai - -upload: - path: /data/upload - -proxy: - socket: - host: 127.0.0.1 - port: 7890 - -resource: - domain: http://127.0.0.1:${server.port}/resources diff --git a/ruoyi-admin/src/main/resources/static/1.jpg b/ruoyi-admin/src/main/resources/static/1.jpg deleted file mode 100644 index 0a21dea..0000000 --- a/ruoyi-admin/src/main/resources/static/1.jpg +++ /dev/null Binary files differ diff --git a/ruoyi-admin/src/main/resources/static/assets/css/iconfont.css b/ruoyi-admin/src/main/resources/static/assets/css/iconfont.css deleted file mode 100644 index f429cec..0000000 --- a/ruoyi-admin/src/main/resources/static/assets/css/iconfont.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:"iconfont";src:url('iconfont.eot?t=1538765677655');src:url('iconfont.eot?t=1538765677655#iefix') format('embedded-opentype'),url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAABD4AAsAAAAAGEwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8dkrQY21hcAAAAYAAAACyAAACYAVmbC5nbHlmAAACNAAADFkAABC4LpbxRWhlYWQAAA6QAAAAMQAAADYS3OzPaGhlYQAADsQAAAAgAAAAJAfhA4xobXR4AAAO5AAAABYAAAA4OAH//mxvY2EAAA78AAAAHgAAAB4kriBobWF4cAAADxwAAAAfAAAAIAE6AdRuYW1lAAAPPAAAAUUAAAJtPlT+fXBvc3QAABCEAAAAcQAAAJd6PSu0eJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWCcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGByeMby4x9zwv4EhhrmBoQEozAiSAwDtxwzDeJzlksENgzAMRX8I0JKC1FNPvXKibMUKLNB5qp46DxKXL7aAb9xb2aCOXqR8xXb0YwAFgCgeIgfCBwEWb6lh1yPSrud46nzDVUrJyIKJLTv2HDhyXqZ1BYhj/SCCat1/FnDCRR1rnNWx1K2ITK9sUCmlPKz0X1Hv++t7asxzR86BwZGHYObY/zE6ls3CkcNgcuzv2TpyHewcmwH2js0JBwdWe3Rshjg79p5lclBttmI/0AAAeJyFN1uMXddVZ+3ned3zuPc87sx9zb1n7jme8Xhmch/neMb2PDL2jJuXPWnsaVQb4zQOCXEIbUzdRhQ1bgLTOhWto5Bg1LilVVUFRClqi0ol5H4gxCdYhY8gBZBQUfgolBAKsu+wzhnbSvjh3v1Ye6211z57rbXXXlsRirJzk/4n+QdlWTmqfFq5pFxWXlUU6DWJZ5GoEyfYdWbJ0IIIu8ES6SMpXKIZliYNm5CXJcrTWbCgCSn0lsghGETDQTwHcTJLo45F5O1O2MjkdxrgNQkdxB3hBb20ewfIliDZlULfdOqernt1Ry2rS0+//LUv/vKSWlHvIn3HFE5v5dh0Na6XCSnXk+r0AxNRz2GWU775FrODgJlVHz6/+quP3EME0RgzO/Fs1eu0m6bZnJgsV+fijsmYyhiZf+Tjz+mWqlo6XNJNHctbpkmYF1jCgz+0qhNxu2oJtvjYkTg+8tgiE1a1HU8gyrT0ycMHZi11vBN7XtwZV63ZVv3wpG6Z4oLuqWrZ09XR/7QG6zP4kapX8nRRrnumapZ1vYydVy8LHdEq8WbWBy0QOuINQ93tBMPpqup5qqIoBKtCf0i+oJjKmKJ0OwnEg7QXQuCJdiceZJD2Ak+CoF+sWKNfsepdC65Y9Zt/VamV4BWrWyuNnrGuIs6erOdgt55zvFKqT9rIrSgS/WBE3yW3lKZyQNlQHlXOKc8qn0JPiHeNhlbO0iwNwgDHaK5+kGb3pDGNl0gSCyniLI2lBVhyh0BiGoOIkyXI51gAaN4hcuSW7qeB9AKOnCLY5cTpg1y4JzIxC0voAYJOTB8tcdMG3zYNw35+zheUUd8ueTS5dHmMiXJj7pKYBEmzX3ziZbrfYf5bn/z1W+me06MrF9+g9I2LF69Reg1aeomwlwzDsozNErdHJ59tCzBb65+Juweuho1aMN5orqu2xhxH5eRdTVLCKiXHB0KYbBwZrArDaJTB8F+7Ovqm8Oi9nWiSG7VGvNaY/l3t+JPkxV8S2tknzp0afZc9dvzYeclOPrR5EX7L1MnzNWn7tnFKNezHg5c0Mu9Fzbn0SzdI0G1RUu3W7xek5JpYFaWzs6MojJK+4ih15SHU/ovKl5RvKD9Q/l75J+VflP8GAA4alMAFHxKYgWU4Bh+GLXgWLsBnYRt+B67CG/BH8H34y9xqhVFk0C+O1WxulyQLCtOIRMg46eSHMUQMQ74OnrthivQeMg/w1EKSN1lhPS5klBspyT0hysVhCYNuEEqUgibPrdjPelkuGiWRnIVKJMe4UpJmsj+MhkX1I/92Rfb/g8x8iQ5WIPsFIgjTLNwV43t7Ien3DoHMNyHjZcjbML0zH+f60VBmCA8jPwoR72MNscsQkgXc98X7PipO+hGugGugiKxY8TYxu/0BuaS84jjqo5Ssn+D3IOGDYqJCTlZsYndDYTER+2JJhAvOfHKI1e+/b4+5Jm73y5DvV0jUam6fNCPf7w87DtW0Ya8+CMcq+uQ+b65Wao2Xq5zp1ynduyf0GZMYw8rRZIOMe9NbM5QTMug5Npc6N8bMajBGQ3cqaBwlDS5XhaRBve2Q0rKmg2Tttfbxmz/2fN6rhs1J3FY9CGZUlYDTSQeNRB+rdR85CUaFlk3DY77RaASBt88LgvrSE5yrqhZqGKCCUNNcV1QqQDnjptCYITSJ4m3COGM8QDRlPcrUw5NS8jF1nsec2MVvKs5/Xp0JoVFNCJWqnNOKRTjv1UmjAbzV4jUeSFF9qsZrwue+EL4/5/vzbc4FnyhRU/O4p2keq+gmK803qGE+yLmL5X5b2t04xE9gnBioEI4forKK4/By2ZvZOjBMDxqsLAWX0mWurhNq6KShA3EmPvwosVxveCj+gq2yzwElXtmLtgOfUUG4rjIiNCPYV1ddAyNQ2eFUJbqmEiaoNJ2ZioVBh58+tHRgf70GpNT+jY+dpagSzs0yYfsAaD1oxJwCkMgBU8QrA2/cHv2U2FJotmVww17EhmMxhAEedzgWjwiqc+lx0+RCMNyNoQum2oHKWcloErSuOk4pZawP44yFwEBT6cEAwOS2sJjoMY0jQRWccIp6ZpQLHHDbHEeN8LoqtNA3B7bdYuPjDI06phOdcM+QuJ4qkVUtlV1Dr05zPi3k7Ky0OJciajAmNNOhOqlSjdod7nm8ww/yeb6POapGddXhri4JkXp+jeV3zdv0BRrhXTOjLCibykeVi8rvYdQKgzwqLQNehZEM8PCIYZzIvEuzBahQhJJsmIS90IasoGOcikMk5aAbt3Bu2PNlWFDmQGbSz3pehAev0pFJNwu9fmCj+CC/sHDqoB8kVFbydYs/Tg8+uDIGxyxfHKY/InXXLz03c4gx+uoMq9Wotbh5Sl7oM0nnS9g8hJrXOx+TVVev+VQ/r9csSvW5r9QOU4/S2NWpbly59vXLUt+mXxUrU1XQOhuMyhrWZ6SgtEXphmDb5ARmBThVyiszh6T84WHRqVMv072pppT0cItWF6SUnivn+hJnN+uCuYsuvf8haX15e/TS6NtzfV3/+fbzLSqb32xWpyzdvw8XHz3d8gwXJg3Zkt2ubF7pzJdKuuWJv2UnZEmekTClV0vxDB7Wzo+2z2wwKeeq6NBd+LKEfh8/x6NSR2RfGN1W06XeRo3q1X6Tyd8+l9tVFDnK18lfK4YSKpEyV2QSCrSLO6VtgRckUd6G/RwDBSYsqN0P4Iskod1LB3E7yuEDkMPwPXizEceN0Ulsv3U8B/OGPFwgGgXx1oX/H38fxAsx5M1v3oVG/3EXhPch48X4bilysJ136HdooCTKuqJkTciToNk8acU8J+wFoS8R7Ah/NyvGKxfz5yEfLKMjhjlLihxxFAs/TA+AjDpJ0IBXahvd+izA2txwg5ALH5k71d0XHopaERyaW1kH8snTi2f3kg6QdThM4Mx9yysT9Xq1DvVohsx06uTl6iTUWu1m2T+8cuIYXozWVtmDsWqz7gRH7t16GCbapQerr78HH4dzv7AJMO4+asPEzCM4PvPaHyt3c8sb5F8VVfEVpdLGnfDuEkgXN4HmyVwuksvknWQIo9kRPgJSGCa7wwXDIO/041u34t4PRitxH6Afw/V/F7uugPr6L3qN9pQTmEu+iJLTTMg+Sg9klAOYfgQhQlneY06I117+F7cPY55NYOKRJxy7aQcqLUuTTnSHAYnLkPJB2m9jSul6UuyFDmanSEoizGgqnu+F/TBnOgBBmrgDpP9No+s7O1InklwB+apkklD4E1aeumdOFTpoFWe+rxvensqYZrQ65UpJr40Nu7UW/3OqUkPl8iojsHdGSK6FXcelbGIsVOFFwWFNqBjixaekNPdNc+kPuFgXgSXFhyhb4gLkdZWOhWT/oiHGx598khslzzu40Blmmh5U2y3PXzpomg+stcZVXsK7AbOM/vLsuWHF1fB+OZvtd12M8joHVR750Gr1PpZfKLeuqRSoqDY4XQeM6+2f/pskKWGzBASDt9U7drhCX6eninP5MJ7Iwjll4bYZAvkLDtCRK4UvY9jMNZgndthExTMuToLdp17u8YXPL+1mhy0ahHFCFoZHAY4OU/TgjXTzPCHnNzefJuTpEQWmT3jJaam5/tRTq+1Je8VSjUo4Nr9abjuTPvOthU8sfuK55Z8v3/MHydSjHdvZa7utLt5NdTia3hZ7dBUFHs/FHt88f/Mf91Q7Z149/uZ1227U0q0Jx8QIPt5bXHjumc98+uDFA6ZDgLHAcjnt2uX9DXP+0tT0sQf3Tue62NnZ+WcGtKpw1IaNPik1TKep5N0Eg2mYrawSQpTV0cp7GItguPYzePKpx+E7w9FT8Npw9FVCh+++17sOL20+vJnrFgoFb5G/w2in5BFN5oc/93Ef4TYqykU1tfPXD8I5/c6hwjHdP/r9kgvgln6cd4Nk9PZuD2/uokcnz75AsYcfbf0awcz/LxB+AEluyU4GOQO0sd/F0RfOjk5ijyHk2/mLovi2ndfpz+gTyhoOhCKLh9kwEUWCj+l9Ps4z/tyeg9yq2QBT2R46gwwEcvu7voGPtZwpxkBxY/QTTv/stbIDH93gvOHaVqOxR06eqFLXOLnNalWuVe7dOPjZgxtrUFFFtca2t6wKgFO++qeEj35Cz2Fz41s3h8TRT1vz1dKcoYaETJbSUrWtiXOX96zV9CMDqs667qxKB0f08bWplx8Xxmz0ed2h6egbNwCfv8r/AgxxVFsAAAB4nGNgZGBgAOIdr4pmxvPbfGXgZmEAget3r+TC6P///09iYWZOA3I5GJhAogCNrQ5RAAAAeJxjYGRgYG7438AQw8Lw////vyzMDEARFMAHAKDJBnR4nGNhYGBgQcH//7NgiGHKAQBkagQ1AAAAAAAAANQBBAHEBDoFJgWWBgIGLgbyB3gHoAfuCFwAAHicY2BkYGDgYzzBoMQAAkxAzAWEDAz/wXwGACB0AhAAeJxlj01OwzAQhV/6B6QSqqhgh+QFYgEo/RGrblhUavdddN+mTpsqiSPHrdQDcB6OwAk4AtyAO/BIJ5s2lsffvHljTwDc4Acejt8t95E9XDI7cg0XuBeuU38QbpBfhJto41W4Rf1N2MczpsJtdGF5g9e4YvaEd2EPHXwI13CNT+E69S/hBvlbuIk7/Aq30PHqwj7mXle4jUcv9sdWL5xeqeVBxaHJIpM5v4KZXu+Sha3S6pxrW8QmU4OgX0lTnWlb3VPs10PnIhVZk6oJqzpJjMqt2erQBRvn8lGvF4kehCblWGP+tsYCjnEFhSUOjDFCGGSIyujoO1Vm9K+xQ8Jee1Y9zed0WxTU/3OFAQL0z1xTurLSeTpPgT1fG1J1dCtuy56UNJFezUkSskJe1rZUQuoBNmVXjhF6XNGJPyhnSP8ACVpuyAAAAHicbcHLDsIgEAVQbuWhVdtvBIowhA4mdGL061249Rw1qZ9Z/bdgwgkaBhYOZ1ww44ob7liwKhv7Rpyd59ySPM0rUeg6jo1dJc+jiG40Dkux83iYtHtq5lOoiIscWs/DVkmV2Oz+LWwzHUWCUl+qjh+BAAAA') format('woff'),url('iconfont.ttf?t=1538765677655') format('truetype'),url('iconfont.svg?t=1538765677655#iconfont') format('svg')}.iconfont{font-family:"iconfont"!important;font-size:21px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-coding:before{content:"\e62b"}.icon-angleup:before{content:"\e664"}.icon-weibo:before{content:"\e62d"}.icon-csdn:before{content:"\e60a"}.icon-jianshu:before{content:"\e675"}.icon-list:before{content:"\e625"}.icon-iconsf:before{content:"\e600"}.icon-email:before{content:"\e605"}.icon-zhihu:before{content:"\e8de"}.icon-cnblogs:before{content:"\e602"}.icon-juejin:before{content:"\e601"}.icon-mayun:before{content:"\e603"}.icon-github:before{content:"\e6e1"} \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/static/assets/css/onlinewebfonts.css b/ruoyi-admin/src/main/resources/static/assets/css/onlinewebfonts.css deleted file mode 100644 index 8e97c00..0000000 --- a/ruoyi-admin/src/main/resources/static/assets/css/onlinewebfonts.css +++ /dev/null @@ -1,8 +0,0 @@ -@font-face {font-family: "Engravers' Old English BT"; - src: url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.eot"); /* IE9*/ - src: url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */ - url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.woff2") format("woff2"), /* chrome firefox */ - url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.woff") format("woff"), /* chrome firefox */ - url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.ttf") format("truetype"), /* chrome firefox opera Safari, Android, iOS 4.2+*/ - url("https://unpkg.com/dmego-home-page@latest/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.svg#Engravers' Old English BT") format("svg"); /* iOS 4.1- */ -} \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/static/assets/css/vno.css b/ruoyi-admin/src/main/resources/static/assets/css/vno.css deleted file mode 100644 index b99730c..0000000 --- a/ruoyi-admin/src/main/resources/static/assets/css/vno.css +++ /dev/null @@ -1,25 +0,0 @@ -html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}.ih-item.circle.effect{margin:0 auto;-webkit-perspective:900px;-moz-perspective:900px;perspective:900px}.ih-item.circle.effect .img{z-index:11;-webkit-transition:all .5s ease-in-out;-moz-transition:all .5s ease-in-out;transition:all .5s ease-in-out}.ih-item.circle.effect .info{-webkit-transform-style:preserve-3d;-moz-transform-style:preserve-3d;-ms-transform-style:preserve-3d;-o-transform-style:preserve-3d;transform-style:preserve-3d}.ih-item.circle.effect .info .info-back{opacity:1;border-radius:50%;width:100%;height:100%;background:#333}.ih-item.circle.effect .info h2{color:#fff;position:relative;font-size:18px;margin:0 auto;padding-top:40px;height:35px;text-shadow:0 0 1px white,0 1px 2px rgba(0,0,0,0.3)}.ih-item.circle.effect .info p{color:#bbb;padding:0;font-style:italic;padding-left:0;font-size:10px}.ih-item.circle.effect.bottom_to_top .img{-webkit-transform-origin:50% 0;-moz-transform-origin:50% 0;-ms-transform-origin:50% 0;-o-transform-origin:50% 0;transform-origin:50% 0}.ih-item.circle.effect.bottom_to_top a:hover .img{-webkit-transform:rotate3d(1,0,0,180deg);-moz-transform:rotate3d(1,0,0,180deg);-ms-transform:rotate3d(1,0,0,180deg);-o-transform:rotate3d(1,0,0,180deg);transform:rotate3d(1,0,0,180deg)}.ih-item.circle.effect.top_to_bottom .img{-webkit-transform-origin:50% 100%;-moz-transform-origin:50% 100%;-ms-transform-origin:50% 100%;-o-transform-origin:50% 100%;transform-origin:50% 100%}.ih-item.circle.effect.top_to_bottom a:hover .img{-webkit-transform:rotate3d(1,0,0,-180deg);-moz-transform:rotate3d(1,0,0,-180deg);-ms-transform:rotate3d(1,0,0,-180deg);-o-transform:rotate3d(1,0,0,-180deg);transform:rotate3d(1,0,0,-180deg)}.ih-item.circle.effect.left_to_right .img{-webkit-transform-origin:100% 50%;-moz-transform-origin:100% 50%;-ms-transform-origin:100% 50%;-o-transform-origin:100% 50%;transform-origin:100% 50%}.ih-item.circle.effect.left_to_right a:hover .img{-webkit-transform:rotate3d(0,1,0,180deg);-moz-transform:rotate3d(0,1,0,180deg);-ms-transform:rotate3d(0,1,0,180deg);-o-transform:rotate3d(0,1,0,180deg);transform:rotate3d(0,1,0,180deg)}.ih-item.circle.effect.right_to_left .img{-webkit-transform-origin:0 50%;-moz-transform-origin:0 50%;-ms-transform-origin:0 50%;-o-transform-origin:0 50%;transform-origin:0 50%}.ih-item.circle.effect.right_to_left a:hover .img{-webkit-transform:rotate3d(0,1,0,-180deg);-moz-transform:rotate3d(0,1,0,-180deg);-ms-transform:rotate3d(0,1,0,-180deg);-o-transform:rotate3d(0,1,0,-180deg);transform:rotate3d(0,1,0,-180deg)}.ih-item a{color:#333}.ih-item a:hover{text-decoration:none}.ih-item img{width:100%;height:100%}.ih-item.circle{position:relative;width:120px;height:120px;border-radius:50%}.ih-item.circle .img{position:relative;width:120px;height:120px;border-radius:50%}.ih-item.circle .img:before{position:absolute;display:block;content:"";width:100%;height:100%;border-radius:50%;-webkit-transition:all .35s ease-in-out;-moz-transition:all .35s ease-in-out;transition:all .35s ease-in-out}.ih-item.circle .img img{border-radius:50%}.ih-item.circle .info{position:absolute;top:0;bottom:0;left:0;right:0;text-align:center;border-radius:50%;-webkit-backface-visibility:hidden;backface-visibility:hidden}@media all and (max-width:780px){.ih-item.circle .img{position:relative;width:100px;height:100px;border-radius:50%}.ih-item.circle{position:relative;width:100px;height:100px;border-radius:50%}.ih-item.circle .info .info-back h2{font-size:.9em}}.profilepic{text-align:center;display:block;-webkit-box-shadow:0 0 0 2px rgba(255,255,255,0.5),0px 2px 20px 3px rgba(0,0,0,0.25);box-shadow:0 0 0 2px rgba(255,255,255,0.5),0px 2px 20px 3px rgba(0,0,0,0.25);border-radius:300px;width:128px;height:128px;margin:0 auto;position:relative;overflow:hidden;background:#88acdb;-webkit-transition:all .2s ease-in;display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-pack:center;-webkit-box-align:center;text-align:center}.animated{-webkit-animation-fill-mode:both;-moz-animation-fill-mode:both;-ms-animation-fill-mode:both;-o-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:1s;-moz-animation-duration:1s;-ms-animation-duration:1s;-o-animation-duration:1s;animation-duration:1s}.animated.hinge{-webkit-animation-duration:1s;-moz-animation-duration:1s;-ms-animation-duration:1s;-o-animation-duration:1s;animation-duration:1s}@-webkit-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@-moz-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@-o-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;-moz-animation-name:flash;-o-animation-name:flash;animation-name:flash}@-webkit-keyframes shake{0%,100%{-webkit-transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px)}}@-moz-keyframes shake{0%,100%{-moz-transform:translateX(0)}10%,30%,50%,70%,90%{-moz-transform:translateX(-10px)} -20%,40%,60%,80%{-moz-transform:translateX(10px)}}@-o-keyframes shake{0%,100%{-o-transform:translateX(0)}10%,30%,50%,70%,90%{-o-transform:translateX(-10px)}20%,40%,60%,80%{-o-transform:translateX(10px)}}.shake{-webkit-animation-name:shake;-moz-animation-name:shake;-o-animation-name:shake;animation-name:shake}@-webkit-keyframes bounce{0%,20%,50%,80%,100%{-webkit-transform:translateY(0)}40%{-webkit-transform:translateY(-30px)}60%{-webkit-transform:translateY(-15px)}}@-moz-keyframes bounce{0%,20%,50%,80%,100%{-moz-transform:translateY(0)}40%{-moz-transform:translateY(-30px)}60%{-moz-transform:translateY(-15px)}}@-o-keyframes bounce{0%,20%,50%,80%,100%{-o-transform:translateY(0)}40%{-o-transform:translateY(-30px)}60%{-o-transform:translateY(-15px)}}.bounce{-webkit-animation-name:bounce;-moz-animation-name:bounce;-o-animation-name:bounce;animation-name:bounce}@-webkit-keyframes tada{0%{-webkit-transform:scale(1)}10%,20%{-webkit-transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{-webkit-transform:scale(1.1) rotate(3deg)}40%,60%,80%{-webkit-transform:scale(1.1) rotate(-3deg)}100%{-webkit-transform:scale(1) rotate(0)}}@-moz-keyframes tada{0%{-moz-transform:scale(1)}10%,20%{-moz-transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{-moz-transform:scale(1.1) rotate(3deg)}40%,60%,80%{-moz-transform:scale(1.1) rotate(-3deg)}100%{-moz-transform:scale(1) rotate(0)}}@-o-keyframes tada{0%{-o-transform:scale(1)}10%,20%{-o-transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{-o-transform:scale(1.1) rotate(3deg)}40%,60%,80%{-o-transform:scale(1.1) rotate(-3deg)}100%{-o-transform:scale(1) rotate(0)}}.tada{-webkit-animation-name:tada;-moz-animation-name:tada;-o-animation-name:tada;animation-name:tada}@-webkit-keyframes swing{20%,40%,60%,80%,100%{-webkit-transform-origin:top center}20%{-webkit-transform:rotate(15deg)}40%{-webkit-transform:rotate(-10deg)}60%{-webkit-transform:rotate(5deg)}80%{-webkit-transform:rotate(-5deg)}100%{-webkit-transform:rotate(0deg)}}@-moz-keyframes swing{20%{-moz-transform:rotate(15deg)}40%{-moz-transform:rotate(-10deg)}60%{-moz-transform:rotate(5deg)}80%{-moz-transform:rotate(-5deg)}100%{-moz-transform:rotate(0deg)}}@-o-keyframes swing{20%{-o-transform:rotate(15deg)}40%{-o-transform:rotate(-10deg)}60%{-o-transform:rotate(5deg)}80%{-o-transform:rotate(-5deg)}100%{-o-transform:rotate(0deg)}}.swing{-webkit-transform-origin:top center;-moz-transform-origin:top center;-o-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;-moz-animation-name:swing;-o-animation-name:swing;animation-name:swing}@-webkit-keyframes wobble{0%{-webkit-transform:translateX(0%)}15%{-webkit-transform:translateX(-25%) rotate(-5deg)}30%{-webkit-transform:translateX(20%) rotate(3deg)}45%{-webkit-transform:translateX(-15%) rotate(-3deg)}60%{-webkit-transform:translateX(10%) rotate(2deg)}75%{-webkit-transform:translateX(-5%) rotate(-1deg)}100%{-webkit-transform:translateX(0%)}}@-moz-keyframes wobble{0%{-moz-transform:translateX(0%)}15%{-moz-transform:translateX(-25%) rotate(-5deg)}30%{-moz-transform:translateX(20%) rotate(3deg)}45%{-moz-transform:translateX(-15%) rotate(-3deg)}60%{-moz-transform:translateX(10%) rotate(2deg)}75%{-moz-transform:translateX(-5%) rotate(-1deg)}100%{-moz-transform:translateX(0%)}}@-o-keyframes wobble{0%{-o-transform:translateX(0%)}15%{-o-transform:translateX(-25%) rotate(-5deg)}30%{-o-transform:translateX(20%) rotate(3deg)}45%{-o-transform:translateX(-15%) rotate(-3deg)}60%{-o-transform:translateX(10%) rotate(2deg)}75%{-o-transform:translateX(-5%) rotate(-1deg)}100%{-o-transform:translateX(0%)}}.wobble{-webkit-animation-name:wobble;-moz-animation-name:wobble;-o-animation-name:wobble;animation-name:wobble}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1)}50%{-webkit-transform:scale(1.1)}100%{-webkit-transform:scale(1)}}@-moz-keyframes pulse{0%{-moz-transform:scale(1)}50%{-moz-transform:scale(1.1)}100%{-moz-transform:scale(1)}}@-o-keyframes pulse{0%{-o-transform:scale(1)}50%{-o-transform:scale(1.1)}100%{-o-transform:scale(1)}}.pulse{-webkit-animation-name:pulse;-moz-animation-name:pulse;-o-animation-name:pulse;animation-name:pulse}@-webkit-keyframes flip{0%{-webkit-transform:perspective(400px) translateZ(0) rotateY(0) scale(1);-webkit-animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(170deg) scale(1);-webkit-animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-webkit-animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) translateZ(0) rotateY(360deg) scale(0.95);-webkit-animation-timing-function:ease-in}100%{-webkit-transform:perspective(400px) translateZ(0) rotateY(360deg) scale(1);-webkit-animation-timing-function:ease-in}}@-moz-keyframes flip{0%{-moz-transform:perspective(400px) translateZ(0) rotateY(0) scale(1);-moz-animation-timing-function:ease-out}40%{-moz-transform:perspective(400px) translateZ(150px) rotateY(170deg) scale(1);-moz-animation-timing-function:ease-out} -50%{-moz-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-moz-animation-timing-function:ease-in}80%{-moz-transform:perspective(400px) translateZ(0) rotateY(360deg) scale(0.95);-moz-animation-timing-function:ease-in}100%{-moz-transform:perspective(400px) translateZ(0) rotateY(360deg) scale(1);-moz-animation-timing-function:ease-in}}@-o-keyframes flip{0%{-o-transform:perspective(400px) translateZ(0) rotateY(0) scale(1);-o-animation-timing-function:ease-out}40%{-o-transform:perspective(400px) translateZ(150px) rotateY(170deg) scale(1);-o-animation-timing-function:ease-out}50%{-o-transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);-o-animation-timing-function:ease-in}80%{-o-transform:perspective(400px) translateZ(0) rotateY(360deg) scale(0.95);-o-animation-timing-function:ease-in}100%{-o-transform:perspective(400px) translateZ(0) rotateY(360deg) scale(1);-o-animation-timing-function:ease-in}}.animated.flip{-webkit-backface-visibility:visible!important;-webkit-animation-name:flip;-moz-backface-visibility:visible!important;-moz-animation-name:flip;-o-backface-visibility:visible!important;-o-animation-name:flip;backface-visibility:visible!important;animation-name:flip}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotateX(-10deg)}70%{-webkit-transform:perspective(400px) rotateX(10deg)}100%{-webkit-transform:perspective(400px) rotateX(0deg);opacity:1}}@-moz-keyframes flipInX{0%{-moz-transform:perspective(400px) rotateX(90deg);opacity:0}40%{-moz-transform:perspective(400px) rotateX(-10deg)}70%{-moz-transform:perspective(400px) rotateX(10deg)}100%{-moz-transform:perspective(400px) rotateX(0deg);opacity:1}}@-o-keyframes flipInX{0%{-o-transform:perspective(400px) rotateX(90deg);opacity:0}40%{-o-transform:perspective(400px) rotateX(-10deg)}70%{-o-transform:perspective(400px) rotateX(10deg)}100%{-o-transform:perspective(400px) rotateX(0deg);opacity:1}}.flipInX{-webkit-backface-visibility:visible!important;-webkit-animation-name:flipInX;-moz-backface-visibility:visible!important;-moz-animation-name:flipInX;-o-backface-visibility:visible!important;-o-animation-name:flipInX;backface-visibility:visible!important;animation-name:flipInX}@-webkit-keyframes flipOutX{0%{-webkit-transform:perspective(400px) rotateX(0deg);opacity:1}100%{-webkit-transform:perspective(400px) rotateX(90deg);opacity:0}}@-moz-keyframes flipOutX{0%{-moz-transform:perspective(400px) rotateX(0deg);opacity:1}100%{-moz-transform:perspective(400px) rotateX(90deg);opacity:0}}@-o-keyframes flipOutX{0%{-o-transform:perspective(400px) rotateX(0deg);opacity:1}100%{-o-transform:perspective(400px) rotateX(90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;-webkit-backface-visibility:visible!important;-moz-animation-name:flipOutX;-moz-backface-visibility:visible!important;-o-animation-name:flipOutX;-o-backface-visibility:visible!important;animation-name:flipOutX;backface-visibility:visible!important}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);opacity:0}40%{-webkit-transform:perspective(400px) rotateY(-10deg)}70%{-webkit-transform:perspective(400px) rotateY(10deg)}100%{-webkit-transform:perspective(400px) rotateY(0deg);opacity:1}}@-moz-keyframes flipInY{0%{-moz-transform:perspective(400px) rotateY(90deg);opacity:0}40%{-moz-transform:perspective(400px) rotateY(-10deg)}70%{-moz-transform:perspective(400px) rotateY(10deg)}100%{-moz-transform:perspective(400px) rotateY(0deg);opacity:1}}@-o-keyframes flipInY{0%{-o-transform:perspective(400px) rotateY(90deg);opacity:0}40%{-o-transform:perspective(400px) rotateY(-10deg)}70%{-o-transform:perspective(400px) rotateY(10deg)}100%{-o-transform:perspective(400px) rotateY(0deg);opacity:1}}.flipInY{-webkit-backface-visibility:visible!important;-webkit-animation-name:flipInY;-moz-backface-visibility:visible!important;-moz-animation-name:flipInY;-o-backface-visibility:visible!important;-o-animation-name:flipInY;backface-visibility:visible!important;animation-name:flipInY}@-webkit-keyframes flipOutY{0%{-webkit-transform:perspective(400px) rotateY(0deg);opacity:1}100%{-webkit-transform:perspective(400px) rotateY(90deg);opacity:0}}@-moz-keyframes flipOutY{0%{-moz-transform:perspective(400px) rotateY(0deg);opacity:1}100%{-moz-transform:perspective(400px) rotateY(90deg);opacity:0}}@-o-keyframes flipOutY{0%{-o-transform:perspective(400px) rotateY(0deg);opacity:1}100%{-o-transform:perspective(400px) rotateY(90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;-webkit-animation-name:flipOutY;-moz-backface-visibility:visible!important;-moz-animation-name:flipOutY;-o-backface-visibility:visible!important;-o-animation-name:flipOutY;backface-visibility:visible!important;animation-name:flipOutY}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-moz-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;-moz-animation-name:fadeIn;-o-animation-name:fadeIn;animation-name:fadeIn} -@-webkit-keyframes fadeInUp{0%{opacity:0;-webkit-transform:translateY(20px)}100%{opacity:1;-webkit-transform:translateY(0)}}@-moz-keyframes fadeInUp{0%{opacity:0;-moz-transform:translateY(20px)}100%{opacity:1;-moz-transform:translateY(0)}}@-o-keyframes fadeInUp{0%{opacity:0;-o-transform:translateY(20px)}100%{opacity:1;-o-transform:translateY(0)}}.fadeInUp{-webkit-animation-name:fadeInUp;-moz-animation-name:fadeInUp;-o-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInDown{0%{opacity:0;-webkit-transform:translateY(-20px)}100%{opacity:1;-webkit-transform:translateY(0)}}@-moz-keyframes fadeInDown{0%{opacity:0;-moz-transform:translateY(-20px)}100%{opacity:1;-moz-transform:translateY(0)}}@-o-keyframes fadeInDown{0%{opacity:0;-o-transform:translateY(-20px)}100%{opacity:1;-o-transform:translateY(0)}}.fadeInDown{-webkit-animation-name:fadeInDown;-moz-animation-name:fadeInDown;-o-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInLeft{0%{opacity:0;-webkit-transform:translateX(-20px)}100%{opacity:1;-webkit-transform:translateX(0)}}@-moz-keyframes fadeInLeft{0%{opacity:0;-moz-transform:translateX(-20px)}100%{opacity:1;-moz-transform:translateX(0)}}@-o-keyframes fadeInLeft{0%{opacity:0;-o-transform:translateX(-20px)}100%{opacity:1;-o-transform:translateX(0)}}.fadeInLeft{-webkit-animation-name:fadeInLeft;-moz-animation-name:fadeInLeft;-o-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInRight{0%{opacity:0;-webkit-transform:translateX(20px)}100%{opacity:1;-webkit-transform:translateX(0)}}@-moz-keyframes fadeInRight{0%{opacity:0;-moz-transform:translateX(20px)}100%{opacity:1;-moz-transform:translateX(0)}}@-o-keyframes fadeInRight{0%{opacity:0;-o-transform:translateX(20px)}100%{opacity:1;-o-transform:translateX(0)}}.fadeInRight{-webkit-animation-name:fadeInRight;-moz-animation-name:fadeInRight;-o-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0)}}@-moz-keyframes fadeInUpBig{0%{opacity:0;-moz-transform:translateY(2000px)}100%{opacity:1;-moz-transform:translateY(0)}}@-o-keyframes fadeInUpBig{0%{opacity:0;-o-transform:translateY(2000px)}100%{opacity:1;-o-transform:translateY(0)}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;-moz-animation-name:fadeInUpBig;-o-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeInDownBig{0%{opacity:0;-webkit-transform:translateY(-2000px)}100%{opacity:1;-webkit-transform:translateY(0)}}@-moz-keyframes fadeInDownBig{0%{opacity:0;-moz-transform:translateY(-2000px)}100%{opacity:1;-moz-transform:translateY(0)}}@-o-keyframes fadeInDownBig{0%{opacity:0;-o-transform:translateY(-2000px)}100%{opacity:1;-o-transform:translateY(0)}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;-moz-animation-name:fadeInDownBig;-o-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;-webkit-transform:translateX(-2000px)}100%{opacity:1;-webkit-transform:translateX(0)}}@-moz-keyframes fadeInLeftBig{0%{opacity:0;-moz-transform:translateX(-2000px)}100%{opacity:1;-moz-transform:translateX(0)}}@-o-keyframes fadeInLeftBig{0%{opacity:0;-o-transform:translateX(-2000px)}100%{opacity:1;-o-transform:translateX(0)}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;-moz-animation-name:fadeInLeftBig;-o-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRightBig{0%{opacity:0;-webkit-transform:translateX(2000px)}100%{opacity:1;-webkit-transform:translateX(0)}}@-moz-keyframes fadeInRightBig{0%{opacity:0;-moz-transform:translateX(2000px)}100%{opacity:1;-moz-transform:translateX(0)}}@-o-keyframes fadeInRightBig{0%{opacity:0;-o-transform:translateX(2000px)}100%{opacity:1;-o-transform:translateX(0)}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;-moz-animation-name:fadeInRightBig;-o-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-moz-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-o-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;-moz-animation-name:fadeOut;-o-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutUp{0%{opacity:1;-webkit-transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-20px)}}@-moz-keyframes fadeOutUp{0%{opacity:1;-moz-transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(-20px)}}@-o-keyframes fadeOutUp{0%{opacity:1;-o-transform:translateY(0)}100%{opacity:0;-o-transform:translateY(-20px)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;-moz-animation-name:fadeOutUp;-o-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutDown{0%{opacity:1;-webkit-transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(20px)}}@-moz-keyframes fadeOutDown{0%{opacity:1;-moz-transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(20px)} -}@-o-keyframes fadeOutDown{0%{opacity:1;-o-transform:translateY(0)}100%{opacity:0;-o-transform:translateY(20px)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;-moz-animation-name:fadeOutDown;-o-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutLeft{0%{opacity:1;-webkit-transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-20px)}}@-moz-keyframes fadeOutLeft{0%{opacity:1;-moz-transform:translateX(0)}100%{opacity:0;-moz-transform:translateX(-20px)}}@-o-keyframes fadeOutLeft{0%{opacity:1;-o-transform:translateX(0)}100%{opacity:0;-o-transform:translateX(-20px)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;-moz-animation-name:fadeOutLeft;-o-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutRight{0%{opacity:1;-webkit-transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(20px)}}@-moz-keyframes fadeOutRight{0%{opacity:1;-moz-transform:translateX(0)}100%{opacity:0;-moz-transform:translateX(20px)}}@-o-keyframes fadeOutRight{0%{opacity:1;-o-transform:translateX(0)}100%{opacity:0;-o-transform:translateX(20px)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;-moz-animation-name:fadeOutRight;-o-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutUpBig{0%{opacity:1;-webkit-transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-2000px)}}@-moz-keyframes fadeOutUpBig{0%{opacity:1;-moz-transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(-2000px)}}@-o-keyframes fadeOutUpBig{0%{opacity:1;-o-transform:translateY(0)}100%{opacity:0;-o-transform:translateY(-2000px)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;-moz-animation-name:fadeOutUpBig;-o-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes fadeOutDownBig{0%{opacity:1;-webkit-transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(2000px)}}@-moz-keyframes fadeOutDownBig{0%{opacity:1;-moz-transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(2000px)}}@-o-keyframes fadeOutDownBig{0%{opacity:1;-o-transform:translateY(0)}100%{opacity:0;-o-transform:translateY(2000px)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;-moz-animation-name:fadeOutDownBig;-o-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1;-webkit-transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-2000px)}}@-moz-keyframes fadeOutLeftBig{0%{opacity:1;-moz-transform:translateX(0)}100%{opacity:0;-moz-transform:translateX(-2000px)}}@-o-keyframes fadeOutLeftBig{0%{opacity:1;-o-transform:translateX(0)}100%{opacity:0;-o-transform:translateX(-2000px)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;-moz-animation-name:fadeOutLeftBig;-o-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRightBig{0%{opacity:1;-webkit-transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(2000px)}}@-moz-keyframes fadeOutRightBig{0%{opacity:1;-moz-transform:translateX(0)}100%{opacity:0;-moz-transform:translateX(2000px)}}@-o-keyframes fadeOutRightBig{0%{opacity:1;-o-transform:translateX(0)}100%{opacity:0;-o-transform:translateX(2000px)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;-moz-animation-name:fadeOutRightBig;-o-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes slideInDown{0%{opacity:0;-webkit-transform:translateY(-2000px)}100%{-webkit-transform:translateY(0)}}@-moz-keyframes slideInDown{0%{opacity:0;-moz-transform:translateY(-2000px)}100%{-moz-transform:translateY(0)}}@-o-keyframes slideInDown{0%{opacity:0;-o-transform:translateY(-2000px)}100%{-o-transform:translateY(0)}}.slideInDown{-webkit-animation-name:slideInDown;-moz-animation-name:slideInDown;-o-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{0%{opacity:0;-webkit-transform:translateX(-2000px)}100%{-webkit-transform:translateX(0)}}@-moz-keyframes slideInLeft{0%{opacity:0;-moz-transform:translateX(-2000px)}100%{-moz-transform:translateX(0)}}@-o-keyframes slideInLeft{0%{opacity:0;-o-transform:translateX(-2000px)}100%{-o-transform:translateX(0)}}.slideInLeft{-webkit-animation-name:slideInLeft;-moz-animation-name:slideInLeft;-o-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{0%{opacity:0;-webkit-transform:translateX(2000px)}100%{-webkit-transform:translateX(0)}}@-moz-keyframes slideInRight{0%{opacity:0;-moz-transform:translateX(2000px)}100%{-moz-transform:translateX(0)}}@-o-keyframes slideInRight{0%{opacity:0;-o-transform:translateX(2000px)}100%{-o-transform:translateX(0)}}.slideInRight{-webkit-animation-name:slideInRight;-moz-animation-name:slideInRight;-o-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideOutUp{0%{-webkit-transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-2000px)}}@-moz-keyframes slideOutUp{0%{-moz-transform:translateY(0)}100%{opacity:0;-moz-transform:translateY(-2000px)}}@-o-keyframes slideOutUp{0%{-o-transform:translateY(0)} -100%{opacity:0;-o-transform:translateY(-2000px)}}.slideOutUp{-webkit-animation-name:slideOutUp;-moz-animation-name:slideOutUp;-o-animation-name:slideOutUp;animation-name:slideOutUp}@-webkit-keyframes slideOutLeft{0%{-webkit-transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(-2000px)}}@-moz-keyframes slideOutLeft{0%{-moz-transform:translateX(0)}100%{opacity:0;-moz-transform:translateX(-2000px)}}@-o-keyframes slideOutLeft{0%{-o-transform:translateX(0)}100%{opacity:0;-o-transform:translateX(-2000px)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;-moz-animation-name:slideOutLeft;-o-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{0%{-webkit-transform:translateX(0)}100%{opacity:0;-webkit-transform:translateX(2000px)}}@-moz-keyframes slideOutRight{0%{-moz-transform:translateX(0)}100%{opacity:0;-moz-transform:translateX(2000px)}}@-o-keyframes slideOutRight{0%{-o-transform:translateX(0)}100%{opacity:0;-o-transform:translateX(2000px)}}.slideOutRight{-webkit-animation-name:slideOutRight;-moz-animation-name:slideOutRight;-o-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes bounceIn{0%{opacity:0;-webkit-transform:scale(0.3)}50%{opacity:1;-webkit-transform:scale(1.05)}70%{-webkit-transform:scale(0.9)}100%{-webkit-transform:scale(1)}}@-moz-keyframes bounceIn{0%{opacity:0;-moz-transform:scale(0.3)}50%{opacity:1;-moz-transform:scale(1.05)}70%{-moz-transform:scale(0.9)}100%{-moz-transform:scale(1)}}@-o-keyframes bounceIn{0%{opacity:0;-o-transform:scale(0.3)}50%{opacity:1;-o-transform:scale(1.05)}70%{-o-transform:scale(0.9)}100%{-o-transform:scale(1)}}.bounceIn{-webkit-animation-name:bounceIn;-moz-animation-name:bounceIn;-o-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInUp{0%{opacity:0;-webkit-transform:translateY(2000px)}60%{opacity:1;-webkit-transform:translateY(-30px)}80%{-webkit-transform:translateY(10px)}100%{-webkit-transform:translateY(0)}}@-moz-keyframes bounceInUp{0%{opacity:0;-moz-transform:translateY(2000px)}60%{opacity:1;-moz-transform:translateY(-30px)}80%{-moz-transform:translateY(10px)}100%{-moz-transform:translateY(0)}}@-o-keyframes bounceInUp{0%{opacity:0;-o-transform:translateY(2000px)}60%{opacity:1;-o-transform:translateY(-30px)}80%{-o-transform:translateY(10px)}100%{-o-transform:translateY(0)}}.bounceInUp{-webkit-animation-name:bounceInUp;-moz-animation-name:bounceInUp;-o-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceInDown{0%{opacity:0;-webkit-transform:translateY(-2000px)}60%{opacity:1;-webkit-transform:translateY(30px)}80%{-webkit-transform:translateY(-10px)}100%{-webkit-transform:translateY(0)}}@-moz-keyframes bounceInDown{0%{opacity:0;-moz-transform:translateY(-2000px)}60%{opacity:1;-moz-transform:translateY(30px)}80%{-moz-transform:translateY(-10px)}100%{-moz-transform:translateY(0)}}@-o-keyframes bounceInDown{0%{opacity:0;-o-transform:translateY(-2000px)}60%{opacity:1;-o-transform:translateY(30px)}80%{-o-transform:translateY(-10px)}100%{-o-transform:translateY(0)}}.bounceInDown{-webkit-animation-name:bounceInDown;-moz-animation-name:bounceInDown;-o-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{0%{opacity:0;-webkit-transform:translateX(-2000px)}60%{opacity:1;-webkit-transform:translateX(30px)}80%{-webkit-transform:translateX(-10px)}100%{-webkit-transform:translateX(0)}}@-moz-keyframes bounceInLeft{0%{opacity:0;-moz-transform:translateX(-2000px)}60%{opacity:1;-moz-transform:translateX(30px)}80%{-moz-transform:translateX(-10px)}100%{-moz-transform:translateX(0)}}@-o-keyframes bounceInLeft{0%{opacity:0;-o-transform:translateX(-2000px)}60%{opacity:1;-o-transform:translateX(30px)}80%{-o-transform:translateX(-10px)}100%{-o-transform:translateX(0)}}.bounceInLeft{-webkit-animation-name:bounceInLeft;-moz-animation-name:bounceInLeft;-o-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{0%{opacity:0;-webkit-transform:translateX(2000px)}60%{opacity:1;-webkit-transform:translateX(-30px)}80%{-webkit-transform:translateX(10px)}100%{-webkit-transform:translateX(0)}}@-moz-keyframes bounceInRight{0%{opacity:0;-moz-transform:translateX(2000px)}60%{opacity:1;-moz-transform:translateX(-30px)}80%{-moz-transform:translateX(10px)}100%{-moz-transform:translateX(0)}}@-o-keyframes bounceInRight{0%{opacity:0;-o-transform:translateX(2000px)}60%{opacity:1;-o-transform:translateX(-30px)}80%{-o-transform:translateX(10px)}100%{-o-transform:translateX(0)}}.bounceInRight{-webkit-animation-name:bounceInRight;-moz-animation-name:bounceInRight;-o-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceOut{0%{-webkit-transform:scale(1)}25%{-webkit-transform:scale(0.95)}50%{opacity:1;-webkit-transform:scale(1.1)}100%{opacity:0;-webkit-transform:scale(0.3)}}@-moz-keyframes bounceOut{0%{-moz-transform:scale(1)}25%{-moz-transform:scale(0.95)}50%{opacity:1;-moz-transform:scale(1.1)}100%{opacity:0;-moz-transform:scale(0.3)} -}@-o-keyframes bounceOut{0%{-o-transform:scale(1)}25%{-o-transform:scale(0.95)}50%{opacity:1;-o-transform:scale(1.1)}100%{opacity:0;-o-transform:scale(0.3)}}.bounceOut{-webkit-animation-name:bounceOut;-moz-animation-name:bounceOut;-o-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutUp{0%{-webkit-transform:translateY(0)}20%{opacity:1;-webkit-transform:translateY(20px)}100%{opacity:0;-webkit-transform:translateY(-2000px)}}@-moz-keyframes bounceOutUp{0%{-moz-transform:translateY(0)}20%{opacity:1;-moz-transform:translateY(20px)}100%{opacity:0;-moz-transform:translateY(-2000px)}}@-o-keyframes bounceOutUp{0%{-o-transform:translateY(0)}20%{opacity:1;-o-transform:translateY(20px)}100%{opacity:0;-o-transform:translateY(-2000px)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;-moz-animation-name:bounceOutUp;-o-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes bounceOutDown{0%{-webkit-transform:translateY(0)}20%{opacity:1;-webkit-transform:translateY(-20px)}100%{opacity:0;-webkit-transform:translateY(2000px)}}@-moz-keyframes bounceOutDown{0%{-moz-transform:translateY(0)}20%{opacity:1;-moz-transform:translateY(-20px)}100%{opacity:0;-moz-transform:translateY(2000px)}}@-o-keyframes bounceOutDown{0%{-o-transform:translateY(0)}20%{opacity:1;-o-transform:translateY(-20px)}100%{opacity:0;-o-transform:translateY(2000px)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;-moz-animation-name:bounceOutDown;-o-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{0%{-webkit-transform:translateX(0)}20%{opacity:1;-webkit-transform:translateX(20px)}100%{opacity:0;-webkit-transform:translateX(-2000px)}}@-moz-keyframes bounceOutLeft{0%{-moz-transform:translateX(0)}20%{opacity:1;-moz-transform:translateX(20px)}100%{opacity:0;-moz-transform:translateX(-2000px)}}@-o-keyframes bounceOutLeft{0%{-o-transform:translateX(0)}20%{opacity:1;-o-transform:translateX(20px)}100%{opacity:0;-o-transform:translateX(-2000px)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;-moz-animation-name:bounceOutLeft;-o-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{0%{-webkit-transform:translateX(0)}20%{opacity:1;-webkit-transform:translateX(-20px)}100%{opacity:0;-webkit-transform:translateX(2000px)}}@-moz-keyframes bounceOutRight{0%{-moz-transform:translateX(0)}20%{opacity:1;-moz-transform:translateX(-20px)}100%{opacity:0;-moz-transform:translateX(2000px)}}@-o-keyframes bounceOutRight{0%{-o-transform:translateX(0)}20%{opacity:1;-o-transform:translateX(-20px)}100%{opacity:0;-o-transform:translateX(2000px)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;-moz-animation-name:bounceOutRight;-o-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes rotateIn{0%{-webkit-transform-origin:center center;-webkit-transform:rotate(-200deg);opacity:0}100%{-webkit-transform-origin:center center;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateIn{0%{-moz-transform-origin:center center;-moz-transform:rotate(-200deg);opacity:0}100%{-moz-transform-origin:center center;-moz-transform:rotate(0);opacity:1}}@-o-keyframes rotateIn{0%{-o-transform-origin:center center;-o-transform:rotate(-200deg);opacity:0}100%{-o-transform-origin:center center;-o-transform:rotate(0);opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;-moz-animation-name:rotateIn;-o-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInUpLeft{0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(90deg);opacity:0}100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateInUpLeft{0%{-moz-transform-origin:left bottom;-moz-transform:rotate(90deg);opacity:0}100%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1}}@-o-keyframes rotateInUpLeft{0%{-o-transform-origin:left bottom;-o-transform:rotate(90deg);opacity:0}100%{-o-transform-origin:left bottom;-o-transform:rotate(0);opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;-moz-animation-name:rotateInUpLeft;-o-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInDownLeft{0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(-90deg);opacity:0}100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateInDownLeft{0%{-moz-transform-origin:left bottom;-moz-transform:rotate(-90deg);opacity:0}100%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1}}@-o-keyframes rotateInDownLeft{0%{-o-transform-origin:left bottom;-o-transform:rotate(-90deg);opacity:0}100%{-o-transform-origin:left bottom;-o-transform:rotate(0);opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;-moz-animation-name:rotateInDownLeft;-o-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInUpRight{0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(-90deg);opacity:0} -100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateInUpRight{0%{-moz-transform-origin:right bottom;-moz-transform:rotate(-90deg);opacity:0}100%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1}}@-o-keyframes rotateInUpRight{0%{-o-transform-origin:right bottom;-o-transform:rotate(-90deg);opacity:0}100%{-o-transform-origin:right bottom;-o-transform:rotate(0);opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;-moz-animation-name:rotateInUpRight;-o-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateInDownRight{0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(90deg);opacity:0}100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1}}@-moz-keyframes rotateInDownRight{0%{-moz-transform-origin:right bottom;-moz-transform:rotate(90deg);opacity:0}100%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1}}@-o-keyframes rotateInDownRight{0%{-o-transform-origin:right bottom;-o-transform:rotate(90deg);opacity:0}100%{-o-transform-origin:right bottom;-o-transform:rotate(0);opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;-moz-animation-name:rotateInDownRight;-o-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateOut{0%{-webkit-transform-origin:center center;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:center center;-webkit-transform:rotate(200deg);opacity:0}}@-moz-keyframes rotateOut{0%{-moz-transform-origin:center center;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:center center;-moz-transform:rotate(200deg);opacity:0}}@-o-keyframes rotateOut{0%{-o-transform-origin:center center;-o-transform:rotate(0);opacity:1}100%{-o-transform-origin:center center;-o-transform:rotate(200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;-moz-animation-name:rotateOut;-o-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutUpLeft{0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(-90deg);opacity:0}}@-moz-keyframes rotateOutUpLeft{0%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:left bottom;-moz-transform:rotate(-90deg);opacity:0}}@-o-keyframes rotateOutUpLeft{0%{-o-transform-origin:left bottom;-o-transform:rotate(0);opacity:1}100%{-o-transform-origin:left bottom;-o-transform:rotate(-90deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;-moz-animation-name:rotateOutUpLeft;-o-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutDownLeft{0%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:left bottom;-webkit-transform:rotate(90deg);opacity:0}}@-moz-keyframes rotateOutDownLeft{0%{-moz-transform-origin:left bottom;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:left bottom;-moz-transform:rotate(90deg);opacity:0}}@-o-keyframes rotateOutDownLeft{0%{-o-transform-origin:left bottom;-o-transform:rotate(0);opacity:1}100%{-o-transform-origin:left bottom;-o-transform:rotate(90deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;-moz-animation-name:rotateOutDownLeft;-o-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutUpRight{0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(90deg);opacity:0}}@-moz-keyframes rotateOutUpRight{0%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:right bottom;-moz-transform:rotate(90deg);opacity:0}}@-o-keyframes rotateOutUpRight{0%{-o-transform-origin:right bottom;-o-transform:rotate(0);opacity:1}100%{-o-transform-origin:right bottom;-o-transform:rotate(90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;-moz-animation-name:rotateOutUpRight;-o-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes rotateOutDownRight{0%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(0);opacity:1}100%{-webkit-transform-origin:right bottom;-webkit-transform:rotate(-90deg);opacity:0}}@-moz-keyframes rotateOutDownRight{0%{-moz-transform-origin:right bottom;-moz-transform:rotate(0);opacity:1}100%{-moz-transform-origin:right bottom;-moz-transform:rotate(-90deg);opacity:0}}@-o-keyframes rotateOutDownRight{0%{-o-transform-origin:right bottom;-o-transform:rotate(0);opacity:1}100%{-o-transform-origin:right bottom;-o-transform:rotate(-90deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;-moz-animation-name:rotateOutDownRight;-o-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes lightSpeedIn{0%{-webkit-transform:translateX(100%) skewX(-30deg);opacity:0} -60%{-webkit-transform:translateX(-20%) skewX(30deg);opacity:1}80%{-webkit-transform:translateX(0%) skewX(-15deg);opacity:1}100%{-webkit-transform:translateX(0%) skewX(0deg);opacity:1}}@-moz-keyframes lightSpeedIn{0%{-moz-transform:translateX(100%) skewX(-30deg);opacity:0}60%{-moz-transform:translateX(-20%) skewX(30deg);opacity:1}80%{-moz-transform:translateX(0%) skewX(-15deg);opacity:1}100%{-moz-transform:translateX(0%) skewX(0deg);opacity:1}}@-o-keyframes lightSpeedIn{0%{-o-transform:translateX(100%) skewX(-30deg);opacity:0}60%{-o-transform:translateX(-20%) skewX(30deg);opacity:1}80%{-o-transform:translateX(0%) skewX(-15deg);opacity:1}100%{-o-transform:translateX(0%) skewX(0deg);opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;-moz-animation-name:lightSpeedIn;-o-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;-moz-animation-timing-function:ease-out;-o-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{0%{-webkit-transform:translateX(0%) skewX(0deg);opacity:1}100%{-webkit-transform:translateX(100%) skewX(-30deg);opacity:0}}@-moz-keyframes lightSpeedOut{0%{-moz-transform:translateX(0%) skewX(0deg);opacity:1}100%{-moz-transform:translateX(100%) skewX(-30deg);opacity:0}}@-o-keyframes lightSpeedOut{0%{-o-transform:translateX(0%) skewX(0deg);opacity:1}100%{-o-transform:translateX(100%) skewX(-30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;-moz-animation-name:lightSpeedOut;-o-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;-moz-animation-timing-function:ease-in;-o-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes hinge{0%{-webkit-transform:rotate(0);-webkit-transform-origin:top left;-webkit-animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate(80deg);-webkit-transform-origin:top left;-webkit-animation-timing-function:ease-in-out}40%{-webkit-transform:rotate(60deg);-webkit-transform-origin:top left;-webkit-animation-timing-function:ease-in-out}80%{-webkit-transform:rotate(60deg) translateY(0);opacity:1;-webkit-transform-origin:top left;-webkit-animation-timing-function:ease-in-out}100%{-webkit-transform:translateY(700px);opacity:0}}@-moz-keyframes hinge{0%{-moz-transform:rotate(0);-moz-transform-origin:top left;-moz-animation-timing-function:ease-in-out}20%,60%{-moz-transform:rotate(80deg);-moz-transform-origin:top left;-moz-animation-timing-function:ease-in-out}40%{-moz-transform:rotate(60deg);-moz-transform-origin:top left;-moz-animation-timing-function:ease-in-out}80%{-moz-transform:rotate(60deg) translateY(0);opacity:1;-moz-transform-origin:top left;-moz-animation-timing-function:ease-in-out}100%{-moz-transform:translateY(700px);opacity:0}}@-o-keyframes hinge{0%{-o-transform:rotate(0);-o-transform-origin:top left;-o-animation-timing-function:ease-in-out}20%,60%{-o-transform:rotate(80deg);-o-transform-origin:top left;-o-animation-timing-function:ease-in-out}40%{-o-transform:rotate(60deg);-o-transform-origin:top left;-o-animation-timing-function:ease-in-out}80%{-o-transform:rotate(60deg) translateY(0);opacity:1;-o-transform-origin:top left;-o-animation-timing-function:ease-in-out}100%{-o-transform:translateY(700px);opacity:0}}.hinge{-webkit-animation-name:hinge;-moz-animation-name:hinge;-o-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg)}}@-moz-keyframes rollIn{0%{opacity:0;-moz-transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-moz-transform:translateX(0px) rotate(0deg)}}@-o-keyframes rollIn{0%{opacity:0;-o-transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-o-transform:translateX(0px) rotate(0deg)}}.rollIn{-webkit-animation-name:rollIn;-moz-animation-name:rollIn;-o-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{0%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg)}100%{opacity:0;-webkit-transform:translateX(100%) rotate(120deg)}}@-moz-keyframes rollOut{0%{opacity:1;-moz-transform:translateX(0px) rotate(0deg)}100%{opacity:0;-moz-transform:translateX(100%) rotate(120deg)}}@-o-keyframes rollOut{0%{opacity:1;-o-transform:translateX(0px) rotate(0deg)}100%{opacity:0;-o-transform:translateX(100%) rotate(120deg)}}.rollOut{-webkit-animation-name:rollOut;-moz-animation-name:rollOut;-o-animation-name:rollOut;animation-name:rollOut}@-moz-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@-webkit-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@-o-keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@keyframes flash{0%,50%,100%{opacity:1}25%,75%{opacity:0}}@-moz-keyframes shake{0%,100%{transform:translateX(0)}10%,30%,50%,70%,90%{transform:translateX(-10px)}20%,40%,60%,80%{transform:translateX(10px)}}@-webkit-keyframes shake{0%,100%{transform:translateX(0)}10%,30%,50%,70%,90%{transform:translateX(-10px)} -20%,40%,60%,80%{transform:translateX(10px)}}@-o-keyframes shake{0%,100%{transform:translateX(0)}10%,30%,50%,70%,90%{transform:translateX(-10px)}20%,40%,60%,80%{transform:translateX(10px)}}@keyframes shake{0%,100%{transform:translateX(0)}10%,30%,50%,70%,90%{transform:translateX(-10px)}20%,40%,60%,80%{transform:translateX(10px)}}@-moz-keyframes bounce{0%,20%,50%,80%,100%{transform:translateY(0)}40%{transform:translateY(-30px)}60%{transform:translateY(-15px)}}@-webkit-keyframes bounce{0%,20%,50%,80%,100%{transform:translateY(0)}40%{transform:translateY(-30px)}60%{transform:translateY(-15px)}}@-o-keyframes bounce{0%,20%,50%,80%,100%{transform:translateY(0)}40%{transform:translateY(-30px)}60%{transform:translateY(-15px)}}@keyframes bounce{0%,20%,50%,80%,100%{transform:translateY(0)}40%{transform:translateY(-30px)}60%{transform:translateY(-15px)}}@-moz-keyframes tada{0%{transform:scale(1)}10%,20%{transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{transform:scale(1.1) rotate(3deg)}40%,60%,80%{transform:scale(1.1) rotate(-3deg)}100%{transform:scale(1) rotate(0)}}@-webkit-keyframes tada{0%{transform:scale(1)}10%,20%{transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{transform:scale(1.1) rotate(3deg)}40%,60%,80%{transform:scale(1.1) rotate(-3deg)}100%{transform:scale(1) rotate(0)}}@-o-keyframes tada{0%{transform:scale(1)}10%,20%{transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{transform:scale(1.1) rotate(3deg)}40%,60%,80%{transform:scale(1.1) rotate(-3deg)}100%{transform:scale(1) rotate(0)}}@keyframes tada{0%{transform:scale(1)}10%,20%{transform:scale(0.9) rotate(-3deg)}30%,50%,70%,90%{transform:scale(1.1) rotate(3deg)}40%,60%,80%{transform:scale(1.1) rotate(-3deg)}100%{transform:scale(1) rotate(0)}}@-moz-keyframes swing{20%{transform:rotate(15deg)}40%{transform:rotate(-10deg)}60%{transform:rotate(5deg)}80%{transform:rotate(-5deg)}100%{transform:rotate(0deg)}}@-webkit-keyframes swing{20%{transform:rotate(15deg)}40%{transform:rotate(-10deg)}60%{transform:rotate(5deg)}80%{transform:rotate(-5deg)}100%{transform:rotate(0deg)}}@-o-keyframes swing{20%{transform:rotate(15deg)}40%{transform:rotate(-10deg)}60%{transform:rotate(5deg)}80%{transform:rotate(-5deg)}100%{transform:rotate(0deg)}}@keyframes swing{20%{transform:rotate(15deg)}40%{transform:rotate(-10deg)}60%{transform:rotate(5deg)}80%{transform:rotate(-5deg)}100%{transform:rotate(0deg)}}@-moz-keyframes wobble{0%{transform:translateX(0%)}15%{transform:translateX(-25%) rotate(-5deg)}30%{transform:translateX(20%) rotate(3deg)}45%{transform:translateX(-15%) rotate(-3deg)}60%{transform:translateX(10%) rotate(2deg)}75%{transform:translateX(-5%) rotate(-1deg)}100%{transform:translateX(0%)}}@-webkit-keyframes wobble{0%{transform:translateX(0%)}15%{transform:translateX(-25%) rotate(-5deg)}30%{transform:translateX(20%) rotate(3deg)}45%{transform:translateX(-15%) rotate(-3deg)}60%{transform:translateX(10%) rotate(2deg)}75%{transform:translateX(-5%) rotate(-1deg)}100%{transform:translateX(0%)}}@-o-keyframes wobble{0%{transform:translateX(0%)}15%{transform:translateX(-25%) rotate(-5deg)}30%{transform:translateX(20%) rotate(3deg)}45%{transform:translateX(-15%) rotate(-3deg)}60%{transform:translateX(10%) rotate(2deg)}75%{transform:translateX(-5%) rotate(-1deg)}100%{transform:translateX(0%)}}@keyframes wobble{0%{transform:translateX(0%)}15%{transform:translateX(-25%) rotate(-5deg)}30%{transform:translateX(20%) rotate(3deg)}45%{transform:translateX(-15%) rotate(-3deg)}60%{transform:translateX(10%) rotate(2deg)}75%{transform:translateX(-5%) rotate(-1deg)}100%{transform:translateX(0%)}}@-moz-keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}100%{transform:scale(1)}}@-webkit-keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}100%{transform:scale(1)}}@-o-keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}100%{transform:scale(1)}}@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(1.1)}100%{transform:scale(1)}}@-moz-keyframes flip{0%{transform:perspective(400px) translateZ(0) rotateY(0) scale(1);animation-timing-function:ease-out}40%{transform:perspective(400px) translateZ(150px) rotateY(170deg) scale(1);animation-timing-function:ease-out}50%{transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);animation-timing-function:ease-in}80%{transform:perspective(400px) translateZ(0) rotateY(360deg) scale(0.95);animation-timing-function:ease-in}100%{transform:perspective(400px) translateZ(0) rotateY(360deg) scale(1);animation-timing-function:ease-in}}@-webkit-keyframes flip{0%{transform:perspective(400px) translateZ(0) rotateY(0) scale(1);animation-timing-function:ease-out}40%{transform:perspective(400px) translateZ(150px) rotateY(170deg) scale(1);animation-timing-function:ease-out}50%{transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);animation-timing-function:ease-in}80%{transform:perspective(400px) translateZ(0) rotateY(360deg) scale(0.95);animation-timing-function:ease-in}100%{transform:perspective(400px) translateZ(0) rotateY(360deg) scale(1);animation-timing-function:ease-in} -}@-o-keyframes flip{0%{transform:perspective(400px) translateZ(0) rotateY(0) scale(1);animation-timing-function:ease-out}40%{transform:perspective(400px) translateZ(150px) rotateY(170deg) scale(1);animation-timing-function:ease-out}50%{transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);animation-timing-function:ease-in}80%{transform:perspective(400px) translateZ(0) rotateY(360deg) scale(0.95);animation-timing-function:ease-in}100%{transform:perspective(400px) translateZ(0) rotateY(360deg) scale(1);animation-timing-function:ease-in}}@keyframes flip{0%{transform:perspective(400px) translateZ(0) rotateY(0) scale(1);animation-timing-function:ease-out}40%{transform:perspective(400px) translateZ(150px) rotateY(170deg) scale(1);animation-timing-function:ease-out}50%{transform:perspective(400px) translateZ(150px) rotateY(190deg) scale(1);animation-timing-function:ease-in}80%{transform:perspective(400px) translateZ(0) rotateY(360deg) scale(0.95);animation-timing-function:ease-in}100%{transform:perspective(400px) translateZ(0) rotateY(360deg) scale(1);animation-timing-function:ease-in}}@-moz-keyframes flipInX{0%{transform:perspective(400px) rotateX(90deg);opacity:0}40%{transform:perspective(400px) rotateX(-10deg)}70%{transform:perspective(400px) rotateX(10deg)}100%{transform:perspective(400px) rotateX(0deg);opacity:1}}@-webkit-keyframes flipInX{0%{transform:perspective(400px) rotateX(90deg);opacity:0}40%{transform:perspective(400px) rotateX(-10deg)}70%{transform:perspective(400px) rotateX(10deg)}100%{transform:perspective(400px) rotateX(0deg);opacity:1}}@-o-keyframes flipInX{0%{transform:perspective(400px) rotateX(90deg);opacity:0}40%{transform:perspective(400px) rotateX(-10deg)}70%{transform:perspective(400px) rotateX(10deg)}100%{transform:perspective(400px) rotateX(0deg);opacity:1}}@keyframes flipInX{0%{transform:perspective(400px) rotateX(90deg);opacity:0}40%{transform:perspective(400px) rotateX(-10deg)}70%{transform:perspective(400px) rotateX(10deg)}100%{transform:perspective(400px) rotateX(0deg);opacity:1}}@-moz-keyframes flipOutX{0%{transform:perspective(400px) rotateX(0deg);opacity:1}100%{transform:perspective(400px) rotateX(90deg);opacity:0}}@-webkit-keyframes flipOutX{0%{transform:perspective(400px) rotateX(0deg);opacity:1}100%{transform:perspective(400px) rotateX(90deg);opacity:0}}@-o-keyframes flipOutX{0%{transform:perspective(400px) rotateX(0deg);opacity:1}100%{transform:perspective(400px) rotateX(90deg);opacity:0}}@keyframes flipOutX{0%{transform:perspective(400px) rotateX(0deg);opacity:1}100%{transform:perspective(400px) rotateX(90deg);opacity:0}}@-moz-keyframes flipInY{0%{transform:perspective(400px) rotateY(90deg);opacity:0}40%{transform:perspective(400px) rotateY(-10deg)}70%{transform:perspective(400px) rotateY(10deg)}100%{transform:perspective(400px) rotateY(0deg);opacity:1}}@-webkit-keyframes flipInY{0%{transform:perspective(400px) rotateY(90deg);opacity:0}40%{transform:perspective(400px) rotateY(-10deg)}70%{transform:perspective(400px) rotateY(10deg)}100%{transform:perspective(400px) rotateY(0deg);opacity:1}}@-o-keyframes flipInY{0%{transform:perspective(400px) rotateY(90deg);opacity:0}40%{transform:perspective(400px) rotateY(-10deg)}70%{transform:perspective(400px) rotateY(10deg)}100%{transform:perspective(400px) rotateY(0deg);opacity:1}}@keyframes flipInY{0%{transform:perspective(400px) rotateY(90deg);opacity:0}40%{transform:perspective(400px) rotateY(-10deg)}70%{transform:perspective(400px) rotateY(10deg)}100%{transform:perspective(400px) rotateY(0deg);opacity:1}}@-moz-keyframes flipOutY{0%{transform:perspective(400px) rotateY(0deg);opacity:1}100%{transform:perspective(400px) rotateY(90deg);opacity:0}}@-webkit-keyframes flipOutY{0%{transform:perspective(400px) rotateY(0deg);opacity:1}100%{transform:perspective(400px) rotateY(90deg);opacity:0}}@-o-keyframes flipOutY{0%{transform:perspective(400px) rotateY(0deg);opacity:1}100%{transform:perspective(400px) rotateY(90deg);opacity:0}}@keyframes flipOutY{0%{transform:perspective(400px) rotateY(0deg);opacity:1}100%{transform:perspective(400px) rotateY(90deg);opacity:0}}@-moz-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-o-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}@-moz-keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}100%{opacity:1;transform:translateY(0)}}@-o-keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}100%{opacity:1;transform:translateY(0)}}@keyframes fadeInUp{0%{opacity:0;transform:translateY(20px)}100%{opacity:1;transform:translateY(0)}}@-moz-keyframes fadeInDown{0%{opacity:0;transform:translateY(-20px)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes fadeInDown{0%{opacity:0;transform:translateY(-20px)}100%{opacity:1;transform:translateY(0)}}@-o-keyframes fadeInDown{0%{opacity:0;transform:translateY(-20px)} -100%{opacity:1;transform:translateY(0)}}@keyframes fadeInDown{0%{opacity:0;transform:translateY(-20px)}100%{opacity:1;transform:translateY(0)}}@-moz-keyframes fadeInLeft{0%{opacity:0;transform:translateX(-20px)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes fadeInLeft{0%{opacity:0;transform:translateX(-20px)}100%{opacity:1;transform:translateX(0)}}@-o-keyframes fadeInLeft{0%{opacity:0;transform:translateX(-20px)}100%{opacity:1;transform:translateX(0)}}@keyframes fadeInLeft{0%{opacity:0;transform:translateX(-20px)}100%{opacity:1;transform:translateX(0)}}@-moz-keyframes fadeInRight{0%{opacity:0;transform:translateX(20px)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes fadeInRight{0%{opacity:0;transform:translateX(20px)}100%{opacity:1;transform:translateX(0)}}@-o-keyframes fadeInRight{0%{opacity:0;transform:translateX(20px)}100%{opacity:1;transform:translateX(0)}}@keyframes fadeInRight{0%{opacity:0;transform:translateX(20px)}100%{opacity:1;transform:translateX(0)}}@-moz-keyframes fadeInUpBig{0%{opacity:0;transform:translateY(2000px)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes fadeInUpBig{0%{opacity:0;transform:translateY(2000px)}100%{opacity:1;transform:translateY(0)}}@-o-keyframes fadeInUpBig{0%{opacity:0;transform:translateY(2000px)}100%{opacity:1;transform:translateY(0)}}@keyframes fadeInUpBig{0%{opacity:0;transform:translateY(2000px)}100%{opacity:1;transform:translateY(0)}}@-moz-keyframes fadeInDownBig{0%{opacity:0;transform:translateY(-2000px)}100%{opacity:1;transform:translateY(0)}}@-webkit-keyframes fadeInDownBig{0%{opacity:0;transform:translateY(-2000px)}100%{opacity:1;transform:translateY(0)}}@-o-keyframes fadeInDownBig{0%{opacity:0;transform:translateY(-2000px)}100%{opacity:1;transform:translateY(0)}}@keyframes fadeInDownBig{0%{opacity:0;transform:translateY(-2000px)}100%{opacity:1;transform:translateY(0)}}@-moz-keyframes fadeInLeftBig{0%{opacity:0;transform:translateX(-2000px)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes fadeInLeftBig{0%{opacity:0;transform:translateX(-2000px)}100%{opacity:1;transform:translateX(0)}}@-o-keyframes fadeInLeftBig{0%{opacity:0;transform:translateX(-2000px)}100%{opacity:1;transform:translateX(0)}}@keyframes fadeInLeftBig{0%{opacity:0;transform:translateX(-2000px)}100%{opacity:1;transform:translateX(0)}}@-moz-keyframes fadeInRightBig{0%{opacity:0;transform:translateX(2000px)}100%{opacity:1;transform:translateX(0)}}@-webkit-keyframes fadeInRightBig{0%{opacity:0;transform:translateX(2000px)}100%{opacity:1;transform:translateX(0)}}@-o-keyframes fadeInRightBig{0%{opacity:0;transform:translateX(2000px)}100%{opacity:1;transform:translateX(0)}}@keyframes fadeInRightBig{0%{opacity:0;transform:translateX(2000px)}100%{opacity:1;transform:translateX(0)}}@-moz-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-o-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@-moz-keyframes fadeOutUp{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-20px)}}@-webkit-keyframes fadeOutUp{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-20px)}}@-o-keyframes fadeOutUp{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-20px)}}@keyframes fadeOutUp{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-20px)}}@-moz-keyframes fadeOutDown{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(20px)}}@-webkit-keyframes fadeOutDown{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(20px)}}@-o-keyframes fadeOutDown{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(20px)}}@keyframes fadeOutDown{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(20px)}}@-moz-keyframes fadeOutLeft{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-20px)}}@-webkit-keyframes fadeOutLeft{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-20px)}}@-o-keyframes fadeOutLeft{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-20px)}}@keyframes fadeOutLeft{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-20px)}}@-moz-keyframes fadeOutRight{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(20px)}}@-webkit-keyframes fadeOutRight{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(20px)}}@-o-keyframes fadeOutRight{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(20px)}}@keyframes fadeOutRight{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(20px)}}@-moz-keyframes fadeOutUpBig{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-2000px)}}@-webkit-keyframes fadeOutUpBig{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-2000px)}}@-o-keyframes fadeOutUpBig{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-2000px)} -}@keyframes fadeOutUpBig{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-2000px)}}@-moz-keyframes fadeOutDownBig{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(2000px)}}@-webkit-keyframes fadeOutDownBig{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(2000px)}}@-o-keyframes fadeOutDownBig{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(2000px)}}@keyframes fadeOutDownBig{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(2000px)}}@-moz-keyframes fadeOutLeftBig{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-2000px)}}@-webkit-keyframes fadeOutLeftBig{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-2000px)}}@-o-keyframes fadeOutLeftBig{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-2000px)}}@keyframes fadeOutLeftBig{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(-2000px)}}@-moz-keyframes fadeOutRightBig{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(2000px)}}@-webkit-keyframes fadeOutRightBig{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(2000px)}}@-o-keyframes fadeOutRightBig{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(2000px)}}@keyframes fadeOutRightBig{0%{opacity:1;transform:translateX(0)}100%{opacity:0;transform:translateX(2000px)}}@-moz-keyframes slideInDown{0%{opacity:0;transform:translateY(-2000px)}100%{transform:translateY(0)}}@-webkit-keyframes slideInDown{0%{opacity:0;transform:translateY(-2000px)}100%{transform:translateY(0)}}@-o-keyframes slideInDown{0%{opacity:0;transform:translateY(-2000px)}100%{transform:translateY(0)}}@keyframes slideInDown{0%{opacity:0;transform:translateY(-2000px)}100%{transform:translateY(0)}}@-moz-keyframes slideInLeft{0%{opacity:0;transform:translateX(-2000px)}100%{transform:translateX(0)}}@-webkit-keyframes slideInLeft{0%{opacity:0;transform:translateX(-2000px)}100%{transform:translateX(0)}}@-o-keyframes slideInLeft{0%{opacity:0;transform:translateX(-2000px)}100%{transform:translateX(0)}}@keyframes slideInLeft{0%{opacity:0;transform:translateX(-2000px)}100%{transform:translateX(0)}}@-moz-keyframes slideInRight{0%{opacity:0;transform:translateX(2000px)}100%{transform:translateX(0)}}@-webkit-keyframes slideInRight{0%{opacity:0;transform:translateX(2000px)}100%{transform:translateX(0)}}@-o-keyframes slideInRight{0%{opacity:0;transform:translateX(2000px)}100%{transform:translateX(0)}}@keyframes slideInRight{0%{opacity:0;transform:translateX(2000px)}100%{transform:translateX(0)}}@-moz-keyframes slideOutUp{0%{transform:translateY(0)}100%{opacity:0;transform:translateY(-2000px)}}@-webkit-keyframes slideOutUp{0%{transform:translateY(0)}100%{opacity:0;transform:translateY(-2000px)}}@-o-keyframes slideOutUp{0%{transform:translateY(0)}100%{opacity:0;transform:translateY(-2000px)}}@keyframes slideOutUp{0%{transform:translateY(0)}100%{opacity:0;transform:translateY(-2000px)}}@-moz-keyframes slideOutLeft{0%{transform:translateX(0)}100%{opacity:0;transform:translateX(-2000px)}}@-webkit-keyframes slideOutLeft{0%{transform:translateX(0)}100%{opacity:0;transform:translateX(-2000px)}}@-o-keyframes slideOutLeft{0%{transform:translateX(0)}100%{opacity:0;transform:translateX(-2000px)}}@keyframes slideOutLeft{0%{transform:translateX(0)}100%{opacity:0;transform:translateX(-2000px)}}@-moz-keyframes slideOutRight{0%{transform:translateX(0)}100%{opacity:0;transform:translateX(2000px)}}@-webkit-keyframes slideOutRight{0%{transform:translateX(0)}100%{opacity:0;transform:translateX(2000px)}}@-o-keyframes slideOutRight{0%{transform:translateX(0)}100%{opacity:0;transform:translateX(2000px)}}@keyframes slideOutRight{0%{transform:translateX(0)}100%{opacity:0;transform:translateX(2000px)}}@-moz-keyframes bounceIn{0%{opacity:0;transform:scale(0.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(0.9)}100%{transform:scale(1)}}@-webkit-keyframes bounceIn{0%{opacity:0;transform:scale(0.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(0.9)}100%{transform:scale(1)}}@-o-keyframes bounceIn{0%{opacity:0;transform:scale(0.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(0.9)}100%{transform:scale(1)}}@keyframes bounceIn{0%{opacity:0;transform:scale(0.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(0.9)}100%{transform:scale(1)}}@-moz-keyframes bounceInUp{0%{opacity:0;transform:translateY(2000px)}60%{opacity:1;transform:translateY(-30px)}80%{transform:translateY(10px)}100%{transform:translateY(0)}}@-webkit-keyframes bounceInUp{0%{opacity:0;transform:translateY(2000px)}60%{opacity:1;transform:translateY(-30px)}80%{transform:translateY(10px)}100%{transform:translateY(0)}}@-o-keyframes bounceInUp{0%{opacity:0;transform:translateY(2000px)}60%{opacity:1;transform:translateY(-30px)}80%{transform:translateY(10px)}100%{transform:translateY(0)}}@keyframes bounceInUp{0%{opacity:0;transform:translateY(2000px)} -60%{opacity:1;transform:translateY(-30px)}80%{transform:translateY(10px)}100%{transform:translateY(0)}}@-moz-keyframes bounceInDown{0%{opacity:0;transform:translateY(-2000px)}60%{opacity:1;transform:translateY(30px)}80%{transform:translateY(-10px)}100%{transform:translateY(0)}}@-webkit-keyframes bounceInDown{0%{opacity:0;transform:translateY(-2000px)}60%{opacity:1;transform:translateY(30px)}80%{transform:translateY(-10px)}100%{transform:translateY(0)}}@-o-keyframes bounceInDown{0%{opacity:0;transform:translateY(-2000px)}60%{opacity:1;transform:translateY(30px)}80%{transform:translateY(-10px)}100%{transform:translateY(0)}}@keyframes bounceInDown{0%{opacity:0;transform:translateY(-2000px)}60%{opacity:1;transform:translateY(30px)}80%{transform:translateY(-10px)}100%{transform:translateY(0)}}@-moz-keyframes bounceInLeft{0%{opacity:0;transform:translateX(-2000px)}60%{opacity:1;transform:translateX(30px)}80%{transform:translateX(-10px)}100%{transform:translateX(0)}}@-webkit-keyframes bounceInLeft{0%{opacity:0;transform:translateX(-2000px)}60%{opacity:1;transform:translateX(30px)}80%{transform:translateX(-10px)}100%{transform:translateX(0)}}@-o-keyframes bounceInLeft{0%{opacity:0;transform:translateX(-2000px)}60%{opacity:1;transform:translateX(30px)}80%{transform:translateX(-10px)}100%{transform:translateX(0)}}@keyframes bounceInLeft{0%{opacity:0;transform:translateX(-2000px)}60%{opacity:1;transform:translateX(30px)}80%{transform:translateX(-10px)}100%{transform:translateX(0)}}@-moz-keyframes bounceInRight{0%{opacity:0;transform:translateX(2000px)}60%{opacity:1;transform:translateX(-30px)}80%{transform:translateX(10px)}100%{transform:translateX(0)}}@-webkit-keyframes bounceInRight{0%{opacity:0;transform:translateX(2000px)}60%{opacity:1;transform:translateX(-30px)}80%{transform:translateX(10px)}100%{transform:translateX(0)}}@-o-keyframes bounceInRight{0%{opacity:0;transform:translateX(2000px)}60%{opacity:1;transform:translateX(-30px)}80%{transform:translateX(10px)}100%{transform:translateX(0)}}@keyframes bounceInRight{0%{opacity:0;transform:translateX(2000px)}60%{opacity:1;transform:translateX(-30px)}80%{transform:translateX(10px)}100%{transform:translateX(0)}}@-moz-keyframes bounceOut{0%{transform:scale(1)}25%{transform:scale(0.95)}50%{opacity:1;transform:scale(1.1)}100%{opacity:0;transform:scale(0.3)}}@-webkit-keyframes bounceOut{0%{transform:scale(1)}25%{transform:scale(0.95)}50%{opacity:1;transform:scale(1.1)}100%{opacity:0;transform:scale(0.3)}}@-o-keyframes bounceOut{0%{transform:scale(1)}25%{transform:scale(0.95)}50%{opacity:1;transform:scale(1.1)}100%{opacity:0;transform:scale(0.3)}}@keyframes bounceOut{0%{transform:scale(1)}25%{transform:scale(0.95)}50%{opacity:1;transform:scale(1.1)}100%{opacity:0;transform:scale(0.3)}}@-moz-keyframes bounceOutUp{0%{transform:translateY(0)}20%{opacity:1;transform:translateY(20px)}100%{opacity:0;transform:translateY(-2000px)}}@-webkit-keyframes bounceOutUp{0%{transform:translateY(0)}20%{opacity:1;transform:translateY(20px)}100%{opacity:0;transform:translateY(-2000px)}}@-o-keyframes bounceOutUp{0%{transform:translateY(0)}20%{opacity:1;transform:translateY(20px)}100%{opacity:0;transform:translateY(-2000px)}}@keyframes bounceOutUp{0%{transform:translateY(0)}20%{opacity:1;transform:translateY(20px)}100%{opacity:0;transform:translateY(-2000px)}}@-moz-keyframes bounceOutDown{0%{transform:translateY(0)}20%{opacity:1;transform:translateY(-20px)}100%{opacity:0;transform:translateY(2000px)}}@-webkit-keyframes bounceOutDown{0%{transform:translateY(0)}20%{opacity:1;transform:translateY(-20px)}100%{opacity:0;transform:translateY(2000px)}}@-o-keyframes bounceOutDown{0%{transform:translateY(0)}20%{opacity:1;transform:translateY(-20px)}100%{opacity:0;transform:translateY(2000px)}}@keyframes bounceOutDown{0%{transform:translateY(0)}20%{opacity:1;transform:translateY(-20px)}100%{opacity:0;transform:translateY(2000px)}}@-moz-keyframes bounceOutLeft{0%{transform:translateX(0)}20%{opacity:1;transform:translateX(20px)}100%{opacity:0;transform:translateX(-2000px)}}@-webkit-keyframes bounceOutLeft{0%{transform:translateX(0)}20%{opacity:1;transform:translateX(20px)}100%{opacity:0;transform:translateX(-2000px)}}@-o-keyframes bounceOutLeft{0%{transform:translateX(0)}20%{opacity:1;transform:translateX(20px)}100%{opacity:0;transform:translateX(-2000px)}}@keyframes bounceOutLeft{0%{transform:translateX(0)}20%{opacity:1;transform:translateX(20px)}100%{opacity:0;transform:translateX(-2000px)}}@-moz-keyframes bounceOutRight{0%{transform:translateX(0)}20%{opacity:1;transform:translateX(-20px)}100%{opacity:0;transform:translateX(2000px)}}@-webkit-keyframes bounceOutRight{0%{transform:translateX(0)}20%{opacity:1;transform:translateX(-20px)}100%{opacity:0;transform:translateX(2000px)}}@-o-keyframes bounceOutRight{0%{transform:translateX(0)}20%{opacity:1;transform:translateX(-20px)}100%{opacity:0;transform:translateX(2000px)}}@keyframes bounceOutRight{0%{transform:translateX(0)}20%{opacity:1;transform:translateX(-20px)} -100%{opacity:0;transform:translateX(2000px)}}@-moz-keyframes rotateIn{0%{transform-origin:center center;transform:rotate(-200deg);opacity:0}100%{transform-origin:center center;transform:rotate(0);opacity:1}}@-webkit-keyframes rotateIn{0%{transform-origin:center center;transform:rotate(-200deg);opacity:0}100%{transform-origin:center center;transform:rotate(0);opacity:1}}@-o-keyframes rotateIn{0%{transform-origin:center center;transform:rotate(-200deg);opacity:0}100%{transform-origin:center center;transform:rotate(0);opacity:1}}@keyframes rotateIn{0%{transform-origin:center center;transform:rotate(-200deg);opacity:0}100%{transform-origin:center center;transform:rotate(0);opacity:1}}@-moz-keyframes rotateInUpLeft{0%{transform-origin:left bottom;transform:rotate(90deg);opacity:0}100%{transform-origin:left bottom;transform:rotate(0);opacity:1}}@-webkit-keyframes rotateInUpLeft{0%{transform-origin:left bottom;transform:rotate(90deg);opacity:0}100%{transform-origin:left bottom;transform:rotate(0);opacity:1}}@-o-keyframes rotateInUpLeft{0%{transform-origin:left bottom;transform:rotate(90deg);opacity:0}100%{transform-origin:left bottom;transform:rotate(0);opacity:1}}@keyframes rotateInUpLeft{0%{transform-origin:left bottom;transform:rotate(90deg);opacity:0}100%{transform-origin:left bottom;transform:rotate(0);opacity:1}}@-moz-keyframes rotateInDownLeft{0%{transform-origin:left bottom;transform:rotate(-90deg);opacity:0}100%{transform-origin:left bottom;transform:rotate(0);opacity:1}}@-webkit-keyframes rotateInDownLeft{0%{transform-origin:left bottom;transform:rotate(-90deg);opacity:0}100%{transform-origin:left bottom;transform:rotate(0);opacity:1}}@-o-keyframes rotateInDownLeft{0%{transform-origin:left bottom;transform:rotate(-90deg);opacity:0}100%{transform-origin:left bottom;transform:rotate(0);opacity:1}}@keyframes rotateInDownLeft{0%{transform-origin:left bottom;transform:rotate(-90deg);opacity:0}100%{transform-origin:left bottom;transform:rotate(0);opacity:1}}@-moz-keyframes rotateInUpRight{0%{transform-origin:right bottom;transform:rotate(-90deg);opacity:0}100%{transform-origin:right bottom;transform:rotate(0);opacity:1}}@-webkit-keyframes rotateInUpRight{0%{transform-origin:right bottom;transform:rotate(-90deg);opacity:0}100%{transform-origin:right bottom;transform:rotate(0);opacity:1}}@-o-keyframes rotateInUpRight{0%{transform-origin:right bottom;transform:rotate(-90deg);opacity:0}100%{transform-origin:right bottom;transform:rotate(0);opacity:1}}@keyframes rotateInUpRight{0%{transform-origin:right bottom;transform:rotate(-90deg);opacity:0}100%{transform-origin:right bottom;transform:rotate(0);opacity:1}}@-moz-keyframes rotateInDownRight{0%{transform-origin:right bottom;transform:rotate(90deg);opacity:0}100%{transform-origin:right bottom;transform:rotate(0);opacity:1}}@-webkit-keyframes rotateInDownRight{0%{transform-origin:right bottom;transform:rotate(90deg);opacity:0}100%{transform-origin:right bottom;transform:rotate(0);opacity:1}}@-o-keyframes rotateInDownRight{0%{transform-origin:right bottom;transform:rotate(90deg);opacity:0}100%{transform-origin:right bottom;transform:rotate(0);opacity:1}}@keyframes rotateInDownRight{0%{transform-origin:right bottom;transform:rotate(90deg);opacity:0}100%{transform-origin:right bottom;transform:rotate(0);opacity:1}}@-moz-keyframes rotateOut{0%{transform-origin:center center;transform:rotate(0);opacity:1}100%{transform-origin:center center;transform:rotate(200deg);opacity:0}}@-webkit-keyframes rotateOut{0%{transform-origin:center center;transform:rotate(0);opacity:1}100%{transform-origin:center center;transform:rotate(200deg);opacity:0}}@-o-keyframes rotateOut{0%{transform-origin:center center;transform:rotate(0);opacity:1}100%{transform-origin:center center;transform:rotate(200deg);opacity:0}}@keyframes rotateOut{0%{transform-origin:center center;transform:rotate(0);opacity:1}100%{transform-origin:center center;transform:rotate(200deg);opacity:0}}@-moz-keyframes rotateOutUpLeft{0%{transform-origin:left bottom;transform:rotate(0);opacity:1}100%{-transform-origin:left bottom;-transform:rotate(-90deg);opacity:0}}@-webkit-keyframes rotateOutUpLeft{0%{transform-origin:left bottom;transform:rotate(0);opacity:1}100%{-transform-origin:left bottom;-transform:rotate(-90deg);opacity:0}}@-o-keyframes rotateOutUpLeft{0%{transform-origin:left bottom;transform:rotate(0);opacity:1}100%{-transform-origin:left bottom;-transform:rotate(-90deg);opacity:0}}@keyframes rotateOutUpLeft{0%{transform-origin:left bottom;transform:rotate(0);opacity:1}100%{-transform-origin:left bottom;-transform:rotate(-90deg);opacity:0}}@-moz-keyframes rotateOutDownLeft{0%{transform-origin:left bottom;transform:rotate(0);opacity:1}100%{transform-origin:left bottom;transform:rotate(90deg);opacity:0}}@-webkit-keyframes rotateOutDownLeft{0%{transform-origin:left bottom;transform:rotate(0);opacity:1}100%{transform-origin:left bottom;transform:rotate(90deg);opacity:0}}@-o-keyframes rotateOutDownLeft{0%{transform-origin:left bottom;transform:rotate(0);opacity:1} -100%{transform-origin:left bottom;transform:rotate(90deg);opacity:0}}@keyframes rotateOutDownLeft{0%{transform-origin:left bottom;transform:rotate(0);opacity:1}100%{transform-origin:left bottom;transform:rotate(90deg);opacity:0}}@-moz-keyframes rotateOutUpRight{0%{transform-origin:right bottom;transform:rotate(0);opacity:1}100%{transform-origin:right bottom;transform:rotate(90deg);opacity:0}}@-webkit-keyframes rotateOutUpRight{0%{transform-origin:right bottom;transform:rotate(0);opacity:1}100%{transform-origin:right bottom;transform:rotate(90deg);opacity:0}}@-o-keyframes rotateOutUpRight{0%{transform-origin:right bottom;transform:rotate(0);opacity:1}100%{transform-origin:right bottom;transform:rotate(90deg);opacity:0}}@keyframes rotateOutUpRight{0%{transform-origin:right bottom;transform:rotate(0);opacity:1}100%{transform-origin:right bottom;transform:rotate(90deg);opacity:0}}@-moz-keyframes rotateOutDownRight{0%{transform-origin:right bottom;transform:rotate(0);opacity:1}100%{transform-origin:right bottom;transform:rotate(-90deg);opacity:0}}@-webkit-keyframes rotateOutDownRight{0%{transform-origin:right bottom;transform:rotate(0);opacity:1}100%{transform-origin:right bottom;transform:rotate(-90deg);opacity:0}}@-o-keyframes rotateOutDownRight{0%{transform-origin:right bottom;transform:rotate(0);opacity:1}100%{transform-origin:right bottom;transform:rotate(-90deg);opacity:0}}@keyframes rotateOutDownRight{0%{transform-origin:right bottom;transform:rotate(0);opacity:1}100%{transform-origin:right bottom;transform:rotate(-90deg);opacity:0}}@-moz-keyframes lightSpeedIn{0%{transform:translateX(100%) skewX(-30deg);opacity:0}60%{transform:translateX(-20%) skewX(30deg);opacity:1}80%{transform:translateX(0%) skewX(-15deg);opacity:1}100%{transform:translateX(0%) skewX(0deg);opacity:1}}@-webkit-keyframes lightSpeedIn{0%{transform:translateX(100%) skewX(-30deg);opacity:0}60%{transform:translateX(-20%) skewX(30deg);opacity:1}80%{transform:translateX(0%) skewX(-15deg);opacity:1}100%{transform:translateX(0%) skewX(0deg);opacity:1}}@-o-keyframes lightSpeedIn{0%{transform:translateX(100%) skewX(-30deg);opacity:0}60%{transform:translateX(-20%) skewX(30deg);opacity:1}80%{transform:translateX(0%) skewX(-15deg);opacity:1}100%{transform:translateX(0%) skewX(0deg);opacity:1}}@keyframes lightSpeedIn{0%{transform:translateX(100%) skewX(-30deg);opacity:0}60%{transform:translateX(-20%) skewX(30deg);opacity:1}80%{transform:translateX(0%) skewX(-15deg);opacity:1}100%{transform:translateX(0%) skewX(0deg);opacity:1}}@-moz-keyframes lightSpeedOut{0%{transform:translateX(0%) skewX(0deg);opacity:1}100%{transform:translateX(100%) skewX(-30deg);opacity:0}}@-webkit-keyframes lightSpeedOut{0%{transform:translateX(0%) skewX(0deg);opacity:1}100%{transform:translateX(100%) skewX(-30deg);opacity:0}}@-o-keyframes lightSpeedOut{0%{transform:translateX(0%) skewX(0deg);opacity:1}100%{transform:translateX(100%) skewX(-30deg);opacity:0}}@keyframes lightSpeedOut{0%{transform:translateX(0%) skewX(0deg);opacity:1}100%{transform:translateX(100%) skewX(-30deg);opacity:0}}@-moz-keyframes hinge{0%{transform:rotate(0);transform-origin:top left;animation-timing-function:ease-in-out}20%,60%{transform:rotate(80deg);transform-origin:top left;animation-timing-function:ease-in-out}40%{transform:rotate(60deg);transform-origin:top left;animation-timing-function:ease-in-out}80%{transform:rotate(60deg) translateY(0);opacity:1;transform-origin:top left;animation-timing-function:ease-in-out}100%{transform:translateY(700px);opacity:0}}@-webkit-keyframes hinge{0%{transform:rotate(0);transform-origin:top left;animation-timing-function:ease-in-out}20%,60%{transform:rotate(80deg);transform-origin:top left;animation-timing-function:ease-in-out}40%{transform:rotate(60deg);transform-origin:top left;animation-timing-function:ease-in-out}80%{transform:rotate(60deg) translateY(0);opacity:1;transform-origin:top left;animation-timing-function:ease-in-out}100%{transform:translateY(700px);opacity:0}}@-o-keyframes hinge{0%{transform:rotate(0);transform-origin:top left;animation-timing-function:ease-in-out}20%,60%{transform:rotate(80deg);transform-origin:top left;animation-timing-function:ease-in-out}40%{transform:rotate(60deg);transform-origin:top left;animation-timing-function:ease-in-out}80%{transform:rotate(60deg) translateY(0);opacity:1;transform-origin:top left;animation-timing-function:ease-in-out}100%{transform:translateY(700px);opacity:0}}@keyframes hinge{0%{transform:rotate(0);transform-origin:top left;animation-timing-function:ease-in-out}20%,60%{transform:rotate(80deg);transform-origin:top left;animation-timing-function:ease-in-out}40%{transform:rotate(60deg);transform-origin:top left;animation-timing-function:ease-in-out}80%{transform:rotate(60deg) translateY(0);opacity:1;transform-origin:top left;animation-timing-function:ease-in-out}100%{transform:translateY(700px);opacity:0}}@-moz-keyframes rollIn{0%{opacity:0;transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;transform:translateX(0px) rotate(0deg)} -}@-webkit-keyframes rollIn{0%{opacity:0;transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;transform:translateX(0px) rotate(0deg)}}@-o-keyframes rollIn{0%{opacity:0;transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;transform:translateX(0px) rotate(0deg)}}@keyframes rollIn{0%{opacity:0;transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;transform:translateX(0px) rotate(0deg)}}@-moz-keyframes rollOut{0%{opacity:1;transform:translateX(0px) rotate(0deg)}100%{opacity:0;transform:translateX(100%) rotate(120deg)}}@-webkit-keyframes rollOut{0%{opacity:1;transform:translateX(0px) rotate(0deg)}100%{opacity:0;transform:translateX(100%) rotate(120deg)}}@-o-keyframes rollOut{0%{opacity:1;transform:translateX(0px) rotate(0deg)}100%{opacity:0;transform:translateX(100%) rotate(120deg)}}@keyframes rollOut{0%{opacity:1;transform:translateX(0px) rotate(0deg)}100%{opacity:0;transform:translateX(100%) rotate(120deg)}}.article-entry pre,.article-entry .highlight{background:#2d2d2d;padding:15px 20px;border-style:solid;border-color:#ddd;border-width:1px 0;overflow:auto;color:#ccc;line-height:22.400000000000002px}.article-entry .highlight .gutter pre,.article-entry .gist .gist-file .gist-data .line-numbers{color:#666;font-size:.85em}.article-entry pre,.article-entry code{font-family:"Source Code Pro",Consolas,Monaco,Menlo,Consolas,monospace}.article-entry code{background:#eee;text-shadow:0 1px #fff;padding:0 .3em}.article-entry pre code{background:0;text-shadow:none;padding:0}.article-entry .highlight pre{border:0;margin:10;padding:0}.article-entry .highlight table{margin:0;width:auto}.article-entry .highlight td{border:0;padding:0}.article-entry .highlight figcaption{font-size:.85em;color:#999;line-height:1em;margin-bottom:1em}.article-entry .highlight figcaption a{float:right}.article-entry .highlight .gutter pre{text-align:right;padding-right:20px}.article-entry .highlight .line{height:22.400000000000002px}.article-entry .gist{margin:0 -20px;border-style:solid;border-color:#ddd;border-width:1px 0;background:#2d2d2d;padding:15px 20px 15px 0}.article-entry .gist .gist-file{border:0;font-family:"Source Code Pro",Consolas,Monaco,Menlo,Consolas,monospace;margin:0}.article-entry .gist .gist-file .gist-data{background:0;border:0}.article-entry .gist .gist-file .gist-data .line-numbers{background:0;border:0;padding:0 20px 0 0}.article-entry .gist .gist-file .gist-data .line-data{padding:0!important}.article-entry .gist .gist-file .highlight{margin:0;padding:0;border:0}.article-entry .gist .gist-file .gist-meta{background:#2d2d2d;color:#999;font:.85em "Helvetica Neue",Helvetica,Arial,sans-serif;text-shadow:0;padding:0;margin-top:1em;margin-left:20px}.article-entry .gist .gist-file .gist-meta a{color:#258fb8;font-weight:normal}.article-entry .gist .gist-file .gist-meta a:hover{text-decoration:underline}pre .comment,pre .title{color:#999}pre .variable,pre .attribute,pre .tag,pre .regexp,pre .ruby .constant,pre .xml .tag .title,pre .xml .pi,pre .xml .doctype,pre .html .doctype,pre .css .id,pre .css .class,pre .css .pseudo{color:#f2777a}pre .number,pre .preprocessor,pre .built_in,pre .literal,pre .params,pre .constant{color:#f99157}pre .class,pre .ruby .class .title,pre .css .rules .attribute{color:#9c9}pre .string,pre .value,pre .inheritance,pre .header,pre .ruby .symbol,pre .xml .cdata{color:#9c9}pre .css .hexcolor{color:#6cc}pre .function,pre .python .decorator,pre .python .title,pre .ruby .function .title,pre .ruby .title .keyword,pre .perl .sub,pre .javascript .title,pre .coffeescript .title{color:#69c}pre .keyword,pre .javascript .function{color:#c9c}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after{content:"";content:none}q:before,q:after{content:"";content:none}figure table{border-collapse:collapse;border-spacing:0;width:100%;table-layout:fixed;text-align:left;border-width:0;margin:auto}figure th,figure td{padding:0}body{width:100%;*zoom:1}body:before,body:after{content:"";display:table}body:after{clear:both}html,body{height:100%}html{height:100%;max-height:100%}body{font-family:"ff-tisa-web-pro-1","ff-tisa-web-pro-2","Lucida Grande","Hiragino Sans GB","Hiragino Sans GB W3","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif;font-size:1em;color:#666;-webkit-font-smoothing:antialiased} -::selection{background:rgba(37,104,163,0.2)}::-moz-selection{background:rgba(37,104,163,0.2)}a{text-decoration:none;color:#4e97d8}a:hover{color:#4e97d8;-o-transition:.5s;-ms-transition:.5s;-moz-transition:.5s;-webkit-transition:.5s}h1,h2,h3,h4,h5{margin-top:1em;margin-bottom:.5em;font-family:"ff-tisa-web-pro-1","ff-tisa-web-pro-2","Lucida Grande","Hiragino Sans GB","Hiragino Sans GB W3","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif;font-weight:lighter;color:#333;-webkit-font-smoothing:antialiased}h1{margin-top:0;font-size:2.5em;line-height:1.2em;letter-spacing:.05em}h2{font-size:2em}h3{font-size:1.6em}h4{font-size:1.2em}h4{font-size:1.1em}h5{font-size:1em}p{margin-bottom:1.3em;line-height:1.7em}strong{font-weight:bold}em{font-style:italic}blockquote{padding:10px 20px;margin:0 0 20px;font-family:"ff-tisa-web-pro-1","ff-tisa-web-pro-2","Lucida Grande","Hiragino Sans GB","Hiragino Sans GB W3","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif;font-weight:lighter;font-size:1em;border-left:3px solid #4e97d8}blockquote p:last-child{margin-bottom:0}ol,ul{margin:0 0 1.3em 2.5em}ol li,ul li{margin:0 0 .2em 0;line-height:1.6em}ol ol,ol ul,ul ol,ul ul{margin:.1em 0 .2em 2em}ol{list-style-type:decimal}ul{list-style-type:disc}code{padding:.1em .4em;background:#e8f2fb;border:1px solid #c9e1f6;border-radius:3px;font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;font-size:.9em;vertical-align:bottom;word-wrap:break-word}pre{margin-bottom:1.3em;padding:1em 2.5%;background:#e8f2fb;border:1px solid #c9e1f6;border-radius:3px;font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;font-size:.9em;font-weight:normal;line-height:1.7em;overflow:scroll}pre code{padding:0;background:0;border:0;word-wrap:normal}table{color:#333;font-size:.9em;text-align:center;line-height:40px;border-spacing:0;border:2px solid #4e97d8;width:90%;margin:50px auto}thead tr:first-child{background-color:#4e97d8;color:#f8f8f8;border:0}th{font-weight:bold}th,td{padding:0 8px 0 8px}thead tr:last-child th{border-bottom:1px solid #ddd}tbody tr:last-child td{border:0}tbody td{border-bottom:1px solid #ddd;font-size:.9em}.date,.time,.author,.tags{font-size:.8em;color:#c7c7c7}.date a,.time a,.author a,.tags a{color:#666}.date a:hover,.time a:hover,.author a:hover,.tags a:hover{color:#4e97d8}.excerpt{margin:0;font-size:.9em;color:#999}.intro{font-family:"ff-tisa-web-pro-1","ff-tisa-web-pro-2","Lucida Grande","Hiragino Sans GB","Hiragino Sans GB W3","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif;font-size:1.2em;font-weight:lighter;color:#999}.block-heading{display:inline;float:left;width:940px;margin:0 10px;position:relative;bottom:-15px;font-size:.8em;font-weight:bold;text-align:center;text-transform:uppercase;letter-spacing:1px}.label{position:relative;display:inline-block;padding:8px 18px 9px 18px;background:#4e97d8;border-radius:3px;text-align:center;color:#fff}.container{position:relative;z-index:500;width:940px;margin:0 auto}.content-wrapper{z-index:800;width:70%;margin-left:30%}.content-wrapper__inner{margin:0 10%;padding:50px 0}.footer{display:block;padding:2em 0 0 0;border-top:2px solid #ddd;font-size:.7em;color:#b3b3b3}.footer__copyright{display:block;margin-bottom:.7em}.footer__copyright a{color:#a6a6a6;text-decoration:underline}.footer__copyright a:hover{color:#4e97d8}.avatar,.logo{border-radius:50%;border:3px solid #fff;box-shadow:0 0 1px 1px rgba(0,0,0,0.3)}hr{border:0}.section-title__divider{width:30%;margin:2.2em 0 2.1em 0;border-top:1px solid #ddd}.hidden{display:none!important}.panel{display:table;width:100%;height:100%}.panel__vertical{display:table-cell;vertical-align:middle}.panel-title{font-family:"Old English Text MT","Engravers' Old English BT","Lato","PingFang SC","Microsoft YaHei",sans-serif;margin:0 0 5px 0;font-size:2.5em;color:#fff}.panel-subtitle{font-family:"ff-tisa-web-pro-1","ff-tisa-web-pro-2","Lucida Grande","Hiragino Sans GB","Hiragino Sans GB W3","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif;font-size:1.2em;font-weight:lighter;letter-spacing:3px;color:#ccc;-webkit-font-smoothing:antialiased}.iUp{opacity:0;-webkit-transform:translate3d(0,80px,0);-moz-transform:translate3d(0,80px,0);-ms-transform:translate3d(0,80px,0);-o-transform:translate3d(0,80px,0);transform:translate3d(0,80px,0);-webkit-transition:all 2s cubic-bezier(0.19,1,0.22,1);-moz-transition:all 2s cubic-bezier(0.19,1,0.22,1);transition:all 2s cubic-bezier(0.19,1,0.22,1)} -.iUp.up{opacity:1;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.panel-cover{display:block;position:fixed;z-index:900;width:100%;max-width:none;height:100%;background:center center no-repeat #666;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-transition:width .6s ease;-moz-transition:width .6s ease;transition:width .6s ease}.panel-cover--collapsed{width:30%}.panel-cover--collapsed .iUp{-webkit-transition:all 0 cubic-bezier(0.19,1,0.22,1);-moz-transition:all 0 cubic-bezier(0.19,1,0.22,1);transition:all 0 cubic-bezier(0.19,1,0.22,1)}.panel-cover--overlay{display:block;position:absolute;top:0;right:0;bottom:0;left:0;background-color:#000;z-index:1;-moz-opacity:.55;opacity:.55}.panel-cover__logo{margin-bottom:.2em}.panel-cover__description{margin:0 30px}.panel-cover__divider{width:50%;margin:20px auto;border-top:1px solid rgba(255,255,255,0.14)}.panel-cover__divider--secondary{width:15%}.panel-main{display:table;width:100%;height:100%}.panel-main__inner{display:table-cell;vertical-align:middle;position:relative;z-index:800;padding:0 60px}.panel-main__content{max-width:620px;margin:0 auto}.panel-main__content--fixed{width:480px;transition:width 1s;-webkit-transition:width 1s}.panel-inverted{font-weight:100;text-align:center;color:#fff;text-shadow:0 1px 1px rgba(0,0,0,0.4)}.panel-inverted a{color:#fff}.cover-navigation{margin-top:42px}.cover-navigation--social{margin-left:30px}.btn,.navigation__item a{padding:10px 20px;border:1px solid #4e97d8;border-radius:20px;font-size:.9em;font-weight:bold;letter-spacing:1px;text-shadow:none;color:#4e97d8;-webkit-font-smoothing:antialiased}.btn:hover,.navigation__item a:hover{color:#4e97d8;border-color:#4e97d8}.btn-border-small{border:1px solid #4e97d8;border-radius:20px;padding:6px 8px;font-size:.8em;margin-left:10px}.btn-secondary{border-color:#5ba4e5;color:#5ba4e5}.btn-secondary:hover{color:#217fd2;border-color:#217fd2}.btn-tertiary{border-color:#999;color:#999}.btn-tertiary:hover{color:#737373;border-color:#737373}.btn-large{padding:10px 24px;font-size:1.1em}.btn-small{padding:8px 12px;font-size:.7em}.btn-mobile-menu{display:none;position:fixed;z-index:9999;top:0;right:0;left:0;width:100%;height:35px;background:rgba(51,51,51,0.98);border-bottom:1px solid rgba(255,255,255,0.1);text-align:center}.btn-mobile-menu__icon,.btn-mobile-close__icon{position:relative;top:10px;color:#fff}nav{display:inline-block;position:relative}.navigation{display:inline-block;float:left;position:relative;margin:0;list-style-type:none}.navigation__item{display:inline-block;margin:5px 1px 0 0;line-height:1em}.navigation__item a{display:block;position:relative;border-color:#fff;color:#fff;opacity:.8}.navigation__item a:hover{color:#fff;border-color:#fff;opacity:1}.navigation--social a{border:0;padding:6px 8px 6px 9px}.navigation--social a .label{display:none}.navigation--social a .icon{display:block;font-size:1.7em}.pagination{display:block;margin:0 0 4em 0}.pagination__page-number{margin:0;font-size:.8em;color:#999}.pagination__newer{margin-right:1em}.pagination__older{margin-left:1em}i{font-family:"entypo";font-weight:normal;font-style:normal;font-size:18px}.social{font-size:22px}.icon-social{font-family:"entypo-social";font-size:22px;display:block;position:relative}*:focus{outline:0}@media all and (max-width:1100px){.panel-cover__logo{width:70px}.panel-title{font-size:2em}.panel-subtitle{font-size:1em}.panel-cover__description{margin:0 10px;font-size:.9em}.navigation--social{margin-top:5px;margin-left:0}}@media all and (max-width:960px){.btn-mobile-menu{display:block}.panel-main{display:table;position:relative}.panel-cover--collapsed{width:100%;max-width:none}.panel-main__inner{display:table-cell;padding:60px 10%}.panel-cover__description{display:block;max-width:600px;margin:0 auto}.panel-cover__divider--secondary{display:none}.panel-cover{width:100%;height:100%;background-position:center center}.panel-cover.panel-cover--collapsed{display:block;position:relative;height:auto;padding:0;background-position:center center}.panel-cover.panel-cover--collapsed .panel-main__inner{display:block;padding:70px 0 30px 0}.panel-cover.panel-cover--collapsed .panel-cover__logo{width:60px;border-width:2px}.panel-cover.panel-cover--collapsed .panel-cover__description{display:none}.panel-cover.panel-cover--collapsed .panel-cover__divider{display:none;margin:1em auto}.navigation-wrapper{display:none;position:fixed;top:0;right:0;left:0;width:100%;padding:20px 0;background:rgba(51,51,51,0.98);border-bottom:1px solid rgba(255,255,255,0.15)}.navigation-wrapper.visible{display:block}.cover-navigation{display:block;position:relative;float:left;clear:left;width:100%} -.cover-navigation .navigation{display:block;width:100%}.cover-navigation .navigation li{width:80%;margin-bottom:.4em}.cover-navigation.navigation--social{padding-top:5px}.cover-navigation.navigation--social .navigation li{display:inline-block;width:20%}.content-wrapper{width:80%;max-width:none;margin:0 auto}.content-wrapper__inner{margin-right:0;margin-left:0}.navigation__item{width:100%;margin:0 0 .4em 0}}@media all and (max-width:340px){.panel-main__inner{padding:0 5%}.panel-title{margin-bottom:.1em;font-size:1.5em}.panel-subtitle{font-size:.9em}.btn,.navigation__item a{display:block;margin-bottom:.4em}}.remark{position:absolute;z-index:900;bottom:0;right:5px;text-align:center;color:#fff;opacity:.6!important;padding-bottom:3px;padding-right:18px;letter-spacing:-3px;font-size:0}@media screen and (max-width:960px){.remark{display:none}}.power{display:inline-block;color:#fff!important;letter-spacing:0;font-size:10px;line-height:16px;margin:0;vertical-align:middle}.beian{position:absolute;z-index:900;bottom:0;right:5px;text-align:center;color:#fff;opacity:.25!important;padding-bottom:3px;letter-spacing:-3px;font-size:0}.gwab,.icp{display:inline-block;color:#fff!important;letter-spacing:0;font-size:10px;line-height:16px;margin:0;vertical-align:middle}.gwab{background:url(/img/beian.png) no-repeat;background-size:12px 12px;background-position:3px 2px;padding-left:18px}@-webkit-keyframes btnGroups{0%{-webkit-transform:scale(1.2,0.8)}1%{-webkit-transform:scale(1.18,0.82)}2%{-webkit-transform:scale(1.16,0.84)}3%{-webkit-transform:scale(1.13,0.87)}4%{-webkit-transform:scale(1.1,0.9)}5%{-webkit-transform:scale(1.07,0.93)}6%{-webkit-transform:scale(1.04,0.96)}7%{-webkit-transform:scale(1.01,0.99)}8%{-webkit-transform:scale(0.99,1.01)}9%{-webkit-transform:scale(0.97,1.03)}10%{-webkit-transform:scale(0.95,1.05)}11%{-webkit-transform:scale(0.94,1.06)}12%{-webkit-transform:scale(0.93,1.07)}13%{-webkit-transform:scale(0.93,1.07)}14%{-webkit-transform:scale(0.93,1.07)}15%{-webkit-transform:scale(0.93,1.07)}16%{-webkit-transform:scale(0.94,1.06)}17%{-webkit-transform:scale(0.94,1.06)}18%{-webkit-transform:scale(0.95,1.05)}19%{-webkit-transform:scale(0.96,1.04)}20%{-webkit-transform:scale(0.98,1.02)}21%{-webkit-transform:scale(0.99,1.01)}22%{-webkit-transform:scale(1,1)}23%{-webkit-transform:scale(1,1)}24%{-webkit-transform:scale(1.01,0.99)}25%{-webkit-transform:scale(1.02,0.98)}26%{-webkit-transform:scale(1.02,0.98)}27%{-webkit-transform:scale(1.02,0.98)}28%{-webkit-transform:scale(1.03,0.97)}29%{-webkit-transform:scale(1.03,0.97)}30%{-webkit-transform:scale(1.02,0.98)}31%{-webkit-transform:scale(1.02,0.98)}32%{-webkit-transform:scale(1.02,0.98)}33%{-webkit-transform:scale(1.02,0.98)}34%{-webkit-transform:scale(1.01,0.99)}35%{-webkit-transform:scale(1.01,0.99)}36%{-webkit-transform:scale(1.01,0.99)}37%{-webkit-transform:scale(1,1)}38%{-webkit-transform:scale(1,1)}39%{-webkit-transform:scale(1,1)}40%{-webkit-transform:scale(0.99,1.01)}41%{-webkit-transform:scale(0.99,1.01)}42%{-webkit-transform:scale(0.99,1.01)}43%{-webkit-transform:scale(0.99,1.01)}44%{-webkit-transform:scale(0.99,1.01)}45%{-webkit-transform:scale(0.99,1.01)}46%{-webkit-transform:scale(0.99,1.01)}47%{-webkit-transform:scale(0.99,1.01)}48%{-webkit-transform:scale(0.99,1.01)}49%{-webkit-transform:scale(1,1)}}@-moz-keyframes btnGroups{0%{-webkit-transform:scale(1.2,0.8);-moz-transform:scale(1.2,0.8);-ms-transform:scale(1.2,0.8);transform:scale(1.2,0.8)}1%{-webkit-transform:scale(1.18,0.82);-moz-transform:scale(1.18,0.82);-ms-transform:scale(1.18,0.82);transform:scale(1.18,0.82)}2%{-webkit-transform:scale(1.16,0.84);-moz-transform:scale(1.16,0.84);-ms-transform:scale(1.16,0.84);transform:scale(1.16,0.84)}3%{-webkit-transform:scale(1.13,0.87);-moz-transform:scale(1.13,0.87);-ms-transform:scale(1.13,0.87);transform:scale(1.13,0.87)}4%{-webkit-transform:scale(1.1,0.9);-moz-transform:scale(1.1,0.9);-ms-transform:scale(1.1,0.9);transform:scale(1.1,0.9)}5%{-webkit-transform:scale(1.07,0.93);-moz-transform:scale(1.07,0.93);-ms-transform:scale(1.07,0.93);transform:scale(1.07,0.93)}6%{-webkit-transform:scale(1.04,0.96);-moz-transform:scale(1.04,0.96);-ms-transform:scale(1.04,0.96);transform:scale(1.04,0.96)}7%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}8%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}9%{-webkit-transform:scale(0.97,1.03);-moz-transform:scale(0.97,1.03);-ms-transform:scale(0.97,1.03);transform:scale(0.97,1.03)}10%{-webkit-transform:scale(0.95,1.05);-moz-transform:scale(0.95,1.05);-ms-transform:scale(0.95,1.05);transform:scale(0.95,1.05)}11%{-webkit-transform:scale(0.94,1.06);-moz-transform:scale(0.94,1.06);-ms-transform:scale(0.94,1.06);transform:scale(0.94,1.06)}12%{-webkit-transform:scale(0.93,1.07);-moz-transform:scale(0.93,1.07);-ms-transform:scale(0.93,1.07);transform:scale(0.93,1.07)}13%{-webkit-transform:scale(0.93,1.07);-moz-transform:scale(0.93,1.07);-ms-transform:scale(0.93,1.07);transform:scale(0.93,1.07)} -14%{-webkit-transform:scale(0.93,1.07);-moz-transform:scale(0.93,1.07);-ms-transform:scale(0.93,1.07);transform:scale(0.93,1.07)}15%{-webkit-transform:scale(0.93,1.07);-moz-transform:scale(0.93,1.07);-ms-transform:scale(0.93,1.07);transform:scale(0.93,1.07)}16%{-webkit-transform:scale(0.94,1.06);-moz-transform:scale(0.94,1.06);-ms-transform:scale(0.94,1.06);transform:scale(0.94,1.06)}17%{-webkit-transform:scale(0.94,1.06);-moz-transform:scale(0.94,1.06);-ms-transform:scale(0.94,1.06);transform:scale(0.94,1.06)}18%{-webkit-transform:scale(0.95,1.05);-moz-transform:scale(0.95,1.05);-ms-transform:scale(0.95,1.05);transform:scale(0.95,1.05)}19%{-webkit-transform:scale(0.96,1.04);-moz-transform:scale(0.96,1.04);-ms-transform:scale(0.96,1.04);transform:scale(0.96,1.04)}20%{-webkit-transform:scale(0.98,1.02);-moz-transform:scale(0.98,1.02);-ms-transform:scale(0.98,1.02);transform:scale(0.98,1.02)}21%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}22%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}23%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}24%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}25%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}26%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}27%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}28%{-webkit-transform:scale(1.03,0.97);-moz-transform:scale(1.03,0.97);-ms-transform:scale(1.03,0.97);transform:scale(1.03,0.97)}29%{-webkit-transform:scale(1.03,0.97);-moz-transform:scale(1.03,0.97);-ms-transform:scale(1.03,0.97);transform:scale(1.03,0.97)}30%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}31%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}32%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}33%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}34%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}35%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}36%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}37%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}38%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}39%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}40%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}41%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}42%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}43%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}44%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}45%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}46%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}47%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}48%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}49%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}}@-webkit-keyframes btnGroups{0%{-webkit-transform:scale(1.2,0.8);-moz-transform:scale(1.2,0.8);-ms-transform:scale(1.2,0.8);transform:scale(1.2,0.8)}1%{-webkit-transform:scale(1.18,0.82);-moz-transform:scale(1.18,0.82);-ms-transform:scale(1.18,0.82);transform:scale(1.18,0.82)}2%{-webkit-transform:scale(1.16,0.84);-moz-transform:scale(1.16,0.84);-ms-transform:scale(1.16,0.84);transform:scale(1.16,0.84)}3%{-webkit-transform:scale(1.13,0.87);-moz-transform:scale(1.13,0.87);-ms-transform:scale(1.13,0.87);transform:scale(1.13,0.87)} -4%{-webkit-transform:scale(1.1,0.9);-moz-transform:scale(1.1,0.9);-ms-transform:scale(1.1,0.9);transform:scale(1.1,0.9)}5%{-webkit-transform:scale(1.07,0.93);-moz-transform:scale(1.07,0.93);-ms-transform:scale(1.07,0.93);transform:scale(1.07,0.93)}6%{-webkit-transform:scale(1.04,0.96);-moz-transform:scale(1.04,0.96);-ms-transform:scale(1.04,0.96);transform:scale(1.04,0.96)}7%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}8%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}9%{-webkit-transform:scale(0.97,1.03);-moz-transform:scale(0.97,1.03);-ms-transform:scale(0.97,1.03);transform:scale(0.97,1.03)}10%{-webkit-transform:scale(0.95,1.05);-moz-transform:scale(0.95,1.05);-ms-transform:scale(0.95,1.05);transform:scale(0.95,1.05)}11%{-webkit-transform:scale(0.94,1.06);-moz-transform:scale(0.94,1.06);-ms-transform:scale(0.94,1.06);transform:scale(0.94,1.06)}12%{-webkit-transform:scale(0.93,1.07);-moz-transform:scale(0.93,1.07);-ms-transform:scale(0.93,1.07);transform:scale(0.93,1.07)}13%{-webkit-transform:scale(0.93,1.07);-moz-transform:scale(0.93,1.07);-ms-transform:scale(0.93,1.07);transform:scale(0.93,1.07)}14%{-webkit-transform:scale(0.93,1.07);-moz-transform:scale(0.93,1.07);-ms-transform:scale(0.93,1.07);transform:scale(0.93,1.07)}15%{-webkit-transform:scale(0.93,1.07);-moz-transform:scale(0.93,1.07);-ms-transform:scale(0.93,1.07);transform:scale(0.93,1.07)}16%{-webkit-transform:scale(0.94,1.06);-moz-transform:scale(0.94,1.06);-ms-transform:scale(0.94,1.06);transform:scale(0.94,1.06)}17%{-webkit-transform:scale(0.94,1.06);-moz-transform:scale(0.94,1.06);-ms-transform:scale(0.94,1.06);transform:scale(0.94,1.06)}18%{-webkit-transform:scale(0.95,1.05);-moz-transform:scale(0.95,1.05);-ms-transform:scale(0.95,1.05);transform:scale(0.95,1.05)}19%{-webkit-transform:scale(0.96,1.04);-moz-transform:scale(0.96,1.04);-ms-transform:scale(0.96,1.04);transform:scale(0.96,1.04)}20%{-webkit-transform:scale(0.98,1.02);-moz-transform:scale(0.98,1.02);-ms-transform:scale(0.98,1.02);transform:scale(0.98,1.02)}21%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}22%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}23%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}24%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}25%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}26%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}27%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}28%{-webkit-transform:scale(1.03,0.97);-moz-transform:scale(1.03,0.97);-ms-transform:scale(1.03,0.97);transform:scale(1.03,0.97)}29%{-webkit-transform:scale(1.03,0.97);-moz-transform:scale(1.03,0.97);-ms-transform:scale(1.03,0.97);transform:scale(1.03,0.97)}30%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}31%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}32%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}33%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}34%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}35%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}36%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}37%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}38%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}39%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}40%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}41%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}42%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}43%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)} -44%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}45%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}46%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}47%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}48%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}49%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}}@-o-keyframes btnGroups{0%{-webkit-transform:scale(1.2,0.8);-moz-transform:scale(1.2,0.8);-ms-transform:scale(1.2,0.8);transform:scale(1.2,0.8)}1%{-webkit-transform:scale(1.18,0.82);-moz-transform:scale(1.18,0.82);-ms-transform:scale(1.18,0.82);transform:scale(1.18,0.82)}2%{-webkit-transform:scale(1.16,0.84);-moz-transform:scale(1.16,0.84);-ms-transform:scale(1.16,0.84);transform:scale(1.16,0.84)}3%{-webkit-transform:scale(1.13,0.87);-moz-transform:scale(1.13,0.87);-ms-transform:scale(1.13,0.87);transform:scale(1.13,0.87)}4%{-webkit-transform:scale(1.1,0.9);-moz-transform:scale(1.1,0.9);-ms-transform:scale(1.1,0.9);transform:scale(1.1,0.9)}5%{-webkit-transform:scale(1.07,0.93);-moz-transform:scale(1.07,0.93);-ms-transform:scale(1.07,0.93);transform:scale(1.07,0.93)}6%{-webkit-transform:scale(1.04,0.96);-moz-transform:scale(1.04,0.96);-ms-transform:scale(1.04,0.96);transform:scale(1.04,0.96)}7%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}8%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}9%{-webkit-transform:scale(0.97,1.03);-moz-transform:scale(0.97,1.03);-ms-transform:scale(0.97,1.03);transform:scale(0.97,1.03)}10%{-webkit-transform:scale(0.95,1.05);-moz-transform:scale(0.95,1.05);-ms-transform:scale(0.95,1.05);transform:scale(0.95,1.05)}11%{-webkit-transform:scale(0.94,1.06);-moz-transform:scale(0.94,1.06);-ms-transform:scale(0.94,1.06);transform:scale(0.94,1.06)}12%{-webkit-transform:scale(0.93,1.07);-moz-transform:scale(0.93,1.07);-ms-transform:scale(0.93,1.07);transform:scale(0.93,1.07)}13%{-webkit-transform:scale(0.93,1.07);-moz-transform:scale(0.93,1.07);-ms-transform:scale(0.93,1.07);transform:scale(0.93,1.07)}14%{-webkit-transform:scale(0.93,1.07);-moz-transform:scale(0.93,1.07);-ms-transform:scale(0.93,1.07);transform:scale(0.93,1.07)}15%{-webkit-transform:scale(0.93,1.07);-moz-transform:scale(0.93,1.07);-ms-transform:scale(0.93,1.07);transform:scale(0.93,1.07)}16%{-webkit-transform:scale(0.94,1.06);-moz-transform:scale(0.94,1.06);-ms-transform:scale(0.94,1.06);transform:scale(0.94,1.06)}17%{-webkit-transform:scale(0.94,1.06);-moz-transform:scale(0.94,1.06);-ms-transform:scale(0.94,1.06);transform:scale(0.94,1.06)}18%{-webkit-transform:scale(0.95,1.05);-moz-transform:scale(0.95,1.05);-ms-transform:scale(0.95,1.05);transform:scale(0.95,1.05)}19%{-webkit-transform:scale(0.96,1.04);-moz-transform:scale(0.96,1.04);-ms-transform:scale(0.96,1.04);transform:scale(0.96,1.04)}20%{-webkit-transform:scale(0.98,1.02);-moz-transform:scale(0.98,1.02);-ms-transform:scale(0.98,1.02);transform:scale(0.98,1.02)}21%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}22%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}23%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}24%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}25%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}26%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}27%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}28%{-webkit-transform:scale(1.03,0.97);-moz-transform:scale(1.03,0.97);-ms-transform:scale(1.03,0.97);transform:scale(1.03,0.97)}29%{-webkit-transform:scale(1.03,0.97);-moz-transform:scale(1.03,0.97);-ms-transform:scale(1.03,0.97);transform:scale(1.03,0.97)}30%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}31%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}32%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}33%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)} -34%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}35%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}36%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}37%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}38%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}39%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}40%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}41%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}42%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}43%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}44%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}45%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}46%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}47%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}48%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}49%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}}@keyframes btnGroups{0%{-webkit-transform:scale(1.2,0.8);-moz-transform:scale(1.2,0.8);-ms-transform:scale(1.2,0.8);transform:scale(1.2,0.8)}1%{-webkit-transform:scale(1.18,0.82);-moz-transform:scale(1.18,0.82);-ms-transform:scale(1.18,0.82);transform:scale(1.18,0.82)}2%{-webkit-transform:scale(1.16,0.84);-moz-transform:scale(1.16,0.84);-ms-transform:scale(1.16,0.84);transform:scale(1.16,0.84)}3%{-webkit-transform:scale(1.13,0.87);-moz-transform:scale(1.13,0.87);-ms-transform:scale(1.13,0.87);transform:scale(1.13,0.87)}4%{-webkit-transform:scale(1.1,0.9);-moz-transform:scale(1.1,0.9);-ms-transform:scale(1.1,0.9);transform:scale(1.1,0.9)}5%{-webkit-transform:scale(1.07,0.93);-moz-transform:scale(1.07,0.93);-ms-transform:scale(1.07,0.93);transform:scale(1.07,0.93)}6%{-webkit-transform:scale(1.04,0.96);-moz-transform:scale(1.04,0.96);-ms-transform:scale(1.04,0.96);transform:scale(1.04,0.96)}7%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}8%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}9%{-webkit-transform:scale(0.97,1.03);-moz-transform:scale(0.97,1.03);-ms-transform:scale(0.97,1.03);transform:scale(0.97,1.03)}10%{-webkit-transform:scale(0.95,1.05);-moz-transform:scale(0.95,1.05);-ms-transform:scale(0.95,1.05);transform:scale(0.95,1.05)}11%{-webkit-transform:scale(0.94,1.06);-moz-transform:scale(0.94,1.06);-ms-transform:scale(0.94,1.06);transform:scale(0.94,1.06)}12%{-webkit-transform:scale(0.93,1.07);-moz-transform:scale(0.93,1.07);-ms-transform:scale(0.93,1.07);transform:scale(0.93,1.07)}13%{-webkit-transform:scale(0.93,1.07);-moz-transform:scale(0.93,1.07);-ms-transform:scale(0.93,1.07);transform:scale(0.93,1.07)}14%{-webkit-transform:scale(0.93,1.07);-moz-transform:scale(0.93,1.07);-ms-transform:scale(0.93,1.07);transform:scale(0.93,1.07)}15%{-webkit-transform:scale(0.93,1.07);-moz-transform:scale(0.93,1.07);-ms-transform:scale(0.93,1.07);transform:scale(0.93,1.07)}16%{-webkit-transform:scale(0.94,1.06);-moz-transform:scale(0.94,1.06);-ms-transform:scale(0.94,1.06);transform:scale(0.94,1.06)}17%{-webkit-transform:scale(0.94,1.06);-moz-transform:scale(0.94,1.06);-ms-transform:scale(0.94,1.06);transform:scale(0.94,1.06)}18%{-webkit-transform:scale(0.95,1.05);-moz-transform:scale(0.95,1.05);-ms-transform:scale(0.95,1.05);transform:scale(0.95,1.05)}19%{-webkit-transform:scale(0.96,1.04);-moz-transform:scale(0.96,1.04);-ms-transform:scale(0.96,1.04);transform:scale(0.96,1.04)}20%{-webkit-transform:scale(0.98,1.02);-moz-transform:scale(0.98,1.02);-ms-transform:scale(0.98,1.02);transform:scale(0.98,1.02)}21%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}22%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}23%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)} -24%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}25%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}26%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}27%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}28%{-webkit-transform:scale(1.03,0.97);-moz-transform:scale(1.03,0.97);-ms-transform:scale(1.03,0.97);transform:scale(1.03,0.97)}29%{-webkit-transform:scale(1.03,0.97);-moz-transform:scale(1.03,0.97);-ms-transform:scale(1.03,0.97);transform:scale(1.03,0.97)}30%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}31%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}32%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}33%{-webkit-transform:scale(1.02,0.98);-moz-transform:scale(1.02,0.98);-ms-transform:scale(1.02,0.98);transform:scale(1.02,0.98)}34%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}35%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}36%{-webkit-transform:scale(1.01,0.99);-moz-transform:scale(1.01,0.99);-ms-transform:scale(1.01,0.99);transform:scale(1.01,0.99)}37%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}38%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}39%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}40%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}41%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}42%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}43%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}44%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}45%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}46%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}47%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}48%{-webkit-transform:scale(0.99,1.01);-moz-transform:scale(0.99,1.01);-ms-transform:scale(0.99,1.01);transform:scale(0.99,1.01)}49%{-webkit-transform:scale(1,1);-moz-transform:scale(1,1);-ms-transform:scale(1,1);transform:scale(1,1)}} \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/static/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.eot b/ruoyi-admin/src/main/resources/static/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.eot deleted file mode 100644 index 09b6df6..0000000 --- a/ruoyi-admin/src/main/resources/static/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.eot +++ /dev/null Binary files differ diff --git a/ruoyi-admin/src/main/resources/static/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.svg b/ruoyi-admin/src/main/resources/static/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.svg deleted file mode 100644 index 72f7b9d..0000000 --- a/ruoyi-admin/src/main/resources/static/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.svg +++ /dev/null @@ -1,963 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg> -<metadata> -Created by FontForge 20120731 at Wed Jul 10 02:09:32 2019 - By www -Copyright 1990-2003 Bitstream Inc. All rights reserved. -</metadata> -<defs> -<font id="EngraversOldEnglishBTW03-Rg" horiz-adv-x="934" > - <font-face - font-family="EngraversOldEnglishBTW03-Rg" - font-weight="400" - font-stretch="normal" - units-per-em="2048" - panose-1="3 4 7 2 4 6 8 3 6 3" - ascent="1556" - descent="-492" - x-height="991" - cap-height="1442" - bbox="-342 -483 2247 1898" - underline-thickness="50" - underline-position="-206" - unicode-range="U+0020-F002" - /> -<missing-glyph horiz-adv-x="1229" -d="M102 -362v1806h1024v-1806h-1024zM217 -248h795v1577h-795v-1577z" /> - <glyph glyph-name=".notdef" horiz-adv-x="1229" -d="M102 -362v1806h1024v-1806h-1024zM217 -248h795v1577h-795v-1577z" /> - <glyph glyph-name="glyph1" horiz-adv-x="0" - /> - <glyph glyph-name="glyph2" horiz-adv-x="467" - /> - <glyph glyph-name="space" unicode=" " horiz-adv-x="467" - /> - <glyph glyph-name="exclam" unicode="!" horiz-adv-x="555" -d="M266 -4q-35 40 -71.5 76t-75.5 69q40 37 76.5 76t70.5 82q30 -31 68 -66.5t88 -78.5q-39 -31 -78 -70t-78 -88zM262 391l-98 797q-27 21 -44.5 37.5t-29.5 34.5q55 39 101.5 86.5t80.5 99.5q28 -80 79 -125t126 -55q-26 -25 -57 -46t-68 -38z" /> - <glyph glyph-name="quotedbl" unicode=""" horiz-adv-x="686" -d="M526 860h-34l-70 459q-1 7 -1.5 14.5t-0.5 22.5q0 51 22.5 78.5t65.5 27.5q42 0 66 -27t24 -75q0 -16 -0.5 -24.5t-1.5 -16.5zM195 860h-35l-70 459q-2 17 -3 26t-1 15q0 48 24 75t66 27q44 0 67 -27.5t23 -78.5q0 -16 -0.5 -23.5t-1.5 -14.5z" /> - <glyph glyph-name="numbersign" unicode="#" horiz-adv-x="1575" -d="M702 864l-98 -276h283l96 276h-281zM760 1458h155l-161 -454h276l162 454h156l-162 -454h301l-49 -140h-301l-97 -276h320l-49 -139h-320l-162 -453h-155l162 453h-279l-162 -453h-153l159 453h-313l51 139h312l98 276h-336l51 140h334z" /> - <glyph glyph-name="dollar" unicode="$" -d="M472 1214v-460l123 166q8 10 23 30q131 174 155 264q-40 -51 -78.5 -74.5t-81.5 -23.5q-44 0 -77.5 23.5t-63.5 74.5zM437 713v501l-123 -36v-498h101zM472 217l33 -41l121 29v508h-144l-10 -17v-479zM75 178q56 55 109 81t108 26q35 0 69 -11t76 -36v434 -q-33 -51 -167.5 -208.5t-194.5 -285.5zM12 4q3 198 256 505q30 36 46 56h-212q1 5 5 16q33 86 33 150v332q0 39 -10.5 71t-35.5 72q17 -3 37 -4.5t58 -1.5q74 0 136 12t112 35v223h35v-206q30 14 62.5 37t68.5 57q41 -53 67.5 -71.5t53.5 -18.5q33 0 58.5 26t28.5 64h28 -q-10 -106 -58.5 -210t-201.5 -308h256q-16 -28 -23.5 -60t-7.5 -67v-426q0 -28 10 -64t33 -86q-48 18 -90.5 26.5t-85.5 8.5q-52 0 -101 -12.5t-98 -38.5v-279h-35v258q-31 -23 -57.5 -49.5t-50.5 -56.5q-65 86 -103 114.5t-77 28.5q-45 0 -73.5 -34.5t-37.5 -98.5h-26z" /> - <glyph glyph-name="percent" unicode="%" horiz-adv-x="1636" -d="M1163 1362h47l-796 -1399h-49zM922 51q6 44 26.5 76.5t57.5 56.5v400q0 45 -8 78.5t-25 66.5h5q40 -4 58 -4q100 0 190.5 34t168.5 101q22 -61 50 -89t68 -28q3 0 10.5 1.5t20.5 4.5q-9 -27 -23.5 -48t-35.5 -38v-419q0 -35 7.5 -75t22.5 -83q-30 5 -52 7.5t-42 2.5 -q-83 0 -156.5 -32.5t-146.5 -102.5q-32 46 -71 71t-76 25q-9 0 -22 -1.5t-27 -4.5zM1143 195q39 -16 67.5 -42t46.5 -65q28 10 50.5 17t42.5 12v516q-34 11 -59.5 34t-51.5 66q-30 -11 -53 -18t-43 -10v-510zM244 709q39 -16 67.5 -42t46.5 -65q24 8 48 15.5t46 13.5l1 516 -q-35 11 -61.5 35t-51.5 65q-30 -11 -53 -18t-43 -10v-510zM25 566q6 43 26.5 75.5t57.5 56.5v400q0 45 -8 78.5t-25 66.5h5q40 -4 58 -4q100 0 190.5 34t168.5 101q22 -61 50 -89t68 -28q8 0 15.5 1.5t15.5 3.5q-9 -27 -23 -47t-36 -37v-422q0 -35 7.5 -74t22.5 -82 -q-31 6 -52.5 8t-41.5 2q-83 0 -156.5 -32.5t-146.5 -102.5q-32 46 -71 71t-76 25q-9 0 -22 -1.5t-27 -3.5z" /> - <glyph glyph-name="ampersand" unicode="&" horiz-adv-x="1255" -d="M586 864l139 131l-213 314l-158 -133q80 -82 137 -159t95 -153zM444 131l172 201q-17 41 -72 160.5t-89 197.5l-262 -280q69 -62 132 -131.5t119 -147.5zM332 -45q-112 143 -179 216.5t-114 107.5l399 440q-62 127 -129.5 214t-132.5 126l459 399q73 -126 129.5 -207 -t120.5 -155l-283 -262q42 -81 79.5 -166t72.5 -176l272 337q12 -58 35.5 -88t56.5 -30q27 0 48 15t40 48q-17 -106 -85.5 -182t-139.5 -76q-34 0 -60 20t-42 60l-111 -135q83 -176 148 -245t143 -69q49 0 90.5 24t71.5 69q-9 -118 -88.5 -201.5t-176.5 -83.5 -q-90 0 -163 76.5t-160 269.5z" /> - <glyph glyph-name="quotesingle" unicode="'" horiz-adv-x="352" -d="M195 860h-35l-70 459q0 2 -1 8q-3 20 -3 29q0 50 23.5 78t66.5 28q42 0 66 -27t24 -75q0 -7 -0.5 -15t-3.5 -27z" /> - <glyph glyph-name="parenleft" unicode="(" horiz-adv-x="639" -d="M432 -274l-31 14l17 33q-130 131 -200.5 309.5t-70.5 376.5q0 280 121.5 552.5t321.5 436.5v-43q-158 -169 -245 -374.5t-87 -409.5q0 -175 64 -337t200 -331l21 33l26 -17z" /> - <glyph glyph-name="parenright" unicode=")" horiz-adv-x="639" -d="M223 1448l29 -14l-16 -33q129 -131 199.5 -310t70.5 -376q0 -280 -121 -552.5t-322 -436.5v43q159 167 246.5 374.5t87.5 411.5q0 173 -64 334t-202 332l-20 -33l-27 16z" /> - <glyph glyph-name="asterisk" unicode="*" horiz-adv-x="1024" -d="M510 961l-164 -347l-168 125l279 260l-379 56l65 196l334 -186l-61 381h192l-63 -381l336 186l65 -196l-381 -56l281 -260l-168 -125z" /> - <glyph glyph-name="plus" unicode="+" horiz-adv-x="1706" -d="M782 1221h142v-541h528v-139h-528v-541h-142v541h-528v139h528v541z" /> - <glyph glyph-name="comma" unicode="," horiz-adv-x="467" -d="M96 72l164 184q65 -90 88 -149t23 -125q0 -78 -43 -146t-125 -119q9 28 13.5 54.5t4.5 54.5q0 77 -28 132.5t-97 113.5z" /> - <glyph glyph-name="hyphen" unicode="-" horiz-adv-x="797" -d="M96 383l105 212q8 -25 20.5 -34.5t44.5 -9.5h47h240q39 0 75 10.5t72 32.5l-88 -191q-18 17 -38 24t-56 7h-37h-241q-25 0 -54.5 -10t-89.5 -41z" /> - <glyph glyph-name="period" unicode="." horiz-adv-x="467" -d="M51 74l146 174q45 -66 81.5 -93.5t75.5 -27.5q10 0 24.5 4t37.5 12q-45 -92 -90.5 -132t-104.5 -40q-49 0 -93 26.5t-77 76.5z" /> - <glyph glyph-name="slash" unicode="/" horiz-adv-x="635" -d="M-29 -190l533 1636h80l-533 -1636h-80z" /> - <glyph glyph-name="zero" unicode="0" -d="M350 229q42 -12 78 -42.5t64 -75.5q19 6 43 12.5t75 19.5v953q-42 14 -75.5 41.5t-68.5 76.5q-26 -10 -56 -18t-59 -12zM49 66q8 48 34.5 85t76.5 68v819q0 55 -10.5 94t-34.5 74h6q55 -4 78 -4q134 0 256.5 40t226.5 118q26 -67 65.5 -102t88.5 -35q9 0 20 1.5t24 3.5 -q-11 -30 -30 -53.5t-49 -44.5v-841q0 -39 10.5 -83.5t32.5 -99.5q-53 8 -79 10.5t-46 2.5q-114 0 -212 -38t-198 -120q-43 53 -94.5 82t-103.5 29q-14 0 -29 -1.5t-33 -4.5z" /> - <glyph glyph-name="one" unicode="1" -d="M168 39q30 70 79 114.5t136 79.5v713q0 128 -38.5 173.5t-145.5 60.5v34q61 12 118.5 46t133.5 104q64 -47 93 -111t29 -161v-863q35 -12 63.5 -25t55.5 -28l41 41l27 -24q-69 -68 -119.5 -127.5t-77.5 -104.5q-76 55 -148 85t-126 30q-30 0 -60 -9t-61 -28z" /> - <glyph glyph-name="two" unicode="2" -d="M772 754v-19q0 -53 10.5 -94t30.5 -68q-48 18 -90.5 26.5t-85.5 8.5q-212 0 -336.5 -101.5t-124.5 -275.5l1 -26q60 9 126 13.5t143 4.5q104 0 186 -9.5t142 -29.5l43 54l19 -27q-49 -61 -84.5 -113.5t-59.5 -97.5q-61 23 -132.5 35t-145.5 12q-61 0 -127.5 -4.5 -t-143.5 -13.5q-4 34 -6 68.5t-2 68.5q0 202 70.5 313t230.5 166q21 7 54 17q100 32 100 151v348l-33 13q-63 -57 -117 -84t-104 -27q-79 0 -137.5 51t-77.5 139q21 -13 39.5 -18.5t38.5 -5.5q43 0 96 27.5t104 76.5q79 -80 158 -121t156 -41q18 0 44 3.5t62 9.5 -q-25 -36 -36 -71.5t-11 -100.5v-258z" /> - <glyph glyph-name="three" unicode="3" -d="M348 -39q-31 52 -99 85.5t-145 33.5q-14 0 -29.5 -2t-41.5 -8q52 78 121 119.5t147 41.5q75 0 145 -38t117 -105l47 12v492q-44 10 -81 25t-70 36q-26 -18 -46 -41.5t-40 -58.5v149q12 -9 22.5 -13.5t18.5 -4.5q19 0 79.5 32t110.5 46v438l-51 12q-40 -88 -95.5 -130 -t-131.5 -42q-74 0 -131 41t-97 121q21 -13 40 -19.5t38 -6.5q43 0 86 33.5t103 117.5q81 -57 197 -87t259 -30h15q-19 -27 -30 -72t-11 -96v-137q0 -35 8 -75.5t26 -93.5q-33 2 -62.5 3.5t-55.5 1.5q-57 0 -113.5 -15.5t-112.5 -47.5q45 -32 100 -47t128 -15q32 0 64 2t67 7 -q-20 -20 -30.5 -63.5t-10.5 -104.5v-219q0 -53 14 -96t39 -70q-43 4 -71 6t-50 2q-106 0 -200.5 -29t-186.5 -90z" /> - <glyph glyph-name="four" unicode="4" -d="M508 410v675l-35 25q-71 -103 -131.5 -187t-116.5 -155v-358h283zM350 -8q11 66 51 114.5t107 77.5v152h-264q-55 0 -104 -4.5t-87 -12.5q1 5 1 15q3 58 3 78q0 103 -1 143t-5 69q106 114 248 304.5t299 431.5q38 -81 75.5 -123.5t71.5 -42.5q7 0 13.5 2.5t17.5 9.5 -q-8 -43 -27 -76.5t-53 -60.5v-659h29q52 0 87 20t58 63q1 -6 1.5 -14t0.5 -20q0 -14 -4 -39t-4 -37q0 -11 3 -40t3 -48v-23q-23 36 -51.5 52t-68.5 16q-17 0 -29 -1t-25 -3l1 -146q28 -7 55.5 -19.5t54.5 -31.5l49 39l21 -33q-41 -24 -96.5 -73t-121.5 -119 -q-57 43 -108.5 65.5t-95.5 22.5q-27 0 -52.5 -12t-52.5 -37z" /> - <glyph glyph-name="five" unicode="5" -d="M63 2q6 116 75.5 189t170.5 73q63 0 119 -28.5t113 -90.5l51 13v504q-43 20 -81 48t-73 64q-45 -23 -97.5 -45t-117.5 -45l4 -8q6 -15 6 -19q0 -24 -17.5 -46.5t-37.5 -22.5q-16 0 -26.5 12.5t-10.5 32.5q0 23 11 38t38 27v613h662q-34 -126 -75.5 -168.5t-153.5 -42.5 -h-404v-393q159 63 241 113.5t144 115.5q49 -60 104 -96.5t95 -36.5q22 0 43.5 9.5t46.5 31.5q-10 -64 -35 -103t-74 -65v-420q0 -46 11.5 -80t35.5 -61q-39 11 -63.5 15.5t-44.5 4.5q-122 0 -208 -41.5t-142 -128.5q-31 56 -82.5 89.5t-104.5 33.5q-42 0 -71.5 -20.5 -t-51.5 -65.5z" /> - <glyph glyph-name="six" unicode="6" -d="M621 129v514q-36 20 -62.5 42.5t-46.5 47.5l-168 -82v-409q71 -21 120 -53.5t89 -84.5zM39 51q11 56 37.5 92t77.5 64v805q0 92 -11.5 130t-37.5 62q12 -1 24.5 -1.5t32.5 -0.5q111 0 237.5 41.5t241.5 116.5q28 -61 59.5 -91t67.5 -30q20 0 39 9.5t47 33.5 -q-31 -91 -93 -141.5t-140 -50.5q-64 0 -111.5 32t-83.5 99l-82 -23v-512q130 58 218 110.5t136 100.5q35 -65 74 -95t88 -30q14 0 27 5.5t30 18.5q-10 -50 -35.5 -83.5t-72.5 -59.5v-422q0 -39 10.5 -71t34.5 -64q-19 2 -41.5 3t-64.5 1q-118 0 -221 -35.5t-167 -97.5 -q-55 58 -116 92.5t-105 34.5q-30 0 -53.5 -10t-46.5 -33z" /> - <glyph glyph-name="seven" unicode="7" -d="M467 -18q-126 29 -189 106t-63 203q0 115 62 241t202 291q47 55 169 183.5t173 205.5q-112 -80 -222 -124t-200 -44q-60 0 -116 19.5t-111 58.5l-47 -47l-21 23q56 49 103 109.5t88 133.5q30 -52 106 -81t185 -29q99 0 174 19.5t131 60.5q-18 -65 -65.5 -147.5 -t-174.5 -254.5q-115 -156 -167 -280t-52 -238q0 -81 34.5 -132.5t84.5 -51.5q13 0 24.5 7t26.5 24l25 -21q-48 -58 -87 -116t-73 -119z" /> - <glyph glyph-name="eight" unicode="8" -d="M475 690l135 70v330q-39 14 -75 42.5t-78 79.5l-123 -32v-344q0 -39 14 -63t49 -42zM535 100l86 17v366q0 63 -11.5 85t-48.5 40l-82 41l-145 -71v-367q79 -32 127 -58.5t74 -52.5zM317 -47q-59 55 -110.5 82.5t-93.5 27.5q-23 0 -45.5 -8t-47.5 -26q17 56 45.5 93.5 -t75.5 63.5v322q0 29 -11 53.5t-36 54.5q40 -8 68.5 -12t52.5 -4q52 0 112 18t113 50q-57 31 -113 47t-106 16q-32 0 -60.5 -3.5t-55.5 -10.5q27 30 39 60.5t12 90.5v13v192q0 34 -14 67.5t-40 61.5q8 -1 22 -3q48 -7 75 -7q111 0 233.5 44.5t229.5 125.5q37 -69 74.5 -102 -t76.5 -33q19 0 37 8.5t41 28.5q-8 -56 -30.5 -91.5t-65.5 -62.5v-250q0 -38 12 -75.5t35 -67.5q-44 11 -72.5 15.5t-48.5 4.5q-32 0 -64.5 -8t-93.5 -35l-51 -22q65 -36 116.5 -52t102.5 -16q28 0 57 4t60 13q-19 -29 -28 -54t-9 -59v-10v-289q0 -39 11.5 -69t35.5 -56l-7 1 -q-91 7 -128 7q-116 0 -221 -36t-185 -103z" /> - <glyph glyph-name="nine" unicode="9" -d="M633 641v453q-51 24 -84.5 51.5t-59.5 66.5l-137 -36v-519q37 -9 69.5 -32t70.5 -66zM53 4q27 115 108 180.5t193 65.5q71 0 132.5 -31.5t105.5 -91.5l41 16v461q-55 -24 -121 -70.5t-160 -125.5q-58 59 -111 89.5t-98 30.5q-23 0 -45.5 -7t-46.5 -23q14 49 40.5 81 -t72.5 54v436q0 39 -9.5 67t-31.5 62q16 -2 34 -3t54 -1q130 0 253.5 42t233.5 124q45 -79 85.5 -114.5t86.5 -35.5q22 0 39 7.5t31 23.5q-8 -58 -34.5 -92t-82.5 -57v-816q0 -77 8.5 -113t26.5 -67q-30 12 -55 17.5t-49 5.5q-98 0 -186.5 -39.5t-155.5 -112.5 -q-51 52 -101 77.5t-104 25.5q-44 0 -82.5 -16.5t-71.5 -49.5z" /> - <glyph glyph-name="colon" unicode=":" horiz-adv-x="627" -d="M127 711l143 174q45 -65 82.5 -93t77.5 -28q10 0 24.5 4t37.5 12q-45 -92 -90.5 -132t-104.5 -40q-49 0 -93 26.5t-77 76.5zM127 74l143 174q45 -65 82.5 -93t77.5 -28q10 0 24.5 4t37.5 12q-45 -92 -90.5 -132t-104.5 -40q-49 0 -93 26.5t-77 76.5z" /> - <glyph glyph-name="semicolon" unicode=";" horiz-adv-x="627" -d="M127 711l143 174q45 -65 82.5 -93t77.5 -28q10 0 24.5 4t37.5 12q-45 -92 -90.5 -132t-104.5 -40q-49 0 -93 26.5t-77 76.5zM156 72l163 184q66 -90 88.5 -149t22.5 -125q0 -78 -43 -146t-125 -119q9 28 14 55t5 54q0 77 -28.5 132.5t-96.5 113.5z" /> - <glyph glyph-name="less" unicode="<" horiz-adv-x="1706" -d="M1442 1159v-153l-969 -396l969 -393v-154l-1178 484v129z" /> - <glyph glyph-name="equal" unicode="=" horiz-adv-x="1706" -d="M254 481h1198v-139h-1198v139zM254 879h1198v-140h-1198v140z" /> - <glyph glyph-name="greater" unicode=">" horiz-adv-x="1706" -d="M264 1159l1178 -483v-129l-1178 -484v154l971 393l-971 396v153z" /> - <glyph glyph-name="question" unicode="?" -d="M753 907q0 -41 8 -84t24 -86h-32q-193 0 -270 -71t-103 -270q-11 57 -17 114.5t-6 116.5q0 123 44 177.5t159 76.5v436l-51 12q-41 -88 -96 -130t-129 -42t-131 41t-96 120q21 -13 40 -19.5t37 -6.5q42 0 83 33t104 121q82 -58 198.5 -88.5t257.5 -30.5h15 -q-19 -26 -29 -69.5t-10 -98.5v-252zM388 -8q-32 40 -69 77t-80 72q46 44 82.5 81t66.5 73q40 -38 79 -73.5t79 -69.5q-49 -33 -88.5 -73t-69.5 -87z" /> - <glyph glyph-name="at" unicode="@" horiz-adv-x="2019" -d="M1186 332q-62 -105 -138 -156t-169 -51q-129 0 -206 92t-77 246q0 109 49.5 216t140.5 195q68 65 146 99.5t155 34.5q90 0 146 -48.5t76 -142.5l51 174h158l-172 -612l-4 -12q-15 -56 -15 -86q0 -51 23.5 -79t66.5 -28q33 0 80.5 20t89.5 52q119 90 179.5 228.5 -t60.5 318.5q0 133 -52.5 245t-156.5 201q-90 77 -214 118.5t-267 41.5q-180 0 -335.5 -61.5t-275.5 -180.5q-126 -124 -190 -287t-64 -358q0 -182 57 -313t179 -234q109 -92 254 -141t307 -49q170 0 327 51.5t300 155.5l33 -41q-147 -110 -312.5 -166t-345.5 -56 -q-189 0 -345.5 45.5t-274.5 135.5q-151 113 -230.5 276.5t-79.5 360.5q0 203 86.5 380.5t251.5 313.5q134 111 294.5 167t342.5 56q346 0 555 -188.5t209 -499.5q0 -159 -58.5 -298t-166.5 -237q-59 -52 -126 -80t-134 -28q-96 0 -149 53t-60 156zM1104 961 -q-54 0 -98.5 -30.5t-90.5 -99.5q-71 -107 -113 -233.5t-42 -228.5q0 -86 39.5 -138.5t101.5 -52.5q65 0 122.5 43.5t111.5 132.5q55 93 88.5 204t33.5 198q0 92 -42 148.5t-111 56.5z" /> - <glyph glyph-name="A" unicode="A" horiz-adv-x="1370" -d="M467 647h344l-176 459zM-41 -45q34 114 114 180.5t201 81.5l230 621q-18 34 -51 53.5t-74 19.5q-43 0 -74.5 -22t-50.5 -65q-2 24 -3 39.5t-1 27.5q0 85 61 151t140 66q51 0 84 -9.5t57 -31.5l28 77q-4 45 -51 75t-110 30q-59 0 -103 -20.5t-77 -63.5q10 118 94.5 197.5 -t195.5 79.5q49 0 92.5 -14.5t79.5 -43.5l394 -1028q32 -88 70 -125.5t91 -37.5q26 0 45.5 3.5t36.5 12.5q-75 -92 -115.5 -153t-60.5 -111q-70 6 -117 50.5t-81 139.5l-127 338h-476l-94 -250q14 0 33 2h6q64 0 116 -14.5t103 -46.5l31 35l18 -19q-68 -77 -108 -131 -t-68 -106q-51 37 -123 58.5t-149 21.5q-62 0 -114 -17t-93 -51z" /> - <glyph glyph-name="B" unicode="B" horiz-adv-x="1298" -d="M829 180q24 -13 45 -29t41 -34l56 18v221q-18 9 -37.5 14t-38.5 5q-15 0 -60 -13l-5 -1zM830 389q27 6 43.5 8t27.5 2q12 0 29 -2.5t41 -6.5v161q-16 -4 -31.5 -6t-40.5 -2q-7 0 -26.5 2t-42.5 6v-162zM829 582q24 -7 42.5 -10t33.5 -3q17 0 33 3.5t33 11.5v80 -q0 48 -14.5 68t-47.5 20q-12 0 -19 -1.5t-12 -3.5l-49 -45v-120zM483 285q34 35 49 67.5t15 69.5v541q0 97 33 159t135 131l195 136l3 2q81 55 99 55q52 0 101.5 -69.5t49.5 -164.5q0 -125 -58 -228t-185 -201q156 -2 198.5 -30.5t42.5 -121.5v-434q0 -41 5.5 -62t16.5 -36 -q-29 4 -58.5 7t-55.5 3q-112 0 -188.5 -40t-128.5 -126q-63 52 -135.5 76t-167.5 24q-76 0 -142.5 -21.5t-140.5 -70.5q78 125 199.5 198.5t246.5 73.5q58 0 102.5 -7.5t86.5 -25.5v664h28v-111q79 67 116.5 144t37.5 172q0 92 -27.5 155.5t-85.5 104.5l-57 -35 -q-43 -27 -63.5 -67t-20.5 -101v-520q0 -140 -55 -208t-191 -103zM20 1208q26 110 101.5 174t179.5 64q55 0 158.5 -30t156.5 -30q45 0 79.5 11.5t68.5 36.5q-49 -106 -133.5 -163t-192.5 -57q-50 0 -139.5 26t-132.5 26q-46 0 -81 -14t-65 -44zM225 143q23 35 33 71.5 -t10 88.5v299q-4 1 -9 1q-21 3 -32 3q-35 0 -55 -17t-27 -52q-16 24 -23 51t-7 65q0 65 30 104.5t78 39.5q15 0 23 -1t16 -3v32q0 125 59 201.5t191 120.5q-34 -41 -47.5 -81t-13.5 -101v-533q0 -89 -54.5 -158.5t-171.5 -130.5z" /> - <glyph glyph-name="C" unicode="C" horiz-adv-x="1280" -d="M557 264q29 28 41 64t12 127v698l-147 -78l-10 25q199 106 325.5 187.5t214.5 158.5q20 -61 53 -92t78 -31q25 0 47.5 10t42.5 31q-10 -70 -54.5 -119t-112.5 -67v-1002q54 21 112.5 66.5t124.5 117.5q-91 -205 -241.5 -310t-356.5 -105q-260 0 -425 190t-165 488 -q0 250 132 462.5t358 323.5q-146 -131 -217.5 -294t-71.5 -365q0 -306 137 -462.5t406 -156.5q48 0 91.5 8.5t88.5 26.5v1007q-5 -1 -10 -1.5t-15 -0.5q-54 0 -93 31t-62 92l-39 -24v-674q0 -144 -56.5 -220t-187.5 -112z" /> - <glyph glyph-name="D" unicode="D" horiz-adv-x="1186" -d="M170 195q30 37 42.5 85t12.5 128v200h-59q-40 0 -57 -15.5t-17 -51.5q-19 20 -29 48.5t-10 61.5q0 89 32.5 123.5t115.5 34.5h24v94q0 119 54.5 175.5t191.5 84.5q-29 -38 -41 -73.5t-12 -100.5v-506q0 -111 -54 -173.5t-194 -114.5zM561 924q31 -13 65.5 -19t78.5 -6 -q42 0 78 8.5t69 26.5v166q0 60 -25.5 85t-107.5 25h-158v-286zM561 547q27 11 61 15.5t85 4.5q45 0 79.5 -5.5t65.5 -16.5v352q-43 -16 -79.5 -23.5t-74.5 -7.5q-36 0 -70 6.5t-67 18.5v-344zM561 223q62 0 121.5 -22.5t120.5 -69.5l49 27v356q-31 13 -63 19t-74 6 -q-52 0 -88.5 -6t-65.5 -19v-291zM68 -49q56 120 177 191t287 81v987h-260q-119 0 -171 55.5t-52 180.5q20 -11 42.5 -16t62.5 -5h614q159 0 217.5 -61.5t58.5 -210.5v-864q0 -56 10 -90.5t31 -67.5q-17 0 -37 2h-6q-89 0 -186.5 -47.5t-198.5 -140.5q-75 39 -158.5 59.5 -t-168.5 20.5q-67 0 -130.5 -18t-131.5 -56z" /> - <glyph glyph-name="E" unicode="E" horiz-adv-x="1255" -d="M211 -53q59 92 153 161t220 113v785q0 207 96.5 324.5t265.5 117.5q48 0 95.5 -13t101.5 -40l20 22l25 -14q-44 -58 -79.5 -120.5t-57.5 -121.5q-45 53 -103.5 80t-128.5 27q-101 0 -154 -69.5t-53 -203.5v-293q48 84 111 124t145 40q51 0 98 -14t91 -43l26 29l25 -19 -q-46 -56 -85 -118t-71 -130q-25 57 -78 89t-118 32q-43 0 -77 -14t-67 -45v-406q55 14 101 20.5t88 6.5q97 0 181.5 -25t162.5 -77l43 63l24 -18q-47 -69 -85 -130.5t-68 -117.5q-72 50 -166 74t-217 24q-127 0 -236.5 -23.5t-228.5 -76.5zM55 1188q14 114 88 184t181 70 -q47 0 124.5 -21.5t112.5 -21.5q27 0 49.5 7t42.5 21q-41 -110 -96 -159t-135 -49q-50 0 -132 21.5t-112 21.5q-39 0 -64.5 -15.5t-58.5 -58.5zM229 127q30 37 43 81.5t13 143.5v258q-15 0 -35.5 1t-26.5 1q-49 0 -73 -20t-27 -63q-16 24 -23.5 56t-7.5 77q0 72 29.5 108.5 -t87.5 36.5q19 0 37.5 -1.5t37.5 -4.5l1 96q0 104 51.5 162t195.5 112q-35 -40 -50 -82.5t-15 -103.5v-541q0 -118 -50 -177t-188 -140z" /> - <glyph glyph-name="F" unicode="F" horiz-adv-x="1239" -d="M86 1200q6 103 70 172.5t149 69.5q53 0 152.5 -30t156.5 -30q50 0 93 12.5t86 39.5q-57 -104 -148 -171t-170 -67q-54 0 -148.5 33t-131.5 33q-36 0 -60 -14t-49 -48zM346 219q22 34 31.5 69t9.5 91v14v250h-45q-63 0 -91.5 -20t-41.5 -72q-14 30 -20.5 55t-6.5 49 -q0 100 39 143.5t127 43.5q15 0 23 -0.5t16 -1.5v34v39q0 128 237 259l6 3q-29 -38 -42 -79.5t-13 -118.5v-465q0 -107 -50.5 -166.5t-178.5 -126.5zM889 829h190v350q-43 2 -82.5 25.5t-70.5 67.5q-19 -14 -28 -32.5t-9 -41.5v-369zM-74 -16q49 108 116 167.5t142 59.5 -q60 0 183.5 -85t175.5 -85q72 0 111.5 48t39.5 136v867q0 44 12 71.5t42 48.5q14 11 56 37q161 97 275 197q49 -55 75.5 -70.5t57.5 -15.5q22 0 43.5 7.5t42.5 23.5q-18 -82 -64.5 -133.5t-125.5 -77.5v-1037h-29v500h-190v-342q0 -75 -14 -106.5t-50 -61.5 -q-99 -84 -225.5 -136t-230.5 -52q-82 0 -185.5 39t-138.5 39q-30 0 -59.5 -10t-59.5 -29z" /> - <glyph glyph-name="G" unicode="G" horiz-adv-x="1360" -d="M729 659l381 621q-70 -60 -110.5 -81t-77.5 -21q-42 0 -70.5 20.5t-50.5 67.5l-72 -52v-555zM840 25q77 26 126 75.5t72 124.5q-27 13 -51 19t-49 6q-28 0 -51.5 -5.5t-46.5 -17.5v-202zM840 262q28 8 54 12.5t50 4.5q43 0 91 -18q7 -2 9 -3q9 36 13 70t4 65 -q0 25 -2.5 53.5t-7.5 60.5q-23 -16 -49.5 -24t-57.5 -8t-55 5.5t-49 17.5v-236zM840 526q29 -12 55.5 -18t50.5 -6q28 0 53 8t48 25q-21 96 -75 154.5t-132 70.5v-234zM498 162q19 30 28 59t9 70v10v795l-86 -47v34q126 59 256 149t266 214q20 -48 49 -72t65 -24 -q19 0 43.5 13.5t57.5 41.5l22 -14l-360 -594q6 0 17.5 1t17.5 1q176 0 288.5 -105.5t112.5 -265.5q0 -191 -172.5 -334t-409.5 -143q-270 0 -460.5 195t-190.5 475q0 231 148.5 449t375.5 321q-154 -140 -229.5 -324.5t-75.5 -425.5q0 -289 121 -467t311 -178q27 0 54 4.5 -t57 14.5v730l-84 -137v-69q0 -189 -52.5 -261.5t-178.5 -115.5z" /> - <glyph glyph-name="H" unicode="H" horiz-adv-x="1298" -d="M818 377q19 7 37.5 10.5t38.5 3.5q18 0 69 -14h3v196q-16 -6 -30.5 -9t-29.5 -3q-22 0 -44.5 3t-43.5 9v-196zM818 809v-206q22 -8 42 -11.5t40 -3.5q18 0 34 3.5t32 11.5l-1 147q-37 11 -64.5 29.5t-49.5 45.5zM499 264q25 29 36 65.5t11 106.5v561q0 112 21 163t75 106 -q83 83 171 127.5t169 44.5q73 0 123.5 -24.5t97.5 -82.5l27 12l12 -24q-52 -25 -107.5 -67.5t-117.5 -106.5q-15 80 -62.5 129t-109.5 49q-65 0 -91 -38.5t-26 -162.5v-329l59 28v150h31v-129q79 49 136.5 92t86.5 74q27 -51 62.5 -78t77.5 -27q11 0 40 9q7 2 11 3 -q-2 -40 -19.5 -70.5t-52.5 -53.5v-568q0 -44 6.5 -79.5t20.5 -71.5q-35 13 -59 18.5t-46 5.5q-63 0 -110 -31.5t-47 -70.5q0 -30 70.5 -94.5t70.5 -143.5q0 -64 -36.5 -104.5t-90.5 -40.5q-9 0 -18 0.5t-19 1.5q31 26 46.5 60t15.5 77q0 51 -38 120t-38 99q0 48 39 98.5 -t39 61.5v39v180q-18 8 -35 12.5t-33 4.5q-16 -1 -36 -4.5t-42 -10.5l-2 -164l41 -26l43 39l19 -19q-56 -57 -100 -116t-81 -127q-61 44 -125 66t-133 22q-63 0 -122.5 -20t-118.5 -60q54 127 167 203.5t244 76.5q33 0 64 -5.5t71 -18.5v592l-59 -31v-168q0 -131 -53 -207 -t-176 -123zM57 1211q31 107 95 167t148 60q42 0 122.5 -19.5t125.5 -19.5q25 0 47.5 5.5t50.5 18.5q-46 -102 -102 -148t-131 -46q-36 0 -110.5 19.5t-115.5 19.5q-52 0 -128 -56zM179 70q43 51 61.5 111t18.5 181v33v256q-7 1 -14 1.5t-17 0.5q-54 0 -83 -19t-37 -61 -q-18 21 -25.5 43.5t-7.5 55.5q0 81 44 129.5t120 48.5h20q-2 16 -2 45q0 96 51 158t195 131q-28 -38 -39.5 -85t-11.5 -157v-500q0 -136 -61 -217t-212 -155z" /> - <glyph glyph-name="I" unicode="I" horiz-adv-x="1090" -d="M136 1209q33 107 107 170t167 63q46 0 138.5 -21.5t141.5 -21.5q31 0 57 5.5t54 18.5q-51 -100 -114.5 -146t-149.5 -46q-40 0 -123.5 15.5t-130.5 15.5q-63 0 -145 -52zM657 590v-4q0 -183 -55 -258.5t-188 -102.5q32 29 45.5 76t13.5 145v199q-6 1 -13.5 1.5t-21.5 0.5 -q-53 0 -82.5 -19.5t-38.5 -59.5q-17 20 -24.5 42.5t-7.5 55.5q0 83 42 131.5t115 48.5q4 0 12.5 -1t12.5 -1v45q0 97 51 159t193 130q-27 -36 -40.5 -96t-13.5 -146v-346zM-37 -43q10 102 88.5 180t163.5 78q87 0 191 -104q23 -23 36 -35q40 -36 77 -54t73 -18 -q90 0 133 67.5t43 209.5v757q0 147 56.5 217.5t195.5 147.5q-37 -37 -52.5 -77t-15.5 -118v-26v-848q0 -188 -128 -284.5t-378 -96.5q-85 0 -175 45t-124 45q-43 0 -90.5 -22t-93.5 -64z" /> - <glyph glyph-name="J" unicode="J" horiz-adv-x="1090" -d="M136 1209q33 107 107 170t167 63q46 0 138.5 -21.5t141.5 -21.5q31 0 57 5.5t54 18.5q-51 -100 -114.5 -146t-149.5 -46q-40 0 -123.5 15.5t-130.5 15.5q-63 0 -145 -52zM668 379q0 -133 -63.5 -211.5t-182.5 -95.5q32 28 45.5 74.5t13.5 138.5v360q-9 1 -18.5 1.5 -t-24.5 0.5q-54 0 -83 -19t-38 -61q-17 21 -24.5 43.5t-7.5 55.5q0 86 43.5 133t124.5 47q3 0 13 -1t15 -1q-1 10 -1.5 21.5t-0.5 33.5q0 90 49 153t172 128q-16 -41 -24 -86t-8 -95v-620zM961 455q0 -12 1 -46t1 -57q0 -197 -120.5 -303t-342.5 -106q-191 0 -299.5 72 -t-108.5 198q0 80 43 131t109 51q52 0 88.5 -36.5t36.5 -90.5q0 -49 -29 -80.5t-74 -31.5q-18 0 -37 9.5t-46 32.5q-2 -6 -2.5 -13t-0.5 -17q0 -80 81.5 -129t219.5 -49q156 0 222.5 75t66.5 259q0 7 -1 38t-1 54v616q0 145 51 215t195 156q-29 -38 -41 -85.5t-12 -139.5 -v-723z" /> - <glyph glyph-name="K" unicode="K" horiz-adv-x="1327" -d="M33 1214q32 110 96.5 172t146.5 62q42 0 123 -21.5t125 -21.5q25 0 47.5 5.5t50.5 18.5q-46 -101 -101.5 -147.5t-131.5 -46.5q-36 0 -110 16.5t-115 16.5q-53 0 -126 -50zM453 559q0 -137 -60.5 -218t-210.5 -155q44 49 62 114t18 196v134q-8 2 -14.5 2.5t-16.5 0.5 -q-54 0 -83 -19.5t-37 -60.5q-18 20 -25.5 43t-7.5 55q0 84 42.5 132t117.5 48q4 0 12 -1t12 -1q0 8 -1 23t-1 22q0 97 51 159.5t193 129.5q-28 -37 -39.5 -87.5t-11.5 -143.5v-373zM104 -51q62 128 194 210.5t273 82.5q79 0 149 -24.5t124 -70.5l30 33l19 -20 -q-58 -65 -107 -123.5t-81 -104.5q-50 47 -121 71t-158 24q-95 0 -171 -18.5t-151 -59.5zM485 305q36 34 52 80t16 115v49v495q0 140 61 223t197 130q-39 -46 -55.5 -98.5t-16.5 -155.5v-33v-375l342 711q34 -45 57 -60.5t52 -15.5q30 0 56 13.5t54 43.5 -q-7 -113 -70.5 -192.5t-142.5 -79.5q-21 0 -44.5 7t-51.5 22l-155 -316q51 -24 94.5 -94t85.5 -195q11 -32 31 -92q105 -315 192 -315q18 0 38.5 4.5t55.5 16.5q-54 -58 -96.5 -122.5t-75.5 -140.5q-69 8 -117.5 46t-74.5 104q-28 70 -91.5 288.5t-138.5 323.5v-24 -q0 -167 -54.5 -243.5t-199.5 -119.5z" /> - <glyph glyph-name="L" unicode="L" horiz-adv-x="1280" -d="M451 512q0 -137 -60 -217t-211 -154q45 50 63.5 117.5t18.5 198.5q0 22 -1 73.5t-1 81.5q-16 3 -21.5 3.5t-9.5 0.5q-53 0 -82 -19.5t-39 -61.5q-17 20 -24.5 43.5t-7.5 56.5q0 84 42.5 132t117.5 48q4 0 12 -1t12 -1q0 7 -1 21.5t-1 21.5q0 97 51 159t193 130 -q-28 -38 -39.5 -88t-11.5 -144v-401zM53 1184q32 110 97 172.5t147 62.5q41 0 122 -22.5t126 -22.5q24 0 46.5 5.5t51.5 19.5q-46 -101 -101.5 -147t-131.5 -46q-36 0 -110.5 16.5t-115.5 16.5q-50 0 -120 -48q-7 -5 -11 -7zM506 287q31 33 44 75.5t13 139.5v483 -q0 113 32 178t107 133q79 73 157 111.5t147 38.5q53 0 96.5 -19t87.5 -61l39 35l18 -19q-45 -40 -84.5 -87.5t-95.5 -133.5q-98 96 -141 124t-78 28q-54 0 -76 -32.5t-22 -113.5v-538q0 -162 -55.5 -237t-188.5 -105zM180 -63q76 136 254 224.5t383 88.5q63 0 125 -9 -t125 -28v481q-14 6 -21.5 18t-7.5 27q0 23 13 38.5t30 15.5q21 0 33 -14t12 -38q0 -15 -6.5 -25t-21.5 -20v-493l80 -35l36 41l23 -19q-49 -61 -91 -123t-79 -128q-111 54 -225.5 82t-227.5 28q-111 0 -217.5 -27.5t-216.5 -84.5z" /> - <glyph glyph-name="M" unicode="M" horiz-adv-x="1630" -d="M1077 136l9 5q99 67 153 95v391h-162v-491zM1077 813h162v375q-39 16 -65.5 34.5t-47.5 43.5l-49 -33v-420zM936 213q46 -26 73.5 -44t41.5 -32v1080q-32 -18 -60 -30.5t-55 -21.5v-952zM586 813h159v371q-35 7 -64 36t-46 72l-49 -22v-457zM174 258q37 21 54.5 65 -t17.5 119v185q-5 0 -15 -1t-16 -1q-42 0 -66 -23t-27 -65q-31 16 -47 45.5t-16 72.5q0 77 39.5 118.5t110.5 41.5q15 0 23 -0.5t13 -1.5l1 139q0 78 9.5 110t33.5 60q42 51 198 130q71 36 109 57l246 137q45 -94 91.5 -133t110.5 -39h7v172h26v-164q45 8 111.5 49.5 -t150.5 114.5q33 -73 68 -105t80 -32q14 0 29.5 5t35.5 17q-19 -47 -51 -82.5t-69 -52.5v-838q0 -102 33 -137t122 -35q-5 -7 -17 -24q-97 -136 -130 -211q-78 17 -129.5 81t-71.5 171q-115 -68 -192.5 -127t-139.5 -125q-65 63 -112.5 91t-89.5 28q-18 0 -36 -5t-36 -13 -q15 56 42 91t70 58v426h-159v-224q0 -204 -65.5 -326t-168.5 -122q-42 0 -129 31.5t-129 31.5q-32 0 -54 -13.5t-38 -42.5q3 98 63.5 167.5t143.5 69.5q43 0 115 -24.5t100 -24.5q72 0 100.5 60t28.5 265v780q-64 -26 -88.5 -61.5t-24.5 -103.5v-517q0 -165 -61.5 -237 -t-204.5 -78z" /> - <glyph glyph-name="N" unicode="N" horiz-adv-x="1219" -d="M1055 260v592q-34 -16 -73.5 -24.5t-82.5 -8.5q-36 0 -63.5 5t-53.5 16l14 -37q167 -453 259 -543zM313 518q53 23 100.5 34t90.5 11q40 0 87.5 -10t106.5 -31l-32 82q-223 566 -353 627v-713zM12 -51q34 119 100 186t173 88v379l-6 2q-23 6 -33 6q-36 0 -58 -20.5 -t-22 -54.5q0 -1 -2 -2.5t-2 -2.5q-21 24 -30 53t-9 70q0 69 31 109.5t82 40.5q8 0 18.5 -1t29.5 -3l1 440q-12 4 -22.5 6t-22.5 2q-65 0 -114.5 -49.5t-49.5 -120.5q-14 32 -20.5 61.5t-6.5 57.5q0 111 71 181.5t183 70.5q130 0 233 -123.5t234 -450.5q38 -12 73 -18t66 -6 -q39 0 75 9.5t71 29.5v287h-8q-53 0 -104.5 16.5t-111.5 52.5l-51 -43l-16 19q73 65 125.5 122.5t79.5 102.5q50 -39 91 -55.5t83 -16.5q44 0 81.5 15.5t71.5 48.5q0 -88 -57.5 -158.5t-155.5 -101.5v-1241q-80 10 -166 135.5t-204 408.5q-50 25 -99.5 36t-103.5 11 -q-59 0 -107 -11t-90 -34v-256h45q65 0 133 -22t119 -60l27 29l22 -18q-64 -68 -106 -121t-68 -98q-55 44 -114.5 67t-120.5 23q-55 0 -113 -19t-125 -59z" /> - <glyph glyph-name="O" unicode="O" horiz-adv-x="1421" -d="M870 940q29 -13 58.5 -19t66.5 -6q38 0 69.5 6.5t59.5 20.5q-25 112 -79 208.5t-134 174.5l-41 -27v-358zM870 905v-465q30 9 59.5 13t61.5 4q37 0 71 -7.5t66 -21.5q14 63 20.5 129.5t6.5 140.5q0 64 -6 115.5t-19 95.5q-32 -12 -64.5 -18t-66.5 -6q-36 0 -67.5 5 -t-61.5 15zM870 410v-375q97 41 158 130t94 236q-35 14 -68.5 20.5t-68.5 6.5q-30 0 -58.5 -4.5t-56.5 -13.5zM487 174q26 31 38 70t12 90v788l-91 -39v31q154 70 251.5 120t144.5 83v129l28 4v-115q36 19 78 47t90 66q158 -92 239 -248.5t81 -370.5q0 -147 -36.5 -287 -t-102.5 -251q-103 -169 -235 -250.5t-304 -81.5q-119 0 -222.5 43.5t-189.5 128.5q-108 108 -163.5 242.5t-55.5 288.5q0 245 125 464t322 318q-117 -128 -169.5 -306t-52.5 -456q0 -347 104.5 -515.5t317.5 -168.5q33 0 69.5 7t76.5 22v1253l-115 -59v-783 -q0 -125 -52.5 -180t-187.5 -84z" /> - <glyph glyph-name="P" unicode="P" horiz-adv-x="1233" -d="M614 932q32 -11 66.5 -17t71.5 -6q29 0 59.5 5.5t65.5 17.5v235q-32 19 -56.5 40t-46.5 48l-160 -108v-215zM614 467q34 9 64.5 13.5t58.5 4.5q40 0 74 -4.5t66 -13.5v434q-25 -10 -54 -14t-75 -4q-47 0 -76 4.5t-57 15.5zM614 264q68 -21 124 -57t106 -88l33 18v297 -q-38 11 -69 16t-60 5q-36 0 -69.5 -5.5t-64.5 -15.5v-170zM586 -356v1484l-99 -61v-1126q0 -135 23 -193.5t76 -103.5zM270 -410q12 73 18.5 138t6.5 112v235q-58 -1 -99.5 -39t-58.5 -106q-15 33 -21.5 61.5t-6.5 55.5q0 92 49 154t137 82v327q-10 1 -21 1.5t-28 0.5 -q-52 0 -74 -22t-22 -74q-22 29 -31.5 58.5t-9.5 64.5q0 79 37.5 117.5t113.5 38.5q14 0 21 -0.5t14 -1.5v284q0 85 -18.5 117.5t-65.5 32.5q-43 0 -71.5 -28.5t-53.5 -98.5q-17 32 -24 52.5t-7 37.5q0 114 64 183t170 69q96 0 148 -74.5t52 -212.5q0 -12 -0.5 -24.5 -t-1.5 -26.5l99 57v285h28v-262q107 70 188.5 133.5t147.5 128.5q39 -53 78 -79t82 -26q23 0 41.5 8t34.5 23v-4q0 -51 -29 -97.5t-86 -86.5v-881q0 -67 9.5 -113t29.5 -88q-17 1 -33 1.5t-30 0.5q-126 0 -210 -39.5t-147 -127.5l-76 61v-403q-33 6 -78 36.5t-114 94.5 -q-30 -41 -67 -74t-85 -62z" /> - <glyph glyph-name="Q" unicode="Q" horiz-adv-x="1421" -d="M868 940q28 -13 59 -19t68 -6q38 0 69.5 6.5t59.5 20.5q-25 112 -79 208.5t-134 174.5l-43 -27v-358zM868 905v-465q29 9 58.5 13t64.5 4t68 -7t69 -22q14 63 20.5 129.5t6.5 140.5q0 64 -6 115.5t-19 95.5q-32 -12 -64.5 -18t-66.5 -6q-35 0 -67.5 5t-63.5 15zM869 410 -l-1 -375q98 40 159.5 129t94.5 237q-33 14 -66.5 20.5t-70.5 6.5q-29 0 -58 -4.5t-58 -13.5zM487 174q25 33 36.5 67t13.5 89v792l-91 -39l1 31l20 9q269 120 373 194v129l28 4v-115q45 23 87 51t83 62q158 -92 239 -248.5t81 -370.5q0 -316 -149.5 -556t-374.5 -293 -q19 -32 50 -88q82 -148 160 -148q3 0 10 1t11 1q-31 -36 -67 -53t-80 -17q-91 0 -153 64t-118 219q-265 27 -431.5 220.5t-166.5 473.5q0 252 124.5 472t322.5 319q-117 -128 -169.5 -306t-52.5 -456q0 -320 86.5 -485.5t270.5 -198.5q-7 23 -26 41.5t-58 40.5q19 4 36 6 -t31 2q56 0 106 -20.5t81 -55.5l39 15v1253l-113 -59v-775q0 -135 -52.5 -189.5t-187.5 -82.5z" /> - <glyph glyph-name="R" unicode="R" horiz-adv-x="1305" -d="M754 680q115 63 165 139.5t50 188.5q0 115 -44 211t-73 96q-46 0 -72 -56t-26 -157v-422zM139 -55q77 147 189 221t260 74q91 0 168.5 -23.5t138.5 -69.5l51 52q-24 184 -61 311t-78 168l-53 -25q1 -3 1.5 -6.5t0.5 -9.5t-1 -12.5l-1 -6.5q0 -151 -54 -217t-206 -108 -q43 35 60 80t17 159v510q0 91 25 134.5t98 91.5q101 65 198 119.5t103 54.5q50 0 99 -82t49 -189q0 -137 -70.5 -256.5t-195.5 -191.5q100 -15 152 -80.5t75 -208.5q24 -148 56.5 -207t86.5 -59q5 0 12.5 1.5t16.5 4.5q-41 -68 -66.5 -126t-33.5 -105q-90 10 -147.5 69.5 -t-76.5 159.5q-54 -48 -185 -225l-3 -4q-64 52 -144.5 79t-175.5 27q-71 0 -148.5 -26.5t-156.5 -77.5zM88 1190q16 108 89.5 182t160.5 74q37 0 98 -32t103 -32q36 0 66.5 13.5t66.5 46.5q-21 -94 -97.5 -167t-148.5 -73q-28 0 -97 21.5t-108 21.5q-32 0 -64.5 -13.5 -t-68.5 -41.5zM461 498q0 -118 -49.5 -175.5t-186.5 -138.5q28 37 41 77.5t13 107.5v41l-1 225q-15 1 -29.5 1.5t-31.5 0.5q-50 0 -72.5 -19t-26.5 -62q-16 25 -24 57.5t-8 74.5q0 79 33.5 112.5t120.5 33.5q8 0 18 -1t21 -2v62q0 101 49.5 158t197.5 120q-38 -49 -51.5 -91 -t-13.5 -97v-485z" /> - <glyph glyph-name="S" unicode="S" horiz-adv-x="1374" -d="M807 1028l63 90q-41 120 -115.5 186t-166.5 66q-95 0 -159 -49.5t-64 -118.5q0 -76 107.5 -118.5t334.5 -55.5zM16 0q78 128 231.5 206.5t325.5 78.5q100 0 182.5 -26.5t149.5 -80.5q173 186 219.5 264.5t46.5 149.5q0 113 -100 167.5t-360 78.5l-52 -88 -q221 -12 306.5 -58t85.5 -145q0 -62 -29 -113t-84 -88q5 19 7.5 34t2.5 28q0 68 -81 101.5t-316 53.5q-65 -126 -130 -188t-132 -62q-51 0 -85 34.5t-34 84.5q0 47 26.5 77t67.5 30q35 0 57.5 -26t22.5 -67q0 -20 -7.5 -39.5t-23.5 -39.5q3 -1 7 -1.5t8 -0.5q43 0 92 52 -t98 150q-215 17 -303 69.5t-88 160.5q0 48 17.5 89.5t54.5 82.5v-8q0 -92 92.5 -137.5t339.5 -67.5l47 88q-231 16 -327.5 71.5t-96.5 167.5q0 152 129 259.5t322 107.5q125 0 216 -36.5t140 -104.5l59 39l13 -29q-86 -59 -160 -132.5t-133 -160.5q252 -13 362.5 -84 -t110.5 -219q0 -86 -44 -171.5t-167 -221.5q-24 -27 -76 -83q-164 -178 -244 -294q-101 84 -201.5 121t-230.5 37q-82 0 -164 -27t-170 -84z" /> - <glyph glyph-name="T" unicode="T" horiz-adv-x="1186" -d="M543 258q24 25 35.5 66t11.5 100v524l-72 -39v41q64 32 130 73.5t136 92.5v-536q0 -120 -52 -190t-189 -132zM90 1147q20 157 100 227t244 70q107 0 301 -26.5t281 -26.5q72 0 120 7.5t87 24.5q-31 -71 -82.5 -123.5t-122.5 -82.5v-910q31 30 64 68t65 82 -q-44 -235 -190 -372.5t-349 -137.5q-224 0 -368 151.5t-144 390.5q0 205 85 375.5t241 280.5q-81 -127 -116.5 -242t-35.5 -241q0 -223 103 -357.5t270 -134.5q81 0 169 29.5t175 85.5v923q-42 -11 -77 -16.5t-64 -5.5q-50 0 -237.5 21.5t-321.5 21.5q-78 0 -125 -19.5 -t-72 -62.5z" /> - <glyph glyph-name="U" unicode="U" horiz-adv-x="1233" -d="M647 932q21 -13 43 -19t49 -6q25 0 47.5 4t44.5 13v256q-20 6 -38 22.5t-41 50.5l-105 -77v-244zM647 612q27 7 50.5 10t45.5 3q25 0 46.5 -4t41.5 -13v283q-19 -8 -38 -11t-48 -3q-28 0 -51.5 3.5t-46.5 12.5v-281zM666 133l165 109v333q-18 11 -39.5 16t-50.5 5 -q-26 0 -49 -4.5t-45 -13.5v-426zM72 10q26 91 85 149t150 83v405q-12 7 -24 10.5t-23 4.5q-46 0 -68 -20t-32 -73q-17 27 -25 57t-8 68q0 81 38.5 121.5t115.5 40.5q3 0 12 -1t14 -1v221q0 84 -33.5 123t-105.5 39q-56 0 -98.5 -32t-71.5 -97q0 4 -1 13q-3 39 -3 55 -q0 120 72.5 197t185.5 77q122 0 184 -79t62 -234v-906q25 -6 53.5 -19.5t66.5 -37.5v1272h29v-234l289 238q27 -67 61.5 -103t71.5 -36q18 0 37 7.5t41 24.5q-11 -61 -44 -104.5t-81 -58.5v-828q0 -89 26 -132.5t80 -43.5q14 0 31 3t37 9q-51 -59 -92.5 -120.5t-77.5 -128.5 -q-77 22 -124 86t-71 178q-123 -78 -199 -137t-134 -121q-50 54 -122 84t-151 30q-40 0 -76.5 -11.5t-76.5 -37.5z" /> - <glyph glyph-name="V" unicode="V" horiz-adv-x="1186" -d="M608 954q26 -21 54 -30t71 -9q32 0 59.5 8.5t51.5 24.5v236q-25 8 -49.5 24.5t-51.5 42.5l-135 -73v-224zM608 537q27 15 53.5 22.5t55.5 7.5q27 0 57 -7t70 -23v378q-32 -15 -62 -22.5t-61 -7.5q-27 0 -54.5 8.5t-58.5 26.5v-383zM608 141l68 -18q39 13 80 23.5t88 19.5 -v338q-30 17 -61 25t-68 8q-33 0 -58.5 -8.5t-48.5 -26.5v-361zM471 213l109 -53v997l-109 -55v-889zM80 29q26 68 75 115t124 75v842q0 110 -33.5 150t-108.5 40q-47 0 -91 -30.5t-79 -87.5q-3 14 -4.5 27.5t-1.5 21.5q0 109 77.5 188.5t186.5 79.5q107 0 176.5 -80 -t69.5 -209v-18l109 53v252h28v-236q78 37 165 98.5t171 139.5q31 -76 69.5 -114t84.5 -38q15 0 33 6.5t42 20.5q-11 -50 -43.5 -82t-99.5 -57v-871q0 -60 11 -107t32 -79q-34 6 -68 9t-69 3q-131 0 -256 -51.5t-223 -146.5q-44 55 -106.5 85.5t-133.5 30.5q-30 0 -63 -7 -t-74 -23z" /> - <glyph glyph-name="W" unicode="W" horiz-adv-x="1612" -d="M1102 934q23 -13 42 -19t40 -6q23 0 42 4t36 13v243q-35 20 -64 46.5t-49 58.5l-47 -29v-311zM1102 559q22 8 42 12t38 4q23 0 42 -3.5t38 -12.5v338q-19 -7 -36.5 -10.5t-35.5 -3.5q-24 0 -45 4.5t-43 15.5v-344zM1102 139q42 24 81 42t79 32v317q-21 9 -38 13t-34 4 -q-19 0 -41 -4.5t-47 -14.5v-389zM1073 141v1092l-115 -51v-987zM606 934q23 -12 44.5 -18.5t41.5 -6.5q22 0 41 4t37 13v243q-32 17 -62 44t-53 61l-49 -29v-311zM606 559q25 8 45.5 12t36.5 4q20 0 40 -4t42 -12v338q-24 -8 -40.5 -11t-31.5 -3q-25 0 -48 5t-44 15v-344z -M606 139q41 23 81.5 41t82.5 33v317q-20 9 -38 13t-36 4q-16 0 -35.5 -4t-54.5 -15v-389zM578 141v1092l-111 -51v-987zM70 16q32 76 83.5 124t125.5 71v412q-21 8 -38 12t-32 4q-36 0 -59.5 -18t-40.5 -60q-13 30 -19 56t-6 51q0 69 36.5 114t92.5 45q12 0 28.5 -2t37.5 -6 -v252q0 92 -29.5 135t-91.5 43q-48 0 -82 -32.5t-56 -98.5v13q-4 44 -4 59q0 114 65 186t167 72q97 0 153.5 -61t65.5 -174l111 53v188h28v-172q78 36 228 150q20 14 30 22q25 -86 75.5 -132t121.5 -46h12v178h29v-168q51 21 109 58.5t145 109.5q36 -76 69.5 -108.5 -t73.5 -32.5q14 0 29 7t34 23q-3 -46 -27.5 -80.5t-76.5 -64.5v-915q0 -44 9.5 -84.5t29.5 -79.5l-6 1q-96 11 -141 11q-106 0 -202 -43t-206 -139q-66 95 -122.5 137.5t-114.5 42.5q-57 0 -123.5 -44.5t-147.5 -135.5q-68 54 -125.5 80t-107.5 26q-33 0 -65.5 -9.5 -t-65.5 -29.5z" /> - <glyph glyph-name="X" unicode="X" horiz-adv-x="1233" -d="M-10 -61v20q0 120 76 200.5t188 80.5q22 0 46.5 -7.5t51.5 -21.5l199 473h-152q-38 0 -80.5 -5.5t-113.5 -21.5q34 39 56.5 89t31.5 106q18 -15 37 -22t49 -7h12h121q-88 224 -158 311t-155 87q-51 0 -86 -30t-58 -93q-9 30 -13.5 55t-4.5 47q0 108 65.5 177t169.5 69 -q112 0 203.5 -108t196.5 -369l200 477q33 -34 73.5 -52t84.5 -18q35 0 68 17t69 53q-16 -137 -81.5 -213t-165.5 -76q-25 0 -49.5 5t-51.5 16l-119 -281l27 -74h225q23 0 51.5 5t59.5 14q-47 -49 -73.5 -92t-41.5 -93q-14 14 -33.5 20.5t-50.5 6.5h-89l5 -14 -q199 -502 336 -502q26 0 95 18h1v-1q-135 -187 -157 -246h-2q-132 0 -220 115t-241 581l-297 -701q-33 42 -69 59t-95 17q-41 0 -70.5 -14t-70.5 -57z" /> - <glyph glyph-name="Y" unicode="Y" horiz-adv-x="1186" -d="M586 883q31 -21 60.5 -30t62.5 -9q28 0 55 9t53 28v272q-40 15 -68.5 37.5t-54.5 58.5l-108 -90v-276zM586 475q35 12 62.5 18.5t47.5 6.5q28 0 58.5 -7t62.5 -20v373q-33 -16 -60 -23.5t-50 -7.5q-22 0 -48 7t-73 28v-375zM586 25q13 -3 24.5 -5t20.5 -2 -q91 0 138.5 50.5t47.5 146.5v221q-32 18 -61.5 26.5t-59.5 8.5t-57.5 -8.5t-52.5 -26.5v-411zM557 35v1102l-115 -76v-746q0 -134 26 -191t89 -89zM752 -385l6 26q14 -5 26 -7.5t23 -2.5q46 0 80.5 31t34.5 70q0 24 -18.5 39.5t-49.5 15.5q-25 0 -70 -22.5t-90 -59.5l-6 -5 -q-121 -99 -203 -99q-80 0 -131 52.5t-51 133.5q0 70 46.5 115t158.5 82q-147 21 -201.5 78.5t-54.5 240.5v362q-14 3 -24.5 4t-20.5 1q-43 0 -68 -21.5t-39 -70.5q-15 33 -21.5 62t-6.5 58q0 82 35.5 124t105.5 42q12 0 21 -0.5t18 -0.5v237q0 74 -23.5 111.5t-70.5 37.5 -q-37 0 -64 -31t-39 -88q-8 36 -11 55.5t-3 35.5q0 94 60 159.5t151 65.5q98 0 144 -76.5t46 -239.5v-32l115 76v272h29v-250q67 53 135.5 116.5t136.5 137.5q25 -74 62.5 -110.5t89.5 -36.5q28 0 50.5 10t43.5 33v-11q0 -45 -24 -85t-74 -79v-911q0 -127 -64.5 -185.5 -t-265.5 -92.5q-191 -33 -257.5 -67.5t-66.5 -90.5q0 -29 22 -48.5t56 -19.5q42 0 165 85t202 85q68 0 117 -49t49 -119q0 -65 -45.5 -111t-110.5 -46q-15 0 -44 10q-8 3 -11 4z" /> - <glyph glyph-name="Z" unicode="Z" horiz-adv-x="1042" -d="M825 807q26 0 55.5 5t63.5 15q-45 -46 -71 -89.5t-42 -94.5q-14 15 -36.5 22t-63.5 7h-92q-72 -181 -210.5 -344t-381.5 -346q19 10 55 30q372 205 553 205q62 0 128 -15t137 -44l41 45l26 -23q-60 -61 -108.5 -122.5t-79.5 -116.5q-73 42 -164.5 64t-198.5 22 -q-95 0 -204 -21.5t-228 -62.5l-12 24q118 65 343 543q49 105 77 162h-105q-45 0 -142 -20l-5 -1q32 38 53 83.5t31 96.5q30 -12 56 -18t46 -6h131q99 259 425 539l42 36q-47 -24 -134 -74q-282 -161 -460 -161q-60 0 -113.5 17t-111.5 55l-43 -45l-21 22q70 76 117 139 -t74 117q35 -61 122.5 -93t221.5 -32q124 0 225.5 29.5t190.5 91.5l16 -27q-142 -110 -332 -609l-1 -5h130z" /> - <glyph glyph-name="bracketleft" unicode="[" horiz-adv-x="639" -d="M596 -233v-41h-403v1720h403v-45h-264v-1634h264z" /> - <glyph glyph-name="backslash" unicode="\" horiz-adv-x="635" -d="M561 -190l-530 1636h80l530 -1636h-80z" /> - <glyph glyph-name="bracketright" unicode="]" horiz-adv-x="639" -d="M449 -274h-404v41h262v1634h-262v45h404v-1720z" /> - <glyph glyph-name="asciicircum" unicode="^" horiz-adv-x="2048" -d="M926 1462h194l512 -565h-98l-512 420l-514 -420h-96z" /> - <glyph glyph-name="underscore" unicode="_" horiz-adv-x="1024" -d="M0 -340h1024v-143h-1024v143z" /> - <glyph glyph-name="grave" unicode="`" horiz-adv-x="1024" -d="M324 1350q68 -113 161.5 -166.5t223.5 -53.5h22q-38 -25 -81.5 -37t-96.5 -12q-105 0 -191 49.5t-141 141.5l-28 -12l-7 16q56 27 86 43t52 31z" /> - <glyph glyph-name="a" unicode="a" horiz-adv-x="868" -d="M528 188v541q-26 13 -45.5 33t-38.5 53q-48 -23 -89 -35t-74 -12q-30 0 -60 10t-67 33l299 -381l-27 -20l-123 157q-33 -47 -48 -91.5t-15 -94.5q0 -95 59 -160t166 -86zM537 154l-197 -183q-127 42 -199.5 123.5t-72.5 179.5q0 95 56.5 179.5t158.5 140.5l-213 270h4 -q48 0 101.5 34.5t111.5 102.5q23 -82 55 -123.5t74 -41.5q45 0 95.5 40.5t112.5 128.5q4 -59 35.5 -95t79.5 -36q9 0 24.5 4t32.5 11q-6 -29 -26.5 -54.5t-60.5 -54.5v-465q0 -84 29 -121.5t93 -37.5h21l-152 -189q-67 30 -105.5 73t-57.5 114z" /> - <glyph glyph-name="b" unicode="b" -d="M342 231q52 -19 88.5 -49t61.5 -73q33 10 65 19t61 15v600q-46 17 -77.5 39t-55.5 56q-39 -28 -138 -66l-5 -2v-539zM49 66q8 48 34.5 85t76.5 68v897q0 85 -14 125t-47 73q6 0 13.5 -0.5t16.5 -0.5q38 0 122 37.5t150 93.5q-31 -64 -45 -129.5t-14 -186.5v-325 -q75 31 160.5 82.5t179.5 122.5q26 -67 65.5 -102.5t88.5 -35.5q9 0 34 6q7 2 11 3q-12 -31 -31.5 -55t-48.5 -46v-475q0 -50 10 -96t33 -101q-53 8 -79 10.5t-46 2.5q-114 0 -212 -38t-198 -120q-43 53 -94.5 82t-103.5 29q-14 0 -29 -1.5t-33 -4.5z" /> - <glyph glyph-name="c" unicode="c" horiz-adv-x="735" -d="M338 222q76 -5 145 -29t117 -62l57 47l21 -24l-223 -199q-80 60 -150 88.5t-139 28.5q-29 0 -57 -6t-58 -19q0 52 26 90.5t77 63.5v491q0 65 -12.5 101t-40.5 69q13 -1 27.5 -1.5t41.5 -0.5q98 0 201.5 38.5t160.5 96.5q32 -52 72.5 -80t83.5 -28q13 0 39 3q4 1 6 1 -q-42 -65 -91.5 -98t-102.5 -33q-59 0 -101 28.5t-57 79.5l-43 -14v-632z" /> - <glyph glyph-name="d" unicode="d" -d="M347 211q51 -15 88.5 -41t59.5 -59q24 10 52.5 18t63.5 14v607l-116 122q-40 -29 -78 -48t-70 -25v-588zM61 58q5 39 29.5 70t78.5 65v446q0 77 -12.5 108.5t-42.5 57.5q15 -1 29 -1.5t30 -0.5q97 0 166.5 21.5t136.5 70.5l-203 227q-53 60 -103 104t-99 74 -q98 4 167 28.5t109 70.5v-29q0 -32 16.5 -63t65.5 -84l312 -335q2 -2 8 -9q42 -47 88 -58q-24 -28 -34.5 -58.5t-10.5 -74.5v-428q0 -58 9 -90.5t29 -65.5q-4 1 -12 2q-73 11 -102 11q-123 0 -219 -38t-162 -112q-55 56 -103 83.5t-92 27.5q-16 0 -35 -5t-44 -15z" /> - <glyph glyph-name="e" unicode="e" horiz-adv-x="786" -d="M401 872l-61 -16v-461l244 164zM55 49q0 55 26.5 94t78.5 60v487q0 56 -14 97t-44 75h70q112 0 223.5 40.5t175.5 103.5q30 -98 82 -189t121 -166l-434 -295v-134q81 -10 147.5 -33t114.5 -58l57 45l19 -24l-223 -197q-63 55 -139.5 85t-155.5 30q-28 0 -53.5 -5 -t-51.5 -16z" /> - <glyph glyph-name="f" unicode="f" horiz-adv-x="664" -d="M92 53q12 37 39.5 72t77.5 78v614h-152v90h152v51q0 59 -14 105t-39 74h16q105 0 209.5 56.5t200.5 166.5q37 -71 65 -99t60 -28q20 0 39 7.5t45 25.5q-24 -75 -80.5 -121.5t-122.5 -46.5q-45 0 -85.5 21.5t-74.5 62.5l-39 -23v-252q7 0 26.5 1t33.5 1q45 0 80 3t65 10 -l-27 -107q-14 2 -31.5 3t-56.5 1q-35 0 -54 -0.5t-36 -1.5v-602q29 -8 58.5 -26.5t76.5 -59.5l64 37l16 -25q-51 -27 -102 -66.5t-125 -111.5q-55 57 -106.5 86t-96.5 29q-20 0 -40 -6t-42 -19z" /> - <glyph glyph-name="g" unicode="g" -d="M606 262v483q-46 12 -82 40t-69 77q-38 -14 -68.5 -22t-56.5 -11v-557q41 -19 73 -46.5t58 -65.5q13 9 61.5 45.5t83.5 56.5zM786 203q52 -27 77.5 -63t25.5 -83q0 -51 -33 -97t-141 -126l-252 -186q-36 43 -85 64.5t-114 21.5q-25 0 -56 -5.5t-71 -17.5q65 91 128 129.5 -t145 38.5q54 0 102.5 -18t93.5 -56q66 36 96.5 73t30.5 81q0 71 -88 133q-9 6 -13 9q-13 9 -19.5 32t-6.5 66v22q-83 -57 -159.5 -114.5t-143.5 -112.5q-47 56 -98.5 85.5t-104.5 29.5q-9 0 -22.5 -2l-40.5 -6q8 49 34.5 86.5t75.5 68.5v426q0 59 -10.5 96.5t-33.5 75.5 -q15 -1 33.5 -1.5t51.5 -0.5q135 0 257 39.5t225 116.5q25 -67 65 -102.5t88 -35.5q10 0 34 6q8 2 11 3q-12 -33 -32 -57.5t-50 -43.5v-575z" /> - <glyph glyph-name="h" unicode="h" horiz-adv-x="948" -d="M51 70q5 48 33 81.5t81 57.5v917q0 79 -13.5 115.5t-46.5 69.5q79 24 148.5 63t142.5 101q-30 -84 -43.5 -177t-13.5 -239v-307l303 252q37 -65 76 -96t84 -31q19 0 37 6t40 20q-5 -44 -25 -76.5t-60 -62.5v-526q0 -59 8.5 -97t27.5 -75q-30 8 -56.5 12t-51.5 4 -q-53 0 -92 -27t-39 -61q0 -29 59.5 -98.5t59.5 -135.5q0 -67 -42 -112t-107 -49q29 25 44 60.5t15 82.5q0 66 -29 148.5t-29 97.5q0 29 27.5 68t27.5 79v600q-31 8 -59 29.5t-67 71.5l-152 -125v-502q40 -17 77 -40t70 -52q-67 -32 -119 -68.5t-92 -79.5q-28 52 -76 83.5 -t-96 31.5q-8 0 -20 -3t-32 -11z" /> - <glyph glyph-name="i" unicode="i" horiz-adv-x="508" -d="M131 1163l-41 -26l-14 24q92 66 125 94.5t49 51.5q21 -51 48.5 -73t70.5 -22q4 0 12 1t12 1q-16 -53 -57.5 -85.5t-91.5 -32.5q-28 0 -57 17t-56 50zM317 -20q-90 24 -126.5 97t-36.5 253v413q-25 13 -44 28.5t-36 37.5l-51 -31l-15 23q66 41 128 89.5t116 102.5 -q22 -49 55.5 -75.5t73.5 -26.5q7 0 18.5 4t38.5 16q-2 -49 -27.5 -85.5t-76.5 -63.5v-424q0 -103 32 -139t115 -39q-56 -47 -97.5 -92.5t-66.5 -87.5z" /> - <glyph glyph-name="j" unicode="j" horiz-adv-x="508" -d="M156 743q-24 11 -43.5 26.5t-38.5 39.5l-51 -31l-15 23q66 41 128 89.5t116 102.5q22 -49 55.5 -75.5t73.5 -26.5q7 0 18.5 4t38.5 16q-1 -48 -27.5 -85.5t-78.5 -63.5v-586q62 -51 93.5 -107.5t31.5 -115.5q0 -104 -161 -207q-31 -20 -47 -31q-47 -32 -69 -63t-27 -69 -q-9 12 -13.5 23.5t-4.5 22.5q0 42 74 132.5t74 150.5q0 61 -81 137q-14 13 -20 19q-14 14 -20 30.5t-6 46.5v15v583zM131 1163l-41 -26l-14 24q92 66 125 94.5t49 51.5q21 -51 48.5 -73t70.5 -22q4 0 12 1t12 1q-24 -58 -60.5 -88t-82.5 -30q-30 0 -58.5 16t-60.5 51z" /> - <glyph glyph-name="k" unicode="k" horiz-adv-x="899" -d="M349 758l305 229q27 -87 65 -156t81 -108l-211 -160q37 -30 61.5 -75t44.5 -130q28 -112 66 -167.5t86 -55.5q10 0 21 4.5t23 13.5l17 -22q-64 -46 -112.5 -94.5t-73.5 -91.5q-66 19 -104 79.5t-64 190.5q-20 100 -43.5 155t-58.5 85l-103 -84v-183q38 -16 68 -37.5 -t55 -50.5q-47 -23 -91.5 -56t-96.5 -83q-57 61 -100.5 84t-94.5 23q-11 0 -17 -0.5t-11 -1.5q10 40 37 70.5t71 51.5v942q0 73 -14 111.5t-47 73.5q6 -1 13.5 -1.5t16.5 -0.5q38 0 121 37.5t150 93.5q-30 -64 -45 -127t-15 -125v-434zM349 414l289 225q-32 50 -60 103 -t-51 108l-178 -129v-307z" /> - <glyph glyph-name="l" unicode="l" horiz-adv-x="502" -d="M47 51q11 44 39.5 75.5t75.5 51.5v924q0 80 -15.5 118.5t-54.5 73.5q83 9 156.5 46t152.5 112l15 -14q-41 -46 -57.5 -105t-16.5 -211v-901q44 -16 74.5 -40t54.5 -60l51 37l17 -27q-79 -57 -135 -107t-74 -79q-26 52 -79.5 85t-111.5 33q-19 0 -43 -3t-49 -9z" /> - <glyph glyph-name="m" unicode="m" horiz-adv-x="1327" -d="M268 -37q-40 65 -94.5 96.5t-138.5 38.5q12 28 39 50t82 49v462q0 77 -28 104.5t-112 35.5q68 41 118 90t85 108q62 -31 89.5 -95t27.5 -185l321 280q53 -33 79 -95t26 -154v-31l319 280q14 -61 48.5 -95t84.5 -34q13 0 24.5 2t22.5 6q-17 -42 -38.5 -70.5t-51.5 -49.5 -v-465q0 -67 38 -101.5t111 -36.5q-54 -45 -95.5 -92t-71.5 -98q-92 25 -127 84t-35 246v430q-27 13 -51 29.5t-45 38.5l-133 -109v-483q37 -13 67 -35.5t60 -61.5q-54 -26 -101.5 -63.5t-89.5 -85.5q-29 65 -84 101.5t-139 43.5q16 27 41 50t66 47v458q0 64 -18.5 103.5 -t-57.5 62.5l-170 -137v-481q20 -9 43 -22t55 -34q-46 -35 -89.5 -83t-76.5 -99z" /> - <glyph glyph-name="n" unicode="n" horiz-adv-x="948" -d="M297 -31q-40 64 -100.5 100.5t-124.5 36.5h-20t-15 -1q20 34 50 60t73 46v442q0 88 -28 116.5t-112 37.5q73 46 121 94t82 109q63 -36 90 -103t27 -192v-19l367 305q23 -64 56.5 -94t80.5 -30q5 0 12 1t20 4q-11 -33 -31.5 -58.5t-53.5 -47.5v-465q0 -79 35 -114.5 -t114 -38.5q-47 -41 -89 -88.5t-79 -100.5q-91 24 -126.5 79t-35.5 194v501q-22 13 -42 31t-40 41l-188 -162v-440q55 -18 86 -39.5t53 -54.5q-57 -26 -101 -62.5t-81 -87.5z" /> - <glyph glyph-name="o" unicode="o" -d="M342 233q52 -19 88.5 -49t61.5 -73q21 7 49.5 14t78.5 18l1 602q-45 10 -81 37.5t-73 79.5q-12 -3 -35 -10q-60 -17 -90 -23v-596zM49 66q8 48 34.5 85t76.5 68v467q0 51 -10.5 89.5t-34.5 78.5q15 -1 33.5 -1.5t50.5 -0.5q135 0 257.5 39.5t225.5 116.5 -q26 -67 65.5 -102.5t88.5 -35.5q9 0 34 6q7 2 11 3q-13 -33 -32 -57t-48 -44v-446q0 -68 10 -121t33 -105q-53 8 -79 10.5t-46 2.5q-114 0 -212 -38t-198 -120q-43 53 -94.5 82t-103.5 29q-14 0 -29 -1.5t-33 -4.5z" /> - <glyph glyph-name="p" unicode="p" horiz-adv-x="948" -d="M182 659q0 68 -32.5 101t-108.5 43q79 55 126 102.5t79 102.5q58 -39 86 -102.5t28 -155.5v-29l347 289q24 -63 64 -98t87 -35q10 0 34 5q8 2 11 3q-12 -32 -31 -56.5t-49 -44.5v-440q0 -64 10.5 -120.5t32.5 -110.5l-48 3t-27 1q-83 0 -184.5 -37.5t-151.5 -89.5 -q-19 27 -41.5 45t-53.5 28v-188q0 -68 8.5 -111t26.5 -65q-71 -10 -157 -54t-113 -48q29 38 43 96.5t14 140.5v281h-22q-44 0 -80 -28.5t-64 -83.5q-1 4 -1.5 8.5t-0.5 15.5q0 64 47.5 126t120.5 93v413zM360 260q73 -17 128.5 -56t91.5 -98l61 25v614q-24 12 -46 31.5 -t-48 50.5l-187 -151v-416z" /> - <glyph glyph-name="q" unicode="q" -d="M623 219v526q-46 12 -82 40t-70 77q-25 -8 -55 -16t-70 -17v-587q49 -20 79.5 -46.5t49.5 -64.5zM305 -33q-38 55 -88 84t-106 29q-22 0 -33.5 -0.5t-23.5 -1.5l-1 4q0 44 30.5 82t82.5 59v457q0 54 -11 93.5t-36 80.5q16 -1 34.5 -1.5t49.5 -0.5q135 0 257.5 39.5 -t225.5 116.5q26 -67 65 -102.5t87 -35.5q9 0 34 6q7 2 11 3q-13 -34 -32 -58t-48 -43v-942q0 -67 15 -127.5t44 -111.5q-35 12 -97 40q-115 52 -175 52h-15q27 23 37.5 77.5t10.5 196.5v215q-93 -48 -170.5 -99.5t-147.5 -111.5z" /> - <glyph glyph-name="r" unicode="r" horiz-adv-x="664" -d="M296 -31q-40 64 -100.5 100.5t-124.5 36.5h-20t-15 -1q20 34 50 60t73 46v440q0 90 -27.5 119t-111.5 37q64 37 114.5 87.5t87.5 115.5q61 -39 89 -97.5t28 -150.5l184 248q24 -64 47 -89.5t56 -25.5q15 0 30.5 6t32.5 19q-8 -80 -50.5 -130.5t-96.5 -50.5 -q-37 0 -69.5 18.5t-59.5 55.5l-74 -100v-500q41 -14 70 -30t49 -36l37 27l20 -20q-76 -50 -131 -96t-88 -89z" /> - <glyph glyph-name="s" unicode="s" horiz-adv-x="887" -d="M385 487q53 59 146 155q169 174 186 239q-40 -45 -80.5 -67.5t-79.5 -22.5q-40 0 -74.5 24t-58.5 70l-88 -23v-375h49zM123 145q43 32 95.5 51t94.5 19q48 0 90 -24t86 -76l84 18v379h-100q-72 -81 -197.5 -199.5t-152.5 -167.5zM65 -31h-24q0 4 1 13t1 14q0 71 56.5 160 -t203.5 239h-186q21 33 30 65t9 79v245q0 27 -10.5 52t-30.5 47q10 -1 44.5 -3.5t55.5 -2.5q103 0 192 30.5t166 91.5q28 -35 56 -52t57 -17q30 0 47 17.5t21 51.5h32q-12 -86 -54.5 -166t-170.5 -229h227q-17 -15 -25.5 -48t-8.5 -87v-233q0 -59 8.5 -93t28.5 -67 -q-39 12 -77.5 18t-78.5 6q-95 0 -170.5 -33t-138.5 -102q-52 62 -88 86.5t-74 24.5q-41 0 -67.5 -28.5t-31.5 -78.5z" /> - <glyph glyph-name="t" unicode="t" horiz-adv-x="616" -d="M98 51q11 43 38.5 73.5t76.5 53.5v649h-18q-49 0 -84.5 -8t-59.5 -24q2 13 4 34q4 32 4 41q0 13 -1.5 30t-5.5 54q27 -12 59.5 -18t70.5 -6h31v37q0 69 -15.5 109.5t-54.5 74.5q82 8 155 45.5t155 114.5l14 -15q-41 -45 -57.5 -108t-16.5 -195v-63h31q38 0 70.5 6 -t58.5 18q-1 -4 -2 -12q-6 -48 -6 -68q0 -18 5 -58l3 -21q-25 16 -60.5 24t-82.5 8h-17v-606q41 -13 72 -37t57 -63l51 37l17 -27q-79 -57 -135 -107t-74 -79q-26 52 -79 85t-112 33q-19 0 -43 -3t-49 -9z" /> - <glyph glyph-name="u" unicode="u" horiz-adv-x="948" -d="M678 1006q32 -59 95 -96.5t130 -37.5h10q-22 -37 -51 -62.5t-71 -45.5v-459q0 -72 27.5 -99.5t111.5 -35.5q-70 -41 -119.5 -90.5t-83.5 -112.5q-61 37 -88 100t-29 176l-293 -263q-27 56 -78 92.5t-102 36.5q-11 0 -24.5 -3t-38.5 -12q10 34 31 59.5t55 47.5v452 -q0 91 -33.5 126.5t-116.5 39.5q61 51 104 99.5t64 91.5q92 -24 127 -85t35 -241v-451q25 -13 50 -36.5t56 -61.5l164 139v488q-40 15 -59.5 25t-32.5 22l-39 -29l-14 25q76 50 127 98.5t86 102.5z" /> - <glyph glyph-name="v" unicode="v" horiz-adv-x="907" -d="M319 -31q-77 41 -107 93t-30 174v382q0 96 -20.5 148.5t-63.5 64.5l-67 -45l-15 25l9 6q164 109 237 174q53 -38 76.5 -108.5t23.5 -190.5v-366q0 -120 25 -159.5t89 -59.5q7 2 25 8q66 22 95 30v598q-24 17 -44.5 38t-37.5 48l-65 -49l-17 29q85 62 140.5 104t99.5 78 -q26 -72 68 -113.5t87 -41.5q10 0 22 3t30 11q-18 -43 -42 -70.5t-61 -46.5v-440q0 -51 10 -94.5t31 -83.5q-27 4 -55.5 6t-56.5 2q-102 0 -202.5 -40t-183.5 -114z" /> - <glyph glyph-name="w" unicode="w" horiz-adv-x="1305" -d="M722 -14q-70 35 -102.5 83t-32.5 117v21l-248 -227q-28 56 -79 92.5t-101 36.5q-11 0 -25 -3t-39 -12q11 36 32 61.5t56 45.5v434q0 96 -20.5 148.5t-63.5 64.5l-67 -47l-14 27l8 5q164 109 237 177q53 -40 77 -111.5t24 -191.5v-474q21 -12 45 -34t59 -64l117 103v397 -q0 94 -21.5 147.5t-64.5 65.5l-68 -47l-12 26l8 6q164 109 238 177q52 -40 76 -111.5t24 -191.5v-377q0 -110 24 -148t87 -59q29 10 59.5 19t60.5 18v600q-25 17 -45 37.5t-37 46.5l-65 -49l-14 28q85 62 140.5 104.5t98.5 78.5q27 -73 68 -114.5t86 -41.5q10 0 21.5 3 -t29.5 11q-17 -42 -40.5 -68.5t-61.5 -45.5v-441q0 -51 10 -95.5t30 -83.5q-35 4 -61.5 6.5t-48.5 2.5q-102 0 -202 -40t-183 -113z" /> - <glyph glyph-name="x" unicode="x" horiz-adv-x="854" -d="M10 -10q30 119 85 186.5t122 67.5q20 0 41.5 -9.5t46.5 -29.5l78 205l-18 45h-58q-41 0 -72.5 -2.5t-58.5 -7.5q9 24 13.5 47t5.5 47v14q13 -2 27.5 -3t43.5 -1q26 0 38.5 0.5t22.5 1.5q-59 163 -122 223.5t-170 69.5q103 63 144.5 97.5t66.5 70.5q56 -31 107.5 -112 -t119.5 -251l145 373q33 -60 52 -76t47 -16q27 0 47.5 20.5t34.5 63.5v-25q0 -114 -37 -181t-98 -67q-25 0 -50 11.5t-51 33.5l-71 -182l20 -49h82q33 0 66.5 5t68.5 15q-13 -33 -22 -61t-15 -55h-139q54 -144 104 -203t115 -59q12 0 26 3t40 11q-45 -60 -78 -117.5 -t-55 -113.5q-96 14 -159 87t-147 293l-153 -387q-24 50 -48.5 70t-58.5 20q-33 0 -64.5 -17.5t-64.5 -55.5z" /> - <glyph glyph-name="y" unicode="y" horiz-adv-x="948" -d="M677 1006q32 -59 95 -96.5t130 -37.5h10q-20 -35 -49 -61t-71 -47v-633q16 -35 23 -67t7 -66q0 -160 -129 -270.5t-317 -110.5q-94 0 -175 56.5t-98 56.5q-28 0 -47 -16.5t-34 -55.5q-3 26 -4 38t-1 21q0 66 42 113t100 47q40 0 75 -23.5t80 -82.5q46 -63 81 -85t81 -22 -q79 0 138 57t59 136q0 34 -31 121.5t-31 181.5v84l-295 -264q-27 56 -78 92.5t-102 36.5q-11 0 -24.5 -3t-38.5 -12q11 35 32 60t56 47v452q0 88 -35 125.5t-116 41.5l7 6q104 91 160 184q91 -24 127.5 -84t36.5 -197v-496q23 -13 47 -35t57 -63l166 139v488q-44 16 -63 26 -t-31 21l-39 -29l-14 25q76 50 127 98.5t86 102.5z" /> - <glyph glyph-name="z" unicode="z" horiz-adv-x="807" -d="M41 -27l-31 4q75 119 153 233t161 224h-101q-25 0 -53.5 -3t-56.5 -9q24 34 40 66.5t24 62.5h233l237 328q-95 -67 -175 -98t-157 -31q-74 0 -138.5 22.5t-117.5 67.5q61 37 115.5 83t104.5 101q16 -66 66.5 -100.5t129.5 -34.5q98 0 178.5 36.5t100.5 88.5l22 -15 -q-69 -112 -144.5 -224t-158.5 -226h123q29 0 46.5 4.5t35.5 13.5q-22 -33 -42 -67t-40 -70h-205l-239 -317q89 61 173.5 89.5t176.5 28.5q66 0 121 -15.5t106 -49.5l43 53l27 -26q-50 -52 -94 -108t-82 -118q-66 54 -147 80.5t-177 26.5q-98 0 -157 -23t-101 -78z" /> - <glyph glyph-name="braceleft" unicode="{" horiz-adv-x="1024" -d="M848 1516v-53q-136 -2 -186 -55t-50 -210v-141q0 -227 -59 -308.5t-217 -113.5q159 -32 217.5 -113.5t58.5 -308.5v-141q0 -157 49.5 -209t186.5 -54v-53h-10q-219 0 -301 74t-82 272v207q0 161 -59 221.5t-218 73.5v64q161 13 219 73.5t58 221.5v206q0 199 82 273 -t301 74h10z" /> - <glyph glyph-name="bar" unicode="|" horiz-adv-x="1024" -d="M438 1565h150v-2048h-150v2048z" /> - <glyph glyph-name="braceright" unicode="}" horiz-adv-x="1024" -d="M176 1516h10q220 0 302.5 -74t82.5 -273v-206q0 -161 58 -221.5t219 -73.5v-64q-161 -13 -219 -73.5t-58 -221.5v-207q0 -198 -82.5 -272t-302.5 -74h-10v53q137 2 186.5 54.5t49.5 208.5v141q0 227 58.5 308.5t217.5 113.5q-158 32 -217 113.5t-59 308.5v141 -q0 157 -50 210t-186 55v53z" /> - <glyph glyph-name="asciitilde" unicode="~" horiz-adv-x="1706" -d="M1530 770v-156q-104 -72 -199 -106.5t-190 -34.5q-93 0 -256 58q-22 8 -34 12l-15 5q-176 60 -273 60q-84 0 -175 -37t-210 -120v155q106 72 202 108t185 36q62 0 127.5 -13.5t163.5 -48.5q16 -5 47 -17q159 -57 240 -57q88 0 179.5 37t207.5 119z" /> - <glyph glyph-name="uni0080" -d="M442 602v143h-176v-34q0 -20 1 -43t4 -66h171zM918 1284q-8 -89 -52 -140.5t-112 -51.5q-37 0 -67 32.5t-50 94.5l-29 -23v-399h215l-14 -52h-201v-143h146l-15 -51h-130q-8 -105 -57.5 -170.5t-148.5 -99.5q22 26 30.5 60t8.5 118v92h-166q23 -198 103 -301t213 -103 -q106 0 174.5 41t140.5 160q-34 -194 -126.5 -290.5t-243.5 -96.5q-198 0 -315.5 169t-117.5 421h-102l16 51h86q0 33 2.5 68t8.5 75h-113l14 52h109q35 172 124.5 309.5t219.5 218.5q-92 -103 -141.5 -234t-59.5 -294h174v274l-86 -57l-6 24q150 100 243.5 175.5 -t158.5 146.5q14 -54 40.5 -84.5t57.5 -30.5q18 0 34 9.5t34 29.5z" /> - <glyph glyph-name="uni0080" unicode="€" -d="M442 602v143h-176v-34q0 -20 1 -43t4 -66h171zM918 1284q-8 -89 -52 -140.5t-112 -51.5q-37 0 -67 32.5t-50 94.5l-29 -23v-399h215l-14 -52h-201v-143h146l-15 -51h-130q-8 -105 -57.5 -170.5t-148.5 -99.5q22 26 30.5 60t8.5 118v92h-166q23 -198 103 -301t213 -103 -q106 0 174.5 41t140.5 160q-34 -194 -126.5 -290.5t-243.5 -96.5q-198 0 -315.5 169t-117.5 421h-102l16 51h86q0 33 2.5 68t8.5 75h-113l14 52h109q35 172 124.5 309.5t219.5 218.5q-92 -103 -141.5 -234t-59.5 -294h174v274l-86 -57l-6 24q150 100 243.5 175.5 -t158.5 146.5q14 -54 40.5 -84.5t57.5 -30.5q18 0 34 9.5t34 29.5z" /> - <glyph glyph-name="uni00A0" unicode=" " - /> - <glyph glyph-name="exclamdown" unicode="¡" horiz-adv-x="555" -d="M291 1051l98 -797q22 -15 40 -33.5t34 -40.5q-56 -40 -102.5 -87t-79.5 -97q-28 80 -79 124.5t-126 55.5q23 24 54 44.5t71 39.5zM287 1446q35 -40 71.5 -76t75.5 -70q-32 -29 -66.5 -66.5t-78.5 -90.5q-43 42 -81 77.5t-77 67.5q38 29 75.5 66.5t80.5 91.5z" /> - <glyph glyph-name="cent" unicode="¢" -d="M398 426q28 -2 52.5 -4.5t50.5 -7.5v586q-12 11 -22.5 27.5t-21.5 45.5l-60 -18zM762 358l-227 -198v-185h-33v205q-60 46 -129.5 71t-136.5 25q-30 0 -58.5 -5.5t-58.5 -18.5q0 52 26 90.5t78 63.5v489q0 70 -13 104.5t-42 67.5q17 -1 30.5 -1.5t26.5 -0.5 -q66 0 139 16.5t138 46.5v234h33v-217q17 5 37 19t42 36q33 -52 74.5 -80t85.5 -28q12 0 38 3q5 0 9 1q-42 -65 -93 -98t-107 -33q-21 0 -43.5 4.5t-42.5 13.5v-578q44 -11 80.5 -28t66.5 -41l61 47z" /> - <glyph glyph-name="sterling" unicode="£" -d="M68 0q67 134 202.5 211.5t304.5 77.5q63 0 126 -17.5t143 -58.5l28 39l17 -19q-39 -58 -71.5 -115.5t-59.5 -115.5q-82 49 -173.5 75.5t-178.5 26.5q-86 0 -169 -25.5t-169 -78.5zM375 500q0 -128 -54.5 -194.5t-179.5 -94.5q31 31 43.5 70.5t12.5 130.5v241h-172v80h172 -v166q0 114 30.5 175.5t104.5 125.5q78 67 152 102t139 35q49 0 92 -17.5t86 -55.5l35 32l20 -18q-48 -43 -89 -91.5t-83 -111.5q-99 91 -139 115t-74 24q-52 0 -74 -31.5t-22 -109.5v-340h358v-80h-358v-153z" /> - <glyph glyph-name="currency" unicode="¤" -d="M442 602v143h-176v-34q0 -20 1 -43t4 -66h171zM918 1284q-8 -89 -52 -140.5t-112 -51.5q-37 0 -67 32.5t-50 94.5l-29 -23v-399h215l-14 -52h-201v-143h146l-15 -51h-130q-8 -105 -57.5 -170.5t-148.5 -99.5q22 26 30.5 60t8.5 118v92h-166q23 -198 103 -301t213 -103 -q106 0 174.5 41t140.5 160q-34 -194 -126.5 -290.5t-243.5 -96.5q-198 0 -315.5 169t-117.5 421h-102l16 51h86q0 33 2.5 68t8.5 75h-113l14 52h109q35 172 124.5 309.5t219.5 218.5q-92 -103 -141.5 -234t-59.5 -294h174v274l-86 -57l-6 24q150 100 243.5 175.5 -t158.5 146.5q14 -54 40.5 -84.5t57.5 -30.5q18 0 34 9.5t34 29.5z" /> - <glyph glyph-name="yen" unicode="¥" horiz-adv-x="995" -d="M657 621v73h-268v-116q23 -15 46.5 -38t53.5 -61zM389 745h268v168h-268v-168zM721 1352q32 -59 95 -96t130 -37h10q-21 -37 -49.5 -63t-68.5 -46v-145h186v-52h-186v-168h186v-51h-186v-219q15 -36 22.5 -69t7.5 -66q0 -159 -128.5 -269t-317.5 -110q-94 0 -176 56.5 -t-99 56.5q-28 0 -45.5 -16t-33.5 -56q-1 5 -4 26.5t-3 32.5q0 66 42 113t100 47q41 0 77.5 -24t79.5 -80q49 -66 82.5 -87.5t77.5 -21.5q79 0 138 57.5t59 137.5q0 44 -31 124t-31 128q0 6 1 22.5t1 26.5v84l-297 -264q-27 57 -77.5 93t-102.5 36q-13 0 -28.5 -3t-34.5 -10 -q11 34 32.5 58.5t59.5 46.5v149h-189v51h189v168h-189v52h189v32q0 83 -38 123.5t-117 43.5q3 3 12 10q103 89 157 180q89 -21 127.5 -86t38.5 -195v-108h268v143q-34 10 -57 21.5t-39 25.5l-37 -29l-16 23q74 49 125.5 98t87.5 105z" /> - <glyph glyph-name="brokenbar" unicode="¦" horiz-adv-x="1024" -d="M438 408h150v-758h-150v758zM438 1432h150v-758h-150v758z" /> - <glyph glyph-name="section" unicode="§" horiz-adv-x="1024" -d="M672 330v383q0 84 -11 114t-38 41l-45 19l-193 -80v-424q0 -41 14 -67.5t43 -41.5l76 -38zM369 -303q-60 61 -105 87t-90 26q-28 0 -51.5 -8t-46.5 -25q31 92 92.5 136t161.5 44q60 0 118 -25.5t130 -83.5l94 19v164q0 65 -18 88.5t-66 48.5q-130 67 -200 87.5t-140 20.5 -q-22 0 -73 -6q-9 -1 -13 -2v24q4 189 4 273q0 86 -1 143t-3 113q28 -5 42 -6.5t25 -1.5q68 0 150.5 23.5t163.5 66.5q-86 46 -152.5 67t-126.5 21q-24 0 -49 -3t-53 -9q19 38 28 74t9 73q0 54 -11 87.5t-34 68.5l7 -1q61 -7 89 -7q102 0 224 43.5t243 124.5q36 -73 69 -103 -t74 -30q24 0 46.5 11t41.5 32q-23 -89 -79 -133.5t-144 -44.5q-66 0 -113 27t-98 95l-129 -36v-152q0 -91 94 -136l6 -3l127 -60q46 -22 87 -31.5t89 -9.5q29 0 52 2.5t45 7.5q-3 -82 -4.5 -151.5t-1.5 -126.5t1.5 -126.5t4.5 -149.5q-112 -7 -191.5 -33t-136.5 -74 -q64 -34 119 -49.5t106 -15.5q23 0 51.5 4t63.5 12q-16 -26 -24.5 -60t-8.5 -71q0 -81 13 -123t42 -86q-34 5 -71.5 7.5t-81.5 2.5q-112 0 -216.5 -37t-180.5 -104z" /> - <glyph glyph-name="dieresis" unicode="¨" horiz-adv-x="1024" -d="M557 1184l106 126l3 -2q66 -85 114 -85q11 0 22 2.5t23 6.5q-30 -64 -64.5 -94t-78.5 -30q-36 0 -68.5 19.5t-56.5 56.5zM195 1184l106 127q43 -58 65.5 -73t51.5 -15q10 0 21 2.5t23 6.5q-29 -64 -63.5 -94t-79.5 -30q-35 0 -67.5 19.5t-56.5 56.5z" /> - <glyph glyph-name="copyright" unicode="©" horiz-adv-x="1683" -d="M1122 1098h37l2 -316h-43q-32 135 -103 204t-177 69q-119 0 -179.5 -93.5t-60.5 -277.5q0 -187 66.5 -284t193.5 -97q84 0 153.5 44t127.5 132l39 -26q-61 -105 -148 -158t-199 -53q-173 0 -292 124t-119 304q0 183 118.5 307.5t290.5 124.5q75 0 149.5 -33t80.5 -33 -q27 0 42 14.5t21 47.5zM844 1305q-123 0 -238 -49t-203 -138q-88 -90 -134 -202.5t-46 -237.5q0 -127 46.5 -239t136.5 -201q91 -90 201.5 -136.5t234.5 -46.5q126 0 237 46.5t199 136.5q89 90 136.5 204t47.5 236q0 123 -48 241t-134 203q-86 86 -201 134.5t-235 48.5z -M844 1391q138 0 269 -54.5t230 -152.5q100 -99 154.5 -232t54.5 -274q0 -140 -53.5 -269.5t-155.5 -232.5q-99 -101 -228 -155t-273 -54q-142 0 -270 53.5t-232 155.5q-103 102 -156 229t-53 273q0 141 53.5 270t155.5 232q100 101 230.5 156t273.5 55z" /> - <glyph glyph-name="ordfeminine" unicode="ª" horiz-adv-x="651" -d="M84 608h520v-96h-520v96zM330 1292q-30 -16 -57 -23t-54 -7q-22 0 -44 4t-44 12l211 -248l-25 -22l-88 106q-20 -28 -29.5 -55.5t-9.5 -59.5q0 -70 40 -114t116 -58l41 29v383q-16 6 -30 19t-27 34zM473 1456q2 -49 23.5 -76.5t58.5 -27.5q12 0 26 3.5t31 10.5 -q-7 -29 -23.5 -49.5t-47.5 -40.5v-322q0 -58 21 -83t69 -25q4 0 12 1t12 1l-127 -150q-54 21 -85 51t-46 76l-139 -123q-102 32 -159.5 91.5t-57.5 132.5q0 67 42 127t116 98l-164 192h8q41 0 83.5 26t92.5 81q19 -64 42.5 -94.5t53.5 -30.5q31 0 70 32.5t88 98.5z" /> - <glyph glyph-name="guillemotleft" unicode="«" horiz-adv-x="905" -d="M729 68q-85 147 -165 250.5t-163 175.5q94 74 175 177t153 238q-3 -101 -41 -211t-104 -206q64 -102 100.5 -209t44.5 -215zM440 68q-85 147 -165 250.5t-162 175.5q93 74 174.5 177t152.5 238q-3 -100 -41.5 -210t-105.5 -207q65 -104 102.5 -211t44.5 -213z" /> - <glyph glyph-name="logicalnot" unicode="¬" horiz-adv-x="1706" -d="M254 860h1198v-502h-137v363h-1061v139z" /> - <glyph glyph-name="uni00AD" unicode="­" horiz-adv-x="797" -d="M96 383l105 212q8 -25 20.5 -34.5t44.5 -9.5h47h240q39 0 75 10.5t72 32.5l-88 -191q-18 17 -38 24t-56 7h-37h-241q-25 0 -54.5 -10t-89.5 -41z" /> - <glyph glyph-name="registered" unicode="®" horiz-adv-x="1683" -d="M738 721q13 -1 28 -1.5t35 -0.5q105 0 163 45t58 127q0 72 -50 116t-134 44q-51 0 -76 -17.5t-25 -52.5zM467 1094h397q144 0 231 -54t87 -141q0 -83 -66 -131.5t-219 -75.5q95 -28 145 -76.5t68 -130.5q1 -9 3 -28q11 -125 67 -125q31 0 47 33.5t16 97.5h45v-19 -q0 -84 -41 -129t-119 -45q-49 0 -84 16t-51 46q-20 37 -22 110t-8 97q-19 71 -66.5 105t-130.5 34h-29v-246q0 -51 25.5 -72t93.5 -27v-44h-389v44q69 4 95 25.5t26 73.5v516q0 53 -26 74.5t-95 26.5v45zM844 1305q-123 0 -238 -49t-203 -138q-88 -90 -134 -202.5 -t-46 -237.5q0 -127 46.5 -239t136.5 -201q89 -90 199.5 -136.5t236.5 -46.5q125 0 237 47t199 136q88 90 135 203t47 237q0 125 -47.5 242t-132.5 202q-86 86 -201 134.5t-235 48.5zM844 1391q140 0 273 -56t233 -157q97 -99 149.5 -230.5t52.5 -275.5q0 -139 -56 -270 -t-161 -234q-100 -99 -228 -150t-276 -51q-134 0 -261.5 54.5t-229.5 154.5q-102 101 -155.5 229t-53.5 273q0 142 53 270.5t154 231.5q100 101 231.5 156t274.5 55z" /> - <glyph glyph-name="macron" unicode="¯" horiz-adv-x="1024" -d="M219 1174v104h586v-104h-586z" /> - <glyph glyph-name="degree" unicode="°" horiz-adv-x="674" -d="M338 1362q-81 0 -138 -56t-57 -137t57 -138.5t138 -57.5t136.5 57.5t55.5 138.5t-55.5 137t-136.5 56zM338 1456q118 0 202.5 -84.5t84.5 -204.5q0 -119 -84 -202.5t-205 -83.5t-204 83t-83 203t85 204.5t204 84.5z" /> - <glyph glyph-name="plusminus" unicode="±" horiz-adv-x="1706" -d="M254 170h1198v-141h-1198v141zM782 1192h142v-340h528v-139h-528v-340h-142v340h-528v139h528v340z" /> - <glyph glyph-name="uni00B2" unicode="²" horiz-adv-x="616" -d="M510 981v-12q0 -33 6.5 -57t19.5 -39q-28 10 -56.5 15t-59.5 5q-140 0 -221.5 -60.5t-81.5 -164.5v-16q38 4 82 7t96 3q72 -1 125 -6.5t90 -16.5l29 33l12 -17q-30 -33 -53.5 -65.5t-40.5 -61.5q-40 14 -88 21.5t-97 7.5q-35 0 -75.5 -2.5t-101.5 -9.5q-3 16 -4 34t-1 50 -q0 121 46.5 187.5t152.5 98.5q13 5 35 11q65 18 65 90v209l-20 8q-44 -35 -79.5 -51.5t-68.5 -16.5q-51 0 -89.5 31t-51.5 84q14 -8 25.5 -11t25.5 -3q28 0 63.5 16.5t69.5 46.5q52 -49 104 -73.5t103 -24.5q14 0 31.5 2t38.5 6q-17 -22 -24 -43t-7 -61v-154z" /> - <glyph glyph-name="uni00B3" unicode="³" horiz-adv-x="616" -d="M229 506q-20 31 -64.5 50t-94.5 19q-13 0 -23.5 -1t-23.5 -4q34 47 79 72.5t97 25.5q49 0 95 -23t79 -63l30 6v295q-32 7 -56 16t-44 21q-17 -10 -30.5 -24t-26.5 -36v90q8 -6 14.5 -9t11.5 -3q14 0 54 19.5t73 27.5v264l-34 6q-27 -52 -63.5 -77t-86.5 -25 -q-49 0 -86.5 24t-62.5 72q15 -8 27.5 -12t23.5 -4q28 0 56 20.5t67 71.5q53 -34 129.5 -52t173.5 -18h8q-12 -17 -19.5 -44.5t-7.5 -57.5v-82q0 -18 4.5 -39.5t18.5 -62.5q-15 2 -31.5 3t-46.5 1q-37 0 -74 -9t-76 -28q29 -19 65 -28t87 -9q31 0 49.5 1t36.5 3 -q-13 -12 -20 -37t-7 -63v-131q0 -33 9.5 -59t25.5 -41q-30 2 -47.5 2.5t-32.5 0.5q-70 0 -132.5 -17t-123.5 -52z" /> - <glyph glyph-name="acute" unicode="´" horiz-adv-x="1024" -d="M698 1350q22 -15 52 -31t86 -43l-5 -16l-28 12q-55 -92 -141 -141.5t-191 -49.5q-53 0 -96.5 12t-81.5 37h22q130 0 222 53t161 167z" /> - <glyph glyph-name="uni00B5" unicode="µ" horiz-adv-x="1169" -d="M166 195q-33 -143 -64 -355q-37 -260 -116 -260q-43 0 -65.5 24.5t-22.5 69.5q0 44 70 277t110 422l108 512h168l-100 -475q-9 -40 -13.5 -74.5t-4.5 -59.5q0 -70 41.5 -108.5t119.5 -38.5q97 0 154 54.5t82 172.5l112 529h173l-115 -532q-9 -43 -14 -75.5t-5 -52.5 -q0 -48 26.5 -74t76.5 -26q44 0 81 25t58 69q13 27 27 73q17 56 39 56q9 0 15.5 -8t6.5 -21q0 -34 -13.5 -88t-35.5 -100q-39 -78 -92.5 -117t-122.5 -39q-81 0 -125.5 55t-44.5 154v13q-52 -115 -123 -168.5t-172 -53.5q-95 0 -151 56t-68 164z" /> - <glyph glyph-name="paragraph" unicode="¶" horiz-adv-x="1024" -d="M958 1479v-86h-120v-1393h-111v1393h-176v-1393h-113v782q-170 8 -271 102.5t-101 245.5q0 157 107.5 253t285.5 96h499z" /> - <glyph glyph-name="periodcentered" unicode="·" horiz-adv-x="467" -d="M123 659q0 48 32 80.5t78 32.5q48 0 81.5 -33t33.5 -80q0 -45 -34 -78.5t-81 -33.5q-45 0 -77.5 33t-32.5 79z" /> - <glyph glyph-name="cedilla" unicode="¸" horiz-adv-x="1024" -d="M336 -408l-19 5q6 52 44 85t92 33q28 0 51 -12t47 -39l45 8v168h-123v250h49v-196h164v-154q0 -44 6 -64t20 -34q-18 7 -37.5 10.5t-39.5 3.5q-57 0 -97.5 -17t-68.5 -53q-22 30 -41 44t-39 14q-21 0 -35 -13.5t-18 -38.5z" /> - <glyph glyph-name="uni00B9" unicode="¹" horiz-adv-x="616" -d="M111 551q20 43 52 70t89 47v428q0 77 -25 104t-96 37v20q40 7 78 27.5t88 63.5q43 -30 62.5 -68.5t19.5 -95.5v-518q20 -7 39.5 -15t38.5 -16l26 24l19 -16q-45 -39 -79 -74.5t-52 -62.5q-49 32 -96.5 49.5t-84.5 17.5q-21 0 -41 -5.5t-38 -16.5z" /> - <glyph glyph-name="ordmasculine" unicode="º" horiz-adv-x="700" -d="M455 1249q-41 11 -69.5 33.5t-39.5 50.5q-22 -7 -42.5 -12t-36.5 -6l-1 -414q45 -18 71 -39.5t36 -48.5q20 5 40 9.5t42 8.5v418zM74 608h549v-96h-549v96zM516 1450q23 -53 50 -76.5t65 -23.5q7 0 28 4q11 3 16 4q-13 -31 -28.5 -50.5t-36.5 -33.5v-307q0 -55 8.5 -91.5 -t26.5 -76.5q-23 4 -49.5 6t-56.5 2q-87 0 -160 -27t-148 -86q-34 40 -72.5 61t-74.5 21q-12 0 -46 -6q-8 -1 -13 -2q6 40 26 68.5t60 52.5v323q0 40 -9.5 69t-29.5 58q6 0 20 -1q43 -3 58 -3q101 0 192.5 28.5t173.5 86.5z" /> - <glyph glyph-name="guillemotright" unicode="»" horiz-adv-x="905" -d="M176 68q8 108 44.5 215t101.5 209q-66 96 -104.5 206t-41.5 211q70 -133 152 -237t176 -178q-83 -72 -163 -175.5t-165 -250.5zM465 68q8 106 45 213t102 211q-67 97 -105.5 207t-41.5 210q72 -135 153 -238t175 -177q-83 -72 -163 -175.5t-165 -250.5z" /> - <glyph glyph-name="onequarter" unicode="¼" horiz-adv-x="1520" -d="M1249 229v379l-20 15q-45 -58 -83 -105t-75 -88v-201h178zM1151 -4q6 36 31 63.5t67 42.5v86h-166q-39 0 -70 -2.5t-50 -7.5v6q4 35 4 47q0 56 -1 79t-3 40q67 64 156 170.5t188 241.5q25 -47 48 -70.5t44 -23.5q5 0 15 5q3 2 5 2q-4 -23 -16.5 -42.5t-34.5 -34.5v-369 -h18q33 0 55 11.5t38 35.5v-20q0 -7 -2 -21t-2 -20q0 -7 2 -23t2 -26v-14q-16 20 -34 29t-42 9q-11 0 -19 -0.5t-16 -1.5v-82q18 -4 35 -11t35 -17l30 22l15 -18q-29 -16 -64 -44t-73 -65q-37 25 -69.5 37.5t-59.5 12.5q-18 0 -34.5 -7t-31.5 -20zM1200 1360h70l-955 -1399 -h-69zM106 604q19 39 50 64t86 45v399q0 70 -24.5 95.5t-92.5 35.5v19q37 6 73.5 25t86.5 59q40 -26 57.5 -62t17.5 -92v-481q17 -6 35.5 -13.5t40.5 -17.5l25 22l18 -12q-43 -38 -75.5 -71.5t-49.5 -59.5q-48 31 -93 48.5t-79 17.5q-18 0 -36 -5t-40 -16z" /> - <glyph glyph-name="onehalf" unicode="½" horiz-adv-x="1520" -d="M1417 422v-10q0 -31 6.5 -54t18.5 -36q-29 9 -56 13.5t-55 4.5q-134 0 -212.5 -56.5t-78.5 -154.5l1 -14q38 5 79 7.5t90 2.5q70 0 120.5 -5.5t87.5 -16.5l26 30l12 -14q-34 -40 -56 -68.5t-34 -50.5q-40 13 -85.5 20t-90.5 7q-40 0 -82.5 -2.5t-87.5 -7.5q-2 14 -3 30.5 -t-1 44.5q0 115 44 176.5t145 92.5q13 4 34 10q61 17 61 84v196l-20 6q-37 -31 -71.5 -46t-67.5 -15q-50 0 -87 29t-48 77q12 -7 23.5 -10.5t25.5 -3.5q27 0 60.5 15.5t66.5 44.5q50 -47 99.5 -70t96.5 -23q15 0 32 2.5t36 6.5q-15 -21 -22 -41t-7 -56v-145zM1200 1360h70 -l-955 -1399h-69zM106 604q19 39 50 64t86 45v399q0 70 -24.5 95.5t-92.5 35.5v19q37 6 73.5 25t86.5 59q40 -26 57.5 -62t17.5 -92v-481q17 -6 35.5 -13.5t40.5 -17.5l25 22l18 -12q-43 -38 -75.5 -71.5t-49.5 -59.5q-48 31 -93 48.5t-79 17.5q-18 0 -36 -5t-40 -16z" /> - <glyph glyph-name="threequarters" unicode="¾" horiz-adv-x="1520" -d="M1248 229v379l-20 15q-45 -58 -83 -105t-75 -88v-201h178zM1150 -4q6 36 31 63.5t67 42.5v86h-166q-39 0 -70 -2.5t-50 -7.5v6q4 35 4 47q0 56 -1 79t-3 40q67 64 156 170.5t188 241.5q25 -47 48 -70.5t44 -23.5q5 0 15 5q3 2 5 2q-4 -23 -16.5 -42.5t-34.5 -34.5v-369 -h18q33 0 55 11.5t38 35.5v-20q0 -7 -2 -21t-2 -20q0 -7 2 -23t2 -26v-14q-16 20 -34 29t-42 9q-11 0 -19 -0.5t-16 -1.5v-82q18 -4 35 -11t35 -17l30 22l15 -18q-29 -16 -64 -44t-73 -65q-37 25 -69.5 37.5t-59.5 12.5q-18 0 -34.5 -7t-31.5 -20zM1199 1360h70l-955 -1399 -h-69zM218 559q-18 30 -61.5 49t-91.5 19q-10 0 -21 -1.5t-24 -4.5q33 44 76 67t93 23q48 0 92 -21.5t72 -58.5l31 6v276q-27 5 -50.5 13.5t-45.5 21.5q-19 -13 -31.5 -26.5t-21.5 -30.5v84l1 -1q16 -9 23 -9q13 0 51 17.5t70 25.5v245l-33 9q-25 -51 -60 -75t-83 -24 -q-45 0 -81.5 23.5t-62.5 68.5q15 -8 27.5 -12t22.5 -4q27 0 54 19t64 67q52 -32 125.5 -48.5t163.5 -16.5h8q-12 -16 -19 -41.5t-7 -53.5v-75q0 -20 4.5 -41t17.5 -56q-4 1 -12 1q-43 3 -61 3q-36 0 -71.5 -9t-72.5 -27q28 -17 63 -25t81 -8q31 0 48.5 1t34.5 3 -q-12 -10 -19 -34t-7 -60v-123q0 -30 8.5 -54t23.5 -38q-28 2 -45 3t-30 1q-66 0 -126 -16.5t-118 -51.5z" /> - <glyph glyph-name="questiondown" unicode="¿" -d="M209 530q0 42 -8 84t-25 86h33q192 0 268.5 70.5t104.5 271.5q11 -64 16.5 -122.5t5.5 -108.5q0 -125 -44.5 -179t-158.5 -75v-436l50 -12q40 87 96 129.5t131 42.5q73 0 130.5 -41t96.5 -121q-20 13 -39 19.5t-39 6.5q-42 0 -84.5 -33.5t-103.5 -119.5 -q-82 58 -197.5 88.5t-257.5 30.5h-14q19 26 29 69.5t10 98.5v251zM573 1446q33 -40 70 -77t80 -73q-39 -36 -76 -74t-74 -79q-14 13 -43 40q-72 67 -114 103q48 33 87.5 73t69.5 87z" /> - <glyph glyph-name="Agrave" unicode="À" horiz-adv-x="1370" -d="M467 647h344l-176 459zM-41 -45q34 114 114 180.5t201 81.5l230 621q-18 34 -51 53.5t-74 19.5q-43 0 -74.5 -22t-50.5 -65q-2 24 -3 39.5t-1 27.5q0 85 61 151t140 66q51 0 84 -9.5t57 -31.5l28 77q-4 45 -51 75t-110 30q-59 0 -103 -20.5t-77 -63.5q10 118 94.5 197.5 -t195.5 79.5q49 0 92.5 -14.5t79.5 -43.5l394 -1028q32 -88 70 -125.5t91 -37.5q26 0 45.5 3.5t36.5 12.5q-75 -92 -115.5 -153t-60.5 -111q-70 6 -117 50.5t-81 139.5l-127 338h-476l-94 -250q14 0 33 2h6q64 0 116 -14.5t103 -46.5l31 35l18 -19q-68 -77 -108 -131 -t-68 -106q-51 37 -123 58.5t-149 21.5q-62 0 -114 -17t-93 -51zM457 1844q68 -113 161.5 -166.5t223.5 -53.5h22q-38 -25 -81.5 -37t-96.5 -12q-105 0 -191 49.5t-141 141.5l-28 -12l-7 16q56 27 86 43t52 31z" /> - <glyph glyph-name="Aacute" unicode="Á" horiz-adv-x="1370" -d="M467 647h344l-176 459zM-41 -45q34 114 114 180.5t201 81.5l230 621q-18 34 -51 53.5t-74 19.5q-43 0 -74.5 -22t-50.5 -65q-2 24 -3 39.5t-1 27.5q0 85 61 151t140 66q51 0 84 -9.5t57 -31.5l28 77q-4 45 -51 75t-110 30q-59 0 -103 -20.5t-77 -63.5q10 118 94.5 197.5 -t195.5 79.5q49 0 92.5 -14.5t79.5 -43.5l394 -1028q32 -88 70 -125.5t91 -37.5q26 0 45.5 3.5t36.5 12.5q-75 -92 -115.5 -153t-60.5 -111q-70 6 -117 50.5t-81 139.5l-127 338h-476l-94 -250q14 0 33 2h6q64 0 116 -14.5t103 -46.5l31 35l18 -19q-68 -77 -108 -131 -t-68 -106q-51 37 -123 58.5t-149 21.5q-62 0 -114 -17t-93 -51zM831 1844q22 -15 52 -31t86 -43l-5 -16l-28 12q-55 -92 -141 -141.5t-191 -49.5q-53 0 -96.5 12t-81.5 37h22q130 0 222 53t161 167z" /> - <glyph glyph-name="Acircumflex" unicode="Â" horiz-adv-x="1370" -d="M467 647h344l-176 459zM-41 -45q34 114 114 180.5t201 81.5l230 621q-18 34 -51 53.5t-74 19.5q-43 0 -74.5 -22t-50.5 -65q-2 24 -3 39.5t-1 27.5q0 85 61 151t140 66q51 0 84 -9.5t57 -31.5l28 77q-4 45 -51 75t-110 30q-59 0 -103 -20.5t-77 -63.5q10 118 94.5 197.5 -t195.5 79.5q49 0 92.5 -14.5t79.5 -43.5l394 -1028q32 -88 70 -125.5t91 -37.5q26 0 45.5 3.5t36.5 12.5q-75 -92 -115.5 -153t-60.5 -111q-70 6 -117 50.5t-81 139.5l-127 338h-476l-94 -250q14 0 33 2h6q64 0 116 -14.5t103 -46.5l31 35l18 -19q-68 -77 -108 -131 -t-68 -106q-51 37 -123 58.5t-149 21.5q-62 0 -114 -17t-93 -51zM326 1563q116 85 194.5 161.5t128.5 153.5q60 -93 136.5 -170t178.5 -145q-89 5 -169 33.5t-148 79.5q-75 -50 -157 -78.5t-164 -34.5z" /> - <glyph glyph-name="Atilde" unicode="Ã" horiz-adv-x="1370" -d="M467 647h344l-176 459zM-41 -45q34 114 114 180.5t201 81.5l230 621q-18 34 -51 53.5t-74 19.5q-43 0 -74.5 -22t-50.5 -65q-2 24 -3 39.5t-1 27.5q0 85 61 151t140 66q51 0 84 -9.5t57 -31.5l28 77q-4 45 -51 75t-110 30q-59 0 -103 -20.5t-77 -63.5q10 118 94.5 197.5 -t195.5 79.5q49 0 92.5 -14.5t79.5 -43.5l394 -1028q32 -88 70 -125.5t91 -37.5q26 0 45.5 3.5t36.5 12.5q-75 -92 -115.5 -153t-60.5 -111q-70 6 -117 50.5t-81 139.5l-127 338h-476l-94 -250q14 0 33 2h6q64 0 116 -14.5t103 -46.5l31 35l18 -19q-68 -77 -108 -131 -t-68 -106q-51 37 -123 58.5t-149 21.5q-62 0 -114 -17t-93 -51zM348 1604q19 79 80 126.5t143 47.5q41 0 126 -20.5t132 -20.5q35 0 62 8t51 25q-37 -76 -107 -119t-155 -43q-41 0 -111.5 20.5t-103.5 20.5q-37 0 -64 -10.5t-53 -34.5z" /> - <glyph glyph-name="Adieresis" unicode="Ä" horiz-adv-x="1370" -d="M467 647h344l-176 459zM-41 -45q34 114 114 180.5t201 81.5l230 621q-18 34 -51 53.5t-74 19.5q-43 0 -74.5 -22t-50.5 -65q-2 24 -3 39.5t-1 27.5q0 85 61 151t140 66q51 0 84 -9.5t57 -31.5l28 77q-4 45 -51 75t-110 30q-59 0 -103 -20.5t-77 -63.5q10 118 94.5 197.5 -t195.5 79.5q49 0 92.5 -14.5t79.5 -43.5l394 -1028q32 -88 70 -125.5t91 -37.5q26 0 45.5 3.5t36.5 12.5q-75 -92 -115.5 -153t-60.5 -111q-70 6 -117 50.5t-81 139.5l-127 338h-476l-94 -250q14 0 33 2h6q64 0 116 -14.5t103 -46.5l31 35l18 -19q-68 -77 -108 -131 -t-68 -106q-51 37 -123 58.5t-149 21.5q-62 0 -114 -17t-93 -51zM690 1678l106 126l3 -2q66 -85 114 -85q11 0 22 2.5t23 6.5q-30 -64 -64.5 -94t-78.5 -30q-36 0 -68.5 19.5t-56.5 56.5zM328 1678l106 127q43 -58 65.5 -73t51.5 -15q10 0 21 2.5t23 6.5q-29 -64 -63.5 -94 -t-79.5 -30q-35 0 -67.5 19.5t-56.5 56.5z" /> - <glyph glyph-name="Aring" unicode="Å" horiz-adv-x="1370" -d="M506 1706q0 -50 35.5 -86.5t85.5 -36.5q51 0 88 36.5t37 86.5t-37 86.5t-88 36.5q-50 0 -85.5 -36.5t-35.5 -86.5zM-41 -45q34 114 114 180.5t201 81.5l230 621q-18 34 -51 53.5t-74 19.5q-43 0 -74.5 -22t-50.5 -65q-2 24 -3 39.5t-1 27.5q0 85 61 151t140 66 -q51 0 84 -9.5t57 -31.5l28 77q-4 45 -51 75t-110 30q-59 0 -103 -20.5t-77 -63.5q10 118 94.5 197.5t195.5 79.5q49 0 92.5 -14.5t79.5 -43.5l394 -1028q32 -88 70 -125.5t91 -37.5q26 0 45.5 3.5t36.5 12.5q-75 -92 -115.5 -153t-60.5 -111q-70 6 -117 50.5t-81 139.5 -l-127 338h-476l-94 -250q14 0 33 2h6q64 0 116 -14.5t103 -46.5l31 35l18 -19q-68 -77 -108 -131t-68 -106q-51 37 -123 58.5t-149 21.5q-62 0 -114 -17t-93 -51zM467 647h344l-176 459zM436 1706q0 80 56.5 136t136.5 56t136 -56t56 -136t-56 -136.5t-136 -56.5 -q-79 0 -136 57t-57 136z" /> - <glyph glyph-name="AE" unicode="Æ" horiz-adv-x="1847" -d="M801 -53q57 89 151.5 158.5t221.5 115.5v838q0 160 104.5 274.5t259.5 114.5q48 0 95.5 -13t101.5 -40l18 22l27 -14q-44 -58 -79.5 -120.5t-58.5 -121.5q-44 53 -103.5 80t-129.5 27q-100 0 -153.5 -70.5t-53.5 -202.5v-293q56 88 116.5 126t141.5 38q52 0 98.5 -14.5 -t90.5 -44.5l26 31l25 -19q-43 -50 -81.5 -111.5t-74.5 -136.5q-25 56 -79 88.5t-119 32.5q-42 0 -75.5 -13.5t-68.5 -45.5v-406q55 14 102.5 20.5t90.5 6.5q95 0 179.5 -25t162.5 -77l43 63l24 -18q-41 -59 -79.5 -121t-73.5 -127q-73 50 -166.5 74t-216.5 24 -q-128 0 -238.5 -24t-228.5 -76zM-41 -45q34 114 114 180.5t201 81.5l334 672q-39 12 -74.5 18t-64.5 6q-50 0 -82 -21t-53 -68q-2 24 -3 39.5t-1 27.5q0 97 65 158t174 61q32 0 66 -6.5t72 -20.5l53 109q-61 14 -113.5 21.5t-93.5 7.5q-69 0 -119.5 -22.5t-73.5 -63.5 -q16 143 94.5 220t211.5 77q25 0 150.5 -21.5t223.5 -21.5q73 0 121 7.5t86 24.5q-54 -118 -148.5 -177.5t-228.5 -59.5q-20 0 -37.5 0.5t-35.5 1.5l-275 -539h355v252q0 105 51 160.5t194 109.5q-35 -41 -50 -82.5t-15 -101.5v-541q0 -121 -51 -180t-187 -139q31 39 44.5 84 -t13.5 139v125h-445l-125 -250q14 0 33 2h6q64 0 116 -14.5t103 -46.5l31 35l18 -19q-69 -78 -110.5 -134t-65.5 -103q-51 37 -123 58.5t-149 21.5q-62 0 -114 -17t-93 -51z" /> - <glyph glyph-name="Ccedilla" unicode="Ç" horiz-adv-x="1280" -d="M557 264q29 28 41 64t12 127v698l-147 -78l-10 25q199 106 325.5 187.5t214.5 158.5q20 -61 53 -92t78 -31q25 0 47.5 10t42.5 31q-10 -70 -54.5 -119t-112.5 -67v-1002q54 21 112.5 66.5t124.5 117.5q-91 -205 -241.5 -310t-356.5 -105q-260 0 -425 190t-165 488 -q0 250 132 462.5t358 323.5q-146 -131 -217.5 -294t-71.5 -365q0 -306 137 -462.5t406 -156.5q48 0 91.5 8.5t88.5 26.5v1007q-5 -1 -10 -1.5t-15 -0.5q-54 0 -93 31t-62 92l-39 -24v-674q0 -144 -56.5 -220t-187.5 -112zM512 -408l-19 5q6 52 44 85t92 33q28 0 51 -12 -t47 -39l45 8v168h-123v250h49v-196h164v-154q0 -44 6 -64t20 -34q-18 7 -37.5 10.5t-39.5 3.5q-57 0 -97.5 -17t-68.5 -53q-22 30 -41 44t-39 14q-21 0 -35 -13.5t-18 -38.5z" /> - <glyph glyph-name="Egrave" unicode="È" horiz-adv-x="1255" -d="M211 -53q59 92 153 161t220 113v785q0 207 96.5 324.5t265.5 117.5q48 0 95.5 -13t101.5 -40l20 22l25 -14q-44 -58 -79.5 -120.5t-57.5 -121.5q-45 53 -103.5 80t-128.5 27q-101 0 -154 -69.5t-53 -203.5v-293q48 84 111 124t145 40q51 0 98 -14t91 -43l26 29l25 -19 -q-46 -56 -85 -118t-71 -130q-25 57 -78 89t-118 32q-43 0 -77 -14t-67 -45v-406q55 14 101 20.5t88 6.5q97 0 181.5 -25t162.5 -77l43 63l24 -18q-47 -69 -85 -130.5t-68 -117.5q-72 50 -166 74t-217 24q-127 0 -236.5 -23.5t-228.5 -76.5zM55 1188q14 114 88 184t181 70 -q47 0 124.5 -21.5t112.5 -21.5q27 0 49.5 7t42.5 21q-41 -110 -96 -159t-135 -49q-50 0 -132 21.5t-112 21.5q-39 0 -64.5 -15.5t-58.5 -58.5zM229 127q30 37 43 81.5t13 143.5v258q-15 0 -35.5 1t-26.5 1q-49 0 -73 -20t-27 -63q-16 24 -23.5 56t-7.5 77q0 72 29.5 108.5 -t87.5 36.5q19 0 37.5 -1.5t37.5 -4.5l1 96q0 104 51.5 162t195.5 112q-35 -40 -50 -82.5t-15 -103.5v-541q0 -118 -50 -177t-188 -140zM500 1844q68 -113 161.5 -166.5t223.5 -53.5h22q-38 -25 -81.5 -37t-96.5 -12q-105 0 -191 49.5t-141 141.5l-28 -12l-7 16q56 27 86 43 -t52 31z" /> - <glyph glyph-name="Eacute" unicode="É" horiz-adv-x="1255" -d="M211 -53q59 92 153 161t220 113v785q0 207 96.5 324.5t265.5 117.5q48 0 95.5 -13t101.5 -40l20 22l25 -14q-44 -58 -79.5 -120.5t-57.5 -121.5q-45 53 -103.5 80t-128.5 27q-101 0 -154 -69.5t-53 -203.5v-293q48 84 111 124t145 40q51 0 98 -14t91 -43l26 29l25 -19 -q-46 -56 -85 -118t-71 -130q-25 57 -78 89t-118 32q-43 0 -77 -14t-67 -45v-406q55 14 101 20.5t88 6.5q97 0 181.5 -25t162.5 -77l43 63l24 -18q-47 -69 -85 -130.5t-68 -117.5q-72 50 -166 74t-217 24q-127 0 -236.5 -23.5t-228.5 -76.5zM55 1188q14 114 88 184t181 70 -q47 0 124.5 -21.5t112.5 -21.5q27 0 49.5 7t42.5 21q-41 -110 -96 -159t-135 -49q-50 0 -132 21.5t-112 21.5q-39 0 -64.5 -15.5t-58.5 -58.5zM229 127q30 37 43 81.5t13 143.5v258q-15 0 -35.5 1t-26.5 1q-49 0 -73 -20t-27 -63q-16 24 -23.5 56t-7.5 77q0 72 29.5 108.5 -t87.5 36.5q19 0 37.5 -1.5t37.5 -4.5l1 96q0 104 51.5 162t195.5 112q-35 -40 -50 -82.5t-15 -103.5v-541q0 -118 -50 -177t-188 -140zM874 1844q22 -15 52 -31t86 -43l-5 -16l-28 12q-55 -92 -141 -141.5t-191 -49.5q-53 0 -96.5 12t-81.5 37h22q130 0 222 53t161 167z" /> - <glyph glyph-name="Ecircumflex" unicode="Ê" horiz-adv-x="1255" -d="M211 -53q59 92 153 161t220 113v785q0 207 96.5 324.5t265.5 117.5q48 0 95.5 -13t101.5 -40l20 22l25 -14q-44 -58 -79.5 -120.5t-57.5 -121.5q-45 53 -103.5 80t-128.5 27q-101 0 -154 -69.5t-53 -203.5v-293q48 84 111 124t145 40q51 0 98 -14t91 -43l26 29l25 -19 -q-46 -56 -85 -118t-71 -130q-25 57 -78 89t-118 32q-43 0 -77 -14t-67 -45v-406q55 14 101 20.5t88 6.5q97 0 181.5 -25t162.5 -77l43 63l24 -18q-47 -69 -85 -130.5t-68 -117.5q-72 50 -166 74t-217 24q-127 0 -236.5 -23.5t-228.5 -76.5zM55 1188q14 114 88 184t181 70 -q47 0 124.5 -21.5t112.5 -21.5q27 0 49.5 7t42.5 21q-41 -110 -96 -159t-135 -49q-50 0 -132 21.5t-112 21.5q-39 0 -64.5 -15.5t-58.5 -58.5zM229 127q30 37 43 81.5t13 143.5v258q-15 0 -35.5 1t-26.5 1q-49 0 -73 -20t-27 -63q-16 24 -23.5 56t-7.5 77q0 72 29.5 108.5 -t87.5 36.5q19 0 37.5 -1.5t37.5 -4.5l1 96q0 104 51.5 162t195.5 112q-35 -40 -50 -82.5t-15 -103.5v-541q0 -118 -50 -177t-188 -140zM369 1563q116 85 194.5 161.5t128.5 153.5q60 -93 136.5 -170t178.5 -145q-89 5 -169 33.5t-148 79.5q-75 -50 -157 -78.5t-164 -34.5z -" /> - <glyph glyph-name="Edieresis" unicode="Ë" horiz-adv-x="1255" -d="M211 -53q59 92 153 161t220 113v785q0 207 96.5 324.5t265.5 117.5q48 0 95.5 -13t101.5 -40l20 22l25 -14q-44 -58 -79.5 -120.5t-57.5 -121.5q-45 53 -103.5 80t-128.5 27q-101 0 -154 -69.5t-53 -203.5v-293q48 84 111 124t145 40q51 0 98 -14t91 -43l26 29l25 -19 -q-46 -56 -85 -118t-71 -130q-25 57 -78 89t-118 32q-43 0 -77 -14t-67 -45v-406q55 14 101 20.5t88 6.5q97 0 181.5 -25t162.5 -77l43 63l24 -18q-47 -69 -85 -130.5t-68 -117.5q-72 50 -166 74t-217 24q-127 0 -236.5 -23.5t-228.5 -76.5zM55 1188q14 114 88 184t181 70 -q47 0 124.5 -21.5t112.5 -21.5q27 0 49.5 7t42.5 21q-41 -110 -96 -159t-135 -49q-50 0 -132 21.5t-112 21.5q-39 0 -64.5 -15.5t-58.5 -58.5zM229 127q30 37 43 81.5t13 143.5v258q-15 0 -35.5 1t-26.5 1q-49 0 -73 -20t-27 -63q-16 24 -23.5 56t-7.5 77q0 72 29.5 108.5 -t87.5 36.5q19 0 37.5 -1.5t37.5 -4.5l1 96q0 104 51.5 162t195.5 112q-35 -40 -50 -82.5t-15 -103.5v-541q0 -118 -50 -177t-188 -140zM733 1678l106 126l3 -2q66 -85 114 -85q11 0 22 2.5t23 6.5q-30 -64 -64.5 -94t-78.5 -30q-36 0 -68.5 19.5t-56.5 56.5zM371 1678 -l106 127q43 -58 65.5 -73t51.5 -15q10 0 21 2.5t23 6.5q-29 -64 -63.5 -94t-79.5 -30q-35 0 -67.5 19.5t-56.5 56.5z" /> - <glyph glyph-name="Igrave" unicode="Ì" horiz-adv-x="1090" -d="M136 1209q33 107 107 170t167 63q46 0 138.5 -21.5t141.5 -21.5q31 0 57 5.5t54 18.5q-51 -100 -114.5 -146t-149.5 -46q-40 0 -123.5 15.5t-130.5 15.5q-63 0 -145 -52zM657 590v-4q0 -183 -55 -258.5t-188 -102.5q32 29 45.5 76t13.5 145v199q-6 1 -13.5 1.5t-21.5 0.5 -q-53 0 -82.5 -19.5t-38.5 -59.5q-17 20 -24.5 42.5t-7.5 55.5q0 83 42 131.5t115 48.5q4 0 12.5 -1t12.5 -1v45q0 97 51 159t193 130q-27 -36 -40.5 -96t-13.5 -146v-346zM-37 -43q10 102 88.5 180t163.5 78q87 0 191 -104q23 -23 36 -35q40 -36 77 -54t73 -18 -q90 0 133 67.5t43 209.5v757q0 147 56.5 217.5t195.5 147.5q-37 -37 -52.5 -77t-15.5 -118v-26v-848q0 -188 -128 -284.5t-378 -96.5q-85 0 -175 45t-124 45q-43 0 -90.5 -22t-93.5 -64zM478 1844q68 -113 161.5 -166.5t223.5 -53.5h22q-38 -25 -81.5 -37t-96.5 -12 -q-105 0 -191 49.5t-141 141.5l-28 -12l-7 16q56 27 86 43t52 31z" /> - <glyph glyph-name="Iacute" unicode="Í" horiz-adv-x="1090" -d="M136 1209q33 107 107 170t167 63q46 0 138.5 -21.5t141.5 -21.5q31 0 57 5.5t54 18.5q-51 -100 -114.5 -146t-149.5 -46q-40 0 -123.5 15.5t-130.5 15.5q-63 0 -145 -52zM657 590v-4q0 -183 -55 -258.5t-188 -102.5q32 29 45.5 76t13.5 145v199q-6 1 -13.5 1.5t-21.5 0.5 -q-53 0 -82.5 -19.5t-38.5 -59.5q-17 20 -24.5 42.5t-7.5 55.5q0 83 42 131.5t115 48.5q4 0 12.5 -1t12.5 -1v45q0 97 51 159t193 130q-27 -36 -40.5 -96t-13.5 -146v-346zM-37 -43q10 102 88.5 180t163.5 78q87 0 191 -104q23 -23 36 -35q40 -36 77 -54t73 -18 -q90 0 133 67.5t43 209.5v757q0 147 56.5 217.5t195.5 147.5q-37 -37 -52.5 -77t-15.5 -118v-26v-848q0 -188 -128 -284.5t-378 -96.5q-85 0 -175 45t-124 45q-43 0 -90.5 -22t-93.5 -64zM852 1844q22 -15 52 -31t86 -43l-5 -16l-28 12q-55 -92 -141 -141.5t-191 -49.5 -q-53 0 -96.5 12t-81.5 37h22q130 0 222 53t161 167z" /> - <glyph glyph-name="Icircumflex" unicode="Î" horiz-adv-x="1090" -d="M136 1209q33 107 107 170t167 63q46 0 138.5 -21.5t141.5 -21.5q31 0 57 5.5t54 18.5q-51 -100 -114.5 -146t-149.5 -46q-40 0 -123.5 15.5t-130.5 15.5q-63 0 -145 -52zM657 590v-4q0 -183 -55 -258.5t-188 -102.5q32 29 45.5 76t13.5 145v199q-6 1 -13.5 1.5t-21.5 0.5 -q-53 0 -82.5 -19.5t-38.5 -59.5q-17 20 -24.5 42.5t-7.5 55.5q0 83 42 131.5t115 48.5q4 0 12.5 -1t12.5 -1v45q0 97 51 159t193 130q-27 -36 -40.5 -96t-13.5 -146v-346zM-37 -43q10 102 88.5 180t163.5 78q87 0 191 -104q23 -23 36 -35q40 -36 77 -54t73 -18 -q90 0 133 67.5t43 209.5v757q0 147 56.5 217.5t195.5 147.5q-37 -37 -52.5 -77t-15.5 -118v-26v-848q0 -188 -128 -284.5t-378 -96.5q-85 0 -175 45t-124 45q-43 0 -90.5 -22t-93.5 -64zM347 1563q116 85 194.5 161.5t128.5 153.5q60 -93 136.5 -170t178.5 -145 -q-89 5 -169 33.5t-148 79.5q-75 -50 -157 -78.5t-164 -34.5z" /> - <glyph glyph-name="Idieresis" unicode="Ï" horiz-adv-x="1090" -d="M136 1209q33 107 107 170t167 63q46 0 138.5 -21.5t141.5 -21.5q31 0 57 5.5t54 18.5q-51 -100 -114.5 -146t-149.5 -46q-40 0 -123.5 15.5t-130.5 15.5q-63 0 -145 -52zM657 590v-4q0 -183 -55 -258.5t-188 -102.5q32 29 45.5 76t13.5 145v199q-6 1 -13.5 1.5t-21.5 0.5 -q-53 0 -82.5 -19.5t-38.5 -59.5q-17 20 -24.5 42.5t-7.5 55.5q0 83 42 131.5t115 48.5q4 0 12.5 -1t12.5 -1v45q0 97 51 159t193 130q-27 -36 -40.5 -96t-13.5 -146v-346zM-37 -43q10 102 88.5 180t163.5 78q87 0 191 -104q23 -23 36 -35q40 -36 77 -54t73 -18 -q90 0 133 67.5t43 209.5v757q0 147 56.5 217.5t195.5 147.5q-37 -37 -52.5 -77t-15.5 -118v-26v-848q0 -188 -128 -284.5t-378 -96.5q-85 0 -175 45t-124 45q-43 0 -90.5 -22t-93.5 -64zM711 1678l106 126l3 -2q66 -85 114 -85q11 0 22 2.5t23 6.5q-30 -64 -64.5 -94 -t-78.5 -30q-36 0 -68.5 19.5t-56.5 56.5zM349 1678l106 127q43 -58 65.5 -73t51.5 -15q10 0 21 2.5t23 6.5q-29 -64 -63.5 -94t-79.5 -30q-35 0 -67.5 19.5t-56.5 56.5z" /> - <glyph glyph-name="Eth" unicode="Ð" horiz-adv-x="1200" -d="M575 608v-385q62 0 121.5 -22.5t120.5 -69.5l49 27v942q0 60 -25.5 85t-107.5 25h-158v-401q8 0 20.5 -1t16.5 -1q53 0 75 16t22 54q23 -23 34 -53t11 -68q0 -78 -37 -113t-119 -35h-23zM82 -49q56 121 178.5 192.5t286.5 77.5v387h-115v-125q0 -111 -54 -173.5 -t-194 -114.5q30 37 43 85t13 128v200h-68q-45 0 -63.5 -15t-18.5 -52q-23 23 -34 52.5t-11 68.5q0 80 37 114.5t123 34.5q6 0 17 -1t18 -1q-1 2 -1 6q-3 46 -3 70q0 128 55.5 189t193.5 89q-28 -38 -40.5 -73.5t-12.5 -100.5v-180h115v401h-260q-119 0 -171.5 55.5 -t-51.5 180.5q19 -11 41.5 -16t60.5 -5h616q159 0 218 -61.5t59 -210.5v-864q0 -56 9.5 -90.5t31.5 -67.5q-17 0 -38 2h-5q-90 0 -187.5 -47.5t-197.5 -140.5q-75 39 -159 59.5t-169 20.5q-67 0 -130.5 -18t-131.5 -56z" /> - <glyph glyph-name="Ntilde" unicode="Ñ" horiz-adv-x="1219" -d="M1055 260v592q-34 -16 -73.5 -24.5t-82.5 -8.5q-36 0 -63.5 5t-53.5 16l14 -37q167 -453 259 -543zM313 518q53 23 100.5 34t90.5 11q40 0 87.5 -10t106.5 -31l-32 82q-223 566 -353 627v-713zM12 -51q34 119 100 186t173 88v379l-6 2q-23 6 -33 6q-36 0 -58 -20.5 -t-22 -54.5q0 -1 -2 -2.5t-2 -2.5q-21 24 -30 53t-9 70q0 69 31 109.5t82 40.5q8 0 18.5 -1t29.5 -3l1 440q-12 4 -22.5 6t-22.5 2q-65 0 -114.5 -49.5t-49.5 -120.5q-14 32 -20.5 61.5t-6.5 57.5q0 111 71 181.5t183 70.5q130 0 233 -123.5t234 -450.5q38 -12 73 -18t66 -6 -q39 0 75 9.5t71 29.5v287h-8q-53 0 -104.5 16.5t-111.5 52.5l-51 -43l-16 19q73 65 125.5 122.5t79.5 102.5q50 -39 91 -55.5t83 -16.5q44 0 81.5 15.5t71.5 48.5q0 -88 -57.5 -158.5t-155.5 -101.5v-1241q-80 10 -166 135.5t-204 408.5q-50 25 -99.5 36t-103.5 11 -q-59 0 -107 -11t-90 -34v-256h45q65 0 133 -22t119 -60l27 29l22 -18q-64 -68 -106 -121t-68 -98q-55 44 -114.5 67t-120.5 23q-55 0 -113 -19t-125 -59zM405 1604q19 79 80 126.5t143 47.5q41 0 126 -20.5t132 -20.5q35 0 62 8t51 25q-37 -76 -107 -119t-155 -43 -q-41 0 -111.5 20.5t-103.5 20.5q-37 0 -64 -10.5t-53 -34.5z" /> - <glyph glyph-name="Ograve" unicode="Ò" horiz-adv-x="1421" -d="M870 940q29 -13 58.5 -19t66.5 -6q38 0 69.5 6.5t59.5 20.5q-25 112 -79 208.5t-134 174.5l-41 -27v-358zM870 905v-465q30 9 59.5 13t61.5 4q37 0 71 -7.5t66 -21.5q14 63 20.5 129.5t6.5 140.5q0 64 -6 115.5t-19 95.5q-32 -12 -64.5 -18t-66.5 -6q-36 0 -67.5 5 -t-61.5 15zM870 410v-375q97 41 158 130t94 236q-35 14 -68.5 20.5t-68.5 6.5q-30 0 -58.5 -4.5t-56.5 -13.5zM487 174q26 31 38 70t12 90v788l-91 -39v31q154 70 251.5 120t144.5 83v129l28 4v-115q36 19 78 47t90 66q158 -92 239 -248.5t81 -370.5q0 -147 -36.5 -287 -t-102.5 -251q-103 -169 -235 -250.5t-304 -81.5q-119 0 -222.5 43.5t-189.5 128.5q-108 108 -163.5 242.5t-55.5 288.5q0 245 125 464t322 318q-117 -128 -169.5 -306t-52.5 -456q0 -347 104.5 -515.5t317.5 -168.5q33 0 69.5 7t76.5 22v1253l-115 -59v-783 -q0 -125 -52.5 -180t-187.5 -84zM562 1844q68 -113 161.5 -166.5t223.5 -53.5h22q-38 -25 -81.5 -37t-96.5 -12q-105 0 -191 49.5t-141 141.5l-28 -12l-7 16q56 27 86 43t52 31z" /> - <glyph glyph-name="Oacute" unicode="Ó" horiz-adv-x="1421" -d="M870 940q29 -13 58.5 -19t66.5 -6q38 0 69.5 6.5t59.5 20.5q-25 112 -79 208.5t-134 174.5l-41 -27v-358zM870 905v-465q30 9 59.5 13t61.5 4q37 0 71 -7.5t66 -21.5q14 63 20.5 129.5t6.5 140.5q0 64 -6 115.5t-19 95.5q-32 -12 -64.5 -18t-66.5 -6q-36 0 -67.5 5 -t-61.5 15zM870 410v-375q97 41 158 130t94 236q-35 14 -68.5 20.5t-68.5 6.5q-30 0 -58.5 -4.5t-56.5 -13.5zM487 174q26 31 38 70t12 90v788l-91 -39v31q154 70 251.5 120t144.5 83v129l28 4v-115q36 19 78 47t90 66q158 -92 239 -248.5t81 -370.5q0 -147 -36.5 -287 -t-102.5 -251q-103 -169 -235 -250.5t-304 -81.5q-119 0 -222.5 43.5t-189.5 128.5q-108 108 -163.5 242.5t-55.5 288.5q0 245 125 464t322 318q-117 -128 -169.5 -306t-52.5 -456q0 -347 104.5 -515.5t317.5 -168.5q33 0 69.5 7t76.5 22v1253l-115 -59v-783 -q0 -125 -52.5 -180t-187.5 -84zM936 1844q22 -15 52 -31t86 -43l-5 -16l-28 12q-55 -92 -141 -141.5t-191 -49.5q-53 0 -96.5 12t-81.5 37h22q130 0 222 53t161 167z" /> - <glyph glyph-name="Ocircumflex" unicode="Ô" horiz-adv-x="1421" -d="M870 940q29 -13 58.5 -19t66.5 -6q38 0 69.5 6.5t59.5 20.5q-25 112 -79 208.5t-134 174.5l-41 -27v-358zM870 905v-465q30 9 59.5 13t61.5 4q37 0 71 -7.5t66 -21.5q14 63 20.5 129.5t6.5 140.5q0 64 -6 115.5t-19 95.5q-32 -12 -64.5 -18t-66.5 -6q-36 0 -67.5 5 -t-61.5 15zM870 410v-375q97 41 158 130t94 236q-35 14 -68.5 20.5t-68.5 6.5q-30 0 -58.5 -4.5t-56.5 -13.5zM487 174q26 31 38 70t12 90v788l-91 -39v31q154 70 251.5 120t144.5 83v129l28 4v-115q36 19 78 47t90 66q158 -92 239 -248.5t81 -370.5q0 -147 -36.5 -287 -t-102.5 -251q-103 -169 -235 -250.5t-304 -81.5q-119 0 -222.5 43.5t-189.5 128.5q-108 108 -163.5 242.5t-55.5 288.5q0 245 125 464t322 318q-117 -128 -169.5 -306t-52.5 -456q0 -347 104.5 -515.5t317.5 -168.5q33 0 69.5 7t76.5 22v1253l-115 -59v-783 -q0 -125 -52.5 -180t-187.5 -84zM431 1563q116 85 194.5 161.5t128.5 153.5q60 -93 136.5 -170t178.5 -145q-89 5 -169 33.5t-148 79.5q-75 -50 -157 -78.5t-164 -34.5z" /> - <glyph glyph-name="Otilde" unicode="Õ" horiz-adv-x="1421" -d="M870 940q29 -13 58.5 -19t66.5 -6q38 0 69.5 6.5t59.5 20.5q-25 112 -79 208.5t-134 174.5l-41 -27v-358zM870 905v-465q30 9 59.5 13t61.5 4q37 0 71 -7.5t66 -21.5q14 63 20.5 129.5t6.5 140.5q0 64 -6 115.5t-19 95.5q-32 -12 -64.5 -18t-66.5 -6q-36 0 -67.5 5 -t-61.5 15zM870 410v-375q97 41 158 130t94 236q-35 14 -68.5 20.5t-68.5 6.5q-30 0 -58.5 -4.5t-56.5 -13.5zM487 174q26 31 38 70t12 90v788l-91 -39v31q154 70 251.5 120t144.5 83v129l28 4v-115q36 19 78 47t90 66q158 -92 239 -248.5t81 -370.5q0 -147 -36.5 -287 -t-102.5 -251q-103 -169 -235 -250.5t-304 -81.5q-119 0 -222.5 43.5t-189.5 128.5q-108 108 -163.5 242.5t-55.5 288.5q0 245 125 464t322 318q-117 -128 -169.5 -306t-52.5 -456q0 -347 104.5 -515.5t317.5 -168.5q33 0 69.5 7t76.5 22v1253l-115 -59v-783 -q0 -125 -52.5 -180t-187.5 -84zM453 1604q19 79 80 126.5t143 47.5q41 0 126 -20.5t132 -20.5q35 0 62 8t51 25q-37 -76 -107 -119t-155 -43q-41 0 -111.5 20.5t-103.5 20.5q-37 0 -64 -10.5t-53 -34.5z" /> - <glyph glyph-name="Odieresis" unicode="Ö" horiz-adv-x="1421" -d="M870 940q29 -13 58.5 -19t66.5 -6q38 0 69.5 6.5t59.5 20.5q-25 112 -79 208.5t-134 174.5l-41 -27v-358zM870 905v-465q30 9 59.5 13t61.5 4q37 0 71 -7.5t66 -21.5q14 63 20.5 129.5t6.5 140.5q0 64 -6 115.5t-19 95.5q-32 -12 -64.5 -18t-66.5 -6q-36 0 -67.5 5 -t-61.5 15zM870 410v-375q97 41 158 130t94 236q-35 14 -68.5 20.5t-68.5 6.5q-30 0 -58.5 -4.5t-56.5 -13.5zM487 174q26 31 38 70t12 90v788l-91 -39v31q154 70 251.5 120t144.5 83v129l28 4v-115q36 19 78 47t90 66q158 -92 239 -248.5t81 -370.5q0 -147 -36.5 -287 -t-102.5 -251q-103 -169 -235 -250.5t-304 -81.5q-119 0 -222.5 43.5t-189.5 128.5q-108 108 -163.5 242.5t-55.5 288.5q0 245 125 464t322 318q-117 -128 -169.5 -306t-52.5 -456q0 -347 104.5 -515.5t317.5 -168.5q33 0 69.5 7t76.5 22v1253l-115 -59v-783 -q0 -125 -52.5 -180t-187.5 -84zM795 1678l106 126l3 -2q66 -85 114 -85q11 0 22 2.5t23 6.5q-30 -64 -64.5 -94t-78.5 -30q-36 0 -68.5 19.5t-56.5 56.5zM433 1678l106 127q43 -58 65.5 -73t51.5 -15q10 0 21 2.5t23 6.5q-29 -64 -63.5 -94t-79.5 -30q-35 0 -67.5 19.5 -t-56.5 56.5z" /> - <glyph glyph-name="multiply" unicode="×" horiz-adv-x="1706" -d="M391 1178l469 -469l469 469l98 -99l-469 -469l469 -469l-98 -96l-469 467l-469 -467l-98 96l469 469l-469 469z" /> - <glyph glyph-name="Oslash" unicode="Ø" horiz-adv-x="1421" -d="M240 -96l100 164q-139 108 -215 262.5t-76 328.5q0 248 125 467.5t322 317.5q-117 -128 -169.5 -305t-52.5 -455q0 -191 27 -316t86 -218l150 266v706l-91 -39v31q186 85 330 166.5t262 167.5l60 -41l80 137l24 -12l-84 -143q114 -83 177 -229t63 -331 -q0 -368 -191.5 -619t-470.5 -251q-93 0 -178.5 23.5t-152.5 68.5l-99 -164zM1012 1204l-144 -262q26 -14 55 -20.5t72 -6.5q39 0 71.5 7t57.5 21q-14 73 -41.5 137t-70.5 124zM487 174q26 34 38 75t12 93v14l-131 -229q53 -62 128 -95.5t162 -33.5q166 0 278 106t148 299 -q-51 15 -108 22t-125 7q-44 0 -83.5 -4.5t-78.5 -14.5v-18q0 -89 -60 -144t-180 -77zM727 440q45 12 93 17.5t104 5.5q64 0 114.5 -8.5t89.5 -26.5q14 61 20.5 126.5t6.5 143.5q0 64 -5.5 117t-17.5 98q-29 -14 -63 -21t-70 -7q-46 0 -81.5 6.5t-67.5 21.5l-123 -219v-254z -M727 750l266 477q-17 30 -37.5 54.5t-44.5 43.5l-184 -104v-471z" /> - <glyph glyph-name="Ugrave" unicode="Ù" horiz-adv-x="1233" -d="M647 932q21 -13 43 -19t49 -6q25 0 47.5 4t44.5 13v256q-20 6 -38 22.5t-41 50.5l-105 -77v-244zM647 612q27 7 50.5 10t45.5 3q25 0 46.5 -4t41.5 -13v283q-19 -8 -38 -11t-48 -3q-28 0 -51.5 3.5t-46.5 12.5v-281zM666 133l165 109v333q-18 11 -39.5 16t-50.5 5 -q-26 0 -49 -4.5t-45 -13.5v-426zM72 10q26 91 85 149t150 83v405q-12 7 -24 10.5t-23 4.5q-46 0 -68 -20t-32 -73q-17 27 -25 57t-8 68q0 81 38.5 121.5t115.5 40.5q3 0 12 -1t14 -1v221q0 84 -33.5 123t-105.5 39q-56 0 -98.5 -32t-71.5 -97q0 4 -1 13q-3 39 -3 55 -q0 120 72.5 197t185.5 77q122 0 184 -79t62 -234v-906q25 -6 53.5 -19.5t66.5 -37.5v1272h29v-234l289 238q27 -67 61.5 -103t71.5 -36q18 0 37 7.5t41 24.5q-11 -61 -44 -104.5t-81 -58.5v-828q0 -89 26 -132.5t80 -43.5q14 0 31 3t37 9q-51 -59 -92.5 -120.5t-77.5 -128.5 -q-77 22 -124 86t-71 178q-123 -78 -199 -137t-134 -121q-50 54 -122 84t-151 30q-40 0 -76.5 -11.5t-76.5 -37.5zM449 1844q68 -113 161.5 -166.5t223.5 -53.5h22q-38 -25 -81.5 -37t-96.5 -12q-105 0 -191 49.5t-141 141.5l-28 -12l-7 16q56 27 86 43t52 31z" /> - <glyph glyph-name="Uacute" unicode="Ú" horiz-adv-x="1233" -d="M647 932q21 -13 43 -19t49 -6q25 0 47.5 4t44.5 13v256q-20 6 -38 22.5t-41 50.5l-105 -77v-244zM647 612q27 7 50.5 10t45.5 3q25 0 46.5 -4t41.5 -13v283q-19 -8 -38 -11t-48 -3q-28 0 -51.5 3.5t-46.5 12.5v-281zM666 133l165 109v333q-18 11 -39.5 16t-50.5 5 -q-26 0 -49 -4.5t-45 -13.5v-426zM72 10q26 91 85 149t150 83v405q-12 7 -24 10.5t-23 4.5q-46 0 -68 -20t-32 -73q-17 27 -25 57t-8 68q0 81 38.5 121.5t115.5 40.5q3 0 12 -1t14 -1v221q0 84 -33.5 123t-105.5 39q-56 0 -98.5 -32t-71.5 -97q0 4 -1 13q-3 39 -3 55 -q0 120 72.5 197t185.5 77q122 0 184 -79t62 -234v-906q25 -6 53.5 -19.5t66.5 -37.5v1272h29v-234l289 238q27 -67 61.5 -103t71.5 -36q18 0 37 7.5t41 24.5q-11 -61 -44 -104.5t-81 -58.5v-828q0 -89 26 -132.5t80 -43.5q14 0 31 3t37 9q-51 -59 -92.5 -120.5t-77.5 -128.5 -q-77 22 -124 86t-71 178q-123 -78 -199 -137t-134 -121q-50 54 -122 84t-151 30q-40 0 -76.5 -11.5t-76.5 -37.5zM823 1844q22 -15 52 -31t86 -43l-5 -16l-28 12q-55 -92 -141 -141.5t-191 -49.5q-53 0 -96.5 12t-81.5 37h22q130 0 222 53t161 167z" /> - <glyph glyph-name="Ucircumflex" unicode="Û" horiz-adv-x="1233" -d="M647 932q21 -13 43 -19t49 -6q25 0 47.5 4t44.5 13v256q-20 6 -38 22.5t-41 50.5l-105 -77v-244zM647 612q27 7 50.5 10t45.5 3q25 0 46.5 -4t41.5 -13v283q-19 -8 -38 -11t-48 -3q-28 0 -51.5 3.5t-46.5 12.5v-281zM666 133l165 109v333q-18 11 -39.5 16t-50.5 5 -q-26 0 -49 -4.5t-45 -13.5v-426zM72 10q26 91 85 149t150 83v405q-12 7 -24 10.5t-23 4.5q-46 0 -68 -20t-32 -73q-17 27 -25 57t-8 68q0 81 38.5 121.5t115.5 40.5q3 0 12 -1t14 -1v221q0 84 -33.5 123t-105.5 39q-56 0 -98.5 -32t-71.5 -97q0 4 -1 13q-3 39 -3 55 -q0 120 72.5 197t185.5 77q122 0 184 -79t62 -234v-906q25 -6 53.5 -19.5t66.5 -37.5v1272h29v-234l289 238q27 -67 61.5 -103t71.5 -36q18 0 37 7.5t41 24.5q-11 -61 -44 -104.5t-81 -58.5v-828q0 -89 26 -132.5t80 -43.5q14 0 31 3t37 9q-51 -59 -92.5 -120.5t-77.5 -128.5 -q-77 22 -124 86t-71 178q-123 -78 -199 -137t-134 -121q-50 54 -122 84t-151 30q-40 0 -76.5 -11.5t-76.5 -37.5zM318 1563q116 85 194.5 161.5t128.5 153.5q60 -93 136.5 -170t178.5 -145q-89 5 -169 33.5t-148 79.5q-75 -50 -157 -78.5t-164 -34.5z" /> - <glyph glyph-name="Udieresis" unicode="Ü" horiz-adv-x="1233" -d="M647 932q21 -13 43 -19t49 -6q25 0 47.5 4t44.5 13v256q-20 6 -38 22.5t-41 50.5l-105 -77v-244zM647 612q27 7 50.5 10t45.5 3q25 0 46.5 -4t41.5 -13v283q-19 -8 -38 -11t-48 -3q-28 0 -51.5 3.5t-46.5 12.5v-281zM666 133l165 109v333q-18 11 -39.5 16t-50.5 5 -q-26 0 -49 -4.5t-45 -13.5v-426zM72 10q26 91 85 149t150 83v405q-12 7 -24 10.5t-23 4.5q-46 0 -68 -20t-32 -73q-17 27 -25 57t-8 68q0 81 38.5 121.5t115.5 40.5q3 0 12 -1t14 -1v221q0 84 -33.5 123t-105.5 39q-56 0 -98.5 -32t-71.5 -97q0 4 -1 13q-3 39 -3 55 -q0 120 72.5 197t185.5 77q122 0 184 -79t62 -234v-906q25 -6 53.5 -19.5t66.5 -37.5v1272h29v-234l289 238q27 -67 61.5 -103t71.5 -36q18 0 37 7.5t41 24.5q-11 -61 -44 -104.5t-81 -58.5v-828q0 -89 26 -132.5t80 -43.5q14 0 31 3t37 9q-51 -59 -92.5 -120.5t-77.5 -128.5 -q-77 22 -124 86t-71 178q-123 -78 -199 -137t-134 -121q-50 54 -122 84t-151 30q-40 0 -76.5 -11.5t-76.5 -37.5zM682 1678l106 126l3 -2q66 -85 114 -85q11 0 22 2.5t23 6.5q-30 -64 -64.5 -94t-78.5 -30q-36 0 -68.5 19.5t-56.5 56.5zM320 1678l106 127q43 -58 65.5 -73 -t51.5 -15q10 0 21 2.5t23 6.5q-29 -64 -63.5 -94t-79.5 -30q-35 0 -67.5 19.5t-56.5 56.5z" /> - <glyph glyph-name="Yacute" unicode="Ý" horiz-adv-x="1186" -d="M586 883q31 -21 60.5 -30t62.5 -9q28 0 55 9t53 28v272q-40 15 -68.5 37.5t-54.5 58.5l-108 -90v-276zM586 475q35 12 62.5 18.5t47.5 6.5q28 0 58.5 -7t62.5 -20v373q-33 -16 -60 -23.5t-50 -7.5q-22 0 -48 7t-73 28v-375zM586 25q13 -3 24.5 -5t20.5 -2 -q91 0 138.5 50.5t47.5 146.5v221q-32 18 -61.5 26.5t-59.5 8.5t-57.5 -8.5t-52.5 -26.5v-411zM557 35v1102l-115 -76v-746q0 -134 26 -191t89 -89zM752 -385l6 26q14 -5 26 -7.5t23 -2.5q46 0 80.5 31t34.5 70q0 24 -18.5 39.5t-49.5 15.5q-25 0 -70 -22.5t-90 -59.5l-6 -5 -q-121 -99 -203 -99q-80 0 -131 52.5t-51 133.5q0 70 46.5 115t158.5 82q-147 21 -201.5 78.5t-54.5 240.5v362q-14 3 -24.5 4t-20.5 1q-43 0 -68 -21.5t-39 -70.5q-15 33 -21.5 62t-6.5 58q0 82 35.5 124t105.5 42q12 0 21 -0.5t18 -0.5v237q0 74 -23.5 111.5t-70.5 37.5 -q-37 0 -64 -31t-39 -88q-8 36 -11 55.5t-3 35.5q0 94 60 159.5t151 65.5q98 0 144 -76.5t46 -239.5v-32l115 76v272h29v-250q67 53 135.5 116.5t136.5 137.5q25 -74 62.5 -110.5t89.5 -36.5q28 0 50.5 10t43.5 33v-11q0 -45 -24 -85t-74 -79v-911q0 -127 -64.5 -185.5 -t-265.5 -92.5q-191 -33 -257.5 -67.5t-66.5 -90.5q0 -29 22 -48.5t56 -19.5q42 0 165 85t202 85q68 0 117 -49t49 -119q0 -65 -45.5 -111t-110.5 -46q-15 0 -44 10q-8 3 -11 4zM901 1844q22 -15 52 -31t86 -43l-5 -16l-28 12q-55 -92 -141 -141.5t-191 -49.5q-53 0 -96.5 12 -t-81.5 37h22q130 0 222 53t161 167z" /> - <glyph glyph-name="Thorn" unicode="Þ" horiz-adv-x="1233" -d="M877 784v224q-29 15 -54 36.5t-49 51.5l-160 -107l1 -205q31 -11 64.5 -16.5t72.5 -5.5q29 0 59.5 5.5t65.5 16.5zM614 756v-289q34 9 64.5 13.5t58.5 4.5q41 0 75 -4.5t64 -13.5l1 287q-28 -11 -57 -16t-72 -5q-38 0 -70.5 5.5t-63.5 17.5zM614 434v-170q68 -21 124 -57 -t106 -88l33 18v297q-32 11 -66 16t-76 5q-29 0 -59.5 -5.5t-61.5 -15.5zM487 909v-968q0 -135 23 -193.5t76 -103.5v1325zM295 75q-58 -1 -99.5 -39t-58.5 -106q-15 33 -21.5 61.5t-6.5 55.5q0 92 49 154t137 82v327q-12 1 -24 1.5t-25 0.5q-52 0 -74 -22t-22 -74 -q-22 29 -31.5 58.5t-9.5 64.5q0 79 37.5 117.5t113.5 38.5q14 0 21 -0.5t14 -1.5v284q0 85 -18.5 117.5t-65.5 32.5q-43 0 -71.5 -28.5t-53.5 -98.5q-15 26 -23 48.5t-8 41.5q0 113 64.5 182.5t169.5 69.5q100 0 149 -74.5t49 -228.5v-195l99 60v442h28v-422 -q108 71 189.5 135t146.5 129q38 -53 77 -78.5t83 -25.5q25 0 44 7t32 21v-6q0 -49 -29 -94.5t-86 -87.5v-721q0 -67 9.5 -113t29.5 -88q-17 1 -33 1.5t-30 0.5q-127 0 -211.5 -39.5t-145.5 -127.5l-76 61v-404q-35 9 -81 40t-111 92q-30 -41 -67 -74t-85 -62q12 81 18.5 147 -t6.5 103v235z" /> - <glyph glyph-name="germandbls" unicode="ß" horiz-adv-x="952" -d="M326 -35q-39 50 -91 77.5t-106 27.5q-14 0 -44 -7q-6 -1 -9 -2q21 48 53 81.5t80 60.5v678h-166v104h166q0 104 -17.5 161.5t-58.5 106.5q16 -1 29 -1.5t24 -0.5q81 0 184.5 39.5t219.5 114.5q81 -51 124.5 -120.5t43.5 -149.5q0 -74 -37.5 -127t-106.5 -80 -q130 -24 182 -101t52 -256v-446q0 -68 8.5 -111t26.5 -65q-72 -11 -157.5 -54.5t-112.5 -47.5q28 38 42.5 96.5t14.5 140.5v416q0 203 -53 289.5t-178 95.5q73 57 110 112.5t37 110.5q0 52 -27 99.5t-84 97.5l-86 -41v-1071q28 -17 49 -38t39 -51q-34 -25 -70 -58.5 -t-81 -80.5z" /> - <glyph glyph-name="agrave" unicode="à" horiz-adv-x="868" -d="M528 188v541q-26 13 -45.5 33t-38.5 53q-48 -23 -89 -35t-74 -12q-30 0 -60 10t-67 33l299 -381l-27 -20l-123 157q-33 -47 -48 -91.5t-15 -94.5q0 -95 59 -160t166 -86zM537 154l-197 -183q-127 42 -199.5 123.5t-72.5 179.5q0 95 56.5 179.5t158.5 140.5l-213 270h4 -q48 0 101.5 34.5t111.5 102.5q23 -82 55 -123.5t74 -41.5q45 0 95.5 40.5t112.5 128.5q4 -59 35.5 -95t79.5 -36q9 0 24.5 4t32.5 11q-6 -29 -26.5 -54.5t-60.5 -54.5v-465q0 -84 29 -121.5t93 -37.5h21l-152 -189q-67 30 -105.5 73t-57.5 114zM296 1350 -q68 -113 161.5 -166.5t223.5 -53.5h22q-38 -25 -81.5 -37t-96.5 -12q-105 0 -191 49.5t-141 141.5l-28 -12l-7 16q56 27 86 43t52 31z" /> - <glyph glyph-name="aacute" unicode="á" horiz-adv-x="868" -d="M528 188v541q-26 13 -45.5 33t-38.5 53q-48 -23 -89 -35t-74 -12q-30 0 -60 10t-67 33l299 -381l-27 -20l-123 157q-33 -47 -48 -91.5t-15 -94.5q0 -95 59 -160t166 -86zM537 154l-197 -183q-127 42 -199.5 123.5t-72.5 179.5q0 95 56.5 179.5t158.5 140.5l-213 270h4 -q48 0 101.5 34.5t111.5 102.5q23 -82 55 -123.5t74 -41.5q45 0 95.5 40.5t112.5 128.5q4 -59 35.5 -95t79.5 -36q9 0 24.5 4t32.5 11q-6 -29 -26.5 -54.5t-60.5 -54.5v-465q0 -84 29 -121.5t93 -37.5h21l-152 -189q-67 30 -105.5 73t-57.5 114zM670 1350q22 -15 52 -31 -t86 -43l-5 -16l-28 12q-55 -92 -141 -141.5t-191 -49.5q-53 0 -96.5 12t-81.5 37h22q130 0 222 53t161 167z" /> - <glyph glyph-name="acircumflex" unicode="â" horiz-adv-x="868" -d="M528 188v541q-26 13 -45.5 33t-38.5 53q-48 -23 -89 -35t-74 -12q-30 0 -60 10t-67 33l299 -381l-27 -20l-123 157q-33 -47 -48 -91.5t-15 -94.5q0 -95 59 -160t166 -86zM537 154l-197 -183q-127 42 -199.5 123.5t-72.5 179.5q0 95 56.5 179.5t158.5 140.5l-213 270h4 -q48 0 101.5 34.5t111.5 102.5q23 -82 55 -123.5t74 -41.5q45 0 95.5 40.5t112.5 128.5q4 -59 35.5 -95t79.5 -36q9 0 24.5 4t32.5 11q-6 -29 -26.5 -54.5t-60.5 -54.5v-465q0 -84 29 -121.5t93 -37.5h21l-152 -189q-67 30 -105.5 73t-57.5 114zM165 1069q116 85 194.5 161.5 -t128.5 153.5q60 -93 136.5 -170t178.5 -145q-89 5 -169 33.5t-148 79.5q-75 -50 -157 -78.5t-164 -34.5z" /> - <glyph glyph-name="atilde" unicode="ã" horiz-adv-x="868" -d="M528 188v541q-26 13 -45.5 33t-38.5 53q-48 -23 -89 -35t-74 -12q-30 0 -60 10t-67 33l299 -381l-27 -20l-123 157q-33 -47 -48 -91.5t-15 -94.5q0 -95 59 -160t166 -86zM537 154l-197 -183q-127 42 -199.5 123.5t-72.5 179.5q0 95 56.5 179.5t158.5 140.5l-213 270h4 -q48 0 101.5 34.5t111.5 102.5q23 -82 55 -123.5t74 -41.5q45 0 95.5 40.5t112.5 128.5q4 -59 35.5 -95t79.5 -36q9 0 24.5 4t32.5 11q-6 -29 -26.5 -54.5t-60.5 -54.5v-465q0 -84 29 -121.5t93 -37.5h21l-152 -189q-67 30 -105.5 73t-57.5 114zM187 1110q19 79 80 126.5 -t143 47.5q41 0 126 -20.5t132 -20.5q35 0 62 8t51 25q-37 -76 -107 -119t-155 -43q-41 0 -111.5 20.5t-103.5 20.5q-37 0 -64 -10.5t-53 -34.5z" /> - <glyph glyph-name="adieresis" unicode="ä" horiz-adv-x="868" -d="M528 188v541q-26 13 -45.5 33t-38.5 53q-48 -23 -89 -35t-74 -12q-30 0 -60 10t-67 33l299 -381l-27 -20l-123 157q-33 -47 -48 -91.5t-15 -94.5q0 -95 59 -160t166 -86zM537 154l-197 -183q-127 42 -199.5 123.5t-72.5 179.5q0 95 56.5 179.5t158.5 140.5l-213 270h4 -q48 0 101.5 34.5t111.5 102.5q23 -82 55 -123.5t74 -41.5q45 0 95.5 40.5t112.5 128.5q4 -59 35.5 -95t79.5 -36q9 0 24.5 4t32.5 11q-6 -29 -26.5 -54.5t-60.5 -54.5v-465q0 -84 29 -121.5t93 -37.5h21l-152 -189q-67 30 -105.5 73t-57.5 114zM529 1184l106 126l3 -2 -q66 -85 114 -85q11 0 22 2.5t23 6.5q-30 -64 -64.5 -94t-78.5 -30q-36 0 -68.5 19.5t-56.5 56.5zM167 1184l106 127q43 -58 65.5 -73t51.5 -15q10 0 21 2.5t23 6.5q-29 -64 -63.5 -94t-79.5 -30q-35 0 -67.5 19.5t-56.5 56.5z" /> - <glyph glyph-name="aring" unicode="å" horiz-adv-x="868" -d="M340 1245q0 -49 33.5 -83t81.5 -34q49 0 82.5 34t33.5 83q0 48 -34 81.5t-82 33.5q-49 0 -82 -33t-33 -82zM270 1246q0 74 54.5 129t130.5 55q75 0 130.5 -55t55.5 -130q0 -76 -55 -131t-131 -55q-75 0 -129 54.5t-56 132.5zM528 188v541q-26 13 -45.5 33t-38.5 53 -q-48 -23 -89 -35t-74 -12q-30 0 -60 10t-67 33l299 -381l-27 -20l-123 157q-33 -47 -48 -91.5t-15 -94.5q0 -95 59 -160t166 -86zM537 154l-197 -183q-127 42 -199.5 123.5t-72.5 179.5q0 95 56.5 179.5t158.5 140.5l-213 270h4q48 0 101.5 34.5t111.5 102.5 -q23 -82 55 -123.5t74 -41.5q45 0 95.5 40.5t112.5 128.5q4 -59 35.5 -95t79.5 -36q9 0 24.5 4t32.5 11q-6 -29 -26.5 -54.5t-60.5 -54.5v-465q0 -84 29 -121.5t93 -37.5h21l-152 -189q-67 30 -105.5 73t-57.5 114z" /> - <glyph glyph-name="ae" unicode="æ" horiz-adv-x="1151" -d="M530 188v541q-26 11 -46.5 31.5t-39.5 54.5q-48 -23 -89 -35t-74 -12q-30 0 -60 10t-67 33l299 -381l-27 -20l-123 157q-33 -47 -48 -91.5t-15 -94.5q0 -95 59 -160t166 -86zM596 983q26 -47 54.5 -67.5t66.5 -20.5q40 0 106.5 30.5t120.5 78.5q33 -101 83.5 -188.5 -t119.5 -164.5l-436 -295v-135q67 -6 134.5 -29t129.5 -61l57 43l19 -24l-222 -195q-78 71 -161 115t-162 57l-166 -156q-127 42 -199.5 123.5t-72.5 179.5q0 95 56.5 179.5t158.5 140.5l-213 270h4q48 0 101.5 34.5t111.5 102.5q26 -88 56.5 -126.5t72.5 -38.5 -q29 0 63.5 26.5t116.5 120.5zM711 393l233 164l-178 315l-55 -6v-473z" /> - <glyph glyph-name="ccedilla" unicode="ç" horiz-adv-x="735" -d="M338 222q76 -5 145 -29t117 -62l57 47l21 -24l-223 -199q-80 60 -150 88.5t-139 28.5q-29 0 -57 -6t-58 -19q0 52 26 90.5t77 63.5v491q0 65 -12.5 101t-40.5 69q13 -1 27.5 -1.5t41.5 -0.5q98 0 201.5 38.5t160.5 96.5q32 -52 72.5 -80t83.5 -28q13 0 39 3q4 1 6 1 -q-42 -65 -91.5 -98t-102.5 -33q-59 0 -101 28.5t-57 79.5l-43 -14v-632zM194 -408l-19 5q6 52 44 85t92 33q28 0 51 -12t47 -39l45 8v168h-123v250h49v-196h164v-154q0 -44 6 -64t20 -34q-18 7 -37.5 10.5t-39.5 3.5q-57 0 -97.5 -17t-68.5 -53q-22 30 -41 44t-39 14 -q-21 0 -35 -13.5t-18 -38.5z" /> - <glyph glyph-name="egrave" unicode="è" horiz-adv-x="786" -d="M401 872l-61 -16v-461l244 164zM55 49q0 55 26.5 94t78.5 60v487q0 56 -14 97t-44 75h70q112 0 223.5 40.5t175.5 103.5q30 -98 82 -189t121 -166l-434 -295v-134q81 -10 147.5 -33t114.5 -58l57 45l19 -24l-223 -197q-63 55 -139.5 85t-155.5 30q-28 0 -53.5 -5 -t-51.5 -16zM206 1350q68 -113 161.5 -166.5t223.5 -53.5h22q-38 -25 -81.5 -37t-96.5 -12q-105 0 -191 49.5t-141 141.5l-28 -12l-7 16q56 27 86 43t52 31z" /> - <glyph glyph-name="eacute" unicode="é" horiz-adv-x="786" -d="M401 872l-61 -16v-461l244 164zM55 49q0 55 26.5 94t78.5 60v487q0 56 -14 97t-44 75h70q112 0 223.5 40.5t175.5 103.5q30 -98 82 -189t121 -166l-434 -295v-134q81 -10 147.5 -33t114.5 -58l57 45l19 -24l-223 -197q-63 55 -139.5 85t-155.5 30q-28 0 -53.5 -5 -t-51.5 -16zM580 1350q22 -15 52 -31t86 -43l-5 -16l-28 12q-55 -92 -141 -141.5t-191 -49.5q-53 0 -96.5 12t-81.5 37h22q130 0 222 53t161 167z" /> - <glyph glyph-name="ecircumflex" unicode="ê" horiz-adv-x="786" -d="M401 872l-61 -16v-461l244 164zM55 49q0 55 26.5 94t78.5 60v487q0 56 -14 97t-44 75h70q112 0 223.5 40.5t175.5 103.5q30 -98 82 -189t121 -166l-434 -295v-134q81 -10 147.5 -33t114.5 -58l57 45l19 -24l-223 -197q-63 55 -139.5 85t-155.5 30q-28 0 -53.5 -5 -t-51.5 -16zM75 1069q116 85 194.5 161.5t128.5 153.5q60 -93 136.5 -170t178.5 -145q-89 5 -169 33.5t-148 79.5q-75 -50 -157 -78.5t-164 -34.5z" /> - <glyph glyph-name="edieresis" unicode="ë" horiz-adv-x="786" -d="M401 872l-61 -16v-461l244 164zM55 49q0 55 26.5 94t78.5 60v487q0 56 -14 97t-44 75h70q112 0 223.5 40.5t175.5 103.5q30 -98 82 -189t121 -166l-434 -295v-134q81 -10 147.5 -33t114.5 -58l57 45l19 -24l-223 -197q-63 55 -139.5 85t-155.5 30q-28 0 -53.5 -5 -t-51.5 -16zM439 1184l106 126l3 -2q66 -85 114 -85q11 0 22 2.5t23 6.5q-30 -64 -64.5 -94t-78.5 -30q-36 0 -68.5 19.5t-56.5 56.5zM77 1184l106 127q43 -58 65.5 -73t51.5 -15q10 0 21 2.5t23 6.5q-29 -64 -63.5 -94t-79.5 -30q-35 0 -67.5 19.5t-56.5 56.5z" /> - <glyph glyph-name="igrave" unicode="ì" horiz-adv-x="508" -d="M317 -20q-90 24 -126.5 97t-36.5 253v413q-25 13 -44 28.5t-36 37.5l-51 -31l-15 23q66 41 128 89.5t116 102.5q22 -49 55.5 -75.5t73.5 -26.5q7 0 18.5 4t38.5 16q-2 -49 -27.5 -85.5t-76.5 -63.5v-424q0 -103 32 -139t115 -39q-56 -47 -97.5 -92.5t-66.5 -87.5z -M67 1350q68 -113 161.5 -166.5t223.5 -53.5h22q-38 -25 -81.5 -37t-96.5 -12q-105 0 -191 49.5t-141 141.5l-28 -12l-7 16q56 27 86 43t52 31z" /> - <glyph glyph-name="iacute" unicode="í" horiz-adv-x="508" -d="M317 -20q-90 24 -126.5 97t-36.5 253v413q-25 13 -44 28.5t-36 37.5l-51 -31l-15 23q66 41 128 89.5t116 102.5q22 -49 55.5 -75.5t73.5 -26.5q7 0 18.5 4t38.5 16q-2 -49 -27.5 -85.5t-76.5 -63.5v-424q0 -103 32 -139t115 -39q-56 -47 -97.5 -92.5t-66.5 -87.5z -M441 1350q22 -15 52 -31t86 -43l-5 -16l-28 12q-55 -92 -141 -141.5t-191 -49.5q-53 0 -96.5 12t-81.5 37h22q130 0 222 53t161 167z" /> - <glyph glyph-name="icircumflex" unicode="î" horiz-adv-x="508" -d="M317 -20q-90 24 -126.5 97t-36.5 253v413q-25 13 -44 28.5t-36 37.5l-51 -31l-15 23q66 41 128 89.5t116 102.5q22 -49 55.5 -75.5t73.5 -26.5q7 0 18.5 4t38.5 16q-2 -49 -27.5 -85.5t-76.5 -63.5v-424q0 -103 32 -139t115 -39q-56 -47 -97.5 -92.5t-66.5 -87.5z -M-64 1069q116 85 194.5 161.5t128.5 153.5q60 -93 136.5 -170t178.5 -145q-89 5 -169 33.5t-148 79.5q-75 -50 -157 -78.5t-164 -34.5z" /> - <glyph glyph-name="idieresis" unicode="ï" horiz-adv-x="508" -d="M317 -20q-90 24 -126.5 97t-36.5 253v413q-25 13 -44 28.5t-36 37.5l-51 -31l-15 23q66 41 128 89.5t116 102.5q22 -49 55.5 -75.5t73.5 -26.5q7 0 18.5 4t38.5 16q-2 -49 -27.5 -85.5t-76.5 -63.5v-424q0 -103 32 -139t115 -39q-56 -47 -97.5 -92.5t-66.5 -87.5z -M300 1184l106 126l3 -2q66 -85 114 -85q11 0 22 2.5t23 6.5q-30 -64 -64.5 -94t-78.5 -30q-36 0 -68.5 19.5t-56.5 56.5zM-62 1184l106 127q43 -58 65.5 -73t51.5 -15q10 0 21 2.5t23 6.5q-29 -64 -63.5 -94t-79.5 -30q-35 0 -67.5 19.5t-56.5 56.5z" /> - <glyph glyph-name="eth" unicode="ð" -d="M342 236q51 -19 87 -49t63 -74q21 7 50 14.5t78 17.5l1 590q0 52 -7.5 95t-21.5 79q-56 -27 -119 -47t-131 -33v-593zM311 -37q-43 53 -94.5 82t-103.5 29q-15 0 -56 -7q-5 -1 -8 -1q8 48 35.5 86t77.5 69v465q0 49 -10.5 88t-34.5 80q15 -1 32.5 -1.5t49.5 -0.5 -q105 0 200.5 21.5t178.5 64.5q-25 52 -59.5 96t-78.5 82l-264 -117l-41 43l262 117q-52 40 -103.5 75t-105.5 66l156 60q41 -21 96.5 -57t116.5 -82l219 90l43 -43l-215 -88q102 -93 149.5 -204t47.5 -257v-387q0 -66 10 -118t32 -105q-36 5 -67 7.5t-57 2.5 -q-114 0 -211.5 -37t-196.5 -119z" /> - <glyph glyph-name="ntilde" unicode="ñ" horiz-adv-x="948" -d="M297 -31q-40 64 -100.5 100.5t-124.5 36.5h-20t-15 -1q20 34 50 60t73 46v442q0 88 -28 116.5t-112 37.5q73 46 121 94t82 109q63 -36 90 -103t27 -192v-19l367 305q23 -64 56.5 -94t80.5 -30q5 0 12 1t20 4q-11 -33 -31.5 -58.5t-53.5 -47.5v-465q0 -79 35 -114.5 -t114 -38.5q-47 -41 -89 -88.5t-79 -100.5q-91 24 -126.5 79t-35.5 194v501q-22 13 -42 31t-40 41l-188 -162v-440q55 -18 86 -39.5t53 -54.5q-57 -26 -101 -62.5t-81 -87.5zM198 1110q19 79 80 126.5t143 47.5q41 0 126 -20.5t132 -20.5q35 0 62 8t51 25q-37 -76 -107 -119 -t-155 -43q-41 0 -111.5 20.5t-103.5 20.5q-37 0 -64 -10.5t-53 -34.5z" /> - <glyph glyph-name="ograve" unicode="ò" -d="M342 233q52 -19 88.5 -49t61.5 -73q21 7 49.5 14t78.5 18l1 602q-45 10 -81 37.5t-73 79.5q-12 -3 -35 -10q-60 -17 -90 -23v-596zM49 66q8 48 34.5 85t76.5 68v467q0 51 -10.5 89.5t-34.5 78.5q15 -1 33.5 -1.5t50.5 -0.5q135 0 257.5 39.5t225.5 116.5 -q26 -67 65.5 -102.5t88.5 -35.5q9 0 34 6q7 2 11 3q-13 -33 -32 -57t-48 -44v-446q0 -68 10 -121t33 -105q-53 8 -79 10.5t-46 2.5q-114 0 -212 -38t-198 -120q-43 53 -94.5 82t-103.5 29q-14 0 -29 -1.5t-33 -4.5zM307 1350q68 -113 161.5 -166.5t223.5 -53.5h22 -q-38 -25 -81.5 -37t-96.5 -12q-105 0 -191 49.5t-141 141.5l-28 -12l-7 16q56 27 86 43t52 31z" /> - <glyph glyph-name="oacute" unicode="ó" -d="M342 233q52 -19 88.5 -49t61.5 -73q21 7 49.5 14t78.5 18l1 602q-45 10 -81 37.5t-73 79.5q-12 -3 -35 -10q-60 -17 -90 -23v-596zM49 66q8 48 34.5 85t76.5 68v467q0 51 -10.5 89.5t-34.5 78.5q15 -1 33.5 -1.5t50.5 -0.5q135 0 257.5 39.5t225.5 116.5 -q26 -67 65.5 -102.5t88.5 -35.5q9 0 34 6q7 2 11 3q-13 -33 -32 -57t-48 -44v-446q0 -68 10 -121t33 -105q-53 8 -79 10.5t-46 2.5q-114 0 -212 -38t-198 -120q-43 53 -94.5 82t-103.5 29q-14 0 -29 -1.5t-33 -4.5zM681 1350q22 -15 52 -31t86 -43l-5 -16l-28 12 -q-55 -92 -141 -141.5t-191 -49.5q-53 0 -96.5 12t-81.5 37h22q130 0 222 53t161 167z" /> - <glyph glyph-name="ocircumflex" unicode="ô" -d="M342 233q52 -19 88.5 -49t61.5 -73q21 7 49.5 14t78.5 18l1 602q-45 10 -81 37.5t-73 79.5q-12 -3 -35 -10q-60 -17 -90 -23v-596zM49 66q8 48 34.5 85t76.5 68v467q0 51 -10.5 89.5t-34.5 78.5q15 -1 33.5 -1.5t50.5 -0.5q135 0 257.5 39.5t225.5 116.5 -q26 -67 65.5 -102.5t88.5 -35.5q9 0 34 6q7 2 11 3q-13 -33 -32 -57t-48 -44v-446q0 -68 10 -121t33 -105q-53 8 -79 10.5t-46 2.5q-114 0 -212 -38t-198 -120q-43 53 -94.5 82t-103.5 29q-14 0 -29 -1.5t-33 -4.5zM176 1069q116 85 194.5 161.5t128.5 153.5 -q60 -93 136.5 -170t178.5 -145q-89 5 -169 33.5t-148 79.5q-75 -50 -157 -78.5t-164 -34.5z" /> - <glyph glyph-name="otilde" unicode="õ" -d="M342 233q52 -19 88.5 -49t61.5 -73q21 7 49.5 14t78.5 18l1 602q-45 10 -81 37.5t-73 79.5q-12 -3 -35 -10q-60 -17 -90 -23v-596zM49 66q8 48 34.5 85t76.5 68v467q0 51 -10.5 89.5t-34.5 78.5q15 -1 33.5 -1.5t50.5 -0.5q135 0 257.5 39.5t225.5 116.5 -q26 -67 65.5 -102.5t88.5 -35.5q9 0 34 6q7 2 11 3q-13 -33 -32 -57t-48 -44v-446q0 -68 10 -121t33 -105q-53 8 -79 10.5t-46 2.5q-114 0 -212 -38t-198 -120q-43 53 -94.5 82t-103.5 29q-14 0 -29 -1.5t-33 -4.5zM198 1110q19 79 80 126.5t143 47.5q41 0 126 -20.5 -t132 -20.5q35 0 62 8t51 25q-37 -76 -107 -119t-155 -43q-41 0 -111.5 20.5t-103.5 20.5q-37 0 -64 -10.5t-53 -34.5z" /> - <glyph glyph-name="odieresis" unicode="ö" -d="M342 233q52 -19 88.5 -49t61.5 -73q21 7 49.5 14t78.5 18l1 602q-45 10 -81 37.5t-73 79.5q-12 -3 -35 -10q-60 -17 -90 -23v-596zM49 66q8 48 34.5 85t76.5 68v467q0 51 -10.5 89.5t-34.5 78.5q15 -1 33.5 -1.5t50.5 -0.5q135 0 257.5 39.5t225.5 116.5 -q26 -67 65.5 -102.5t88.5 -35.5q9 0 34 6q7 2 11 3q-13 -33 -32 -57t-48 -44v-446q0 -68 10 -121t33 -105q-53 8 -79 10.5t-46 2.5q-114 0 -212 -38t-198 -120q-43 53 -94.5 82t-103.5 29q-14 0 -29 -1.5t-33 -4.5zM540 1184l106 126l3 -2q66 -85 114 -85q11 0 22 2.5 -t23 6.5q-30 -64 -64.5 -94t-78.5 -30q-36 0 -68.5 19.5t-56.5 56.5zM178 1184l106 127q43 -58 65.5 -73t51.5 -15q10 0 21 2.5t23 6.5q-29 -64 -63.5 -94t-79.5 -30q-35 0 -67.5 19.5t-56.5 56.5z" /> - <glyph glyph-name="divide" unicode="÷" horiz-adv-x="1706" -d="M854 367q51 0 88 -37t37 -88q0 -52 -36.5 -88.5t-88.5 -36.5q-53 0 -89 36t-36 89q0 51 37 88t88 37zM254 680h1198v-139h-1198v139zM854 1106q51 0 88 -37.5t37 -89.5q0 -51 -36.5 -88t-88.5 -37t-88.5 36.5t-36.5 88.5t37 89.5t88 37.5z" /> - <glyph glyph-name="oslash" unicode="ø" -d="M342 305l272 440q-44 13 -78 40t-69 77q-31 -9 -61.5 -17t-63.5 -16v-524zM342 233q52 -19 88.5 -49t61.5 -73q20 6 46.5 13t82.5 19v553l-279 -442v-21zM49 66q8 48 35.5 86t77.5 67v459q0 55 -11 95t-36 81q15 -1 33.5 -1.5t50.5 -0.5q135 0 257.5 39.5t224.5 115.5 -q3 -4 7 -13q20 -44 33 -68l115 182l26 -14l-117 -187q25 -19 46 -28t43 -9q7 0 17 2t29 6q-12 -32 -31 -56t-48 -44v-452q0 -67 10 -117.5t33 -102.5q-53 8 -79 10.5t-46 2.5q-114 0 -212 -38t-198 -120q-22 27 -46 47t-52 35l-125 -201l-27 23l123 194q-3 1 -11 3 -q-41 10 -60 10q-14 0 -29 -1.5t-33 -4.5z" /> - <glyph glyph-name="ugrave" unicode="ù" horiz-adv-x="948" -d="M678 1006q32 -59 95 -96.5t130 -37.5h10q-22 -37 -51 -62.5t-71 -45.5v-459q0 -72 27.5 -99.5t111.5 -35.5q-70 -41 -119.5 -90.5t-83.5 -112.5q-61 37 -88 100t-29 176l-293 -263q-27 56 -78 92.5t-102 36.5q-11 0 -24.5 -3t-38.5 -12q10 34 31 59.5t55 47.5v452 -q0 91 -33.5 126.5t-116.5 39.5q61 51 104 99.5t64 91.5q92 -24 127 -85t35 -241v-451q25 -13 50 -36.5t56 -61.5l164 139v488q-40 15 -59.5 25t-32.5 22l-39 -29l-14 25q76 50 127 98.5t86 102.5zM319 1350q68 -113 161.5 -166.5t223.5 -53.5h22q-38 -25 -81.5 -37 -t-96.5 -12q-105 0 -191 49.5t-141 141.5l-28 -12l-7 16q56 27 86 43t52 31z" /> - <glyph glyph-name="uacute" unicode="ú" horiz-adv-x="948" -d="M678 1006q32 -59 95 -96.5t130 -37.5h10q-22 -37 -51 -62.5t-71 -45.5v-459q0 -72 27.5 -99.5t111.5 -35.5q-70 -41 -119.5 -90.5t-83.5 -112.5q-61 37 -88 100t-29 176l-293 -263q-27 56 -78 92.5t-102 36.5q-11 0 -24.5 -3t-38.5 -12q10 34 31 59.5t55 47.5v452 -q0 91 -33.5 126.5t-116.5 39.5q61 51 104 99.5t64 91.5q92 -24 127 -85t35 -241v-451q25 -13 50 -36.5t56 -61.5l164 139v488q-40 15 -59.5 25t-32.5 22l-39 -29l-14 25q76 50 127 98.5t86 102.5zM693 1350q22 -15 52 -31t86 -43l-5 -16l-28 12q-55 -92 -141 -141.5 -t-191 -49.5q-53 0 -96.5 12t-81.5 37h22q130 0 222 53t161 167z" /> - <glyph glyph-name="ucircumflex" unicode="û" horiz-adv-x="948" -d="M678 1006q32 -59 95 -96.5t130 -37.5h10q-22 -37 -51 -62.5t-71 -45.5v-459q0 -72 27.5 -99.5t111.5 -35.5q-70 -41 -119.5 -90.5t-83.5 -112.5q-61 37 -88 100t-29 176l-293 -263q-27 56 -78 92.5t-102 36.5q-11 0 -24.5 -3t-38.5 -12q10 34 31 59.5t55 47.5v452 -q0 91 -33.5 126.5t-116.5 39.5q61 51 104 99.5t64 91.5q92 -24 127 -85t35 -241v-451q25 -13 50 -36.5t56 -61.5l164 139v488q-40 15 -59.5 25t-32.5 22l-39 -29l-14 25q76 50 127 98.5t86 102.5zM188 1069q116 85 194.5 161.5t128.5 153.5q60 -93 136.5 -170t178.5 -145 -q-89 5 -169 33.5t-148 79.5q-75 -50 -157 -78.5t-164 -34.5z" /> - <glyph glyph-name="udieresis" unicode="ü" horiz-adv-x="948" -d="M678 1006q32 -59 95 -96.5t130 -37.5h10q-22 -37 -51 -62.5t-71 -45.5v-459q0 -72 27.5 -99.5t111.5 -35.5q-70 -41 -119.5 -90.5t-83.5 -112.5q-61 37 -88 100t-29 176l-293 -263q-27 56 -78 92.5t-102 36.5q-11 0 -24.5 -3t-38.5 -12q10 34 31 59.5t55 47.5v452 -q0 91 -33.5 126.5t-116.5 39.5q61 51 104 99.5t64 91.5q92 -24 127 -85t35 -241v-451q25 -13 50 -36.5t56 -61.5l164 139v488q-40 15 -59.5 25t-32.5 22l-39 -29l-14 25q76 50 127 98.5t86 102.5zM552 1184l106 126l3 -2q66 -85 114 -85q11 0 22 2.5t23 6.5 -q-30 -64 -64.5 -94t-78.5 -30q-36 0 -68.5 19.5t-56.5 56.5zM190 1184l106 127q43 -58 65.5 -73t51.5 -15q10 0 21 2.5t23 6.5q-29 -64 -63.5 -94t-79.5 -30q-35 0 -67.5 19.5t-56.5 56.5z" /> - <glyph glyph-name="yacute" unicode="ý" horiz-adv-x="948" -d="M678 1006q32 -59 95 -96.5t130 -37.5h10q-20 -35 -49 -61t-71 -47v-633q16 -35 23 -67t7 -66q0 -160 -129 -270.5t-317 -110.5q-94 0 -175 56.5t-98 56.5q-28 0 -47 -16.5t-34 -55.5q-3 26 -4 38t-1 21q0 66 42 113t100 47q40 0 75 -23.5t80 -82.5q46 -63 81 -85t81 -22 -q79 0 138 57t59 136q0 34 -31 121.5t-31 181.5v84l-295 -264q-27 56 -78 92.5t-102 36.5q-11 0 -24.5 -3t-38.5 -12q11 35 32 60t56 47v452q0 88 -35 125.5t-116 41.5l7 6q104 91 160 184q91 -24 127.5 -84t36.5 -197v-496q23 -13 47 -35t57 -63l166 139v488q-44 16 -63 26 -t-31 21l-39 -29l-14 25q76 50 127 98.5t86 102.5zM662 1350q22 -15 52 -31t86 -43l-5 -16l-28 12q-55 -92 -141 -141.5t-191 -49.5q-53 0 -96.5 12t-81.5 37h22q130 0 222 53t161 167z" /> - <glyph glyph-name="thorn" unicode="þ" horiz-adv-x="901" -d="M313 676v-416q71 -16 127 -55.5t92 -98.5l62 25v614q-26 14 -49.5 34.5t-44.5 47.5zM135 -166v1268q0 84 -14.5 121t-52.5 71q80 9 153.5 47t151.5 111l14 -14q-40 -46 -57 -105t-17 -211v-401l346 289q23 -62 63.5 -97.5t88.5 -35.5q10 0 34 5q7 2 11 3 -q-12 -33 -32.5 -57.5t-49.5 -43.5v-440q0 -61 11 -118t34 -113q-7 0 -22 1q-40 3 -54 3q-82 0 -183.5 -37.5t-151.5 -89.5q-19 27 -41.5 45t-53.5 28v-188q0 -68 8.5 -111t26.5 -65q-70 -9 -156.5 -53.5t-113.5 -48.5q29 38 43 96.5t14 140.5z" /> - <glyph glyph-name="ydieresis" unicode="ÿ" horiz-adv-x="948" -d="M678 1006q32 -59 95 -96.5t130 -37.5h10q-20 -35 -49 -61t-71 -47v-633q16 -35 23 -67t7 -66q0 -160 -129 -270.5t-317 -110.5q-94 0 -175 56.5t-98 56.5q-28 0 -47 -16.5t-34 -55.5q-3 26 -4 38t-1 21q0 66 42 113t100 47q40 0 75 -23.5t80 -82.5q46 -63 81 -85t81 -22 -q79 0 138 57t59 136q0 34 -31 121.5t-31 181.5v84l-295 -264q-27 56 -78 92.5t-102 36.5q-11 0 -24.5 -3t-38.5 -12q11 35 32 60t56 47v452q0 88 -35 125.5t-116 41.5l7 6q104 91 160 184q91 -24 127.5 -84t36.5 -197v-496q23 -13 47 -35t57 -63l166 139v488q-44 16 -63 26 -t-31 21l-39 -29l-14 25q76 50 127 98.5t86 102.5zM521 1184l106 126l3 -2q66 -85 114 -85q11 0 22 2.5t23 6.5q-30 -64 -64.5 -94t-78.5 -30q-36 0 -68.5 19.5t-56.5 56.5zM159 1184l106 127q43 -58 65.5 -73t51.5 -15q10 0 21 2.5t23 6.5q-29 -64 -63.5 -94t-79.5 -30 -q-35 0 -67.5 19.5t-56.5 56.5z" /> - <glyph glyph-name="Cacute" unicode="Ć" horiz-adv-x="1280" -d="M557 264q29 28 41 64t12 127v698l-147 -78l-10 25q199 106 325.5 187.5t214.5 158.5q20 -61 53 -92t78 -31q25 0 47.5 10t42.5 31q-10 -70 -54.5 -119t-112.5 -67v-1002q54 21 112.5 66.5t124.5 117.5q-91 -205 -241.5 -310t-356.5 -105q-260 0 -425 190t-165 488 -q0 250 132 462.5t358 323.5q-146 -131 -217.5 -294t-71.5 -365q0 -306 137 -462.5t406 -156.5q48 0 91.5 8.5t88.5 26.5v1007q-5 -1 -10 -1.5t-15 -0.5q-54 0 -93 31t-62 92l-39 -24v-674q0 -144 -56.5 -220t-187.5 -112zM960 1844q22 -15 52 -31t86 -43l-5 -16l-28 12 -q-55 -92 -141 -141.5t-191 -49.5q-53 0 -96.5 12t-81.5 37h22q130 0 222 53t161 167z" /> - <glyph glyph-name="cacute" unicode="ć" horiz-adv-x="735" -d="M338 222q76 -5 145 -29t117 -62l57 47l21 -24l-223 -199q-80 60 -150 88.5t-139 28.5q-29 0 -57 -6t-58 -19q0 52 26 90.5t77 63.5v491q0 65 -12.5 101t-40.5 69q13 -1 27.5 -1.5t41.5 -0.5q98 0 201.5 38.5t160.5 96.5q32 -52 72.5 -80t83.5 -28q13 0 39 3q4 1 6 1 -q-42 -65 -91.5 -98t-102.5 -33q-59 0 -101 28.5t-57 79.5l-43 -14v-632zM609 1350q22 -15 52 -31t86 -43l-5 -16l-28 12q-55 -92 -141 -141.5t-191 -49.5q-53 0 -96.5 12t-81.5 37h22q130 0 222 53t161 167z" /> - <glyph glyph-name="Ccaron" unicode="Č" horiz-adv-x="1280" -d="M557 264q29 28 41 64t12 127v698l-147 -78l-10 25q199 106 325.5 187.5t214.5 158.5q20 -61 53 -92t78 -31q25 0 47.5 10t42.5 31q-10 -70 -54.5 -119t-112.5 -67v-1002q54 21 112.5 66.5t124.5 117.5q-91 -205 -241.5 -310t-356.5 -105q-260 0 -425 190t-165 488 -q0 250 132 462.5t358 323.5q-146 -131 -217.5 -294t-71.5 -365q0 -306 137 -462.5t406 -156.5q48 0 91.5 8.5t88.5 26.5v1007q-5 -1 -10 -1.5t-15 -0.5q-54 0 -93 31t-62 92l-39 -24v-674q0 -144 -56.5 -220t-187.5 -112zM1093 1878q-116 -84 -194.5 -161t-128.5 -154 -q-60 93 -136.5 170t-178.5 145q87 -4 166.5 -32.5t148.5 -79.5q75 49 157.5 77.5t165.5 34.5z" /> - <glyph glyph-name="ccaron" unicode="č" horiz-adv-x="735" -d="M338 222q76 -5 145 -29t117 -62l57 47l21 -24l-223 -199q-80 60 -150 88.5t-139 28.5q-29 0 -57 -6t-58 -19q0 52 26 90.5t77 63.5v491q0 65 -12.5 101t-40.5 69q13 -1 27.5 -1.5t41.5 -0.5q98 0 201.5 38.5t160.5 96.5q32 -52 72.5 -80t83.5 -28q13 0 39 3q4 1 6 1 -q-42 -65 -91.5 -98t-102.5 -33q-59 0 -101 28.5t-57 79.5l-43 -14v-632zM742 1384q-116 -84 -194.5 -161t-128.5 -154q-60 93 -136.5 170t-178.5 145q87 -4 166.5 -32.5t148.5 -79.5q75 49 157.5 77.5t165.5 34.5z" /> - <glyph glyph-name="dcroat" unicode="đ" -d="M348 211q51 -15 88.5 -41t59.5 -59q24 10 52.5 18t63.5 14v607l-116 122q-40 -29 -78 -48t-70 -25v-588zM62 58q5 39 29.5 70t78.5 65v446q0 77 -12.5 108.5t-42.5 57.5q15 -1 29 -1.5t30 -0.5q97 0 166.5 21.5t136.5 70.5l-104 119h-324v69h260l-35 39 -q-69 75 -112.5 112t-89.5 66q98 4 167 28.5t109 70.5v-29q0 -32 15.5 -62t66.5 -85l127 -140h317v-69h-253l120 -125q5 -5 14 -15q39 -43 83 -53q-24 -28 -34.5 -58.5t-10.5 -74.5v-428q0 -58 9 -90.5t29 -65.5q-4 1 -12 2q-73 11 -102 11q-123 0 -219 -38t-162 -112 -q-55 56 -103 83.5t-92 27.5q-16 0 -35 -5t-44 -15z" /> - <glyph glyph-name="Gbreve" unicode="Ğ" horiz-adv-x="1360" -d="M729 659l381 621q-70 -60 -110.5 -81t-77.5 -21q-42 0 -70.5 20.5t-50.5 67.5l-72 -52v-555zM840 25q77 26 126 75.5t72 124.5q-27 13 -51 19t-49 6q-28 0 -51.5 -5.5t-46.5 -17.5v-202zM840 262q28 8 54 12.5t50 4.5q43 0 91 -18q7 -2 9 -3q9 36 13 70t4 65 -q0 25 -2.5 53.5t-7.5 60.5q-23 -16 -49.5 -24t-57.5 -8t-55 5.5t-49 17.5v-236zM840 526q29 -12 55.5 -18t50.5 -6q28 0 53 8t48 25q-21 96 -75 154.5t-132 70.5v-234zM498 162q19 30 28 59t9 70v10v795l-86 -47v34q126 59 256 149t266 214q20 -48 49 -72t65 -24 -q19 0 43.5 13.5t57.5 41.5l22 -14l-360 -594q6 0 17.5 1t17.5 1q176 0 288.5 -105.5t112.5 -265.5q0 -191 -172.5 -334t-409.5 -143q-270 0 -460.5 195t-190.5 475q0 231 148.5 449t375.5 321q-154 -140 -229.5 -324.5t-75.5 -425.5q0 -289 121 -467t311 -178q27 0 54 4.5 -t57 14.5v730l-84 -137v-69q0 -189 -52.5 -261.5t-178.5 -115.5zM512 1827h51q15 -63 73 -93t165 -30q105 0 162.5 30.5t73.5 92.5h53q-20 -120 -94 -184t-195 -64q-120 0 -193.5 63.5t-95.5 184.5z" /> - <glyph glyph-name="gbreve" unicode="ğ" -d="M606 262v483q-46 12 -82 40t-69 77q-38 -14 -68.5 -22t-56.5 -11v-557q41 -19 73 -46.5t58 -65.5q13 9 61.5 45.5t83.5 56.5zM786 203q52 -27 77.5 -63t25.5 -83q0 -51 -33 -97t-141 -126l-252 -186q-36 43 -85 64.5t-114 21.5q-25 0 -56 -5.5t-71 -17.5q65 91 128 129.5 -t145 38.5q54 0 102.5 -18t93.5 -56q66 36 96.5 73t30.5 81q0 71 -88 133q-9 6 -13 9q-13 9 -19.5 32t-6.5 66v22q-83 -57 -159.5 -114.5t-143.5 -112.5q-47 56 -98.5 85.5t-104.5 29.5q-9 0 -22.5 -2l-40.5 -6q8 49 34.5 86.5t75.5 68.5v426q0 59 -10.5 96.5t-33.5 75.5 -q15 -1 33.5 -1.5t51.5 -0.5q135 0 257 39.5t225 116.5q25 -67 65 -102.5t88 -35.5q10 0 34 6q8 2 11 3q-12 -33 -32 -57.5t-50 -43.5v-575zM179 1333h51q15 -63 73 -93t165 -30q105 0 162.5 30.5t73.5 92.5h53q-20 -120 -94 -184t-195 -64q-120 0 -193.5 63.5t-95.5 184.5z -" /> - <glyph glyph-name="Idotaccent" unicode="İ" horiz-adv-x="1090" -d="M136 1209q33 107 107 170t167 63q46 0 138.5 -21.5t141.5 -21.5q31 0 57 5.5t54 18.5q-51 -100 -114.5 -146t-149.5 -46q-40 0 -123.5 15.5t-130.5 15.5q-63 0 -145 -52zM657 590v-4q0 -183 -55 -258.5t-188 -102.5q32 29 45.5 76t13.5 145v199q-6 1 -13.5 1.5t-21.5 0.5 -q-53 0 -82.5 -19.5t-38.5 -59.5q-17 20 -24.5 42.5t-7.5 55.5q0 83 42 131.5t115 48.5q4 0 12.5 -1t12.5 -1v45q0 97 51 159t193 130q-27 -36 -40.5 -96t-13.5 -146v-346zM-37 -43q10 102 88.5 180t163.5 78q87 0 191 -104q23 -23 36 -35q40 -36 77 -54t73 -18 -q90 0 133 67.5t43 209.5v757q0 147 56.5 217.5t195.5 147.5q-37 -37 -52.5 -77t-15.5 -118v-26v-848q0 -188 -128 -284.5t-378 -96.5q-85 0 -175 45t-124 45q-43 0 -90.5 -22t-93.5 -64zM514 1659l119 144q40 -57 69 -79t62 -22q11 0 23.5 3t28.5 10q-39 -78 -75.5 -110 -t-84.5 -32q-40 0 -77.5 23t-64.5 63z" /> - <glyph glyph-name="dotlessi" unicode="ı" horiz-adv-x="508" -d="M317 -20q-90 24 -126.5 97t-36.5 253v413q-25 13 -44 28.5t-36 37.5l-51 -31l-15 23q66 41 128 89.5t116 102.5q22 -49 55.5 -75.5t73.5 -26.5q7 0 18.5 4t38.5 16q-2 -49 -27.5 -85.5t-76.5 -63.5v-424q0 -103 32 -139t115 -39q-56 -47 -97.5 -92.5t-66.5 -87.5z" /> - <glyph glyph-name="Lslash" unicode="Ł" horiz-adv-x="1280" -d="M53 1184q32 109 97 171t147 62q41 0 122 -21.5t126 -21.5q24 0 46.5 5.5t51.5 19.5q-46 -101 -101.5 -147t-131.5 -46q-36 0 -110.5 16.5t-115.5 16.5q-50 0 -120 -48q-7 -5 -11 -7zM506 287q31 33 44 75.5t13 139.5v151l-112 -69v-72q0 -137 -60 -217t-211 -154 -q44 52 62 109t18 172v41l-227 -139v106l227 141v271q0 113 47 172.5t195 130.5q-28 -38 -39.5 -88t-11.5 -144v-223l112 70v225q0 113 32 178t107 133q79 73 157 111.5t147 38.5q53 0 96.5 -19t87.5 -61l39 35l18 -19q-45 -40 -84.5 -87.5t-95.5 -133.5q-98 96 -141 124 -t-78 28q-54 0 -76 -32.5t-22 -113.5v-288l272 168v-109l-272 -170v-139q0 -162 -55.5 -237t-188.5 -105zM180 -63q76 136 254 224.5t383 88.5q63 0 125 -9t125 -28v481q-14 6 -21.5 18t-7.5 27q0 23 13 38.5t30 15.5q21 0 33 -14t12 -38q0 -15 -6.5 -25t-21.5 -20v-493 -l80 -35l36 41l23 -19q-49 -61 -91 -123t-79 -128q-111 54 -225.5 82t-227.5 28q-111 0 -217.5 -27.5t-216.5 -84.5z" /> - <glyph glyph-name="lslash" unicode="ł" horiz-adv-x="516" -d="M55 51q11 44 39 75.5t74 51.5v424l-166 -117v88l166 117v416q0 79 -15 116.5t-53 71.5q83 9 156.5 46t153.5 112l12 -14q-39 -45 -55.5 -102.5t-16.5 -192.5v-21v-331l166 116v-88l-166 -117v-481q43 -16 73 -40t54 -60l51 37l19 -27q-81 -58 -137.5 -108.5t-73.5 -77.5 -q-26 52 -79 85t-112 33q-18 0 -41 -3t-49 -9z" /> - <glyph glyph-name="OE" unicode="Œ" horiz-adv-x="1847" -d="M616 389q25 8 55 12.5t66 4.5t70 -7.5t67 -21.5v481q-31 -12 -66 -18t-71 -6q-33 0 -62.5 5t-58.5 15v-465zM588 1176v10q0 96 69 167.5t164 71.5q67 0 169.5 -20.5t139.5 -20.5q25 0 48 7.5t43 21.5q-40 -114 -94 -161.5t-142 -47.5q-58 0 -151.5 23.5t-126.5 23.5 -q-50 0 -76.5 -17t-42.5 -58zM1651 -51q-74 51 -175.5 74.5t-256.5 23.5q-104 0 -282.5 -40t-260.5 -40q-241 0 -409.5 194.5t-168.5 479.5q0 251 133.5 477t339.5 324q-123 -116 -188.5 -319.5t-65.5 -475.5q0 -258 72.5 -423.5t198.5 -198.5v1007h28v-143q27 -13 57.5 -19 -t67.5 -6t69 6.5t64 20.5q-1 8 -1.5 15.5t-0.5 19.5q0 79 56 136t194 114q-37 -49 -52 -92t-15 -97v-547q0 -115 -49.5 -172t-186.5 -139q30 38 42.5 82.5t12.5 114.5v22q-38 14 -74.5 21.5t-70.5 7.5q-28 0 -56 -4.5t-57 -14.5l1 -340q25 -3 45 -4.5t36 -1.5q90 0 244 91 -t234 120v783q0 207 97 324.5t265 117.5q48 0 95.5 -13t101.5 -40l18 22l27 -14q-44 -58 -79.5 -120.5t-58.5 -121.5q-44 53 -103.5 80t-129.5 27q-101 0 -153 -68.5t-52 -202.5v-292q48 82 110.5 121.5t145.5 39.5q51 0 97.5 -14t91.5 -43l26 29l25 -17q-43 -52 -82 -114 -t-74 -136q-25 57 -78.5 89t-119.5 32q-44 0 -77 -13.5t-65 -43.5v-406q50 13 96.5 19t92.5 6q99 0 183.5 -25t160.5 -77l43 65l24 -20q-64 -96 -98.5 -152t-54.5 -96z" /> - <glyph glyph-name="oe" unicode="œ" horiz-adv-x="1249" -d="M860 872l-59 -8v-469l241 164zM340 233q57 -19 95.5 -51.5t58.5 -77.5q35 14 65 23t57 14v604q-44 14 -79.5 41t-69.5 76q-33 -12 -65 -20t-62 -13v-596zM49 66q8 48 34.5 85t76.5 68v467q0 52 -11 90t-34 78q16 -1 34.5 -1.5t49.5 -0.5q143 0 259 39.5t197 116.5 -q36 -62 71 -87.5t83 -25.5q41 0 89 24.5t122 86.5q57 -124 111 -212.5t106 -142.5l-436 -295v-135q78 -9 146 -33t116 -59l57 45l21 -22l-226 -197q-49 50 -287 147l-11 4q-79 -13 -157.5 -50t-150.5 -95q-43 53 -94.5 82t-103.5 29q-14 0 -29 -1.5t-33 -4.5z" /> - <glyph glyph-name="Scedilla" unicode="Ş" horiz-adv-x="1374" -d="M807 1028l63 90q-41 120 -115.5 186t-166.5 66q-95 0 -159 -49.5t-64 -118.5q0 -76 107.5 -118.5t334.5 -55.5zM16 0q78 128 231.5 206.5t325.5 78.5q100 0 182.5 -26.5t149.5 -80.5q173 186 219.5 264.5t46.5 149.5q0 113 -100 167.5t-360 78.5l-52 -88 -q221 -12 306.5 -58t85.5 -145q0 -62 -29 -113t-84 -88q5 19 7.5 34t2.5 28q0 68 -81 101.5t-316 53.5q-65 -126 -130 -188t-132 -62q-51 0 -85 34.5t-34 84.5q0 47 26.5 77t67.5 30q35 0 57.5 -26t22.5 -67q0 -20 -7.5 -39.5t-23.5 -39.5q3 -1 7 -1.5t8 -0.5q43 0 92 52 -t98 150q-215 17 -303 69.5t-88 160.5q0 48 17.5 89.5t54.5 82.5v-8q0 -92 92.5 -137.5t339.5 -67.5l47 88q-231 16 -327.5 71.5t-96.5 167.5q0 152 129 259.5t322 107.5q125 0 216 -36.5t140 -104.5l59 39l13 -29q-86 -59 -160 -132.5t-133 -160.5q252 -13 362.5 -84 -t110.5 -219q0 -86 -44 -171.5t-167 -221.5q-24 -27 -76 -83q-164 -178 -244 -294q-101 84 -201.5 121t-230.5 37q-82 0 -164 -27t-170 -84zM494 -408l-19 5q6 52 44 85t92 33q28 0 51 -12t47 -39l45 8v168h-123v250h49v-196h164v-154q0 -44 6 -64t20 -34q-18 7 -37.5 10.5 -t-39.5 3.5q-57 0 -97.5 -17t-68.5 -53q-22 30 -41 44t-39 14q-21 0 -35 -13.5t-18 -38.5z" /> - <glyph glyph-name="scedilla" unicode="ş" horiz-adv-x="887" -d="M385 487q53 59 146 155q169 174 186 239q-40 -45 -80.5 -67.5t-79.5 -22.5q-40 0 -74.5 24t-58.5 70l-88 -23v-375h49zM123 145q43 32 95.5 51t94.5 19q48 0 90 -24t86 -76l84 18v379h-100q-72 -81 -197.5 -199.5t-152.5 -167.5zM65 -31h-24q0 4 1 13t1 14q0 71 56.5 160 -t203.5 239h-186q21 33 30 65t9 79v245q0 27 -10.5 52t-30.5 47q10 -1 44.5 -3.5t55.5 -2.5q103 0 192 30.5t166 91.5q28 -35 56 -52t57 -17q30 0 47 17.5t21 51.5h32q-12 -86 -54.5 -166t-170.5 -229h227q-17 -15 -25.5 -48t-8.5 -87v-233q0 -59 8.5 -93t28.5 -67 -q-39 12 -77.5 18t-78.5 6q-95 0 -170.5 -33t-138.5 -102q-52 62 -88 86.5t-74 24.5q-41 0 -67.5 -28.5t-31.5 -78.5zM269 -408l-19 5q6 52 44 85t92 33q28 0 51 -12t47 -39l45 8v168h-123v250h49v-196h164v-154q0 -44 6 -64t20 -34q-18 7 -37.5 10.5t-39.5 3.5 -q-57 0 -97.5 -17t-68.5 -53q-22 30 -41 44t-39 14q-21 0 -35 -13.5t-18 -38.5z" /> - <glyph glyph-name="Scaron" unicode="Š" horiz-adv-x="1374" -d="M807 1028l63 90q-41 120 -115.5 186t-166.5 66q-95 0 -159 -49.5t-64 -118.5q0 -76 107.5 -118.5t334.5 -55.5zM16 0q78 128 231.5 206.5t325.5 78.5q100 0 182.5 -26.5t149.5 -80.5q173 186 219.5 264.5t46.5 149.5q0 113 -100 167.5t-360 78.5l-52 -88 -q221 -12 306.5 -58t85.5 -145q0 -62 -29 -113t-84 -88q5 19 7.5 34t2.5 28q0 68 -81 101.5t-316 53.5q-65 -126 -130 -188t-132 -62q-51 0 -85 34.5t-34 84.5q0 47 26.5 77t67.5 30q35 0 57.5 -26t22.5 -67q0 -20 -7.5 -39.5t-23.5 -39.5q3 -1 7 -1.5t8 -0.5q43 0 92 52 -t98 150q-215 17 -303 69.5t-88 160.5q0 48 17.5 89.5t54.5 82.5v-8q0 -92 92.5 -137.5t339.5 -67.5l47 88q-231 16 -327.5 71.5t-96.5 167.5q0 152 129 259.5t322 107.5q125 0 216 -36.5t140 -104.5l59 39l13 -29q-86 -59 -160 -132.5t-133 -160.5q252 -13 362.5 -84 -t110.5 -219q0 -86 -44 -171.5t-167 -221.5q-24 -27 -76 -83q-164 -178 -244 -294q-101 84 -201.5 121t-230.5 37q-82 0 -164 -27t-170 -84zM1128 1878q-116 -84 -194.5 -161t-128.5 -154q-60 93 -136.5 170t-178.5 145q87 -4 166.5 -32.5t148.5 -79.5q75 49 157.5 77.5 -t165.5 34.5z" /> - <glyph glyph-name="scaron" unicode="š" horiz-adv-x="887" -d="M385 487q53 59 146 155q169 174 186 239q-40 -45 -80.5 -67.5t-79.5 -22.5q-40 0 -74.5 24t-58.5 70l-88 -23v-375h49zM123 145q43 32 95.5 51t94.5 19q48 0 90 -24t86 -76l84 18v379h-100q-72 -81 -197.5 -199.5t-152.5 -167.5zM65 -31h-24q0 4 1 13t1 14q0 71 56.5 160 -t203.5 239h-186q21 33 30 65t9 79v245q0 27 -10.5 52t-30.5 47q10 -1 44.5 -3.5t55.5 -2.5q103 0 192 30.5t166 91.5q28 -35 56 -52t57 -17q30 0 47 17.5t21 51.5h32q-12 -86 -54.5 -166t-170.5 -229h227q-17 -15 -25.5 -48t-8.5 -87v-233q0 -59 8.5 -93t28.5 -67 -q-39 12 -77.5 18t-78.5 6q-95 0 -170.5 -33t-138.5 -102q-52 62 -88 86.5t-74 24.5q-41 0 -67.5 -28.5t-31.5 -78.5zM764 1384q-116 -84 -194.5 -161t-128.5 -154q-60 93 -136.5 170t-178.5 145q87 -4 166.5 -32.5t148.5 -79.5q75 49 157.5 77.5t165.5 34.5z" /> - <glyph glyph-name="Ydieresis" unicode="Ÿ" horiz-adv-x="1186" -d="M586 883q31 -21 60.5 -30t62.5 -9q28 0 55 9t53 28v272q-40 15 -68.5 37.5t-54.5 58.5l-108 -90v-276zM586 475q35 12 62.5 18.5t47.5 6.5q28 0 58.5 -7t62.5 -20v373q-33 -16 -60 -23.5t-50 -7.5q-22 0 -48 7t-73 28v-375zM586 25q13 -3 24.5 -5t20.5 -2 -q91 0 138.5 50.5t47.5 146.5v221q-32 18 -61.5 26.5t-59.5 8.5t-57.5 -8.5t-52.5 -26.5v-411zM557 35v1102l-115 -76v-746q0 -134 26 -191t89 -89zM752 -385l6 26q14 -5 26 -7.5t23 -2.5q46 0 80.5 31t34.5 70q0 24 -18.5 39.5t-49.5 15.5q-25 0 -70 -22.5t-90 -59.5l-6 -5 -q-121 -99 -203 -99q-80 0 -131 52.5t-51 133.5q0 70 46.5 115t158.5 82q-147 21 -201.5 78.5t-54.5 240.5v362q-14 3 -24.5 4t-20.5 1q-43 0 -68 -21.5t-39 -70.5q-15 33 -21.5 62t-6.5 58q0 82 35.5 124t105.5 42q12 0 21 -0.5t18 -0.5v237q0 74 -23.5 111.5t-70.5 37.5 -q-37 0 -64 -31t-39 -88q-8 36 -11 55.5t-3 35.5q0 94 60 159.5t151 65.5q98 0 144 -76.5t46 -239.5v-32l115 76v272h29v-250q67 53 135.5 116.5t136.5 137.5q25 -74 62.5 -110.5t89.5 -36.5q28 0 50.5 10t43.5 33v-11q0 -45 -24 -85t-74 -79v-911q0 -127 -64.5 -185.5 -t-265.5 -92.5q-191 -33 -257.5 -67.5t-66.5 -90.5q0 -29 22 -48.5t56 -19.5q42 0 165 85t202 85q68 0 117 -49t49 -119q0 -65 -45.5 -111t-110.5 -46q-15 0 -44 10q-8 3 -11 4zM760 1678l106 126l3 -2q66 -85 114 -85q11 0 22 2.5t23 6.5q-30 -64 -64.5 -94t-78.5 -30 -q-36 0 -68.5 19.5t-56.5 56.5zM398 1678l106 127q43 -58 65.5 -73t51.5 -15q10 0 21 2.5t23 6.5q-29 -64 -63.5 -94t-79.5 -30q-35 0 -67.5 19.5t-56.5 56.5z" /> - <glyph glyph-name="Zcaron" unicode="Ž" horiz-adv-x="1042" -d="M825 807q26 0 55.5 5t63.5 15q-45 -46 -71 -89.5t-42 -94.5q-14 15 -36.5 22t-63.5 7h-92q-72 -181 -210.5 -344t-381.5 -346q19 10 55 30q372 205 553 205q62 0 128 -15t137 -44l41 45l26 -23q-60 -61 -108.5 -122.5t-79.5 -116.5q-73 42 -164.5 64t-198.5 22 -q-95 0 -204 -21.5t-228 -62.5l-12 24q118 65 343 543q49 105 77 162h-105q-45 0 -142 -20l-5 -1q32 38 53 83.5t31 96.5q30 -12 56 -18t46 -6h131q99 259 425 539l42 36q-47 -24 -134 -74q-282 -161 -460 -161q-60 0 -113.5 17t-111.5 55l-43 -45l-21 22q70 76 117 139 -t74 117q35 -61 122.5 -93t221.5 -32q124 0 225.5 29.5t190.5 91.5l16 -27q-142 -110 -332 -609l-1 -5h130zM962 1878q-116 -84 -194.5 -161t-128.5 -154q-60 93 -136.5 170t-178.5 145q87 -4 166.5 -32.5t148.5 -79.5q75 49 157.5 77.5t165.5 34.5z" /> - <glyph glyph-name="zcaron" unicode="ž" horiz-adv-x="807" -d="M41 -27l-31 4q75 119 153 233t161 224h-101q-25 0 -53.5 -3t-56.5 -9q24 34 40 66.5t24 62.5h233l237 328q-95 -67 -175 -98t-157 -31q-74 0 -138.5 22.5t-117.5 67.5q61 37 115.5 83t104.5 101q16 -66 66.5 -100.5t129.5 -34.5q98 0 178.5 36.5t100.5 88.5l22 -15 -q-69 -112 -144.5 -224t-158.5 -226h123q29 0 46.5 4.5t35.5 13.5q-22 -33 -42 -67t-40 -70h-205l-239 -317q89 61 173.5 89.5t176.5 28.5q66 0 121 -15.5t106 -49.5l43 53l27 -26q-50 -52 -94 -108t-82 -118q-66 54 -147 80.5t-177 26.5q-98 0 -157 -23t-101 -78zM723 1384 -q-116 -84 -194.5 -161t-128.5 -154q-60 93 -136.5 170t-178.5 145q87 -4 166.5 -32.5t148.5 -79.5q75 49 157.5 77.5t165.5 34.5z" /> - <glyph glyph-name="florin" unicode="ƒ" -d="M467 -68q33 -11 66.5 -32.5t66.5 -53.5l64 37l16 -24q-55 -34 -112 -77.5t-115 -96.5q-59 55 -107.5 81.5t-91.5 26.5q-22 0 -45 -5.5t-49 -16.5q13 39 41.5 75.5t74.5 73.5v899h-155v90h155v21q0 78 -13 127t-42 80h23q106 0 212 57t201 166q37 -71 65.5 -99t59.5 -28 -q20 0 39.5 7t46.5 26q-25 -76 -82 -122t-122 -46q-45 0 -86 21.5t-74 62.5l-37 -23v-249q16 -2 34.5 -2.5t53.5 -0.5q53 0 94 3.5t74 10.5v-585q14 -10 20.5 -20t6.5 -25q0 -22 -13.5 -36.5t-34.5 -14.5q-16 0 -27 14t-11 37q0 16 6 26.5t20 18.5v483h-223v-887z" /> - <glyph glyph-name="circumflex" unicode="ˆ" horiz-adv-x="1024" -d="M193 1069q116 85 194.5 161.5t128.5 153.5q60 -93 136.5 -170t178.5 -145q-89 5 -169 33.5t-148 79.5q-75 -50 -157 -78.5t-164 -34.5z" /> - <glyph glyph-name="caron" unicode="ˇ" horiz-adv-x="1024" -d="M831 1384q-116 -84 -194.5 -161t-128.5 -154q-60 93 -136.5 170t-178.5 145q87 -4 166.5 -32.5t148.5 -79.5q75 49 157.5 77.5t165.5 34.5z" /> - <glyph glyph-name="breve" unicode="˘" horiz-adv-x="1024" -d="M223 1333h51q15 -63 73 -93t165 -30q105 0 162.5 30.5t73.5 92.5h53q-20 -120 -94 -184t-195 -64q-120 0 -193.5 63.5t-95.5 184.5z" /> - <glyph glyph-name="dotaccent" unicode="˙" horiz-adv-x="1024" -d="M360 1165l119 144q40 -57 69 -79t62 -22q11 0 23.5 3t28.5 10q-39 -78 -75.5 -110t-84.5 -32q-40 0 -77.5 23t-64.5 63z" /> - <glyph glyph-name="ring" unicode="˚" horiz-adv-x="1024" -d="M395 1245q0 -48 34.5 -82.5t82.5 -34.5q49 0 82 34t33 83q0 48 -33.5 81.5t-81.5 33.5q-49 0 -83 -33.5t-34 -81.5zM326 1245q0 75 55 130t131 55q75 0 129.5 -55t54.5 -130q0 -76 -54 -131t-130 -55q-75 0 -129 54.5t-57 131.5z" /> - <glyph glyph-name="ogonek" unicode="˛" horiz-adv-x="1024" -d="M578 0q-54 -70 -79.5 -126t-25.5 -101q0 -40 22 -64t56 -24q24 0 47 8.5t51 30.5q-7 -74 -47.5 -113t-107.5 -39q-62 0 -97 32.5t-35 90.5q0 61 38 132t126 173h52z" /> - <glyph glyph-name="tilde" unicode="˜" horiz-adv-x="1024" -d="M215 1110q19 79 80 126.5t143 47.5q41 0 126 -20.5t132 -20.5q35 0 62 8t51 25q-37 -76 -107 -119t-155 -43q-41 0 -111.5 20.5t-103.5 20.5q-37 0 -64 -10.5t-53 -34.5z" /> - <glyph glyph-name="hungarumlaut" unicode="˝" horiz-adv-x="1024" -d="M483 1356q28 -12 62 -22.5t86 -24.5v-17l-31 6q-43 -112 -117 -166t-190 -59q83 54 125.5 117.5t64.5 165.5zM725 1356q26 -11 59 -21.5t90 -25.5v-17l-30 6q-43 -113 -117.5 -167t-189.5 -58q81 54 123.5 117t64.5 166z" /> - <glyph glyph-name="Omega" unicode="Ω" horiz-adv-x="1569" -d="M1112 231v-26h311l60 184h61l-117 -389h-505q120 216 181.5 435t61.5 427q0 277 -95.5 418t-283.5 141q-189 0 -284.5 -140t-95.5 -419q0 -209 61 -426t182 -436h-506l-116 389h61l59 -184h312v26q-165 183 -237 335t-72 311q0 267 183 443.5t453 176.5t452.5 -177 -t182.5 -443q0 -158 -71.5 -309t-237.5 -337z" /> - <glyph glyph-name="pi" unicode="π" horiz-adv-x="1389" -d="M1370 885l-43 -199h-340q-33 -137 -37 -401q-1 -58 -2 -87q-3 -125 -32.5 -183t-90.5 -58q-42 0 -64 28t-22 83q0 58 77 259t114 359h-387q-35 -142 -40 -414q-1 -49 -1 -73q-4 -127 -33 -184.5t-90 -57.5q-42 0 -63 28t-21 83q0 59 76 260t112 358h-188 -q-91 0 -135.5 -41.5t-67.5 -152.5h-57q40 218 124 305.5t251 87.5h960z" /> - <glyph glyph-name="endash" unicode="–" horiz-adv-x="1024" -d="M0 440v111h1038v-111h-1038z" /> - <glyph glyph-name="emdash" unicode="—" horiz-adv-x="2048" -d="M0 440v111h2048v-111h-2048z" /> - <glyph glyph-name="quoteleft" unicode="‘" horiz-adv-x="467" -d="M305 1464q-29 -30 -42 -60.5t-13 -66.5t15.5 -68.5t49.5 -66.5l31 23l16 -23l-176 -133q-38 43 -56.5 86t-18.5 86q0 73 57.5 140t136.5 83z" /> - <glyph glyph-name="quoteright" unicode="’" horiz-adv-x="467" -d="M168 1049q29 30 42 60.5t13 66.5q0 35 -15 66.5t-50 66.5l-31 -21l-16 23l176 131q38 -43 56.5 -85t18.5 -85q0 -73 -57.5 -140t-136.5 -83z" /> - <glyph glyph-name="quotesinglbase" unicode="‚" horiz-adv-x="467" -d="M168 -219q29 30 42 60.5t13 66.5t-15.5 68.5t-49.5 66.5l-31 -20l-16 22l176 131q38 -43 56.5 -85t18.5 -85q0 -73 -57.5 -141t-136.5 -84z" /> - <glyph glyph-name="quotedblleft" unicode="“" horiz-adv-x="825" -d="M305 1464q-29 -30 -42 -60.5t-13 -66.5t15.5 -68.5t49.5 -66.5l31 23l16 -23l-176 -133q-38 43 -56.5 86t-18.5 86q0 73 57.5 140t136.5 83zM657 1464q-28 -30 -41.5 -60.5t-13.5 -66.5t15.5 -68.5t50.5 -66.5l30 23l17 -23l-176 -133q-38 43 -57 86t-19 86 -q0 73 57.5 140t136.5 83z" /> - <glyph glyph-name="quotedblright" unicode="”" horiz-adv-x="825" -d="M520 1049q29 30 42 60.5t13 66.5q0 35 -15 66.5t-50 66.5l-31 -21l-16 23l176 131q37 -42 55.5 -84t18.5 -86q0 -74 -57 -140.5t-136 -82.5zM168 1049q29 30 42 60.5t13 66.5q0 35 -15 66.5t-50 66.5l-31 -21l-16 23l176 131q38 -43 56.5 -85t18.5 -85q0 -73 -57.5 -140 -t-136.5 -83z" /> - <glyph glyph-name="quotedblbase" unicode="„" horiz-adv-x="825" -d="M520 -219q29 30 42 60.5t13 66.5t-15.5 68.5t-49.5 66.5l-31 -20l-16 22l176 131q37 -42 55.5 -84t18.5 -86q0 -73 -57 -141t-136 -84zM168 -219q29 30 42 60.5t13 66.5t-15.5 68.5t-49.5 66.5l-31 -20l-16 22l176 131q38 -43 56.5 -85t18.5 -85q0 -73 -57.5 -141 -t-136.5 -84z" /> - <glyph glyph-name="dagger" unicode="†" horiz-adv-x="1024" -d="M642 1464l27 -14q-47 -48 -70.5 -160.5t-34.5 -359.5h197q45 0 74.5 6t56.5 18q-3 -22 -4.5 -42t-1.5 -38q0 -16 1.5 -35t4.5 -44q-26 18 -61 26t-93 8h-174l49 -1148l-229 149l29 999h-160q-51 0 -89.5 -8.5t-61.5 -25.5q2 25 4 45.5t2 29.5q0 18 -2 40.5t-4 43.5 -q26 -13 58 -18.5t85 -5.5h168l-6 121q-5 90 -27.5 159t-54.5 95q82 6 154.5 41.5t162.5 117.5z" /> - <glyph glyph-name="daggerdbl" unicode="‡" horiz-adv-x="1024" -d="M613 -319l-229 149l10 426h-141q-56 0 -92.5 -8t-58.5 -24q2 25 4 45.5t2 29.5q0 17 -2 38.5t-4 43.5q25 -12 53.5 -17.5t70.5 -5.5h19h153l15 469h-160q-56 0 -92.5 -7.5t-58.5 -24.5q2 25 4 45.5t2 29.5q0 18 -2 40.5t-4 43.5q27 -12 57.5 -18t85.5 -6h168l-6 121 -q-5 90 -27.5 159t-54.5 95q82 6 154.5 41.5t162.5 117.5l27 -14q-47 -48 -70.5 -160.5t-34.5 -359.5h197q43 0 73 6t58 18q-3 -22 -4.5 -42t-1.5 -38q0 -16 1.5 -35t4.5 -44q-26 17 -58 24.5t-96 7.5h-174l21 -469h188q40 0 67 5.5t52 16.5q-3 -22 -4.5 -41t-1.5 -36 -q0 -16 1.5 -35t3.5 -44q-25 17 -57 24.5t-96 7.5h-149z" /> - <glyph glyph-name="bullet" unicode="•" horiz-adv-x="1208" -d="M307 762q0 123 87 209t210 86q122 0 208.5 -86.5t86.5 -208.5t-87.5 -209.5t-209.5 -87.5q-123 0 -209 87t-86 210z" /> - <glyph glyph-name="ellipsis" unicode="…" horiz-adv-x="2048" -d="M160 74l146 174q45 -66 81.5 -93.5t75.5 -27.5q10 0 24.5 4t37.5 12q-45 -92 -90.5 -132t-104.5 -40q-49 0 -93 26.5t-77 76.5zM842 74l146 174q45 -66 81.5 -93.5t75.5 -27.5q10 0 24.5 4t37.5 12q-45 -92 -90.5 -132t-104.5 -40q-49 0 -93 26.5t-77 76.5zM1526 74 -l146 174q45 -66 81.5 -93.5t75.5 -27.5q10 0 24.5 4t37.5 12q-45 -92 -90.5 -132t-104.5 -40q-49 0 -93 26.5t-77 76.5z" /> - <glyph glyph-name="perthousand" unicode="‰" horiz-adv-x="2339" -d="M1163 1362h47l-796 -1399h-49zM1845 195q40 -16 68 -42t47 -65q28 10 50 17t42 12v516q-33 11 -59 34t-51 66q-31 -11 -54 -18t-43 -10v-510zM1626 52q6 43 27 75.5t57 56.5v400q0 42 -8 76t-27 69h5q40 -4 59 -4q100 0 191.5 34.5t168.5 100.5q22 -61 50.5 -89t68.5 -28 -q2 0 7 1t22 6q-10 -28 -24.5 -49t-34.5 -37l-1 -420q0 -35 8 -75t22 -83q-29 5 -51.5 7.5t-41.5 2.5q-84 0 -157 -32.5t-146 -102.5q-33 46 -72 71t-76 25q-8 0 -20 -1.5t-27 -3.5zM922 51q6 44 26.5 76.5t57.5 56.5v400q0 45 -8 78.5t-25 66.5h5q40 -4 58 -4 -q100 0 190.5 34t168.5 101q22 -61 50 -89t68 -28q3 0 10.5 1.5t20.5 4.5q-9 -27 -23.5 -48t-35.5 -38v-419q0 -35 7.5 -75t22.5 -83q-30 5 -52 7.5t-42 2.5q-83 0 -156.5 -32.5t-146.5 -102.5q-32 46 -71 71t-76 25q-9 0 -22 -1.5t-27 -4.5zM1143 195q39 -16 67.5 -42 -t46.5 -65q28 10 50.5 17t42.5 12v516q-34 11 -59.5 34t-51.5 66q-30 -11 -53 -18t-43 -10v-510zM244 709q39 -16 67.5 -42t46.5 -65q24 8 48 15.5t46 13.5l1 516q-35 11 -61.5 35t-51.5 65q-30 -11 -53 -18t-43 -10v-510zM25 566q6 43 26.5 75.5t57.5 56.5v400q0 45 -8 78.5 -t-25 66.5h5q40 -4 58 -4q100 0 190.5 34t168.5 101q22 -61 50 -89t68 -28q8 0 15.5 1.5t15.5 3.5q-9 -27 -23 -47t-36 -37v-422q0 -35 7.5 -74t22.5 -82q-31 6 -52.5 8t-41.5 2q-83 0 -156.5 -32.5t-146.5 -102.5q-32 46 -71 71t-76 25q-9 0 -22 -1.5t-27 -3.5z" /> - <glyph glyph-name="guilsinglleft" unicode="‹" horiz-adv-x="616" -d="M440 68q-85 147 -165 250.5t-162 175.5q93 74 174.5 177t152.5 238q-3 -100 -41.5 -210t-105.5 -207q65 -104 102.5 -211t44.5 -213z" /> - <glyph glyph-name="guilsinglright" unicode="›" horiz-adv-x="616" -d="M176 68q8 108 44.5 215t101.5 209q-66 96 -104.5 206t-41.5 211q70 -133 152 -237t176 -178q-83 -72 -163 -175.5t-165 -250.5z" /> - <glyph glyph-name="franc" unicode="₣" horiz-adv-x="1903" -d="M86 1200q6 103 70 172.5t149 69.5q53 0 152.5 -30t156.5 -30q50 0 93 12.5t86 39.5q-57 -104 -148 -171t-170 -67q-54 0 -148.5 33t-131.5 33q-36 0 -60 -14t-49 -48zM346 219q22 34 31.5 69t9.5 91v14v250h-45q-63 0 -91.5 -20t-41.5 -72q-14 30 -20.5 55t-6.5 49 -q0 100 39 143.5t127 43.5q15 0 23 -0.5t16 -1.5v34v39q0 128 237 259l6 3q-29 -38 -42 -79.5t-13 -118.5v-465q0 -107 -50.5 -166.5t-178.5 -126.5zM889 829h190v350q-43 2 -82.5 25.5t-70.5 67.5q-19 -14 -28 -32.5t-9 -41.5v-369zM-74 -16q49 108 116 167.5t142 59.5 -q60 0 183.5 -85t175.5 -85q72 0 111.5 48t39.5 136v867q0 44 12 71.5t42 48.5q14 11 56 37q161 97 275 197q49 -55 75.5 -70.5t57.5 -15.5q22 0 43.5 7.5t42.5 23.5q-18 -82 -64.5 -133.5t-125.5 -77.5v-1037h-29v500h-190v-342q0 -75 -14 -106.5t-50 -61.5 -q-99 -84 -225.5 -136t-230.5 -52q-82 0 -185.5 39t-138.5 39q-30 0 -59.5 -10t-59.5 -29zM1536 -31q-40 64 -100.5 100.5t-124.5 36.5h-20t-15 -1q20 34 50 60t73 46v440q0 90 -27.5 119t-111.5 37q64 37 114.5 87.5t87.5 115.5q61 -39 89 -97.5t28 -150.5l184 248 -q24 -64 47 -89.5t56 -25.5q15 0 30.5 6t32.5 19q-8 -80 -50.5 -130.5t-96.5 -50.5q-37 0 -69.5 18.5t-59.5 55.5l-74 -100v-500q41 -14 70 -30t49 -36l37 27l20 -20q-76 -50 -131 -96t-88 -89z" /> - <glyph glyph-name="trademark" unicode="™" horiz-adv-x="1683" -d="M780 1442h191l137 -391l143 391h181v-25l-30 -2q-21 -2 -31.5 -15t-10.5 -38v-375q0 -25 10.5 -38t31.5 -15l30 -2v-29h-240v29l31 2q21 2 32 15.5t11 37.5v387l-172 -473h-21l-172 475v-389q0 -24 11 -37.5t32 -15.5l33 -2v-29h-197v29l34 2q20 2 31 15.5t11 37.5v371 -q0 24 -11 37.5t-31 15.5l-34 4v27zM250 1442h444l11 -182h-27q-8 78 -40.5 114.5t-94.5 36.5h-17v-424q0 -24 10.5 -37.5t30.5 -15.5l33 -2v-29h-254v29l31 2q21 2 32 15.5t11 37.5v424h-17q-64 0 -96.5 -36t-40.5 -115h-26z" /> - <glyph glyph-name="partialdiff" unicode="∂" horiz-adv-x="1059" -d="M756 621q15 87 22.5 168.5t7.5 156.5q0 129 -36.5 194.5t-108.5 65.5q-55 0 -127 -58t-108 -58t-60 22t-24 53q0 62 72 111t173 49q180 0 287 -155t107 -418q0 -335 -144.5 -556t-357.5 -221q-152 0 -253.5 108t-101.5 271q0 198 110.5 326.5t272.5 128.5 -q101 0 166 -45.5t103 -142.5zM707 494q0 116 -43.5 178.5t-122.5 62.5q-109 0 -179.5 -129t-70.5 -336q0 -116 43 -177.5t123 -61.5q109 0 179.5 130t70.5 333z" /> - <glyph glyph-name="uni2206" unicode="∆" horiz-adv-x="1350" -d="M602 1174l-389 -957h768zM666 1497h30l600 -1497h-1243z" /> - <glyph glyph-name="product" unicode="∏" horiz-adv-x="1630" -d="M53 1473h1522v-74h-191v-1718h191v-74h-596v74h192v1718h-714v-1718h192v-74h-596v74h191v1718h-191v74z" /> - <glyph glyph-name="summation" unicode="∑" horiz-adv-x="1462" -d="M16 1473h1162l110 -365h-78l-73 227q-11 34 -41.5 49t-98.5 15h-690l809 -832v-37l-825 -735h887q61 0 79 13t29 51l72 229h78l-148 -481h-1272v41l920 815l-920 956v54z" /> - <glyph glyph-name="minus" unicode="−" horiz-adv-x="1706" -d="M254 682h1198v-141h-1198v141z" /> - <glyph glyph-name="uni2215" unicode="∕" horiz-adv-x="342" -d="M612 1360h70l-954 -1399h-70z" /> - <glyph glyph-name="uni2219" unicode="∙" horiz-adv-x="467" -d="M123 659q0 48 32 80.5t78 32.5q48 0 81.5 -33t33.5 -80q0 -45 -34 -78.5t-81 -33.5q-45 0 -77.5 33t-32.5 79z" /> - <glyph glyph-name="radical" unicode="√" horiz-adv-x="1305" -d="M1116 1661h189v-96h-115l-594 -1606h-66l-319 883l-125 -45l-25 80l283 98l256 -709z" /> - <glyph glyph-name="infinity" unicode="∞" horiz-adv-x="1706" -d="M915 559q50 -89 116.5 -133.5t150.5 -44.5q101 0 165 67.5t64 172.5q0 101 -59 168t-148 67q-81 0 -146.5 -66.5t-142.5 -230.5zM793 666q-49 88 -115.5 132t-151.5 44q-101 0 -165 -66.5t-64 -171.5q0 -101 59 -168t148 -67q81 0 146.5 66t142.5 231zM864 483 -q-71 -136 -148.5 -199t-172.5 -63q-135 0 -228.5 112t-93.5 277q0 175 83.5 283t217.5 108q95 0 170 -61.5t150 -202.5q68 138 147 203.5t176 65.5q133 0 227.5 -113t94.5 -279q0 -174 -83.5 -281.5t-217.5 -107.5q-95 0 -168.5 58.5t-153.5 199.5z" /> - <glyph glyph-name="integral" unicode="∫" horiz-adv-x="1067" -d="M311 -262q106 0 120 688q2 108 3 165q12 515 107 737t297 222q80 0 130 -42t50 -107q0 -54 -32 -85.5t-87 -31.5q-42 0 -70 19t-40 54q-6 15 -10.5 51t-20.5 36q-107 0 -121 -619q-4 -193 -8 -303q-17 -479 -111.5 -686t-290.5 -207q-79 0 -129.5 41.5t-50.5 106.5 -q0 56 34 87.5t95 31.5q33 0 57 -14.5t39 -42.5q10 -18 15 -59.5t24 -41.5z" /> - <glyph glyph-name="approxequal" unicode="≈" horiz-adv-x="1706" -d="M1530 586v-156q-105 -73 -199.5 -107t-189.5 -34t-285 67.5t-293 67.5q-82 0 -171.5 -36t-213.5 -122v156q108 73 204 109t183 36q115 0 305 -68.5t273 -68.5q88 0 177 35.5t210 120.5zM1530 954v-155q-105 -73 -199.5 -107.5t-189.5 -34.5t-285 68t-293 68 -q-83 0 -171.5 -36t-213.5 -122v156q106 72 202 107.5t185 35.5q116 0 305.5 -67.5t272.5 -67.5q87 0 175 34.5t212 120.5z" /> - <glyph glyph-name="notequal" unicode="≠" horiz-adv-x="1706" -d="M1208 1194l105 -82l-187 -235h326v-136h-416l-205 -262h621v-135h-709l-249 -317l-105 84l184 233h-319v135h408l204 262h-612v136h702z" /> - <glyph glyph-name="lessequal" unicode="≤" horiz-adv-x="1706" -d="M262 162h1184v-139h-1184v139zM1444 1206v-147l-936 -309l936 -306v-149l-1182 395v121z" /> - <glyph glyph-name="greaterequal" unicode="≥" horiz-adv-x="1706" -d="M262 162h1184v-139h-1184v139zM262 1206l1184 -395v-121l-1184 -395v149l938 306l-938 309v147z" /> - <glyph glyph-name="lozenge" unicode="◊" horiz-adv-x="1012" -d="M506 1409l-385 -817l385 -825l385 825zM506 1653l500 -1061l-500 -1069l-500 1069z" /> - <glyph glyph-name="uniF000" unicode="" horiz-adv-x="1618" -d="M836 1216q-1 6 -1.5 14t-0.5 23q0 124 95 229.5t236 131.5q1 -10 1.5 -23t0.5 -39q0 -131 -103.5 -234.5t-203.5 -103.5h-8q-3 0 -7.5 1t-8.5 1zM1505 403q-114 -247 -205 -342.5t-204 -95.5q-50 0 -131.5 33t-122.5 33q-45 0 -131 -33t-127 -33q-64 0 -128.5 44 -t-129.5 132q-102 140 -157.5 295.5t-55.5 300.5q0 219 125 356.5t323 137.5q68 0 155 -34t124 -34q34 0 121.5 35t152.5 35q110 0 198 -40t161 -124q-102 -65 -151.5 -145.5t-49.5 -182.5q0 -113 60 -200t173 -138z" /> - <glyph glyph-name="uniF001" unicode="" horiz-adv-x="1042" -d="M389 819v-604q49 -15 114 -69q15 -12 21 -17l64 37l14 -25q-63 -35 -118.5 -79t-106.5 -99q-48 54 -102 84.5t-101 30.5q-20 0 -39.5 -6t-42.5 -19q13 40 41.5 76.5t75.5 73.5v614h-152v92h152v49q0 58 -14.5 104.5t-40.5 74.5h16q106 0 211 57t201 166q45 -71 87.5 -101 -t94.5 -30q21 0 43.5 8.5t48.5 25.5q-26 -82 -91 -127.5t-157 -45.5q-56 0 -99.5 22t-82.5 70l-37 -23v-250h186q71 0 116.5 20t92.5 64q23 -49 56.5 -75.5t72.5 -26.5q8 0 21.5 4.5t35.5 13.5q-1 -47 -26.5 -83t-77.5 -64v-428q0 -99 32.5 -135t114.5 -40q-35 -27 -77 -73.5 -t-86 -105.5q-91 24 -127.5 97t-36.5 253v450l-41 39h-256z" /> - <glyph glyph-name="uniF001" unicode="fi" horiz-adv-x="1042" -d="M389 819v-604q49 -15 114 -69q15 -12 21 -17l64 37l14 -25q-63 -35 -118.5 -79t-106.5 -99q-48 54 -102 84.5t-101 30.5q-20 0 -39.5 -6t-42.5 -19q13 40 41.5 76.5t75.5 73.5v614h-152v92h152v49q0 58 -14.5 104.5t-40.5 74.5h16q106 0 211 57t201 166q45 -71 87.5 -101 -t94.5 -30q21 0 43.5 8.5t48.5 25.5q-26 -82 -91 -127.5t-157 -45.5q-56 0 -99.5 22t-82.5 70l-37 -23v-250h186q71 0 116.5 20t92.5 64q23 -49 56.5 -75.5t72.5 -26.5q8 0 21.5 4.5t35.5 13.5q-1 -47 -26.5 -83t-77.5 -64v-428q0 -99 32.5 -135t114.5 -40q-35 -27 -77 -73.5 -t-86 -105.5q-91 24 -127.5 97t-36.5 253v450l-41 39h-256z" /> - <glyph glyph-name="uniF002" unicode="" horiz-adv-x="1024" -d="M707 1233q45 13 93 43.5t124 97.5l14 -14q-40 -46 -57 -105t-17 -211v-829q29 -8 58.5 -26.5t76.5 -59.5l64 37l16 -25q-53 -28 -110 -71.5t-119 -104.5q-95 81 -160.5 113t-131.5 35q-72 -52 -112.5 -86t-68.5 -64q-59 59 -108.5 87t-94.5 28q-20 0 -40 -6t-42 -19 -q14 42 43.5 79t75.5 71v614h-154v94h154v19q0 77 -13.5 127t-41.5 82h12q115 0 225.5 55.5t210.5 165.5q25 -45 50 -76t53 -51zM680 817h-291v-602q42 -13 82.5 -32.5t85.5 -47.5l123 66v616zM389 911h291v184q-60 2 -119.5 22.5t-128.5 64.5l-43 -21v-250z" /> - <glyph glyph-name="uniF002" unicode="fl" horiz-adv-x="1024" -d="M707 1233q45 13 93 43.5t124 97.5l14 -14q-40 -46 -57 -105t-17 -211v-829q29 -8 58.5 -26.5t76.5 -59.5l64 37l16 -25q-53 -28 -110 -71.5t-119 -104.5q-95 81 -160.5 113t-131.5 35q-72 -52 -112.5 -86t-68.5 -64q-59 59 -108.5 87t-94.5 28q-20 0 -40 -6t-42 -19 -q14 42 43.5 79t75.5 71v614h-154v94h154v19q0 77 -13.5 127t-41.5 82h12q115 0 225.5 55.5t210.5 165.5q25 -45 50 -76t53 -51zM680 817h-291v-602q42 -13 82.5 -32.5t85.5 -47.5l123 66v616zM389 911h291v184q-60 2 -119.5 22.5t-128.5 64.5l-43 -21v-250z" /> - </font> -</defs></svg> diff --git a/ruoyi-admin/src/main/resources/static/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.ttf b/ruoyi-admin/src/main/resources/static/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.ttf deleted file mode 100644 index e669e66..0000000 --- a/ruoyi-admin/src/main/resources/static/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.ttf +++ /dev/null Binary files differ diff --git a/ruoyi-admin/src/main/resources/static/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.woff b/ruoyi-admin/src/main/resources/static/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.woff deleted file mode 100644 index 70f4359..0000000 --- a/ruoyi-admin/src/main/resources/static/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.woff +++ /dev/null Binary files differ diff --git a/ruoyi-admin/src/main/resources/static/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.woff2 b/ruoyi-admin/src/main/resources/static/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.woff2 deleted file mode 100644 index e883656..0000000 --- a/ruoyi-admin/src/main/resources/static/assets/fonts/d571b52b60b5617399ce8eab62bf3eb3.woff2 +++ /dev/null Binary files differ diff --git a/ruoyi-admin/src/main/resources/static/assets/img/logo.jpg b/ruoyi-admin/src/main/resources/static/assets/img/logo.jpg deleted file mode 100644 index a19036b..0000000 --- a/ruoyi-admin/src/main/resources/static/assets/img/logo.jpg +++ /dev/null Binary files differ diff --git a/ruoyi-admin/src/main/resources/static/assets/img/logo1.jpg b/ruoyi-admin/src/main/resources/static/assets/img/logo1.jpg deleted file mode 100644 index 774772f..0000000 --- a/ruoyi-admin/src/main/resources/static/assets/img/logo1.jpg +++ /dev/null Binary files differ diff --git a/ruoyi-admin/src/main/resources/static/assets/img/logo2.jpg b/ruoyi-admin/src/main/resources/static/assets/img/logo2.jpg deleted file mode 100644 index 421bf88..0000000 --- a/ruoyi-admin/src/main/resources/static/assets/img/logo2.jpg +++ /dev/null Binary files differ diff --git a/ruoyi-admin/src/main/resources/static/assets/img/logo3.jpg b/ruoyi-admin/src/main/resources/static/assets/img/logo3.jpg deleted file mode 100644 index df54586..0000000 --- a/ruoyi-admin/src/main/resources/static/assets/img/logo3.jpg +++ /dev/null Binary files differ diff --git a/ruoyi-admin/src/main/resources/static/assets/js/bing.js b/ruoyi-admin/src/main/resources/static/assets/js/bing.js deleted file mode 100644 index 5700f38..0000000 --- a/ruoyi-admin/src/main/resources/static/assets/js/bing.js +++ /dev/null @@ -1,38 +0,0 @@ -const https = require('https') -const fs = require('fs') - -const options = { - hostname: 'www.bing.com', - port: 443, - path: '/HPImageArchive.aspx?format=js&idx=0&n=8', - method: 'GET' -} - -const req = https.request(options, bing_res => { - let bing_body = [], bing_data = {}; - bing_res.on('data', (chunk) => { - bing_body.push(chunk); - }); - bing_res.on('end', () => { - bing_body = Buffer.concat(bing_body); - bing_data = JSON.parse(bing_body.toString()); - let img_array = bing_data.images; - let img_url = []; - img_array.forEach(img => { - img_url.push(img.url); - }); - var jsonpStr = "getBingImages(" + JSON.stringify(img_url) + ")"; - fs.writeFile('./assets/json/images.json', jsonpStr, (err) => { - if (err) { - throw err; - } - console.log("JSON data is saved: " + jsonpStr); - }); - }); -}) - -req.on('error', error => { - console.error(error) -}) - -req.end() \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/static/assets/js/main.js b/ruoyi-admin/src/main/resources/static/assets/js/main.js deleted file mode 100644 index a5ead0c..0000000 --- a/ruoyi-admin/src/main/resources/static/assets/js/main.js +++ /dev/null @@ -1,104 +0,0 @@ -var iUp = (function () { - var time = 0, - duration = 150, - clean = function () { - time = 0; - }, - up = function (element) { - setTimeout(function () { - element.classList.add("up"); - }, time); - time += duration; - }, - down = function (element) { - element.classList.remove("up"); - }, - toggle = function (element) { - setTimeout(function () { - element.classList.toggle("up"); - }, time); - time += duration; - }; - return { - clean: clean, - up: up, - down: down, - toggle: toggle - }; -})(); - -function getBingImages(imgUrls) { - /** - * 鑾峰彇Bing澹佺焊 - * 鍏堜娇鐢� GitHub Action 姣忓ぉ鑾峰彇 Bing 澹佺焊 URL 骞舵洿鏂� images.json 鏂囦欢 - * 鐒跺悗璇诲彇 images.json 鏂囦欢涓殑鏁版嵁 - */ - var indexName = "bing-image-index"; - var index = sessionStorage.getItem(indexName); - var panel = document.querySelector('#panel'); - if (isNaN(index) || index == 7) index = 0; - else index++; - var imgUrl = imgUrls[index]; - var url = "https://www.cn.bing.com" + imgUrl; - panel.style.background = "url('" + url + "') center center no-repeat #666"; - panel.style.backgroundSize = "cover"; - sessionStorage.setItem(indexName, index); -} - -function decryptEmail(encoded) { - var address = atob(encoded); - window.location.href = "mailto:" + address; -} - -document.addEventListener('DOMContentLoaded', function () { - // 鑾峰彇涓�瑷�鏁版嵁 - var xhr = new XMLHttpRequest(); - xhr.onreadystatechange = function () { - if (this.readyState == 4 && this.status == 200) { - var res = JSON.parse(this.responseText); - document.getElementById('description').innerHTML = res.hitokoto + "<br/> -銆�<strong>" + res.from + "</strong>銆�"; - } - }; - xhr.open("GET", "https://v1.hitokoto.cn", true); - xhr.send(); - - var iUpElements = document.querySelectorAll(".iUp"); - iUpElements.forEach(function (element) { - iUp.up(element); - }); - - var avatarElement = document.querySelector(".js-avatar"); - avatarElement.addEventListener('load', function () { - avatarElement.classList.add("show"); - }); -}); - -var btnMobileMenu = document.querySelector('.btn-mobile-menu__icon'); -var navigationWrapper = document.querySelector('.navigation-wrapper'); - -btnMobileMenu.addEventListener('click', function () { - if (navigationWrapper.style.display == "block") { - navigationWrapper.addEventListener('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () { - navigationWrapper.classList.toggle('visible'); - navigationWrapper.classList.toggle('animated'); - navigationWrapper.classList.toggle('bounceOutUp'); - navigationWrapper.removeEventListener('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', arguments.callee); - }); - navigationWrapper.classList.toggle('animated'); - navigationWrapper.classList.toggle('bounceInDown'); - navigationWrapper.classList.toggle('animated'); - navigationWrapper.classList.toggle('bounceOutUp'); - } else { - navigationWrapper.classList.toggle('visible'); - navigationWrapper.classList.toggle('animated'); - navigationWrapper.classList.toggle('bounceInDown'); - } - btnMobileMenu.classList.toggle('social'); - btnMobileMenu.classList.toggle('iconfont'); - btnMobileMenu.classList.toggle('icon-list'); - btnMobileMenu.classList.toggle('social'); - btnMobileMenu.classList.toggle('iconfont'); - btnMobileMenu.classList.toggle('icon-angleup'); - btnMobileMenu.classList.toggle('animated'); - btnMobileMenu.classList.toggle('fadeIn'); -}); diff --git a/ruoyi-admin/src/main/resources/static/assets/json/images.json b/ruoyi-admin/src/main/resources/static/assets/json/images.json deleted file mode 100644 index dd176a4..0000000 --- a/ruoyi-admin/src/main/resources/static/assets/json/images.json +++ /dev/null @@ -1 +0,0 @@ -getBingImages(["/th?id=OHR.TheRoachesPeakDistrict_EN-US9733115206_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.SanMiguelAllende_EN-US9621237021_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.JediMonastery_EN-US9398447907_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.SonoranSpring_EN-US9207877073_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.CratersOfTheMoon_EN-US6516727783_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.HawaiianLei_EN-US6290126556_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.CheetahRain_EN-US6179670004_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp","/th?id=OHR.TulouFujian_EN-US6009679228_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp"]) \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/static/assets/svg/favicon.svg b/ruoyi-admin/src/main/resources/static/assets/svg/favicon.svg deleted file mode 100644 index 700dfc4..0000000 --- a/ruoyi-admin/src/main/resources/static/assets/svg/favicon.svg +++ /dev/null @@ -1 +0,0 @@ -<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1714852590465" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1571" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M263.1 844.8h497.7c22.9 0 41.5 18.6 41.5 41.5s-18.6 41.5-41.5 41.5H263.1c-22.9 0-41.5-18.6-41.5-41.5s18.6-41.5 41.5-41.5zM138.7 98.2h746.6c22.9 0 41.5 18.6 41.5 41.5v580.7c0 11-4.4 21.6-12.1 29.3-7.8 7.8-18.3 12.1-29.3 12.1H138.7c-11 0-21.6-4.4-29.3-12.1-7.8-7.8-12.1-18.3-12.1-29.3V139.7c-0.1-22.9 18.5-41.5 41.4-41.5z m331.8 478.9v60.4h83v-60.3c8.5-5.8 17.4-12.8 26.5-20.5l49.4 49.4 58.7-58.7-49.5-49.4c7.7-9 14.6-18 20.5-26.5h60.3v-83h-60.3c-6.4-9.1-13.3-18-20.5-26.5l49.4-49.4-58.7-58.6-49.4 49.4c-8.5-7.3-17.3-14.1-26.5-20.5v-60.3h-83V283c-8.5 5.8-17.4 12.8-26.5 20.5l-49.4-49.4-58.5 58.6 49.4 49.4c-7.2 8.5-14.1 17.3-20.5 26.5h-60.3v83h60.3c5.8 8.5 12.8 17.4 20.5 26.5L336 547.3l58.7 58.7 49.4-49.4c9.1 7.7 18 14.6 26.4 20.5z m0 0" p-id="1572"></path></svg> \ No newline at end of file diff --git a/ruoyi-admin/src/test/java/com/xmzs/test/AssertUnitTest.java b/ruoyi-admin/src/test/java/com/xmzs/test/AssertUnitTest.java deleted file mode 100644 index 6d1f14a..0000000 --- a/ruoyi-admin/src/test/java/com/xmzs/test/AssertUnitTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.xmzs.test; - -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; - -/** - * 鏂█鍗曞厓娴嬭瘯妗堜緥 - * - * @author Lion Li - */ -@DisplayName("鏂█鍗曞厓娴嬭瘯妗堜緥") -public class AssertUnitTest { - - @DisplayName("娴嬭瘯 assertEquals 鏂规硶") - @Test - public void testAssertEquals() { - Assertions.assertEquals("666", new String("666")); - Assertions.assertNotEquals("666", new String("666")); - } - - @DisplayName("娴嬭瘯 assertSame 鏂规硶") - @Test - public void testAssertSame() { - Object obj = new Object(); - Object obj1 = obj; - Assertions.assertSame(obj, obj1); - Assertions.assertNotSame(obj, obj1); - } - - @DisplayName("娴嬭瘯 assertTrue 鏂规硶") - @Test - public void testAssertTrue() { - Assertions.assertTrue(true); - Assertions.assertFalse(true); - } - - @DisplayName("娴嬭瘯 assertNull 鏂规硶") - @Test - public void testAssertNull() { - Assertions.assertNull(null); - Assertions.assertNotNull(null); - } - -} diff --git a/ruoyi-admin/src/test/java/com/xmzs/test/DemoUnitTest.java b/ruoyi-admin/src/test/java/com/xmzs/test/DemoUnitTest.java deleted file mode 100644 index 6981eb8..0000000 --- a/ruoyi-admin/src/test/java/com/xmzs/test/DemoUnitTest.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.xmzs.test; - -import com.xmzs.common.core.config.RuoYiConfig; -import org.junit.jupiter.api.*; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; - -import java.util.concurrent.TimeUnit; - -/** - * 鍗曞厓娴嬭瘯妗堜緥 - * - * @author Lion Li - */ -@SpringBootTest // 姝ゆ敞瑙e彧鑳藉湪 springboot 涓诲寘涓嬩娇鐢� 闇�鍖呭惈 main 鏂规硶涓� yml 閰嶇疆鏂囦欢 -@DisplayName("鍗曞厓娴嬭瘯妗堜緥") -public class DemoUnitTest { - - @Autowired - private RuoYiConfig ruoYiConfig; - - @DisplayName("娴嬭瘯 @SpringBootTest @Test @DisplayName 娉ㄨВ") - @Test - public void testTest() { - System.out.println(ruoYiConfig); - } - - @Disabled - @DisplayName("娴嬭瘯 @Disabled 娉ㄨВ") - @Test - public void testDisabled() { - System.out.println(ruoYiConfig); - } - - @Timeout(value = 2L, unit = TimeUnit.SECONDS) - @DisplayName("娴嬭瘯 @Timeout 娉ㄨВ") - @Test - public void testTimeout() throws InterruptedException { - Thread.sleep(3000); - System.out.println(ruoYiConfig); - } - - - @DisplayName("娴嬭瘯 @RepeatedTest 娉ㄨВ") - @RepeatedTest(3) - public void testRepeatedTest() { - System.out.println(666); - } - - @BeforeAll - public static void testBeforeAll() { - System.out.println("@BeforeAll =================="); - } - - @BeforeEach - public void testBeforeEach() { - System.out.println("@BeforeEach =================="); - } - - @AfterEach - public void testAfterEach() { - System.out.println("@AfterEach =================="); - } - - @AfterAll - public static void testAfterAll() { - System.out.println("@AfterAll =================="); - } - -} diff --git a/ruoyi-admin/src/test/java/com/xmzs/test/ParamUnitTest.java b/ruoyi-admin/src/test/java/com/xmzs/test/ParamUnitTest.java deleted file mode 100644 index 82b9f55..0000000 --- a/ruoyi-admin/src/test/java/com/xmzs/test/ParamUnitTest.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.xmzs.test; - -import com.xmzs.common.core.enums.UserType; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.EnumSource; -import org.junit.jupiter.params.provider.MethodSource; -import org.junit.jupiter.params.provider.NullSource; -import org.junit.jupiter.params.provider.ValueSource; - -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Stream; - -/** - * 甯﹀弬鏁板崟鍏冩祴璇曟渚� - * - * @author Lion Li - */ -@DisplayName("甯﹀弬鏁板崟鍏冩祴璇曟渚�") -public class ParamUnitTest { - - @DisplayName("娴嬭瘯 @ValueSource 娉ㄨВ") - @ParameterizedTest - @ValueSource(strings = {"t1", "t2", "t3"}) - public void testValueSource(String str) { - System.out.println(str); - } - - @DisplayName("娴嬭瘯 @NullSource 娉ㄨВ") - @ParameterizedTest - @NullSource - public void testNullSource(String str) { - System.out.println(str); - } - - @DisplayName("娴嬭瘯 @EnumSource 娉ㄨВ") - @ParameterizedTest - @EnumSource(UserType.class) - public void testEnumSource(UserType type) { - System.out.println(type.getUserType()); - } - - @DisplayName("娴嬭瘯 @MethodSource 娉ㄨВ") - @ParameterizedTest - @MethodSource("getParam") - public void testMethodSource(String str) { - System.out.println(str); - } - - public static Stream<String> getParam() { - List<String> list = new ArrayList<>(); - list.add("t1"); - list.add("t2"); - list.add("t3"); - return list.stream(); - } - - @BeforeEach - public void testBeforeEach() { - System.out.println("@BeforeEach =================="); - } - - @AfterEach - public void testAfterEach() { - System.out.println("@AfterEach =================="); - } - - -} diff --git a/ruoyi-admin/src/test/java/com/xmzs/test/TagUnitTest.java b/ruoyi-admin/src/test/java/com/xmzs/test/TagUnitTest.java deleted file mode 100644 index e451387..0000000 --- a/ruoyi-admin/src/test/java/com/xmzs/test/TagUnitTest.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.xmzs.test; - -import org.junit.jupiter.api.*; -import org.springframework.boot.test.context.SpringBootTest; - -/** - * 鏍囩鍗曞厓娴嬭瘯妗堜緥 - * - * @author Lion Li - */ -@SpringBootTest -@DisplayName("鏍囩鍗曞厓娴嬭瘯妗堜緥") -public class TagUnitTest { - - @Tag("dev") - @DisplayName("娴嬭瘯 @Tag dev") - @Test - public void testTagDev() { - System.out.println("dev"); - } - - @Tag("prod") - @DisplayName("娴嬭瘯 @Tag prod") - @Test - public void testTagProd() { - System.out.println("prod"); - } - - @Tag("local") - @DisplayName("娴嬭瘯 @Tag local") - @Test - public void testTagLocal() { - System.out.println("local"); - } - - @Tag("exclude") - @DisplayName("娴嬭瘯 @Tag exclude") - @Test - public void testTagExclude() { - System.out.println("exclude"); - } - - @BeforeEach - public void testBeforeEach() { - System.out.println("@BeforeEach =================="); - } - - @AfterEach - public void testAfterEach() { - System.out.println("@AfterEach =================="); - } - - -} diff --git a/ruoyi-admin/src/test/java/org/ruoyi/test/AssertUnitTest.java b/ruoyi-admin/src/test/java/org/biada/test/AssertUnitTest.java similarity index 100% rename from ruoyi-admin/src/test/java/org/ruoyi/test/AssertUnitTest.java rename to ruoyi-admin/src/test/java/org/biada/test/AssertUnitTest.java diff --git a/ruoyi-admin/src/test/java/org/ruoyi/test/DemoUnitTest.java b/ruoyi-admin/src/test/java/org/biada/test/DemoUnitTest.java similarity index 100% rename from ruoyi-admin/src/test/java/org/ruoyi/test/DemoUnitTest.java rename to ruoyi-admin/src/test/java/org/biada/test/DemoUnitTest.java diff --git a/ruoyi-admin/src/test/java/org/ruoyi/test/ParamUnitTest.java b/ruoyi-admin/src/test/java/org/biada/test/ParamUnitTest.java similarity index 100% rename from ruoyi-admin/src/test/java/org/ruoyi/test/ParamUnitTest.java rename to ruoyi-admin/src/test/java/org/biada/test/ParamUnitTest.java diff --git a/ruoyi-admin/src/test/java/org/ruoyi/test/TagUnitTest.java b/ruoyi-admin/src/test/java/org/biada/test/TagUnitTest.java similarity index 100% rename from ruoyi-admin/src/test/java/org/ruoyi/test/TagUnitTest.java rename to ruoyi-admin/src/test/java/org/biada/test/TagUnitTest.java diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml index 4be322a..2d12c7b 100644 --- a/ruoyi-common/pom.xml +++ b/ruoyi-common/pom.xml @@ -33,6 +33,7 @@ <module>ruoyi-common-tenant</module> <module>ruoyi-common-chat</module> <module>ruoyi-common-pay</module> + <module>ruoyi-common-wechat</module> </modules> <artifactId>ruoyi-common</artifactId> diff --git a/ruoyi-common/ruoyi-common-bom/pom.xml b/ruoyi-common/ruoyi-common-bom/pom.xml index b1984ea..b48e3fc 100644 --- a/ruoyi-common/ruoyi-common-bom/pom.xml +++ b/ruoyi-common/ruoyi-common-bom/pom.xml @@ -159,6 +159,13 @@ <version>${revision}</version> </dependency> + <!-- 寰俊妯″潡 --> + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>ruoyi-common-wechat</artifactId> + <version>${revision}</version> + </dependency> + <!-- AI缁樼敾 --> <dependency> <groupId>org.ruoyi</groupId> diff --git a/ruoyi-common/ruoyi-common-chat/pom.xml b/ruoyi-common/ruoyi-common-chat/pom.xml index 7bf6ef4..8b5ac81 100644 --- a/ruoyi-common/ruoyi-common-chat/pom.xml +++ b/ruoyi-common/ruoyi-common-chat/pom.xml @@ -26,6 +26,18 @@ <artifactId>ruoyi-common-core</artifactId> </dependency> + <dependency> + <groupId>com.azure</groupId> + <artifactId>azure-ai-openai</artifactId> + <version>1.0.0-beta.12</version> + </dependency> + + <dependency> + <groupId>io.github.ollama4j</groupId> + <artifactId>ollama4j</artifactId> + <version>1.0.79</version> + </dependency> + <!-- 搴忓垪鍖栨ā鍧� --> <dependency> <groupId>org.ruoyi</groupId> @@ -40,11 +52,6 @@ <dependency> <groupId>org.ruoyi</groupId> <artifactId>ruoyi-common-satoken</artifactId> - </dependency> - - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-websocket</artifactId> </dependency> <dependency> @@ -74,5 +81,16 @@ <artifactId>hutool-all</artifactId> <version>5.8.12</version> </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-websocket</artifactId> + <exclusions> + <exclusion> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-tomcat</artifactId> + </exclusion> + </exclusions> + </dependency> </dependencies> </project> diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/config/ChatConfig.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/config/ChatConfig.java deleted file mode 100644 index e10dd53..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/config/ChatConfig.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.xmzs.common.chat.config; - - -import okhttp3.OkHttpClient; -import okhttp3.logging.HttpLoggingInterceptor; -import com.xmzs.common.chat.openai.OpenAiStreamClient; -import com.xmzs.common.chat.openai.function.KeyRandomStrategy; -import com.xmzs.common.chat.openai.interceptor.OpenAILogger; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import java.util.List; -import java.util.concurrent.TimeUnit; - -/** - * chat閰嶇疆绫� - * - * @author: wangle - * @date: 2023/5/16 - */ -@Configuration -public class ChatConfig { - @Value("${chat.apiKey}") - private List<String> apiKey; - @Value("${chat.apiHost}") - private String apiHost; - - @Bean(name = "openAiStreamClient") - public OpenAiStreamClient openAiStreamClient() { - HttpLoggingInterceptor httpLoggingInterceptor = new HttpLoggingInterceptor(new OpenAILogger()); - httpLoggingInterceptor.setLevel(HttpLoggingInterceptor.Level.HEADERS); - OkHttpClient okHttpClient = new OkHttpClient - .Builder() - .addInterceptor(httpLoggingInterceptor) - .connectTimeout(30, TimeUnit.SECONDS) - .writeTimeout(600, TimeUnit.SECONDS) - .readTimeout(600, TimeUnit.SECONDS) - .build(); - return OpenAiStreamClient - .builder() - .apiHost(apiHost) - .apiKey(apiKey) - //鑷畾涔塳ey浣跨敤绛栫暐 榛樿闅忔満绛栫暐 - .keyStrategy(new KeyRandomStrategy()) - .okHttpClient(okHttpClient) - .build(); - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/config/LocalCache.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/config/LocalCache.java deleted file mode 100644 index e3a6b95..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/config/LocalCache.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.xmzs.common.chat.config; - -import cn.hutool.cache.CacheUtil; -import cn.hutool.cache.impl.TimedCache; -import cn.hutool.core.date.DateUnit; -import lombok.extern.slf4j.Slf4j; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @date 2023-03-10 - */ -@Slf4j -public class LocalCache { - /** - * 缂撳瓨鏃堕暱 - */ - public static final long TIMEOUT = 30 * DateUnit.MINUTE.getMillis(); - /** - * 娓呯悊闂撮殧 - */ - private static final long CLEAN_TIMEOUT = 30 * DateUnit.MINUTE.getMillis(); - - /** - * 缂撳瓨瀵硅薄 - */ - public static final TimedCache<String, Object> CACHE = CacheUtil.newTimedCache(TIMEOUT); - - - static { - //鍚姩瀹氭椂浠诲姟 - CACHE.schedulePrune(CLEAN_TIMEOUT); - } - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/config/WebSocketConfig.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/config/WebSocketConfig.java deleted file mode 100644 index c617bfd..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/config/WebSocketConfig.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.xmzs.common.chat.config; - -import cn.hutool.core.util.StrUtil; -import com.xmzs.common.chat.config.properties.WebSocketProperties; -import com.xmzs.common.chat.handler.PlusWebSocketHandler; -import com.xmzs.common.chat.interceptor.PlusWebSocketInterceptor; -import com.xmzs.common.chat.listener.WebSocketTopicListener; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.Bean; - -import org.springframework.web.socket.WebSocketHandler; -import org.springframework.web.socket.config.annotation.EnableWebSocket; -import org.springframework.web.socket.config.annotation.WebSocketConfigurer; -import org.springframework.web.socket.server.HandshakeInterceptor; - -/** - * WebSocket 閰嶇疆 - * - * @author zendwang - */ -@AutoConfiguration -@ConditionalOnProperty(value = "websocket.enabled", havingValue = "true") -@EnableConfigurationProperties(WebSocketProperties.class) -@EnableWebSocket -public class WebSocketConfig { - - @Bean - public WebSocketConfigurer webSocketConfigurer(HandshakeInterceptor handshakeInterceptor, - WebSocketHandler webSocketHandler, - WebSocketProperties webSocketProperties) { - if (StrUtil.isBlank(webSocketProperties.getPath())) { - webSocketProperties.setPath("/websocket"); - } - - if (StrUtil.isBlank(webSocketProperties.getAllowedOrigins())) { - webSocketProperties.setAllowedOrigins("*"); - } - - return registry -> registry - .addHandler(webSocketHandler, webSocketProperties.getPath()) - .addInterceptors(handshakeInterceptor) - .setAllowedOrigins(webSocketProperties.getAllowedOrigins()); - } - - @Bean - public HandshakeInterceptor handshakeInterceptor() { - return new PlusWebSocketInterceptor(); - } - - @Bean - public WebSocketHandler webSocketHandler() { - return new PlusWebSocketHandler(); - } - - @Bean - public WebSocketTopicListener topicListener() { - return new WebSocketTopicListener(); - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/config/properties/WebSocketProperties.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/config/properties/WebSocketProperties.java deleted file mode 100644 index 6fef98f..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/config/properties/WebSocketProperties.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xmzs.common.chat.config.properties; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; - -/** - * WebSocket 閰嶇疆椤� - * - * @author zendwang - */ -@ConfigurationProperties("websocket") -@Data -public class WebSocketProperties { - - private Boolean enabled; - - /** - * 璺緞 - */ - private String path; - - /** - * 璁剧疆璁块棶婧愬湴鍧� - */ - private String allowedOrigins; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/constant/OpenAIConst.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/constant/OpenAIConst.java deleted file mode 100644 index 34d9fc8..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/constant/OpenAIConst.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.xmzs.common.chat.constant; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @since 2023-03-06 - */ -public class OpenAIConst { - - public final static String OPENAI_HOST = "https://api.openai.com/"; - - public final static int SUCCEED_CODE = 200; - - /** GPT3鎵i櫎璐圭敤 */ - public final static double GPT3_COST = 0.05; - - /** GPT4鎵i櫎璐圭敤 */ - public final static double GPT4_COST = 0.2; - - /** DALL鏅�氱粯鍥炬墸闄よ垂鐢� */ - public final static double DALL3_COST = 0.3; - - /** DALL楂樻竻缁樺浘鎵i櫎璐圭敤 */ - public final static double DALL3_HD_COST = 0.5; - - /** MJ鎿嶄綔绫诲瀷1(鍙樺寲銆佸彉鐒︺�佹枃鐢熷浘銆佸浘鐢熷浘銆佸眬閮ㄩ噸缁樸�佹贩鍥�)鎵i櫎璐圭敤 */ - public final static double MJ_COST_TYPE1 = 0.3; - - /** MJ鎿嶄綔绫诲瀷2(鎹㈣劯銆佹斁澶с�佸浘鐢熸枃銆乸rompt鍒嗘瀽)鎵i櫎璐圭敤 */ - public final static double MJ_COST_TYPE2 = 0.1; - - /** MJ鎿嶄綔绫诲瀷3(鏌ヨ浠诲姟杩涘害銆佽幏鍙杝eed)鎵i櫎璐圭敤 */ - public final static double MJ_COST_TYPE3 = 0.0; - - /** 榛樿璐︽埛浣欓 */ - public final static double USER_BALANCE = 5; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/constant/WebSocketConstants.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/constant/WebSocketConstants.java deleted file mode 100644 index e0e67e0..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/constant/WebSocketConstants.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.xmzs.common.chat.constant; - -/** - * websocket鐨勫父閲忛厤缃� - * - * @author zendwang - */ -public interface WebSocketConstants { - /** - * websocketSession涓殑鍙傛暟鐨刱ey - */ - String LOGIN_USER_KEY = "loginUser"; - - /** - * 璁㈤槄鐨勯閬� - */ - String WEB_SOCKET_TOPIC = "global:websocket"; - - /** - * 鍓嶇蹇冭烦妫�鏌ョ殑鍛戒护 - */ - String PING = "ping"; - - /** - * 鏈嶅姟绔績璺虫仮澶嶇殑瀛楃涓� - */ - String PONG = "pong"; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/ChatProcessRequest.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/ChatProcessRequest.java deleted file mode 100644 index 7a88cc3..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/ChatProcessRequest.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.xmzs.common.chat.domain.request; - - -import lombok.Data; - -/** - * @author hncboy - * @date 2023/3/23 13:17 - * 娑堟伅澶勭悊璇锋眰 - */ -@Data -public class ChatProcessRequest { - - private String prompt; - - private Options options; - - private String systemMessage; - - @Data - public static class Options { - - private String conversationId; - - /** - * 杩欓噷鐨勭埗绾ф秷鎭寚鐨勬槸鍥炵瓟鐨勭埗绾ф秷鎭� id - * 鍓嶇鍙戦�侀棶棰橈紝闇�瑕佷笂涓嬫枃鐨勮瘽浼犲洖绛旂殑鐖剁骇娑堟伅 id - */ - private String parentMessageId; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/ChatRequest.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/ChatRequest.java deleted file mode 100644 index a7584a5..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/ChatRequest.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.xmzs.common.chat.domain.request; - -import com.xmzs.common.chat.entity.chat.Content; -import com.xmzs.common.chat.entity.chat.Message; -import jakarta.validation.constraints.NotEmpty; -import lombok.Data; - -import java.util.List; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @sine 2023-04-08 - */ -@Data -public class ChatRequest { - - @NotEmpty(message = "浼犲叆鐨勬ā鍨嬩笉鑳戒负绌�") - private String model; - - @NotEmpty(message = "瀵硅瘽娑堟伅涓嶈兘涓虹┖") - List<Message> messages; - - List<Content> imageContent; - - private String prompt; - - private String userId; - - /** - * 鐭ヨ瘑搴搃d - */ - private String kid; - - /** - * gpt鐨勯粯璁よ缃� - */ - private String systemMessage = ""; - - private double top_p = 1; - - private double temperature = 0.2; - - /** - * 涓婁笅鏂囩殑鏉℃暟 - */ - private Integer contentNumber = 10; - - /** - * 鏄惁鎼哄甫涓婁笅鏂� - */ - private Boolean usingContext = Boolean.TRUE; - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/Dall3Request.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/Dall3Request.java deleted file mode 100644 index 11a7ae5..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/Dall3Request.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.xmzs.common.chat.domain.request; - -import jakarta.validation.constraints.NotEmpty; -import lombok.Data; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @sine 2023-04-08 - */ -@Data -public class Dall3Request { - - @NotEmpty(message = "浼犲叆鐨勬ā鍨嬩笉鑳戒负绌�") - private String model; - - @NotEmpty(message = "鎻愮ず璇嶄笉鑳戒负绌�") - private String prompt; - - /** 鍥剧墖澶у皬 */ - @NotEmpty(message = "鍥剧墖澶у皬涓嶈兘涓虹┖") - private String size ; - - /** 鍥剧墖璐ㄩ噺 */ - @NotEmpty(message = "鍥剧墖璐ㄩ噺涓嶈兘涓虹┖") - private String quality; - - /** 鍥剧墖椋庢牸 */ - @NotEmpty(message = "鍥剧墖椋庢牸涓嶈兘涓虹┖") - private String style; - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/MjTaskRequest.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/MjTaskRequest.java deleted file mode 100644 index b0dacf5..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/MjTaskRequest.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.xmzs.common.chat.domain.request; - -import jakarta.validation.constraints.NotEmpty; -import lombok.Data; - -/** - * mj浠诲姟璇锋眰瀹炰綋绫� - * - * @author WangLe - */ -@Data -public class MjTaskRequest { - - private String prompt; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/RoleRequest.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/RoleRequest.java deleted file mode 100644 index 6184471..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/RoleRequest.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.xmzs.common.chat.domain.request; - -import lombok.Data; - -/** - * @author WangLe - */ -@Data -public class RoleRequest { - - /** - * 瑙掕壊鍚嶇О - */ - private String name; - - /** - * 瑙掕壊鎻忚堪 - */ - private String description; - - /** - * 闊抽鍦板潃 - */ - private String prompt; - - /** - * 澶村儚 - */ - private String avatar; - - - private String preProcess; - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/SaveMsgRequest.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/SaveMsgRequest.java deleted file mode 100644 index cccd824..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/SaveMsgRequest.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.common.chat.domain.request; - -import jakarta.validation.constraints.NotEmpty; -import lombok.Data; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @sine 2023-04-08 - */ -@Data -public class SaveMsgRequest { - - @NotEmpty(message = "浼犲叆鐨勬ā鍨嬩笉鑳戒负绌�") - private String model; - - @NotEmpty(message = "瀵硅瘽娑堟伅涓嶈兘涓虹┖") - private String msg; - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/SimpleGenerateRequest.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/SimpleGenerateRequest.java deleted file mode 100644 index d4beb1e..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/request/SimpleGenerateRequest.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.xmzs.common.chat.domain.request; - -import lombok.Data; - -/** - * @author WangLe - */ -@Data -public class SimpleGenerateRequest { - - /** - * 瑕佷娇鐢ㄧ殑妯″瀷ID (鐩墠缁熶竴涓簉eecho-neural-voice-001) - */ - private String model = "reecho-neural-voice-001"; - - /** - * 澶氭牱鎬� (0-100锛岄粯璁や负97) - */ - private Integer randomness; - - /** - * 绋冲畾鎬ц繃婊� (0-100锛岄粯璁や负0) - */ - private Integer stability_boost; - - /** - * 瑙掕壊ID - */ - private String voiceId; - - /** - * 瑕佺敓鎴愮殑鏂囨湰鍐呭 - */ - private String text; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/ChatResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/ChatResponse.java deleted file mode 100644 index 1410454..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/ChatResponse.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.xmzs.common.chat.domain.response; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @sine 2023-04-08 - */ -@Data -public class ChatResponse { - /** - * 闂娑堣�梩okens - */ - @JsonProperty("question_tokens") - private long questionTokens = 0; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/MetadataResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/MetadataResponse.java deleted file mode 100644 index 2773a33..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/MetadataResponse.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.xmzs.common.chat.domain.response; - -import lombok.Data; - -/** - * @author WangLe - */ -@Data -public class MetadataResponse { - private String promptMP3StorageUrl; - private String promptOriginAudioStorageUrl; - private String description; - private boolean preProcess; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/RoleDataResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/RoleDataResponse.java deleted file mode 100644 index 9470f1a..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/RoleDataResponse.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.xmzs.common.chat.domain.response; - -import lombok.Data; - -/** - * @author WangLe - */ -@Data -public class RoleDataResponse { - private String id; - private String name; - private String status; - private String from; - private String originId; - private MetadataResponse metadata; - private String createdAt; - private String updatedAt; - private String deletedAt; - private String userId; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/RoleResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/RoleResponse.java deleted file mode 100644 index 58cc4c1..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/RoleResponse.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.xmzs.common.chat.domain.response; - -import lombok.Data; - -/** - * @author WangLe - */ -@Data -public class RoleResponse { - private String status; - private String message; - private RoleDataResponse data; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/SimpleGenerateDataResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/SimpleGenerateDataResponse.java deleted file mode 100644 index b8a37a9..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/SimpleGenerateDataResponse.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xmzs.common.chat.domain.response; - -import lombok.Data; - -/** - * @author WangLe - */ -@Data -public class SimpleGenerateDataResponse { - - /** - * 鏈鐢熸垚鐨処D - */ - private String id; - - /** - * 鏈鐢熸垚缁撴灉鐨勯煶棰戞枃浠跺湴鍧� - */ - private String audio; - - /** - * 鏈鐢熸垚鎵�娑堣�楃殑鐐规暟 - */ - private Integer credit_used; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/SimpleGenerateResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/SimpleGenerateResponse.java deleted file mode 100644 index 0b0266c..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/domain/response/SimpleGenerateResponse.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xmzs.common.chat.domain.response; - -import lombok.Data; - -/** - * @author WangLe - */ -@Data -public class SimpleGenerateResponse { - - /** - * 鐘舵�佺爜锛屽け璐ユ椂鍒欎负500 - */ - private String status; - - /** - * 鐘舵�佹秷鎭� - */ - private String message; - - /** - * 鐢熸垚璇︽儏 - */ - private SimpleGenerateDataResponse data; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/Tts/TextToSpeech.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/Tts/TextToSpeech.java deleted file mode 100644 index cb4e88b..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/Tts/TextToSpeech.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.xmzs.common.chat.entity.Tts; - - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -@Data -@Builder -@JsonInclude(JsonInclude.Include.NON_NULL) -@NoArgsConstructor -@AllArgsConstructor -public class TextToSpeech { - - @Builder.Default - private String model = Model.TTS_1.getName(); - /** - * 闊抽澹伴煶婧� - * - * @see TtsVoice - */ - private String voice; - /** - * 杈撳叆鍐呭 - */ - private String input; - /** - * 杈撳嚭闊抽鏂囦欢鏍煎紡 - * - * @see TtsFormat - */ - @JsonProperty("response_format") - private String responseFormat; - /** - * 閫熷害璋冭妭锛岄粯璁ゆ槸1锛屽彇鍊艰寖鍥�0.25鈥斺��4.0 - */ - private Double speed; - - - @Getter - @AllArgsConstructor - public enum Model { - TTS_1("tts-1"), - TTS_1_HD("tts-1-hd"), - ; - private final String name; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/Tts/TtsFormat.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/Tts/TtsFormat.java deleted file mode 100644 index 2385813..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/Tts/TtsFormat.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.xmzs.common.chat.entity.Tts; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public enum TtsFormat { - MP3("mp3"), - OPUS("opus"), - AAC("aac"), - FLAC("flac"), - ; - private final String name; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/Tts/TtsVoice.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/Tts/TtsVoice.java deleted file mode 100644 index 370bb0b..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/Tts/TtsVoice.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.xmzs.common.chat.entity.Tts; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 鐢熸垚涓嶅悓澹伴煶鐨勯煶棰� - * <p>鍏蜂綋璇煶鏁堟灉鍙傝�冿細https://platform.openai.com/docs/guides/text-to-speech</p> - */ -@Getter -@AllArgsConstructor -public enum TtsVoice { - - ALLOY("alloy"), - ECHO("echo"), - FABLE("fable"), - ONYX("onyx"), - NOVA("nova"), - SHIMMER("shimmer"), - ; - - private final String name; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/BillingUsage.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/BillingUsage.java deleted file mode 100644 index b7c402a..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/BillingUsage.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.xmzs.common.chat.entity.billing; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.math.BigDecimal; -import java.util.List; - -/** - * 鎻忚堪锛氶噾棰濇秷鑰椾俊鎭� - * - * @author https:www.unfbx.com - * @since 2023-04-08 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class BillingUsage { - - @JsonProperty("object") - private String object; - /** - * 璐﹀彿閲戦娑堣�楁槑缁� - */ - @JsonProperty("daily_costs") - private List<DailyCost> dailyCosts; - /** - * 鎬讳娇鐢ㄩ噾棰濓細缇庡垎 - */ - @JsonProperty("total_usage") - private BigDecimal totalUsage; - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/CreditGrantsResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/CreditGrantsResponse.java deleted file mode 100644 index 9937e63..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/CreditGrantsResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.xmzs.common.chat.entity.billing; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.io.Serializable; -import java.math.BigDecimal; - -/** - * 鎻忚堪锛氫綑棰濇煡璇㈡帴鍙h繑鍥炲�� - * - * @author https:www.unfbx.com - * @since 2023-03-18 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class CreditGrantsResponse implements Serializable { - private String object; - /** - * 鎬婚噾棰濓細缇庡厓 - */ - @JsonProperty("total_granted") - private BigDecimal totalGranted; - /** - * 鎬讳娇鐢ㄩ噾棰濓細缇庡厓 - */ - @JsonProperty("total_used") - private BigDecimal totalUsed; - /** - * 鎬诲墿浣欓噾棰濓細缇庡厓 - */ - @JsonProperty("total_available") - private BigDecimal totalAvailable; - /** - * 浣欓鏄庣粏 - */ - private Grants grants; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/DailyCost.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/DailyCost.java deleted file mode 100644 index 4af4bc2..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/DailyCost.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.xmzs.common.chat.entity.billing; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.util.List; - -/** - * 鎻忚堪锛氶噾棰濇秷鑰楀垪琛� - * - * @author https:www.unfbx.com - * @since 2023-04-08 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class DailyCost { - /** - * 鏃堕棿鎴� - */ - @JsonProperty("timestamp") - private long timestamp; - /** - * 妯″瀷娑堣�楅噾棰濊鎯� - */ - @JsonProperty("line_items") - private List<LineItem> lineItems; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/Datum.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/Datum.java deleted file mode 100644 index a9b8e39..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/Datum.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.xmzs.common.chat.entity.billing; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.math.BigDecimal; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @since 2023-03-18 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class Datum { - private String object; - private String id; - /** - * 璧犻�侀噾棰濓細缇庡厓 - */ - @JsonProperty("grant_amount") - private BigDecimal grantAmount; - /** - * 浣跨敤閲戦锛氱編鍏� - */ - @JsonProperty("used_amount") - private BigDecimal usedAmount; - /** - * 鐢熸晥鏃堕棿鎴� - */ - @JsonProperty("effective_at") - private Long effectiveAt; - /** - * 杩囨湡鏃堕棿鎴� - */ - @JsonProperty("expires_at") - private Long expiresAt; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/Grants.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/Grants.java deleted file mode 100644 index 41a4fd0..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/Grants.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.common.chat.entity.billing; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.util.List; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @since 2023-03-18 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class Grants { - private String object; - @JsonProperty("data") - private List<Datum> data; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/KeyInfo.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/KeyInfo.java deleted file mode 100644 index 7933fa0..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/KeyInfo.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.xmzs.common.chat.entity.billing; - -import lombok.*; - -import java.time.LocalDate; - -/** - * openKey淇℃伅 - * - * @author admin - * @date 2023/6/15 - */ -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@ToString -public class KeyInfo { - /** - * 璁㈤槄绫诲瀷 - */ - private String planTitle; - /** - * key鍊� - */ - private String keyValue; - /** - * 鍓╀綑棰濆害 - */ - private Double remaining; - - /** - * 璐︽埛鎬讳綑棰� - */ - private Double totalAmount; - - /** - * 宸蹭娇鐢ㄧ殑棰濆害 - */ - private Double totalUsage; - - /** - * 鎴嚦鏃ユ湡 - */ - private LocalDate limitDate; - - /** - * 鏄惁缁戝崱 - */ - private Boolean isHasPaymentMethod; - - /** - * 鏈�楂樺彲鐢ㄦā鍨� - */ - private String model; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/LineItem.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/LineItem.java deleted file mode 100644 index b09c510..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/LineItem.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xmzs.common.chat.entity.billing; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import lombok.Data; - -import java.math.BigDecimal; - -/** - * 鎻忚堪锛氶噾棰濇秷鑰楀垪琛� - * - * @author https:www.unfbx.com - * @since 2023-04-08 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class LineItem { - /** - * 妯″瀷鍚嶇О - */ - private String name; - /** - * 娑堣�楅噾棰� - */ - private BigDecimal cost; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/Plan.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/Plan.java deleted file mode 100644 index c0af838..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/Plan.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.xmzs.common.chat.entity.billing; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import lombok.Data; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @since 2023-04-08 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class Plan { - private String title; - private String id; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/Subscription.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/Subscription.java deleted file mode 100644 index bbdad7f..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/billing/Subscription.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.xmzs.common.chat.entity.billing; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -/** - * 鎻忚堪锛氳处鎴蜂俊鎭� - * - * @author https:www.unfbx.com - * @since 2023-04-08 - */ -@Data -public class Subscription { - - @JsonProperty("object") - private String object; - - /** - * 浠樻鏂瑰紡 - */ - @JsonProperty("has_payment_method") - private boolean hasPaymentMethod; - - @JsonProperty("canceled") - private boolean canceled; - @JsonProperty("canceled_at") - private Object canceledAt; - - @JsonProperty("delinquent") - private Object delinquent; - @JsonProperty("access_until") - private long accessUntil; - @JsonProperty("soft_limit") - private long softLimit; - @JsonProperty("hard_limit") - private long hardLimit; - @JsonProperty("system_hard_limit") - private long systemHardLimit; - @JsonProperty("soft_limit_usd") - private double softLimitUsd; - @JsonProperty("hard_limit_usd") - private double hardLimitUsd; - @JsonProperty("system_hard_limit_usd") - private double systemHardLimitUsd; - /** - * 璁″垝 - */ - @JsonProperty("plan") - private Plan plan; - - /** - * 璐︽埛鍚嶇О - */ - @JsonProperty("account_name") - private String accountName; - - @JsonProperty("po_number") - private Object poNumber; - - /** - * 璐﹀崟閭 - */ - @JsonProperty("billing_email") - private Object billingEmail; - @JsonProperty("tax_ids") - private Object taxIds; - @JsonProperty("billing_address") - private Object billingAddress; - @JsonProperty("business_address") - private Object businessAddress; - @JsonProperty("primary") - private Boolean primary; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/BaseChatCompletion.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/BaseChatCompletion.java deleted file mode 100644 index 9e6f5b8..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/BaseChatCompletion.java +++ /dev/null @@ -1,263 +0,0 @@ -package com.xmzs.common.chat.entity.chat; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.xmzs.common.chat.constant.OpenAIConst; -import com.xmzs.common.chat.entity.chat.tool.Tools; -import lombok.*; -import lombok.experimental.SuperBuilder; - -import java.io.Serializable; -import java.util.List; -import java.util.Map; - -import static com.xmzs.common.chat.entity.chat.BaseChatCompletion.Model.GPT_3_5_TURBO; - -/** - * 鎻忚堪锛� chat妯″瀷鍩虹绫� - * - * @author https:www.unfbx.com - * @since 1.1.2 - * 2023-11-10 - */ -@Data -@SuperBuilder -@JsonInclude(JsonInclude.Include.NON_NULL) -@NoArgsConstructor -@AllArgsConstructor -public class BaseChatCompletion implements Serializable { - - @NonNull - @Builder.Default - private String model = GPT_3_5_TURBO.getName(); - - /** - * 鎸囧畾妯″瀷蹇呴』杈撳嚭鐨勬牸寮忕殑瀵硅薄銆� - * - * @since 1.1.2 - */ - @JsonProperty("response_format") - private ResponseFormat responseFormat; - - /** - * 宸茶繃鏃� - * - * @see #tools - */ - @Deprecated - private List<Functions> functions; - - /** - * 鍙栧�硷細null,auto鎴栬�呰嚜瀹氫箟 - * functions娌℃湁鍊肩殑鏃跺�欓粯璁や负锛歯ull - * functions瀛樺湪鍊煎緱鏃跺�欓粯璁や负锛歛uto - * 涔熷彲浠ヨ嚜瀹氫箟 - * <p>宸茶繃鏃�</p> - * - * @see #toolChoice - */ - @Deprecated - @JsonProperty("function_call") - private Object functionCall; - - /** - * 妯″瀷鍙兘璋冪敤鐨勫伐鍏峰垪琛ㄣ�� - * 褰撳墠鐗堟湰浠呮敮鎸侊細functions - * - * @since 1.1.2 - */ - private List<Tools> tools; - - /** - * 鍙栧�硷細String鎴栬�匱oolChoiceObj - * - * @since 1.1.2 - */ - @JsonProperty("tool_choice") - private Object toolChoice; - - /** - * 浣跨敤浠�涔堝彇鏍锋俯搴︼紝0鍒�2涔嬮棿銆傝緝楂樼殑鍊�(濡�0.8)灏嗕娇杈撳嚭鏇村姞闅忔満锛岃�岃緝浣庣殑鍊�(濡�0.2)灏嗕娇杈撳嚭鏇村姞闆嗕腑鍜岀‘瀹氥�� - * <p> - * We generally recommend altering this or but not both.top_p - */ - @Builder.Default - private double temperature = 0.2; - - /** - * 浣跨敤娓╁害閲囨牱鐨勬浛浠f柟娉曠О涓烘牳蹇冮噰鏍凤紝鍏朵腑妯″瀷鑰冭檻鍏锋湁top_p姒傜巼璐ㄩ噺鐨勪护鐗岀殑缁撴灉銆傚洜姝わ紝0.1 鎰忓懗鐫�鍙�冭檻鍖呭惈鍓� 10% 姒傜巼璐ㄩ噺鐨勪唬甯併�� - * <p> - * 鎴戜滑閫氬父寤鸿鏇存敼姝よ缃紝浣嗕笉瑕佸悓鏃舵洿鏀逛袱鑰呫�倀emperature - */ - @JsonProperty("top_p") - @Builder.Default - private Double topP = 1d; - - - /** - * 涓烘瘡涓彁绀虹敓鎴愮殑瀹屾垚娆℃暟銆� - */ - @Builder.Default - private Integer n = 1; - - - /** - * 鏄惁娴佸紡杈撳嚭. - * default:false - */ - @Builder.Default - private boolean stream = false; - /** - * 鍋滄杈撳嚭鏍囪瘑 - */ - private List<String> stop; - /** - * 鏈�澶ф敮鎸�4096 - */ - @JsonProperty("max_tokens") - @Builder.Default - private Integer maxTokens = 2048; - - - @JsonProperty("presence_penalty") - @Builder.Default - private double presencePenalty = 0; - - /** - * -2.0 ~~ 2.0 - */ - @JsonProperty("frequency_penalty") - @Builder.Default - private double frequencyPenalty = 0; - - @JsonProperty("logit_bias") - private Map logitBias; - /** - * 鐢ㄦ埛鍞竴鍊硷紝纭繚鎺ュ彛涓嶈閲嶅璋冪敤 - */ - private String user; - - /** - * @since 1.1.2 - */ - private Integer seed; - - - /** - * 鏈�鏂版ā鍨嬪弬鑰冨畼鏂规枃妗o細 - * <a href="https://platform.openai.com/docs/models/model-endpoint-compatibility">瀹樻柟绋冲畾妯″瀷鍒楄〃</a> - */ - @Getter - @AllArgsConstructor - public enum Model { - /** - * gpt-3.5-turbo - */ - GPT_3_5_TURBO("gpt-3.5-turbo"), - /** - * 涓存椂妯″瀷锛屼笉寤鸿浣跨敤锛�2023骞�9 鏈� 13 鏃ュ皢琚純鐢� - */ - @Deprecated - GPT_3_5_TURBO_0301("gpt-3.5-turbo-0301"), - /** - * gpt-3.5-turbo-0613 鏀寔鍑芥暟 - */ - GPT_3_5_TURBO_1106("gpt-3.5-turbo-1106"), - - GPT_3_5_TURBO_0613("gpt-3.5-turbo-0613"), - /** - * gpt-3.5-turbo-16k 瓒呴暱涓婁笅鏂� - */ - GPT_3_5_TURBO_16K("gpt-3.5-turbo-16k"), - /** - * gpt-3.5-turbo-16k-0613 瓒呴暱涓婁笅鏂� 鏀寔鍑芥暟 - */ - GPT_3_5_TURBO_16K_0613("gpt-3.5-turbo-16k-0613"), - /** - * gpt-3.5-turbo-0125 瓒呴暱涓婁笅鏂� 鏀寔鍑芥暟 - */ - GPT_3_5_TURBO_0125("gpt-3.5-turbo-0125"), - /** - * GPT4.0 - */ - GPT_4("gpt-4"), - /** - * 涓存椂妯″瀷锛屼笉寤鸿浣跨敤锛�2023骞�9 鏈� 13 鏃ュ皢琚純鐢� - */ - @Deprecated - GPT_4_0314("gpt-4-0314"), - /** - * GPT4.0 瓒呴暱涓婁笅鏂� - */ - GPT_4_32K("gpt-4-32k"), - /** - * 涓存椂妯″瀷锛屼笉寤鸿浣跨敤锛�2023骞�9 鏈� 13 鏃ュ皢琚純鐢� - */ - @Deprecated - GPT_4_32K_0314("gpt-4-32k-0314"), - - /** - * gpt-4-0613锛屾敮鎸佸嚱鏁� - */ - GPT_4_0613("gpt-4-0613"), - /** - * gpt-4-0613锛屾敮鎸佸嚱鏁� - */ - GPT_4_32K_0613("gpt-4-32k-0613"), - /** - * 鏀寔鏁扮粍妯″紡锛屾敮鎸乫unction call锛屾敮鎸佸彲閲嶅杈撳嚭 - */ - GPT_4_1106_PREVIEW("gpt-4-1106-preview"), - /** - * 鏀寔鍥剧墖 - */ - GPT_4_VISION_PREVIEW("gpt-4-vision-preview"), - /** - * gpt-4-0613锛屾敮鎸佸嚱鏁� - */ - GPT_4_0125_PREVIEW("gpt-4-0125-preview"), - - /** - * GPT_4_ALL - */ - GPT_4_ALL("gpt-4-all"), - - GPT_4_GIZMO("gpt-4-gizmo"), - - NET("net"), - - CLAUDE_3_SONNET("claude-3-sonnet-20240229"), - - GEMINI_PRO("gemini-pro"), - - STABLE_DIFFUSION("stable-diffusion"), - - SUNO_V3("suno-v3"), - ; - private final String name; - } - - @Getter - @AllArgsConstructor - public enum ChatType { - /** - * 瀵硅瘽绫诲瀷 - 杈撳叆 - */ - CHAT_IN("in"), - /** - * 瀵硅瘽绫诲瀷 - 杈撳嚭 - */ - CHAT_OUT("out"), - - ; - private final String name; - } - - public static double getModelCost(String modelName) { - if(modelName.startsWith("gpt-3.5")){ - return OpenAIConst.GPT3_COST; - }else { - return OpenAIConst.GPT4_COST; - } - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/BaseMessage.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/BaseMessage.java deleted file mode 100644 index 391b4c6..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/BaseMessage.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.xmzs.common.chat.entity.chat; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.unfbx.chatgpt.entity.chat.tool.ToolCalls; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.Getter; - -import java.io.Serializable; -import java.util.List; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @since 1.1.2 - * 2023-03-02 - */ -@Data -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@AllArgsConstructor -public class BaseMessage implements Serializable { - - /** - * 鐩墠鏀寔鍥涗釜涓鑹插弬鑰冨畼缃戯紝杩涜鎯呮櫙杈撳叆锛� - * https://platform.openai.com/docs/guides/chat/introduction - */ - private String role; - - - private String name; - - /** - * The tool calls generated by the model, such as function calls. - * @since 1.1.2 - */ - @JsonProperty("tool_calls") - private List<ToolCalls> toolCalls; - - /** - * @since 1.1.2 - */ - @JsonProperty("tool_call_id") - private String toolCallId; - - @Deprecated - @JsonProperty("function_call") - private FunctionCall functionCall; - - - /** - * 鏋勯�犲嚱鏁� - * - * @param role 瑙掕壊 - * @param name name - * @param functionCall functionCall - */ - public BaseMessage(String role, String name, FunctionCall functionCall) { - this.role = role; - this.name = name; - this.functionCall = functionCall; - } - - public BaseMessage() { - } - - - @Getter - @AllArgsConstructor - public enum Role { - - SYSTEM("system"), - USER("user"), - ASSISTANT("assistant"), - FUNCTION("function"), - TOOL("tool"), - ; - private final String name; - } - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ChatChoice.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ChatChoice.java deleted file mode 100644 index b3a1644..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ChatChoice.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.xmzs.common.chat.entity.chat; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @since 2023-03-02 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class ChatChoice implements Serializable { - private long index; - /** - * 璇锋眰鍙傛暟stream涓簍rue杩斿洖鏄痙elta - */ - @JsonProperty("delta") - private Message delta; - /** - * 璇锋眰鍙傛暟stream涓篺alse杩斿洖鏄痬essage - */ - @JsonProperty("message") - private Message message; - @JsonProperty("finish_reason") - private String finishReason; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ChatCompletion.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ChatCompletion.java deleted file mode 100644 index 0e626eb..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ChatCompletion.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.xmzs.common.chat.entity.chat; - -import cn.hutool.core.collection.CollectionUtil; -import cn.hutool.core.util.StrUtil; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.*; -import lombok.experimental.SuperBuilder; -import lombok.extern.slf4j.Slf4j; - -import java.io.Serializable; -import java.util.List; - -/** - * 鎻忚堪锛� chat妯″瀷鍙傛暟 - * - * @author https:www.unfbx.com - * 2023-03-02 - */ -@Data -@SuperBuilder -@Slf4j -@JsonInclude(JsonInclude.Include.NON_NULL) -@NoArgsConstructor -@AllArgsConstructor -public class ChatCompletion extends BaseChatCompletion implements Serializable { - - /** - * 闂鎻忚堪 - */ - @NonNull - private List<Message> messages; - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ChatCompletionResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ChatCompletionResponse.java deleted file mode 100644 index 170e74d..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ChatCompletionResponse.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xmzs.common.chat.entity.chat; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.xmzs.common.chat.entity.common.Usage; -import lombok.Data; - - -import java.io.Serializable; -import java.util.List; - -/** - * 鎻忚堪锛� chat绛旀绫� - * - * @author https:www.unfbx.com - * 2023-03-02 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class ChatCompletionResponse implements Serializable { - private String id; - private String object; - private long created; - private String model; - private List<ChatChoice> choices; - private Usage usage; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ChatCompletionWithPicture.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ChatCompletionWithPicture.java deleted file mode 100644 index a5c6801..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ChatCompletionWithPicture.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.xmzs.common.chat.entity.chat; - -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.*; -import lombok.experimental.SuperBuilder; -import lombok.extern.slf4j.Slf4j; - -import java.io.Serializable; -import java.util.List; - -/** - * 鎻忚堪锛� chat妯″瀷闄勫甫鍥剧墖鐨勫弬鏁� - * - * @author https:www.unfbx.com - * @since 1.1.2 - * 2023-11-10 - */ -@Data -@SuperBuilder -@Slf4j -@JsonInclude(JsonInclude.Include.NON_NULL) -@NoArgsConstructor -@AllArgsConstructor -public class ChatCompletionWithPicture extends BaseChatCompletion implements Serializable { - /** - * 闂鎻忚堪 - */ - private List<MessagePicture> messages; - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/Content.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/Content.java deleted file mode 100644 index f26fcb9..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/Content.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.xmzs.common.chat.entity.chat; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import lombok.extern.slf4j.Slf4j; - -/** - * 鎻忚堪锛� - * - * @author https://www.unfbx.com - * @since 1.1.2 - * 2023-11-10 - */ -@Data -@Builder -@Slf4j -@JsonInclude(JsonInclude.Include.NON_NULL) -@NoArgsConstructor -@AllArgsConstructor -public class Content { - /** - * 杈撳叆绫诲瀷锛歵ext銆乮mage_url - * - * @see Type - */ - private String type; - private String text; - @JsonProperty("image_url") - private ImageUrl imageUrl; - - /** - * 鐢熸垚鍥剧墖椋庢牸 - */ - @Getter - @AllArgsConstructor - public enum Type { - TEXT("text"), - IMAGE_URL("image_url"), - ; - private final String name; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/FunctionCall.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/FunctionCall.java deleted file mode 100644 index cc19b3a..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/FunctionCall.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.xmzs.common.chat.entity.chat; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * 鎻忚堪锛氬嚱鏁拌皟鐢ㄨ繑鍥炲�� - * - * @author https://www.unfbx.com - * @since 2023-06-14 - */ -@Data -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class FunctionCall { - /** - * 鏂规硶鍚� - */ - private String name; - /** - * 鏂规硶鍙傛暟 - */ - private String arguments; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/Functions.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/Functions.java deleted file mode 100644 index 95c1b3c..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/Functions.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.xmzs.common.chat.entity.chat; - -import lombok.Builder; -import lombok.Data; - -import java.io.Serializable; - -/** - * 鎻忚堪锛氭柟娉曞弬鏁板疄浣撶被锛屽疄渚嬫暟鎹涓� - * <pre> - * { - * "name": "get_current_weather", - * "description": "Get the current weather in a given location", - * "parameters": { - * "type": "object", - * "properties": { - * "location": { - * "type": "string", - * "description": "The city and state, e.g. San Francisco, CA" - * }, - * "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]} - * }, - * "required": ["location"] - * }, - * } - * </pre> - * @author https:www.unfbx.com - * @since 2023-06-14 - */ -@Data -@Builder -public class Functions implements Serializable { - /** - * 鏂规硶鍚嶇О - */ - private String name; - /** - * 鏂规硶鎻忚堪 - */ - private String description; - /** - * 鏂规硶鍙傛暟 - * 鎵╁睍鍙傛暟鍙互缁ф壙Parameters鑷繁瀹炵幇锛宩son鏍煎紡鐨勬暟鎹� - */ - private Parameters parameters; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ImageUrl.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ImageUrl.java deleted file mode 100644 index c2fa6b3..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ImageUrl.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.xmzs.common.chat.entity.chat; - -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.extern.slf4j.Slf4j; - -/** - * 鎻忚堪锛� - * - * @author https://www.unfbx.com - * 2023-11-10 - */ -@Data -@Builder -@Slf4j -@JsonInclude(JsonInclude.Include.NON_NULL) -@NoArgsConstructor -@AllArgsConstructor -public class ImageUrl { - /** - * 鍥剧墖鍦板潃锛屾敮鎸乥ase64. eg: data:image/jpeg;base64,{base64_image} <p\> - * https://platform.openai.com/docs/guides/vision - */ - private String url; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/Message.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/Message.java deleted file mode 100644 index 3738ebb..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/Message.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.xmzs.common.chat.entity.chat; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.Getter; - -import java.io.Serializable; -import java.util.List; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @since 2023-03-02 - */ -@Data -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -public class Message implements Serializable { - - /** - * 鐩墠鏀寔鍥涗釜涓鑹插弬鑰冨畼缃戯紝杩涜鎯呮櫙杈撳叆锛� - * https://platform.openai.com/docs/guides/chat/introduction - */ - private String role; - - private String content; - - private String name; - - @JsonProperty("function_call") - private FunctionCall functionCall; - - public static Builder builder() { - return new Builder(); - } - - /** - * 鏋勯�犲嚱鏁� - * - * @param role 瑙掕壊 - * @param content 鎻忚堪涓婚淇℃伅 - * @param name name - * @param functionCall functionCall - */ - public Message(String role, String content, String name, FunctionCall functionCall) { - this.role = role; - this.content = content; - this.name = name; - this.functionCall = functionCall; - } - - public Message() { - } - - private Message(Builder builder) { - setRole(builder.role); - setContent(builder.content); - setName(builder.name); - setFunctionCall(builder.functionCall); - } - - - @Getter - @AllArgsConstructor - public enum Role { - - SYSTEM("system"), - USER("user"), - ASSISTANT("assistant"), - FUNCTION("function"), - ; - private String name; - } - - public static final class Builder { - private String role; - private String content; - private String name; - private FunctionCall functionCall; - - public Builder() { - } - - public Builder role(Role role) { - this.role = role.getName(); - return this; - } - - public Builder role(String role) { - this.role = role; - return this; - } - - public Builder content(String content) { - this.content = content; - return this; - } - - public Builder name(String name) { - this.name = name; - return this; - } - - public Builder functionCall(FunctionCall functionCall) { - this.functionCall = functionCall; - return this; - } - - public Message build() { - return new Message(this); - } - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/MessagePicture.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/MessagePicture.java deleted file mode 100644 index 9ad7d63..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/MessagePicture.java +++ /dev/null @@ -1,114 +0,0 @@ -package com.xmzs.common.chat.entity.chat; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.unfbx.chatgpt.entity.chat.tool.ToolCalls; -import lombok.AllArgsConstructor; -import lombok.Data; - -import java.io.Serializable; -import java.util.List; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @since 2023-03-02 - */ -@Data -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonIgnoreProperties(ignoreUnknown = true) -@AllArgsConstructor -public class MessagePicture extends BaseMessage implements Serializable { - /** - * Content鏁扮粍鏀寔澶氬浘鐗囪緭鍏� - * https://platform.openai.com/docs/guides/vision - */ - private List<Content> content; - - - public static Builder builder() { - return new Builder(); - } - - /** - * 鏋勯�犲嚱鏁� - * - * @param role 瑙掕壊 - * @param name name - * @param content content - * @param functionCall functionCall - */ - public MessagePicture(String role, String name, List<Content> content, List<ToolCalls> toolCalls, String toolCallId, FunctionCall functionCall) { - this.content = content; - super.setRole(role); - super.setName(name); - super.setToolCalls(toolCalls); - super.setToolCallId(toolCallId); - super.setFunctionCall(functionCall); - } - - public MessagePicture() { - } - - private MessagePicture(Builder builder) { - setContent(builder.content); - super.setRole(builder.role); - super.setName(builder.name); - super.setFunctionCall(builder.functionCall); - super.setToolCalls(builder.toolCalls); - super.setToolCallId(builder.toolCallId); - } - - public static final class Builder { - private String role; - private List<Content> content; - private String name; - private String toolCallId; - private List<ToolCalls> toolCalls; - private FunctionCall functionCall; - - public Builder() { - } - - public Builder role(Role role) { - this.role = role.getName(); - return this; - } - - public Builder role(String role) { - this.role = role; - return this; - } - - public Builder content(List<Content> content) { - this.content = content; - return this; - } - - public Builder name(String name) { - this.name = name; - return this; - } - - public Builder functionCall(FunctionCall functionCall) { - this.functionCall = functionCall; - return this; - } - - public Builder toolCalls(List<ToolCalls> toolCalls) { - this.toolCalls = toolCalls; - return this; - } - - public Builder toolCallId(String toolCallId) { - this.toolCallId = toolCallId; - return this; - } - - public MessagePicture build() { - return new MessagePicture(this); - } - } - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/Parameters.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/Parameters.java deleted file mode 100644 index b4d5ad8..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/Parameters.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.xmzs.common.chat.entity.chat; - -import lombok.Builder; -import lombok.Data; - -import java.io.Serializable; -import java.util.List; -/** - * 鎻忚堪锛氭柟娉曞弬鏁扮被锛屾墿灞曞弬鏁板彲浠ョ户鎵縋arameters鑷繁瀹炵幇 - * 鍙傝�冿細 - * <pre> - * { - * "type": "object", - * "properties": { - * "location": { - * "type": "string", - * "description": "The city and state, e.g. San Francisco, CA" - * }, - * "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]} - * }, - * "required": ["location"] - * } - * </pre> - * @author https:www.unfbx.com - * @since 2023-06-14 - */ -@Data -@Builder -public class Parameters implements Serializable { - /** - * 鍙傛暟绫诲瀷 - */ - private String type; - /** - * 鍙傛暟灞炴�с�佹弿杩� - */ - private Object properties; - /** - * 鏂规硶蹇呰緭瀛楁 - */ - private List<String> required; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ResponseFormat.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ResponseFormat.java deleted file mode 100644 index 06da355..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/ResponseFormat.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.xmzs.common.chat.entity.chat; - -import lombok.*; - -/** - * 鎸囧畾妯″瀷蹇呴』杈撳嚭鐨勬牸寮忕殑瀵硅薄銆� - */ -@Data -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class ResponseFormat { - /** - * 榛樿锛歵ext - * - * @see Type - */ - private String type; - - @Getter - @AllArgsConstructor - public enum Type { - JSON_OBJECT("json_object"), - TEXT("text"), - ; - private final String name; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolCallFunction.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolCallFunction.java deleted file mode 100644 index 293ac31..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolCallFunction.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.xmzs.common.chat.entity.chat.tool; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serializable; - -/** - * ToolCall 鐨� Function鍙傛暟 - * The function that the model called. - * - * @author https:www.unfbx.com - * @since 1.1.2 - * 2023-11-09 - */ -@Data -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class ToolCallFunction implements Serializable { - /** - * 鏂规硶鍚� - */ - private String name; - /** - * 鏂规硶鍙傛暟 - */ - private String arguments; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolCalls.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolCalls.java deleted file mode 100644 index 9b304b5..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolCalls.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.unfbx.chatgpt.entity.chat.tool; - -import com.xmzs.common.chat.entity.chat.tool.ToolCallFunction; -import lombok.*; - -import java.io.Serializable; - -/** - * The tool calls generated by the model, such as function calls. - * - * @author <a href="https://www.unfbx.com">unfbx</a> - * @since 1.1.2 - * 2023-11-09 - */ -@Data -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class ToolCalls implements Serializable { - /** - * The ID of the tool call. - */ - private String id; - /** - * The type of the tool. Currently, only function is supported. - */ - private String type; - - private ToolCallFunction function; - - @Getter - @AllArgsConstructor - public enum Type { - FUNCTION("function"), - ; - private final String name; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolChoice.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolChoice.java deleted file mode 100644 index d99b657..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolChoice.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xmzs.common.chat.entity.chat.tool; - -import lombok.*; - -import java.io.Serializable; - -/** - * choice鍜宱bject鍚屾椂瀛樺湪鏄互object涓哄噯 - * - * @author <a href="https://www.unfbx.com">unfbx</a> - * @since 1.1.2 - * 2023-11-09 - */ -@Data -public class ToolChoice implements Serializable { - - @Getter - @AllArgsConstructor - public enum Choice { - NONE("none"), - AUTO("auto"), - ; - private final String name; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolChoiceObj.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolChoiceObj.java deleted file mode 100644 index 04dbfd5..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolChoiceObj.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.xmzs.common.chat.entity.chat.tool; - -import lombok.*; - -/** - * @author <a href="https://www.unfbx.com">unfbx</a> - * @since 1.1.2 - * 2023-11-09 - */ -@Data -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class ToolChoiceObj { - /** - * 闇�瑕佽皟鐢ㄧ殑鏂规硶鍚嶇О - */ - private ToolChoiceObjFunction function; - /** - * 宸ュ叿鐨勭被鍨嬨�傜洰鍓嶄粎鏀寔鍑芥暟銆� - * - * @see Type - */ - private String type; - - @Getter - @AllArgsConstructor - public enum Type { - FUNCTION("function"), - ; - private final String name; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolChoiceObjFunction.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolChoiceObjFunction.java deleted file mode 100644 index b45ab9a..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolChoiceObjFunction.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.common.chat.entity.chat.tool; - - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * @author <a href="https://www.unfbx.com">unfbx</a> - * @since 1.1.2 - * 2023-11-09 - */ -@Data -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class ToolChoiceObjFunction { - - private String name; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/Tools.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/Tools.java deleted file mode 100644 index 43f5be9..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/Tools.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.xmzs.common.chat.entity.chat.tool; - - -import lombok.*; - -import java.io.Serializable; - -/** - * @author <a href="https://www.unfbx.com">unfbx</a> - * @since 1.1.2 - * 2023-11-09 - */ -@Data -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class Tools implements Serializable { - - /** - * 鐩墠鍙敮鎸侊細function - * - * @see Type - */ - private String type; - - private ToolsFunction function; - - @Getter - @AllArgsConstructor - public enum Type { - FUNCTION("function"), - ; - private final String name; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolsFunction.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolsFunction.java deleted file mode 100644 index 7465eb5..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/chat/tool/ToolsFunction.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.xmzs.common.chat.entity.chat.tool; - - -import com.xmzs.common.chat.entity.chat.Parameters; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serializable; - -/** - * @author <a href="https://www.unfbx.com">unfbx</a> - * @since 1.1.2 - * 2023-11-09 - */ -@Data -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class ToolsFunction implements Serializable { - - /** - * 瑕佽皟鐢ㄧ殑鍑芥暟鐨勫悕绉般�傚繀椤绘槸 a-z銆丄-Z銆�0-9锛屾垨鍖呭惈涓嬪垝绾垮拰鐮存姌鍙凤紝鏈�澶ч暱搴︿负 64 - */ - private String name; - /** - * 瀵瑰嚱鏁板姛鑳界殑鎻忚堪锛屾ā鍨嬩娇鐢ㄥ畠鏉ラ�夋嫨浣曟椂浠ュ強濡備綍璋冪敤璇ュ嚱鏁般�� - */ - private String description; - /** - * 鍑芥暟鎺ュ彈鐨勫弬鏁帮紝鎻忚堪涓� JSON Schema 瀵硅薄 - * 鎵╁睍鍙傛暟鍙互缁ф壙Parameters鑷繁瀹炵幇锛宩son鏍煎紡鐨勬暟鎹� - */ - private Parameters parameters; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/common/Choice.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/common/Choice.java deleted file mode 100644 index 63360b8..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/common/Choice.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.xmzs.common.chat.entity.common; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class Choice implements Serializable { - private String text; - private long index; - private Object logprobs; - @JsonProperty("finish_reason") - private String finishReason; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/common/DeleteResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/common/DeleteResponse.java deleted file mode 100644 index 4d35e0d..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/common/DeleteResponse.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.xmzs.common.chat.entity.common; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import lombok.Data; - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class DeleteResponse implements Serializable { - private String id; - private String object; - private boolean deleted; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/common/OpenAiResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/common/OpenAiResponse.java deleted file mode 100644 index 36b8b6e..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/common/OpenAiResponse.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.xmzs.common.chat.entity.common; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import lombok.Data; - -import java.io.Serializable; -import java.util.List; -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class OpenAiResponse<T> implements Serializable { - private String object; - private List<T> data; - private Error error; - - - @Data - @JsonIgnoreProperties(ignoreUnknown = true) - public class Error { - private String message; - private String type; - private String param; - private String code; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/common/Usage.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/common/Usage.java deleted file mode 100644 index 9802aa7..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/common/Usage.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.xmzs.common.chat.entity.common; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class Usage implements Serializable { - @JsonProperty("prompt_tokens") - private long promptTokens; - @JsonProperty("completion_tokens") - private long completionTokens; - @JsonProperty("total_tokens") - private long totalTokens; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/completions/Completion.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/completions/Completion.java deleted file mode 100644 index f3ecc12..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/completions/Completion.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.xmzs.common.chat.entity.completions; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import lombok.extern.slf4j.Slf4j; - - -import java.io.Serializable; -import java.util.List; -import java.util.Map; - -/** - * 鎻忚堪锛� 闂绫� - * - * @author https:www.unfbx.com - * 2023-02-11 - */ -@Data -@Builder -@Slf4j -@JsonInclude(JsonInclude.Include.NON_NULL) -@NoArgsConstructor -@AllArgsConstructor -public class Completion implements Serializable { - - @NonNull - @Builder.Default - private String model = Model.DAVINCI_003.getName(); - /** - * 闂鎻忚堪 - */ - @NonNull - private String prompt; - /** - * 瀹屾垚杈撳嚭鍚庣殑鍚庣紑锛岀敤浜庢牸寮忓寲杈撳嚭缁撴灉 - */ - private String suffix; - - /** - * 鏈�澶ф敮鎸�4096 - */ - @JsonProperty("max_tokens") - @Builder.Default - private Integer maxTokens = 2048; - /** - * 浣跨敤浠�涔堝彇鏍锋俯搴︼紝0鍒�2涔嬮棿銆傝緝楂樼殑鍊�(濡�0.8)灏嗕娇杈撳嚭鏇村姞闅忔満锛岃�岃緝浣庣殑鍊�(濡�0.2)灏嗕娇杈撳嚭鏇村姞闆嗕腑鍜岀‘瀹氥�� - * <p> - * We generally recommend altering this or but not both.top_p - */ - @Builder.Default - private double temperature = 0; - - /** - * 浣跨敤娓╁害閲囨牱鐨勬浛浠f柟娉曠О涓烘牳蹇冮噰鏍凤紝鍏朵腑妯″瀷鑰冭檻鍏锋湁top_p姒傜巼璐ㄩ噺鐨勪护鐗岀殑缁撴灉銆傚洜姝わ紝0.1 鎰忓懗鐫�鍙�冭檻鍖呭惈鍓� 10% 姒傜巼璐ㄩ噺鐨勪唬甯併�� - * <p> - * 鎴戜滑閫氬父寤鸿鏇存敼姝よ缃紝浣嗕笉瑕佸悓鏃舵洿鏀逛袱鑰呫�倀emperature - */ - @JsonProperty("top_p") - @Builder.Default - private Double topP = 1d; - - /** - * 涓烘瘡涓彁绀虹敓鎴愮殑瀹屾垚娆℃暟銆� - */ - @Builder.Default - private Integer n = 1; - - @Builder.Default - private boolean stream = false; - /** - * 鏈�澶у�硷細5 - */ - private Integer logprobs; - - @Builder.Default - private boolean echo = false; - - private List<String> stop; - - @JsonProperty("presence_penalty") - @Builder.Default - private double presencePenalty = 0; - - /** - * -2.0 ~~ 2.0 - */ - @JsonProperty("frequency_penalty") - @Builder.Default - private double frequencyPenalty = 0; - - @JsonProperty("best_of") - @Builder.Default - private Integer bestOf = 1; - - @JsonProperty("logit_bias") - private Map logitBias; - /** - * 鐢ㄦ埛鍞竴鍊硷紝纭繚鎺ュ彛涓嶈閲嶅璋冪敤 - */ - private String user; - - /** - * 鑾峰彇褰撳墠鍙傛暟鐨則okens鏁� - * @return token鏁伴噺 - */ -// public long tokens() { -// if (StrUtil.isBlank(this.prompt) || StrUtil.isBlank(this.model)) { -// log.warn("鍙傛暟寮傚父model锛歿}锛宲rompt锛歿}", this.model, this.prompt); -// return 0; -// } -// return TikTokensUtil.tokens(this.model, this.prompt); -// } - - @Getter - @AllArgsConstructor - public enum Model { - DAVINCI_003("text-davinci-003"), - DAVINCI_002("text-davinci-002"), - DAVINCI("davinci"), - ; - private String name; - } -} - - diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/completions/CompletionResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/completions/CompletionResponse.java deleted file mode 100644 index 891aa91..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/completions/CompletionResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.xmzs.common.chat.entity.completions; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.xmzs.common.chat.entity.common.Choice; -import com.xmzs.common.chat.entity.common.OpenAiResponse; -import com.xmzs.common.chat.entity.common.Usage; -import lombok.Data; - - -import java.io.Serializable; - -/** - * 鎻忚堪锛� 绛旀绫� - * - * @author https:www.unfbx.com - * 2023-02-11 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class CompletionResponse extends OpenAiResponse implements Serializable { - private String id; - private String object; - private long created; - private String model; - private Choice[] choices; - private Usage usage; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/dto/WebSocketMessageDto.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/dto/WebSocketMessageDto.java deleted file mode 100644 index 7a73aae..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/dto/WebSocketMessageDto.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.xmzs.common.chat.entity.dto; - -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.List; - -/** - * 娑堟伅鐨刣to - * - * @author zendwang - */ -@Data -public class WebSocketMessageDto implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 闇�瑕佹帹閫佸埌鐨剆ession key 鍒楄〃 - */ - private List<Long> sessionKeys; - - /** - * 闇�瑕佸彂閫佺殑娑堟伅 - */ - private String message; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/edits/Edit.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/edits/Edit.java deleted file mode 100644 index 7e80336..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/edits/Edit.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.xmzs.common.chat.entity.edits; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import lombok.extern.slf4j.Slf4j; - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Getter -@Builder -@Slf4j -@NoArgsConstructor -@AllArgsConstructor -public class Edit implements Serializable { - /** - * 缂栬緫妯″瀷锛岀洰鍓嶆敮鎸佷袱绉� - */ - @NonNull - private String model; - - @NonNull - private String input; - /** - * 鎻愮ず璇存槑銆傚憡鐭ユā鍨嬪浣曚慨鏀广�� - */ - @NonNull - private String instruction; - - - /** - * 浣跨敤浠�涔堝彇鏍锋俯搴︼紝0鍒�2涔嬮棿銆傝緝楂樼殑鍊�(濡�0.8)灏嗕娇杈撳嚭鏇村姞闅忔満锛岃�岃緝浣庣殑鍊�(濡�0.2)灏嗕娇杈撳嚭鏇村姞闆嗕腑鍜岀‘瀹氥�� - * - * We generally recommend altering this or but not both.top_p - */ - @Builder.Default - private double temperature = 0; - - /** - * 浣跨敤娓╁害閲囨牱鐨勬浛浠f柟娉曠О涓烘牳蹇冮噰鏍凤紝鍏朵腑妯″瀷鑰冭檻鍏锋湁top_p姒傜巼璐ㄩ噺鐨勪护鐗岀殑缁撴灉銆傚洜姝わ紝0.1 鎰忓懗鐫�鍙�冭檻鍖呭惈鍓� 10% 姒傜巼璐ㄩ噺鐨勪唬甯併�� - * - * 鎴戜滑閫氬父寤鸿鏇存敼姝よ缃紝浣嗕笉瑕佸悓鏃舵洿鏀逛袱鑰呫�倀emperature - */ - @JsonProperty("top_p") - @Builder.Default - private Double topP = 1d; - - /** - * 涓烘瘡涓彁绀虹敓鎴愮殑瀹屾垚娆℃暟銆� - */ - @Builder.Default - private Integer n = 1; - - public void setModel(Model model) { - this.model = model.getName(); - } - - public void setTemperature(double temperature) { - if (temperature > 2 || temperature < 0) { - log.error("temperature鍙傛暟寮傚父锛宼emperature灞炰簬[0,2]"); - this.temperature = 2; - return; - } - if (temperature < 0) { - log.error("temperature鍙傛暟寮傚父锛宼emperature灞炰簬[0,2]"); - this.temperature = 0; - return; - } - this.temperature = temperature; - } - - - public void setTopP(Double topP) { - this.topP = topP; - } - - public void setN(Integer n) { - this.n = n; - } - - public void setInput(String input) { - this.input = input; - } - - public void setInstruction(String instruction) { - this.instruction = instruction; - } - @Getter - @AllArgsConstructor - public enum Model { - TEXT_DAVINCI_EDIT_001("text-davinci-edit-001"), - CODE_DAVINCI_EDIT_001("code-davinci-edit-001"), - ; - private String name; - } -} - - - diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/edits/EditResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/edits/EditResponse.java deleted file mode 100644 index 8f5c60b..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/edits/EditResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.xmzs.common.chat.entity.edits; - - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.xmzs.common.chat.entity.common.Choice; -import com.xmzs.common.chat.entity.common.Usage; -import lombok.Data; - - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class EditResponse implements Serializable { - private String id; - private String object; - private long created; - private String model; - private Choice[] choices; - private Usage usage; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/embeddings/Embedding.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/embeddings/Embedding.java deleted file mode 100644 index 7996590..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/embeddings/Embedding.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.xmzs.common.chat.entity.embeddings; - -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.*; -import lombok.extern.slf4j.Slf4j; - -import java.io.Serializable; -import java.util.List; -import java.util.Objects; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Getter -@Slf4j -@Builder -@JsonInclude(JsonInclude.Include.NON_NULL) -@NoArgsConstructor -@AllArgsConstructor -public class Embedding implements Serializable { - @NonNull - @Builder.Default - private String model = Model.TEXT_EMBEDDING_ADA_002.getName(); - /** - * 蹇呴�夐」锛氶暱搴︿笉鑳借秴杩囷細8192 - */ - @NonNull - private List<String> input; - - private String user; - - public void setModel(Model model) { - if (Objects.isNull(model)) { - model = Model.TEXT_EMBEDDING_ADA_002; - } - this.model = model.getName(); - } - - - public void setUser(String user) { - this.user = user; - } - - @Getter - @AllArgsConstructor - public enum Model { - TEXT_EMBEDDING_ADA_002("text-embedding-ada-002"), - ; - private String name; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/embeddings/EmbeddingResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/embeddings/EmbeddingResponse.java deleted file mode 100644 index 57bb114..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/embeddings/EmbeddingResponse.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xmzs.common.chat.entity.embeddings; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.xmzs.common.chat.entity.common.Usage; -import lombok.Data; - - -import java.io.Serializable; -import java.util.List; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class EmbeddingResponse implements Serializable { - - private String object; - private List<Item> data; - private String model; - private Usage usage; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/embeddings/Item.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/embeddings/Item.java deleted file mode 100644 index 2ceb1c8..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/embeddings/Item.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.xmzs.common.chat.entity.embeddings; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import lombok.Data; - -import java.io.Serializable; -import java.math.BigDecimal; -import java.util.List; - -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class Item implements Serializable { - private String object; - private List<BigDecimal> embedding; - private Integer index; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/engines/Engine.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/engines/Engine.java deleted file mode 100644 index 1f8e552..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/engines/Engine.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xmzs.common.chat.entity.engines; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import lombok.Data; - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class Engine implements Serializable { - - private String id; - private String object; - private String owner; - private boolean ready; - private Object permissions; - private long created; - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/files/File.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/files/File.java deleted file mode 100644 index 1dc0052..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/files/File.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.xmzs.common.chat.entity.files; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class File implements Serializable { - -// private String id; -// private String object; -// private long bytes; -// private long created_at; -// private String filename; -// private String purpose; -// private String status; -// @JsonProperty("status_details") -// private String statusDetails; - - private long bytes; - private long created_at; - private String filename; - private String id; - private String object; - private String url; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/files/UploadFileResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/files/UploadFileResponse.java deleted file mode 100644 index 00276ad..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/files/UploadFileResponse.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.xmzs.common.chat.entity.files; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import lombok.Data; - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class UploadFileResponse extends File implements Serializable { -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/Event.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/Event.java deleted file mode 100644 index af4a0d5..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/Event.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.xmzs.common.chat.entity.fineTune; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.io.Serializable; - -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class Event implements Serializable { - private String object; - @JsonProperty("created_at") - private long createdAt; - private String level; - private String message; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/FineTune.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/FineTune.java deleted file mode 100644 index 29d4e5a..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/FineTune.java +++ /dev/null @@ -1,123 +0,0 @@ -package com.xmzs.common.chat.entity.fineTune; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.xmzs.common.chat.openai.exception.CommonError; -import lombok.*; -import lombok.extern.slf4j.Slf4j; -import com.xmzs.common.core.exception.base.BaseException; - - -import java.io.Serializable; -import java.util.List; -import java.util.Objects; - -@Getter -@Slf4j -@Builder -@JsonInclude(JsonInclude.Include.NON_NULL) -@NoArgsConstructor -@AllArgsConstructor -public class FineTune implements Serializable { - - /** - * 涓婁紶鐨勬枃浠禝D - */ - @NonNull - @JsonProperty("training_file") - private String trainingFile; - - @JsonProperty("validation_file") - private String validationFile; - /** - * 鍙傝�� - * @see Model - */ - private String model; - - @JsonProperty("n_epochs") - @Builder.Default - private Integer n_epochs = 4; - - @JsonProperty("batch_size") - private Integer batchSize; - - @JsonProperty("learning_rate_multiplier") - private Double learningRateMultiplier; - - @JsonProperty("prompt_loss_weight") - @Builder.Default - private Double promptLossWeight = 0.01; - - @JsonProperty("compute_classification_metrics") - @Builder.Default - private boolean computeClassificationMetrics = false; - - @JsonProperty("classification_n_classes") - private Integer classificationNClasses; - - @JsonProperty("classification_betas") - private List classificationBetas; - - private String suffix; - - public void setTrainingFile(String trainingFile) { - this.trainingFile = trainingFile; - } - - public void setValidationFile(String validationFile) { - this.validationFile = validationFile; - } - - public void setModel(String model) { - this.model = model; - } - - public void setN_epochs(Integer n_epochs) { - this.n_epochs = n_epochs; - } - - public void setBatchSize(Integer batchSize) { - this.batchSize = batchSize; - } - - public void setLearningRateMultiplier(Double learningRateMultiplier) { - this.learningRateMultiplier = learningRateMultiplier; - } - - public void setPromptLossWeight(Double promptLossWeight) { - this.promptLossWeight = promptLossWeight; - } - - public void setComputeClassificationMetrics(boolean computeClassificationMetrics) { - this.computeClassificationMetrics = computeClassificationMetrics; - } - - public void setClassificationNClasses(Integer classificationNClasses) { - this.classificationNClasses = classificationNClasses; - } - - public void setClassificationBetas(List classificationBetas) { - this.classificationBetas = classificationBetas; - } - - public void setSuffix(String suffix) { - if(Objects.nonNull(suffix) && !"".equals(suffix) && suffix.length() > 40){ - log.error("鍚庣紑闀垮害涓嶈兘澶т簬40"); - throw new BaseException(CommonError.PARAM_ERROR.msg()); - } - this.suffix = suffix; - } - - @Getter - @AllArgsConstructor - public enum Model { - // or a fine-tuned model created after 2022-04-21. - ADA("ada"), - BABBAGE("babbage"), - CURIE("curie"), - DAVINCI("davinci"), - ; - private String name; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/FineTuneDeleteResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/FineTuneDeleteResponse.java deleted file mode 100644 index ddb787a..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/FineTuneDeleteResponse.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.common.chat.entity.fineTune; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import lombok.Data; - -import java.io.Serializable; - -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class FineTuneDeleteResponse implements Serializable { - - private String id; - - private String object; - - private boolean deleted; - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/FineTuneResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/FineTuneResponse.java deleted file mode 100644 index 2753fca..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/FineTuneResponse.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.xmzs.common.chat.entity.fineTune; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.io.Serializable; -import java.util.List; - -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class FineTuneResponse implements Serializable { - - private String id; - - private String object; - - private String model; - - @JsonProperty("created_at") - private long createdAt; - - private List<Event> events; - - @JsonProperty("fine_tuned_model") - private String fineTunedModel; - - @JsonProperty("hyperparams") - private HyperParam hyperParams; - - @JsonProperty("organization_id") - private String organizationId; - - @JsonProperty("result_files") - private List resultFiles; - - private String status; - - @JsonProperty("validation_files") - private List validationFiles; - - @JsonProperty("training_files") - private List<TrainingFile> trainingFiles; - - @JsonProperty("updated_at") - private long updatedAt; - - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/HyperParam.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/HyperParam.java deleted file mode 100644 index 1aca22d..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/HyperParam.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.common.chat.entity.fineTune; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.io.Serializable; - -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class HyperParam implements Serializable { - - @JsonProperty("batch_size") - private Integer batchSize; - @JsonProperty("learning_rate_multiplier") - private Double learningRateMultiplier; - @JsonProperty("n_epochs") - private Integer nEpochs; - @JsonProperty("prompt_loss_weight") - private Double promptLossWeight; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/TrainingFile.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/TrainingFile.java deleted file mode 100644 index e0736b8..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/fineTune/TrainingFile.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.xmzs.common.chat.entity.fineTune; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.io.Serializable; - -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class TrainingFile implements Serializable { - - private String id; - private String object; - private long bytes; - @JsonProperty("created_at") - private long createdAt; - private String filename; - private String purpose; - private String status; - @JsonProperty("status_details") - private String statusDetails; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/Image.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/Image.java deleted file mode 100644 index 76b75d5..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/Image.java +++ /dev/null @@ -1,108 +0,0 @@ -package com.xmzs.common.chat.entity.images; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import lombok.extern.slf4j.Slf4j; - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Getter -@Slf4j -@Builder -@JsonInclude(JsonInclude.Include.NON_NULL) -@NoArgsConstructor -@AllArgsConstructor -public class Image implements Serializable { - - /** - * 鎻愮ず璇嶏細dall-e-2鏀寔1000瀛楃銆乨all-e-3鏀寔4000瀛楃 - */ - private String prompt; - /** - * 鏀寔dall-e-2銆乨all-e-3 - * - * @see Model - */ - @Builder.Default - private String model = Model.DALL_E_3.getName(); - - /** - * 姝ゅ弬鏁颁粎浠卍all-e-3,榛樿鍊硷細standard - * - * @see Quality - */ - private String quality; - - /** - * 涓烘瘡涓彁绀虹敓鎴愮殑涓暟锛宒all-e-3鍙兘涓�1銆� - */ - private Integer n; - /** - * 鍥剧墖灏哄锛岄粯璁ゅ�硷細1024x1024 - * dall-e-2鏀寔锛�256x256, 512x512, or 1024x1024 - * dall-e-3鏀寔锛�1024x1024, 1792x1024, or 1024x1792 - * - * @see SizeEnum - */ - private String size; - /** - * 姝ゅ弬鏁颁粎浠卍all-e-3,鍙栧�艰寖鍥达細vivid銆乶atural - * 榛樿鍊硷細vivid - * - * @see Style - */ - private String style; - - /** - * 鐢熸垚鍥剧墖鏍煎紡锛歶rl銆乥64_json - * - * @see ResponseFormat - */ - @JsonProperty("response_format") - private String responseFormat; - - private String user; - - /** - * 鍥剧墖鐢熸垚妯″瀷 - */ - @Getter - @AllArgsConstructor - public enum Model { - DALL_E_2("dall-e-2"), - DALL_E_3("dall-e-3"), - ; - private final String name; - } - - /** - * 鐢熸垚鍥剧墖璐ㄩ噺 - */ - @Getter - @AllArgsConstructor - public enum Quality { - STANDARD("standard"), - HD("hd"), - ; - private final String name; - } - - /** - * 鐢熸垚鍥剧墖椋庢牸 - */ - @Getter - @AllArgsConstructor - public enum Style { - VIVID("vivid"), - NATURAL("natural"), - ; - private final String name; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/ImageEdit.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/ImageEdit.java deleted file mode 100644 index d1e8768..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/ImageEdit.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.xmzs.common.chat.entity.images; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.xmzs.common.chat.openai.exception.CommonError; -import lombok.*; -import lombok.extern.slf4j.Slf4j; -import com.xmzs.common.core.exception.base.BaseException; - - -import java.io.Serializable; -import java.util.Objects; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Getter -@Slf4j -@Builder -@JsonInclude(JsonInclude.Include.NON_NULL) -@NoArgsConstructor -@AllArgsConstructor -public class ImageEdit implements Serializable { - /** - * 蹇呴�夐」锛氭弿杩版枃瀛楋紝鏈�澶�1000瀛楃 - */ - @NonNull - private String prompt; - /** - * 涓烘瘡涓彁绀虹敓鎴愮殑瀹屾垚娆℃暟銆� - */ - @Builder.Default - private Integer n = 1; - /** - * 256x256 - * 512x512 - * 1024x1024 - */ - @Builder.Default - private String size = SizeEnum.size_512.getName(); - - @JsonProperty("response_format") - @Builder.Default - private String responseFormat = ResponseFormat.URL.getName(); - - private String user; - - public ImageEdit setN(Integer n) { - if(n < 1){ - log.warn("n鏈�灏忓��1"); - n = 1; - } - if(n > 10){ - log.warn("n鏈�澶у��10"); - n = 10; - } - this.n = n; - return this; - } - - public ImageEdit setPrompt(String prompt) { - if(Objects.isNull(prompt) || "".equals(prompt)){ - log.error("鍙傛暟寮傚父"); - throw new BaseException(CommonError.PARAM_ERROR.msg()); - } - if(prompt.length() > 1000){ - log.error("闀垮害瓒呰繃1000"); - throw new BaseException(CommonError.PARAM_ERROR.msg()); - } - this.prompt = prompt; - return this; - } - - public ImageEdit setSize(SizeEnum size) { - if(Objects.isNull(size)){ - size = SizeEnum.size_512; - } - this.size = size.getName(); - return this; - } - - public ImageEdit setResponseFormat(ResponseFormat responseFormat) { - if(Objects.isNull(responseFormat)){ - responseFormat = ResponseFormat.URL; - } - this.responseFormat = responseFormat.getName(); - return this; - } - - public ImageEdit setUser(String user) { - this.user = user; - return this; - } - - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/ImageResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/ImageResponse.java deleted file mode 100644 index 1d2b5a0..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/ImageResponse.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.xmzs.common.chat.entity.images; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import lombok.Data; - -import java.io.Serializable; -import java.util.List; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class ImageResponse implements Serializable { - private long created; - private List<Item> data; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/ImageVariations.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/ImageVariations.java deleted file mode 100644 index 58018db..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/ImageVariations.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.xmzs.common.chat.entity.images; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.extern.slf4j.Slf4j; - -import java.io.Serializable; -import java.util.Objects; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Getter -@Slf4j -@Builder -@JsonInclude(JsonInclude.Include.NON_NULL) -@NoArgsConstructor -@AllArgsConstructor -public class ImageVariations implements Serializable { - /** - * 涓烘瘡涓彁绀虹敓鎴愮殑瀹屾垚娆℃暟銆� - */ - @Builder.Default - private Integer n = 1; - /** - * 256x256 - * 512x512 - * 1024x1024 - */ - @Builder.Default - private String size = SizeEnum.size_512.getName(); - - @JsonProperty("response_format") - @Builder.Default - private String responseFormat = ResponseFormat.URL.getName(); - - private String user; - - - public void setN(Integer n) { - if (n < 1) { - log.warn("n鏈�灏忓��1"); - this.n = 1; - return; - } - if (n > 10) { - log.warn("n鏈�澶у��10"); - this.n = 10; - return; - } - this.n = n; - } - - - public void setSize(SizeEnum size) { - if (Objects.isNull(size)) { - size = SizeEnum.size_512; - } - this.size = size.getName(); - } - - public void setResponseFormat(ResponseFormat responseFormat) { - if (Objects.isNull(responseFormat)) { - responseFormat = ResponseFormat.URL; - } - this.responseFormat = responseFormat.getName(); - } - - public void setUser(String user) { - this.user = user; - } - - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/Item.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/Item.java deleted file mode 100644 index c22afa4..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/Item.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.common.chat.entity.images; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class Item implements Serializable { - private String url; - @JsonProperty("b64_json") - private String b64Json; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/ResponseFormat.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/ResponseFormat.java deleted file mode 100644 index b75c691..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/ResponseFormat.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.xmzs.common.chat.entity.images; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@AllArgsConstructor -@Getter -public enum ResponseFormat implements Serializable { - URL("url"), - B64_JSON("b64_json"), - ; - - private String name; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/SizeEnum.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/SizeEnum.java deleted file mode 100644 index a72ef38..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/images/SizeEnum.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xmzs.common.chat.entity.images; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Getter -@AllArgsConstructor -public enum SizeEnum implements Serializable { - size_1024_1792("1024x1792"), - size_1792_1024("1792x1024"), - size_1024("1024x1024"), - size_512("512x512"), - size_256("256x256"), - - ; - private String name; - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/models/Model.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/models/Model.java deleted file mode 100644 index 0b45b6f..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/models/Model.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.xmzs.common.chat.entity.models; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.io.Serializable; -import java.util.List; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class Model implements Serializable { - - private String id; - private String object; - private long created; - @JsonProperty("owned_by") - private String ownedBy; - @JsonProperty("permission") - private List<Permission> permission; - private String root; - private Object parent; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/models/ModelResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/models/ModelResponse.java deleted file mode 100644 index 33aee8d..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/models/ModelResponse.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.xmzs.common.chat.entity.models; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import lombok.Data; - -import java.io.Serializable; -import java.util.List; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class ModelResponse implements Serializable { - private String object; - private List<Model> data; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/models/Permission.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/models/Permission.java deleted file mode 100644 index ffdbd52..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/models/Permission.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.xmzs.common.chat.entity.models; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class Permission implements Serializable { - - private String id; - @JsonProperty("object") - private String object; - @JsonProperty("created") - private long created; - @JsonProperty("allow_create_engine") - private boolean allowCreateEngine; - @JsonProperty("allow_sampling") - private boolean allowSampling; - @JsonProperty("allow_logprobs") - private boolean allowLogprobs; - @JsonProperty("allow_search_indices") - private boolean allowSearchIndices; - @JsonProperty("allow_view") - private boolean allowView; - @JsonProperty("allow_fine_tuning") - private boolean allowFineTuning; - @JsonProperty("organization") - private String organization; - /** - * 涓嶇煡閬撴槸浠�涔堢被鍨嬬殑鏁版嵁 - */ - @JsonProperty("group") - private Object group; - @JsonProperty("is_blocking") - private boolean isBlocking; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/moderations/Categories.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/moderations/Categories.java deleted file mode 100644 index 140195d..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/moderations/Categories.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.xmzs.common.chat.entity.moderations; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class Categories implements Serializable { - /** - * 琛ㄨ揪銆佺吔鍔ㄦ垨瀹f壃鍩轰簬绉嶆棌銆佹�у埆銆佹皯鏃忋�佸畻鏁欍�佸浗绫嶃�佹�у彇鍚戙�佹畫鐤剧姸鍐垫垨绉嶅鐨勪粐鎭ㄧ殑鍐呭銆� - */ - private boolean hate; - /** - * 浠囨仺鍐呭锛岃繕鍖呮嫭瀵圭洰鏍囩兢浣撶殑鏆村姏鎴栦弗閲嶄激瀹炽�� - */ - @JsonProperty("hate/threatening") - private boolean hateThreatening; - /** - * 瀹f壃銆侀紦鍔辨垨鎻忕粯鑷畫琛屼负锛堜緥濡傝嚜鏉�銆佸壊浼ゅ拰楗澶辫皟锛夌殑鍐呭銆� - */ - @JsonProperty("self-harm") - private boolean selfHarm; - /** - * 鏃ㄥ湪寮曡捣鎬у叴濂嬬殑鍐呭锛屼緥濡傚鎬ф椿鍔ㄧ殑鎻忚堪锛屾垨瀹d紶鎬ф湇鍔★紙涓嶅寘鎷�ф暀鑲插拰鍋ュ悍锛夌殑鍐呭銆� - */ - private boolean sexual; - /** - * 鍖呭惈鏈弧 18 鍛ㄥ瞾鐨勪釜浜虹殑鑹叉儏鍐呭銆� - */ - @JsonProperty("sexual/minors") - private boolean sexualMinors; - /** - * 瀹f壃鎴栫編鍖栨毚鍔涙垨姝岄浠栦汉閬彈鑻﹂毦鎴栫緸杈辩殑鍐呭銆� - */ - private boolean violence; - /** - * 浠ユ瀬绔鑵ョ粏鑺傛弿缁樻浜°�佹毚鍔涙垨涓ラ噸韬綋浼ゅ鐨勬毚鍔涘唴瀹广�� - */ - @JsonProperty("violence/graphic") - private boolean violenceGraphic; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/moderations/CategoryScores.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/moderations/CategoryScores.java deleted file mode 100644 index 9efcdd2..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/moderations/CategoryScores.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.xmzs.common.chat.entity.moderations; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.io.Serializable; -import java.math.BigDecimal; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class CategoryScores implements Serializable { - private BigDecimal hate; - @JsonProperty("hate/threatening") - private BigDecimal hateThreatening; - @JsonProperty("self-harm") - private BigDecimal selfHarm; - private BigDecimal sexual; - @JsonProperty("sexual/minors") - private BigDecimal sexualMinors; - private BigDecimal violence; - @JsonProperty("violence/graphic") - private BigDecimal violenceGraphic; - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/moderations/Moderation.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/moderations/Moderation.java deleted file mode 100644 index 193659a..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/moderations/Moderation.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.xmzs.common.chat.entity.moderations; - -import com.xmzs.common.chat.openai.exception.CommonError; -import lombok.*; -import lombok.extern.slf4j.Slf4j; -import com.xmzs.common.core.exception.base.BaseException; - - -import java.io.Serializable; -import java.util.List; -import java.util.Objects; - -/** - * 鎻忚堪锛氭枃鏈鏍革紝鏁忔劅璇嶉壌鍒� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Getter -@Builder -@Slf4j -@NoArgsConstructor -@AllArgsConstructor -public class Moderation implements Serializable { - - @NonNull - private List<String> input; - @Builder.Default - private String model = Model.TEXT_MODERATION_LATEST.getName(); - - public void setInput(List<String> input) { - if (Objects.isNull(input) || input.size() == 0) { - log.error("input涓嶈兘涓虹┖"); - throw new BaseException(CommonError.PARAM_ERROR.msg()); - } - this.input = input; - } - - public void setModel(Model model) { - if (Objects.isNull(model)) { - model = Model.TEXT_MODERATION_LATEST; - } - this.model = model.getName(); - } - - @Getter - @AllArgsConstructor - public enum Model { - TEXT_MODERATION_STABLE("text-moderation-stable"), - TEXT_MODERATION_LATEST("text-moderation-latest"), - ; - - private String name; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/moderations/ModerationResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/moderations/ModerationResponse.java deleted file mode 100644 index 91e00a9..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/moderations/ModerationResponse.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.common.chat.entity.moderations; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import lombok.Data; - -import java.io.Serializable; -import java.util.List; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class ModerationResponse implements Serializable { - private String id; - private String model; - private List<Result> results; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/moderations/Result.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/moderations/Result.java deleted file mode 100644 index 12ab9ac..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/moderations/Result.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.xmzs.common.chat.entity.moderations; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class Result implements Serializable { - private Categories categories; - @JsonProperty("category_scores") - private CategoryScores categoryScores; - private boolean flagged; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/whisper/Transcriptions.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/whisper/Transcriptions.java deleted file mode 100644 index 5803261..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/whisper/Transcriptions.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.xmzs.common.chat.entity.whisper; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.FieldNameConstants; - -/** - * @author Admin - */ -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -@FieldNameConstants -@JsonInclude(JsonInclude.Include.NON_NULL) -public class Transcriptions extends Whisper { - /** - * 妯″瀷鐩墠鍙敮鎸佽繖涓�绉嶏細WHISPER_1 - */ - @Builder.Default - private String model = Whisper.Model.WHISPER_1.getName(); - /** - * 鎻愮ず璇紝闇�瑕佷笌璇煶璇█鍖归厤 - */ - private String prompt; - /** - * 杈撳嚭鐨勬牸寮忥紝閲囩敤浠ヤ笅閫夐」涔嬩竴锛歫son銆乼ext銆乻rt銆乿erbose_json 鎴� vtt銆� - * 榛樿鍊硷細json - */ - @JsonProperty("response_format") - @Builder.Default - private String responseFormat = ResponseFormat.JSON.getName(); - /** - * 娓╁害鎺у埗闅忔満鏁堟灉锛�0-1锛屽�艰秺澶ц緭鍑烘洿鍔犻殢鏈� - * 榛樿鍊硷細0 - */ - @Builder.Default - private Double temperature = 0d; - /** - * 杈撳叆闊抽鐨勮瑷�,浠� ISO-639-1 鏍煎紡鎻愪緵杈撳叆璇█灏嗘彁楂樺噯纭�у拰寤惰繜銆� - * 鍙傝�冿細<a href=https://baike.baidu.com/item/ISO%20639-1/8292914>ISO-639-1</a> - */ - private String language; - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/whisper/Translations.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/whisper/Translations.java deleted file mode 100644 index fe68f9b..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/whisper/Translations.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.xmzs.common.chat.entity.whisper; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.FieldNameConstants; - -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -@FieldNameConstants -@JsonInclude(JsonInclude.Include.NON_NULL) -public class Translations { - /** - * 妯″瀷鐩墠鍙敮鎸佽繖涓�绉嶏細WHISPER_1 - */ - @Builder.Default - private String model = Whisper.Model.WHISPER_1.getName(); - /** - * 鎻愮ず璇紝闇�瑕佷笌璇煶璇█鍖归厤 - */ - private String prompt; - /** - * 杈撳嚭鐨勬牸寮忥紝閲囩敤浠ヤ笅閫夐」涔嬩竴锛歫son銆乼ext銆乻rt銆乿erbose_json 鎴� vtt銆� - * 榛樿鍊硷細json - */ - @JsonProperty("response_format") - @Builder.Default - private String responseFormat = Whisper.ResponseFormat.JSON.getName(); - /** - * 娓╁害鎺у埗闅忔満鏁堟灉锛�0-1锛屽�艰秺澶ц緭鍑烘洿鍔犻殢鏈� - * 榛樿鍊硷細0 - */ - @Builder.Default - private double temperature = 0; - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/whisper/Whisper.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/whisper/Whisper.java deleted file mode 100644 index 4e4f681..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/whisper/Whisper.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.xmzs.common.chat.entity.whisper; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.Getter; - -import java.io.Serializable; - -/** - * 鎻忚堪锛氳闊宠浆鏂囧瓧 - * - * @author https:www.unfbx.com - * @since 2023-03-02 - */ -@Data -public class Whisper implements Serializable { - - - @Getter - @AllArgsConstructor - public enum Model { - WHISPER_1("whisper-1"), - ; - private String name; - } - - @Getter - @AllArgsConstructor - public enum ResponseFormat { - JSON("json"), - TEXT("text"), - SRT("srt"), - VERBOSE_JSON("verbose_json"), - VTT("vtt"), - ; - private String name; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/whisper/WhisperResponse.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/whisper/WhisperResponse.java deleted file mode 100644 index 183207f..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/entity/whisper/WhisperResponse.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.xmzs.common.chat.entity.whisper; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import lombok.Data; - -import java.io.Serializable; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @since 2023-03-02 - */ -@Data -@JsonIgnoreProperties(ignoreUnknown = true) -public class WhisperResponse implements Serializable { - - private String text; -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/handler/PlusWebSocketHandler.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/handler/PlusWebSocketHandler.java deleted file mode 100644 index 96c17de..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/handler/PlusWebSocketHandler.java +++ /dev/null @@ -1,162 +0,0 @@ -package com.xmzs.common.chat.handler; - -import cn.hutool.core.util.StrUtil; -import cn.hutool.json.JSONUtil; -import com.alibaba.fastjson2.JSONObject; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.chat.config.LocalCache; -import com.xmzs.common.chat.entity.chat.ChatCompletion; -import com.xmzs.common.chat.holder.WebSocketSessionHolder; -import com.xmzs.common.chat.listener.WebSocketEventListener; -import com.xmzs.common.chat.openai.OpenAiStreamClient; -import com.xmzs.common.chat.entity.chat.Message; -import com.xmzs.common.chat.utils.WebSocketUtils; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.socket.*; -import org.springframework.web.socket.handler.AbstractWebSocketHandler; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -/** - * WebSocketHandler 瀹炵幇绫� - * - * @author zendwang - */ -@Slf4j -public class PlusWebSocketHandler extends AbstractWebSocketHandler { - - /** - * 鏄惁寮�鍚枃鏈鏍� - */ - @Value("${baidu.enabled}") - private Boolean enabled; - - /** - * 杩炴帴鎴愬姛鍚� - */ - @Override - public void afterConnectionEstablished(WebSocketSession session) { - WebSocketSessionHolder.addSession(session.getId(), session); - } - - /** - * 澶勭悊鍙戦�佹潵鐨勬枃鏈秷鎭� - * - * @param session - * @param message - */ - @Override - protected void handleTextMessage(WebSocketSession session, TextMessage message) { -// if(enabled){ -// // 鍒ゆ柇鏂囨湰鏄惁鍚堣 -// TextReviewService textReviewService=(TextReviewService) SpringUtils.context().getBean("textReviewService"); -// String type = textReviewService.textReview(message.getPayload()); -// // 瀹℃牳鐘舵�� 1 浠h〃鍚堟硶 -// String conclusionType = "1"; -// if (!conclusionType.equals(type) && StringUtils.isNotEmpty(type)) { -// HashMap<Object, Object> msgMap = new HashMap<>(10); -// msgMap.put("content", "鏂囨湰涓嶅悎瑙�,璇蜂慨鏀�!"); -// String jsonStr = JSONUtil.toJsonStr(msgMap); -// WebSocketUtils.sendMessage(session, jsonStr); -// WebSocketUtils.sendMessage(session, "[DONE]"); -// return; -// } -// } - WebSocketEventListener eventSourceListener = new WebSocketEventListener(session); - String messageContext = (String) LocalCache.CACHE.get(session.getId()); - List<Message> messages = new ArrayList<>(); - if (StrUtil.isNotBlank(messageContext)) { - messages = JSONUtil.toList(messageContext, Message.class); - // 涓婁笅鏂囬暱搴� - int contextSize=10; - if (messages.size() >= contextSize) { - messages = messages.subList(1, contextSize); - } - Message currentMessage = Message.builder().content(message.getPayload()).role(Message.Role.USER).build(); - messages.add(currentMessage); - } else { - Message currentMessage = Message.builder().content(message.getPayload()).role(Message.Role.USER).build(); - messages.add(currentMessage); - } - ChatCompletion chatCompletion = ChatCompletion - .builder() - .model(ChatCompletion.Model.GPT_3_5_TURBO.getName()) - .messages(messages) - .temperature(0.2) - .stream(true) - .build(); - OpenAiStreamClient openAiStreamClient=(OpenAiStreamClient) SpringUtils.context().getBean("openAiStreamClient"); - openAiStreamClient.streamChatCompletion(chatCompletion, eventSourceListener); - LocalCache.CACHE.put(session.getId(), JSONUtil.toJsonStr(messages), LocalCache.TIMEOUT); - } - - /** - * 鏍规嵁key鑾峰彇Value鍊� - * - * @Date 2023/7/27 - * @param jsonObject - * @param key - * @param defaultValue - * @return String - **/ - public String getValue(JSONObject jsonObject,String key,String defaultValue){ - String value = (String)jsonObject.get(key); - if(StrUtil.isEmpty(value)){ - return defaultValue; - } - return value; - } - - @Override - protected void handleBinaryMessage(WebSocketSession session, BinaryMessage message) throws Exception { - super.handleBinaryMessage(session, message); - } - - /** - * 蹇冭烦鐩戞祴鐨勫洖澶� - * - * @param session - * @param message - * @throws Exception - */ - @Override - protected void handlePongMessage(WebSocketSession session, PongMessage message) throws Exception { - WebSocketUtils.sendPongMessage(session); - } - - /** - * 杩炴帴鍑洪敊鏃� - * - * @param session - * @param exception - * @throws Exception - */ - @Override - public void handleTransportError(WebSocketSession session, Throwable exception) throws Exception { - log.error("[transport error] sessionId: {} , exception:{}", session.getId(), exception.getMessage()); - } - - /** - * 杩炴帴鍏抽棴鍚� - * - * @param session - * @param status - */ - @Override - public void afterConnectionClosed(WebSocketSession session, CloseStatus status) { - WebSocketSessionHolder.removeSession(session.getId()); - } - - /** - * 鏄惁鏀寔鍒嗙墖娑堟伅 - * - * @return - */ - @Override - public boolean supportsPartialMessages() { - return false; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/holder/WebSocketSessionHolder.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/holder/WebSocketSessionHolder.java deleted file mode 100644 index d04a0bb..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/holder/WebSocketSessionHolder.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.xmzs.common.chat.holder; - -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import org.springframework.web.socket.WebSocketSession; - -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -/** - * WebSocketSession 鐢ㄤ簬淇濆瓨褰撳墠鎵�鏈夊湪绾跨殑浼氳瘽淇℃伅 - * - * @author zendwang - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class WebSocketSessionHolder { - - private static final Map<String, WebSocketSession> USER_SESSION_MAP = new ConcurrentHashMap<>(); - - public static void addSession(String sessionKey, WebSocketSession session) { - USER_SESSION_MAP.put(sessionKey, session); - } - - public static void removeSession(String sessionKey) { - if (USER_SESSION_MAP.containsKey(sessionKey)) { - USER_SESSION_MAP.remove(sessionKey); - } - } - - public static WebSocketSession getSessions(Long sessionKey) { - return USER_SESSION_MAP.get(sessionKey); - } - - public static Boolean existSession(Long sessionKey) { - return USER_SESSION_MAP.containsKey(sessionKey); - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/interceptor/PlusWebSocketInterceptor.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/interceptor/PlusWebSocketInterceptor.java deleted file mode 100644 index 49f2467..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/interceptor/PlusWebSocketInterceptor.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.xmzs.common.chat.interceptor; - -import lombok.extern.slf4j.Slf4j; -import org.springframework.http.server.ServerHttpRequest; -import org.springframework.http.server.ServerHttpResponse; -import org.springframework.web.socket.WebSocketHandler; -import org.springframework.web.socket.server.HandshakeInterceptor; - -import java.util.Map; - -/** - * WebSocket鎻℃墜璇锋眰鐨勬嫤鎴櫒 - * - * @author zendwang - */ -@Slf4j -public class PlusWebSocketInterceptor implements HandshakeInterceptor { - - /** - * 鎻℃墜鍓� - * - * @param request request - * @param response response - * @param wsHandler wsHandler - * @param attributes attributes - * @return 鏄惁鎻℃墜鎴愬姛 - */ - @Override - public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map<String, Object> attributes) { - return true; - } - - - /** - * 鎻℃墜鍚� - * - * @param request request - * @param response response - * @param wsHandler wsHandler - * @param exception 寮傚父 - */ - @Override - public void afterHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Exception exception) { - - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/listener/SSEEventSourceListener.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/listener/SSEEventSourceListener.java deleted file mode 100644 index 2ec6b96..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/listener/SSEEventSourceListener.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.xmzs.common.chat.listener; - - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xmzs.common.chat.config.LocalCache; -import com.xmzs.common.chat.entity.chat.ChatChoice; -import com.xmzs.common.chat.entity.chat.ChatCompletionResponse; -import com.xmzs.common.core.utils.StringUtils; -import lombok.AllArgsConstructor; -import lombok.SneakyThrows; -import lombok.extern.slf4j.Slf4j; -import okhttp3.Response; -import okhttp3.ResponseBody; -import okhttp3.sse.EventSource; -import okhttp3.sse.EventSourceListener; - -import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter; - -import java.util.Objects; - -/** - * 鎻忚堪锛歄penAIEventSourceListener - * - * @author https:www.unfbx.com - * @date 2023-02-22 - */ -@Slf4j -@AllArgsConstructor -public class SSEEventSourceListener extends EventSourceListener { - - private static final String DONE_SIGNAL = "[DONE]"; - - private final ResponseBodyEmitter emitter; - - /** - * {@inheritDoc} - */ - @Override - public void onOpen(EventSource eventSource, Response response) { - log.info("OpenAI寤虹珛sse杩炴帴..."); - } - - /** - * {@inheritDoc} - */ - @SneakyThrows - @Override - public void onEvent(EventSource eventSource, String id, String type, String data) { - try { - log.info("鍝嶅簲鏁版嵁{}=========",data); - emitter.send(data); - if (data.equals(DONE_SIGNAL)) { - //鎴愬姛鍝嶅簲 - emitter.complete(); - } - } catch (Exception e) { - log.error("sse淇℃伅鎺ㄩ�佸け璐ワ紒"); - eventSource.cancel(); - } - } - - @Override - public void onClosed(EventSource eventSource) { - log.info("OpenAI鍏抽棴sse杩炴帴..."); - } - - @SneakyThrows - @Override - public void onFailure(EventSource eventSource, Throwable t, Response response) { - if (Objects.isNull(response)) { - return; - } - ResponseBody body = response.body(); - if (Objects.nonNull(body)) { - log.error("OpenAI sse杩炴帴寮傚父data锛歿}锛屽紓甯革細{}", body.string(), t); - } else { - log.error("OpenAI sse杩炴帴寮傚父data锛歿}锛屽紓甯革細{}", response, t); - } - eventSource.cancel(); - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/listener/WebSocketEventListener.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/listener/WebSocketEventListener.java deleted file mode 100644 index 027cd0d..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/listener/WebSocketEventListener.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.xmzs.common.chat.listener; - -import com.fasterxml.jackson.databind.ObjectMapper; - -import com.xmzs.common.chat.constant.OpenAIConst; -import lombok.SneakyThrows; -import lombok.extern.slf4j.Slf4j; -import okhttp3.Response; -import okhttp3.ResponseBody; -import okhttp3.sse.EventSource; -import okhttp3.sse.EventSourceListener; -import com.xmzs.common.chat.entity.chat.ChatCompletionResponse; -import org.springframework.web.socket.TextMessage; -import org.springframework.web.socket.WebSocketSession; - -import java.util.Objects; - -/** - * 鎻忚堪锛歄penAI娴佸紡杈撳嚭Socket鎺ユ敹 - * - * @author https:www.unfbx.com - * @date 2023-03-23 - */ -@Slf4j -public class WebSocketEventListener extends EventSourceListener { - - private WebSocketSession session; - - /** - * 娑堟伅缁撴潫鏍囪瘑 - */ - private final String msgEnd = "[DONE]"; - - public WebSocketEventListener(WebSocketSession session) { - this.session = session; - } - - /** - * {@inheritDoc} - */ - @Override - public void onOpen(EventSource eventSource, Response response) { - log.info("OpenAI寤虹珛Socket杩炴帴..."); - } - - /** - * {@inheritDoc} - */ - @SneakyThrows - @Override - public void onEvent(EventSource eventSource, String id, String type, String data) { - log.info("OpenAI杩斿洖鏁版嵁锛歿}", data); - if (data.equals(msgEnd)) { - log.info("OpenAI杩斿洖鏁版嵁缁撴潫浜�"); - session.sendMessage(new TextMessage(msgEnd)); - return; - } - ObjectMapper mapper = new ObjectMapper(); - // 璇诲彇Json - ChatCompletionResponse completionResponse = mapper.readValue(data, ChatCompletionResponse.class); - String delta = mapper.writeValueAsString(completionResponse.getChoices().get(0).getDelta()); - session.sendMessage(new TextMessage(delta)); - } - - - @Override - public void onClosed(EventSource eventSource) { - log.info("OpenAI鍏抽棴Socket杩炴帴..."); - } - - - @SneakyThrows - @Override - public void onFailure(EventSource eventSource, Throwable t, Response response) { - if (Objects.isNull(response)) { - return; - } - ResponseBody body = response.body(); - if (Objects.nonNull(body)) { - // 杩斿洖闈炴祦寮忓洖澶嶅唴瀹� - if(response.code() == OpenAIConst.SUCCEED_CODE){ - ObjectMapper mapper = new ObjectMapper(); - ChatCompletionResponse completionResponse = mapper.readValue(body.string(), ChatCompletionResponse.class); - String delta = mapper.writeValueAsString(completionResponse.getChoices().get(0).getMessage().getContent()); - session.sendMessage(new TextMessage(delta)); - }else { - log.error("Socket杩炴帴寮傚父data锛歿}锛屽紓甯革細{}", body.string(), t); - } - } else { - log.error("Socket杩炴帴寮傚父data锛歿}锛屽紓甯革細{}", response, t); - } - eventSource.cancel(); - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/listener/WebSocketTopicListener.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/listener/WebSocketTopicListener.java deleted file mode 100644 index 632dda0..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/listener/WebSocketTopicListener.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.xmzs.common.chat.listener; - -import cn.hutool.core.collection.CollUtil; -import com.xmzs.common.chat.holder.WebSocketSessionHolder; -import com.xmzs.common.chat.utils.WebSocketUtils; -import lombok.extern.slf4j.Slf4j; -import org.springframework.boot.ApplicationArguments; -import org.springframework.boot.ApplicationRunner; -import org.springframework.core.Ordered; - -/** - * WebSocket 涓婚璁㈤槄鐩戝惉鍣� - * - * @author zendwang - */ -@Slf4j -public class WebSocketTopicListener implements ApplicationRunner, Ordered { - - @Override - public void run(ApplicationArguments args) throws Exception { - WebSocketUtils.subscribeMessage((message) -> { - log.info("WebSocket涓婚璁㈤槄鏀跺埌娑堟伅session keys={} message={}锛�", message.getSessionKeys(), message.getMessage()); - if (CollUtil.isNotEmpty(message.getSessionKeys())) { - message.getSessionKeys().forEach(key -> { - if (WebSocketSessionHolder.existSession(key)) { - WebSocketUtils.sendMessage(key, message.getMessage()); - } - }); - } - }); - log.info("鍒濆鍖朩ebSocket涓婚璁㈤槄鐩戝惉鍣ㄦ垚鍔�"); - } - - @Override - public int getOrder() { - return -1; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/OpenAiApi.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/OpenAiApi.java deleted file mode 100644 index df8a83f..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/OpenAiApi.java +++ /dev/null @@ -1,356 +0,0 @@ -package com.xmzs.common.chat.openai; - -import com.xmzs.common.chat.entity.Tts.TextToSpeech; -import com.xmzs.common.chat.entity.chat.ChatCompletionWithPicture; -import io.reactivex.Single; -import okhttp3.MultipartBody; -import okhttp3.RequestBody; -import okhttp3.ResponseBody; - -import com.xmzs.common.chat.entity.billing.BillingUsage; -import com.xmzs.common.chat.entity.billing.CreditGrantsResponse; -import com.xmzs.common.chat.entity.billing.Subscription; -import com.xmzs.common.chat.entity.chat.ChatCompletion; -import com.xmzs.common.chat.entity.chat.ChatCompletionResponse; -import com.xmzs.common.chat.entity.common.DeleteResponse; -import com.xmzs.common.chat.entity.common.OpenAiResponse; -import com.xmzs.common.chat.entity.completions.Completion; -import com.xmzs.common.chat.entity.completions.CompletionResponse; -import com.xmzs.common.chat.entity.edits.Edit; -import com.xmzs.common.chat.entity.edits.EditResponse; -import com.xmzs.common.chat.entity.embeddings.Embedding; -import com.xmzs.common.chat.entity.embeddings.EmbeddingResponse; -import com.xmzs.common.chat.entity.engines.Engine; -import com.xmzs.common.chat.entity.files.File; -import com.xmzs.common.chat.entity.files.UploadFileResponse; -import com.xmzs.common.chat.entity.fineTune.Event; -import com.xmzs.common.chat.entity.fineTune.FineTune; -import com.xmzs.common.chat.entity.fineTune.FineTuneDeleteResponse; -import com.xmzs.common.chat.entity.fineTune.FineTuneResponse; -import com.xmzs.common.chat.entity.images.Image; -import com.xmzs.common.chat.entity.images.ImageResponse; -import com.xmzs.common.chat.entity.models.Model; -import com.xmzs.common.chat.entity.models.ModelResponse; -import com.xmzs.common.chat.entity.moderations.Moderation; -import com.xmzs.common.chat.entity.moderations.ModerationResponse; -import com.xmzs.common.chat.entity.whisper.WhisperResponse; -import retrofit2.Call; -import retrofit2.http.*; - -import java.time.LocalDate; -import java.util.Map; - -/** - * 鎻忚堪锛� open ai瀹樻柟api鎺ュ彛 - * - * @author https:www.unfbx.com - * 2023-02-15 - */ -public interface OpenAiApi { - - /** - * 妯″瀷鍒楄〃 - * - * @return Single ModelResponse - */ - @GET("v1/models") - Single<ModelResponse> models(); - - /** - * models 杩斿洖鐨勬暟鎹甶d - * - * @param id 妯″瀷涓婚敭 - * @return Single Model - */ - @GET("v1/models/{id}") - Single<Model> model(@Path("id") String id); - - /** - * 鏂囨湰闂瓟 - * Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position. - * - * @param completion 闂瓟鍙傛暟 - * @return Single CompletionResponse - */ - @POST("v1/completions") - Single<CompletionResponse> completions(@Body Completion completion); - - /** - * Creates a new edit for the provided input, instruction, and parameters. - * 鏂囨湰淇 - * - * @param edit 缂栬緫鍙傛暟 - * @return Single EditResponse - */ - @POST("v1/edits") - Single<EditResponse> edits(@Body Edit edit); - - /** - * Creates an image given a prompt. - * 鏍规嵁鎻忚堪鐢熸垚鍥剧墖 - * - * @param image 鍥剧墖瀵硅薄 - * @return Single ImageResponse - */ - @POST("v1/images/generations") - Single<ImageResponse> genImages(@Body Image image); - - /** - * Creates an edited or extended image given an original image and a prompt. - * 鏍规嵁鎻忚堪淇敼鍥剧墖 - * - * @param image 鍥剧墖瀵硅薄 - * @param mask 鍥剧墖瀵硅薄 - * @param requestBodyMap 璇锋眰鍙傛暟 - * @return Single ImageResponse - */ - @Multipart - @POST("v1/images/edits") - Single<ImageResponse> editImages(@Part() MultipartBody.Part image, - @Part() MultipartBody.Part mask, - @PartMap() Map<String, RequestBody> requestBodyMap - ); - - /** - * Creates a variation of a given image. - * - * @param image 鍥剧墖瀵硅薄 - * @param requestBodyMap 璇锋眰鍙傛暟 - * @return Single ImageResponse - */ - @Multipart - @POST("v1/images/variations") - Single<ImageResponse> variationsImages(@Part() MultipartBody.Part image, - @PartMap() Map<String, RequestBody> requestBodyMap - ); - - /** - * 鏂囨湰鍚戦噺璁$畻 - * - * @param embedding 鍚戦噺鍙傛暟 - * @return Single EmbeddingResponse - */ - @POST("v1/embeddings") - Single<EmbeddingResponse> embeddings(@Body Embedding embedding); - - - /** - * Returns a list of files that belong to the user's organization. - * - * @return Single OpenAiResponse File - */ - @GET("/v1/files") - Single<OpenAiResponse<File>> files(); - - /** - * 鍒犻櫎鏂囦欢 - * - * @param fileId 鏂囦欢id - * @return Single DeleteResponse - */ - @DELETE("v1/files/{file_id}") - Single<DeleteResponse> deleteFile(@Path("file_id") String fileId); - - /** - * 涓婁紶鏂囦欢 - * - * @param purpose purpose - * @param file 鏂囦欢瀵硅薄 - * @return Single UploadFileResponse - */ - @Multipart - @POST("v1/files") - Single<UploadFileResponse> uploadFile(@Part MultipartBody.Part file, - @Part("purpose") RequestBody purpose); - - - /** - * 妫�绱㈡枃浠� - * - * @param fileId 鏂囦欢id - * @return Single File - */ - @GET("v1/files/{file_id}") - Single<File> retrieveFile(@Path("file_id") String fileId); - - /** - * 妫�绱㈡枃浠跺唴瀹� - * ###涓嶅鍏嶈垂鐢ㄦ埛寮�鏀�### - * ###涓嶅鍏嶈垂鐢ㄦ埛寮�鏀�### - * ###涓嶅鍏嶈垂鐢ㄦ埛寮�鏀�### - * - * @param fileId 鏂囦欢id - * @return Single ResponseBody - */ - @Streaming - @GET("v1/files/{file_id}/content") - Single<ResponseBody> retrieveFileContent(@Path("file_id") String fileId); - - - /** - * 鏂囨湰瀹℃牳 - * - * @param moderation 鏂囨湰瀹℃牳鍙傛暟 - * @return Single ModerationResponse - */ - @POST("v1/moderations") - Single<ModerationResponse> moderations(@Body Moderation moderation); - - - /** - * 鍒涘缓寰皟浣滀笟 - * - * @param fineTune 寰皟 - * @return Single FineTuneResponse - */ - @POST("v1/fine-tunes") - Single<FineTuneResponse> fineTune(@Body FineTune fineTune); - - /** - * 寰皟浣滀笟闆嗗悎 - * - * @return Single OpenAiResponse FineTuneResponse - */ - @GET("v1/fine-tunes") - Single<OpenAiResponse<FineTuneResponse>> fineTunes(); - - - /** - * 妫�绱㈠井璋冧綔涓� - * - * @return Single FineTuneResponse - */ - @GET("v1/fine-tunes/{fine_tune_id}") - Single<FineTuneResponse> retrieveFineTune(@Path("fine_tune_id") String fineTuneId); - - /** - * 鍙栨秷寰皟浣滀笟 - * - * @return Single FineTuneResponse - */ - @POST("v1/fine-tunes/{fine_tune_id}/cancel") - Single<FineTuneResponse> cancelFineTune(@Path("fine_tune_id") String fineTuneId); - - /** - * 寰皟浣滀笟浜嬩欢鍒楄〃 - * - * @return Single OpenAiResponse Event - */ - @GET("v1/fine-tunes/{fine_tune_id}/events") - Single<OpenAiResponse<Event>> fineTuneEvents(@Path("fine_tune_id") String fineTuneId); - - /** - * 鍒犻櫎寰皟浣滀笟妯″瀷 - * Delete a fine-tuned model. You must have the Owner role in your organization. - * - * @return Single DeleteResponse - */ - @DELETE("v1/models/{model}") - Single<FineTuneDeleteResponse> deleteFineTuneModel(@Path("model") String model); - - - /** - * 寮曟搸鍒楄〃 - * 瀹樻柟宸插簾寮冩鎺ュ彛 - * - * @return Single OpenAiResponse Engine - */ - @Deprecated - @GET("v1/engines") - Single<OpenAiResponse<Engine>> engines(); - - /** - * 妫�绱㈠紩鎿� - * 瀹樻柟宸插簾寮冩鎺ュ彛 - * - * @param engineId 寮曟搸id - * @return Engine - */ - @Deprecated - @GET("v1/engines/{engine_id}") - Single<Engine> engine(@Path("engine_id") String engineId); - - - /** - * 鏈�鏂扮増鐨凣PT-3.5 chat completion 鏇村姞璐磋繎瀹樻柟缃戠珯鐨勯棶绛旀ā鍨� - * - * @param chatCompletion chat completion - * @return 杩斿洖绛旀 - */ - @POST("v1/chat/completions") - Single<ChatCompletionResponse> chatCompletion(@Body ChatCompletion chatCompletion); - - - /** - * 璇煶杞枃瀛� - * - * @param file 璇煶鏂囦欢 - * @param requestBodyMap 鍙傛暟 - * @return 鏂囨湰 - */ - @Multipart - @POST("v1/audio/transcriptions") - Single<WhisperResponse> speechToTextTranscriptions(@Part MultipartBody.Part file, - @PartMap() Map<String, RequestBody> requestBodyMap); - - /** - * 璇煶缈昏瘧锛氱洰鍓嶄粎鏀寔缈昏瘧涓鸿嫳鏂� - * - * @param file 璇煶鏂囦欢 - * @param requestBodyMap 鍙傛暟 - * @return 鏂囨湰 - */ - @Multipart - @POST("v1/audio/translations") - Single<WhisperResponse> speechToTextTranslations(@Part MultipartBody.Part file, - @PartMap() Map<String, RequestBody> requestBodyMap); - - /** - * 浣欓鏌ヨ - * 瀹樻柟绂佹璁块棶姝ゆ帴鍙� - * - * @return 浣欓缁撴灉 - */ - @GET("dashboard/billing/credit_grants") - @Deprecated - Single<CreditGrantsResponse> creditGrants(); - - /** - * 璐︽埛淇℃伅鏌ヨ锛氶噷闈㈠寘鍚�婚噾棰濓紙缇庡厓锛夌瓑淇℃伅 - * - * @return 璐︽埛淇℃伅 - */ - @GET("v1/dashboard/billing/subscription") - Single<Subscription> subscription(); - - /** - * 璐︽埛璋冪敤鎺ュ彛娑堣�楅噾棰濅俊鎭煡璇� - * totalUsage = 璐︽埛鎬讳娇鐢ㄩ噾棰濓紙缇庡垎锛� - * - * @param starDate 寮�濮嬫椂闂� - * @param endDate 缁撴潫鏃堕棿 - * @return 娑堣�楅噾棰濅俊鎭� - */ - @GET("v1/dashboard/billing/usage") - Single<BillingUsage> billingUsage(@Query("start_date") LocalDate starDate, @Query("end_date") LocalDate endDate); - - /** - * 鏈�鏂扮増鐨凣PT-4 chat completion 鏀寔鍥剧墖杈撳叆 - * - * @param chatCompletion chat completion - * @return 杩斿洖绛旀 - */ - @POST("v1/chat/completions") - Single<ChatCompletionResponse> chatCompletionWithPicture(@Body ChatCompletionWithPicture chatCompletion); - - /** - * 鏂囨湰杞闊� - * - * @param textToSpeech 鍙傛暟 - * @return ResponseBody body - * @since 1.1.2 - */ - @POST("v1/audio/speech") - @Streaming - Call<ResponseBody> textToSpeech(@Body TextToSpeech textToSpeech); -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/OpenAiClient.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/OpenAiClient.java deleted file mode 100644 index bb43981..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/OpenAiClient.java +++ /dev/null @@ -1,805 +0,0 @@ -package com.xmzs.common.chat.openai; - -import cn.hutool.core.collection.CollectionUtil; -import cn.hutool.core.util.StrUtil; - - -import com.xmzs.common.chat.entity.images.*; -import com.xmzs.common.core.exception.base.BaseException; -import com.xmzs.common.chat.constant.OpenAIConst; -import com.xmzs.common.chat.entity.billing.BillingUsage; -import com.xmzs.common.chat.entity.billing.Subscription; -import com.xmzs.common.chat.entity.chat.ChatCompletion; -import com.xmzs.common.chat.entity.chat.ChatCompletionResponse; -import com.xmzs.common.chat.entity.chat.Message; -import com.xmzs.common.chat.entity.common.DeleteResponse; -import com.xmzs.common.chat.entity.common.OpenAiResponse; -import com.xmzs.common.chat.entity.completions.Completion; -import com.xmzs.common.chat.entity.completions.CompletionResponse; -import com.xmzs.common.chat.entity.edits.Edit; -import com.xmzs.common.chat.entity.edits.EditResponse; -import com.xmzs.common.chat.entity.embeddings.Embedding; -import com.xmzs.common.chat.entity.embeddings.EmbeddingResponse; -import com.xmzs.common.chat.entity.engines.Engine; -import com.xmzs.common.chat.entity.files.File; -import com.xmzs.common.chat.entity.files.UploadFileResponse; -import com.xmzs.common.chat.entity.fineTune.Event; -import com.xmzs.common.chat.entity.fineTune.FineTune; -import com.xmzs.common.chat.entity.fineTune.FineTuneDeleteResponse; -import com.xmzs.common.chat.entity.fineTune.FineTuneResponse; -import com.xmzs.common.chat.entity.models.Model; -import com.xmzs.common.chat.entity.models.ModelResponse; -import com.xmzs.common.chat.entity.moderations.Moderation; -import com.xmzs.common.chat.entity.moderations.ModerationResponse; -import com.xmzs.common.chat.entity.whisper.Translations; -import com.xmzs.common.chat.entity.whisper.WhisperResponse; -import com.xmzs.common.chat.openai.exception.CommonError; -import com.xmzs.common.chat.openai.function.KeyRandomStrategy; -import com.xmzs.common.chat.openai.function.KeyStrategyFunction; -import com.xmzs.common.chat.openai.interceptor.DefaultOpenAiAuthInterceptor; -import com.xmzs.common.chat.openai.interceptor.DynamicKeyOpenAiAuthInterceptor; -import com.xmzs.common.chat.openai.interceptor.OpenAiAuthInterceptor; -import io.reactivex.Single; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; -import okhttp3.*; -import org.jetbrains.annotations.NotNull; -import retrofit2.Retrofit; -import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; -import retrofit2.converter.jackson.JacksonConverterFactory; - - -import java.time.LocalDate; -import java.util.*; -import java.util.concurrent.TimeUnit; - - -/** - * 鎻忚堪锛� open ai 瀹㈡埛绔� - * - * @author https:www.unfbx.com - * @since 2023-02-11 - */ - -@Slf4j -public class OpenAiClient { - /** - * keys - */ - @Getter - @NotNull - private List<String> apiKey; - /** - * 鑷畾涔塧pi host浣跨敤builder鐨勬柟寮忔瀯閫燾lient - */ - @Getter - private String apiHost; - @Getter - private OpenAiApi openAiApi; - /** - * 鑷畾涔夌殑okHttpClient - * 濡傛灉涓嶈嚜瀹氫箟 锛屽氨鏄敤sdk榛樿鐨凮kHttpClient瀹炰緥 - */ - @Getter - private OkHttpClient okHttpClient; - /** - * api key鐨勮幏鍙栫瓥鐣� - */ - @Getter - private KeyStrategyFunction<List<String>, String> keyStrategy; - - /** - * 鑷畾涔夐壌鏉冨鐞嗘嫤鎴櫒<br/> - * 鍙互涓嶈缃紝榛樿瀹炵幇锛欴efaultOpenAiAuthInterceptor <br/> - * 濡傞渶鑷畾涔夊疄鐜板弬鑰冿細DealKeyWithOpenAiAuthInterceptor - * - * @see DynamicKeyOpenAiAuthInterceptor - * @see DefaultOpenAiAuthInterceptor - */ - @Getter - private OpenAiAuthInterceptor authInterceptor; - - /** - * 鏋勯�犲櫒 - * - * @return OpenAiClient.Builder - */ - public static OpenAiClient.Builder builder() { - return new OpenAiClient.Builder(); - } - - /** - * 鏋勯�� - * - * @param builder - */ - private OpenAiClient(Builder builder) { - if (CollectionUtil.isEmpty(builder.apiKey)) { - throw new BaseException(CommonError.API_KEYS_NOT_NUL.msg() - ); - } - apiKey = builder.apiKey; - - if (StrUtil.isBlank(builder.apiHost)) { - builder.apiHost = OpenAIConst.OPENAI_HOST; - } - apiHost = builder.apiHost; - - if (Objects.isNull(builder.keyStrategy)) { - builder.keyStrategy = new KeyRandomStrategy(); - } - keyStrategy = builder.keyStrategy; - - if (Objects.isNull(builder.authInterceptor)) { - builder.authInterceptor = new DefaultOpenAiAuthInterceptor(); - } - authInterceptor = builder.authInterceptor; - authInterceptor.setApiKey(this.apiKey); - authInterceptor.setKeyStrategy(this.keyStrategy); - - if (Objects.isNull(builder.okHttpClient)) { - builder.okHttpClient = this.okHttpClient(); - } else { - //鑷畾涔夌殑okhttpClient 闇�瑕佸鍔燼pi keys - builder.okHttpClient = builder.okHttpClient - .newBuilder() - .addInterceptor(authInterceptor) - .build(); - } - okHttpClient = builder.okHttpClient; - this.openAiApi = new Retrofit.Builder() - .baseUrl(apiHost) - .client(okHttpClient) - .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) - .addConverterFactory(JacksonConverterFactory.create()) - .build().create(OpenAiApi.class); - } - - - /** - * 鍒涘缓榛樿OkHttpClient - * - * @return - */ - private OkHttpClient okHttpClient() { - if (Objects.isNull(this.authInterceptor)) { - this.authInterceptor = new DefaultOpenAiAuthInterceptor(); - } - this.authInterceptor.setApiKey(this.apiKey); - this.authInterceptor.setKeyStrategy(this.keyStrategy); - return new OkHttpClient - .Builder() - .addInterceptor(this.authInterceptor) - .connectTimeout(30, TimeUnit.SECONDS) - .writeTimeout(30, TimeUnit.SECONDS) - .readTimeout(30, TimeUnit.SECONDS).build(); - } - - /** - * openAi妯″瀷鍒楄〃 - * - * @return Model list - */ - public List<Model> models() { - Single<ModelResponse> models = this.openAiApi.models(); - return models.blockingGet().getData(); - } - - /** - * openAi妯″瀷璇︾粏淇℃伅 - * - * @param id 妯″瀷涓婚敭 - * @return Model 妯″瀷绫� - */ - public Model model(String id) { - if (Objects.isNull(id) || "".equals(id)) { - throw new BaseException(CommonError.PARAM_ERROR.msg()); - } - Single<Model> model = this.openAiApi.model(id); - return model.blockingGet(); - } - - - /** - * 闂瓟鎺ュ彛 - * - * @param completion 闂瓟鍙傛暟 - * @return CompletionResponse - */ - public CompletionResponse completions(Completion completion) { - Single<CompletionResponse> completions = this.openAiApi.completions(completion); - return completions.blockingGet(); - } - - /** - * 闂瓟鎺ュ彛-绠�鏄撶増 - * - * @param question 闂鎻忚堪 - * @return CompletionResponse - */ - public CompletionResponse completions(String question) { - Completion q = Completion.builder() - .prompt(question) - .build(); - Single<CompletionResponse> completions = this.openAiApi.completions(q); - return completions.blockingGet(); - } - - /** - * 鏂囨湰淇敼 - * - * @param edit 鍥剧墖瀵硅薄 - * @return EditResponse - */ - public EditResponse edit(Edit edit) { - Single<EditResponse> edits = this.openAiApi.edits(edit); - return edits.blockingGet(); - } - - /** - * 鏍规嵁鎻忚堪鐢熸垚鍥剧墖 - * - * @param prompt 鎻忚堪淇℃伅 - * @return ImageResponse - */ - public ImageResponse genImages(String prompt) { - Image image = Image.builder().prompt(prompt).build(); - return this.genImages(image); - } - - /** - * 鏍规嵁鎻忚堪鐢熸垚鍥剧墖 - * - * @param image 鍥剧墖鍙傛暟 - * @return ImageResponse - */ - public ImageResponse genImages(Image image) { - Single<ImageResponse> edits = this.openAiApi.genImages(image); - return edits.blockingGet(); - } - - /** - * Creates an edited or extended image given an original image and a prompt. - * 鏍规嵁鎻忚堪淇敼鍥剧墖 - * - * @param image 鍥剧墖瀵硅薄 - * @param prompt 鎻忚堪淇℃伅 - * @return Item list - */ - public List<Item> editImages(java.io.File image, String prompt) { - ImageEdit imageEdit = ImageEdit.builder().prompt(prompt).build(); - return this.editImages(image, null, imageEdit); - } - - /** - * Creates an edited or extended image given an original image and a prompt. - * 鏍规嵁鎻忚堪淇敼鍥剧墖 - * - * @param image 鍥剧墖瀵硅薄 - * @param imageEdit 鍥剧墖鍙傛暟 - * @return Item list - */ - public List<Item> editImages(java.io.File image, ImageEdit imageEdit) { - return this.editImages(image, null, imageEdit); - } - - /** - * Creates an edited or extended image given an original image and a prompt. - * 鏍规嵁鎻忚堪淇敼鍥剧墖 - * - * @param image png鏍煎紡鐨勫浘鐗囷紝鏈�澶�4MB - * @param mask png鏍煎紡鐨勫浘鐗囷紝鏈�澶�4MB - * @param imageEdit 鍥剧墖鍙傛暟 - * @return Item list - */ - public List<Item> editImages(java.io.File image, java.io.File mask, ImageEdit imageEdit) { - checkImage(image); - checkImageFormat(image); - checkImageSize(image); - if (Objects.nonNull(mask)) { - checkImageFormat(image); - checkImageSize(image); - } - // 鍒涘缓 RequestBody锛岀敤浜庡皝瑁呮瀯寤篟equestBody - RequestBody imageBody = RequestBody.create(MediaType.parse("multipart/form-data"), image); - MultipartBody.Part imageMultipartBody = MultipartBody.Part.createFormData("image", image.getName(), imageBody); - MultipartBody.Part maskMultipartBody = null; - if (Objects.nonNull(mask)) { - RequestBody maskBody = RequestBody.create(MediaType.parse("multipart/form-data"), mask); - maskMultipartBody = MultipartBody.Part.createFormData("mask", image.getName(), maskBody); - } - Map<String, RequestBody> requestBodyMap = new HashMap<>(); - requestBodyMap.put("prompt", RequestBody.create(MediaType.parse("multipart/form-data"), imageEdit.getPrompt())); - requestBodyMap.put("n", RequestBody.create(MediaType.parse("multipart/form-data"), imageEdit.getN().toString())); - requestBodyMap.put("size", RequestBody.create(MediaType.parse("multipart/form-data"), imageEdit.getSize())); - requestBodyMap.put("response_format", RequestBody.create(MediaType.parse("multipart/form-data"), imageEdit.getResponseFormat())); - if (!(Objects.isNull(imageEdit.getUser()) || "".equals(imageEdit.getUser()))) { - requestBodyMap.put("user", RequestBody.create(MediaType.parse("multipart/form-data"), imageEdit.getUser())); - } - Single<ImageResponse> imageResponse = this.openAiApi.editImages( - imageMultipartBody, - maskMultipartBody, - requestBodyMap - ); - return imageResponse.blockingGet().getData(); - } - - /** - * Creates a variation of a given image. - * <p> - * 鍙樺寲鍥剧墖锛岀被浼糰i閲嶅仛鍥剧墖 - * - * @param image 鍥剧墖瀵硅薄 - * @param imageVariations 鍥剧墖鍙傛暟 - * @return ImageResponse - */ - public ImageResponse variationsImages(java.io.File image, ImageVariations imageVariations) { - checkImage(image); - checkImageFormat(image); - checkImageSize(image); - RequestBody imageBody = RequestBody.create(MediaType.parse("multipart/form-data"), image); - MultipartBody.Part multipartBody = MultipartBody.Part.createFormData("image", image.getName(), imageBody); - Map<String, RequestBody> requestBodyMap = new HashMap<>(); - requestBodyMap.put("n", RequestBody.create(MediaType.parse("multipart/form-data"), imageVariations.getN().toString())); - requestBodyMap.put("size", RequestBody.create(MediaType.parse("multipart/form-data"), imageVariations.getSize())); - requestBodyMap.put("response_format", RequestBody.create(MediaType.parse("multipart/form-data"), imageVariations.getResponseFormat())); - if (!(Objects.isNull(imageVariations.getUser()) || "".equals(imageVariations.getUser()))) { - requestBodyMap.put("user", RequestBody.create(MediaType.parse("multipart/form-data"), imageVariations.getUser())); - } - Single<ImageResponse> variationsImages = this.openAiApi.variationsImages( - multipartBody, - requestBodyMap - ); - return variationsImages.blockingGet(); - } - - /** - * Creates a variation of a given image. - * - * @param image 鍥剧墖瀵硅薄 - * @return ImageResponse - */ - public ImageResponse variationsImages(java.io.File image) { - checkImage(image); - checkImageFormat(image); - checkImageSize(image); - ImageVariations imageVariations = ImageVariations.builder().build(); - return this.variationsImages(image, imageVariations); - } - - /** - * 鏍¢獙鍥剧墖涓嶈兘涓虹┖ - * - * @param image - */ - private void checkImage(java.io.File image) { - if (Objects.isNull(image)) { - log.error("image涓嶈兘涓虹┖"); - throw new BaseException(CommonError.PARAM_ERROR.msg()); - } - } - - /** - * 鏍¢獙鍥剧墖鏍煎紡 - * - * @param image - */ - private void checkImageFormat(java.io.File image) { - if (!(image.getName().endsWith("png") || image.getName().endsWith("PNG"))) { - log.error("image鏍煎紡閿欒"); - throw new BaseException(CommonError.PARAM_ERROR.msg()); - } - } - - /** - * 鏍¢獙鍥剧墖澶у皬 - * - * @param image - */ - private void checkImageSize(java.io.File image) { - if (image.length() > 4 * 1024 * 1024) { - log.error("image鏈�澶ф敮鎸�4MB"); - throw new BaseException(CommonError.PARAM_ERROR.msg()); - } - } - - /** - * 鍚戦噺璁$畻锛氬崟鏂囨湰 - * - * @param input 鍗曟枃鏈� - * @return EmbeddingResponse - */ - public EmbeddingResponse embeddings(String input) { - List<String> inputs = new ArrayList<>(1); - inputs.add(input); - Embedding embedding = Embedding.builder().input(inputs).build(); - return this.embeddings(embedding); - } - - /** - * 鍚戦噺璁$畻锛氶泦鍚堟枃鏈� - * - * @param input 鏂囨湰闆嗗悎 - * @return EmbeddingResponse - */ - public EmbeddingResponse embeddings(List<String> input) { - Embedding embedding = Embedding.builder().input(input).build(); - return this.embeddings(embedding); - } - - /** - * 鏂囨湰杞崲鍚戦噺 - * - * @param embedding 鍏ュ弬 - * @return EmbeddingResponse - */ - public EmbeddingResponse embeddings(Embedding embedding) { - Single<EmbeddingResponse> embeddings = this.openAiApi.embeddings(embedding); - return embeddings.blockingGet(); - } - - /** - * 鑾峰彇鏂囦欢鍒楄〃 - * - * @return File list - */ - public List<File> files() { - Single<OpenAiResponse<File>> files = this.openAiApi.files(); - return files.blockingGet().getData(); - } - - /** - * 鍒犻櫎鏂囦欢 - * - * @param fileId 鏂囦欢id - * @return DeleteResponse - */ - public DeleteResponse deleteFile(String fileId) { - Single<DeleteResponse> deleteFile = this.openAiApi.deleteFile(fileId); - return deleteFile.blockingGet(); - } - - /** - * 涓婁紶鏂囦欢 - * - * @param purpose purpose - * @param file 鏂囦欢瀵硅薄 - * @return UploadFileResponse - */ - public UploadFileResponse uploadFile(String purpose, java.io.File file) { - // 鍒涘缓 RequestBody锛岀敤浜庡皝瑁呮瀯寤篟equestBody - RequestBody fileBody = RequestBody.create(MediaType.parse("multipart/form-data"), file); - MultipartBody.Part multipartBody = MultipartBody.Part.createFormData("file", file.getName(), fileBody); - - RequestBody purposeBody = RequestBody.create(MediaType.parse("multipart/form-data"), purpose); - Single<UploadFileResponse> uploadFileResponse = this.openAiApi.uploadFile(multipartBody, purposeBody); - return uploadFileResponse.blockingGet(); - } - - /** - * 涓婁紶鏂囦欢 - * - * @param file 鏂囦欢 - * @return UploadFileResponse - */ - public UploadFileResponse uploadFile(java.io.File file) { - //purpose 瀹樼綉绀轰緥榛樿鏄細fine-tune - return this.uploadFile("fine-tune", file); - } - - /** - * 妫�绱㈡枃浠� - * - * @param fileId 鏂囦欢id - * @return File - */ - public File retrieveFile(String fileId) { - Single<File> fileContent = this.openAiApi.retrieveFile(fileId); - return fileContent.blockingGet(); - } - - /** - * 妫�绱㈡枃浠跺唴瀹� - * 鍏嶈垂鐢ㄦ埛鏃犳硶浣跨敤姝ゆ帴鍙� #鏈粡杩囨祴璇� - * - * @param fileId - * @return ResponseBody - */ -// public ResponseBody retrieveFileContent(String fileId) { -// Single<ResponseBody> fileContent = this.openAiApi.retrieveFileContent(fileId); -// return fileContent.blockingGet(); -// } - - /** - * 鏂囨湰瀹℃牳 - * - * @param input 寰呮娴嬫暟鎹� - * @return ModerationResponse - */ - public ModerationResponse moderations(String input) { - List<String> content = new ArrayList<>(1); - content.add(input); - Moderation moderation = Moderation.builder().input(content).build(); - return this.moderations(moderation); - } - - /** - * 鏂囨湰瀹℃牳 - * - * @param input 寰呮娴嬫暟鎹泦鍚� - * @return ModerationResponse - */ - public ModerationResponse moderations(List<String> input) { - Moderation moderation = Moderation.builder().input(input).build(); - return this.moderations(moderation); - } - - /** - * 鏂囨湰瀹℃牳 - * - * @param moderation 瀹℃牳鍙傛暟 - * @return ModerationResponse - */ - public ModerationResponse moderations(Moderation moderation) { - Single<ModerationResponse> moderations = this.openAiApi.moderations(moderation); - return moderations.blockingGet(); - } - - /** - * 鍒涘缓寰皟妯″瀷 - * - * @param fineTune 寰皟浣滀笟id - * @return FineTuneResponse - */ - public FineTuneResponse fineTune(FineTune fineTune) { - Single<FineTuneResponse> fineTuneResponse = this.openAiApi.fineTune(fineTune); - return fineTuneResponse.blockingGet(); - } - - /** - * 鍒涘缓寰皟妯″瀷 - * - * @param trainingFileId 鏂囦欢id锛屾枃浠朵笂浼犺繑鍥炵殑id - * @return FineTuneResponse - */ - public FineTuneResponse fineTune(String trainingFileId) { - FineTune fineTune = FineTune.builder().trainingFile(trainingFileId).build(); - return this.fineTune(fineTune); - } - - /** - * 寰皟妯″瀷鍒楄〃 - * - * @return FineTuneResponse list - */ - public List<FineTuneResponse> fineTunes() { - Single<OpenAiResponse<FineTuneResponse>> fineTunes = this.openAiApi.fineTunes(); - return fineTunes.blockingGet().getData(); - } - - /** - * 妫�绱㈠井璋冧綔涓� - * - * @param fineTuneId 寰皟浣滀笟id - * @return FineTuneResponse - */ - public FineTuneResponse retrieveFineTune(String fineTuneId) { - Single<FineTuneResponse> fineTune = this.openAiApi.retrieveFineTune(fineTuneId); - return fineTune.blockingGet(); - } - - /** - * 鍙栨秷寰皟浣滀笟 - * - * @param fineTuneId 涓婚敭 - * @return FineTuneResponse - */ - public FineTuneResponse cancelFineTune(String fineTuneId) { - Single<FineTuneResponse> fineTune = this.openAiApi.cancelFineTune(fineTuneId); - return fineTune.blockingGet(); - } - - /** - * 寰皟浣滀笟浜嬩欢鍒楄〃 - * - * @param fineTuneId 寰皟浣滀笟id - * @return Event List - */ - public List<Event> fineTuneEvents(String fineTuneId) { - Single<OpenAiResponse<Event>> events = this.openAiApi.fineTuneEvents(fineTuneId); - return events.blockingGet().getData(); - } - - /** - * 鍒犻櫎寰皟浣滀笟妯″瀷 - * Delete a fine-tuned model. You must have the Owner role in your organization. - * - * @param model 妯″瀷鍚嶇О - * @return FineTuneDeleteResponse - */ - public FineTuneDeleteResponse deleteFineTuneModel(String model) { - Single<FineTuneDeleteResponse> delete = this.openAiApi.deleteFineTuneModel(model); - return delete.blockingGet(); - } - - - /** - * 寮曟搸鍒楄〃 - * - * @return Engine List - */ - @Deprecated - public List<Engine> engines() { - Single<OpenAiResponse<Engine>> engines = this.openAiApi.engines(); - return engines.blockingGet().getData(); - } - - /** - * 寮曟搸璇︾粏淇℃伅 - * - * @param engineId 寮曟搸id - * @return Engine - */ - @Deprecated - public Engine engine(String engineId) { - Single<Engine> engine = this.openAiApi.engine(engineId); - return engine.blockingGet(); - } - - /** - * 鏈�鏂扮増鐨凣PT-3.5 chat completion 鏇村姞璐磋繎瀹樻柟缃戠珯鐨勯棶绛旀ā鍨� - * - * @param chatCompletion 闂瓟鍙傛暟 - * @return 绛旀 - */ - public ChatCompletionResponse chatCompletion(ChatCompletion chatCompletion) { - Single<ChatCompletionResponse> chatCompletionResponse = this.openAiApi.chatCompletion(chatCompletion); - return chatCompletionResponse.blockingGet(); - } - - /** - * 绠�鏄撶増 - * - * @param messages 闂瓟鍙傛暟 - * @return 绛旀 - */ - public ChatCompletionResponse chatCompletion(List<Message> messages) { - ChatCompletion chatCompletion = ChatCompletion.builder().messages(messages).build(); - return this.chatCompletion(chatCompletion); - } - - /** - * 璇煶缈昏瘧锛氱洰鍓嶄粎鏀寔缈昏瘧涓鸿嫳鏂� - * - * @param translations 鍙傛暟 - * @param file 璇煶鏂囦欢 鏈�澶ф敮鎸�25MB mp3, mp4, mpeg, mpga, m4a, wav, webm - * @return 缈昏瘧鍚庢枃鏈� - */ - public WhisperResponse speechToTextTranslations(java.io.File file, Translations translations) { - //鏂囦欢 - RequestBody fileBody = RequestBody.create(MediaType.parse("multipart/form-data"), file); - MultipartBody.Part multipartBody = MultipartBody.Part.createFormData("file", file.getName(), fileBody); - //鑷畾涔夊弬鏁� - Map<String, RequestBody> requestBodyMap = new HashMap<>(5,1L); - - if (StrUtil.isNotBlank(translations.getModel())) { - requestBodyMap.put(Translations.Fields.model, RequestBody.create(MediaType.parse("multipart/form-data"), translations.getModel())); - } - if (StrUtil.isNotBlank(translations.getPrompt())) { - requestBodyMap.put(Translations.Fields.prompt, RequestBody.create(MediaType.parse("multipart/form-data"), translations.getPrompt())); - } - if (StrUtil.isNotBlank(translations.getResponseFormat())) { - requestBodyMap.put(Translations.Fields.responseFormat, RequestBody.create(MediaType.parse("multipart/form-data"), translations.getResponseFormat())); - } - requestBodyMap.put(Translations.Fields.temperature, RequestBody.create(MediaType.parse("multipart/form-data"), String.valueOf(translations.getTemperature()))); - Single<WhisperResponse> whisperResponse = this.openAiApi.speechToTextTranslations(multipartBody, requestBodyMap); - return whisperResponse.blockingGet(); - } - - /** - * 绠�鏄撶増 璇煶缈昏瘧锛氱洰鍓嶄粎鏀寔缈昏瘧涓鸿嫳鏂� - * - * @param file 璇煶鏂囦欢 鏈�澶ф敮鎸�25MB mp3, mp4, mpeg, mpga, m4a, wav, webm - * @return 缈昏瘧鍚庢枃鏈� - */ - public WhisperResponse speechToTextTranslations(java.io.File file) { - Translations translations = Translations.builder().build(); - return this.speechToTextTranslations(file, translations); - } - - /** - * 鏍¢獙璇煶鏂囦欢澶у皬缁欏嚭鎻愮ず锛岀洰鍓嶅畼鏂归檺鍒�25MB锛屽悗缁彲鑳戒細鏀瑰姩鎵�浠ヤ笉鎶ラ敊鍙仛鎻愮ず - * - * @param file - */ - private void checkSpeechFileSize(java.io.File file) { - if (file.length() > 25 * 1204 * 1024) { - log.warn("2023-03-02瀹樻柟鏂囨。鎻愮ず锛氭枃浠朵笉鑳借秴鍑�25MB"); - } - } - - /** - * 璐︽埛淇℃伅鏌ヨ锛氶噷闈㈠寘鍚�婚噾棰濈瓑淇℃伅 - * - * @return 璐︽埛淇℃伅 - */ - public Subscription subscription() { - Single<Subscription> subscription = this.openAiApi.subscription(); - return subscription.blockingGet(); - } - /** - * 璐︽埛璋冪敤鎺ュ彛娑堣�楅噾棰濅俊鎭煡璇� - * 鏈�澶氭煡璇�100澶� - * - * @param starDate 寮�濮嬫椂闂� - * @param endDate 缁撴潫鏃堕棿 - * @return 娑堣�楅噾棰濅俊鎭� - */ - public BillingUsage billingUsage(@NotNull LocalDate starDate, @NotNull LocalDate endDate) { - Single<BillingUsage> billingUsage = this.openAiApi.billingUsage(starDate, endDate); - return billingUsage.blockingGet(); - } - - - public static final class Builder { - /** - * api keys - */ - private @NotNull List<String> apiKey; - /** - * api璇锋眰鍦板潃锛岀粨灏惧鏈夋枩鏉� - * - */ - private String apiHost; - /** - * 鑷畾涔塐khttpClient - */ - private OkHttpClient okHttpClient; - - /** - * api key鐨勮幏鍙栫瓥鐣� - */ - private KeyStrategyFunction keyStrategy; - - /** - * 鑷畾涔夐壌鏉冩嫤鎴櫒 - */ - private OpenAiAuthInterceptor authInterceptor; - - public Builder() { - } - - /** - * @param val api璇锋眰鍦板潃锛岀粨灏惧鏈夋枩鏉� - * @return Builder瀵硅薄 - */ - public Builder apiHost(String val) { - apiHost = val; - return this; - } - - public Builder apiKey(@NotNull List<String> val) { - apiKey = val; - return this; - } - - public Builder keyStrategy(KeyStrategyFunction val) { - keyStrategy = val; - return this; - } - - public Builder okHttpClient(OkHttpClient val) { - okHttpClient = val; - return this; - } - - public Builder authInterceptor(OpenAiAuthInterceptor val) { - authInterceptor = val; - return this; - } - - public OpenAiClient build() { - return new OpenAiClient(this); - } - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/OpenAiStreamClient.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/OpenAiStreamClient.java deleted file mode 100644 index 5c56ecf..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/OpenAiStreamClient.java +++ /dev/null @@ -1,501 +0,0 @@ -package com.xmzs.common.chat.openai; - -import cn.hutool.core.collection.CollectionUtil; -import cn.hutool.core.util.StrUtil; -import cn.hutool.http.ContentType; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xmzs.common.chat.config.LocalCache; -import com.xmzs.common.chat.entity.Tts.TextToSpeech; -import com.xmzs.common.chat.entity.billing.BillingUsage; -import com.xmzs.common.chat.entity.billing.KeyInfo; -import com.xmzs.common.chat.entity.billing.Subscription; -import com.xmzs.common.chat.entity.chat.BaseChatCompletion; -import com.xmzs.common.chat.entity.chat.ChatCompletionResponse; -import com.xmzs.common.chat.entity.chat.ChatCompletionWithPicture; -import com.xmzs.common.chat.entity.files.UploadFileResponse; -import com.xmzs.common.chat.entity.images.Image; -import com.xmzs.common.chat.entity.images.ImageResponse; -import com.xmzs.common.chat.entity.models.Model; -import com.xmzs.common.chat.entity.models.ModelResponse; -import com.xmzs.common.chat.entity.whisper.Transcriptions; -import com.xmzs.common.chat.entity.whisper.WhisperResponse; -import com.xmzs.common.chat.openai.exception.CommonError; -import com.xmzs.common.chat.openai.function.KeyRandomStrategy; -import com.xmzs.common.chat.openai.function.KeyStrategyFunction; -import com.xmzs.common.chat.openai.interceptor.DefaultOpenAiAuthInterceptor; -import com.xmzs.common.chat.openai.interceptor.DynamicKeyOpenAiAuthInterceptor; -import com.xmzs.common.chat.openai.interceptor.OpenAiAuthInterceptor; -import com.xmzs.common.core.exception.ServiceException; -import io.reactivex.Single; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; -import okhttp3.*; -import okhttp3.sse.EventSource; -import okhttp3.sse.EventSourceListener; -import okhttp3.sse.EventSources; -import com.xmzs.common.core.exception.base.BaseException; -import com.xmzs.common.chat.constant.OpenAIConst; -import com.xmzs.common.chat.entity.chat.ChatCompletion; -import org.jetbrains.annotations.NotNull; -import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter; -import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; -import retrofit2.Call; -import retrofit2.Retrofit; -import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; -import retrofit2.converter.jackson.JacksonConverterFactory; - -import java.io.IOException; -import java.io.InputStream; -import java.net.http.HttpClient; -import java.net.http.HttpRequest; -import java.nio.charset.StandardCharsets; -import java.rmi.ServerException; -import java.time.LocalDate; -import java.time.ZoneId; -import java.util.*; -import java.util.concurrent.TimeUnit; -import java.net.URI; -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.net.http.HttpResponse; - -import com.google.gson.Gson; -import com.google.gson.JsonObject; - -/** - * 鎻忚堪锛� open ai 瀹㈡埛绔� - * - * @author https:www.unfbx.com - * 2023-02-28 - */ - -@Slf4j -public class OpenAiStreamClient { - @Getter - @NotNull - private List<String> apiKey; - /** - * 鑷畾涔塧pi host浣跨敤builder鐨勬柟寮忔瀯閫燾lient - */ - @Getter - private String apiHost; - /** - * 鑷畾涔夌殑okHttpClient - * 濡傛灉涓嶈嚜瀹氫箟 锛屽氨鏄敤sdk榛樿鐨凮kHttpClient瀹炰緥 - */ - @Getter - private OkHttpClient okHttpClient; - - /** - * api key鐨勮幏鍙栫瓥鐣� - */ - @Getter - private KeyStrategyFunction<List<String>, String> keyStrategy; - - @Getter - private OpenAiApi openAiApi; - - /** - * 鑷畾涔夐壌鏉冨鐞嗘嫤鎴櫒<br/> - * 鍙互涓嶈缃紝榛樿瀹炵幇锛欴efaultOpenAiAuthInterceptor <br/> - * 濡傞渶鑷畾涔夊疄鐜板弬鑰冿細DealKeyWithOpenAiAuthInterceptor - * - * @see DynamicKeyOpenAiAuthInterceptor - * @see DefaultOpenAiAuthInterceptor - */ - @Getter - private OpenAiAuthInterceptor authInterceptor; - - private static final String API_KEY = "sk-Waea254YSRYVg4FZVCz2CDz73B22xRpmKpJ41kbczVgpPxvg"; - - HttpClient client = HttpClient.newHttpClient(); - - private static final String DONE_SIGNAL = "[DONE]"; - - /** - * 鏋勯�犲疄渚嬪璞� - * - * @param builder - */ - private OpenAiStreamClient(Builder builder) { - if (CollectionUtil.isEmpty(builder.apiKey)) { - throw new BaseException(CommonError.API_KEYS_NOT_NUL.msg()); - } - apiKey = builder.apiKey; - - if (StrUtil.isBlank(builder.apiHost)) { - builder.apiHost = OpenAIConst.OPENAI_HOST; - } - apiHost = builder.apiHost; - - if (Objects.isNull(builder.keyStrategy)) { - builder.keyStrategy = new KeyRandomStrategy(); - } - keyStrategy = builder.keyStrategy; - - if (Objects.isNull(builder.authInterceptor)) { - builder.authInterceptor = new DefaultOpenAiAuthInterceptor(); - } - authInterceptor = builder.authInterceptor; - //璁剧疆apiKeys鍜宬ey鐨勮幏鍙栫瓥鐣� - authInterceptor.setApiKey(this.apiKey); - authInterceptor.setKeyStrategy(this.keyStrategy); - - if (Objects.isNull(builder.okHttpClient)) { - builder.okHttpClient = this.okHttpClient(); - } else { - //鑷畾涔夌殑okhttpClient 闇�瑕佸鍔燼pi keys - builder.okHttpClient = builder.okHttpClient - .newBuilder() - .addInterceptor(authInterceptor) - .build(); - } - okHttpClient = builder.okHttpClient; - - this.openAiApi = new Retrofit.Builder() - .baseUrl(apiHost) - .client(okHttpClient) - .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) - .addConverterFactory(JacksonConverterFactory.create()) - .build().create(OpenAiApi.class); - } - - /** - * 鍒涘缓榛樿鐨凮kHttpClient - */ - private OkHttpClient okHttpClient() { - if (Objects.isNull(this.authInterceptor)) { - this.authInterceptor = new DefaultOpenAiAuthInterceptor(); - } - this.authInterceptor.setApiKey(this.apiKey); - this.authInterceptor.setKeyStrategy(this.keyStrategy); - OkHttpClient okHttpClient = new OkHttpClient - .Builder() - .addInterceptor(this.authInterceptor) - .connectTimeout(10, TimeUnit.SECONDS) - .writeTimeout(50, TimeUnit.SECONDS) - .readTimeout(50, TimeUnit.SECONDS) - .build(); - return okHttpClient; - } - - - /** - * 娴佸紡杈撳嚭锛屾渶鏂扮増鐨凣PT-3.5 chat completion 鏇村姞璐磋繎瀹樻柟缃戠珯鐨勯棶绛旀ā鍨� - * - * @param chatCompletion 闂瓟鍙傛暟 - * @param eventSourceListener 鐩戝惉鍣� - */ - public <T extends BaseChatCompletion> void streamChatCompletion(T chatCompletion, EventSourceListener eventSourceListener) { - if (Objects.isNull(eventSourceListener)) { - log.error("鍙傛暟寮傚父锛欵ventSourceListener涓嶈兘涓虹┖!"); - throw new BaseException(CommonError.PARAM_ERROR.msg()); - } - try { - EventSource.Factory factory = EventSources.createFactory(this.okHttpClient); - ObjectMapper mapper = new ObjectMapper(); - String requestBody = mapper.writeValueAsString(chatCompletion); - Request request = new Request.Builder() - .url(this.apiHost + "v1/chat/completions") - .post(RequestBody.create(MediaType.parse(ContentType.JSON.getValue()), requestBody)) - .build(); - factory.newEventSource(request, eventSourceListener); - } catch (Exception e) { - log.error("璇锋眰鍙傛暟瑙f瀽寮傚父锛歿}", e.getMessage()); - } - } - - - /** - * 鏍规嵁鎻忚堪鐢熸垚鍥剧墖 - * - * @param image 鍥剧墖鍙傛暟 - * @return ImageResponse - */ - public ImageResponse genImages(Image image) { - Single<ImageResponse> edits = this.openAiApi.genImages(image); - return edits.blockingGet(); - } - - /** - * 鏈�鏂扮増鐨凣PT-3.5 chat completion 鏇村姞璐磋繎瀹樻柟缃戠珯鐨勯棶绛旀ā鍨� - * - * @param chatCompletion 闂瓟鍙傛暟 - * @return 绛旀 - */ - public <T extends BaseChatCompletion> ChatCompletionResponse chatCompletion(T chatCompletion) { - if (chatCompletion instanceof ChatCompletion) { - Single<ChatCompletionResponse> chatCompletionResponse = this.openAiApi.chatCompletion((ChatCompletion) chatCompletion); - return chatCompletionResponse.blockingGet(); - } - Single<ChatCompletionResponse> chatCompletionResponse = this.openAiApi.chatCompletionWithPicture((ChatCompletionWithPicture) chatCompletion); - return chatCompletionResponse.blockingGet(); - } - - /** - * 涓婁紶鏂囦欢 - * - * @param purpose purpose - * @param file 鏂囦欢瀵硅薄 - * @return UploadFileResponse - */ - public UploadFileResponse uploadFile(String purpose, java.io.File file) { - // 鍒涘缓 RequestBody锛岀敤浜庡皝瑁呮瀯寤篟equestBody - RequestBody fileBody = RequestBody.create(MediaType.parse("multipart/form-data"), file); - MultipartBody.Part multipartBody = MultipartBody.Part.createFormData("file", file.getName(), fileBody); - - RequestBody purposeBody = RequestBody.create(MediaType.parse("multipart/form-data"), purpose); - Single<UploadFileResponse> uploadFileResponse = this.openAiApi.uploadFile(multipartBody, purposeBody); - return uploadFileResponse.blockingGet(); - } - - /** - * 鑾峰彇openKey璐︽埛淇℃伅(杩�90澶�) - * - * @param key - * @return KeyInfo - * @Date 2023/7/6 - **/ - public KeyInfo getKeyInfo(String key) { - Date now = new Date(); - Date start = new Date(now.getTime() - (long) 90 * 24 * 60 * 60 * 1000); - Date end = new Date(now.getTime() + (long) 24 * 60 * 60 * 1000); - - BillingUsage billingUsage = billingUsage(start.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), end.toInstant().atZone(ZoneId.systemDefault()).toLocalDate()); - double totalUsage = billingUsage.getTotalUsage().doubleValue() / 100; - System.out.println(totalUsage); - Subscription subscription = subscription(); - KeyInfo keyInfo = new KeyInfo(); - String start_key = key.substring(0, 6); - String end_key = key.substring(key.length() - 6); - String mid_key = key.substring(6, key.length() - 6); - mid_key = mid_key.replaceAll(".", "*"); - - keyInfo.setKeyValue(start_key + mid_key + end_key); - keyInfo.setTotalAmount(subscription.getHardLimitUsd()); - keyInfo.setRemaining(subscription.getHardLimitUsd() - totalUsage); - keyInfo.setTotalUsage(totalUsage); - keyInfo.setLimitDate(new Date(subscription.getAccessUntil() * 1000).toInstant().atZone(ZoneId.systemDefault()).toLocalDate()); - keyInfo.setPlanTitle(subscription.getPlan() != null ? subscription.getPlan().getTitle() : "null"); - keyInfo.setIsHasPaymentMethod(subscription.isHasPaymentMethod()); - keyInfo.setModel(getModelName()); - return keyInfo; - } - - /** - * 鑾峰彇鍙敤妯″瀷 - * - * @param - * @return String - * @Date 2023/7/6 - **/ - public String getModelName() { - Single<ModelResponse> models = this.openAiApi.models(); - List<Model> modelList = models.blockingGet().getData(); - for (Model model : modelList) { - if (Objects.equals(model.getId(), "gpt-4")) { - return "GPT-4.0"; - } - } - return "GPT-3.5"; - } - - /** - * 璐︽埛璋冪敤鎺ュ彛娑堣�楅噾棰濅俊鎭煡璇� - * 鏈�澶氭煡璇�100澶� - * - * @param starDate 寮�濮嬫椂闂� - * @param endDate 缁撴潫鏃堕棿 - * @return 娑堣�楅噾棰濅俊鎭� - */ - public BillingUsage billingUsage(@NotNull LocalDate starDate, @NotNull LocalDate endDate) { - Single<BillingUsage> billingUsage = this.openAiApi.billingUsage(starDate, endDate); - return billingUsage.blockingGet(); - } - - /** - * 璐︽埛淇℃伅鏌ヨ锛氶噷闈㈠寘鍚�婚噾棰濈瓑淇℃伅 - * - * @return 璐︽埛淇℃伅 - */ - public Subscription subscription() { - Single<Subscription> subscription = this.openAiApi.subscription(); - return subscription.blockingGet(); - } - - /** - * 璇煶杞枃瀛� - * - * @param transcriptions 鍙傛暟 - * @param file 璇煶鏂囦欢 鏈�澶ф敮鎸�25MB mp3, mp4, mpeg, mpga, m4a, wav, webm - * @return 璇煶鏂囨湰 - */ - public WhisperResponse speechToTextTranscriptions(java.io.File file, Transcriptions transcriptions) { - //鏂囦欢 - RequestBody fileBody = RequestBody.create(MediaType.parse("multipart/form-data"), file); - MultipartBody.Part multipartBody = MultipartBody.Part.createFormData("file", file.getName(), fileBody); - //鑷畾涔夊弬鏁� - Map<String, RequestBody> requestBodyMap = new HashMap<>(10); - if (StrUtil.isNotBlank(transcriptions.getLanguage())) { - requestBodyMap.put(Transcriptions.Fields.language, RequestBody.create(MediaType.parse("multipart/form-data"), transcriptions.getLanguage())); - } - if (StrUtil.isNotBlank(transcriptions.getModel())) { - requestBodyMap.put(Transcriptions.Fields.model, RequestBody.create(MediaType.parse("multipart/form-data"), transcriptions.getModel())); - } - if (StrUtil.isNotBlank(transcriptions.getPrompt())) { - requestBodyMap.put(Transcriptions.Fields.prompt, RequestBody.create(MediaType.parse("multipart/form-data"), transcriptions.getPrompt())); - } - if (StrUtil.isNotBlank(transcriptions.getResponseFormat())) { - requestBodyMap.put(Transcriptions.Fields.responseFormat, RequestBody.create(MediaType.parse("multipart/form-data"), transcriptions.getResponseFormat())); - } - if (Objects.nonNull(transcriptions.getTemperature())) { - requestBodyMap.put(Transcriptions.Fields.temperature, RequestBody.create(MediaType.parse("multipart/form-data"), String.valueOf(transcriptions.getTemperature()))); - } - Single<WhisperResponse> whisperResponse = this.openAiApi.speechToTextTranscriptions(multipartBody, requestBodyMap); - return whisperResponse.blockingGet(); - } - - /** - * 绠�鏄撶増 璇煶杞枃瀛� - * - * @param file 璇煶鏂囦欢 鏈�澶ф敮鎸�25MB mp3, mp4, mpeg, mpga, m4a, wav, webm - * @return 璇煶鏂囨湰 - */ - public WhisperResponse speechToTextTranscriptions(java.io.File file) { - Transcriptions transcriptions = Transcriptions.builder().build(); - return this.speechToTextTranscriptions(file, transcriptions); - } - /** - * 鏂囨湰杞闊筹紙寮傛锛� - * - * @param textToSpeech 鍙傛暟 - * @param callback 杩斿洖鍊兼帴鏀� - * @since 1.1.2 - */ - public void textToSpeech(TextToSpeech textToSpeech, retrofit2.Callback callback) { - retrofit2.Call<ResponseBody> responseBody = this.openAiApi.textToSpeech(textToSpeech); - responseBody.enqueue(callback); - } - - /** - * 鏂囨湰杞闊筹紙鍚屾锛� - * - * @param textToSpeech 鍙傛暟 - * @since 1.1.3 - */ - public ResponseBody textToSpeech(TextToSpeech textToSpeech){ - Call<ResponseBody> responseBody = this.openAiApi.textToSpeech(textToSpeech); - try { - return responseBody.execute().body(); - } catch (IOException e) { - throw new BaseException("鏂囨湰杞闊筹紙鍚屾锛夊け璐�: "+e.getMessage()); - } - } - - /** - * 鏂囨湰杞闊筹紙鍏嬮殕锛� - * - * @param textToSpeech - * @return - */ - public ResponseBody textToSpeechClone(TextToSpeech textToSpeech) { - String baseUrl = "http://localhost:8081"; - String spk = "涓夋湀涓�"; - String text = textToSpeech.getInput(); - String lang = "zh"; - - // 鍒涘缓OkHttpClient瀹炰緥 - OkHttpClient client = new OkHttpClient(); - - // 鏋勫缓璇锋眰URL - HttpUrl.Builder urlBuilder = HttpUrl.parse(baseUrl).newBuilder(); - urlBuilder.addQueryParameter("spk", spk); - urlBuilder.addQueryParameter("text", text); - urlBuilder.addQueryParameter("lang", lang); - String url = urlBuilder.build().toString(); - - // 鍒涘缓璇锋眰瀵硅薄 - Request request = new Request.Builder() - .url(url) - .build(); - // 鍙戦�佽姹傚苟澶勭悊鍝嶅簲 - try { - return client.newCall(request).execute().body(); - } catch (IOException e) { - throw new BaseException("璇煶鍏嬮殕澶辫触锛亄}",e.getMessage()); - } - } - - - /** - * 鏋勯�� - * - * @return Builder - */ - public static Builder builder() { - return new Builder(); - } - - public static final class Builder { - private @NotNull List<String> apiKey; - /** - * api璇锋眰鍦板潃锛岀粨灏惧鏈夋枩鏉� - * - * @see OpenAIConst - */ - private String apiHost; - - /** - * 鑷畾涔塐khttpClient - */ - private OkHttpClient okHttpClient; - - - /** - * api key鐨勮幏鍙栫瓥鐣� - */ - private KeyStrategyFunction keyStrategy; - - /** - * 鑷畾涔夐壌鏉冩嫤鎴櫒 - */ - private OpenAiAuthInterceptor authInterceptor; - - public Builder() { - } - - public Builder apiKey(@NotNull List<String> val) { - apiKey = val; - return this; - } - - /** - * @param val api璇锋眰鍦板潃锛岀粨灏惧鏈夋枩鏉� - * @return Builder - * @see OpenAIConst - */ - public Builder apiHost(String val) { - apiHost = val; - return this; - } - - public Builder keyStrategy(KeyStrategyFunction val) { - keyStrategy = val; - return this; - } - - public Builder okHttpClient(OkHttpClient val) { - okHttpClient = val; - return this; - } - - public Builder authInterceptor(OpenAiAuthInterceptor val) { - authInterceptor = val; - return this; - } - - public OpenAiStreamClient build() { - return new OpenAiStreamClient(this); - } - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/TestOpenAIAPI.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/TestOpenAIAPI.java deleted file mode 100644 index f4e8bd5..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/TestOpenAIAPI.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.xmzs.common.chat.openai; - -import okhttp3.*; - -import java.io.IOException; - -public class TestOpenAIAPI { - - private final OkHttpClient client = new OkHttpClient(); - private static final String API_KEY = "sk-Waea254YSRYVg4FZVCz2CDz73B22xRpmKpJ41kbczVgpPxvg"; - private static final String URL = "https://api.gptgod.online/v1/chat/completions"; - - public void getChatGptResponse(String prompt) throws IOException { - RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), - "{\"model\": \"gpt-3.5-turbo\", \"messages\": [{\"role\": \"system\", \"content\": \"You are a helpful assistant.\"}, {\"role\": \"user\", \"content\": \"" + prompt + "\"}]}"); - - Request request = new Request.Builder() - .url(URL) - .post(body) - .addHeader("Authorization", "Bearer " + API_KEY) - .build(); - - try (Response response = client.newCall(request).execute()) { - System.out.println(response.body().string()); - } - } - - public static void main(String[] args) throws IOException { - TestOpenAIAPI api = new TestOpenAIAPI(); - api.getChatGptResponse("Hello, how are you?"); - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/exception/CommonError.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/exception/CommonError.java deleted file mode 100644 index a02877d..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/exception/CommonError.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.xmzs.common.chat.openai.exception; - -/** - * 鎻忚堪锛� 閿欒 - * - * @author https:www.unfbx.com - * 2023-02-11 - */ -public enum CommonError implements IError { - API_KEYS_NOT_NUL(500, "API KEYS 涓嶈兘涓虹┖"), - NO_ACTIVE_API_KEYS(500, "娌℃湁鍙敤鐨凙PI KEYS"), - SYS_ERROR(500, "绯荤粺绻佸繖"), - PARAM_ERROR(501, "鍙傛暟寮傚父"), - RETRY_ERROR(502, "璇锋眰寮傚父锛岃閲嶈瘯~"), - //瀹樻柟鐨勯敊璇爜鍒楄〃锛歨ttps://platform.openai.com/docs/guides/error-codes/api-errors - OPENAI_AUTHENTICATION_ERROR(401, "韬唤楠岃瘉鏃犳晥/鎻愪緵鐨� API 瀵嗛挜涓嶆纭�/鎮ㄥ繀椤绘槸缁勭粐鐨勬垚鍛樻墠鑳戒娇鐢� API"), - OPENAI_LIMIT_ERROR(429 , "杈惧埌璇锋眰鐨勯�熺巼闄愬埗/鎮ㄨ秴鍑轰簡褰撳墠閰嶉锛岃妫�鏌ユ偍鐨勮鍒掑拰甯愬崟璇︾粏淇℃伅/鍙戝姩鏈哄綋鍓嶈繃杞斤紝璇风◢鍚庨噸璇�"), - OPENAI_SERVER_ERROR(500, "鏈嶅姟鍣ㄥ湪澶勭悊鎮ㄧ殑璇锋眰鏃跺嚭閿�"), - ; - - - private int code; - private String msg; - - CommonError(int code, String msg) { - this.code = code; - this.msg = msg; - } - - @Override - public String msg() { - return this.msg; - } - - @Override - public int code() { - return this.code; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/exception/IError.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/exception/IError.java deleted file mode 100644 index 98f73b8..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/exception/IError.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.xmzs.common.chat.openai.exception; -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * 2023-02-11 - */ -public interface IError { - String msg(); - - int code(); -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/function/KeyRandomStrategy.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/function/KeyRandomStrategy.java deleted file mode 100644 index 8251db3..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/function/KeyRandomStrategy.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.xmzs.common.chat.openai.function; - -import cn.hutool.core.util.RandomUtil; - -import java.util.List; - -/** - * 鎻忚堪锛氶殢鏈虹瓥鐣� - * - * @author https:www.unfbx.com - * @since 2023-04-03 - */ -public class KeyRandomStrategy implements KeyStrategyFunction<List<String>, String> { - - @Override - public String apply(List<String> apiKeys) { - return RandomUtil.randomEle(apiKeys); - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/function/KeyStrategyFunction.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/function/KeyStrategyFunction.java deleted file mode 100644 index 97d90a8..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/function/KeyStrategyFunction.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.xmzs.common.chat.openai.function; - -import java.util.function.Function; - -/** - * 鎻忚堪锛歬ey 鐨勮幏鍙栫瓥鐣� - * jdk榛樿瀹炵幇 - * @see Function - * - * @author https:www.unfbx.com - * @since 2023-04-03 - */ -@FunctionalInterface -public interface KeyStrategyFunction<T, R> { - - /** - * Applies this function to the given argument. - * - * @param t the function argument - * @return the function result - */ - R apply(T t); - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/interceptor/DefaultOpenAiAuthInterceptor.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/interceptor/DefaultOpenAiAuthInterceptor.java deleted file mode 100644 index fb17ccf..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/interceptor/DefaultOpenAiAuthInterceptor.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.xmzs.common.chat.openai.interceptor; - -import lombok.extern.slf4j.Slf4j; -import okhttp3.Request; -import okhttp3.Response; - -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * 鎻忚堪锛氳姹傚鍔爃eader apikey - * - * @author https:www.unfbx.com - * @since 2023-03-23 - */ -@Slf4j -public class DefaultOpenAiAuthInterceptor extends OpenAiAuthInterceptor { - /** - * 璇锋眰澶村鐞� - */ - public DefaultOpenAiAuthInterceptor() { - super.setWarringConfig(null); - } - - /** - * 鏋勯�犳柟娉� - * - * @param warringConfig 鎵�鏈夌殑key閮藉け鏁堝悗鐨勫憡璀﹀弬鏁伴厤缃� - */ - public DefaultOpenAiAuthInterceptor(Map warringConfig) { - super.setWarringConfig(warringConfig); - } - - /** - * 鎷︽埅鍣ㄩ壌鏉� - * - * @param chain Chain - * @return Response瀵硅薄 - * @throws IOException io寮傚父 - */ - @Override - public Response intercept(Chain chain) throws IOException { - Request original = chain.request(); - return chain.proceed(auth(super.getKey(), original)); - } - - /** - * key澶辨晥鎴栬�呯鐢ㄥ悗鐨勫鐞嗛�昏緫 - * 榛樿涓嶅鐞� - * - * @param apiKey 杩斿洖鏂扮殑api keys闆嗗悎 - * @return 鏂扮殑apiKey闆嗗悎 - */ - @Override - protected List<String> onErrorDealApiKeys(String apiKey) { - return super.getApiKey(); - } - - @Override - protected void noHaveActiveKeyWarring() { - log.error("--------> [鍛婅] 娌℃湁鍙敤鐨刱ey锛侊紒锛�"); - return; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/interceptor/DynamicKeyOpenAiAuthInterceptor.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/interceptor/DynamicKeyOpenAiAuthInterceptor.java deleted file mode 100644 index 7deba37..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/interceptor/DynamicKeyOpenAiAuthInterceptor.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.xmzs.common.chat.openai.interceptor; - -import cn.hutool.json.JSONUtil; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; -import okhttp3.Request; -import okhttp3.Response; -import com.xmzs.common.core.exception.base.BaseException; -import com.xmzs.common.chat.entity.common.OpenAiResponse; -import com.xmzs.common.chat.openai.exception.CommonError; - - -import java.io.IOException; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Collectors; - -/** - * 鎻忚堪锛氬姩鎬佸鐞唊ey鐨勯壌鏉冩嫤鎴櫒 - * - * @author https:www.unfbx.com - * @since 2023-04-25 - */ -@Getter -@Slf4j -public class DynamicKeyOpenAiAuthInterceptor extends OpenAiAuthInterceptor { - /** - * 璐﹀彿琚皝浜� - */ - private static final String ACCOUNT_DEACTIVATED = "account_deactivated"; - /** - * key涓嶆纭� - */ - private static final String INVALID_API_KEY = "invalid_api_key"; - - /** - * 璇锋眰澶村鐞� - * - */ - public DynamicKeyOpenAiAuthInterceptor() { - this.setWarringConfig(null); - } - - /** - * 鏋勯�犳柟娉� - * - * @param warringConfig 鎵�鏈夌殑key閮藉け鏁堝悗鐨勫憡璀﹀弬鏁伴厤缃� - */ - public DynamicKeyOpenAiAuthInterceptor(Map warringConfig) { - this.setWarringConfig(warringConfig); - } - - @Override - public Response intercept(Chain chain) throws IOException { - String key = getKey(); - Request original = chain.request(); - Request request = this.auth(key, original); - Response response = chain.proceed(request); - if (!response.isSuccessful()) { - String errorMsg = response.body().string(); - if (response.code() == CommonError.OPENAI_AUTHENTICATION_ERROR.code() - || response.code() == CommonError.OPENAI_LIMIT_ERROR.code() - || response.code() == CommonError.OPENAI_SERVER_ERROR.code()) { - OpenAiResponse openAiResponse = JSONUtil.toBean(errorMsg, OpenAiResponse.class); - String errorCode = openAiResponse.getError().getCode(); - log.error("--------> 璇锋眰openai寮傚父锛岄敊璇痗ode锛歿}", errorCode); - log.error("--------> 璇锋眰寮傚父锛歿}", errorMsg); - //璐﹀彿琚皝鎴栬�卥ey涓嶆纭氨绉婚櫎鎺� - if (ACCOUNT_DEACTIVATED.equals(errorCode) || INVALID_API_KEY.equals(errorCode)) { - super.setApiKey(this.onErrorDealApiKeys(key)); - } - throw new BaseException(openAiResponse.getError().getMessage()); - } - //闈炲畼鏂瑰畾涔夌殑閿欒code - log.error("--------> 璇锋眰寮傚父锛歿}", errorMsg); - OpenAiResponse openAiResponse = JSONUtil.toBean(errorMsg, OpenAiResponse.class); - if (Objects.nonNull(openAiResponse.getError())) { - log.error(openAiResponse.getError().getMessage()); - throw new BaseException(openAiResponse.getError().getMessage()); - } - throw new BaseException(CommonError.RETRY_ERROR.msg()); - } - return response; - } - - - @Override - protected List<String> onErrorDealApiKeys(String errorKey) { - List<String> apiKey = super.getApiKey().stream().filter(e -> !errorKey.equals(e)).collect(Collectors.toList()); - log.error("--------> 褰撳墠ApiKey锛歔{}] 澶辨晥浜嗭紝绉婚櫎锛�", errorKey); - return apiKey; - } - - /** - * 鎵�鏈夌殑key閮藉け鏁堝悗锛岃嚜瀹氫箟棰勮閰嶇疆 - * 涓嶉厤缃洿鎺eturn - */ - @Override - protected void noHaveActiveKeyWarring() { - log.error("--------> [鍛婅] 娌℃湁鍙敤鐨刱ey锛侊紒锛�"); - return; - } - - @Override - public Request auth(String key, Request original) { - return super.auth(key, original); - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/interceptor/OpenAILogger.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/interceptor/OpenAILogger.java deleted file mode 100644 index 5c24efb..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/interceptor/OpenAILogger.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.common.chat.openai.interceptor; - -import lombok.extern.slf4j.Slf4j; -import okhttp3.logging.HttpLoggingInterceptor; - -/** - * 鎻忚堪锛� 鏃ュ織 - * - * @author https:www.unfbx.com - * 2023-02-28 - */ -@Slf4j -public class OpenAILogger implements HttpLoggingInterceptor.Logger { - @Override - public void log(String message) { - log.info("OkHttp-------->:{}", message); - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/interceptor/OpenAiAuthInterceptor.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/interceptor/OpenAiAuthInterceptor.java deleted file mode 100644 index f40d782..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/interceptor/OpenAiAuthInterceptor.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.xmzs.common.chat.openai.interceptor; - - -import cn.hutool.core.collection.CollectionUtil; -import cn.hutool.http.ContentType; -import cn.hutool.http.Header; -import lombok.Getter; -import lombok.Setter; -import okhttp3.Interceptor; -import okhttp3.Request; -import com.xmzs.common.core.exception.base.BaseException; -import com.xmzs.common.chat.openai.exception.CommonError; -import com.xmzs.common.chat.openai.function.KeyStrategyFunction; - - -import java.util.List; -import java.util.Map; - -public abstract class OpenAiAuthInterceptor implements Interceptor { - - - /** - * key 闆嗗悎 - */ - @Getter - @Setter - private List<String> apiKey; - /** - * 鑷畾涔夌殑key鐨勪娇鐢ㄧ瓥鐣� - */ - @Getter - @Setter - private KeyStrategyFunction<List<String>, String> keyStrategy; - - /** - * 棰勮瑙﹀彂鍙傛暟閰嶇疆锛岄厤缃弬鏁板疄鐜伴涔︺�侀拤閽夈�佷紒涓氬井淇°�侀偖绠遍璀︾瓑鍔熻兘 - */ - @Getter - @Setter - private Map warringConfig; - - /** - * 鑷畾涔塧piKeys鐨勫鐞嗛�昏緫 - * - * @param errorKey 閿欒鐨刱ey - * @return 杩斿洖鍊兼槸鏂扮殑apiKeys - */ - protected abstract List<String> onErrorDealApiKeys(String errorKey); - - /** - * 鎵�鏈夌殑key閮藉け鏁堝悗锛岃嚜瀹氫箟棰勮閰嶇疆 - * 鍙互閫氳繃warringConfig閰嶇疆鍙傛暟瀹炵幇椋炰功銆侀拤閽夈�佷紒涓氬井淇°�侀偖绠遍璀︾瓑 - */ - protected abstract void noHaveActiveKeyWarring(); - - - /** - * 鑾峰彇璇锋眰key - * - * @return key - */ - public final String getKey() { - if (CollectionUtil.isEmpty(apiKey)) { - this.noHaveActiveKeyWarring(); - throw new BaseException(CommonError.NO_ACTIVE_API_KEYS.msg()); - } - return keyStrategy.apply(apiKey); - } - - /** - * 榛樿鐨勯壌鏉冨鐞嗘柟娉� - * - * @param key api key - * @param original 婧愯姹備綋 - * @return 璇锋眰浣� - */ - public Request auth(String key, Request original) { - Request request = original.newBuilder() - .header(Header.AUTHORIZATION.getValue(), "Bearer " + key) - .header(Header.CONTENT_TYPE.getValue(), ContentType.JSON.getValue()) - .method(original.method(), original.body()) - .build(); - return request; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/interceptor/OpenAiResponseInterceptor.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/interceptor/OpenAiResponseInterceptor.java deleted file mode 100644 index 4d3ade5..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/openai/interceptor/OpenAiResponseInterceptor.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.xmzs.common.chat.openai.interceptor; - -import cn.hutool.json.JSONUtil; -import lombok.extern.slf4j.Slf4j; -import okhttp3.Interceptor; -import okhttp3.Request; -import okhttp3.Response; -import com.xmzs.common.core.exception.base.BaseException; -import com.xmzs.common.chat.entity.common.OpenAiResponse; -import com.xmzs.common.chat.openai.exception.CommonError; - - -import java.io.IOException; -import java.util.Objects; - -/** - * 鎻忚堪锛歰penai 杩斿洖鍊煎鐞咺nterceptor - * - * @author https:www.unfbx.com - * @since 2023-03-23 - */ -@Slf4j -public class OpenAiResponseInterceptor implements Interceptor { - @Override - public Response intercept(Chain chain) throws IOException { - - Request original = chain.request(); - Response response = chain.proceed(original); - if (!response.isSuccessful()) { - if (response.code() == CommonError.OPENAI_AUTHENTICATION_ERROR.code() - || response.code() == CommonError.OPENAI_LIMIT_ERROR.code() - || response.code() == CommonError.OPENAI_SERVER_ERROR.code()) { - OpenAiResponse openAiResponse = JSONUtil.toBean(response.body().string(), OpenAiResponse.class); - log.error(openAiResponse.getError().getMessage()); - throw new BaseException(openAiResponse.getError().getMessage()); - } - String errorMsg = response.body().string(); - log.error("--------> 璇锋眰寮傚父锛歿}", errorMsg); - OpenAiResponse openAiResponse = JSONUtil.toBean(errorMsg, OpenAiResponse.class); - if (Objects.nonNull(openAiResponse.getError())) { - log.error(openAiResponse.getError().getMessage()); - throw new BaseException(openAiResponse.getError().getMessage()); - } - throw new BaseException(CommonError.RETRY_ERROR.msg()); - } - return response; - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/utils/TikTokensUtil.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/utils/TikTokensUtil.java deleted file mode 100644 index 307b5c1..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/utils/TikTokensUtil.java +++ /dev/null @@ -1,239 +0,0 @@ -package com.xmzs.common.chat.utils; - -import cn.hutool.core.util.StrUtil; -import com.knuddels.jtokkit.Encodings; -import com.knuddels.jtokkit.api.Encoding; -import com.knuddels.jtokkit.api.EncodingRegistry; -import com.knuddels.jtokkit.api.EncodingType; -import com.knuddels.jtokkit.api.ModelType; -import com.xmzs.common.chat.entity.chat.BaseChatCompletion; -import lombok.extern.slf4j.Slf4j; - -import com.xmzs.common.chat.entity.chat.ChatCompletion; -import com.xmzs.common.chat.entity.chat.FunctionCall; -import com.xmzs.common.chat.entity.chat.Message; -import org.jetbrains.annotations.NotNull; - -import java.util.*; - -/** - * 鎻忚堪锛歵oken璁$畻宸ュ叿绫� - * - * @author https:www.unfbx.com - * @since 2023-04-04 - */ -@Slf4j -public class TikTokensUtil { - /** - * 妯″瀷鍚嶇О瀵瑰簲Encoding - */ - private static final Map<String, Encoding> modelMap = new HashMap<>(); - /** - * registry瀹炰緥 - */ - private static final EncodingRegistry registry = Encodings.newDefaultEncodingRegistry(); - - static { - for (ModelType modelType : ModelType.values()) { - modelMap.put(modelType.getName(), registry.getEncodingForModel(modelType)); - } - modelMap.put(ChatCompletion.Model.GPT_3_5_TURBO_0613.getName(), registry.getEncodingForModel(ModelType.GPT_3_5_TURBO)); - modelMap.put(ChatCompletion.Model.GPT_3_5_TURBO_16K.getName(), registry.getEncodingForModel(ModelType.GPT_3_5_TURBO)); - modelMap.put(ChatCompletion.Model.GPT_3_5_TURBO_16K_0613.getName(), registry.getEncodingForModel(ModelType.GPT_3_5_TURBO)); - modelMap.put(ChatCompletion.Model.GPT_3_5_TURBO_0125.getName(), registry.getEncodingForModel(ModelType.GPT_3_5_TURBO)); - modelMap.put(ChatCompletion.Model.GPT_4_32K.getName(), registry.getEncodingForModel(ModelType.GPT_4)); - modelMap.put(ChatCompletion.Model.GPT_4_0613.getName(), registry.getEncodingForModel(ModelType.GPT_4)); - modelMap.put(ChatCompletion.Model.GPT_4_32K_0613.getName(), registry.getEncodingForModel(ModelType.GPT_4)); - modelMap.put(ChatCompletion.Model.GPT_4_1106_PREVIEW.getName(), registry.getEncodingForModel(ModelType.GPT_4)); - modelMap.put(ChatCompletion.Model.GPT_4_VISION_PREVIEW.getName(), registry.getEncodingForModel(ModelType.GPT_4)); - modelMap.put(ChatCompletion.Model.GPT_4_0125_PREVIEW.getName(), registry.getEncodingForModel(ModelType.GPT_4)); - } - - /** - * 閫氳繃Encoding鍜宼ext鑾峰彇缂栫爜鏁扮粍 - * - * @param enc Encoding绫诲瀷 - * @param text 鏂囨湰淇℃伅 - * @return 缂栫爜鏁扮粍 - */ - public static List<Integer> encode(@NotNull Encoding enc, String text) { - return StrUtil.isBlank(text) ? new ArrayList<>() : enc.encode(text); - } - - /** - * 閫氳繃Encoding璁$畻text淇℃伅鐨則okens - * - * @param enc Encoding绫诲瀷 - * @param text 鏂囨湰淇℃伅 - * @return tokens鏁伴噺 - */ - public static int tokens(@NotNull Encoding enc, String text) { - return encode(enc, text).size(); - } - - - /** - * 閫氳繃Encoding鍜宔ncoded鏁扮粍鍙嶆帹text淇℃伅 - * - * @param enc Encoding - * @param encoded 缂栫爜鏁扮粍 - * @return 缂栫爜鏁扮粍瀵瑰簲鐨勬枃鏈俊鎭� - */ - public static String decode(@NotNull Encoding enc, @NotNull List<Integer> encoded) { - return enc.decode(encoded); - } - - /** - * 鑾峰彇涓�涓狤ncoding瀵硅薄锛岄�氳繃Encoding绫诲瀷 - * - * @param encodingType encodingType - * @return Encoding - */ - public static Encoding getEncoding(@NotNull EncodingType encodingType) { - return registry.getEncoding(encodingType); - } - - /** - * 鑾峰彇encode鐨勭紪鐮佹暟缁� - * - * @param text 鏂囨湰淇℃伅 - * @return 缂栫爜鏁扮粍 - */ - public static List<Integer> encode(@NotNull EncodingType encodingType, String text) { - if (StrUtil.isBlank(text)) { - return new ArrayList<>(); - } - Encoding enc = getEncoding(encodingType); - return enc.encode(text); - } - - /** - * 璁$畻鎸囧畾瀛楃涓茬殑tokens锛岄�氳繃EncodingType - * - * @param encodingType encodingType - * @param text 鏂囨湰淇℃伅 - * @return tokens鏁伴噺 - */ - public static int tokens(@NotNull EncodingType encodingType, String text) { - return encode(encodingType, text).size(); - } - - - /** - * 閫氳繃EncodingType鍜宔ncoded缂栫爜鏁扮粍锛屽弽鎺ㄥ瓧绗︿覆鏂囨湰 - * - * @param encodingType encodingType - * @param encoded 缂栫爜鏁扮粍 - * @return 缂栫爜鏁扮粍瀵瑰簲鐨勫瓧绗︿覆 - */ - public static String decode(@NotNull EncodingType encodingType, @NotNull List<Integer> encoded) { - Encoding enc = getEncoding(encodingType); - return enc.decode(encoded); - } - - - /** - * 鑾峰彇涓�涓狤ncoding瀵硅薄锛岄�氳繃妯″瀷鍚嶇О - * - * @param modelName 妯″瀷鍚嶇О - * @return Encoding - */ - public static Encoding getEncoding(@NotNull String modelName) { - return modelMap.getOrDefault(modelName, modelMap.get(ChatCompletion.Model.GPT_4_1106_PREVIEW.getName())); - } - - /** - * 鑾峰彇encode鐨勭紪鐮佹暟缁勶紝閫氳繃妯″瀷鍚嶇О - * - * @param text 鏂囨湰淇℃伅 - * @return 缂栫爜鏁扮粍 - */ - public static List<Integer> encode(@NotNull String modelName, String text) { - if (StrUtil.isBlank(text)) { - return new ArrayList<>(); - } - Encoding enc = getEncoding(modelName); - if (Objects.isNull(enc)) { - log.warn("[{}]妯″瀷涓嶅瓨鍦ㄦ垨鑰呮殏涓嶆敮鎸佽绠梩okens锛岀洿鎺ヨ繑鍥瀟okens==0",modelName); - return new ArrayList<>(); - } - return enc.encode(text); - } - - /** - * 閫氳繃妯″瀷鍚嶇О, 璁$畻鎸囧畾瀛楃涓茬殑tokens - * - * @param modelName 妯″瀷鍚嶇О - * @param text 鏂囨湰淇℃伅 - * @return tokens鏁伴噺 - */ - public static int tokens(@NotNull String modelName, String text) { - return encode(modelName, text).size(); - } - - - /** - * 閫氳繃妯″瀷鍚嶇О璁$畻messages鑾峰彇缂栫爜鏁扮粍 - * 鍙傝�冨畼鏂圭殑澶勭悊閫昏緫锛� - * <a href=https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb>https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb</a> - * - * @param modelName 妯″瀷鍚嶇О - * @param messages 娑堟伅浣� - * @return tokens鏁伴噺 - */ - public static int tokens(@NotNull String modelName, @NotNull List<Message> messages) { - Encoding encoding = getEncoding(modelName); - int tokensPerMessage = 0; - int tokensPerName = 0; - if (modelName.equals(ChatCompletion.Model.GPT_3_5_TURBO_0613.getName()) - || modelName.equals(ChatCompletion.Model.GPT_3_5_TURBO_16K_0613.getName()) - || modelName.equals(ChatCompletion.Model.GPT_4_0613.getName()) - || modelName.equals(ChatCompletion.Model.GPT_4_32K_0613.getName()) - || modelName.equals(ChatCompletion.Model.GPT_4_1106_PREVIEW.getName()) - || modelName.equals(ChatCompletion.Model.GPT_4_VISION_PREVIEW.getName()) - ) { - tokensPerMessage = 3; - tokensPerName = 1; - }else if(modelName.contains(ChatCompletion.Model.GPT_3_5_TURBO.getName())){ - //"gpt-3.5-turbo" in model: - log.warn("Warning: gpt-3.5-turbo may update over time. Returning num tokens assuming gpt-3.5-turbo-0613."); - tokensPerMessage = 3; - tokensPerName = 1; - }else if(modelName.contains(ChatCompletion.Model.GPT_4.getName())){ - log.warn("Warning: gpt-4 may update over time. Returning num tokens assuming gpt-4-0613."); - tokensPerMessage = 3; - tokensPerName = 1; - }else { - log.warn("涓嶆敮鎸佺殑model {} 鎸塯pt4璁¤垂",modelName); - tokensPerMessage = 3; - tokensPerName = 1; - } - int sum = 0; - for (Message msg : messages) { - sum += tokensPerMessage; - sum += tokens(encoding, msg.getContent()); - sum += tokens(encoding, msg.getRole()); - sum += tokens(encoding, msg.getName()); - FunctionCall functionCall = msg.getFunctionCall(); - sum += Objects.isNull(functionCall) ? 0 : tokens(encoding, functionCall.toString()); - if (StrUtil.isNotBlank(msg.getName())) { - sum += tokensPerName; - } - } - sum += 3; - return sum; - } - - /** - * 閫氳繃妯″瀷鍚嶇О鍜宔ncoded缂栫爜鏁扮粍锛屽弽鎺ㄥ瓧绗︿覆鏂囨湰 - * - * @param modelName 妯″瀷鍚� - * @param encoded 缂栫爜鏁扮粍 - * @return 杩斿洖婧愭枃鏈� - */ - public static String decode(@NotNull String modelName, @NotNull List<Integer> encoded) { - Encoding enc = getEncoding(modelName); - return enc.decode(encoded); - } - -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/utils/WebSocketUtils.java b/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/utils/WebSocketUtils.java deleted file mode 100644 index 1e71341..0000000 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/com/xmzs/common/chat/utils/WebSocketUtils.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.xmzs.common.chat.utils; - -import cn.hutool.core.collection.CollUtil; -import com.xmzs.common.redis.utils.RedisUtils; -import com.xmzs.common.chat.entity.dto.WebSocketMessageDto; -import com.xmzs.common.chat.holder.WebSocketSessionHolder; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.web.socket.PongMessage; -import org.springframework.web.socket.TextMessage; -import org.springframework.web.socket.WebSocketMessage; -import org.springframework.web.socket.WebSocketSession; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.function.Consumer; - -import static com.xmzs.common.chat.constant.WebSocketConstants.WEB_SOCKET_TOPIC; - -/** - * 宸ュ叿绫� - * - * @author zendwang - */ -@Slf4j -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class WebSocketUtils { - - /** - * 鍙戦�佹秷鎭� - * - * @param sessionKey session涓婚敭 涓�鑸负鐢ㄦ埛id - * @param message 娑堟伅鏂囨湰 - */ - public static void sendMessage(Long sessionKey, String message) { - WebSocketSession session = WebSocketSessionHolder.getSessions(sessionKey); - sendMessage(session, message); - } - - /** - * 璁㈤槄娑堟伅 - * - * @param consumer 鑷畾涔夊鐞� - */ - public static void subscribeMessage(Consumer<WebSocketMessageDto> consumer) { - RedisUtils.subscribe(WEB_SOCKET_TOPIC, WebSocketMessageDto.class, consumer); - } - - /** - * 鍙戝竷璁㈤槄鐨勬秷鎭� - * - * @param webSocketMessage 娑堟伅瀵硅薄 - */ - public static void publishMessage(WebSocketMessageDto webSocketMessage) { - List<Long> unsentSessionKeys = new ArrayList<>(); - // 褰撳墠鏈嶅姟鍐卻ession,鐩存帴鍙戦�佹秷鎭� - for (Long sessionKey : webSocketMessage.getSessionKeys()) { - if (WebSocketSessionHolder.existSession(sessionKey)) { - WebSocketUtils.sendMessage(sessionKey, webSocketMessage.getMessage()); - continue; - } - unsentSessionKeys.add(sessionKey); - } - // 涓嶅湪褰撳墠鏈嶅姟鍐卻ession,鍙戝竷璁㈤槄娑堟伅 - if (CollUtil.isNotEmpty(unsentSessionKeys)) { - WebSocketMessageDto broadcastMessage = new WebSocketMessageDto(); - broadcastMessage.setMessage(webSocketMessage.getMessage()); - broadcastMessage.setSessionKeys(unsentSessionKeys); - RedisUtils.publish(WEB_SOCKET_TOPIC, broadcastMessage, consumer -> { - log.info(" WebSocket鍙戦�佷富棰樿闃呮秷鎭痶opic:{} session keys:{} message:{}", - WEB_SOCKET_TOPIC, unsentSessionKeys, webSocketMessage.getMessage()); - }); - } - } - - public static void sendPongMessage(WebSocketSession session) { - sendMessage(session, new PongMessage()); - } - - public static void sendMessage(WebSocketSession session, String message) { - sendMessage(session, new TextMessage(message)); - } - - private static void sendMessage(WebSocketSession session, WebSocketMessage<?> message) { - if (session == null || !session.isOpen()) { - log.error("[send] session浼氳瘽宸茬粡鍏抽棴"); - } else { - try { - // 鑾峰彇褰撳墠浼氳瘽涓殑鐢ㄦ埛 - session.sendMessage(message); - } catch (IOException e) { - log.error("[send] session({}) 鍙戦�佹秷鎭�({}) 寮傚父", session, message, e); - } - } - } -} diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/config/ChatConfig.java b/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/config/ChatConfig.java index 03c519b..624779c 100644 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/config/ChatConfig.java +++ b/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/config/ChatConfig.java @@ -31,7 +31,6 @@ // 閲嶅惎鎵嶄細鐢熸晥 @Bean public OpenAiStreamClient openAiStreamClient() { - String apiHost = configService.getConfigValue("chat", "apiHost"); String apiKey = configService.getConfigValue("chat", "apiKey"); openAiStreamClient = createOpenAiStreamClient(apiHost,apiKey); diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/config/WebSocketConfig.java b/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/config/WebSocketConfig.java index 7b09004..f9242c6 100644 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/config/WebSocketConfig.java +++ b/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/config/WebSocketConfig.java @@ -29,15 +29,17 @@ public WebSocketConfigurer webSocketConfigurer(HandshakeInterceptor handshakeInterceptor, WebSocketHandler webSocketHandler, WebSocketProperties webSocketProperties) { + // 濡傛灉WebSocket鐨勮矾寰勪负绌猴紝鍒欒缃粯璁よ矾寰勪负 "/websocket" if (StrUtil.isBlank(webSocketProperties.getPath())) { webSocketProperties.setPath("/websocket"); } - + // 濡傛灉鍏佽璺ㄥ煙璁块棶鐨勫湴鍧�涓虹┖锛屽垯璁剧疆涓� "*"锛岃〃绀哄厑璁告墍鏈夋潵婧愮殑璺ㄥ煙璇锋眰 if (StrUtil.isBlank(webSocketProperties.getAllowedOrigins())) { webSocketProperties.setAllowedOrigins("*"); } - + // 杩斿洖涓�涓猈ebSocketConfigurer瀵硅薄锛岀敤浜庨厤缃甒ebSocket return registry -> registry + // 娣诲姞WebSocket澶勭悊绋嬪簭鍜屾嫤鎴櫒鍒版寚瀹氳矾寰勶紝璁剧疆鍏佽鐨勮法鍩熸潵婧� .addHandler(webSocketHandler, webSocketProperties.getPath()) .addInterceptors(handshakeInterceptor) .setAllowedOrigins(webSocketProperties.getAllowedOrigins()); diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/domain/request/ChatRequest.java b/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/domain/request/ChatRequest.java index a667fff..35f5269 100644 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/domain/request/ChatRequest.java +++ b/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/domain/request/ChatRequest.java @@ -34,12 +34,14 @@ private double top_p = 1; -// private String userId; + /** + * 鐭ヨ瘑搴搃d + */ + private String kid; + + private String userId; // -// /** -// * 鐭ヨ瘑搴搃d -// */ -// private String kid; + // // /** // * gpt鐨勯粯璁よ缃� diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/handler/PlusWebSocketHandler.java b/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/handler/PlusWebSocketHandler.java index 1e79f2a..7aec0bf 100644 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/handler/PlusWebSocketHandler.java +++ b/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/handler/PlusWebSocketHandler.java @@ -12,6 +12,7 @@ import org.ruoyi.common.chat.openai.OpenAiStreamClient; import org.ruoyi.common.chat.utils.WebSocketUtils; import org.ruoyi.common.core.utils.SpringUtils; +import org.springframework.beans.factory.annotation.Value; import org.springframework.web.socket.*; import org.springframework.web.socket.handler.AbstractWebSocketHandler; @@ -70,22 +71,6 @@ LocalCache.CACHE.put(session.getId(), JSONUtil.toJsonStr(messages), LocalCache.TIMEOUT); } - /** - * 鏍规嵁key鑾峰彇Value鍊� - * - * @Date 2023/7/27 - * @param jsonObject - * @param key - * @param defaultValue - * @return String - **/ - public String getValue(JSONObject jsonObject,String key,String defaultValue){ - String value = (String)jsonObject.get(key); - if(StrUtil.isEmpty(value)){ - return defaultValue; - } - return value; - } @Override protected void handleBinaryMessage(WebSocketSession session, BinaryMessage message) throws Exception { @@ -128,9 +113,9 @@ } /** - * 鏄惁鏀寔鍒嗙墖娑堟伅 + * 鎸囩ず澶勭悊绋嬪簭鏄惁鏀寔鎺ユ敹閮ㄥ垎娑堟伅 * - * @return + * @return 濡傛灉鏀寔鎺ユ敹閮ㄥ垎娑堟伅锛屽垯杩斿洖true锛涘惁鍒欒繑鍥瀎alse */ @Override public boolean supportsPartialMessages() { diff --git a/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/openai/OpenAiStreamClient.java b/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/openai/OpenAiStreamClient.java index e293aa4..cad1bbb 100644 --- a/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/openai/OpenAiStreamClient.java +++ b/ruoyi-common/ruoyi-common-chat/src/main/java/org/ruoyi/common/chat/openai/OpenAiStreamClient.java @@ -21,6 +21,8 @@ import org.ruoyi.common.chat.entity.chat.ChatCompletion; import org.ruoyi.common.chat.entity.chat.ChatCompletionResponse; import org.ruoyi.common.chat.entity.chat.ChatCompletionWithPicture; +import org.ruoyi.common.chat.entity.embeddings.Embedding; +import org.ruoyi.common.chat.entity.embeddings.EmbeddingResponse; import org.ruoyi.common.chat.entity.files.UploadFileResponse; import org.ruoyi.common.chat.entity.images.Image; import org.ruoyi.common.chat.entity.images.ImageResponse; @@ -293,6 +295,17 @@ } /** + * 鏂囨湰杞崲鍚戦噺 + * + * @param embedding 鍏ュ弬 + * @return EmbeddingResponse + */ + public EmbeddingResponse embeddings(Embedding embedding) { + Single<EmbeddingResponse> embeddings = this.openAiApi.embeddings(embedding); + return embeddings.blockingGet(); + } + + /** * 璐︽埛淇℃伅鏌ヨ锛氶噷闈㈠寘鍚�婚噾棰濈瓑淇℃伅 * * @return 璐︽埛淇℃伅 diff --git a/ruoyi-common/ruoyi-common-core/pom.xml b/ruoyi-common/ruoyi-common-core/pom.xml index 57d714f..36bd0d8 100644 --- a/ruoyi-common/ruoyi-common-core/pom.xml +++ b/ruoyi-common/ruoyi-common-core/pom.xml @@ -73,6 +73,18 @@ <artifactId>lombok</artifactId> </dependency> + <dependency> + <groupId>com.github.binarywang</groupId> + <artifactId>weixin-java-cp</artifactId> + <version>${weixin-java-miniapp.version}</version> + </dependency> + + <dependency> + <groupId>com.github.binarywang</groupId> + <artifactId>weixin-java-cp</artifactId> + <version>${weixin-java-cp.version}</version> + </dependency> + <!-- 鑷姩鐢熸垚YML閰嶇疆鍏宠仈JSON鏂囦欢 --> <dependency> <groupId>org.springframework.boot</groupId> diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/ApplicationConfig.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/ApplicationConfig.java deleted file mode 100644 index 96c5d3d..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/ApplicationConfig.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.xmzs.common.core.config; - -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.context.annotation.EnableAspectJAutoProxy; - -/** - * 绋嬪簭娉ㄨВ閰嶇疆 - * - * @author Lion Li - */ -@AutoConfiguration -// 琛ㄧず閫氳繃aop妗嗘灦鏆撮湶璇ヤ唬鐞嗗璞�,AopContext鑳藉璁块棶 -@EnableAspectJAutoProxy(exposeProxy = true) -public class ApplicationConfig { - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/AsyncConfig.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/AsyncConfig.java deleted file mode 100644 index 294a516..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/AsyncConfig.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.xmzs.common.core.config; - -import cn.hutool.core.util.ArrayUtil; -import com.xmzs.common.core.exception.ServiceException; -import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.scheduling.annotation.AsyncConfigurer; -import org.springframework.scheduling.annotation.EnableAsync; - -import java.util.Arrays; -import java.util.concurrent.Executor; -import java.util.concurrent.ScheduledExecutorService; - -/** - * 寮傛閰嶇疆 - * - * @author Lion Li - */ -@EnableAsync(proxyTargetClass = true) -@AutoConfiguration -public class AsyncConfig implements AsyncConfigurer { - - @Autowired - @Qualifier("scheduledExecutorService") - private ScheduledExecutorService scheduledExecutorService; - - /** - * 鑷畾涔� @Async 娉ㄨВ浣跨敤绯荤粺绾跨▼姹� - */ - @Override - public Executor getAsyncExecutor() { - return scheduledExecutorService; - } - - /** - * 寮傛鎵ц寮傚父澶勭悊 - */ - @Override - public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { - return (throwable, method, objects) -> { - throwable.printStackTrace(); - StringBuilder sb = new StringBuilder(); - sb.append("Exception message - ").append(throwable.getMessage()) - .append(", Method name - ").append(method.getName()); - if (ArrayUtil.isNotEmpty(objects)) { - sb.append(", Parameter value - ").append(Arrays.toString(objects)); - } - throw new ServiceException(sb.toString()); - }; - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/RuoYiConfig.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/RuoYiConfig.java deleted file mode 100644 index a3f5195..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/RuoYiConfig.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.xmzs.common.core.config; - -import lombok.Data; -import lombok.Getter; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -/** - * 璇诲彇椤圭洰鐩稿叧閰嶇疆 - * - * @author Lion Li - */ - -@Data -@Component -@ConfigurationProperties(prefix = "ruoyi") -public class RuoYiConfig { - - /** - * 椤圭洰鍚嶇О - */ - private String name; - - /** - * 鐗堟湰 - */ - private String version; - - /** - * 鐗堟潈骞翠唤 - */ - private String copyrightYear; - - /** - * 瀹炰緥婕旂ず寮�鍏� - */ - private boolean demoEnabled; - - /** - * 鑾峰彇鍦板潃寮�鍏� - */ - @Getter - private static boolean addressEnabled; - - public void setAddressEnabled(boolean addressEnabled) { - RuoYiConfig.addressEnabled = addressEnabled; - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/ThreadPoolConfig.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/ThreadPoolConfig.java deleted file mode 100644 index e674ce1..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/ThreadPoolConfig.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.xmzs.common.core.config; - -import com.xmzs.common.core.config.properties.ThreadPoolProperties; -import com.xmzs.common.core.utils.Threads; -import org.apache.commons.lang3.concurrent.BasicThreadFactory; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.Bean; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; - -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledThreadPoolExecutor; -import java.util.concurrent.ThreadPoolExecutor; - -/** - * 绾跨▼姹犻厤缃� - * - * @author Lion Li - **/ -@AutoConfiguration -@EnableConfigurationProperties(ThreadPoolProperties.class) -public class ThreadPoolConfig { - - /** - * 鏍稿績绾跨▼鏁� = cpu 鏍稿績鏁� + 1 - */ - private final int core = Runtime.getRuntime().availableProcessors() + 1; - - @Bean(name = "threadPoolTaskExecutor") - @ConditionalOnProperty(prefix = "thread-pool", name = "enabled", havingValue = "true") - public ThreadPoolTaskExecutor threadPoolTaskExecutor(ThreadPoolProperties threadPoolProperties) { - ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); - executor.setCorePoolSize(core); - executor.setMaxPoolSize(core * 2); - executor.setQueueCapacity(threadPoolProperties.getQueueCapacity()); - executor.setKeepAliveSeconds(threadPoolProperties.getKeepAliveSeconds()); - executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); - return executor; - } - - /** - * 鎵ц鍛ㄦ湡鎬ф垨瀹氭椂浠诲姟 - */ - @Bean(name = "scheduledExecutorService") - protected ScheduledExecutorService scheduledExecutorService() { - return new ScheduledThreadPoolExecutor(core, - new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build(), - new ThreadPoolExecutor.CallerRunsPolicy()) { - @Override - protected void afterExecute(Runnable r, Throwable t) { - super.afterExecute(r, t); - Threads.printException(r, t); - } - }; - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/ValidatorConfig.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/ValidatorConfig.java deleted file mode 100644 index a50c9da..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/ValidatorConfig.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.xmzs.common.core.config; - -import jakarta.validation.Validator; -import org.hibernate.validator.HibernateValidator; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.context.MessageSource; -import org.springframework.context.annotation.Bean; -import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; - -import java.util.Properties; - -/** - * 鏍¢獙妗嗘灦閰嶇疆绫� - * - * @author Lion Li - */ -@AutoConfiguration -public class ValidatorConfig { - - /** - * 閰嶇疆鏍¢獙妗嗘灦 蹇�熻繑鍥炴ā寮� - */ - @Bean - public Validator validator(MessageSource messageSource) { - LocalValidatorFactoryBean factoryBean = new LocalValidatorFactoryBean(); - // 鍥介檯鍖� - factoryBean.setValidationMessageSource(messageSource); - // 璁剧疆浣跨敤 HibernateValidator 鏍¢獙鍣� - factoryBean.setProviderClass(HibernateValidator.class); - Properties properties = new Properties(); - // 璁剧疆 蹇�熷紓甯歌繑鍥� - properties.setProperty("hibernate.validator.fail_fast", "true"); - factoryBean.setValidationProperties(properties); - // 鍔犺浇閰嶇疆 - factoryBean.afterPropertiesSet(); - return factoryBean.getValidator(); - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/properties/ThreadPoolProperties.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/properties/ThreadPoolProperties.java deleted file mode 100644 index 50366ac..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/config/properties/ThreadPoolProperties.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.xmzs.common.core.config.properties; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; - -/** - * 绾跨▼姹� 閰嶇疆灞炴�� - * - * @author Lion Li - */ -@Data -@ConfigurationProperties(prefix = "thread-pool") -public class ThreadPoolProperties { - - /** - * 鏄惁寮�鍚嚎绋嬫睜 - */ - private boolean enabled; - - /** - * 闃熷垪鏈�澶ч暱搴� - */ - private int queueCapacity; - - /** - * 绾跨▼姹犵淮鎶ょ嚎绋嬫墍鍏佽鐨勭┖闂叉椂闂� - */ - private int keepAliveSeconds; - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/CacheConstants.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/CacheConstants.java deleted file mode 100644 index 13e0902..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/CacheConstants.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xmzs.common.core.constant; - -/** - * 缂撳瓨鐨刱ey 甯搁噺 - * - * @author Lion Li - */ -public interface CacheConstants { - - /** - * 鍦ㄧ嚎鐢ㄦ埛 redis key - */ - String ONLINE_TOKEN_KEY = "online_tokens:"; - - /** - * 鍙傛暟绠$悊 cache key - */ - String SYS_CONFIG_KEY = "sys_config:"; - - /** - * 瀛楀吀绠$悊 cache key - */ - String SYS_DICT_KEY = "sys_dict:"; - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/CacheNames.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/CacheNames.java deleted file mode 100644 index b9b48d7..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/CacheNames.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.xmzs.common.core.constant; - -/** - * 缂撳瓨缁勫悕绉板父閲� - * <p> - * key 鏍煎紡涓� cacheNames#ttl#maxIdleTime#maxSize - * <p> - * ttl 杩囨湡鏃堕棿 濡傛灉璁剧疆涓�0鍒欎笉杩囨湡 榛樿涓�0 - * maxIdleTime 鏈�澶х┖闂叉椂闂� 鏍规嵁LRU绠楁硶娓呯悊绌洪棽鏁版嵁 濡傛灉璁剧疆涓�0鍒欎笉妫�娴� 榛樿涓�0 - * maxSize 缁勬渶澶ч暱搴� 鏍规嵁LRU绠楁硶娓呯悊婧㈠嚭鏁版嵁 濡傛灉璁剧疆涓�0鍒欐棤闄愰暱 榛樿涓�0 - * <p> - * 渚嬪瓙: test#60s銆乼est#0#60s銆乼est#0#1m#1000銆乼est#1h#0#500 - * - * @author Lion Li - */ -public interface CacheNames { - - /** - * 婕旂ず妗堜緥 - */ - String DEMO_CACHE = "demo:cache#60s#10m#20"; - - /** - * 绯荤粺閰嶇疆 - */ - String SYS_CONFIG = "sys_config"; - - /** - * 鏁版嵁瀛楀吀 - */ - String SYS_DICT = "sys_dict"; - - /** - * 绉熸埛 - */ - String SYS_TENANT = GlobalConstants.GLOBAL_REDIS_KEY + "sys_tenant#30d"; - - /** - * 鐢ㄦ埛璐︽埛 - */ - String SYS_USER_NAME = "sys_user_name#30d"; - - /** - * 閮ㄩ棬 - */ - String SYS_DEPT = "sys_dept#30d"; - - /** - * OSS鍐呭 - */ - String SYS_OSS = "sys_oss#30d"; - - /** - * OSS閰嶇疆 - */ - String SYS_OSS_CONFIG = "sys_oss_config"; - - /** - * 鍦ㄧ嚎鐢ㄦ埛 - */ - String ONLINE_TOKEN = "online_tokens"; - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/Constants.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/Constants.java deleted file mode 100644 index d107f7c..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/Constants.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.xmzs.common.core.constant; - -/** - * 閫氱敤甯搁噺淇℃伅 - * - * @author ruoyi - */ -public interface Constants { - - /** - * UTF-8 瀛楃闆� - */ - String UTF8 = "UTF-8"; - - /** - * GBK 瀛楃闆� - */ - String GBK = "GBK"; - - /** - * www涓诲煙 - */ - String WWW = "www."; - - /** - * http璇锋眰 - */ - String HTTP = "http://"; - - /** - * https璇锋眰 - */ - String HTTPS = "https://"; - - /** - * 閫氱敤鎴愬姛鏍囪瘑 - */ - String SUCCESS = "0"; - - /** - * 閫氱敤澶辫触鏍囪瘑 - */ - String FAIL = "1"; - - /** - * 鐧诲綍鎴愬姛 - */ - String LOGIN_SUCCESS = "Success"; - - /** - * 娉ㄩ攢 - */ - String LOGOUT = "Logout"; - - /** - * 娉ㄥ唽 - */ - String REGISTER = "Register"; - - /** - * 鐧诲綍澶辫触 - */ - String LOGIN_FAIL = "Error"; - - /** - * 楠岃瘉鐮佹湁鏁堟湡锛堝垎閽燂級 - */ - Integer CAPTCHA_EXPIRATION = 20; - - /** - * 浠ょ墝 - */ - String TOKEN = "token"; - - /** - * 椤剁骇閮ㄩ棬id - */ - Long TOP_PARENT_ID = 0L; - - /** - * 榛樿绉熸埛ID - **/ - String TENANT_ID = "00000"; - -} - diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/GlobalConstants.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/GlobalConstants.java deleted file mode 100644 index adedb2a..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/GlobalConstants.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.xmzs.common.core.constant; - -/** - * 鍏ㄥ眬鐨刱ey甯搁噺 (涓氬姟鏃犲叧鐨刱ey) - * - * @author Lion Li - */ -public interface GlobalConstants { - - /** - * 鍏ㄥ眬 redis key (涓氬姟鏃犲叧鐨刱ey) - */ - String GLOBAL_REDIS_KEY = "global:"; - - /** - * 楠岃瘉鐮� redis key - */ - String CAPTCHA_CODE_KEY = GLOBAL_REDIS_KEY + "captcha_codes:"; - - /** - * 闃查噸鎻愪氦 redis key - */ - String REPEAT_SUBMIT_KEY = GLOBAL_REDIS_KEY + "repeat_submit:"; - - /** - * 闄愭祦 redis key - */ - String RATE_LIMIT_KEY = GLOBAL_REDIS_KEY + "rate_limit:"; - - /** - * 鐧诲綍璐︽埛瀵嗙爜閿欒娆℃暟 redis key - */ - String PWD_ERR_CNT_KEY = GLOBAL_REDIS_KEY + "pwd_err_cnt:"; -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/HttpStatus.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/HttpStatus.java deleted file mode 100644 index 7e263c3..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/HttpStatus.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.xmzs.common.core.constant; - -/** - * 杩斿洖鐘舵�佺爜 - * - * @author Lion Li - */ -public interface HttpStatus { - /** - * 鎿嶄綔鎴愬姛 - */ - int SUCCESS = 200; - - /** - * 瀵硅薄鍒涘缓鎴愬姛 - */ - int CREATED = 201; - - /** - * 璇锋眰宸茬粡琚帴鍙� - */ - int ACCEPTED = 202; - - /** - * 鎿嶄綔宸茬粡鎵ц鎴愬姛锛屼絾鏄病鏈夎繑鍥炴暟鎹� - */ - int NO_CONTENT = 204; - - /** - * 璧勬簮宸茶绉婚櫎 - */ - int MOVED_PERM = 301; - - /** - * 閲嶅畾鍚� - */ - int SEE_OTHER = 303; - - /** - * 璧勬簮娌℃湁琚慨鏀� - */ - int NOT_MODIFIED = 304; - - /** - * 鍙傛暟鍒楄〃閿欒锛堢己灏戯紝鏍煎紡涓嶅尮閰嶏級 - */ - int BAD_REQUEST = 400; - - /** - * 鏈巿鏉� - */ - int UNAUTHORIZED = 401; - - /** - * 璁块棶鍙楅檺锛屾巿鏉冭繃鏈� - */ - int FORBIDDEN = 403; - - /** - * 璧勬簮锛屾湇鍔℃湭鎵惧埌 - */ - int NOT_FOUND = 404; - - /** - * 涓嶅厑璁哥殑http鏂规硶 - */ - int BAD_METHOD = 405; - - /** - * 璧勬簮鍐茬獊锛屾垨鑰呰祫婧愯閿� - */ - int CONFLICT = 409; - - /** - * 涓嶆敮鎸佺殑鏁版嵁锛屽獟浣撶被鍨� - */ - int UNSUPPORTED_TYPE = 415; - - /** - * 绯荤粺鍐呴儴閿欒 - */ - int ERROR = 500; - - /** - * 鎺ュ彛鏈疄鐜� - */ - int NOT_IMPLEMENTED = 501; - - /** - * 绯荤粺璀﹀憡娑堟伅 - */ - int WARN = 601; -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/TenantConstants.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/TenantConstants.java deleted file mode 100644 index 0c54462..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/TenantConstants.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.xmzs.common.core.constant; - -/** - * 绉熸埛甯搁噺淇℃伅 - * - * @author Lion Li - */ -public interface TenantConstants { - - /** - * 绉熸埛姝e父鐘舵�� - */ - String NORMAL = "0"; - - /** - * 绉熸埛灏佺鐘舵�� - */ - String DISABLE = "1"; - - /** - * 瓒呯骇绠$悊鍛業D - */ - Long SUPER_ADMIN_ID = 1L; - - /** - * 瓒呯骇绠$悊鍛樿鑹� roleKey - */ - String SUPER_ADMIN_ROLE_KEY = "superadmin"; - - /** - * 绉熸埛绠$悊鍛樿鑹� roleKey - */ - String TENANT_ADMIN_ROLE_KEY = "admin"; - - /** - * 绉熸埛绠$悊鍛樿鑹插悕绉� - */ - String TENANT_ADMIN_ROLE_NAME = "绠$悊鍛�"; - - /** - * 榛樿绉熸埛ID - */ - String DEFAULT_TENANT_ID = "000000"; - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/UserConstants.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/UserConstants.java deleted file mode 100644 index 5eb5a9d..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/constant/UserConstants.java +++ /dev/null @@ -1,132 +0,0 @@ -package com.xmzs.common.core.constant; - -/** - * 鐢ㄦ埛甯搁噺淇℃伅 - * - * @author ruoyi - */ -public interface UserConstants { - - /** - * 骞冲彴鍐呯郴缁熺敤鎴风殑鍞竴鏍囧織 - */ - String SYS_USER = "SYS_USER"; - - /** - * 姝e父鐘舵�� - */ - String NORMAL = "0"; - - /** - * 寮傚父鐘舵�� - */ - String EXCEPTION = "1"; - - /** - * 鐢ㄦ埛姝e父鐘舵�� - */ - String USER_NORMAL = "0"; - - /** - * 鐢ㄦ埛灏佺鐘舵�� - */ - String USER_DISABLE = "1"; - - /** - * 瑙掕壊姝e父鐘舵�� - */ - String ROLE_NORMAL = "0"; - - /** - * 瑙掕壊灏佺鐘舵�� - */ - String ROLE_DISABLE = "1"; - - /** - * 閮ㄩ棬姝e父鐘舵�� - */ - String DEPT_NORMAL = "0"; - - /** - * 閮ㄩ棬鍋滅敤鐘舵�� - */ - String DEPT_DISABLE = "1"; - - /** - * 瀛楀吀姝e父鐘舵�� - */ - String DICT_NORMAL = "0"; - - /** - * 鏄惁涓虹郴缁熼粯璁わ紙鏄級 - */ - String YES = "Y"; - - /** - * 鏄惁鑿滃崟澶栭摼锛堟槸锛� - */ - String YES_FRAME = "0"; - - /** - * 鏄惁鑿滃崟澶栭摼锛堝惁锛� - */ - String NO_FRAME = "1"; - - /** - * 鑿滃崟姝e父鐘舵�� - */ - String MENU_NORMAL = "0"; - - /** - * 鑿滃崟鍋滅敤鐘舵�� - */ - String MENU_DISABLE = "1"; - - /** - * 鑿滃崟绫诲瀷锛堢洰褰曪級 - */ - String TYPE_DIR = "M"; - - /** - * 鑿滃崟绫诲瀷锛堣彍鍗曪級 - */ - String TYPE_MENU = "C"; - - /** - * 鑿滃崟绫诲瀷锛堟寜閽級 - */ - String TYPE_BUTTON = "F"; - - /** - * Layout缁勪欢鏍囪瘑 - */ - String LAYOUT = "Layout"; - - /** - * ParentView缁勪欢鏍囪瘑 - */ - String PARENT_VIEW = "ParentView"; - - /** - * InnerLink缁勪欢鏍囪瘑 - */ - String INNER_LINK = "InnerLink"; - - /** - * 鐢ㄦ埛鍚嶉暱搴﹂檺鍒� - */ - int USERNAME_MIN_LENGTH = 2; - int USERNAME_MAX_LENGTH = 100; - - /** - * 瀵嗙爜闀垮害闄愬埗 - */ - int PASSWORD_MIN_LENGTH = 5; - int PASSWORD_MAX_LENGTH = 20; - - /** - * 瓒呯骇绠$悊鍛業D - */ - Long SUPER_ADMIN_ID = 1L; - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/R.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/R.java deleted file mode 100644 index e614a86..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/R.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.xmzs.common.core.domain; - -import com.xmzs.common.core.constant.HttpStatus; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serial; -import java.io.Serializable; - -/** - * 鍝嶅簲淇℃伅涓讳綋 - * - * @author Lion Li - */ -@Data -@NoArgsConstructor -public class R<T> implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 鎴愬姛 - */ - public static final int SUCCESS = 200; - - /** - * 澶辫触 - */ - public static final int FAIL = 500; - - private int code; - - private String msg; - - private T data; - - public static <T> R<T> ok() { - return restResult(null, SUCCESS, "鎿嶄綔鎴愬姛"); - } - - public static <T> R<T> ok(T data) { - return restResult(data, SUCCESS, "鎿嶄綔鎴愬姛"); - } - - public static <T> R<T> ok(String msg) { - return restResult(null, SUCCESS, msg); - } - - public static <T> R<T> ok(String msg, T data) { - return restResult(data, SUCCESS, msg); - } - - public static <T> R<T> fail() { - return restResult(null, FAIL, "鎿嶄綔澶辫触"); - } - - public static <T> R<T> fail(String msg) { - return restResult(null, FAIL, msg); - } - - public static <T> R<T> fail(T data) { - return restResult(data, FAIL, "鎿嶄綔澶辫触"); - } - - public static <T> R<T> fail(String msg, T data) { - return restResult(data, FAIL, msg); - } - - public static <T> R<T> fail(int code, String msg) { - return restResult(null, code, msg); - } - - /** - * 杩斿洖璀﹀憡娑堟伅 - * - * @param msg 杩斿洖鍐呭 - * @return 璀﹀憡娑堟伅 - */ - public static <T> R<T> warn(String msg) { - return restResult(null, HttpStatus.WARN, msg); - } - - /** - * 杩斿洖璀﹀憡娑堟伅 - * - * @param msg 杩斿洖鍐呭 - * @param data 鏁版嵁瀵硅薄 - * @return 璀﹀憡娑堟伅 - */ - public static <T> R<T> warn(String msg, T data) { - return restResult(data, HttpStatus.WARN, msg); - } - - private static <T> R<T> restResult(T data, int code, String msg) { - R<T> r = new R<>(); - r.setCode(code); - r.setData(data); - r.setMsg(msg); - return r; - } - - public static <T> Boolean isError(R<T> ret) { - return !isSuccess(ret); - } - - public static <T> Boolean isSuccess(R<T> ret) { - return R.SUCCESS == ret.getCode(); - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/dto/RoleDTO.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/dto/RoleDTO.java deleted file mode 100644 index 3271373..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/dto/RoleDTO.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.xmzs.common.core.domain.dto; - -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serializable; - -/** - * 瑙掕壊 - * - * @author Lion Li - */ - -@Data -@NoArgsConstructor -public class RoleDTO implements Serializable { - - /** - * 瑙掕壊ID - */ - private Long roleId; - - /** - * 瑙掕壊鍚嶇О - */ - private String roleName; - - /** - * 瑙掕壊鏉冮檺 - */ - private String roleKey; - - /** - * 鏁版嵁鑼冨洿锛�1锛氭墍鏈夋暟鎹潈闄愶紱2锛氳嚜瀹氫箟鏁版嵁鏉冮檺锛�3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺锛�4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶紱5锛氫粎鏈汉鏁版嵁鏉冮檺锛� - */ - private String dataScope; - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/dto/UserOnlineDTO.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/dto/UserOnlineDTO.java deleted file mode 100644 index deea41d..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/dto/UserOnlineDTO.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.xmzs.common.core.domain.dto; - -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serial; -import java.io.Serializable; - -/** - * 褰撳墠鍦ㄧ嚎浼氳瘽 - * - * @author ruoyi - */ - -@Data -@NoArgsConstructor -public class UserOnlineDTO implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 浼氳瘽缂栧彿 - */ - private String tokenId; - - /** - * 閮ㄩ棬鍚嶇О - */ - private String deptName; - - /** - * 鐢ㄦ埛鍚嶇О - */ - private String userName; - - /** - * 鐧诲綍IP鍦板潃 - */ - private String ipaddr; - - /** - * 鐧诲綍鍦板潃 - */ - private String loginLocation; - - /** - * 娴忚鍣ㄧ被鍨� - */ - private String browser; - - /** - * 鎿嶄綔绯荤粺 - */ - private String os; - - /** - * 鐧诲綍鏃堕棿 - */ - private Long loginTime; - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/EmailLoginBody.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/EmailLoginBody.java deleted file mode 100644 index 1c5553c..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/EmailLoginBody.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.xmzs.common.core.domain.model; - -import jakarta.validation.constraints.Email; -import jakarta.validation.constraints.NotBlank; -import lombok.Data; - -/** - * 鐭俊鐧诲綍瀵硅薄 - * - * @author Lion Li - */ - -@Data -public class EmailLoginBody { - - /** - * 绉熸埛ID - */ - @NotBlank(message = "{tenant.number.not.blank}") - private String tenantId; - - /** - * 閭 - */ - @NotBlank(message = "{user.email.not.blank}") - @Email(message = "{user.email.not.valid}") - private String email; - - /** - * 閭code - */ - @NotBlank(message = "{email.code.not.blank}") - private String emailCode; - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/LoginBody.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/LoginBody.java deleted file mode 100644 index c36905c..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/LoginBody.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.xmzs.common.core.domain.model; - -import com.xmzs.common.core.constant.UserConstants; -import lombok.Data; -import org.hibernate.validator.constraints.Length; - -import jakarta.validation.constraints.NotBlank; - -/** - * 鐢ㄦ埛鐧诲綍瀵硅薄 - * - * @author Lion Li - */ - -@Data -public class LoginBody { - - /** - * 绉熸埛ID - */ - private String tenantId; - - /** - * 鐢ㄦ埛鍚� - */ - @NotBlank(message = "{user.username.not.blank}") - // @Length(min = UserConstants.USERNAME_MIN_LENGTH, max = UserConstants.USERNAME_MAX_LENGTH, message = "{user.username.length.valid}") - private String username; - - /** - * 鐢ㄦ埛瀵嗙爜 - */ - @NotBlank(message = "{user.password.not.blank}") - // @Length(min = UserConstants.PASSWORD_MIN_LENGTH, max = UserConstants.PASSWORD_MAX_LENGTH, message = "{user.password.length.valid}") - private String password; - - /** - * 楠岃瘉鐮� - */ - private String code; - - /** - * 鍞竴鏍囪瘑 - */ - private String uuid; - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/LoginUser.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/LoginUser.java deleted file mode 100644 index 9fd909b..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/LoginUser.java +++ /dev/null @@ -1,133 +0,0 @@ -package com.xmzs.common.core.domain.model; - -import com.xmzs.common.core.domain.dto.RoleDTO; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serial; -import java.io.Serializable; -import java.util.List; -import java.util.Set; - -/** - * 鐧诲綍鐢ㄦ埛韬唤鏉冮檺 - * - * @author Lion Li - */ - -@Data -@NoArgsConstructor -public class LoginUser implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 绉熸埛ID - */ - private String tenantId; - - /** - * 鐢ㄦ埛ID - */ - private Long userId; - - /** - * 閮ㄩ棬ID - */ - private Long deptId; - - /** - * 閮ㄩ棬鍚� - */ - private String deptName; - - /** - * 鐢ㄦ埛鍞竴鏍囪瘑 - */ - private String token; - - /** - * 鐢ㄦ埛绫诲瀷 - */ - private String userType; - - /** - * 鐧诲綍鏃堕棿 - */ - private Long loginTime; - - /** - * 杩囨湡鏃堕棿 - */ - private Long expireTime; - - /** - * 鐧诲綍IP鍦板潃 - */ - private String ipaddr; - - /** - * 鐧诲綍鍦扮偣 - */ - private String loginLocation; - - /** - * 娴忚鍣ㄧ被鍨� - */ - private String browser; - - /** - * 鎿嶄綔绯荤粺 - */ - private String os; - - /** - * 鑿滃崟鏉冮檺 - */ - private Set<String> menuPermission; - - /** - * 瑙掕壊鏉冮檺 - */ - private Set<String> rolePermission; - - /** - * 鐢ㄦ埛鍚� - */ - private String username; - - /** - * 鐢ㄦ埛鍚� - */ - private String nickName; - - /** - * 寰俊澶村儚 - */ - private String avatar; - - /** - * 瑙掕壊瀵硅薄 - */ - private List<RoleDTO> roles; - - /** - * 鏁版嵁鏉冮檺 褰撳墠瑙掕壊ID - */ - private Long roleId; - - /** - * 鑾峰彇鐧诲綍id - */ - public String getLoginId() { - if (userType == null) { - throw new IllegalArgumentException("鐢ㄦ埛绫诲瀷涓嶈兘涓虹┖"); - } - if (userId == null) { - throw new IllegalArgumentException("鐢ㄦ埛ID涓嶈兘涓虹┖"); - } - return userType + ":" + userId; - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/RegisterBody.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/RegisterBody.java deleted file mode 100644 index cb6ef6a..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/RegisterBody.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.xmzs.common.core.domain.model; - -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 鐢ㄦ埛娉ㄥ唽瀵硅薄 - * - * @author Lion Li - */ -@Data -@EqualsAndHashCode(callSuper = true) -public class RegisterBody extends LoginBody { - - private String userType; - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/SmsLoginBody.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/SmsLoginBody.java deleted file mode 100644 index 818098d..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/SmsLoginBody.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.xmzs.common.core.domain.model; - -import lombok.Data; - -import jakarta.validation.constraints.NotBlank; - -/** - * 鐭俊鐧诲綍瀵硅薄 - * - * @author Lion Li - */ - -@Data -public class SmsLoginBody { - - /** - * 绉熸埛ID - */ - @NotBlank(message = "{tenant.number.not.blank}") - private String tenantId; - - /** - * 鎵嬫満鍙� - */ - @NotBlank(message = "{user.phonenumber.not.blank}") - private String phonenumber; - - /** - * 鐭俊code - */ - @NotBlank(message = "{sms.code.not.blank}") - private String smsCode; - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/VisitorLoginBody.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/VisitorLoginBody.java deleted file mode 100644 index 94564b1..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/VisitorLoginBody.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xmzs.common.core.domain.model; - -import lombok.Data; - -import java.io.Serial; - -/** - * 娓稿鐧诲綍鐢ㄦ埛韬唤鏉冮檺 - * - * @author Lion Li - */ -@Data -public class VisitorLoginBody { - - @Serial - private static final long serialVersionUID = 1L; - - private String code; - - /** - * 鐧诲綍绫诲瀷(1.灏忕▼搴忚瀹� 2.pc璁垮) - */ - private String type; - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/VisitorLoginUser.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/VisitorLoginUser.java deleted file mode 100644 index e346a4a..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/domain/model/VisitorLoginUser.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.xmzs.common.core.domain.model; - -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; - -import java.io.Serial; - -/** - * 灏忕▼搴忕櫥褰曠敤鎴疯韩浠芥潈闄� - * - * @author Lion Li - */ -@Data -@EqualsAndHashCode(callSuper = true) -@NoArgsConstructor -public class VisitorLoginUser extends LoginUser { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * openid - */ - private String openid; - - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/DeviceType.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/DeviceType.java deleted file mode 100644 index be89988..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/DeviceType.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.xmzs.common.core.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 璁惧绫诲瀷 - * 閽堝涓�濂� 鐢ㄦ埛浣撶郴 - * - * @author Lion Li - */ -@Getter -@AllArgsConstructor -public enum DeviceType { - - /** - * pc绔� - */ - PC("pc"), - - /** - * app绔� - */ - APP("app"), - - /** - * 灏忕▼搴忕 - */ - XCX("xcx"); - - private final String device; -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/LoginType.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/LoginType.java deleted file mode 100644 index ec123eb..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/LoginType.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.xmzs.common.core.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 鐧诲綍绫诲瀷 - * - * @author Lion Li - */ -@Getter -@AllArgsConstructor -public enum LoginType { - - /** - * 瀵嗙爜鐧诲綍 - */ - PASSWORD("user.password.retry.limit.exceed", "user.password.retry.limit.count"), - - /** - * 鐭俊鐧诲綍 - */ - SMS("sms.code.retry.limit.exceed", "sms.code.retry.limit.count"), - - /** - * 閭鐧诲綍 - */ - EMAIL("email.code.retry.limit.exceed", "email.code.retry.limit.count"), - - /** - * 灏忕▼搴忕櫥褰� - */ - XCX("", ""); - - /** - * 鐧诲綍閲嶈瘯瓒呭嚭闄愬埗鎻愮ず - */ - final String retryLimitExceed; - - /** - * 鐧诲綍閲嶈瘯闄愬埗璁℃暟鎻愮ず - */ - final String retryLimitCount; -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/LoginUserType.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/LoginUserType.java deleted file mode 100644 index e0753ed..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/LoginUserType.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.common.core.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 娓稿鐧诲綍绫诲瀷 - * - * @author Lion Li - */ -@Getter -@AllArgsConstructor -public enum LoginUserType { - - PC("1", "PC绔敤鎴�"), - - XCX("2", "灏忕▼搴忕敤鎴�"); - - private final String code; - private final String content; -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/TenantStatus.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/TenantStatus.java deleted file mode 100644 index 7e7050e..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/TenantStatus.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.xmzs.common.core.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 鐢ㄦ埛鐘舵�� - * - * @author LionLi - */ -@Getter -@AllArgsConstructor -public enum TenantStatus { - /** - * 姝e父 - */ - OK("0", "姝e父"), - /** - * 鍋滅敤 - */ - DISABLE("1", "鍋滅敤"), - /** - * 鍒犻櫎 - */ - DELETED("2", "鍒犻櫎"); - - private final String code; - private final String info; - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/UserStatus.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/UserStatus.java deleted file mode 100644 index 16fe3bc..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/UserStatus.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.xmzs.common.core.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 鐢ㄦ埛鐘舵�� - * - * @author ruoyi - */ -@Getter -@AllArgsConstructor -public enum UserStatus { - /** - * 姝e父 - */ - OK("0", "姝e父"), - /** - * 鍋滅敤 - */ - DISABLE("1", "鍋滅敤"), - /** - * 鍒犻櫎 - */ - DELETED("2", "鍒犻櫎"); - - private final String code; - private final String info; - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/UserType.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/UserType.java deleted file mode 100644 index 6ebfba7..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/enums/UserType.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.xmzs.common.core.enums; - -import com.xmzs.common.core.utils.StringUtils; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 璁惧绫诲瀷 - * 閽堝澶氬 鐢ㄦ埛浣撶郴 - * - * @author Lion Li - */ -@Getter -@AllArgsConstructor -public enum UserType { - - /** - * pc绔� - */ - SYS_USER("sys_user"), - - /** - * app绔� - */ - APP_USER("app_user"); - - private final String userType; - - public static UserType getUserType(String str) { - for (UserType value : values()) { - if (StringUtils.contains(str, value.getUserType())) { - return value; - } - } - throw new RuntimeException("'UserType' not found By " + str); - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/DemoModeException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/DemoModeException.java deleted file mode 100644 index 063bb4e..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/DemoModeException.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.xmzs.common.core.exception; - -import java.io.Serial; - -/** - * 婕旂ず妯″紡寮傚父 - * - * @author ruoyi - */ -public class DemoModeException extends RuntimeException { - - @Serial - private static final long serialVersionUID = 1L; - - public DemoModeException() { - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/GlobalException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/GlobalException.java deleted file mode 100644 index 0b5ef2a..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/GlobalException.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.xmzs.common.core.exception; - -import java.io.Serial; - -/** - * 鍏ㄥ眬寮傚父 - * - * @author ruoyi - */ -public class GlobalException extends RuntimeException { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 閿欒鎻愮ず - */ - private String message; - - /** - * 閿欒鏄庣粏锛屽唴閮ㄨ皟璇曢敊璇� - */ - private String detailMessage; - - /** - * 绌烘瀯閫犳柟娉曪紝閬垮厤鍙嶅簭鍒楀寲闂 - */ - public GlobalException() { - } - - public GlobalException(String message) { - this.message = message; - } - - public String getDetailMessage() { - return detailMessage; - } - - public GlobalException setDetailMessage(String detailMessage) { - this.detailMessage = detailMessage; - return this; - } - - @Override - public String getMessage() { - return message; - } - - public GlobalException setMessage(String message) { - this.message = message; - return this; - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/ServiceException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/ServiceException.java deleted file mode 100644 index ff85efb..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/ServiceException.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.xmzs.common.core.exception; - -import java.io.Serial; - -/** - * 涓氬姟寮傚父 - * - * @author ruoyi - */ -public final class ServiceException extends RuntimeException { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 閿欒鐮� - */ - private Integer code; - - /** - * 閿欒鎻愮ず - */ - private String message; - - /** - * 閿欒鏄庣粏锛屽唴閮ㄨ皟璇曢敊璇� - */ - private String detailMessage; - - /** - * 绌烘瀯閫犳柟娉曪紝閬垮厤鍙嶅簭鍒楀寲闂 - */ - public ServiceException() { - } - - public ServiceException(String message) { - this.message = message; - } - - public ServiceException(String message, Integer code) { - this.message = message; - this.code = code; - } - - public String getDetailMessage() { - return detailMessage; - } - - @Override - public String getMessage() { - return message; - } - - public Integer getCode() { - return code; - } - - public ServiceException setMessage(String message) { - this.message = message; - return this; - } - - public ServiceException setDetailMessage(String detailMessage) { - this.detailMessage = detailMessage; - return this; - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/UtilException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/UtilException.java deleted file mode 100644 index e245536..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/UtilException.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xmzs.common.core.exception; - -import java.io.Serial; - -/** - * 宸ュ叿绫诲紓甯� - * - * @author ruoyi - */ -public class UtilException extends RuntimeException { - - @Serial - private static final long serialVersionUID = 8247610319171014183L; - - public UtilException(Throwable e) { - super(e.getMessage(), e); - } - - public UtilException(String message) { - super(message); - } - - public UtilException(String message, Throwable throwable) { - super(message, throwable); - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/base/BaseException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/base/BaseException.java deleted file mode 100644 index a92efa8..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/base/BaseException.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.xmzs.common.core.exception.base; - -import com.xmzs.common.core.utils.MessageUtils; -import com.xmzs.common.core.utils.StringUtils; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; - -import java.io.Serial; - -/** - * 鍩虹寮傚父 - * - * @author ruoyi - */ -@Data -@EqualsAndHashCode(callSuper = true) -@NoArgsConstructor -public class BaseException extends RuntimeException { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 鎵�灞炴ā鍧� - */ - private String module; - - /** - * 閿欒鐮� - */ - private String code; - - /** - * 閿欒鐮佸搴旂殑鍙傛暟 - */ - private Object[] args; - - /** - * 閿欒娑堟伅 - */ - private String defaultMessage; - - public BaseException(String module, String code, Object[] args, String defaultMessage) { - this.module = module; - this.code = code; - this.args = args; - this.defaultMessage = defaultMessage; - } - - public BaseException(String module, String code, Object[] args) { - this(module, code, args, null); - } - - public BaseException(String module, String defaultMessage) { - this(module, null, null, defaultMessage); - } - - public BaseException(String code, Object[] args) { - this(null, code, args, null); - } - - public BaseException(String defaultMessage) { - this(null, null, null, defaultMessage); - } - - @Override - public String getMessage() { - String message = null; - if (!StringUtils.isEmpty(code)) { - message = MessageUtils.message(code, args); - } - if (message == null) { - message = defaultMessage; - } - return message; - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/file/FileException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/file/FileException.java deleted file mode 100644 index eb55999..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/file/FileException.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.common.core.exception.file; - -import com.xmzs.common.core.exception.base.BaseException; - -import java.io.Serial; - -/** - * 鏂囦欢淇℃伅寮傚父绫� - * - * @author ruoyi - */ -public class FileException extends BaseException { - - @Serial - private static final long serialVersionUID = 1L; - - public FileException(String code, Object[] args) { - super("file", code, args, null); - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/file/FileNameLengthLimitExceededException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/file/FileNameLengthLimitExceededException.java deleted file mode 100644 index 905883f..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/file/FileNameLengthLimitExceededException.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.common.core.exception.file; - -import java.io.Serial; - -/** - * 鏂囦欢鍚嶇О瓒呴暱闄愬埗寮傚父绫� - * - * @author ruoyi - */ -public class FileNameLengthLimitExceededException extends FileException { - - @Serial - private static final long serialVersionUID = 1L; - - public FileNameLengthLimitExceededException(int defaultFileNameLength) { - super("upload.filename.exceed.length", new Object[]{defaultFileNameLength}); - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/file/FileSizeLimitExceededException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/file/FileSizeLimitExceededException.java deleted file mode 100644 index f39046e..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/file/FileSizeLimitExceededException.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.common.core.exception.file; - -import java.io.Serial; - -/** - * 鏂囦欢鍚嶅ぇ灏忛檺鍒跺紓甯哥被 - * - * @author ruoyi - */ -public class FileSizeLimitExceededException extends FileException { - - @Serial - private static final long serialVersionUID = 1L; - - public FileSizeLimitExceededException(long defaultMaxSize) { - super("upload.exceed.maxSize", new Object[]{defaultMaxSize}); - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/user/CaptchaException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/user/CaptchaException.java deleted file mode 100644 index 1a4b885..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/user/CaptchaException.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.common.core.exception.user; - -import java.io.Serial; - -/** - * 楠岃瘉鐮侀敊璇紓甯哥被 - * - * @author ruoyi - */ -public class CaptchaException extends UserException { - - @Serial - private static final long serialVersionUID = 1L; - - public CaptchaException() { - super("user.jcaptcha.error"); - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/user/CaptchaExpireException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/user/CaptchaExpireException.java deleted file mode 100644 index 5b7193f..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/user/CaptchaExpireException.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.common.core.exception.user; - -import java.io.Serial; - -/** - * 楠岃瘉鐮佸け鏁堝紓甯哥被 - * - * @author ruoyi - */ -public class CaptchaExpireException extends UserException { - - @Serial - private static final long serialVersionUID = 1L; - - public CaptchaExpireException() { - super("user.jcaptcha.expire"); - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/user/UserException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/user/UserException.java deleted file mode 100644 index 43c4b73..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/user/UserException.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.xmzs.common.core.exception.user; - -import com.xmzs.common.core.exception.base.BaseException; - -import java.io.Serial; - -/** - * 鐢ㄦ埛淇℃伅寮傚父绫� - * - * @author ruoyi - */ -public class UserException extends BaseException { - - @Serial - private static final long serialVersionUID = 1L; - - public UserException(String code, Object... args) { - super("user", code, args, null); - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/user/UserPasswordNotMatchException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/user/UserPasswordNotMatchException.java deleted file mode 100644 index 12970b0..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/user/UserPasswordNotMatchException.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.common.core.exception.user; - -import java.io.Serial; - -/** - * 鐢ㄦ埛瀵嗙爜涓嶆纭垨涓嶇鍚堣鑼冨紓甯哥被 - * - * @author ruoyi - */ -public class UserPasswordNotMatchException extends UserException { - - @Serial - private static final long serialVersionUID = 1L; - - public UserPasswordNotMatchException() { - super("user.password.not.match"); - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/user/UserPasswordRetryLimitExceedException.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/user/UserPasswordRetryLimitExceedException.java deleted file mode 100644 index 80f3674..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/exception/user/UserPasswordRetryLimitExceedException.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.xmzs.common.core.exception.user; - -import java.io.Serial; - -/** - * 鐢ㄦ埛閿欒鏈�澶ф鏁板紓甯哥被 - * - * @author ruoyi - */ -public class UserPasswordRetryLimitExceedException extends UserException { - - @Serial - private static final long serialVersionUID = 1L; - - public UserPasswordRetryLimitExceedException(int retryLimitCount, int lockTime) { - super("user.password.retry.limit.exceed", retryLimitCount, lockTime); - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/manager/ShutdownManager.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/manager/ShutdownManager.java deleted file mode 100644 index 9773f28..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/manager/ShutdownManager.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.xmzs.common.core.manager; - -import com.xmzs.common.core.utils.Threads; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Component; - -import jakarta.annotation.PreDestroy; -import java.util.concurrent.ScheduledExecutorService; - -/** - * 纭繚搴旂敤閫�鍑烘椂鑳藉叧闂悗鍙扮嚎绋� - * - * @author Lion Li - */ -@Slf4j -@Component -public class ShutdownManager { - - @Autowired - @Qualifier("scheduledExecutorService") - private ScheduledExecutorService scheduledExecutorService; - - @PreDestroy - public void destroy() { - shutdownAsyncManager(); - } - - /** - * 鍋滄寮傛鎵ц浠诲姟 - */ - private void shutdownAsyncManager() { - try { - log.info("====鍏抽棴鍚庡彴浠诲姟浠诲姟绾跨▼姹�===="); - Threads.shutdownAndAwaitTermination(scheduledExecutorService); - } catch (Exception e) { - log.error(e.getMessage(), e); - } - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/service/ConfigService.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/service/ConfigService.java deleted file mode 100644 index e8d9eac..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/service/ConfigService.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.common.core.service; - -/** - * 閫氱敤 鍙傛暟閰嶇疆鏈嶅姟 - * - * @author Lion Li - */ -public interface ConfigService { - - /** - * 鏍规嵁鍙傛暟 key 鑾峰彇鍙傛暟鍊� - * - * @param configKey 鍙傛暟 key - * @return 鍙傛暟鍊� - */ - String getConfigValue(String configKey); - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/service/DeptService.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/service/DeptService.java deleted file mode 100644 index 74be3b5..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/service/DeptService.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.common.core.service; - -/** - * 閫氱敤 閮ㄩ棬鏈嶅姟 - * - * @author Lion Li - */ -public interface DeptService { - - /** - * 閫氳繃閮ㄩ棬ID鏌ヨ閮ㄩ棬鍚嶇О - * - * @param deptIds 閮ㄩ棬ID涓查�楀彿鍒嗛殧 - * @return 閮ㄩ棬鍚嶇О涓查�楀彿鍒嗛殧 - */ - String selectDeptNameByIds(String deptIds); - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/service/DictService.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/service/DictService.java deleted file mode 100644 index 8716ccf..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/service/DictService.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.xmzs.common.core.service; - -/** - * 閫氱敤 瀛楀吀鏈嶅姟 - * - * @author Lion Li - */ -public interface DictService { - - /** - * 鍒嗛殧绗� - */ - String SEPARATOR = ","; - - /** - * 鏍规嵁瀛楀吀绫诲瀷鍜屽瓧鍏稿�艰幏鍙栧瓧鍏告爣绛� - * - * @param dictType 瀛楀吀绫诲瀷 - * @param dictValue 瀛楀吀鍊� - * @return 瀛楀吀鏍囩 - */ - default String getDictLabel(String dictType, String dictValue) { - return getDictLabel(dictType, dictValue, SEPARATOR); - } - - /** - * 鏍规嵁瀛楀吀绫诲瀷鍜屽瓧鍏告爣绛捐幏鍙栧瓧鍏稿�� - * - * @param dictType 瀛楀吀绫诲瀷 - * @param dictLabel 瀛楀吀鏍囩 - * @return 瀛楀吀鍊� - */ - default String getDictValue(String dictType, String dictLabel) { - return getDictValue(dictType, dictLabel, SEPARATOR); - } - - /** - * 鏍规嵁瀛楀吀绫诲瀷鍜屽瓧鍏稿�艰幏鍙栧瓧鍏告爣绛� - * - * @param dictType 瀛楀吀绫诲瀷 - * @param dictValue 瀛楀吀鍊� - * @param separator 鍒嗛殧绗� - * @return 瀛楀吀鏍囩 - */ - String getDictLabel(String dictType, String dictValue, String separator); - - /** - * 鏍规嵁瀛楀吀绫诲瀷鍜屽瓧鍏告爣绛捐幏鍙栧瓧鍏稿�� - * - * @param dictType 瀛楀吀绫诲瀷 - * @param dictLabel 瀛楀吀鏍囩 - * @param separator 鍒嗛殧绗� - * @return 瀛楀吀鍊� - */ - String getDictValue(String dictType, String dictLabel, String separator); - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/service/OssService.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/service/OssService.java deleted file mode 100644 index f3524aa..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/service/OssService.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.common.core.service; - -/** - * 閫氱敤 OSS鏈嶅姟 - * - * @author Lion Li - */ -public interface OssService { - - /** - * 閫氳繃ossId鏌ヨ瀵瑰簲鐨剈rl - * - * @param ossIds ossId涓查�楀彿鍒嗛殧 - * @return url涓查�楀彿鍒嗛殧 - */ - String selectUrlByIds(String ossIds); - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/service/UserService.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/service/UserService.java deleted file mode 100644 index 3bd2de5..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/service/UserService.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.common.core.service; - -/** - * 閫氱敤 鐢ㄦ埛鏈嶅姟 - * - * @author Lion Li - */ -public interface UserService { - - /** - * 閫氳繃鐢ㄦ埛ID鏌ヨ鐢ㄦ埛璐︽埛 - * - * @param userId 鐢ㄦ埛ID - * @return 鐢ㄦ埛璐︽埛 - */ - String selectUserNameById(Long userId); - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/DateUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/DateUtils.java deleted file mode 100644 index 35718db..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/DateUtils.java +++ /dev/null @@ -1,168 +0,0 @@ -package com.xmzs.common.core.utils; - -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import org.apache.commons.lang3.time.DateFormatUtils; - -import java.lang.management.ManagementFactory; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.time.LocalTime; -import java.time.ZoneId; -import java.time.ZonedDateTime; -import java.util.Date; - -/** - * 鏃堕棿宸ュ叿绫� - * - * @author ruoyi - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class DateUtils extends org.apache.commons.lang3.time.DateUtils { - - public static final String YYYY = "yyyy"; - - public static final String YYYY_MM = "yyyy-MM"; - - public static final String YYYY_MM_DD = "yyyy-MM-dd"; - - public static final String YYYYMMDDHHMMSS = "yyyyMMddHHmmss"; - - public static final String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; - - private static final String[] PARSE_PATTERNS = { - "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", - "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM", - "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"}; - - /** - * 鑾峰彇褰撳墠Date鍨嬫棩鏈� - * - * @return Date() 褰撳墠鏃ユ湡 - */ - public static Date getNowDate() { - return new Date(); - } - - /** - * 鑾峰彇褰撳墠鏃ユ湡, 榛樿鏍煎紡涓簓yyy-MM-dd - * - * @return String - */ - public static String getDate() { - return dateTimeNow(YYYY_MM_DD); - } - - public static String getTime() { - return dateTimeNow(YYYY_MM_DD_HH_MM_SS); - } - - public static String dateTimeNow() { - return dateTimeNow(YYYYMMDDHHMMSS); - } - - public static String dateTimeNow(final String format) { - return parseDateToStr(format, new Date()); - } - - public static String dateTime(final Date date) { - return parseDateToStr(YYYY_MM_DD, date); - } - - public static String parseDateToStr(final String format, final Date date) { - return new SimpleDateFormat(format).format(date); - } - - public static Date dateTime(final String format, final String ts) { - try { - return new SimpleDateFormat(format).parse(ts); - } catch (ParseException e) { - throw new RuntimeException(e); - } - } - - /** - * 鏃ユ湡璺緞 鍗冲勾/鏈�/鏃� 濡�2018/08/08 - */ - public static String datePath() { - Date now = new Date(); - return DateFormatUtils.format(now, "yyyy/MM/dd"); - } - - /** - * 鏃ユ湡璺緞 鍗冲勾/鏈�/鏃� 濡�20180808 - */ - public static String dateTime() { - Date now = new Date(); - return DateFormatUtils.format(now, "yyyyMMdd"); - } - - /** - * 鏃ユ湡鍨嬪瓧绗︿覆杞寲涓烘棩鏈� 鏍煎紡 - */ - public static Date parseDate(Object str) { - if (str == null) { - return null; - } - try { - return parseDate(str.toString(), PARSE_PATTERNS); - } catch (ParseException e) { - return null; - } - } - - /** - * 鑾峰彇鏈嶅姟鍣ㄥ惎鍔ㄦ椂闂� - */ - public static Date getServerStartDate() { - long time = ManagementFactory.getRuntimeMXBean().getStartTime(); - return new Date(time); - } - - /** - * 璁$畻鐩稿樊澶╂暟 - */ - public static int differentDaysByMillisecond(Date date1, Date date2) { - return Math.abs((int) ((date2.getTime() - date1.getTime()) / (1000 * 3600 * 24))); - } - - /** - * 璁$畻涓や釜鏃堕棿宸� - */ - public static String getDatePoor(Date endDate, Date nowDate) { - long nd = 1000 * 24 * 60 * 60; - long nh = 1000 * 60 * 60; - long nm = 1000 * 60; - // long ns = 1000; - // 鑾峰緱涓や釜鏃堕棿鐨勬绉掓椂闂村樊寮� - long diff = endDate.getTime() - nowDate.getTime(); - // 璁$畻宸灏戝ぉ - long day = diff / nd; - // 璁$畻宸灏戝皬鏃� - long hour = diff % nd / nh; - // 璁$畻宸灏戝垎閽� - long min = diff % nd % nh / nm; - // 璁$畻宸灏戠//杈撳嚭缁撴灉 - // long sec = diff % nd % nh % nm / ns; - return day + "澶�" + hour + "灏忔椂" + min + "鍒嗛挓"; - } - - /** - * 澧炲姞 LocalDateTime ==> Date - */ - public static Date toDate(LocalDateTime temporalAccessor) { - ZonedDateTime zdt = temporalAccessor.atZone(ZoneId.systemDefault()); - return Date.from(zdt.toInstant()); - } - - /** - * 澧炲姞 LocalDate ==> Date - */ - public static Date toDate(LocalDate temporalAccessor) { - LocalDateTime localDateTime = LocalDateTime.of(temporalAccessor, LocalTime.of(0, 0, 0)); - ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault()); - return Date.from(zdt.toInstant()); - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/JsonUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/JsonUtils.java deleted file mode 100644 index 4827aa7..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/JsonUtils.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.xmzs.common.core.utils; - -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; - -/** - * @author <a href="https://github.com/binarywang">Binary Wang</a> - */ -public class JsonUtils { - private static final ObjectMapper JSON = new ObjectMapper(); - - static { - JSON.setSerializationInclusion(Include.NON_NULL); - JSON.configure(SerializationFeature.INDENT_OUTPUT, Boolean.TRUE); - } - - public static String toJson(Object obj) { - try { - return JSON.writeValueAsString(obj); - } catch (JsonProcessingException e) { - e.printStackTrace(); - } - - return null; - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/MapstructUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/MapstructUtils.java deleted file mode 100644 index 0c5820b..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/MapstructUtils.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.xmzs.common.core.utils; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.ObjectUtil; -import io.github.linpeilie.Converter; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; - -import java.util.List; -import java.util.Map; - -/** - * Mapstruct 宸ュ叿绫� - * <p>鍙傝�冩枃妗o細<a href="https://mapstruct.plus/guide/quick-start">mapstruct-plus</a></p> - * - * @author Michelle.Chung - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class MapstructUtils { - - private final static Converter CONVERTER = SpringUtils.getBean(Converter.class); - - /** - * 灏� T 绫诲瀷瀵硅薄锛岃浆鎹负 desc 绫诲瀷鐨勫璞″苟杩斿洖 - * - * @param source 鏁版嵁鏉ユ簮瀹炰綋 - * @param desc 鎻忚堪瀵硅薄 杞崲鍚庣殑瀵硅薄 - * @return desc - */ - public static <T, V> V convert(T source, Class<V> desc) { - if (ObjectUtil.isNull(source)) { - return null; - } - if (ObjectUtil.isNull(desc)) { - return null; - } - return CONVERTER.convert(source, desc); - } - - /** - * 灏� T 绫诲瀷瀵硅薄锛屾寜鐓ч厤缃殑鏄犲皠瀛楁瑙勫垯锛岀粰 desc 绫诲瀷鐨勫璞¤祴鍊煎苟杩斿洖 desc 瀵硅薄 - * - * @param source 鏁版嵁鏉ユ簮瀹炰綋 - * @param desc 杞崲鍚庣殑瀵硅薄 - * @return desc - */ - public static <T, V> V convert(T source, V desc) { - if (ObjectUtil.isNull(source)) { - return null; - } - if (ObjectUtil.isNull(desc)) { - return null; - } - return CONVERTER.convert(source, desc); - } - - /** - * 灏� T 绫诲瀷鐨勯泦鍚堬紝杞崲涓� desc 绫诲瀷鐨勯泦鍚堝苟杩斿洖 - * - * @param sourceList 鏁版嵁鏉ユ簮瀹炰綋鍒楄〃 - * @param desc 鎻忚堪瀵硅薄 杞崲鍚庣殑瀵硅薄 - * @return desc - */ - public static <T, V> List<V> convert(List<T> sourceList, Class<V> desc) { - if (ObjectUtil.isNull(sourceList)) { - return null; - } - if (CollUtil.isEmpty(sourceList)) { - return CollUtil.newArrayList(); - } - return CONVERTER.convert(sourceList, desc); - } - - /** - * 灏� Map 杞崲涓� beanClass 绫诲瀷鐨勯泦鍚堝苟杩斿洖 - * - * @param map 鏁版嵁鏉ユ簮 - * @param beanClass bean绫� - * @return bean瀵硅薄 - */ - public static <T> T convert(Map<String, Object> map, Class<T> beanClass) { - if (MapUtil.isEmpty(map)) { - return null; - } - if (ObjectUtil.isNull(beanClass)) { - return null; - } - return CONVERTER.convert(map, beanClass); - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/MessageUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/MessageUtils.java deleted file mode 100644 index c493658..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/MessageUtils.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.xmzs.common.core.utils; - -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import org.springframework.context.MessageSource; -import org.springframework.context.i18n.LocaleContextHolder; - -/** - * 鑾峰彇i18n璧勬簮鏂囦欢 - * - * @author Lion Li - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class MessageUtils { - - private static final MessageSource MESSAGE_SOURCE = SpringUtils.getBean(MessageSource.class); - - /** - * 鏍规嵁娑堟伅閿拰鍙傛暟 鑾峰彇娑堟伅 濮旀墭缁檚pring messageSource - * - * @param code 娑堟伅閿� - * @param args 鍙傛暟 - * @return 鑾峰彇鍥介檯鍖栫炕璇戝�� - */ - public static String message(String code, Object... args) { - return MESSAGE_SOURCE.getMessage(code, args, LocaleContextHolder.getLocale()); - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/ServletUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/ServletUtils.java deleted file mode 100644 index 262b9ef..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/ServletUtils.java +++ /dev/null @@ -1,193 +0,0 @@ -package com.xmzs.common.core.utils; - -import cn.hutool.core.convert.Convert; -import cn.hutool.extra.servlet.JakartaServletUtil; -import cn.hutool.http.HttpStatus; -import jakarta.servlet.ServletRequest; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.servlet.http.HttpSession; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import org.springframework.http.MediaType; -import org.springframework.web.context.request.RequestAttributes; -import org.springframework.web.context.request.RequestContextHolder; -import org.springframework.web.context.request.ServletRequestAttributes; - -import java.io.IOException; -import java.net.URLDecoder; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -/** - * 瀹㈡埛绔伐鍏风被 - * - * @author ruoyi - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class ServletUtils extends JakartaServletUtil { - - /** - * 鑾峰彇String鍙傛暟 - */ - public static String getParameter(String name) { - return getRequest().getParameter(name); - } - - /** - * 鑾峰彇String鍙傛暟 - */ - public static String getParameter(String name, String defaultValue) { - return Convert.toStr(getRequest().getParameter(name), defaultValue); - } - - /** - * 鑾峰彇Integer鍙傛暟 - */ - public static Integer getParameterToInt(String name) { - return Convert.toInt(getRequest().getParameter(name)); - } - - /** - * 鑾峰彇Integer鍙傛暟 - */ - public static Integer getParameterToInt(String name, Integer defaultValue) { - return Convert.toInt(getRequest().getParameter(name), defaultValue); - } - - /** - * 鑾峰彇Boolean鍙傛暟 - */ - public static Boolean getParameterToBool(String name) { - return Convert.toBool(getRequest().getParameter(name)); - } - - /** - * 鑾峰彇Boolean鍙傛暟 - */ - public static Boolean getParameterToBool(String name, Boolean defaultValue) { - return Convert.toBool(getRequest().getParameter(name), defaultValue); - } - - /** - * 鑾峰緱鎵�鏈夎姹傚弬鏁� - * - * @param request 璇锋眰瀵硅薄{@link ServletRequest} - * @return Map - */ - public static Map<String, String[]> getParams(ServletRequest request) { - final Map<String, String[]> map = request.getParameterMap(); - return Collections.unmodifiableMap(map); - } - - /** - * 鑾峰緱鎵�鏈夎姹傚弬鏁� - * - * @param request 璇锋眰瀵硅薄{@link ServletRequest} - * @return Map - */ - public static Map<String, String> getParamMap(ServletRequest request) { - Map<String, String> params = new HashMap<>(); - for (Map.Entry<String, String[]> entry : getParams(request).entrySet()) { - params.put(entry.getKey(), StringUtils.join(entry.getValue(), StringUtils.SEPARATOR)); - } - return params; - } - - /** - * 鑾峰彇request - */ - public static HttpServletRequest getRequest() { - return getRequestAttributes().getRequest(); - } - - /** - * 鑾峰彇response - */ - public static HttpServletResponse getResponse() { - return getRequestAttributes().getResponse(); - } - - /** - * 鑾峰彇session - */ - public static HttpSession getSession() { - return getRequest().getSession(); - } - - public static ServletRequestAttributes getRequestAttributes() { - RequestAttributes attributes = RequestContextHolder.getRequestAttributes(); - return (ServletRequestAttributes) attributes; - } - - /** - * 灏嗗瓧绗︿覆娓叉煋鍒板鎴风 - * - * @param response 娓叉煋瀵硅薄 - * @param string 寰呮覆鏌撶殑瀛楃涓� - */ - public static void renderString(HttpServletResponse response, String string) { - try { - response.setStatus(HttpStatus.HTTP_OK); - response.setContentType(MediaType.APPLICATION_JSON_VALUE); - response.setCharacterEncoding(StandardCharsets.UTF_8.toString()); - response.getWriter().print(string); - } catch (IOException e) { - e.printStackTrace(); - } - } - - /** - * 鏄惁鏄疉jax寮傛璇锋眰 - * - * @param request - */ - public static boolean isAjaxRequest(HttpServletRequest request) { - - String accept = request.getHeader("accept"); - if (accept != null && accept.contains(MediaType.APPLICATION_JSON_VALUE)) { - return true; - } - - String xRequestedWith = request.getHeader("X-Requested-With"); - if (xRequestedWith != null && xRequestedWith.contains("XMLHttpRequest")) { - return true; - } - - String uri = request.getRequestURI(); - if (StringUtils.equalsAnyIgnoreCase(uri, ".json", ".xml")) { - return true; - } - - String ajax = request.getParameter("__ajax"); - return StringUtils.equalsAnyIgnoreCase(ajax, "json", "xml"); - } - - public static String getClientIP() { - return getClientIP(getRequest()); - } - - /** - * 鍐呭缂栫爜 - * - * @param str 鍐呭 - * @return 缂栫爜鍚庣殑鍐呭 - */ - public static String urlEncode(String str) { - return URLEncoder.encode(str, StandardCharsets.UTF_8); - } - - /** - * 鍐呭瑙g爜 - * - * @param str 鍐呭 - * @return 瑙g爜鍚庣殑鍐呭 - */ - public static String urlDecode(String str) { - return URLDecoder.decode(str, StandardCharsets.UTF_8); - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/SpringUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/SpringUtils.java deleted file mode 100644 index d69af17..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/SpringUtils.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.xmzs.common.core.utils; - -import cn.hutool.extra.spring.SpringUtil; -import org.springframework.aop.framework.AopContext; -import org.springframework.beans.factory.NoSuchBeanDefinitionException; -import org.springframework.context.ApplicationContext; -import org.springframework.stereotype.Component; - -/** - * spring宸ュ叿绫� - * - * @author Lion Li - */ -@Component -public final class SpringUtils extends SpringUtil { - - /** - * 濡傛灉BeanFactory鍖呭惈涓�涓笌鎵�缁欏悕绉板尮閰嶇殑bean瀹氫箟锛屽垯杩斿洖true - */ - public static boolean containsBean(String name) { - return getBeanFactory().containsBean(name); - } - - /** - * 鍒ゆ柇浠ョ粰瀹氬悕瀛楁敞鍐岀殑bean瀹氫箟鏄竴涓猻ingleton杩樻槸涓�涓猵rototype銆� - * 濡傛灉涓庣粰瀹氬悕瀛楃浉搴旂殑bean瀹氫箟娌℃湁琚壘鍒帮紝灏嗕細鎶涘嚭涓�涓紓甯革紙NoSuchBeanDefinitionException锛� - */ - public static boolean isSingleton(String name) throws NoSuchBeanDefinitionException { - return getBeanFactory().isSingleton(name); - } - - /** - * @return Class 娉ㄥ唽瀵硅薄鐨勭被鍨� - */ - public static Class<?> getType(String name) throws NoSuchBeanDefinitionException { - return getBeanFactory().getType(name); - } - - /** - * 濡傛灉缁欏畾鐨刡ean鍚嶅瓧鍦╞ean瀹氫箟涓湁鍒悕锛屽垯杩斿洖杩欎簺鍒悕 - */ - public static String[] getAliases(String name) throws NoSuchBeanDefinitionException { - return getBeanFactory().getAliases(name); - } - - /** - * 鑾峰彇aop浠g悊瀵硅薄 - */ - @SuppressWarnings("unchecked") - public static <T> T getAopProxy(T invoker) { - return (T) AopContext.currentProxy(); - } - - - /** - * 鑾峰彇spring涓婁笅鏂� - */ - public static ApplicationContext context() { - return getApplicationContext(); - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/StreamUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/StreamUtils.java deleted file mode 100644 index 8f6161f..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/StreamUtils.java +++ /dev/null @@ -1,254 +0,0 @@ -package com.xmzs.common.core.utils; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.map.MapUtil; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; - -import java.util.*; -import java.util.function.BiFunction; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.stream.Collectors; - -/** - * stream 娴佸伐鍏风被 - * - * @author Lion Li - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class StreamUtils { - - /** - * 灏哻ollection杩囨护 - * - * @param collection 闇�瑕佽浆鍖栫殑闆嗗悎 - * @param function 杩囨护鏂规硶 - * @return 杩囨护鍚庣殑list - */ - public static <E> List<E> filter(Collection<E> collection, Predicate<E> function) { - if (CollUtil.isEmpty(collection)) { - return CollUtil.newArrayList(); - } - // 娉ㄦ剰姝ゅ涓嶈浣跨敤 .toList() 鏂拌娉� 鍥犱负杩斿洖鐨勬槸涓嶅彲鍙楲ist 浼氬鑷村簭鍒楀寲闂 - return collection.stream().filter(function).collect(Collectors.toList()); - } - - /** - * 灏哻ollection鎷兼帴 - * - * @param collection 闇�瑕佽浆鍖栫殑闆嗗悎 - * @param function 鎷兼帴鏂规硶 - * @return 鎷兼帴鍚庣殑list - */ - public static <E> String join(Collection<E> collection, Function<E, String> function) { - return join(collection, function, StringUtils.SEPARATOR); - } - - /** - * 灏哻ollection鎷兼帴 - * - * @param collection 闇�瑕佽浆鍖栫殑闆嗗悎 - * @param function 鎷兼帴鏂规硶 - * @param delimiter 鎷兼帴绗� - * @return 鎷兼帴鍚庣殑list - */ - public static <E> String join(Collection<E> collection, Function<E, String> function, CharSequence delimiter) { - if (CollUtil.isEmpty(collection)) { - return StringUtils.EMPTY; - } - return collection.stream().map(function).filter(Objects::nonNull).collect(Collectors.joining(delimiter)); - } - - /** - * 灏哻ollection鎺掑簭 - * - * @param collection 闇�瑕佽浆鍖栫殑闆嗗悎 - * @param comparing 鎺掑簭鏂规硶 - * @return 鎺掑簭鍚庣殑list - */ - public static <E> List<E> sorted(Collection<E> collection, Comparator<E> comparing) { - if (CollUtil.isEmpty(collection)) { - return CollUtil.newArrayList(); - } - // 娉ㄦ剰姝ゅ涓嶈浣跨敤 .toList() 鏂拌娉� 鍥犱负杩斿洖鐨勬槸涓嶅彲鍙楲ist 浼氬鑷村簭鍒楀寲闂 - return collection.stream().sorted(comparing).collect(Collectors.toList()); - } - - /** - * 灏哻ollection杞寲涓虹被鍨嬩笉鍙樼殑map<br> - * <B>{@code Collection<V> ----> Map<K,V>}</B> - * - * @param collection 闇�瑕佽浆鍖栫殑闆嗗悎 - * @param key V绫诲瀷杞寲涓篕绫诲瀷鐨刲ambda鏂规硶 - * @param <V> collection涓殑娉涘瀷 - * @param <K> map涓殑key绫诲瀷 - * @return 杞寲鍚庣殑map - */ - public static <V, K> Map<K, V> toIdentityMap(Collection<V> collection, Function<V, K> key) { - if (CollUtil.isEmpty(collection)) { - return MapUtil.newHashMap(); - } - return collection.stream().collect(Collectors.toMap(key, Function.identity(), (l, r) -> l)); - } - - /** - * 灏咰ollection杞寲涓簃ap(value绫诲瀷涓巆ollection鐨勬硾鍨嬩笉鍚�)<br> - * <B>{@code Collection<E> -----> Map<K,V> }</B> - * - * @param collection 闇�瑕佽浆鍖栫殑闆嗗悎 - * @param key E绫诲瀷杞寲涓篕绫诲瀷鐨刲ambda鏂规硶 - * @param value E绫诲瀷杞寲涓篤绫诲瀷鐨刲ambda鏂规硶 - * @param <E> collection涓殑娉涘瀷 - * @param <K> map涓殑key绫诲瀷 - * @param <V> map涓殑value绫诲瀷 - * @return 杞寲鍚庣殑map - */ - public static <E, K, V> Map<K, V> toMap(Collection<E> collection, Function<E, K> key, Function<E, V> value) { - if (CollUtil.isEmpty(collection)) { - return MapUtil.newHashMap(); - } - return collection.stream().collect(Collectors.toMap(key, value, (l, r) -> l)); - } - - /** - * 灏哻ollection鎸夌収瑙勫垯(姣斿鏈夌浉鍚岀殑鐝骇id)鍒嗙被鎴恗ap<br> - * <B>{@code Collection<E> -------> Map<K,List<E>> } </B> - * - * @param collection 闇�瑕佸垎绫荤殑闆嗗悎 - * @param key 鍒嗙被鐨勮鍒� - * @param <E> collection涓殑娉涘瀷 - * @param <K> map涓殑key绫诲瀷 - * @return 鍒嗙被鍚庣殑map - */ - public static <E, K> Map<K, List<E>> groupByKey(Collection<E> collection, Function<E, K> key) { - if (CollUtil.isEmpty(collection)) { - return MapUtil.newHashMap(); - } - return collection - .stream() - .collect(Collectors.groupingBy(key, LinkedHashMap::new, Collectors.toList())); - } - - /** - * 灏哻ollection鎸夌収涓や釜瑙勫垯(姣斿鏈夌浉鍚岀殑骞寸骇id,鐝骇id)鍒嗙被鎴愬弻灞俶ap<br> - * <B>{@code Collection<E> ---> Map<T,Map<U,List<E>>> } </B> - * - * @param collection 闇�瑕佸垎绫荤殑闆嗗悎 - * @param key1 绗竴涓垎绫荤殑瑙勫垯 - * @param key2 绗簩涓垎绫荤殑瑙勫垯 - * @param <E> 闆嗗悎鍏冪礌绫诲瀷 - * @param <K> 绗竴涓猰ap涓殑key绫诲瀷 - * @param <U> 绗簩涓猰ap涓殑key绫诲瀷 - * @return 鍒嗙被鍚庣殑map - */ - public static <E, K, U> Map<K, Map<U, List<E>>> groupBy2Key(Collection<E> collection, Function<E, K> key1, Function<E, U> key2) { - if (CollUtil.isEmpty(collection)) { - return MapUtil.newHashMap(); - } - return collection - .stream() - .collect(Collectors.groupingBy(key1, LinkedHashMap::new, Collectors.groupingBy(key2, LinkedHashMap::new, Collectors.toList()))); - } - - /** - * 灏哻ollection鎸夌収涓や釜瑙勫垯(姣斿鏈夌浉鍚岀殑骞寸骇id,鐝骇id)鍒嗙被鎴愬弻灞俶ap<br> - * <B>{@code Collection<E> ---> Map<T,Map<U,E>> } </B> - * - * @param collection 闇�瑕佸垎绫荤殑闆嗗悎 - * @param key1 绗竴涓垎绫荤殑瑙勫垯 - * @param key2 绗簩涓垎绫荤殑瑙勫垯 - * @param <T> 绗竴涓猰ap涓殑key绫诲瀷 - * @param <U> 绗簩涓猰ap涓殑key绫诲瀷 - * @param <E> collection涓殑娉涘瀷 - * @return 鍒嗙被鍚庣殑map - */ - public static <E, T, U> Map<T, Map<U, E>> group2Map(Collection<E> collection, Function<E, T> key1, Function<E, U> key2) { - if (CollUtil.isEmpty(collection) || key1 == null || key2 == null) { - return MapUtil.newHashMap(); - } - return collection - .stream() - .collect(Collectors.groupingBy(key1, LinkedHashMap::new, Collectors.toMap(key2, Function.identity(), (l, r) -> l))); - } - - /** - * 灏哻ollection杞寲涓篖ist闆嗗悎锛屼絾鏄袱鑰呯殑娉涘瀷涓嶅悓<br> - * <B>{@code Collection<E> ------> List<T> } </B> - * - * @param collection 闇�瑕佽浆鍖栫殑闆嗗悎 - * @param function collection涓殑娉涘瀷杞寲涓簂ist娉涘瀷鐨刲ambda琛ㄨ揪寮� - * @param <E> collection涓殑娉涘瀷 - * @param <T> List涓殑娉涘瀷 - * @return 杞寲鍚庣殑list - */ - public static <E, T> List<T> toList(Collection<E> collection, Function<E, T> function) { - if (CollUtil.isEmpty(collection)) { - return CollUtil.newArrayList(); - } - return collection - .stream() - .map(function) - .filter(Objects::nonNull) - // 娉ㄦ剰姝ゅ涓嶈浣跨敤 .toList() 鏂拌娉� 鍥犱负杩斿洖鐨勬槸涓嶅彲鍙楲ist 浼氬鑷村簭鍒楀寲闂 - .collect(Collectors.toList()); - } - - /** - * 灏哻ollection杞寲涓篠et闆嗗悎锛屼絾鏄袱鑰呯殑娉涘瀷涓嶅悓<br> - * <B>{@code Collection<E> ------> Set<T> } </B> - * - * @param collection 闇�瑕佽浆鍖栫殑闆嗗悎 - * @param function collection涓殑娉涘瀷杞寲涓簊et娉涘瀷鐨刲ambda琛ㄨ揪寮� - * @param <E> collection涓殑娉涘瀷 - * @param <T> Set涓殑娉涘瀷 - * @return 杞寲鍚庣殑Set - */ - public static <E, T> Set<T> toSet(Collection<E> collection, Function<E, T> function) { - if (CollUtil.isEmpty(collection) || function == null) { - return CollUtil.newHashSet(); - } - return collection - .stream() - .map(function) - .filter(Objects::nonNull) - .collect(Collectors.toSet()); - } - - - /** - * 鍚堝苟涓や釜鐩稿悓key绫诲瀷鐨刴ap - * - * @param map1 绗竴涓渶瑕佸悎骞剁殑 map - * @param map2 绗簩涓渶瑕佸悎骞剁殑 map - * @param merge 鍚堝苟鐨刲ambda锛屽皢key value1 value2鍚堝苟鎴愭渶缁堢殑绫诲瀷,娉ㄦ剰value鍙兘涓虹┖鐨勬儏鍐� - * @param <K> map涓殑key绫诲瀷 - * @param <X> 绗竴涓� map鐨剉alue绫诲瀷 - * @param <Y> 绗簩涓� map鐨剉alue绫诲瀷 - * @param <V> 鏈�缁坢ap鐨剉alue绫诲瀷 - * @return 鍚堝苟鍚庣殑map - */ - public static <K, X, Y, V> Map<K, V> merge(Map<K, X> map1, Map<K, Y> map2, BiFunction<X, Y, V> merge) { - if (MapUtil.isEmpty(map1) && MapUtil.isEmpty(map2)) { - return MapUtil.newHashMap(); - } else if (MapUtil.isEmpty(map1)) { - map1 = MapUtil.newHashMap(); - } else if (MapUtil.isEmpty(map2)) { - map2 = MapUtil.newHashMap(); - } - Set<K> key = new HashSet<>(); - key.addAll(map1.keySet()); - key.addAll(map2.keySet()); - Map<K, V> map = new HashMap<>(); - for (K t : key) { - X x = map1.get(t); - Y y = map2.get(t); - V z = merge.apply(x, y); - if (z != null) { - map.put(t, z); - } - } - return map; - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/StringUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/StringUtils.java deleted file mode 100644 index a225d70..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/StringUtils.java +++ /dev/null @@ -1,321 +0,0 @@ -package com.xmzs.common.core.utils; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.convert.Convert; -import cn.hutool.core.lang.Validator; -import cn.hutool.core.util.StrUtil; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import org.springframework.util.AntPathMatcher; - -import java.util.*; -import java.util.function.Function; -import java.util.stream.Collectors; - -/** - * 瀛楃涓插伐鍏风被 - * - * @author Lion Li - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class StringUtils extends org.apache.commons.lang3.StringUtils { - - public static final String SEPARATOR = ","; - - /** - * 鑾峰彇鍙傛暟涓嶄负绌哄�� - * - * @param str defaultValue 瑕佸垽鏂殑value - * @return value 杩斿洖鍊� - */ - public static String blankToDefault(String str, String defaultValue) { - return StrUtil.blankToDefault(str, defaultValue); - } - - /** - * * 鍒ゆ柇涓�涓瓧绗︿覆鏄惁涓虹┖涓� - * - * @param str String - * @return true锛氫负绌� false锛氶潪绌� - */ - public static boolean isEmpty(String str) { - return StrUtil.isEmpty(str); - } - - /** - * * 鍒ゆ柇涓�涓瓧绗︿覆鏄惁涓洪潪绌轰覆 - * - * @param str String - * @return true锛氶潪绌轰覆 false锛氱┖涓� - */ - public static boolean isNotEmpty(String str) { - return !isEmpty(str); - } - - /** - * 鍘荤┖鏍� - */ - public static String trim(String str) { - return StrUtil.trim(str); - } - - /** - * 鎴彇瀛楃涓� - * - * @param str 瀛楃涓� - * @param start 寮�濮� - * @return 缁撴灉 - */ - public static String substring(final String str, int start) { - return substring(str, start, str.length()); - } - - /** - * 鎴彇瀛楃涓� - * - * @param str 瀛楃涓� - * @param start 寮�濮� - * @param end 缁撴潫 - * @return 缁撴灉 - */ - public static String substring(final String str, int start, int end) { - return StrUtil.sub(str, start, end); - } - - /** - * 鏍煎紡鍖栨枃鏈�, {} 琛ㄧず鍗犱綅绗�<br> - * 姝ゆ柟娉曞彧鏄畝鍗曞皢鍗犱綅绗� {} 鎸夌収椤哄簭鏇挎崲涓哄弬鏁�<br> - * 濡傛灉鎯宠緭鍑� {} 浣跨敤 \\杞箟 { 鍗冲彲锛屽鏋滄兂杈撳嚭 {} 涔嬪墠鐨� \ 浣跨敤鍙岃浆涔夌 \\\\ 鍗冲彲<br> - * 渚嬶細<br> - * 閫氬父浣跨敤锛歠ormat("this is {} for {}", "a", "b") -> this is a for b<br> - * 杞箟{}锛� format("this is \\{} for {}", "a", "b") -> this is {} for a<br> - * 杞箟\锛� format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br> - * - * @param template 鏂囨湰妯℃澘锛岃鏇挎崲鐨勯儴鍒嗙敤 {} 琛ㄧず - * @param params 鍙傛暟鍊� - * @return 鏍煎紡鍖栧悗鐨勬枃鏈� - */ - public static String format(String template, Object... params) { - return StrUtil.format(template, params); - } - - /** - * 鏄惁涓篽ttp(s)://寮�澶� - * - * @param link 閾炬帴 - * @return 缁撴灉 - */ - public static boolean ishttp(String link) { - return Validator.isUrl(link); - } - - /** - * 瀛楃涓茶浆set - * - * @param str 瀛楃涓� - * @param sep 鍒嗛殧绗� - * @return set闆嗗悎 - */ - public static Set<String> str2Set(String str, String sep) { - return new HashSet<>(str2List(str, sep, true, false)); - } - - /** - * 瀛楃涓茶浆list - * - * @param str 瀛楃涓� - * @param sep 鍒嗛殧绗� - * @param filterBlank 杩囨护绾┖鐧� - * @param trim 鍘绘帀棣栧熬绌虹櫧 - * @return list闆嗗悎 - */ - public static List<String> str2List(String str, String sep, boolean filterBlank, boolean trim) { - List<String> list = new ArrayList<>(); - if (isEmpty(str)) { - return list; - } - - // 杩囨护绌虹櫧瀛楃涓� - if (filterBlank && isBlank(str)) { - return list; - } - String[] split = str.split(sep); - for (String string : split) { - if (filterBlank && isBlank(string)) { - continue; - } - if (trim) { - string = trim(string); - } - list.add(string); - } - - return list; - } - - /** - * 鏌ユ壘鎸囧畾瀛楃涓叉槸鍚﹀寘鍚寚瀹氬瓧绗︿覆鍒楄〃涓殑浠绘剰涓�涓瓧绗︿覆鍚屾椂涓插拷鐣ュぇ灏忓啓 - * - * @param cs 鎸囧畾瀛楃涓� - * @param searchCharSequences 闇�瑕佹鏌ョ殑瀛楃涓叉暟缁� - * @return 鏄惁鍖呭惈浠绘剰涓�涓瓧绗︿覆 - */ - public static boolean containsAnyIgnoreCase(CharSequence cs, CharSequence... searchCharSequences) { - return StrUtil.containsAnyIgnoreCase(cs, searchCharSequences); - } - - /** - * 椹煎嘲杞笅鍒掔嚎鍛藉悕 - */ - public static String toUnderScoreCase(String str) { - return StrUtil.toUnderlineCase(str); - } - - /** - * 鏄惁鍖呭惈瀛楃涓� - * - * @param str 楠岃瘉瀛楃涓� - * @param strs 瀛楃涓茬粍 - * @return 鍖呭惈杩斿洖true - */ - public static boolean inStringIgnoreCase(String str, String... strs) { - return StrUtil.equalsAnyIgnoreCase(str, strs); - } - - /** - * 灏嗕笅鍒掔嚎澶у啓鏂瑰紡鍛藉悕鐨勫瓧绗︿覆杞崲涓洪┘宄板紡銆傚鏋滆浆鎹㈠墠鐨勪笅鍒掔嚎澶у啓鏂瑰紡鍛藉悕鐨勫瓧绗︿覆涓虹┖锛屽垯杩斿洖绌哄瓧绗︿覆銆� 渚嬪锛欻ELLO_WORLD->HelloWorld - * - * @param name 杞崲鍓嶇殑涓嬪垝绾垮ぇ鍐欐柟寮忓懡鍚嶇殑瀛楃涓� - * @return 杞崲鍚庣殑椹煎嘲寮忓懡鍚嶇殑瀛楃涓� - */ - public static String convertToCamelCase(String name) { - return StrUtil.upperFirst(StrUtil.toCamelCase(name)); - } - - /** - * 椹煎嘲寮忓懡鍚嶆硶 渚嬪锛歶ser_name->userName - */ - public static String toCamelCase(String s) { - return StrUtil.toCamelCase(s); - } - - /** - * 鏌ユ壘鎸囧畾瀛楃涓叉槸鍚﹀尮閰嶆寚瀹氬瓧绗︿覆鍒楄〃涓殑浠绘剰涓�涓瓧绗︿覆 - * - * @param str 鎸囧畾瀛楃涓� - * @param strs 闇�瑕佹鏌ョ殑瀛楃涓叉暟缁� - * @return 鏄惁鍖归厤 - */ - public static boolean matches(String str, List<String> strs) { - if (isEmpty(str) || CollUtil.isEmpty(strs)) { - return false; - } - for (String pattern : strs) { - if (isMatch(pattern, str)) { - return true; - } - } - return false; - } - - /** - * 鍒ゆ柇url鏄惁涓庤鍒欓厤缃�: - * ? 琛ㄧず鍗曚釜瀛楃; - * * 琛ㄧず涓�灞傝矾寰勫唴鐨勪换鎰忓瓧绗︿覆锛屼笉鍙法灞傜骇; - * ** 琛ㄧず浠绘剰灞傝矾寰�; - * - * @param pattern 鍖归厤瑙勫垯 - * @param url 闇�瑕佸尮閰嶇殑url - */ - public static boolean isMatch(String pattern, String url) { - AntPathMatcher matcher = new AntPathMatcher(); - return matcher.match(pattern, url); - } - - /** - * 鏁板瓧宸﹁竟琛ラ綈0锛屼娇涔嬭揪鍒版寚瀹氶暱搴︺�傛敞鎰忥紝濡傛灉鏁板瓧杞崲涓哄瓧绗︿覆鍚庯紝闀垮害澶т簬size锛屽垯鍙繚鐣� 鏈�鍚巗ize涓瓧绗︺�� - * - * @param num 鏁板瓧瀵硅薄 - * @param size 瀛楃涓叉寚瀹氶暱搴� - * @return 杩斿洖鏁板瓧鐨勫瓧绗︿覆鏍煎紡锛岃瀛楃涓蹭负鎸囧畾闀垮害銆� - */ - public static String padl(final Number num, final int size) { - return padl(num.toString(), size, '0'); - } - - /** - * 瀛楃涓插乏琛ラ綈銆傚鏋滃師濮嬪瓧绗︿覆s闀垮害澶т簬size锛屽垯鍙繚鐣欐渶鍚巗ize涓瓧绗︺�� - * - * @param s 鍘熷瀛楃涓� - * @param size 瀛楃涓叉寚瀹氶暱搴� - * @param c 鐢ㄤ簬琛ラ綈鐨勫瓧绗� - * @return 杩斿洖鎸囧畾闀垮害鐨勫瓧绗︿覆锛岀敱鍘熷瓧绗︿覆宸﹁ˉ榻愭垨鎴彇寰楀埌銆� - */ - public static String padl(final String s, final int size, final char c) { - final StringBuilder sb = new StringBuilder(size); - if (s != null) { - final int len = s.length(); - if (s.length() <= size) { - sb.append(String.valueOf(c).repeat(size - len)); - sb.append(s); - } else { - return s.substring(len - size, len); - } - } else { - sb.append(String.valueOf(c).repeat(Math.max(0, size))); - } - return sb.toString(); - } - - /** - * 鍒囧垎瀛楃涓�(鍒嗛殧绗﹂粯璁ら�楀彿) - * - * @param str 琚垏鍒嗙殑瀛楃涓� - * @return 鍒嗗壊鍚庣殑鏁版嵁鍒楄〃 - */ - public static List<String> splitList(String str) { - return splitTo(str, Convert::toStr); - } - - /** - * 鍒囧垎瀛楃涓� - * - * @param str 琚垏鍒嗙殑瀛楃涓� - * @param separator 鍒嗛殧绗� - * @return 鍒嗗壊鍚庣殑鏁版嵁鍒楄〃 - */ - public static List<String> splitList(String str, String separator) { - return splitTo(str, separator, Convert::toStr); - } - - /** - * 鍒囧垎瀛楃涓茶嚜瀹氫箟杞崲(鍒嗛殧绗﹂粯璁ら�楀彿) - * - * @param str 琚垏鍒嗙殑瀛楃涓� - * @param mapper 鑷畾涔夎浆鎹� - * @return 鍒嗗壊鍚庣殑鏁版嵁鍒楄〃 - */ - public static <T> List<T> splitTo(String str, Function<? super Object, T> mapper) { - return splitTo(str, SEPARATOR, mapper); - } - - /** - * 鍒囧垎瀛楃涓茶嚜瀹氫箟杞崲 - * - * @param str 琚垏鍒嗙殑瀛楃涓� - * @param separator 鍒嗛殧绗� - * @param mapper 鑷畾涔夎浆鎹� - * @return 鍒嗗壊鍚庣殑鏁版嵁鍒楄〃 - */ - public static <T> List<T> splitTo(String str, String separator, Function<? super Object, T> mapper) { - if (isBlank(str)) { - return new ArrayList<>(0); - } - return StrUtil.split(str, separator) - .stream() - .filter(Objects::nonNull) - .map(mapper) - .collect(Collectors.toList()); - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/Threads.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/Threads.java deleted file mode 100644 index be9c255..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/Threads.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.xmzs.common.core.utils; - -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import lombok.extern.slf4j.Slf4j; - -import java.util.concurrent.*; - -/** - * 绾跨▼鐩稿叧宸ュ叿绫�. - * - * @author ruoyi - */ -@Slf4j -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class Threads { - - /** - * sleep绛夊緟,鍗曚綅涓烘绉� - */ - public static void sleep(long milliseconds) { - try { - Thread.sleep(milliseconds); - } catch (InterruptedException e) { - return; - } - } - - /** - * 鍋滄绾跨▼姹� - * 鍏堜娇鐢╯hutdown, 鍋滄鎺ユ敹鏂颁换鍔″苟灏濊瘯瀹屾垚鎵�鏈夊凡瀛樺湪浠诲姟. - * 濡傛灉瓒呮椂, 鍒欒皟鐢╯hutdownNow, 鍙栨秷鍦╳orkQueue涓璓ending鐨勪换鍔�,骞朵腑鏂墍鏈夐樆濉炲嚱鏁�. - * 濡傛灉浠嶇劧瓒呮檪锛屽墖寮峰埗閫�鍑�. - * 鍙﹀鍦╯hutdown鏃剁嚎绋嬫湰韬璋冪敤涓柇鍋氫簡澶勭悊. - */ - public static void shutdownAndAwaitTermination(ExecutorService pool) { - if (pool != null && !pool.isShutdown()) { - pool.shutdown(); - try { - if (!pool.awaitTermination(120, TimeUnit.SECONDS)) { - pool.shutdownNow(); - if (!pool.awaitTermination(120, TimeUnit.SECONDS)) { - log.info("Pool did not terminate"); - } - } - } catch (InterruptedException ie) { - pool.shutdownNow(); - Thread.currentThread().interrupt(); - } - } - } - - /** - * 鎵撳嵃绾跨▼寮傚父淇℃伅 - */ - public static void printException(Runnable r, Throwable t) { - if (t == null && r instanceof Future<?>) { - try { - Future<?> future = (Future<?>) r; - if (future.isDone()) { - future.get(); - } - } catch (CancellationException ce) { - t = ce; - } catch (ExecutionException ee) { - t = ee.getCause(); - } catch (InterruptedException ie) { - Thread.currentThread().interrupt(); - } - } - if (t != null) { - log.error(t.getMessage(), t); - } - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/TreeBuildUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/TreeBuildUtils.java deleted file mode 100644 index 6cec55b..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/TreeBuildUtils.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.xmzs.common.core.utils; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.lang.tree.Tree; -import cn.hutool.core.lang.tree.TreeNodeConfig; -import cn.hutool.core.lang.tree.TreeUtil; -import cn.hutool.core.lang.tree.parser.NodeParser; -import com.xmzs.common.core.utils.reflect.ReflectUtils; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; - -import java.util.List; - -/** - * 鎵╁睍 hutool TreeUtil 灏佽绯荤粺鏍戞瀯寤� - * - * @author Lion Li - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class TreeBuildUtils extends TreeUtil { - - /** - * 鏍规嵁鍓嶇瀹氬埗宸紓鍖栧瓧娈� - */ - public static final TreeNodeConfig DEFAULT_CONFIG = TreeNodeConfig.DEFAULT_CONFIG.setNameKey("label"); - - public static <T, K> List<Tree<K>> build(List<T> list, NodeParser<T, K> nodeParser) { - if (CollUtil.isEmpty(list)) { - return null; - } - K k = ReflectUtils.invokeGetter(list.get(0), "parentId"); - return TreeUtil.build(list, k, DEFAULT_CONFIG, nodeParser); - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/ValidatorUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/ValidatorUtils.java deleted file mode 100644 index 9c94de2..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/ValidatorUtils.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.xmzs.common.core.utils; - -import lombok.AccessLevel; -import lombok.NoArgsConstructor; - -import jakarta.validation.ConstraintViolation; -import jakarta.validation.ConstraintViolationException; -import jakarta.validation.Validator; -import java.util.Set; - -/** - * Validator 鏍¢獙妗嗘灦宸ュ叿 - * - * @author Lion Li - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class ValidatorUtils { - - private static final Validator VALID = SpringUtils.getBean(Validator.class); - - public static <T> void validate(T object, Class<?>... groups) { - Set<ConstraintViolation<T>> validate = VALID.validate(object, groups); - if (!validate.isEmpty()) { - throw new ConstraintViolationException("鍙傛暟鏍¢獙寮傚父", validate); - } - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/file/FileUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/file/FileUtils.java deleted file mode 100644 index a21d3cb..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/file/FileUtils.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.xmzs.common.core.utils.file; - -import cn.hutool.core.io.FileUtil; -import jakarta.servlet.http.HttpServletResponse; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; - -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; - -/** - * 鏂囦欢澶勭悊宸ュ叿绫� - * - * @author Lion Li - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class FileUtils extends FileUtil { - - /** - * 涓嬭浇鏂囦欢鍚嶉噸鏂扮紪鐮� - * - * @param response 鍝嶅簲瀵硅薄 - * @param realFileName 鐪熷疄鏂囦欢鍚� - */ - public static void setAttachmentResponseHeader(HttpServletResponse response, String realFileName) { - String percentEncodedFileName = percentEncode(realFileName); - String contentDispositionValue = "attachment; filename=%s;filename*=utf-8''%s".formatted(percentEncodedFileName, percentEncodedFileName); - response.addHeader("Access-Control-Expose-Headers", "Content-Disposition,download-filename"); - response.setHeader("Content-disposition", contentDispositionValue); - response.setHeader("download-filename", percentEncodedFileName); - } - - /** - * 鐧惧垎鍙风紪鐮佸伐鍏锋柟娉� - * - * @param s 闇�瑕佺櫨鍒嗗彿缂栫爜鐨勫瓧绗︿覆 - * @return 鐧惧垎鍙风紪鐮佸悗鐨勫瓧绗︿覆 - */ - public static String percentEncode(String s) { - String encode = URLEncoder.encode(s, StandardCharsets.UTF_8); - return encode.replaceAll("\\+", "%20"); - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/file/MimeTypeUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/file/MimeTypeUtils.java deleted file mode 100644 index 403a1bf..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/file/MimeTypeUtils.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.xmzs.common.core.utils.file; - -/** - * 濯掍綋绫诲瀷宸ュ叿绫� - * - * @author ruoyi - */ -public class MimeTypeUtils { - public static final String IMAGE_PNG = "image/png"; - - public static final String IMAGE_JPG = "image/jpg"; - - public static final String IMAGE_JPEG = "image/jpeg"; - - public static final String IMAGE_BMP = "image/bmp"; - - public static final String IMAGE_GIF = "image/gif"; - - public static final String[] IMAGE_EXTENSION = {"bmp", "gif", "jpg", "jpeg", "png"}; - - public static final String[] FLASH_EXTENSION = {"swf", "flv"}; - - public static final String[] MEDIA_EXTENSION = {"swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg", - "asf", "rm", "rmvb"}; - - public static final String[] VIDEO_EXTENSION = {"mp4", "avi", "rmvb"}; - - public static final String[] DEFAULT_ALLOWED_EXTENSION = { - // 鍥剧墖 - "bmp", "gif", "jpg", "jpeg", "png", - // word excel powerpoint - "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt", - // 鍘嬬缉鏂囦欢 - "rar", "zip", "gz", "bz2", - // 瑙嗛鏍煎紡 - "mp4", "avi", "rmvb", - // pdf - "pdf"}; - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/ip/AddressUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/ip/AddressUtils.java deleted file mode 100644 index ff86003..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/ip/AddressUtils.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.xmzs.common.core.utils.ip; - -import cn.hutool.core.net.NetUtil; -import cn.hutool.http.HtmlUtil; -import com.xmzs.common.core.utils.StringUtils; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import lombok.extern.slf4j.Slf4j; - -/** - * 鑾峰彇鍦板潃绫� - * - * @author Lion Li - */ -@Slf4j -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class AddressUtils { - - // 鏈煡鍦板潃 - public static final String UNKNOWN = "XX XX"; - - public static String getRealAddressByIP(String ip) { - if (StringUtils.isBlank(ip)) { - return UNKNOWN; - } - // 鍐呯綉涓嶆煡璇� - ip = "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : HtmlUtil.cleanHtmlTag(ip); - if (NetUtil.isInnerIP(ip)) { - return "鍐呯綉IP"; - } - return RegionUtils.getCityInfo(ip); - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/ip/RegionUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/ip/RegionUtils.java deleted file mode 100644 index c618d93..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/ip/RegionUtils.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.xmzs.common.core.utils.ip; - -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.io.resource.ClassPathResource; -import cn.hutool.core.util.ObjectUtil; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.utils.file.FileUtils; -import lombok.extern.slf4j.Slf4j; -import org.lionsoul.ip2region.xdb.Searcher; - -import java.io.File; - -/** - * 鏍规嵁ip鍦板潃瀹氫綅宸ュ叿绫伙紝绂荤嚎鏂瑰紡 - * 鍙傝�冨湴鍧�锛�<a href="https://gitee.com/lionsoul/ip2region/tree/master/binding/java">闆嗘垚 ip2region 瀹炵幇绂荤嚎IP鍦板潃瀹氫綅搴�</a> - * - * @author lishuyan - */ -@Slf4j -public class RegionUtils { - - private static final Searcher SEARCHER; - - static { - String fileName = "/ip2region.xdb"; - File existFile = FileUtils.file(FileUtil.getTmpDir() + FileUtil.FILE_SEPARATOR + fileName); - if (!FileUtils.exist(existFile)) { - ClassPathResource fileStream = new ClassPathResource(fileName); - if (ObjectUtil.isEmpty(fileStream.getStream())) { - throw new ServiceException("RegionUtils鍒濆鍖栧け璐ワ紝鍘熷洜锛欼P鍦板潃搴撴暟鎹笉瀛樺湪锛�"); - } - FileUtils.writeFromStream(fileStream.getStream(), existFile); - } - - String dbPath = existFile.getPath(); - - // 1銆佷粠 dbPath 鍔犺浇鏁翠釜 xdb 鍒板唴瀛樸�� - byte[] cBuff; - try { - cBuff = Searcher.loadContentFromFile(dbPath); - } catch (Exception e) { - throw new ServiceException("RegionUtils鍒濆鍖栧け璐ワ紝鍘熷洜锛氫粠ip2region.xdb鏂囦欢鍔犺浇鍐呭澶辫触锛�" + e.getMessage()); - } - // 2銆佷娇鐢ㄤ笂杩扮殑 cBuff 鍒涘缓涓�涓畬鍏ㄥ熀浜庡唴瀛樼殑鏌ヨ瀵硅薄銆� - try { - SEARCHER = Searcher.newWithBuffer(cBuff); - } catch (Exception e) { - throw new ServiceException("RegionUtils鍒濆鍖栧け璐ワ紝鍘熷洜锛�" + e.getMessage()); - } - } - - /** - * 鏍规嵁IP鍦板潃绂荤嚎鑾峰彇鍩庡競 - */ - public static String getCityInfo(String ip) { - try { - ip = ip.trim(); - // 3銆佹墽琛屾煡璇� - String region = SEARCHER.search(ip); - return region.replace("0|", "").replace("|0", ""); - } catch (Exception e) { - log.error("IP鍦板潃绂荤嚎鑾峰彇鍩庡競寮傚父 {}", ip); - return "鏈煡"; - } - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/reflect/ReflectUtils.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/reflect/ReflectUtils.java deleted file mode 100644 index 1339258..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/reflect/ReflectUtils.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.xmzs.common.core.utils.reflect; - -import cn.hutool.core.util.ReflectUtil; -import com.xmzs.common.core.utils.StringUtils; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; - -import java.lang.reflect.Method; - -/** - * 鍙嶅皠宸ュ叿绫�. 鎻愪緵璋冪敤getter/setter鏂规硶, 璁块棶绉佹湁鍙橀噺, 璋冪敤绉佹湁鏂规硶, 鑾峰彇娉涘瀷绫诲瀷Class, 琚獳OP杩囩殑鐪熷疄绫荤瓑宸ュ叿鍑芥暟. - * - * @author Lion Li - */ -@SuppressWarnings("rawtypes") -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class ReflectUtils extends ReflectUtil { - - private static final String SETTER_PREFIX = "set"; - - private static final String GETTER_PREFIX = "get"; - - /** - * 璋冪敤Getter鏂规硶. - * 鏀寔澶氱骇锛屽锛氬璞″悕.瀵硅薄鍚�.鏂规硶 - */ - @SuppressWarnings("unchecked") - public static <E> E invokeGetter(Object obj, String propertyName) { - Object object = obj; - for (String name : StringUtils.split(propertyName, ".")) { - String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(name); - object = invoke(object, getterMethodName); - } - return (E) object; - } - - /** - * 璋冪敤Setter鏂规硶, 浠呭尮閰嶆柟娉曞悕銆� - * 鏀寔澶氱骇锛屽锛氬璞″悕.瀵硅薄鍚�.鏂规硶 - */ - public static <E> void invokeSetter(Object obj, String propertyName, E value) { - Object object = obj; - String[] names = StringUtils.split(propertyName, "."); - for (int i = 0; i < names.length; i++) { - if (i < names.length - 1) { - String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(names[i]); - object = invoke(object, getterMethodName); - } else { - String setterMethodName = SETTER_PREFIX + StringUtils.capitalize(names[i]); - Method method = getMethodByName(object.getClass(), setterMethodName); - invoke(object, method, value); - } - } - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/sql/SqlUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/sql/SqlUtil.java deleted file mode 100644 index 46fa925..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/utils/sql/SqlUtil.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.xmzs.common.core.utils.sql; - -import com.xmzs.common.core.exception.UtilException; -import com.xmzs.common.core.utils.StringUtils; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; - -/** - * sql鎿嶄綔宸ュ叿绫� - * - * @author ruoyi - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class SqlUtil { - - /** - * 瀹氫箟甯哥敤鐨� sql鍏抽敭瀛� - */ - public static final String SQL_REGEX = "select |insert |delete |update |drop |count |exec |chr |mid |master |truncate |char |and |declare "; - - /** - * 浠呮敮鎸佸瓧姣嶃�佹暟瀛椼�佷笅鍒掔嚎銆佺┖鏍笺�侀�楀彿銆佸皬鏁扮偣锛堟敮鎸佸涓瓧娈垫帓搴忥級 - */ - public static final String SQL_PATTERN = "[a-zA-Z0-9_\\ \\,\\.]+"; - - /** - * 妫�鏌ュ瓧绗︼紝闃叉娉ㄥ叆缁曡繃 - */ - public static String escapeOrderBySql(String value) { - if (StringUtils.isNotEmpty(value) && !isValidOrderBySql(value)) { - throw new UtilException("鍙傛暟涓嶇鍚堣鑼冿紝涓嶈兘杩涜鏌ヨ"); - } - return value; - } - - /** - * 楠岃瘉 order by 璇硶鏄惁绗﹀悎瑙勮寖 - */ - public static boolean isValidOrderBySql(String value) { - return value.matches(SQL_PATTERN); - } - - /** - * SQL鍏抽敭瀛楁鏌� - */ - public static void filterKeyword(String value) { - if (StringUtils.isEmpty(value)) { - return; - } - String[] sqlKeywords = StringUtils.split(SQL_REGEX, "\\|"); - for (String sqlKeyword : sqlKeywords) { - if (StringUtils.indexOfIgnoreCase(value, sqlKeyword) > -1) { - throw new UtilException("鍙傛暟瀛樺湪SQL娉ㄥ叆椋庨櫓"); - } - } - } -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/validate/AddGroup.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/validate/AddGroup.java deleted file mode 100644 index 0fa2a72..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/validate/AddGroup.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.xmzs.common.core.validate; - -/** - * 鏍¢獙鍒嗙粍 add - * - * @author Lion Li - */ -public interface AddGroup { -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/validate/EditGroup.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/validate/EditGroup.java deleted file mode 100644 index 85a780e..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/validate/EditGroup.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.xmzs.common.core.validate; - -/** - * 鏍¢獙鍒嗙粍 edit - * - * @author Lion Li - */ -public interface EditGroup { -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/validate/QueryGroup.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/validate/QueryGroup.java deleted file mode 100644 index 89edfee..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/validate/QueryGroup.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.xmzs.common.core.validate; - -/** - * 鏍¢獙鍒嗙粍 query - * - * @author Lion Li - */ -public interface QueryGroup { -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/xss/Xss.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/xss/Xss.java deleted file mode 100644 index 595a424..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/xss/Xss.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xmzs.common.core.xss; - -import jakarta.validation.Constraint; -import jakarta.validation.Payload; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * 鑷畾涔墄ss鏍¢獙娉ㄨВ - * - * @author Lion Li - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(value = {ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.PARAMETER}) -@Constraint(validatedBy = {XssValidator.class}) -public @interface Xss { - - String message() default "涓嶅厑璁镐换浣曡剼鏈繍琛�"; - - Class<?>[] groups() default {}; - - Class<? extends Payload>[] payload() default {}; - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/xss/XssValidator.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/xss/XssValidator.java deleted file mode 100644 index 902b900..0000000 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/xmzs/common/core/xss/XssValidator.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.common.core.xss; - -import cn.hutool.core.util.ReUtil; -import cn.hutool.http.HtmlUtil; - -import jakarta.validation.ConstraintValidator; -import jakarta.validation.ConstraintValidatorContext; - -/** - * 鑷畾涔墄ss鏍¢獙娉ㄨВ瀹炵幇 - * - * @author Lion Li - */ -public class XssValidator implements ConstraintValidator<Xss, String> { - - @Override - public boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext) { - return !ReUtil.contains(HtmlUtil.RE_HTML_MARK, value); - } - -} diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/org/ruoyi/common/core/constant/Constants.java b/ruoyi-common/ruoyi-common-core/src/main/java/org/ruoyi/common/core/constant/Constants.java index 4100100..b8f55c2 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/org/ruoyi/common/core/constant/Constants.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/org/ruoyi/common/core/constant/Constants.java @@ -68,6 +68,16 @@ Integer CAPTCHA_EXPIRATION = 30; /** + * 鏂囧澶歛piToken KEY + */ + String WDD_TOKEN_KEY = "sys_chat:wdd_api_token:"; + + /** + * 鏂囧澶歛piToken鏈夋晥鏈燂紙鍒嗛挓锛� + */ + Integer WDD_TOKEN_EXPIRATION = 60 * 2; + + /** * 浠ょ墝 */ String TOKEN = "token"; diff --git a/ruoyi-common/ruoyi-common-doc/src/main/java/com/xmzs/common/doc/config/SwaggerConfig.java b/ruoyi-common/ruoyi-common-doc/src/main/java/com/xmzs/common/doc/config/SwaggerConfig.java deleted file mode 100644 index 19bb10d..0000000 --- a/ruoyi-common/ruoyi-common-doc/src/main/java/com/xmzs/common/doc/config/SwaggerConfig.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.xmzs.common.doc.config; - -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.doc.config.properties.SwaggerProperties; -import com.xmzs.common.doc.handler.OpenApiHandler; -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.Paths; -import io.swagger.v3.oas.models.info.Info; -import io.swagger.v3.oas.models.security.SecurityRequirement; -import lombok.RequiredArgsConstructor; -import org.springdoc.core.configuration.SpringDocConfiguration; -import org.springdoc.core.customizers.OpenApiBuilderCustomizer; -import org.springdoc.core.customizers.OpenApiCustomizer; -import org.springdoc.core.customizers.ServerBaseUrlCustomizer; -import org.springdoc.core.properties.SpringDocConfigProperties; -import org.springdoc.core.providers.JavadocProvider; -import org.springdoc.core.service.OpenAPIService; -import org.springdoc.core.service.SecurityService; -import org.springdoc.core.utils.PropertyResolverUtils; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.autoconfigure.web.ServerProperties; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.Bean; - -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; -import java.util.Set; - -/** - * Swagger 鏂囨。閰嶇疆 - * - * @author Lion Li - */ -@RequiredArgsConstructor -@AutoConfiguration(before = SpringDocConfiguration.class) -@EnableConfigurationProperties(SwaggerProperties.class) -@ConditionalOnProperty(name = "springdoc.api-docs.enabled", havingValue = "true", matchIfMissing = true) -public class SwaggerConfig { - - private final ServerProperties serverProperties; - - @Bean - @ConditionalOnMissingBean(OpenAPI.class) - public OpenAPI openApi(SwaggerProperties swaggerProperties) { - OpenAPI openApi = new OpenAPI(); - // 鏂囨。鍩烘湰淇℃伅 - SwaggerProperties.InfoProperties infoProperties = swaggerProperties.getInfo(); - Info info = convertInfo(infoProperties); - openApi.info(info); - // 鎵╁睍鏂囨。淇℃伅 - openApi.externalDocs(swaggerProperties.getExternalDocs()); - openApi.tags(swaggerProperties.getTags()); - openApi.paths(swaggerProperties.getPaths()); - openApi.components(swaggerProperties.getComponents()); - Set<String> keySet = swaggerProperties.getComponents().getSecuritySchemes().keySet(); - List<SecurityRequirement> list = new ArrayList<>(); - SecurityRequirement securityRequirement = new SecurityRequirement(); - keySet.forEach(securityRequirement::addList); - list.add(securityRequirement); - openApi.security(list); - - return openApi; - } - - private Info convertInfo(SwaggerProperties.InfoProperties infoProperties) { - Info info = new Info(); - info.setTitle(infoProperties.getTitle()); - info.setDescription(infoProperties.getDescription()); - info.setContact(infoProperties.getContact()); - info.setLicense(infoProperties.getLicense()); - info.setVersion(infoProperties.getVersion()); - return info; - } - - /** - * 鑷畾涔� openapi 澶勭悊鍣� - */ - @Bean - public OpenAPIService openApiBuilder(Optional<OpenAPI> openAPI, - SecurityService securityParser, - SpringDocConfigProperties springDocConfigProperties, PropertyResolverUtils propertyResolverUtils, - Optional<List<OpenApiBuilderCustomizer>> openApiBuilderCustomisers, - Optional<List<ServerBaseUrlCustomizer>> serverBaseUrlCustomisers, Optional<JavadocProvider> javadocProvider) { - return new OpenApiHandler(openAPI, securityParser, springDocConfigProperties, propertyResolverUtils, openApiBuilderCustomisers, serverBaseUrlCustomisers, javadocProvider); - } - - /** - * 瀵瑰凡缁忕敓鎴愬ソ鐨� OpenApi 杩涜鑷畾涔夋搷浣� - */ - @Bean - public OpenApiCustomizer openApiCustomizer() { - String contextPath = serverProperties.getServlet().getContextPath(); - String finalContextPath; - if (StringUtils.isBlank(contextPath) || "/".equals(contextPath)) { - finalContextPath = ""; - } else { - finalContextPath = contextPath; - } - // 瀵规墍鏈夎矾寰勫鍔犲墠缃笂涓嬫枃璺緞 - return openApi -> { - Paths oldPaths = openApi.getPaths(); - if (oldPaths instanceof PlusPaths) { - return; - } - PlusPaths newPaths = new PlusPaths(); - oldPaths.forEach((k, v) -> newPaths.addPathItem(finalContextPath + k, v)); - openApi.setPaths(newPaths); - }; - } - - /** - * 鍗曠嫭浣跨敤涓�涓被渚夸簬鍒ゆ柇 瑙e喅springdoc璺緞鎷兼帴閲嶅闂 - * - * @author Lion Li - */ - static class PlusPaths extends Paths { - - public PlusPaths() { - super(); - } - } - -} diff --git a/ruoyi-common/ruoyi-common-doc/src/main/java/com/xmzs/common/doc/config/properties/SwaggerProperties.java b/ruoyi-common/ruoyi-common-doc/src/main/java/com/xmzs/common/doc/config/properties/SwaggerProperties.java deleted file mode 100644 index b94519c..0000000 --- a/ruoyi-common/ruoyi-common-doc/src/main/java/com/xmzs/common/doc/config/properties/SwaggerProperties.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.xmzs.common.doc.config.properties; - -import io.swagger.v3.oas.models.Components; -import io.swagger.v3.oas.models.ExternalDocumentation; -import io.swagger.v3.oas.models.Paths; -import io.swagger.v3.oas.models.info.Contact; -import io.swagger.v3.oas.models.info.License; -import io.swagger.v3.oas.models.tags.Tag; -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.context.properties.NestedConfigurationProperty; - -import java.util.List; - -/** - * swagger 閰嶇疆灞炴�� - * - * @author Lion Li - */ -@Data -@ConfigurationProperties(prefix = "swagger") -public class SwaggerProperties { - - /** - * 鏂囨。鍩烘湰淇℃伅 - */ - @NestedConfigurationProperty - private InfoProperties info = new InfoProperties(); - - /** - * 鎵╁睍鏂囨。鍦板潃 - */ - @NestedConfigurationProperty - private ExternalDocumentation externalDocs; - - /** - * 鏍囩 - */ - private List<Tag> tags = null; - - /** - * 璺緞 - */ - @NestedConfigurationProperty - private Paths paths = null; - - /** - * 缁勪欢 - */ - @NestedConfigurationProperty - private Components components = null; - - /** - * <p> - * 鏂囨。鐨勫熀纭�灞炴�т俊鎭� - * </p> - * - * @see io.swagger.v3.oas.models.info.Info - * - * 涓轰簡 springboot 鑷姩鐢熶骇閰嶇疆鎻愮ず淇℃伅锛屾墍浠ヨ繖閲屽鍒朵竴涓被鍑烘潵 - */ - @Data - public static class InfoProperties { - - /** - * 鏍囬 - */ - private String title = null; - - /** - * 鎻忚堪 - */ - private String description = null; - - /** - * 鑱旂郴浜轰俊鎭� - */ - @NestedConfigurationProperty - private Contact contact = null; - - /** - * 璁稿彲璇� - */ - @NestedConfigurationProperty - private License license = null; - - /** - * 鐗堟湰 - */ - private String version = null; - - } - -} diff --git a/ruoyi-common/ruoyi-common-doc/src/main/java/com/xmzs/common/doc/handler/OpenApiHandler.java b/ruoyi-common/ruoyi-common-doc/src/main/java/com/xmzs/common/doc/handler/OpenApiHandler.java deleted file mode 100644 index ddf888f..0000000 --- a/ruoyi-common/ruoyi-common-doc/src/main/java/com/xmzs/common/doc/handler/OpenApiHandler.java +++ /dev/null @@ -1,252 +0,0 @@ -package com.xmzs.common.doc.handler; - -import cn.hutool.core.io.IoUtil; -import io.swagger.v3.core.jackson.TypeNameResolver; -import io.swagger.v3.core.util.AnnotationsUtils; -import io.swagger.v3.oas.annotations.tags.Tags; -import io.swagger.v3.oas.models.Components; -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.Operation; -import io.swagger.v3.oas.models.Paths; -import io.swagger.v3.oas.models.tags.Tag; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.springdoc.core.customizers.OpenApiBuilderCustomizer; -import org.springdoc.core.customizers.ServerBaseUrlCustomizer; -import org.springdoc.core.properties.SpringDocConfigProperties; -import org.springdoc.core.providers.JavadocProvider; -import org.springdoc.core.service.OpenAPIService; -import org.springdoc.core.service.SecurityService; -import org.springdoc.core.utils.PropertyResolverUtils; -import org.springframework.context.ApplicationContext; -import org.springframework.core.annotation.AnnotatedElementUtils; -import org.springframework.util.CollectionUtils; -import org.springframework.web.method.HandlerMethod; - -import java.io.StringReader; -import java.lang.reflect.Method; -import java.util.*; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -/** - * 鑷畾涔� openapi 澶勭悊鍣� - * 瀵规簮鐮佸姛鑳借繘琛屼慨鏀� 澧炲己浣跨敤 - */ -@Slf4j -@SuppressWarnings("all") -public class OpenApiHandler extends OpenAPIService { - - /** - * The Basic error controller. - */ - private static Class<?> basicErrorController; - - /** - * The Security parser. - */ - private final SecurityService securityParser; - - /** - * The Mappings map. - */ - private final Map<String, Object> mappingsMap = new HashMap<>(); - - /** - * The Springdoc tags. - */ - private final Map<HandlerMethod, Tag> springdocTags = new HashMap<>(); - - /** - * The Open api builder customisers. - */ - private final Optional<List<OpenApiBuilderCustomizer>> openApiBuilderCustomisers; - - /** - * The server base URL customisers. - */ - private final Optional<List<ServerBaseUrlCustomizer>> serverBaseUrlCustomizers; - - /** - * The Spring doc config properties. - */ - private final SpringDocConfigProperties springDocConfigProperties; - - /** - * The Cached open api map. - */ - private final Map<String, OpenAPI> cachedOpenAPI = new HashMap<>(); - - /** - * The Property resolver utils. - */ - private final PropertyResolverUtils propertyResolverUtils; - - /** - * The javadoc provider. - */ - private final Optional<JavadocProvider> javadocProvider; - - /** - * The Context. - */ - private ApplicationContext context; - - /** - * The Open api. - */ - private OpenAPI openAPI; - - /** - * The Is servers present. - */ - private boolean isServersPresent; - - /** - * The Server base url. - */ - private String serverBaseUrl; - - /** - * Instantiates a new Open api builder. - * - * @param openAPI the open api - * @param securityParser the security parser - * @param springDocConfigProperties the spring doc config properties - * @param propertyResolverUtils the property resolver utils - * @param openApiBuilderCustomizers the open api builder customisers - * @param serverBaseUrlCustomizers the server base url customizers - * @param javadocProvider the javadoc provider - */ - public OpenApiHandler(Optional<OpenAPI> openAPI, SecurityService securityParser, - SpringDocConfigProperties springDocConfigProperties, PropertyResolverUtils propertyResolverUtils, - Optional<List<OpenApiBuilderCustomizer>> openApiBuilderCustomizers, - Optional<List<ServerBaseUrlCustomizer>> serverBaseUrlCustomizers, - Optional<JavadocProvider> javadocProvider) { - super(openAPI, securityParser, springDocConfigProperties, propertyResolverUtils, openApiBuilderCustomizers, serverBaseUrlCustomizers, javadocProvider); - if (openAPI.isPresent()) { - this.openAPI = openAPI.get(); - if (this.openAPI.getComponents() == null) - this.openAPI.setComponents(new Components()); - if (this.openAPI.getPaths() == null) - this.openAPI.setPaths(new Paths()); - if (!CollectionUtils.isEmpty(this.openAPI.getServers())) - this.isServersPresent = true; - } - this.propertyResolverUtils = propertyResolverUtils; - this.securityParser = securityParser; - this.springDocConfigProperties = springDocConfigProperties; - this.openApiBuilderCustomisers = openApiBuilderCustomizers; - this.serverBaseUrlCustomizers = serverBaseUrlCustomizers; - this.javadocProvider = javadocProvider; - if (springDocConfigProperties.isUseFqn()) - TypeNameResolver.std.setUseFqn(true); - } - - @Override - public Operation buildTags(HandlerMethod handlerMethod, Operation operation, OpenAPI openAPI, Locale locale) { - - Set<Tag> tags = new HashSet<>(); - Set<String> tagsStr = new HashSet<>(); - - buildTagsFromMethod(handlerMethod.getMethod(), tags, tagsStr, locale); - buildTagsFromClass(handlerMethod.getBeanType(), tags, tagsStr, locale); - - if (!CollectionUtils.isEmpty(tagsStr)) - tagsStr = tagsStr.stream() - .map(str -> propertyResolverUtils.resolve(str, locale)) - .collect(Collectors.toSet()); - - if (springdocTags.containsKey(handlerMethod)) { - io.swagger.v3.oas.models.tags.Tag tag = springdocTags.get(handlerMethod); - tagsStr.add(tag.getName()); - if (openAPI.getTags() == null || !openAPI.getTags().contains(tag)) { - openAPI.addTagsItem(tag); - } - } - - if (!CollectionUtils.isEmpty(tagsStr)) { - if (CollectionUtils.isEmpty(operation.getTags())) - operation.setTags(new ArrayList<>(tagsStr)); - else { - Set<String> operationTagsSet = new HashSet<>(operation.getTags()); - operationTagsSet.addAll(tagsStr); - operation.getTags().clear(); - operation.getTags().addAll(operationTagsSet); - } - } - - if (isAutoTagClasses(operation)) { - - - if (javadocProvider.isPresent()) { - String description = javadocProvider.get().getClassJavadoc(handlerMethod.getBeanType()); - if (StringUtils.isNotBlank(description)) { - io.swagger.v3.oas.models.tags.Tag tag = new io.swagger.v3.oas.models.tags.Tag(); - - // 鑷畾涔夐儴鍒� 淇敼浣跨敤java娉ㄩ噴褰搕ag鍚� - List<String> list = IoUtil.readLines(new StringReader(description), new ArrayList<>()); - // tag.setName(tagAutoName); - tag.setName(list.get(0)); - operation.addTagsItem(list.get(0)); - - tag.setDescription(description); - if (openAPI.getTags() == null || !openAPI.getTags().contains(tag)) { - openAPI.addTagsItem(tag); - } - } - } else { - String tagAutoName = splitCamelCase(handlerMethod.getBeanType().getSimpleName()); - operation.addTagsItem(tagAutoName); - } - } - - if (!CollectionUtils.isEmpty(tags)) { - // Existing tags - List<io.swagger.v3.oas.models.tags.Tag> openApiTags = openAPI.getTags(); - if (!CollectionUtils.isEmpty(openApiTags)) - tags.addAll(openApiTags); - openAPI.setTags(new ArrayList<>(tags)); - } - - // Handle SecurityRequirement at operation level - io.swagger.v3.oas.annotations.security.SecurityRequirement[] securityRequirements = securityParser - .getSecurityRequirements(handlerMethod); - if (securityRequirements != null) { - if (securityRequirements.length == 0) - operation.setSecurity(Collections.emptyList()); - else - securityParser.buildSecurityRequirement(securityRequirements, operation); - } - - return operation; - } - - private void buildTagsFromMethod(Method method, Set<io.swagger.v3.oas.models.tags.Tag> tags, Set<String> tagsStr, Locale locale) { - // method tags - Set<Tags> tagsSet = AnnotatedElementUtils - .findAllMergedAnnotations(method, Tags.class); - Set<io.swagger.v3.oas.annotations.tags.Tag> methodTags = tagsSet.stream() - .flatMap(x -> Stream.of(x.value())).collect(Collectors.toSet()); - methodTags.addAll(AnnotatedElementUtils.findAllMergedAnnotations(method, io.swagger.v3.oas.annotations.tags.Tag.class)); - if (!CollectionUtils.isEmpty(methodTags)) { - tagsStr.addAll(methodTags.stream().map(tag -> propertyResolverUtils.resolve(tag.name(), locale)).collect(Collectors.toSet())); - List<io.swagger.v3.oas.annotations.tags.Tag> allTags = new ArrayList<>(methodTags); - addTags(allTags, tags, locale); - } - } - - private void addTags(List<io.swagger.v3.oas.annotations.tags.Tag> sourceTags, Set<io.swagger.v3.oas.models.tags.Tag> tags, Locale locale) { - Optional<Set<io.swagger.v3.oas.models.tags.Tag>> optionalTagSet = AnnotationsUtils - .getTags(sourceTags.toArray(new io.swagger.v3.oas.annotations.tags.Tag[0]), true); - optionalTagSet.ifPresent(tagsSet -> { - tagsSet.forEach(tag -> { - tag.name(propertyResolverUtils.resolve(tag.getName(), locale)); - tag.description(propertyResolverUtils.resolve(tag.getDescription(), locale)); - if (tags.stream().noneMatch(t -> t.getName().equals(tag.getName()))) - tags.add(tag); - }); - }); - } - -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/annotation/EncryptField.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/annotation/EncryptField.java deleted file mode 100644 index 536a07b..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/annotation/EncryptField.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.xmzs.common.encrypt.annotation; - -import com.xmzs.common.encrypt.enumd.AlgorithmType; -import com.xmzs.common.encrypt.enumd.EncodeType; - -import java.lang.annotation.*; - -/** - * 瀛楁鍔犲瘑娉ㄨВ - * - * @author 鑰侀┈ - */ -@Documented -@Inherited -@Target({ElementType.FIELD}) -@Retention(RetentionPolicy.RUNTIME) -public @interface EncryptField { - - /** - * 鍔犲瘑绠楁硶 - */ - AlgorithmType algorithm() default AlgorithmType.DEFAULT; - - /** - * 绉橀挜銆侫ES銆丼M4闇�瑕� - */ - String password() default ""; - - /** - * 鍏挜銆俁SA銆丼M2闇�瑕� - */ - String publicKey() default ""; - - /** - * 鍏挜銆俁SA銆丼M2闇�瑕� - */ - String privateKey() default ""; - - /** - * 缂栫爜鏂瑰紡銆傚鍔犲瘑绠楁硶涓築ASE64鐨勪笉璧蜂綔鐢� - */ - EncodeType encode() default EncodeType.DEFAULT; - -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/config/EncryptorAutoConfiguration.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/config/EncryptorAutoConfiguration.java deleted file mode 100644 index 3d7f093..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/config/EncryptorAutoConfiguration.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.xmzs.common.encrypt.config; - -import com.xmzs.common.encrypt.core.EncryptorManager; -import com.xmzs.common.encrypt.interceptor.MybatisDecryptInterceptor; -import com.xmzs.common.encrypt.interceptor.MybatisEncryptInterceptor; -import com.xmzs.common.encrypt.properties.EncryptorProperties; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.Bean; - -/** - * 鍔犺В瀵嗛厤缃� - * - * @author 鑰侀┈ - * @version 4.6.0 - */ -@AutoConfiguration -@EnableConfigurationProperties(EncryptorProperties.class) -@ConditionalOnProperty(value = "mybatis-encryptor.enable", havingValue = "true") -public class EncryptorAutoConfiguration { - - @Autowired - private EncryptorProperties properties; - - @Bean - public EncryptorManager encryptorManager() { - return new EncryptorManager(); - } - - @Bean - public MybatisEncryptInterceptor mybatisEncryptInterceptor(EncryptorManager encryptorManager) { - return new MybatisEncryptInterceptor(encryptorManager, properties); - } - - @Bean - public MybatisDecryptInterceptor mybatisDecryptInterceptor(EncryptorManager encryptorManager) { - return new MybatisDecryptInterceptor(encryptorManager, properties); - } -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/EncryptContext.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/EncryptContext.java deleted file mode 100644 index 9dc9ae5..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/EncryptContext.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.xmzs.common.encrypt.core; - -import com.xmzs.common.encrypt.enumd.AlgorithmType; -import com.xmzs.common.encrypt.enumd.EncodeType; -import lombok.Data; - -/** - * 鍔犲瘑涓婁笅鏂� 鐢ㄤ簬encryptor浼犻�掑繀瑕佺殑鍙傛暟銆� - * - * @author 鑰侀┈ - * @version 4.6.0 - */ -@Data -public class EncryptContext { - - /** - * 榛樿绠楁硶 - */ - private AlgorithmType algorithm; - - /** - * 瀹夊叏绉橀挜 - */ - private String password; - - /** - * 鍏挜 - */ - private String publicKey; - - /** - * 绉侀挜 - */ - private String privateKey; - - /** - * 缂栫爜鏂瑰紡锛宐ase64/hex - */ - private EncodeType encode; - -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/EncryptorManager.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/EncryptorManager.java deleted file mode 100644 index 088fb5b..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/EncryptorManager.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.xmzs.common.encrypt.core; - -import cn.hutool.core.util.ReflectUtil; -import com.xmzs.common.encrypt.annotation.EncryptField; -import lombok.extern.slf4j.Slf4j; - -import java.lang.reflect.Field; -import java.util.Arrays; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.stream.Collectors; - -/** - * 鍔犲瘑绠$悊绫� - * - * @author 鑰侀┈ - * @version 4.6.0 - */ -@Slf4j -public class EncryptorManager { - - /** - * 缂撳瓨鍔犲瘑鍣� - */ - Map<EncryptContext, IEncryptor> encryptorMap = new ConcurrentHashMap<>(); - - /** - * 绫诲姞瀵嗗瓧娈电紦瀛� - */ - Map<Class<?>, Set<Field>> fieldCache = new ConcurrentHashMap<>(); - - /** - * 鑾峰彇绫诲姞瀵嗗瓧娈电紦瀛� - */ - public Set<Field> getFieldCache(Class<?> sourceClazz) { - return fieldCache.computeIfAbsent(sourceClazz, clazz -> { - Field[] declaredFields = clazz.getDeclaredFields(); - Set<Field> fieldSet = Arrays.stream(declaredFields).filter(field -> - field.isAnnotationPresent(EncryptField.class) && field.getType() == String.class) - .collect(Collectors.toSet()); - for (Field field : fieldSet) { - field.setAccessible(true); - } - return fieldSet; - }); - } - - /** - * 娉ㄥ唽鍔犲瘑鎵ц鑰呭埌缂撳瓨 - * - * @param encryptContext 鍔犲瘑鎵ц鑰呴渶瑕佺殑鐩稿叧閰嶇疆鍙傛暟 - */ - public IEncryptor registAndGetEncryptor(EncryptContext encryptContext) { - if (encryptorMap.containsKey(encryptContext)) { - return encryptorMap.get(encryptContext); - } - IEncryptor encryptor = ReflectUtil.newInstance(encryptContext.getAlgorithm().getClazz(), encryptContext); - encryptorMap.put(encryptContext, encryptor); - return encryptor; - } - - /** - * 绉婚櫎缂撳瓨涓殑鍔犲瘑鎵ц鑰� - * - * @param encryptContext 鍔犲瘑鎵ц鑰呴渶瑕佺殑鐩稿叧閰嶇疆鍙傛暟 - */ - public void removeEncryptor(EncryptContext encryptContext) { - this.encryptorMap.remove(encryptContext); - } - - /** - * 鏍规嵁閰嶇疆杩涜鍔犲瘑銆備細杩涜鏈湴缂撳瓨瀵瑰簲鐨勭畻娉曞拰瀵瑰簲鐨勭閽ヤ俊鎭�� - * - * @param value 寰呭姞瀵嗙殑鍊� - * @param encryptContext 鍔犲瘑鐩稿叧鐨勯厤缃俊鎭� - */ - public String encrypt(String value, EncryptContext encryptContext) { - IEncryptor encryptor = this.registAndGetEncryptor(encryptContext); - return encryptor.encrypt(value, encryptContext.getEncode()); - } - - /** - * 鏍规嵁閰嶇疆杩涜瑙e瘑 - * - * @param value 寰呰В瀵嗙殑鍊� - * @param encryptContext 鍔犲瘑鐩稿叧鐨勯厤缃俊鎭� - */ - public String decrypt(String value, EncryptContext encryptContext) { - IEncryptor encryptor = this.registAndGetEncryptor(encryptContext); - return encryptor.decrypt(value); - } - -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/IEncryptor.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/IEncryptor.java deleted file mode 100644 index f9fef58..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/IEncryptor.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.xmzs.common.encrypt.core; - -import com.xmzs.common.encrypt.enumd.AlgorithmType; -import com.xmzs.common.encrypt.enumd.EncodeType; - -/** - * 鍔犺В鑰� - * - * @author 鑰侀┈ - * @version 4.6.0 - */ -public interface IEncryptor { - - /** - * 鑾峰緱褰撳墠绠楁硶 - */ - AlgorithmType algorithm(); - - /** - * 鍔犲瘑 - * - * @param value 寰呭姞瀵嗗瓧绗︿覆 - * @param encodeType 鍔犲瘑鍚庣殑缂栫爜鏍煎紡 - * @return 鍔犲瘑鍚庣殑瀛楃涓� - */ - String encrypt(String value, EncodeType encodeType); - - /** - * 瑙e瘑 - * - * @param value 寰呭姞瀵嗗瓧绗︿覆 - * @return 瑙e瘑鍚庣殑瀛楃涓� - */ - String decrypt(String value); -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/AbstractEncryptor.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/AbstractEncryptor.java deleted file mode 100644 index 6f6c740..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/AbstractEncryptor.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.common.encrypt.core.encryptor; - -import com.xmzs.common.encrypt.core.EncryptContext; -import com.xmzs.common.encrypt.core.IEncryptor; - -/** - * 鎵�鏈夊姞瀵嗘墽琛岃�呯殑鍩虹被 - * - * @author 鑰侀┈ - * @version 4.6.0 - */ -public abstract class AbstractEncryptor implements IEncryptor { - - public AbstractEncryptor(EncryptContext context) { - // 鐢ㄦ埛閰嶇疆鏍¢獙涓庨厤缃敞鍏� - } - -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/AesEncryptor.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/AesEncryptor.java deleted file mode 100644 index 02957ba..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/AesEncryptor.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.xmzs.common.encrypt.core.encryptor; - -import cn.hutool.core.util.ArrayUtil; -import cn.hutool.core.util.StrUtil; -import cn.hutool.crypto.SecureUtil; -import cn.hutool.crypto.symmetric.AES; -import com.xmzs.common.encrypt.core.EncryptContext; -import com.xmzs.common.encrypt.enumd.AlgorithmType; -import com.xmzs.common.encrypt.enumd.EncodeType; - -import java.nio.charset.StandardCharsets; - -/** - * AES绠楁硶瀹炵幇 - * - * @author 鑰侀┈ - * @version 4.6.0 - */ -public class AesEncryptor extends AbstractEncryptor { - - private final AES aes; - - public AesEncryptor(EncryptContext context) { - super(context); - String password = context.getPassword(); - if (StrUtil.isBlank(password)) { - throw new IllegalArgumentException("AES娌℃湁鑾峰緱绉橀挜淇℃伅"); - } - // aes绠楁硶鐨勭閽ヨ姹傛槸16浣嶃��24浣嶃��32浣� - int[] array = {16, 24, 32}; - if (!ArrayUtil.contains(array, password.length())) { - throw new IllegalArgumentException("AES绉橀挜闀垮害搴旇涓�16浣嶃��24浣嶃��32浣嶏紝瀹為檯涓�" + password.length() + "浣�"); - } - aes = SecureUtil.aes(context.getPassword().getBytes(StandardCharsets.UTF_8)); - } - - /** - * 鑾峰緱褰撳墠绠楁硶 - */ - @Override - public AlgorithmType algorithm() { - return AlgorithmType.AES; - } - - /** - * 鍔犲瘑 - * - * @param value 寰呭姞瀵嗗瓧绗︿覆 - * @param encodeType 鍔犲瘑鍚庣殑缂栫爜鏍煎紡 - */ - @Override - public String encrypt(String value, EncodeType encodeType) { - if (encodeType == EncodeType.HEX) { - return aes.encryptHex(value); - } else { - return aes.encryptBase64(value); - } - } - - /** - * 瑙e瘑 - * - * @param value 寰呭姞瀵嗗瓧绗︿覆 - */ - @Override - public String decrypt(String value) { - return this.aes.decryptStr(value); - } -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/Base64Encryptor.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/Base64Encryptor.java deleted file mode 100644 index f4567e0..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/Base64Encryptor.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.xmzs.common.encrypt.core.encryptor; - -import cn.hutool.core.codec.Base64; -import com.xmzs.common.encrypt.core.EncryptContext; -import com.xmzs.common.encrypt.enumd.AlgorithmType; -import com.xmzs.common.encrypt.enumd.EncodeType; - -/** - * Base64绠楁硶瀹炵幇 - * - * @author 鑰侀┈ - * @version 4.6.0 - */ -public class Base64Encryptor extends AbstractEncryptor { - - public Base64Encryptor(EncryptContext context) { - super(context); - } - - /** - * 鑾峰緱褰撳墠绠楁硶 - */ - @Override - public AlgorithmType algorithm() { - return AlgorithmType.BASE64; - } - - /** - * 鍔犲瘑 - * - * @param value 寰呭姞瀵嗗瓧绗︿覆 - * @param encodeType 鍔犲瘑鍚庣殑缂栫爜鏍煎紡 - */ - @Override - public String encrypt(String value, EncodeType encodeType) { - return Base64.encode(value); - } - - /** - * 瑙e瘑 - * - * @param value 寰呭姞瀵嗗瓧绗︿覆 - */ - @Override - public String decrypt(String value) { - return Base64.decodeStr(value); - } -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/RsaEncryptor.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/RsaEncryptor.java deleted file mode 100644 index f21a854..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/RsaEncryptor.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.xmzs.common.encrypt.core.encryptor; - -import cn.hutool.core.codec.Base64; -import cn.hutool.crypto.SecureUtil; -import cn.hutool.crypto.asymmetric.KeyType; -import cn.hutool.crypto.asymmetric.RSA; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.encrypt.core.EncryptContext; -import com.xmzs.common.encrypt.enumd.AlgorithmType; -import com.xmzs.common.encrypt.enumd.EncodeType; - - -/** - * RSA绠楁硶瀹炵幇 - * - * @author 鑰侀┈ - * @version 4.6.0 - */ -public class RsaEncryptor extends AbstractEncryptor { - - private final RSA rsa; - - public RsaEncryptor(EncryptContext context) { - super(context); - String privateKey = context.getPrivateKey(); - String publicKey = context.getPublicKey(); - if (StringUtils.isAnyEmpty(privateKey, publicKey)) { - throw new IllegalArgumentException("RSA鍏閽ュ潎闇�瑕佹彁渚涳紝鍏挜鍔犲瘑锛岀閽ヨВ瀵嗐��"); - } - this.rsa = SecureUtil.rsa(Base64.decode(privateKey), Base64.decode(publicKey)); - } - - /** - * 鑾峰緱褰撳墠绠楁硶 - */ - @Override - public AlgorithmType algorithm() { - return AlgorithmType.RSA; - } - - /** - * 鍔犲瘑 - * - * @param value 寰呭姞瀵嗗瓧绗︿覆 - * @param encodeType 鍔犲瘑鍚庣殑缂栫爜鏍煎紡 - */ - @Override - public String encrypt(String value, EncodeType encodeType) { - if (encodeType == EncodeType.HEX) { - return rsa.encryptHex(value, KeyType.PublicKey); - } else { - return rsa.encryptBase64(value, KeyType.PublicKey); - } - } - - /** - * 瑙e瘑 - * - * @param value 寰呭姞瀵嗗瓧绗︿覆 - */ - @Override - public String decrypt(String value) { - return this.rsa.decryptStr(value, KeyType.PrivateKey); - } -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/Sm2Encryptor.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/Sm2Encryptor.java deleted file mode 100644 index 149a65f..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/Sm2Encryptor.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.xmzs.common.encrypt.core.encryptor; - -import cn.hutool.core.codec.Base64; -import cn.hutool.crypto.SmUtil; -import cn.hutool.crypto.asymmetric.KeyType; -import cn.hutool.crypto.asymmetric.SM2; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.encrypt.core.EncryptContext; -import com.xmzs.common.encrypt.enumd.AlgorithmType; -import com.xmzs.common.encrypt.enumd.EncodeType; - -/** - * sm2绠楁硶瀹炵幇 - * - * @author 鑰侀┈ - * @version 4.6.0 - */ -public class Sm2Encryptor extends AbstractEncryptor { - - private final SM2 sm2; - - public Sm2Encryptor(EncryptContext context) { - super(context); - String privateKey = context.getPrivateKey(); - String publicKey = context.getPublicKey(); - if (StringUtils.isAnyEmpty(privateKey, publicKey)) { - throw new IllegalArgumentException("SM2鍏閽ュ潎闇�瑕佹彁渚涳紝鍏挜鍔犲瘑锛岀閽ヨВ瀵嗐��"); - } - this.sm2 = SmUtil.sm2(Base64.decode(privateKey), Base64.decode(publicKey)); - } - - /** - * 鑾峰緱褰撳墠绠楁硶 - */ - @Override - public AlgorithmType algorithm() { - return AlgorithmType.SM2; - } - - /** - * 鍔犲瘑 - * - * @param value 寰呭姞瀵嗗瓧绗︿覆 - * @param encodeType 鍔犲瘑鍚庣殑缂栫爜鏍煎紡 - */ - @Override - public String encrypt(String value, EncodeType encodeType) { - if (encodeType == EncodeType.HEX) { - return sm2.encryptHex(value, KeyType.PublicKey); - } else { - return sm2.encryptBase64(value, KeyType.PublicKey); - } - } - - /** - * 瑙e瘑 - * - * @param value 寰呭姞瀵嗗瓧绗︿覆 - */ - @Override - public String decrypt(String value) { - return this.sm2.decryptStr(value, KeyType.PrivateKey); - } -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/Sm4Encryptor.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/Sm4Encryptor.java deleted file mode 100644 index f2374ac..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/core/encryptor/Sm4Encryptor.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.xmzs.common.encrypt.core.encryptor; - -import cn.hutool.core.util.StrUtil; -import cn.hutool.crypto.SmUtil; -import cn.hutool.crypto.symmetric.SM4; -import com.xmzs.common.encrypt.core.EncryptContext; -import com.xmzs.common.encrypt.enumd.AlgorithmType; -import com.xmzs.common.encrypt.enumd.EncodeType; - -import java.nio.charset.StandardCharsets; - -/** - * sm4绠楁硶瀹炵幇 - * - * @author 鑰侀┈ - * @version 4.6.0 - */ -public class Sm4Encryptor extends AbstractEncryptor { - - private final SM4 sm4; - - public Sm4Encryptor(EncryptContext context) { - super(context); - String password = context.getPassword(); - if (StrUtil.isBlank(password)) { - throw new IllegalArgumentException("SM4娌℃湁鑾峰緱绉橀挜淇℃伅"); - } - // sm4绠楁硶鐨勭閽ヨ姹傛槸16浣嶉暱搴� - if (16 != password.length()) { - throw new IllegalArgumentException("SM4绉橀挜闀垮害搴旇涓�16浣嶏紝瀹為檯涓�" + password.length() + "浣�"); - } - this.sm4 = SmUtil.sm4(password.getBytes(StandardCharsets.UTF_8)); - } - - /** - * 鑾峰緱褰撳墠绠楁硶 - */ - @Override - public AlgorithmType algorithm() { - return AlgorithmType.SM4; - } - - /** - * 鍔犲瘑 - * - * @param value 寰呭姞瀵嗗瓧绗︿覆 - * @param encodeType 鍔犲瘑鍚庣殑缂栫爜鏍煎紡 - */ - @Override - public String encrypt(String value, EncodeType encodeType) { - if (encodeType == EncodeType.HEX) { - return sm4.encryptHex(value); - } else { - return sm4.encryptBase64(value); - } - } - - /** - * 瑙e瘑 - * - * @param value 寰呭姞瀵嗗瓧绗︿覆 - */ - @Override - public String decrypt(String value) { - return this.sm4.decryptStr(value); - } -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/enumd/AlgorithmType.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/enumd/AlgorithmType.java deleted file mode 100644 index fe90715..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/enumd/AlgorithmType.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.xmzs.common.encrypt.enumd; - -import lombok.AllArgsConstructor; -import lombok.Getter; -import com.xmzs.common.encrypt.core.encryptor.*; - -/** - * 绠楁硶鍚嶇О - * - * @author 鑰侀┈ - * @version 4.6.0 - */ -@Getter -@AllArgsConstructor -public enum AlgorithmType { - - /** - * 榛樿璧皔ml閰嶇疆 - */ - DEFAULT(null), - - /** - * base64 - */ - BASE64(Base64Encryptor.class), - - /** - * aes - */ - AES(AesEncryptor.class), - - /** - * rsa - */ - RSA(RsaEncryptor.class), - - /** - * sm2 - */ - SM2(Sm2Encryptor.class), - - /** - * sm4 - */ - SM4(Sm4Encryptor.class); - - private final Class<? extends AbstractEncryptor> clazz; -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/enumd/EncodeType.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/enumd/EncodeType.java deleted file mode 100644 index e41dcd0..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/enumd/EncodeType.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xmzs.common.encrypt.enumd; - -/** - * 缂栫爜绫诲瀷 - * - * @author 鑰侀┈ - * @version 4.6.0 - */ -public enum EncodeType { - - /** - * 榛樿浣跨敤yml閰嶇疆 - */ - DEFAULT, - - /** - * base64缂栫爜 - */ - BASE64, - - /** - * 16杩涘埗缂栫爜 - */ - HEX; - -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/interceptor/MybatisDecryptInterceptor.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/interceptor/MybatisDecryptInterceptor.java deleted file mode 100644 index c64465d..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/interceptor/MybatisDecryptInterceptor.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.xmzs.common.encrypt.interceptor; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.ObjectUtil; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.apache.ibatis.executor.resultset.ResultSetHandler; -import org.apache.ibatis.plugin.*; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.encrypt.annotation.EncryptField; -import com.xmzs.common.encrypt.core.EncryptContext; -import com.xmzs.common.encrypt.core.EncryptorManager; -import com.xmzs.common.encrypt.enumd.AlgorithmType; -import com.xmzs.common.encrypt.enumd.EncodeType; -import com.xmzs.common.encrypt.properties.EncryptorProperties; - -import java.lang.reflect.Field; -import java.sql.Statement; -import java.util.*; - -/** - * 鍑哄弬瑙e瘑鎷︽埅鍣� - * - * @author 鑰侀┈ - * @version 4.6.0 - */ -@Slf4j -@Intercepts({@Signature( - type = ResultSetHandler.class, - method = "handleResultSets", - args = {Statement.class}) -}) -@AllArgsConstructor -public class MybatisDecryptInterceptor implements Interceptor { - - private final EncryptorManager encryptorManager; - private final EncryptorProperties defaultProperties; - - @Override - public Object intercept(Invocation invocation) throws Throwable { - // 鑾峰彇鎵цmysql鎵ц缁撴灉 - Object result = invocation.proceed(); - if (result == null) { - return null; - } - decryptHandler(result); - return result; - } - - /** - * 瑙e瘑瀵硅薄 - * - * @param sourceObject 寰呭姞瀵嗗璞� - */ - private void decryptHandler(Object sourceObject) { - if (ObjectUtil.isNull(sourceObject)) { - return; - } - if (sourceObject instanceof Map<?, ?> map) { - new HashSet<>(map.values()).forEach(this::decryptHandler); - return; - } - if (sourceObject instanceof List<?> list) { - if(CollUtil.isEmpty(list)) { - return; - } - // 鍒ゆ柇绗竴涓厓绱犳槸鍚﹀惈鏈夋敞瑙c�傚鏋滄病鏈夌洿鎺ヨ繑鍥烇紝鎻愰珮鏁堢巼 - Object firstItem = list.get(0); - if (ObjectUtil.isNull(firstItem) || CollUtil.isEmpty(encryptorManager.getFieldCache(firstItem.getClass()))) { - return; - } - list.forEach(this::decryptHandler); - return; - } - Set<Field> fields = encryptorManager.getFieldCache(sourceObject.getClass()); - try { - for (Field field : fields) { - field.set(sourceObject, this.decryptField(String.valueOf(field.get(sourceObject)), field)); - } - } catch (Exception e) { - log.error("澶勭悊瑙e瘑瀛楁鏃跺嚭閿�", e); - } - } - - /** - * 瀛楁鍊艰繘琛屽姞瀵嗐�傞�氳繃瀛楁鐨勬壒娉ㄦ敞鍐屾柊鐨勫姞瀵嗙畻娉� - * - * @param value 寰呭姞瀵嗙殑鍊� - * @param field 寰呭姞瀵嗗瓧娈� - * @return 鍔犲瘑鍚庣粨鏋� - */ - private String decryptField(String value, Field field) { - if (ObjectUtil.isNull(value)) { - return null; - } - EncryptField encryptField = field.getAnnotation(EncryptField.class); - EncryptContext encryptContext = new EncryptContext(); - encryptContext.setAlgorithm(encryptField.algorithm() == AlgorithmType.DEFAULT ? defaultProperties.getAlgorithm() : encryptField.algorithm()); - encryptContext.setEncode(encryptField.encode() == EncodeType.DEFAULT ? defaultProperties.getEncode() : encryptField.encode()); - encryptContext.setPassword(StringUtils.isBlank(encryptField.password()) ? defaultProperties.getPassword() : encryptField.password()); - encryptContext.setPrivateKey(StringUtils.isBlank(encryptField.privateKey()) ? defaultProperties.getPrivateKey() : encryptField.privateKey()); - encryptContext.setPublicKey(StringUtils.isBlank(encryptField.publicKey()) ? defaultProperties.getPublicKey() : encryptField.publicKey()); - return this.encryptorManager.decrypt(value, encryptContext); - } - - @Override - public Object plugin(Object target) { - return Plugin.wrap(target, this); - } - - @Override - public void setProperties(Properties properties) { - - } -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/interceptor/MybatisEncryptInterceptor.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/interceptor/MybatisEncryptInterceptor.java deleted file mode 100644 index c79baad..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/interceptor/MybatisEncryptInterceptor.java +++ /dev/null @@ -1,119 +0,0 @@ -package com.xmzs.common.encrypt.interceptor; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.ObjectUtil; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.apache.ibatis.executor.parameter.ParameterHandler; -import org.apache.ibatis.plugin.Interceptor; -import org.apache.ibatis.plugin.Intercepts; -import org.apache.ibatis.plugin.Invocation; -import org.apache.ibatis.plugin.Signature; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.encrypt.annotation.EncryptField; -import com.xmzs.common.encrypt.core.EncryptContext; -import com.xmzs.common.encrypt.core.EncryptorManager; -import com.xmzs.common.encrypt.enumd.AlgorithmType; -import com.xmzs.common.encrypt.enumd.EncodeType; -import com.xmzs.common.encrypt.properties.EncryptorProperties; - -import java.lang.reflect.Field; -import java.sql.PreparedStatement; -import java.util.*; - -/** - * 鍏ュ弬鍔犲瘑鎷︽埅鍣� - * - * @author 鑰侀┈ - * @version 4.6.0 - */ -@Slf4j -@Intercepts({@Signature( - type = ParameterHandler.class, - method = "setParameters", - args = {PreparedStatement.class}) -}) -@AllArgsConstructor -public class MybatisEncryptInterceptor implements Interceptor { - - private final EncryptorManager encryptorManager; - private final EncryptorProperties defaultProperties; - - @Override - public Object intercept(Invocation invocation) throws Throwable { - return invocation; - } - - @Override - public Object plugin(Object target) { - if (target instanceof ParameterHandler parameterHandler) { - // 杩涜鍔犲瘑鎿嶄綔 - Object parameterObject = parameterHandler.getParameterObject(); - if (ObjectUtil.isNotNull(parameterObject) && !(parameterObject instanceof String)) { - this.encryptHandler(parameterObject); - } - } - return target; - } - - /** - * 鍔犲瘑瀵硅薄 - * - * @param sourceObject 寰呭姞瀵嗗璞� - */ - private void encryptHandler(Object sourceObject) { - if (ObjectUtil.isNull(sourceObject)) { - return; - } - if (sourceObject instanceof Map<?, ?> map) { - new HashSet<>(map.values()).forEach(this::encryptHandler); - return; - } - if (sourceObject instanceof List<?> list) { - if(CollUtil.isEmpty(list)) { - return; - } - // 鍒ゆ柇绗竴涓厓绱犳槸鍚﹀惈鏈夋敞瑙c�傚鏋滄病鏈夌洿鎺ヨ繑鍥烇紝鎻愰珮鏁堢巼 - Object firstItem = list.get(0); - if (ObjectUtil.isNull(firstItem) || CollUtil.isEmpty(encryptorManager.getFieldCache(firstItem.getClass()))) { - return; - } - list.forEach(this::encryptHandler); - return; - } - Set<Field> fields = encryptorManager.getFieldCache(sourceObject.getClass()); - try { - for (Field field : fields) { - field.set(sourceObject, this.encryptField(String.valueOf(field.get(sourceObject)), field)); - } - } catch (Exception e) { - log.error("澶勭悊鍔犲瘑瀛楁鏃跺嚭閿�", e); - } - } - - /** - * 瀛楁鍊艰繘琛屽姞瀵嗐�傞�氳繃瀛楁鐨勬壒娉ㄦ敞鍐屾柊鐨勫姞瀵嗙畻娉� - * - * @param value 寰呭姞瀵嗙殑鍊� - * @param field 寰呭姞瀵嗗瓧娈� - * @return 鍔犲瘑鍚庣粨鏋� - */ - private String encryptField(String value, Field field) { - if (ObjectUtil.isNull(value)) { - return null; - } - EncryptField encryptField = field.getAnnotation(EncryptField.class); - EncryptContext encryptContext = new EncryptContext(); - encryptContext.setAlgorithm(encryptField.algorithm() == AlgorithmType.DEFAULT ? defaultProperties.getAlgorithm() : encryptField.algorithm()); - encryptContext.setEncode(encryptField.encode() == EncodeType.DEFAULT ? defaultProperties.getEncode() : encryptField.encode()); - encryptContext.setPassword(StringUtils.isBlank(encryptField.password()) ? defaultProperties.getPassword() : encryptField.password()); - encryptContext.setPrivateKey(StringUtils.isBlank(encryptField.privateKey()) ? defaultProperties.getPrivateKey() : encryptField.privateKey()); - encryptContext.setPublicKey(StringUtils.isBlank(encryptField.publicKey()) ? defaultProperties.getPublicKey() : encryptField.publicKey()); - return this.encryptorManager.encrypt(value, encryptContext); - } - - - @Override - public void setProperties(Properties properties) { - } -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/properties/EncryptorProperties.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/properties/EncryptorProperties.java deleted file mode 100644 index ab67a6d..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/properties/EncryptorProperties.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.xmzs.common.encrypt.properties; - -import com.xmzs.common.encrypt.enumd.AlgorithmType; -import com.xmzs.common.encrypt.enumd.EncodeType; -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; - -/** - * 鍔犺В瀵嗗睘鎬ч厤缃被 - * - * @author 鑰侀┈ - * @version 4.6.0 - */ -@Data -@ConfigurationProperties(prefix = "mybatis-encryptor") -public class EncryptorProperties { - - /** - * 杩囨护寮�鍏� - */ - private Boolean enable; - - /** - * 榛樿绠楁硶 - */ - private AlgorithmType algorithm; - - /** - * 瀹夊叏绉橀挜 - */ - private String password; - - /** - * 鍏挜 - */ - private String publicKey; - - /** - * 绉侀挜 - */ - private String privateKey; - - /** - * 缂栫爜鏂瑰紡锛宐ase64/hex - */ - private EncodeType encode; - -} diff --git a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/utils/EncryptUtils.java b/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/utils/EncryptUtils.java deleted file mode 100644 index bc92cc2..0000000 --- a/ruoyi-common/ruoyi-common-encrypt/src/main/java/com/xmzs/common/encrypt/utils/EncryptUtils.java +++ /dev/null @@ -1,243 +0,0 @@ -package com.xmzs.common.encrypt.utils; - -import cn.hutool.core.codec.Base64; -import cn.hutool.core.util.ArrayUtil; -import cn.hutool.core.util.StrUtil; -import cn.hutool.crypto.SecureUtil; -import cn.hutool.crypto.SmUtil; -import cn.hutool.crypto.asymmetric.KeyType; -import cn.hutool.crypto.asymmetric.RSA; -import cn.hutool.crypto.asymmetric.SM2; - -import java.nio.charset.StandardCharsets; -import java.util.HashMap; -import java.util.Map; - -/** - * 瀹夊叏鐩稿叧宸ュ叿绫� - * - * @author 鑰侀┈ - */ -public class EncryptUtils { - /** - * 鍏挜 - */ - public static final String PUBLIC_KEY = "publicKey"; - /** - * 绉侀挜 - */ - public static final String PRIVATE_KEY = "privateKey"; - - /** - * Base64鍔犲瘑 - * - * @param data 寰呭姞瀵嗘暟鎹� - * @return 鍔犲瘑鍚庡瓧绗︿覆 - */ - public static String encryptByBase64(String data) { - return Base64.encode(data, StandardCharsets.UTF_8); - } - - /** - * Base64瑙e瘑 - * - * @param data 寰呰В瀵嗘暟鎹� - * @return 瑙e瘑鍚庡瓧绗︿覆 - */ - public static String decryptByBase64(String data) { - return Base64.decodeStr(data, StandardCharsets.UTF_8); - } - - /** - * AES鍔犲瘑 - * - * @param data 寰呰В瀵嗘暟鎹� - * @param password 绉橀挜瀛楃涓� - * @return 鍔犲瘑鍚庡瓧绗︿覆, 閲囩敤Base64缂栫爜 - */ - public static String encryptByAes(String data, String password) { - if (StrUtil.isBlank(password)) { - throw new IllegalArgumentException("AES闇�瑕佷紶鍏ョ閽ヤ俊鎭�"); - } - // aes绠楁硶鐨勭閽ヨ姹傛槸16浣嶃��24浣嶃��32浣� - int[] array = {16, 24, 32}; - if (!ArrayUtil.contains(array, password.length())) { - throw new IllegalArgumentException("AES绉橀挜闀垮害瑕佹眰涓�16浣嶃��24浣嶃��32浣�"); - } - return SecureUtil.aes(password.getBytes(StandardCharsets.UTF_8)).encryptBase64(data, StandardCharsets.UTF_8); - } - - /** - * AES瑙e瘑 - * - * @param data 寰呰В瀵嗘暟鎹� - * @param password 绉橀挜瀛楃涓� - * @return 瑙e瘑鍚庡瓧绗︿覆 - */ - public static String decryptByAes(String data, String password) { - if (StrUtil.isBlank(password)) { - throw new IllegalArgumentException("AES闇�瑕佷紶鍏ョ閽ヤ俊鎭�"); - } - // aes绠楁硶鐨勭閽ヨ姹傛槸16浣嶃��24浣嶃��32浣� - int[] array = {16, 24, 32}; - if (!ArrayUtil.contains(array, password.length())) { - throw new IllegalArgumentException("AES绉橀挜闀垮害瑕佹眰涓�16浣嶃��24浣嶃��32浣�"); - } - return SecureUtil.aes(password.getBytes(StandardCharsets.UTF_8)).decryptStr(data, StandardCharsets.UTF_8); - } - - /** - * sm4鍔犲瘑 - * - * @param data 寰呭姞瀵嗘暟鎹� - * @param password 绉橀挜瀛楃涓� - * @return 鍔犲瘑鍚庡瓧绗︿覆, 閲囩敤Base64缂栫爜 - */ - public static String encryptBySm4(String data, String password) { - if (StrUtil.isBlank(password)) { - throw new IllegalArgumentException("SM4闇�瑕佷紶鍏ョ閽ヤ俊鎭�"); - } - // sm4绠楁硶鐨勭閽ヨ姹傛槸16浣嶉暱搴� - int sm4PasswordLength = 16; - if (sm4PasswordLength != password.length()) { - throw new IllegalArgumentException("SM4绉橀挜闀垮害瑕佹眰涓�16浣�"); - } - return SmUtil.sm4(password.getBytes(StandardCharsets.UTF_8)).encryptBase64(data, StandardCharsets.UTF_8); - } - - /** - * sm4瑙e瘑 - * - * @param data 寰呰В瀵嗘暟鎹� - * @param password 绉橀挜瀛楃涓� - * @return 瑙e瘑鍚庡瓧绗︿覆 - */ - public static String decryptBySm4(String data, String password) { - if (StrUtil.isBlank(password)) { - throw new IllegalArgumentException("SM4闇�瑕佷紶鍏ョ閽ヤ俊鎭�"); - } - // sm4绠楁硶鐨勭閽ヨ姹傛槸16浣嶉暱搴� - int sm4PasswordLength = 16; - if (sm4PasswordLength != password.length()) { - throw new IllegalArgumentException("SM4绉橀挜闀垮害瑕佹眰涓�16浣�"); - } - return SmUtil.sm4(password.getBytes(StandardCharsets.UTF_8)).decryptStr(data, StandardCharsets.UTF_8); - } - - /** - * 浜х敓sm2鍔犺В瀵嗛渶瑕佺殑鍏挜鍜岀閽� - * - * @return 鍏閽ap - */ - public static Map<String, String> generateSm2Key() { - Map<String, String> keyMap = new HashMap<>(2); - SM2 sm2 = SmUtil.sm2(); - keyMap.put(PRIVATE_KEY, sm2.getPrivateKeyBase64()); - keyMap.put(PUBLIC_KEY, sm2.getPublicKeyBase64()); - return keyMap; - } - - /** - * sm2鍏挜鍔犲瘑 - * - * @param data 寰呭姞瀵嗘暟鎹� - * @param publicKey 鍏挜 - * @return 鍔犲瘑鍚庡瓧绗︿覆, 閲囩敤Base64缂栫爜 - */ - public static String encryptBySm2(String data, String publicKey) { - if (StrUtil.isBlank(publicKey)) { - throw new IllegalArgumentException("SM2闇�瑕佷紶鍏ュ叕閽ヨ繘琛屽姞瀵�"); - } - SM2 sm2 = SmUtil.sm2(null, publicKey); - return sm2.encryptBase64(data, StandardCharsets.UTF_8, KeyType.PublicKey); - } - - /** - * sm2绉侀挜瑙e瘑 - * - * @param data 寰呭姞瀵嗘暟鎹� - * @param privateKey 绉侀挜 - * @return 瑙e瘑鍚庡瓧绗︿覆 - */ - public static String decryptBySm2(String data, String privateKey) { - if (StrUtil.isBlank(privateKey)) { - throw new IllegalArgumentException("SM2闇�瑕佷紶鍏ョ閽ヨ繘琛岃В瀵�"); - } - SM2 sm2 = SmUtil.sm2(privateKey, null); - return sm2.decryptStr(data, KeyType.PrivateKey, StandardCharsets.UTF_8); - } - - /** - * 浜х敓RSA鍔犺В瀵嗛渶瑕佺殑鍏挜鍜岀閽� - * - * @return 鍏閽ap - */ - public static Map<String, String> generateRsaKey() { - Map<String, String> keyMap = new HashMap<>(2); - RSA rsa = SecureUtil.rsa(); - keyMap.put(PRIVATE_KEY, rsa.getPrivateKeyBase64()); - keyMap.put(PUBLIC_KEY, rsa.getPublicKeyBase64()); - return keyMap; - } - - /** - * rsa鍏挜鍔犲瘑 - * - * @param data 寰呭姞瀵嗘暟鎹� - * @param publicKey 鍏挜 - * @return 鍔犲瘑鍚庡瓧绗︿覆, 閲囩敤Base64缂栫爜 - */ - public static String encryptByRsa(String data, String publicKey) { - if (StrUtil.isBlank(publicKey)) { - throw new IllegalArgumentException("RSA闇�瑕佷紶鍏ュ叕閽ヨ繘琛屽姞瀵�"); - } - RSA rsa = SecureUtil.rsa(null, publicKey); - return rsa.encryptBase64(data, StandardCharsets.UTF_8, KeyType.PublicKey); - } - - /** - * rsa绉侀挜瑙e瘑 - * - * @param data 寰呭姞瀵嗘暟鎹� - * @param privateKey 绉侀挜 - * @return 瑙e瘑鍚庡瓧绗︿覆 - */ - public static String decryptByRsa(String data, String privateKey) { - if (StrUtil.isBlank(privateKey)) { - throw new IllegalArgumentException("RSA闇�瑕佷紶鍏ョ閽ヨ繘琛岃В瀵�"); - } - RSA rsa = SecureUtil.rsa(privateKey, null); - return rsa.decryptStr(data, KeyType.PrivateKey, StandardCharsets.UTF_8); - } - - /** - * md5鍔犲瘑 - * - * @param data 寰呭姞瀵嗘暟鎹� - * @return 鍔犲瘑鍚庡瓧绗︿覆, 閲囩敤Hex缂栫爜 - */ - public static String encryptByMd5(String data) { - return SecureUtil.md5(data); - } - - /** - * sha256鍔犲瘑 - * - * @param data 寰呭姞瀵嗘暟鎹� - * @return 鍔犲瘑鍚庡瓧绗︿覆, 閲囩敤Hex缂栫爜 - */ - public static String encryptBySha256(String data) { - return SecureUtil.sha256(data); - } - - /** - * sm3鍔犲瘑 - * - * @param data 寰呭姞瀵嗘暟鎹� - * @return 鍔犲瘑鍚庡瓧绗︿覆, 閲囩敤Hex缂栫爜 - */ - public static String encryptBySm3(String data) { - return SmUtil.sm3(data); - } - -} diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/annotation/CellMerge.java b/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/annotation/CellMerge.java deleted file mode 100644 index 6893a68..0000000 --- a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/annotation/CellMerge.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.xmzs.common.excel.annotation; - -import com.xmzs.common.excel.core.CellMergeStrategy; - -import java.lang.annotation.*; - -/** - * excel 鍒楀崟鍏冩牸鍚堝苟(鍚堝苟鍒楃浉鍚岄」) - * - * 闇�鎼厤 {@link CellMergeStrategy} 绛栫暐浣跨敤 - * - * @author Lion Li - */ -@Target(ElementType.FIELD) -@Retention(RetentionPolicy.RUNTIME) -@Inherited -public @interface CellMerge { - - /** - * col index - */ - int index() default -1; - -} diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/annotation/ExcelDictFormat.java b/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/annotation/ExcelDictFormat.java deleted file mode 100644 index 2458d3d..0000000 --- a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/annotation/ExcelDictFormat.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.xmzs.common.excel.annotation; - -import com.xmzs.common.core.utils.StringUtils; - -import java.lang.annotation.*; - -/** - * 瀛楀吀鏍煎紡鍖� - * - * @author Lion Li - */ -@Target({ElementType.FIELD}) -@Retention(RetentionPolicy.RUNTIME) -@Inherited -public @interface ExcelDictFormat { - - /** - * 濡傛灉鏄瓧鍏哥被鍨嬶紝璇疯缃瓧鍏哥殑type鍊� (濡�: sys_user_sex) - */ - String dictType() default ""; - - /** - * 璇诲彇鍐呭杞〃杈惧紡 (濡�: 0=鐢�,1=濂�,2=鏈煡) - */ - String readConverterExp() default ""; - - /** - * 鍒嗛殧绗︼紝璇诲彇瀛楃涓茬粍鍐呭 - */ - String separator() default StringUtils.SEPARATOR; - -} diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/annotation/ExcelEnumFormat.java b/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/annotation/ExcelEnumFormat.java deleted file mode 100644 index b082295..0000000 --- a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/annotation/ExcelEnumFormat.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.xmzs.common.excel.annotation; - -import java.lang.annotation.*; - -/** - * 鏋氫妇鏍煎紡鍖� - * - * @author Liang - */ -@Target({ElementType.FIELD}) -@Retention(RetentionPolicy.RUNTIME) -@Inherited -public @interface ExcelEnumFormat { - - /** - * 瀛楀吀鏋氫妇绫诲瀷 - */ - Class<? extends Enum<?>> enumClass(); - - /** - * 瀛楀吀鏋氫妇绫讳腑瀵瑰簲鐨刢ode灞炴�у悕绉帮紝榛樿涓篶ode - */ - String codeField() default "code"; - - /** - * 瀛楀吀鏋氫妇绫讳腑瀵瑰簲鐨則ext灞炴�у悕绉帮紝榛樿涓簍ext - */ - String textField() default "text"; - -} diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/convert/ExcelBigNumberConvert.java b/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/convert/ExcelBigNumberConvert.java deleted file mode 100644 index f3a6119..0000000 --- a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/convert/ExcelBigNumberConvert.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.xmzs.common.excel.convert; - -import cn.hutool.core.convert.Convert; -import cn.hutool.core.util.ObjectUtil; -import com.alibaba.excel.converters.Converter; -import com.alibaba.excel.enums.CellDataTypeEnum; -import com.alibaba.excel.metadata.GlobalConfiguration; -import com.alibaba.excel.metadata.data.ReadCellData; -import com.alibaba.excel.metadata.data.WriteCellData; -import com.alibaba.excel.metadata.property.ExcelContentProperty; -import lombok.extern.slf4j.Slf4j; - -import java.math.BigDecimal; - -/** - * 澶ф暟鍊艰浆鎹� - * Excel 鏁板�奸暱搴︿綅15浣� 澶т簬15浣嶇殑鏁板�艰浆鎹綅瀛楃涓� - * - * @author Lion Li - */ -@Slf4j -public class ExcelBigNumberConvert implements Converter<Long> { - - @Override - public Class<Long> supportJavaTypeKey() { - return Long.class; - } - - @Override - public CellDataTypeEnum supportExcelTypeKey() { - return CellDataTypeEnum.STRING; - } - - @Override - public Long convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { - return Convert.toLong(cellData.getData()); - } - - @Override - public WriteCellData<Object> convertToExcelData(Long object, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { - if (ObjectUtil.isNotNull(object)) { - String str = Convert.toStr(object); - if (str.length() > 15) { - return new WriteCellData<>(str); - } - } - WriteCellData<Object> cellData = new WriteCellData<>(new BigDecimal(object)); - cellData.setType(CellDataTypeEnum.NUMBER); - return cellData; - } - -} diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/convert/ExcelDictConvert.java b/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/convert/ExcelDictConvert.java deleted file mode 100644 index 1136c78..0000000 --- a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/convert/ExcelDictConvert.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.xmzs.common.excel.convert; - -import cn.hutool.core.annotation.AnnotationUtil; -import cn.hutool.core.convert.Convert; -import cn.hutool.core.util.ObjectUtil; -import com.alibaba.excel.converters.Converter; -import com.alibaba.excel.enums.CellDataTypeEnum; -import com.alibaba.excel.metadata.GlobalConfiguration; -import com.alibaba.excel.metadata.data.ReadCellData; -import com.alibaba.excel.metadata.data.WriteCellData; -import com.alibaba.excel.metadata.property.ExcelContentProperty; -import com.xmzs.common.excel.annotation.ExcelDictFormat; -import com.xmzs.common.core.service.DictService; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.excel.utils.ExcelUtil; -import lombok.extern.slf4j.Slf4j; - -import java.lang.reflect.Field; - -/** - * 瀛楀吀鏍煎紡鍖栬浆鎹㈠鐞� - * - * @author Lion Li - */ -@Slf4j -public class ExcelDictConvert implements Converter<Object> { - - @Override - public Class<Object> supportJavaTypeKey() { - return Object.class; - } - - @Override - public CellDataTypeEnum supportExcelTypeKey() { - return null; - } - - @Override - public Object convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { - ExcelDictFormat anno = getAnnotation(contentProperty.getField()); - String type = anno.dictType(); - String label = cellData.getStringValue(); - String value; - if (StringUtils.isBlank(type)) { - value = ExcelUtil.reverseByExp(label, anno.readConverterExp(), anno.separator()); - } else { - value = SpringUtils.getBean(DictService.class).getDictValue(type, label, anno.separator()); - } - return Convert.convert(contentProperty.getField().getType(), value); - } - - @Override - public WriteCellData<String> convertToExcelData(Object object, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { - if (ObjectUtil.isNull(object)) { - return new WriteCellData<>(""); - } - ExcelDictFormat anno = getAnnotation(contentProperty.getField()); - String type = anno.dictType(); - String value = Convert.toStr(object); - String label; - if (StringUtils.isBlank(type)) { - label = ExcelUtil.convertByExp(value, anno.readConverterExp(), anno.separator()); - } else { - label = SpringUtils.getBean(DictService.class).getDictLabel(type, value, anno.separator()); - } - return new WriteCellData<>(label); - } - - private ExcelDictFormat getAnnotation(Field field) { - return AnnotationUtil.getAnnotation(field, ExcelDictFormat.class); - } -} diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/convert/ExcelEnumConvert.java b/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/convert/ExcelEnumConvert.java deleted file mode 100644 index c7f48e2..0000000 --- a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/convert/ExcelEnumConvert.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.xmzs.common.excel.convert; - -import cn.hutool.core.annotation.AnnotationUtil; -import cn.hutool.core.convert.Convert; -import cn.hutool.core.util.ObjectUtil; -import com.alibaba.excel.converters.Converter; -import com.alibaba.excel.enums.CellDataTypeEnum; -import com.alibaba.excel.metadata.GlobalConfiguration; -import com.alibaba.excel.metadata.data.ReadCellData; -import com.alibaba.excel.metadata.data.WriteCellData; -import com.alibaba.excel.metadata.property.ExcelContentProperty; -import com.xmzs.common.core.utils.reflect.ReflectUtils; -import com.xmzs.common.excel.annotation.ExcelEnumFormat; -import lombok.extern.slf4j.Slf4j; - -import java.lang.reflect.Field; -import java.util.HashMap; -import java.util.Map; - -/** - * 鏋氫妇鏍煎紡鍖栬浆鎹㈠鐞� - * - * @author Liang - */ -@Slf4j -public class ExcelEnumConvert implements Converter<Object> { - - @Override - public Class<Object> supportJavaTypeKey() { - return Object.class; - } - - @Override - public CellDataTypeEnum supportExcelTypeKey() { - return null; - } - - @Override - public Object convertToJavaData(ReadCellData<?> cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { - Object codeValue = cellData.getData(); - // 濡傛灉鏄┖鍊� - if (ObjectUtil.isNull(codeValue)) { - return null; - } - Map<Object, String> enumValueMap = beforeConvert(contentProperty); - String textValue = enumValueMap.get(codeValue); - return Convert.convert(contentProperty.getField().getType(), textValue); - } - - @Override - public WriteCellData<String> convertToExcelData(Object object, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { - if (ObjectUtil.isNull(object)) { - return new WriteCellData<>(""); - } - Map<Object, String> enumValueMap = beforeConvert(contentProperty); - String value = Convert.toStr(enumValueMap.get(object), ""); - return new WriteCellData<>(value); - } - - private Map<Object, String> beforeConvert(ExcelContentProperty contentProperty) { - ExcelEnumFormat anno = getAnnotation(contentProperty.getField()); - Map<Object, String> enumValueMap = new HashMap<>(); - Enum<?>[] enumConstants = anno.enumClass().getEnumConstants(); - for (Enum<?> enumConstant : enumConstants) { - Object codeValue = ReflectUtils.invokeGetter(enumConstant, anno.codeField()); - String textValue = ReflectUtils.invokeGetter(enumConstant, anno.textField()); - enumValueMap.put(codeValue, textValue); - } - return enumValueMap; - } - - private ExcelEnumFormat getAnnotation(Field field) { - return AnnotationUtil.getAnnotation(field, ExcelEnumFormat.class); - } -} diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/core/CellMergeStrategy.java b/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/core/CellMergeStrategy.java deleted file mode 100644 index f6852cc..0000000 --- a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/core/CellMergeStrategy.java +++ /dev/null @@ -1,122 +0,0 @@ -package com.xmzs.common.excel.core; - -import cn.hutool.core.collection.CollUtil; -import com.alibaba.excel.annotation.ExcelProperty; -import com.alibaba.excel.metadata.Head; -import com.alibaba.excel.write.merge.AbstractMergeStrategy; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.SneakyThrows; -import lombok.extern.slf4j.Slf4j; -import org.apache.poi.ss.usermodel.Cell; -import org.apache.poi.ss.usermodel.Sheet; -import org.apache.poi.ss.util.CellRangeAddress; -import com.xmzs.common.core.utils.reflect.ReflectUtils; -import com.xmzs.common.excel.annotation.CellMerge; - -import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * 鍒楀�奸噸澶嶅悎骞剁瓥鐣� - * - * @author Lion Li - */ -@Slf4j -public class CellMergeStrategy extends AbstractMergeStrategy { - - private final List<?> list; - private final boolean hasTitle; - private int rowIndex; - - public CellMergeStrategy(List<?> list, boolean hasTitle) { - this.list = list; - this.hasTitle = hasTitle; - // 琛屽悎骞跺紑濮嬩笅鏍� - this.rowIndex = hasTitle ? 1 : 0; - } - - @Override - protected void merge(Sheet sheet, Cell cell, Head head, Integer relativeRowIndex) { - List<CellRangeAddress> cellList = handle(list, hasTitle); - // judge the list is not null - if (CollUtil.isNotEmpty(cellList)) { - // the judge is necessary - if (cell.getRowIndex() == rowIndex && cell.getColumnIndex() == 0) { - for (CellRangeAddress item : cellList) { - sheet.addMergedRegion(item); - } - } - } - } - - @SneakyThrows - private List<CellRangeAddress> handle(List<?> list, boolean hasTitle) { - List<CellRangeAddress> cellList = new ArrayList<>(); - if (CollUtil.isEmpty(list)) { - return cellList; - } - Field[] fields = ReflectUtils.getFields(list.get(0).getClass(), field -> !"serialVersionUID".equals(field.getName())); - - // 鏈夋敞瑙g殑瀛楁 - List<Field> mergeFields = new ArrayList<>(); - List<Integer> mergeFieldsIndex = new ArrayList<>(); - for (int i = 0; i < fields.length; i++) { - Field field = fields[i]; - if (field.isAnnotationPresent(CellMerge.class)) { - CellMerge cm = field.getAnnotation(CellMerge.class); - mergeFields.add(field); - mergeFieldsIndex.add(cm.index() == -1 ? i : cm.index()); - if (hasTitle) { - ExcelProperty property = field.getAnnotation(ExcelProperty.class); - rowIndex = Math.max(rowIndex, property.value().length); - } - } - } - - Map<Field, RepeatCell> map = new HashMap<>(); - // 鐢熸垚涓や袱鍚堝苟鍗曞厓鏍� - for (int i = 0; i < list.size(); i++) { - for (int j = 0; j < mergeFields.size(); j++) { - Field field = mergeFields.get(j); - Object val = ReflectUtils.invokeGetter(list.get(i), field.getName()); - - int colNum = mergeFieldsIndex.get(j); - if (!map.containsKey(field)) { - map.put(field, new RepeatCell(val, i)); - } else { - RepeatCell repeatCell = map.get(field); - Object cellValue = repeatCell.getValue(); - if (cellValue == null || "".equals(cellValue)) { - // 绌哄�艰烦杩囦笉鍚堝苟 - continue; - } - if (!cellValue.equals(val)) { - if (i - repeatCell.getCurrent() > 1) { - cellList.add(new CellRangeAddress(repeatCell.getCurrent() + rowIndex, i + rowIndex - 1, colNum, colNum)); - } - map.put(field, new RepeatCell(val, i)); - } else if (i == list.size() - 1) { - if (i > repeatCell.getCurrent()) { - cellList.add(new CellRangeAddress(repeatCell.getCurrent() + rowIndex, i + rowIndex, colNum, colNum)); - } - } - } - } - } - return cellList; - } - - @Data - @AllArgsConstructor - static class RepeatCell { - - private Object value; - - private int current; - - } -} diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/core/DefaultExcelListener.java b/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/core/DefaultExcelListener.java deleted file mode 100644 index cb267bc..0000000 --- a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/core/DefaultExcelListener.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.xmzs.common.excel.core; - -import cn.hutool.core.util.StrUtil; -import com.alibaba.excel.context.AnalysisContext; -import com.alibaba.excel.event.AnalysisEventListener; -import com.alibaba.excel.exception.ExcelAnalysisException; -import com.alibaba.excel.exception.ExcelDataConvertException; -import com.xmzs.common.core.utils.StreamUtils; -import com.xmzs.common.core.utils.ValidatorUtils; -import com.xmzs.common.json.utils.JsonUtils; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.ConstraintViolationException; -import lombok.NoArgsConstructor; -import lombok.extern.slf4j.Slf4j; - -import java.util.Map; -import java.util.Set; - -/** - * Excel 瀵煎叆鐩戝惉 - * - * @author Yjoioooo - * @author Lion Li - */ -@Slf4j -@NoArgsConstructor -public class DefaultExcelListener<T> extends AnalysisEventListener<T> implements ExcelListener<T> { - - /** - * 鏄惁Validator妫�楠岋紝榛樿涓烘槸 - */ - private Boolean isValidate = Boolean.TRUE; - - /** - * excel 琛ㄥご鏁版嵁 - */ - private Map<Integer, String> headMap; - - /** - * 瀵煎叆鍥炴墽 - */ - private ExcelResult<T> excelResult; - - public DefaultExcelListener(boolean isValidate) { - this.excelResult = new DefaultExcelResult<>(); - this.isValidate = isValidate; - } - - /** - * 澶勭悊寮傚父 - * - * @param exception ExcelDataConvertException - * @param context Excel 涓婁笅鏂� - */ - @Override - public void onException(Exception exception, AnalysisContext context) throws Exception { - String errMsg = null; - if (exception instanceof ExcelDataConvertException excelDataConvertException) { - // 濡傛灉鏄煇涓�涓崟鍏冩牸鐨勮浆鎹㈠紓甯� 鑳借幏鍙栧埌鍏蜂綋琛屽彿 - Integer rowIndex = excelDataConvertException.getRowIndex(); - Integer columnIndex = excelDataConvertException.getColumnIndex(); - errMsg = StrUtil.format("绗瑊}琛�-绗瑊}鍒�-琛ㄥご{}: 瑙f瀽寮傚父<br/>", - rowIndex + 1, columnIndex + 1, headMap.get(columnIndex)); - if (log.isDebugEnabled()) { - log.error(errMsg); - } - } - if (exception instanceof ConstraintViolationException constraintViolationException) { - Set<ConstraintViolation<?>> constraintViolations = constraintViolationException.getConstraintViolations(); - String constraintViolationsMsg = StreamUtils.join(constraintViolations, ConstraintViolation::getMessage, ", "); - errMsg = StrUtil.format("绗瑊}琛屾暟鎹牎楠屽紓甯�: {}", context.readRowHolder().getRowIndex() + 1, constraintViolationsMsg); - if (log.isDebugEnabled()) { - log.error(errMsg); - } - } - excelResult.getErrorList().add(errMsg); - throw new ExcelAnalysisException(errMsg); - } - - @Override - public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { - this.headMap = headMap; - log.debug("瑙f瀽鍒颁竴鏉¤〃澶存暟鎹�: {}", JsonUtils.toJsonString(headMap)); - } - - @Override - public void invoke(T data, AnalysisContext context) { - if (isValidate) { - ValidatorUtils.validate(data); - } - excelResult.getList().add(data); - } - - @Override - public void doAfterAllAnalysed(AnalysisContext context) { - log.debug("鎵�鏈夋暟鎹В鏋愬畬鎴愶紒"); - } - - @Override - public ExcelResult<T> getExcelResult() { - return excelResult; - } - -} diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/core/DefaultExcelResult.java b/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/core/DefaultExcelResult.java deleted file mode 100644 index 4c3302c..0000000 --- a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/core/DefaultExcelResult.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.xmzs.common.excel.core; - -import cn.hutool.core.util.StrUtil; -import lombok.Setter; - -import java.util.ArrayList; -import java.util.List; - -/** - * 榛樿excel杩斿洖瀵硅薄 - * - * @author Yjoioooo - * @author Lion Li - */ -public class DefaultExcelResult<T> implements ExcelResult<T> { - - /** - * 鏁版嵁瀵硅薄list - */ - @Setter - private List<T> list; - - /** - * 閿欒淇℃伅鍒楄〃 - */ - @Setter - private List<String> errorList; - - public DefaultExcelResult() { - this.list = new ArrayList<>(); - this.errorList = new ArrayList<>(); - } - - public DefaultExcelResult(List<T> list, List<String> errorList) { - this.list = list; - this.errorList = errorList; - } - - public DefaultExcelResult(ExcelResult<T> excelResult) { - this.list = excelResult.getList(); - this.errorList = excelResult.getErrorList(); - } - - @Override - public List<T> getList() { - return list; - } - - @Override - public List<String> getErrorList() { - return errorList; - } - - /** - * 鑾峰彇瀵煎叆鍥炴墽 - * - * @return 瀵煎叆鍥炴墽 - */ - @Override - public String getAnalysis() { - int successCount = list.size(); - int errorCount = errorList.size(); - if (successCount == 0) { - return "璇诲彇澶辫触锛屾湭瑙f瀽鍒版暟鎹�"; - } else { - if (errorCount == 0) { - return StrUtil.format("鎭枩鎮紝鍏ㄩ儴璇诲彇鎴愬姛锛佸叡{}鏉�", successCount); - } else { - return ""; - } - } - } -} diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/core/ExcelListener.java b/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/core/ExcelListener.java deleted file mode 100644 index 7e9fa44..0000000 --- a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/core/ExcelListener.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.xmzs.common.excel.core; - -import com.alibaba.excel.read.listener.ReadListener; - -/** - * Excel 瀵煎叆鐩戝惉 - * - * @author Lion Li - */ -public interface ExcelListener<T> extends ReadListener<T> { - - ExcelResult<T> getExcelResult(); - -} diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/core/ExcelResult.java b/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/core/ExcelResult.java deleted file mode 100644 index 105304e..0000000 --- a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/core/ExcelResult.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xmzs.common.excel.core; - -import java.util.List; - -/** - * excel杩斿洖瀵硅薄 - * - * @author Lion Li - */ -public interface ExcelResult<T> { - - /** - * 瀵硅薄鍒楄〃 - */ - List<T> getList(); - - /** - * 閿欒鍒楄〃 - */ - List<String> getErrorList(); - - /** - * 瀵煎叆鍥炴墽 - */ - String getAnalysis(); -} diff --git a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/utils/ExcelUtil.java b/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/utils/ExcelUtil.java deleted file mode 100644 index 8351849..0000000 --- a/ruoyi-common/ruoyi-common-excel/src/main/java/com/xmzs/common/excel/utils/ExcelUtil.java +++ /dev/null @@ -1,327 +0,0 @@ -package com.xmzs.common.excel.utils; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.io.resource.ClassPathResource; -import cn.hutool.core.util.IdUtil; -import com.alibaba.excel.EasyExcel; -import com.alibaba.excel.ExcelWriter; -import com.alibaba.excel.write.builder.ExcelWriterSheetBuilder; -import com.alibaba.excel.write.metadata.WriteSheet; -import com.alibaba.excel.write.metadata.fill.FillConfig; -import com.alibaba.excel.write.metadata.fill.FillWrapper; -import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.core.utils.file.FileUtils; -import com.xmzs.common.excel.convert.ExcelBigNumberConvert; -import com.xmzs.common.excel.core.CellMergeStrategy; -import com.xmzs.common.excel.core.DefaultExcelListener; -import com.xmzs.common.excel.core.ExcelListener; -import com.xmzs.common.excel.core.ExcelResult; -import jakarta.servlet.ServletOutputStream; -import jakarta.servlet.http.HttpServletResponse; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * Excel鐩稿叧澶勭悊 - * - * @author Lion Li - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class ExcelUtil { - - /** - * 鍚屾瀵煎叆(閫傜敤浜庡皬鏁版嵁閲�) - * - * @param is 杈撳叆娴� - * @return 杞崲鍚庨泦鍚� - */ - public static <T> List<T> importExcel(InputStream is, Class<T> clazz) { - return EasyExcel.read(is).head(clazz).autoCloseStream(false).sheet().doReadSync(); - } - - - /** - * 浣跨敤鏍¢獙鐩戝惉鍣� 寮傛瀵煎叆 鍚屾杩斿洖 - * - * @param is 杈撳叆娴� - * @param clazz 瀵硅薄绫诲瀷 - * @param isValidate 鏄惁 Validator 妫�楠� 榛樿涓烘槸 - * @return 杞崲鍚庨泦鍚� - */ - public static <T> ExcelResult<T> importExcel(InputStream is, Class<T> clazz, boolean isValidate) { - DefaultExcelListener<T> listener = new DefaultExcelListener<>(isValidate); - EasyExcel.read(is, clazz, listener).sheet().doRead(); - return listener.getExcelResult(); - } - - /** - * 浣跨敤鑷畾涔夌洃鍚櫒 寮傛瀵煎叆 鑷畾涔夎繑鍥� - * - * @param is 杈撳叆娴� - * @param clazz 瀵硅薄绫诲瀷 - * @param listener 鑷畾涔夌洃鍚櫒 - * @return 杞崲鍚庨泦鍚� - */ - public static <T> ExcelResult<T> importExcel(InputStream is, Class<T> clazz, ExcelListener<T> listener) { - EasyExcel.read(is, clazz, listener).sheet().doRead(); - return listener.getExcelResult(); - } - - /** - * 瀵煎嚭excel - * - * @param list 瀵煎嚭鏁版嵁闆嗗悎 - * @param sheetName 宸ヤ綔琛ㄧ殑鍚嶇О - * @param clazz 瀹炰綋绫� - * @param response 鍝嶅簲浣� - */ - public static <T> void exportExcel(List<T> list, String sheetName, Class<T> clazz, HttpServletResponse response) { - try { - resetResponse(sheetName, response); - ServletOutputStream os = response.getOutputStream(); - exportExcel(list, sheetName, clazz, false, os); - } catch (IOException e) { - throw new RuntimeException("瀵煎嚭Excel寮傚父"); - } - } - - /** - * 瀵煎嚭excel - * - * @param list 瀵煎嚭鏁版嵁闆嗗悎 - * @param sheetName 宸ヤ綔琛ㄧ殑鍚嶇О - * @param clazz 瀹炰綋绫� - * @param merge 鏄惁鍚堝苟鍗曞厓鏍� - * @param response 鍝嶅簲浣� - */ - public static <T> void exportExcel(List<T> list, String sheetName, Class<T> clazz, boolean merge, HttpServletResponse response) { - try { - resetResponse(sheetName, response); - ServletOutputStream os = response.getOutputStream(); - exportExcel(list, sheetName, clazz, merge, os); - } catch (IOException e) { - throw new RuntimeException("瀵煎嚭Excel寮傚父"); - } - } - - /** - * 瀵煎嚭excel - * - * @param list 瀵煎嚭鏁版嵁闆嗗悎 - * @param sheetName 宸ヤ綔琛ㄧ殑鍚嶇О - * @param clazz 瀹炰綋绫� - * @param os 杈撳嚭娴� - */ - public static <T> void exportExcel(List<T> list, String sheetName, Class<T> clazz, OutputStream os) { - exportExcel(list, sheetName, clazz, false, os); - } - - /** - * 瀵煎嚭excel - * - * @param list 瀵煎嚭鏁版嵁闆嗗悎 - * @param sheetName 宸ヤ綔琛ㄧ殑鍚嶇О - * @param clazz 瀹炰綋绫� - * @param merge 鏄惁鍚堝苟鍗曞厓鏍� - * @param os 杈撳嚭娴� - */ - public static <T> void exportExcel(List<T> list, String sheetName, Class<T> clazz, boolean merge, OutputStream os) { - ExcelWriterSheetBuilder builder = EasyExcel.write(os, clazz) - .autoCloseStream(false) - // 鑷姩閫傞厤 - .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) - // 澶ф暟鍊艰嚜鍔ㄨ浆鎹� 闃叉澶辩湡 - .registerConverter(new ExcelBigNumberConvert()) - .sheet(sheetName); - if (merge) { - // 鍚堝苟澶勭悊鍣� - builder.registerWriteHandler(new CellMergeStrategy(list, true)); - } - builder.doWrite(list); - } - - /** - * 鍗曡〃澶氭暟鎹ā鏉垮鍑� 妯℃澘鏍煎紡涓� {.灞炴� - * - * @param filename 鏂囦欢鍚� - * @param templatePath 妯℃澘璺緞 resource 鐩綍涓嬬殑璺緞鍖呮嫭妯℃澘鏂囦欢鍚� - * 渚嬪: excel/temp.xlsx - * 閲嶇偣: 妯℃澘鏂囦欢蹇呴』鏀剧疆鍒板惎鍔ㄧ被瀵瑰簲鐨� resource 鐩綍涓� - * @param data 妯℃澘闇�瑕佺殑鏁版嵁 - * @param response 鍝嶅簲浣� - */ - public static void exportTemplate(List<Object> data, String filename, String templatePath, HttpServletResponse response) { - try { - resetResponse(filename, response); - ServletOutputStream os = response.getOutputStream(); - exportTemplate(data, templatePath, os); - } catch (IOException e) { - throw new RuntimeException("瀵煎嚭Excel寮傚父"); - } - } - - /** - * 鍗曡〃澶氭暟鎹ā鏉垮鍑� 妯℃澘鏍煎紡涓� {.灞炴� - * - * @param templatePath 妯℃澘璺緞 resource 鐩綍涓嬬殑璺緞鍖呮嫭妯℃澘鏂囦欢鍚� - * 渚嬪: excel/temp.xlsx - * 閲嶇偣: 妯℃澘鏂囦欢蹇呴』鏀剧疆鍒板惎鍔ㄧ被瀵瑰簲鐨� resource 鐩綍涓� - * @param data 妯℃澘闇�瑕佺殑鏁版嵁 - * @param os 杈撳嚭娴� - */ - public static void exportTemplate(List<Object> data, String templatePath, OutputStream os) { - ClassPathResource templateResource = new ClassPathResource(templatePath); - ExcelWriter excelWriter = EasyExcel.write(os) - .withTemplate(templateResource.getStream()) - .autoCloseStream(false) - // 澶ф暟鍊艰嚜鍔ㄨ浆鎹� 闃叉澶辩湡 - .registerConverter(new ExcelBigNumberConvert()) - .build(); - WriteSheet writeSheet = EasyExcel.writerSheet().build(); - if (CollUtil.isEmpty(data)) { - throw new IllegalArgumentException("鏁版嵁涓虹┖"); - } - // 鍗曡〃澶氭暟鎹鍑� 妯℃澘鏍煎紡涓� {.灞炴� - for (Object d : data) { - excelWriter.fill(d, writeSheet); - } - excelWriter.finish(); - } - - /** - * 澶氳〃澶氭暟鎹ā鏉垮鍑� 妯℃澘鏍煎紡涓� {key.灞炴� - * - * @param filename 鏂囦欢鍚� - * @param templatePath 妯℃澘璺緞 resource 鐩綍涓嬬殑璺緞鍖呮嫭妯℃澘鏂囦欢鍚� - * 渚嬪: excel/temp.xlsx - * 閲嶇偣: 妯℃澘鏂囦欢蹇呴』鏀剧疆鍒板惎鍔ㄧ被瀵瑰簲鐨� resource 鐩綍涓� - * @param data 妯℃澘闇�瑕佺殑鏁版嵁 - * @param response 鍝嶅簲浣� - */ - public static void exportTemplateMultiList(Map<String, Object> data, String filename, String templatePath, HttpServletResponse response) { - try { - resetResponse(filename, response); - ServletOutputStream os = response.getOutputStream(); - exportTemplateMultiList(data, templatePath, os); - } catch (IOException e) { - throw new RuntimeException("瀵煎嚭Excel寮傚父"); - } - } - - /** - * 澶氳〃澶氭暟鎹ā鏉垮鍑� 妯℃澘鏍煎紡涓� {key.灞炴� - * - * @param templatePath 妯℃澘璺緞 resource 鐩綍涓嬬殑璺緞鍖呮嫭妯℃澘鏂囦欢鍚� - * 渚嬪: excel/temp.xlsx - * 閲嶇偣: 妯℃澘鏂囦欢蹇呴』鏀剧疆鍒板惎鍔ㄧ被瀵瑰簲鐨� resource 鐩綍涓� - * @param data 妯℃澘闇�瑕佺殑鏁版嵁 - * @param os 杈撳嚭娴� - */ - public static void exportTemplateMultiList(Map<String, Object> data, String templatePath, OutputStream os) { - ClassPathResource templateResource = new ClassPathResource(templatePath); - ExcelWriter excelWriter = EasyExcel.write(os) - .withTemplate(templateResource.getStream()) - .autoCloseStream(false) - // 澶ф暟鍊艰嚜鍔ㄨ浆鎹� 闃叉澶辩湡 - .registerConverter(new ExcelBigNumberConvert()) - .build(); - WriteSheet writeSheet = EasyExcel.writerSheet().build(); - if (CollUtil.isEmpty(data)) { - throw new IllegalArgumentException("鏁版嵁涓虹┖"); - } - for (Map.Entry<String, Object> map : data.entrySet()) { - // 璁剧疆鍒楄〃鍚庣画杩樻湁鏁版嵁 - FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build(); - if (map.getValue() instanceof Collection) { - // 澶氳〃瀵煎嚭蹇呴』浣跨敤 FillWrapper - excelWriter.fill(new FillWrapper(map.getKey(), (Collection<?>) map.getValue()), fillConfig, writeSheet); - } else { - excelWriter.fill(map.getValue(), writeSheet); - } - } - excelWriter.finish(); - } - - /** - * 閲嶇疆鍝嶅簲浣� - */ - private static void resetResponse(String sheetName, HttpServletResponse response) { - String filename = encodingFilename(sheetName); - FileUtils.setAttachmentResponseHeader(response, filename); - response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"); - } - - /** - * 瑙f瀽瀵煎嚭鍊� 0=鐢�,1=濂�,2=鏈煡 - * - * @param propertyValue 鍙傛暟鍊� - * @param converterExp 缈昏瘧娉ㄨВ - * @param separator 鍒嗛殧绗� - * @return 瑙f瀽鍚庡�� - */ - public static String convertByExp(String propertyValue, String converterExp, String separator) { - StringBuilder propertyString = new StringBuilder(); - String[] convertSource = converterExp.split(StringUtils.SEPARATOR); - for (String item : convertSource) { - String[] itemArray = item.split("="); - if (StringUtils.containsAny(propertyValue, separator)) { - for (String value : propertyValue.split(separator)) { - if (itemArray[0].equals(value)) { - propertyString.append(itemArray[1]).append(separator); - break; - } - } - } else { - if (itemArray[0].equals(propertyValue)) { - return itemArray[1]; - } - } - } - return StringUtils.stripEnd(propertyString.toString(), separator); - } - - /** - * 鍙嶅悜瑙f瀽鍊� 鐢�=0,濂�=1,鏈煡=2 - * - * @param propertyValue 鍙傛暟鍊� - * @param converterExp 缈昏瘧娉ㄨВ - * @param separator 鍒嗛殧绗� - * @return 瑙f瀽鍚庡�� - */ - public static String reverseByExp(String propertyValue, String converterExp, String separator) { - StringBuilder propertyString = new StringBuilder(); - String[] convertSource = converterExp.split(StringUtils.SEPARATOR); - for (String item : convertSource) { - String[] itemArray = item.split("="); - if (StringUtils.containsAny(propertyValue, separator)) { - for (String value : propertyValue.split(separator)) { - if (itemArray[1].equals(value)) { - propertyString.append(itemArray[0]).append(separator); - break; - } - } - } else { - if (itemArray[1].equals(propertyValue)) { - return itemArray[0]; - } - } - } - return StringUtils.stripEnd(propertyString.toString(), separator); - } - - /** - * 缂栫爜鏂囦欢鍚� - */ - public static String encodingFilename(String filename) { - return IdUtil.fastSimpleUUID() + "_" + filename + ".xlsx"; - } - -} diff --git a/ruoyi-common/ruoyi-common-idempotent/src/main/java/com/xmzs/common/idempotent/annotation/RepeatSubmit.java b/ruoyi-common/ruoyi-common-idempotent/src/main/java/com/xmzs/common/idempotent/annotation/RepeatSubmit.java deleted file mode 100644 index 541ddbc..0000000 --- a/ruoyi-common/ruoyi-common-idempotent/src/main/java/com/xmzs/common/idempotent/annotation/RepeatSubmit.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.xmzs.common.idempotent.annotation; - -import java.lang.annotation.*; -import java.util.concurrent.TimeUnit; - -/** - * 鑷畾涔夋敞瑙i槻姝㈣〃鍗曢噸澶嶆彁浜� - * - * @author Lion Li - */ -@Inherited -@Target(ElementType.METHOD) -@Retention(RetentionPolicy.RUNTIME) -@Documented -public @interface RepeatSubmit { - - /** - * 闂撮殧鏃堕棿(ms)锛屽皬浜庢鏃堕棿瑙嗕负閲嶅鎻愪氦 - */ - int interval() default 5000; - - TimeUnit timeUnit() default TimeUnit.MILLISECONDS; - - /** - * 鎻愮ず娑堟伅 鏀寔鍥介檯鍖� 鏍煎紡涓� {code} - */ - String message() default "{repeat.submit.message}"; - -} diff --git a/ruoyi-common/ruoyi-common-idempotent/src/main/java/com/xmzs/common/idempotent/aspectj/RepeatSubmitAspect.java b/ruoyi-common/ruoyi-common-idempotent/src/main/java/com/xmzs/common/idempotent/aspectj/RepeatSubmitAspect.java deleted file mode 100644 index 91f4b66..0000000 --- a/ruoyi-common/ruoyi-common-idempotent/src/main/java/com/xmzs/common/idempotent/aspectj/RepeatSubmitAspect.java +++ /dev/null @@ -1,152 +0,0 @@ -package com.xmzs.common.idempotent.aspectj; - -import cn.dev33.satoken.SaManager; -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.crypto.SecureUtil; -import com.xmzs.common.core.constant.GlobalConstants; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.utils.MessageUtils; -import com.xmzs.common.core.utils.ServletUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.idempotent.annotation.RepeatSubmit; -import com.xmzs.common.json.utils.JsonUtils; -import com.xmzs.common.redis.utils.RedisUtils; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import org.aspectj.lang.JoinPoint; -import org.aspectj.lang.annotation.AfterReturning; -import org.aspectj.lang.annotation.AfterThrowing; -import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.annotation.Before; -import org.springframework.validation.BindingResult; -import org.springframework.web.multipart.MultipartFile; - -import java.time.Duration; -import java.util.Collection; -import java.util.Map; - -/** - * 闃叉閲嶅鎻愪氦(鍙傝�冪編鍥TIS闃查噸绯荤粺) - * - * @author Lion Li - */ -@Aspect -public class RepeatSubmitAspect { - - private static final ThreadLocal<String> KEY_CACHE = new ThreadLocal<>(); - - @Before("@annotation(repeatSubmit)") - public void doBefore(JoinPoint point, RepeatSubmit repeatSubmit) throws Throwable { - // 濡傛灉娉ㄨВ涓嶄负0 鍒欎娇鐢ㄦ敞瑙f暟鍊� - long interval = 0; - if (repeatSubmit.interval() > 0) { - interval = repeatSubmit.timeUnit().toMillis(repeatSubmit.interval()); - } - if (interval < 1000) { - throw new ServiceException("閲嶅鎻愪氦闂撮殧鏃堕棿涓嶈兘灏忎簬'1'绉�"); - } - HttpServletRequest request = ServletUtils.getRequest(); - String nowParams = argsArrayToString(point.getArgs()); - - // 璇锋眰鍦板潃锛堜綔涓哄瓨鏀綾ache鐨刱ey鍊硷級 - String url = request.getRequestURI(); - - // 鍞竴鍊硷紙娌℃湁娑堟伅澶村垯浣跨敤璇锋眰鍦板潃锛� - String submitKey = StringUtils.trimToEmpty(request.getHeader(SaManager.getConfig().getTokenName())); - - submitKey = SecureUtil.md5(submitKey + ":" + nowParams); - // 鍞竴鏍囪瘑锛堟寚瀹歬ey + url + 娑堟伅澶达級 - String cacheRepeatKey = GlobalConstants.REPEAT_SUBMIT_KEY + url + submitKey; - String key = RedisUtils.getCacheObject(cacheRepeatKey); - if (key == null) { - RedisUtils.setCacheObject(cacheRepeatKey, "", Duration.ofMillis(interval)); - KEY_CACHE.set(cacheRepeatKey); - } else { - String message = repeatSubmit.message(); - if (StringUtils.startsWith(message, "{") && StringUtils.endsWith(message, "}")) { - message = MessageUtils.message(StringUtils.substring(message, 1, message.length() - 1)); - } - throw new ServiceException(message); - } - } - - /** - * 澶勭悊瀹岃姹傚悗鎵ц - * - * @param joinPoint 鍒囩偣 - */ - @AfterReturning(pointcut = "@annotation(repeatSubmit)", returning = "jsonResult") - public void doAfterReturning(JoinPoint joinPoint, RepeatSubmit repeatSubmit, Object jsonResult) { - if (jsonResult instanceof R r) { - try { - // 鎴愬姛鍒欎笉鍒犻櫎redis鏁版嵁 淇濊瘉鍦ㄦ湁鏁堟椂闂村唴鏃犳硶閲嶅鎻愪氦 - if (r.getCode() == R.SUCCESS) { - return; - } - RedisUtils.deleteObject(KEY_CACHE.get()); - } finally { - KEY_CACHE.remove(); - } - } - } - - /** - * 鎷︽埅寮傚父鎿嶄綔 - * - * @param joinPoint 鍒囩偣 - * @param e 寮傚父 - */ - @AfterThrowing(value = "@annotation(repeatSubmit)", throwing = "e") - public void doAfterThrowing(JoinPoint joinPoint, RepeatSubmit repeatSubmit, Exception e) { - RedisUtils.deleteObject(KEY_CACHE.get()); - KEY_CACHE.remove(); - } - - /** - * 鍙傛暟鎷艰 - */ - private String argsArrayToString(Object[] paramsArray) { - StringBuilder params = new StringBuilder(); - if (paramsArray != null && paramsArray.length > 0) { - for (Object o : paramsArray) { - if (ObjectUtil.isNotNull(o) && !isFilterObject(o)) { - try { - params.append(JsonUtils.toJsonString(o)).append(" "); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - } - return params.toString().trim(); - } - - /** - * 鍒ゆ柇鏄惁闇�瑕佽繃婊ょ殑瀵硅薄銆� - * - * @param o 瀵硅薄淇℃伅銆� - * @return 濡傛灉鏄渶瑕佽繃婊ょ殑瀵硅薄锛屽垯杩斿洖true锛涘惁鍒欒繑鍥瀎alse銆� - */ - @SuppressWarnings("rawtypes") - public boolean isFilterObject(final Object o) { - Class<?> clazz = o.getClass(); - if (clazz.isArray()) { - return clazz.getComponentType().isAssignableFrom(MultipartFile.class); - } else if (Collection.class.isAssignableFrom(clazz)) { - Collection collection = (Collection) o; - for (Object value : collection) { - return value instanceof MultipartFile; - } - } else if (Map.class.isAssignableFrom(clazz)) { - Map map = (Map) o; - for (Object value : map.entrySet()) { - Map.Entry entry = (Map.Entry) value; - return entry.getValue() instanceof MultipartFile; - } - } - return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse - || o instanceof BindingResult; - } - -} diff --git a/ruoyi-common/ruoyi-common-idempotent/src/main/java/com/xmzs/common/idempotent/config/IdempotentConfig.java b/ruoyi-common/ruoyi-common-idempotent/src/main/java/com/xmzs/common/idempotent/config/IdempotentConfig.java deleted file mode 100644 index 2964617..0000000 --- a/ruoyi-common/ruoyi-common-idempotent/src/main/java/com/xmzs/common/idempotent/config/IdempotentConfig.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.common.idempotent.config; - -import com.xmzs.common.idempotent.aspectj.RepeatSubmitAspect; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.context.annotation.Bean; -import org.springframework.data.redis.connection.RedisConfiguration; - -/** - * 骞傜瓑鍔熻兘閰嶇疆 - * - * @author Lion Li - */ -@AutoConfiguration(after = RedisConfiguration.class) -public class IdempotentConfig { - - @Bean - public RepeatSubmitAspect repeatSubmitAspect() { - return new RepeatSubmitAspect(); - } - -} diff --git a/ruoyi-common/ruoyi-common-job/pom.xml b/ruoyi-common/ruoyi-common-job/pom.xml deleted file mode 100644 index d820f20..0000000 --- a/ruoyi-common/ruoyi-common-job/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns="http://maven.apache.org/POM/4.0.0" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <parent> - <groupId>com.xmzs</groupId> - <artifactId>ruoyi-common</artifactId> - <version>${revision}</version> - <relativePath>../pom.xml</relativePath> - </parent> - <modelVersion>4.0.0</modelVersion> - - <artifactId>ruoyi-common-job</artifactId> - - <description> - ruoyi-common-job 瀹氭椂浠诲姟 - </description> - - <dependencies> - - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-autoconfigure</artifactId> - </dependency> - - <!-- xxl-job-core --> - <dependency> - <groupId>com.xuxueli</groupId> - <artifactId>xxl-job-core</artifactId> - </dependency> - - <dependency> - <groupId>org.projectlombok</groupId> - <artifactId>lombok</artifactId> - </dependency> - - <dependency> - <groupId>com.xmzs</groupId> - <artifactId>ruoyi-common-core</artifactId> - </dependency> - - </dependencies> -</project> diff --git a/ruoyi-common/ruoyi-common-job/src/main/java/com/xmzs/common/job/config/XxlJobConfig.java b/ruoyi-common/ruoyi-common-job/src/main/java/com/xmzs/common/job/config/XxlJobConfig.java deleted file mode 100644 index c7d184e..0000000 --- a/ruoyi-common/ruoyi-common-job/src/main/java/com/xmzs/common/job/config/XxlJobConfig.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.xmzs.common.job.config; - -import com.xmzs.common.job.config.properties.XxlJobProperties; -import com.xxl.job.core.executor.impl.XxlJobSpringExecutor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.Bean; - -/** - * xxl-job config - * - * @author Lion Li - */ -@Slf4j -@AutoConfiguration -@EnableConfigurationProperties(XxlJobProperties.class) -@ConditionalOnProperty(prefix = "xxl.job", name = "enabled", havingValue = "true") -public class XxlJobConfig { - - @Bean - public XxlJobSpringExecutor xxlJobExecutor(XxlJobProperties xxlJobProperties) { - log.info(">>>>>>>>>>> xxl-job config init."); - XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor(); - xxlJobSpringExecutor.setAdminAddresses(xxlJobProperties.getAdminAddresses()); - xxlJobSpringExecutor.setAccessToken(xxlJobProperties.getAccessToken()); - XxlJobProperties.Executor executor = xxlJobProperties.getExecutor(); - xxlJobSpringExecutor.setAppname(executor.getAppname()); - xxlJobSpringExecutor.setAddress(executor.getAddress()); - xxlJobSpringExecutor.setIp(executor.getIp()); - xxlJobSpringExecutor.setPort(executor.getPort()); - xxlJobSpringExecutor.setLogPath(executor.getLogPath()); - xxlJobSpringExecutor.setLogRetentionDays(executor.getLogRetentionDays()); - return xxlJobSpringExecutor; - } - -} diff --git a/ruoyi-common/ruoyi-common-job/src/main/java/com/xmzs/common/job/config/properties/XxlJobProperties.java b/ruoyi-common/ruoyi-common-job/src/main/java/com/xmzs/common/job/config/properties/XxlJobProperties.java deleted file mode 100644 index 5beb473..0000000 --- a/ruoyi-common/ruoyi-common-job/src/main/java/com/xmzs/common/job/config/properties/XxlJobProperties.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.xmzs.common.job.config.properties; - -import lombok.Data; -import lombok.NoArgsConstructor; -import org.springframework.boot.context.properties.ConfigurationProperties; - -/** - * xxljob閰嶇疆绫� - * - * @author Lion Li - */ -@Data -@ConfigurationProperties(prefix = "xxl.job") -public class XxlJobProperties { - - private Boolean enabled; - - private String adminAddresses; - - private String accessToken; - - private Executor executor; - - @Data - @NoArgsConstructor - public static class Executor { - - private String appname; - - private String address; - - private String ip; - - private int port; - - private String logPath; - - private int logRetentionDays; - } -} diff --git a/ruoyi-common/ruoyi-common-job/src/main/java/com/xxl/job/core/glue/impl/SpringGlueFactory.java b/ruoyi-common/ruoyi-common-job/src/main/java/com/xxl/job/core/glue/impl/SpringGlueFactory.java deleted file mode 100644 index 00cd822..0000000 --- a/ruoyi-common/ruoyi-common-job/src/main/java/com/xxl/job/core/glue/impl/SpringGlueFactory.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.xxl.job.core.glue.impl; - -import com.xxl.job.core.executor.impl.XxlJobSpringExecutor; -import com.xxl.job.core.glue.GlueFactory; -import jakarta.annotation.Resource; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.core.annotation.AnnotationUtils; - -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; - -/** - * @author xuxueli 2018-11-01 - */ -public class SpringGlueFactory extends GlueFactory { - private static Logger logger = LoggerFactory.getLogger(SpringGlueFactory.class); - - - /** - * inject action of spring - * @param instance - */ - @Override - public void injectService(Object instance){ - if (instance==null) { - return; - } - - if (XxlJobSpringExecutor.getApplicationContext() == null) { - return; - } - - Field[] fields = instance.getClass().getDeclaredFields(); - for (Field field : fields) { - if (Modifier.isStatic(field.getModifiers())) { - continue; - } - - Object fieldBean = null; - // with bean-id, bean could be found by both @Resource and @Autowired, or bean could only be found by @Autowired - - if (AnnotationUtils.getAnnotation(field, Resource.class) != null) { - try { - Resource resource = AnnotationUtils.getAnnotation(field, Resource.class); - if (resource.name()!=null && resource.name().length()>0){ - fieldBean = XxlJobSpringExecutor.getApplicationContext().getBean(resource.name()); - } else { - fieldBean = XxlJobSpringExecutor.getApplicationContext().getBean(field.getName()); - } - } catch (Exception e) { - } - if (fieldBean==null ) { - fieldBean = XxlJobSpringExecutor.getApplicationContext().getBean(field.getType()); - } - } else if (AnnotationUtils.getAnnotation(field, Autowired.class) != null) { - Qualifier qualifier = AnnotationUtils.getAnnotation(field, Qualifier.class); - if (qualifier!=null && qualifier.value()!=null && qualifier.value().length()>0) { - fieldBean = XxlJobSpringExecutor.getApplicationContext().getBean(qualifier.value()); - } else { - fieldBean = XxlJobSpringExecutor.getApplicationContext().getBean(field.getType()); - } - } - - if (fieldBean!=null) { - field.setAccessible(true); - try { - field.set(instance, fieldBean); - } catch (IllegalArgumentException e) { - logger.error(e.getMessage(), e); - } catch (IllegalAccessException e) { - logger.error(e.getMessage(), e); - } - } - } - } - -} diff --git a/ruoyi-common/ruoyi-common-job/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/ruoyi-common/ruoyi-common-job/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 559a39d..0000000 --- a/ruoyi-common/ruoyi-common-job/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1 +0,0 @@ -com.xmzs.common.job.config.XxlJobConfig diff --git a/ruoyi-common/ruoyi-common-json/src/main/java/com/xmzs/common/json/config/JacksonConfig.java b/ruoyi-common/ruoyi-common-json/src/main/java/com/xmzs/common/json/config/JacksonConfig.java deleted file mode 100644 index 9ed093e..0000000 --- a/ruoyi-common/ruoyi-common-json/src/main/java/com/xmzs/common/json/config/JacksonConfig.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.xmzs.common.json.config; - -import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; -import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; -import com.xmzs.common.json.handler.BigNumberSerializer; -import lombok.extern.slf4j.Slf4j; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; -import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration; -import org.springframework.context.annotation.Bean; - -import java.math.BigDecimal; -import java.math.BigInteger; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.util.TimeZone; - -/** - * jackson 閰嶇疆 - * - * @author Lion Li - */ -@Slf4j -@AutoConfiguration(before = JacksonAutoConfiguration.class) -public class JacksonConfig { - - @Bean - public Jackson2ObjectMapperBuilderCustomizer customizer() { - return builder -> { - // 鍏ㄥ眬閰嶇疆搴忓垪鍖栬繑鍥� JSON 澶勭悊 - JavaTimeModule javaTimeModule = new JavaTimeModule(); - javaTimeModule.addSerializer(Long.class, BigNumberSerializer.INSTANCE); - javaTimeModule.addSerializer(Long.TYPE, BigNumberSerializer.INSTANCE); - javaTimeModule.addSerializer(BigInteger.class, BigNumberSerializer.INSTANCE); - javaTimeModule.addSerializer(BigDecimal.class, ToStringSerializer.instance); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); - javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(formatter)); - javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(formatter)); - builder.modules(javaTimeModule); - builder.timeZone(TimeZone.getDefault()); - log.info("鍒濆鍖� jackson 閰嶇疆"); - }; - } - -} diff --git a/ruoyi-common/ruoyi-common-json/src/main/java/com/xmzs/common/json/handler/BigNumberSerializer.java b/ruoyi-common/ruoyi-common-json/src/main/java/com/xmzs/common/json/handler/BigNumberSerializer.java deleted file mode 100644 index 256b197..0000000 --- a/ruoyi-common/ruoyi-common-json/src/main/java/com/xmzs/common/json/handler/BigNumberSerializer.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.xmzs.common.json.handler; - -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JacksonStdImpl; -import com.fasterxml.jackson.databind.ser.std.NumberSerializer; - -import java.io.IOException; - -/** - * 瓒呭嚭 JS 鏈�澶ф渶灏忓�� 澶勭悊 - * - * @author Lion Li - */ -@JacksonStdImpl -public class BigNumberSerializer extends NumberSerializer { - - /** - * 鏍规嵁 JS Number.MAX_SAFE_INTEGER 涓� Number.MIN_SAFE_INTEGER 寰楁潵 - */ - private static final long MAX_SAFE_INTEGER = 9007199254740991L; - private static final long MIN_SAFE_INTEGER = -9007199254740991L; - - /** - * 鎻愪緵瀹炰緥 - */ - public static final BigNumberSerializer INSTANCE = new BigNumberSerializer(Number.class); - - public BigNumberSerializer(Class<? extends Number> rawType) { - super(rawType); - } - - @Override - public void serialize(Number value, JsonGenerator gen, SerializerProvider provider) throws IOException { - // 瓒呭嚭鑼冨洿 搴忓垪鍖栦綅瀛楃涓� - if (value.longValue() > MIN_SAFE_INTEGER && value.longValue() < MAX_SAFE_INTEGER) { - super.serialize(value, gen, provider); - } else { - gen.writeString(value.toString()); - } - } -} diff --git a/ruoyi-common/ruoyi-common-json/src/main/java/com/xmzs/common/json/utils/JsonUtils.java b/ruoyi-common/ruoyi-common-json/src/main/java/com/xmzs/common/json/utils/JsonUtils.java deleted file mode 100644 index 904f86b..0000000 --- a/ruoyi-common/ruoyi-common-json/src/main/java/com/xmzs/common/json/utils/JsonUtils.java +++ /dev/null @@ -1,113 +0,0 @@ -package com.xmzs.common.json.utils; - -import cn.hutool.core.lang.Dict; -import cn.hutool.core.util.ArrayUtil; -import cn.hutool.core.util.ObjectUtil; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.core.type.TypeReference; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.exc.MismatchedInputException; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.core.utils.StringUtils; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * JSON 宸ュ叿绫� - * - * @author 鑺嬮亾婧愮爜 - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class JsonUtils { - - private static final ObjectMapper OBJECT_MAPPER = SpringUtils.getBean(ObjectMapper.class); - - public static ObjectMapper getObjectMapper() { - return OBJECT_MAPPER; - } - - public static String toJsonString(Object object) { - if (ObjectUtil.isNull(object)) { - return null; - } - try { - return OBJECT_MAPPER.writeValueAsString(object); - } catch (JsonProcessingException e) { - throw new RuntimeException(e); - } - } - - public static <T> T parseObject(String text, Class<T> clazz) { - if (StringUtils.isEmpty(text)) { - return null; - } - try { - return OBJECT_MAPPER.readValue(text, clazz); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - public static <T> T parseObject(byte[] bytes, Class<T> clazz) { - if (ArrayUtil.isEmpty(bytes)) { - return null; - } - try { - return OBJECT_MAPPER.readValue(bytes, clazz); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - public static <T> T parseObject(String text, TypeReference<T> typeReference) { - if (StringUtils.isBlank(text)) { - return null; - } - try { - return OBJECT_MAPPER.readValue(text, typeReference); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - public static Dict parseMap(String text) { - if (StringUtils.isBlank(text)) { - return null; - } - try { - return OBJECT_MAPPER.readValue(text, OBJECT_MAPPER.getTypeFactory().constructType(Dict.class)); - } catch (MismatchedInputException e) { - // 绫诲瀷涓嶅尮閰嶈鏄庝笉鏄痡son - return null; - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - public static List<Dict> parseArrayMap(String text) { - if (StringUtils.isBlank(text)) { - return null; - } - try { - return OBJECT_MAPPER.readValue(text, OBJECT_MAPPER.getTypeFactory().constructCollectionType(List.class, Dict.class)); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - public static <T> List<T> parseArray(String text, Class<T> clazz) { - if (StringUtils.isEmpty(text)) { - return new ArrayList<>(); - } - try { - return OBJECT_MAPPER.readValue(text, OBJECT_MAPPER.getTypeFactory().constructCollectionType(List.class, clazz)); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - -} diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/annotation/Log.java b/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/annotation/Log.java deleted file mode 100644 index 2265d46..0000000 --- a/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/annotation/Log.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.xmzs.common.log.annotation; - -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.log.enums.OperatorType; - -import java.lang.annotation.*; - -/** - * 鑷畾涔夋搷浣滄棩蹇楄褰曟敞瑙� - * - * @author ruoyi - */ -@Target({ElementType.PARAMETER, ElementType.METHOD}) -@Retention(RetentionPolicy.RUNTIME) -@Documented -public @interface Log { - /** - * 妯″潡 - */ - String title() default ""; - - /** - * 鍔熻兘 - */ - BusinessType businessType() default BusinessType.OTHER; - - /** - * 鎿嶄綔浜虹被鍒� - */ - OperatorType operatorType() default OperatorType.MANAGE; - - /** - * 鏄惁淇濆瓨璇锋眰鐨勫弬鏁� - */ - boolean isSaveRequestData() default true; - - /** - * 鏄惁淇濆瓨鍝嶅簲鐨勫弬鏁� - */ - boolean isSaveResponseData() default true; - - - /** - * 鎺掗櫎鎸囧畾鐨勮姹傚弬鏁� - */ - String[] excludeParamNames() default {}; - -} diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/aspect/LogAspect.java b/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/aspect/LogAspect.java deleted file mode 100644 index 41c091c..0000000 --- a/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/aspect/LogAspect.java +++ /dev/null @@ -1,221 +0,0 @@ -package com.xmzs.common.log.aspect; - -import cn.hutool.core.lang.Dict; -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.ObjectUtil; -import com.alibaba.ttl.TransmittableThreadLocal; -import com.xmzs.common.core.utils.ServletUtils; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.json.utils.JsonUtils; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessStatus; -import com.xmzs.common.log.event.OperLogEvent; -import com.xmzs.common.satoken.utils.LoginHelper; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.time.StopWatch; -import org.aspectj.lang.JoinPoint; -import org.aspectj.lang.annotation.AfterReturning; -import org.aspectj.lang.annotation.AfterThrowing; -import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.annotation.Before; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.http.HttpMethod; -import org.springframework.validation.BindingResult; -import org.springframework.web.multipart.MultipartFile; - -import java.util.Collection; -import java.util.Map; - -/** - * 鎿嶄綔鏃ュ織璁板綍澶勭悊 - * - * @author Lion Li - */ -@Slf4j -@Aspect -@AutoConfiguration -public class LogAspect { - - /** - * 鎺掗櫎鏁忔劅灞炴�у瓧娈� - */ - public static final String[] EXCLUDE_PROPERTIES = { "password", "oldPassword", "newPassword", "confirmPassword" }; - - - /** - * 璁$畻鎿嶄綔娑堣�楁椂闂� - */ - private static final ThreadLocal<StopWatch> TIME_THREADLOCAL = new TransmittableThreadLocal<>(); - - /** - * 澶勭悊璇锋眰鍓嶆墽琛� - */ - @Before(value = "@annotation(controllerLog)") - public void boBefore(JoinPoint joinPoint, Log controllerLog) { - StopWatch stopWatch = new StopWatch(); - TIME_THREADLOCAL.set(stopWatch); - stopWatch.start(); - } - - /** - * 澶勭悊瀹岃姹傚悗鎵ц - * - * @param joinPoint 鍒囩偣 - */ - @AfterReturning(pointcut = "@annotation(controllerLog)", returning = "jsonResult") - public void doAfterReturning(JoinPoint joinPoint, Log controllerLog, Object jsonResult) { - handleLog(joinPoint, controllerLog, null, jsonResult); - } - - /** - * 鎷︽埅寮傚父鎿嶄綔 - * - * @param joinPoint 鍒囩偣 - * @param e 寮傚父 - */ - @AfterThrowing(value = "@annotation(controllerLog)", throwing = "e") - public void doAfterThrowing(JoinPoint joinPoint, Log controllerLog, Exception e) { - handleLog(joinPoint, controllerLog, e, null); - } - - protected void handleLog(final JoinPoint joinPoint, Log controllerLog, final Exception e, Object jsonResult) { - try { - - // *========鏁版嵁搴撴棩蹇�=========*// - OperLogEvent operLog = new OperLogEvent(); - operLog.setTenantId(LoginHelper.getTenantId()); - operLog.setStatus(BusinessStatus.SUCCESS.ordinal()); - // 璇锋眰鐨勫湴鍧� - String ip = ServletUtils.getClientIP(); - operLog.setOperIp(ip); - operLog.setOperUrl(StringUtils.substring(ServletUtils.getRequest().getRequestURI(), 0, 255)); - operLog.setOperName(LoginHelper.getUsername()); - - if (e != null) { - operLog.setStatus(BusinessStatus.FAIL.ordinal()); - operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000)); - } - // 璁剧疆鏂规硶鍚嶇О - String className = joinPoint.getTarget().getClass().getName(); - String methodName = joinPoint.getSignature().getName(); - operLog.setMethod(className + "." + methodName + "()"); - // 璁剧疆璇锋眰鏂瑰紡 - operLog.setRequestMethod(ServletUtils.getRequest().getMethod()); - // 澶勭悊璁剧疆娉ㄨВ涓婄殑鍙傛暟 - getControllerMethodDescription(joinPoint, controllerLog, operLog, jsonResult); - // 璁剧疆娑堣�楁椂闂� - StopWatch stopWatch = TIME_THREADLOCAL.get(); - stopWatch.stop(); - operLog.setCostTime(stopWatch.getTime()); - // 鍙戝竷浜嬩欢淇濆瓨鏁版嵁搴� - SpringUtils.context().publishEvent(operLog); - } catch (Exception exp) { - // 璁板綍鏈湴寮傚父鏃ュ織 - log.error("寮傚父淇℃伅:{}", exp.getMessage()); - exp.printStackTrace(); - } finally { - TIME_THREADLOCAL.remove(); - } - } - - /** - * 鑾峰彇娉ㄨВ涓鏂规硶鐨勬弿杩颁俊鎭� 鐢ㄤ簬Controller灞傛敞瑙� - * - * @param log 鏃ュ織 - * @param operLog 鎿嶄綔鏃ュ織 - * @throws Exception - */ - public void getControllerMethodDescription(JoinPoint joinPoint, Log log, OperLogEvent operLog, Object jsonResult) throws Exception { - // 璁剧疆action鍔ㄤ綔 - operLog.setBusinessType(log.businessType().ordinal()); - // 璁剧疆鏍囬 - operLog.setTitle(log.title()); - // 璁剧疆鎿嶄綔浜虹被鍒� - operLog.setOperatorType(log.operatorType().ordinal()); - // 鏄惁闇�瑕佷繚瀛榬equest锛屽弬鏁板拰鍊� - if (log.isSaveRequestData()) { - // 鑾峰彇鍙傛暟鐨勪俊鎭紝浼犲叆鍒版暟鎹簱涓�� - setRequestValue(joinPoint, operLog, log.excludeParamNames()); - } - // 鏄惁闇�瑕佷繚瀛榬esponse锛屽弬鏁板拰鍊� - if (log.isSaveResponseData() && ObjectUtil.isNotNull(jsonResult)) { - operLog.setJsonResult(StringUtils.substring(JsonUtils.toJsonString(jsonResult), 0, 2000)); - } - } - - /** - * 鑾峰彇璇锋眰鐨勫弬鏁帮紝鏀惧埌log涓� - * - * @param operLog 鎿嶄綔鏃ュ織 - * @throws Exception 寮傚父 - */ - private void setRequestValue(JoinPoint joinPoint, OperLogEvent operLog, String[] excludeParamNames) throws Exception { - Map<String, String> paramsMap = ServletUtils.getParamMap(ServletUtils.getRequest()); - String requestMethod = operLog.getRequestMethod(); - if (MapUtil.isEmpty(paramsMap) - && HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod)) { - String params = argsArrayToString(joinPoint.getArgs(), excludeParamNames); - operLog.setOperParam(StringUtils.substring(params, 0, 2000)); - } else { - MapUtil.removeAny(paramsMap, EXCLUDE_PROPERTIES); - MapUtil.removeAny(paramsMap, excludeParamNames); - operLog.setOperParam(StringUtils.substring(JsonUtils.toJsonString(paramsMap), 0, 2000)); - } - } - - /** - * 鍙傛暟鎷艰 - */ - private String argsArrayToString(Object[] paramsArray, String[] excludeParamNames) { - StringBuilder params = new StringBuilder(); - if (paramsArray != null && paramsArray.length > 0) { - for (Object o : paramsArray) { - if (ObjectUtil.isNotNull(o) && !isFilterObject(o)) { - try { - String str = JsonUtils.toJsonString(o); - Dict dict = JsonUtils.parseMap(str); - if (MapUtil.isNotEmpty(dict)) { - MapUtil.removeAny(dict, EXCLUDE_PROPERTIES); - MapUtil.removeAny(dict, excludeParamNames); - str = JsonUtils.toJsonString(dict); - } - params.append(str).append(" "); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - } - return params.toString().trim(); - } - - /** - * 鍒ゆ柇鏄惁闇�瑕佽繃婊ょ殑瀵硅薄銆� - * - * @param o 瀵硅薄淇℃伅銆� - * @return 濡傛灉鏄渶瑕佽繃婊ょ殑瀵硅薄锛屽垯杩斿洖true锛涘惁鍒欒繑鍥瀎alse銆� - */ - @SuppressWarnings("rawtypes") - public boolean isFilterObject(final Object o) { - Class<?> clazz = o.getClass(); - if (clazz.isArray()) { - return clazz.getComponentType().isAssignableFrom(MultipartFile.class); - } else if (Collection.class.isAssignableFrom(clazz)) { - Collection collection = (Collection) o; - for (Object value : collection) { - return value instanceof MultipartFile; - } - } else if (Map.class.isAssignableFrom(clazz)) { - Map map = (Map) o; - for (Object value : map.entrySet()) { - Map.Entry entry = (Map.Entry) value; - return entry.getValue() instanceof MultipartFile; - } - } - return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse - || o instanceof BindingResult; - } -} diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/enums/BusinessStatus.java b/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/enums/BusinessStatus.java deleted file mode 100644 index 84109a7..0000000 --- a/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/enums/BusinessStatus.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.common.log.enums; - -/** - * 鎿嶄綔鐘舵�� - * - * @author ruoyi - */ -public enum BusinessStatus { - /** - * 鎴愬姛 - */ - SUCCESS, - - /** - * 澶辫触 - */ - FAIL, -} diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/enums/BusinessType.java b/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/enums/BusinessType.java deleted file mode 100644 index 698123f..0000000 --- a/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/enums/BusinessType.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.xmzs.common.log.enums; - -/** - * 涓氬姟鎿嶄綔绫诲瀷 - * - * @author ruoyi - */ -public enum BusinessType { - /** - * 鍏跺畠 - */ - OTHER, - - /** - * 鏂板 - */ - INSERT, - - /** - * 淇敼 - */ - UPDATE, - - /** - * 鍒犻櫎 - */ - DELETE, - - /** - * 鎺堟潈 - */ - GRANT, - - /** - * 瀵煎嚭 - */ - EXPORT, - - /** - * 瀵煎叆 - */ - IMPORT, - - /** - * 寮洪�� - */ - FORCE, - - /** - * 鐢熸垚浠g爜 - */ - GENCODE, - - /** - * 娓呯┖鏁版嵁 - */ - CLEAN, -} diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/enums/OperatorType.java b/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/enums/OperatorType.java deleted file mode 100644 index f83a8c7..0000000 --- a/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/enums/OperatorType.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.xmzs.common.log.enums; - -/** - * 鎿嶄綔浜虹被鍒� - * - * @author ruoyi - */ -public enum OperatorType { - /** - * 鍏跺畠 - */ - OTHER, - - /** - * 鍚庡彴鐢ㄦ埛 - */ - MANAGE, - - /** - * 鎵嬫満绔敤鎴� - */ - MOBILE -} diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/event/LogininforEvent.java b/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/event/LogininforEvent.java deleted file mode 100644 index 10a9340..0000000 --- a/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/event/LogininforEvent.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.xmzs.common.log.event; - -import lombok.Data; - -import jakarta.servlet.http.HttpServletRequest; - -import java.io.Serial; -import java.io.Serializable; - -/** - * 鐧诲綍浜嬩欢 - * - * @author Lion Li - */ - -@Data -public class LogininforEvent implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 绉熸埛ID - */ - private String tenantId; - - /** - * 鐢ㄦ埛璐﹀彿 - */ - private String username; - - /** - * 鐧诲綍鐘舵�� 0鎴愬姛 1澶辫触 - */ - private String status; - - /** - * 鎻愮ず娑堟伅 - */ - private String message; - - /** - * 璇锋眰浣� - */ - private HttpServletRequest request; - - /** - * 鍏朵粬鍙傛暟 - */ - private Object[] args; - -} diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/event/OperLogEvent.java b/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/event/OperLogEvent.java deleted file mode 100644 index 8ab5529..0000000 --- a/ruoyi-common/ruoyi-common-log/src/main/java/com/xmzs/common/log/event/OperLogEvent.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.xmzs.common.log.event; - -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - -/** - * 鎿嶄綔鏃ュ織浜嬩欢 - * - * @author Lion Li - */ - -@Data -public class OperLogEvent implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 鏃ュ織涓婚敭 - */ - private Long operId; - - /** - * 绉熸埛ID - */ - private String tenantId; - - /** - * 鎿嶄綔妯″潡 - */ - private String title; - - /** - * 涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛� - */ - private Integer businessType; - - /** - * 涓氬姟绫诲瀷鏁扮粍 - */ - private Integer[] businessTypes; - - /** - * 璇锋眰鏂规硶 - */ - private String method; - - /** - * 璇锋眰鏂瑰紡 - */ - private String requestMethod; - - /** - * 鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級 - */ - private Integer operatorType; - - /** - * 鎿嶄綔浜哄憳 - */ - private String operName; - - /** - * 閮ㄩ棬鍚嶇О - */ - private String deptName; - - /** - * 璇锋眰url - */ - private String operUrl; - - /** - * 鎿嶄綔鍦板潃 - */ - private String operIp; - - /** - * 鎿嶄綔鍦扮偣 - */ - private String operLocation; - - /** - * 璇锋眰鍙傛暟 - */ - private String operParam; - - /** - * 杩斿洖鍙傛暟 - */ - private String jsonResult; - - /** - * 鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛� - */ - private Integer status; - - /** - * 閿欒娑堟伅 - */ - private String errorMsg; - - /** - * 鎿嶄綔鏃堕棿 - */ - private Date operTime; - - /** - * 娑堣�楁椂闂� - */ - private Long costTime; -} diff --git a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/config/MailConfig.java b/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/config/MailConfig.java deleted file mode 100644 index 9704692..0000000 --- a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/config/MailConfig.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.xmzs.common.mail.config; - -import com.xmzs.common.mail.config.properties.MailProperties; -import com.xmzs.common.mail.utils.MailAccount; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.Bean; - -/** - * JavaMail 閰嶇疆 - * - * @author Michelle.Chung - */ -@AutoConfiguration -@EnableConfigurationProperties(MailProperties.class) -public class MailConfig { - - @Bean - @ConditionalOnProperty(value = "mail.enabled", havingValue = "true") - public MailAccount mailAccount(MailProperties mailProperties) { - MailAccount account = new MailAccount(); - account.setHost(mailProperties.getHost()); - account.setPort(mailProperties.getPort()); - account.setAuth(mailProperties.getAuth()); - account.setFrom(mailProperties.getFrom()); - account.setUser(mailProperties.getUser()); - account.setPass(mailProperties.getPass()); - account.setSocketFactoryPort(mailProperties.getPort()); - account.setStarttlsEnable(mailProperties.getStarttlsEnable()); - account.setSslEnable(mailProperties.getSslEnable()); - account.setTimeout(mailProperties.getTimeout()); - account.setConnectionTimeout(mailProperties.getConnectionTimeout()); - return account; - } - -} diff --git a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/config/properties/MailProperties.java b/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/config/properties/MailProperties.java deleted file mode 100644 index c7272b5..0000000 --- a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/config/properties/MailProperties.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.xmzs.common.mail.config.properties; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; - -/** - * JavaMail 閰嶇疆灞炴�� - * - * @author Michelle.Chung - */ -@Data -@ConfigurationProperties(prefix = "mail") -public class MailProperties { - - /** - * 杩囨护寮�鍏� - */ - private Boolean enabled; - - /** - * SMTP鏈嶅姟鍣ㄥ煙鍚� - */ - private String host; - - /** - * SMTP鏈嶅姟绔彛 - */ - private Integer port; - - /** - * 鏄惁闇�瑕佺敤鎴峰悕瀵嗙爜楠岃瘉 - */ - private Boolean auth; - - /** - * 鐢ㄦ埛鍚� - */ - private String user; - - /** - * 瀵嗙爜 - */ - private String pass; - - /** - * 鍙戦�佹柟锛岄伒寰猂FC-822鏍囧噯 - */ - private String from; - - /** - * 浣跨敤 STARTTLS瀹夊叏杩炴帴锛孲TARTTLS鏄绾枃鏈�氫俊鍗忚鐨勬墿灞曘�傚畠灏嗙函鏂囨湰杩炴帴鍗囩骇涓哄姞瀵嗚繛鎺ワ紙TLS鎴朣SL锛夛紝 鑰屼笉鏄娇鐢ㄤ竴涓崟鐙殑鍔犲瘑閫氫俊绔彛銆� - */ - private Boolean starttlsEnable; - - /** - * 浣跨敤 SSL瀹夊叏杩炴帴 - */ - private Boolean sslEnable; - - /** - * SMTP瓒呮椂鏃堕暱锛屽崟浣嶆绉掞紝缂虹渷鍊间笉瓒呮椂 - */ - private Long timeout; - - /** - * Socket杩炴帴瓒呮椂鍊硷紝鍗曚綅姣锛岀己鐪佸�间笉瓒呮椂 - */ - private Long connectionTimeout; -} diff --git a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/GlobalMailAccount.java b/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/GlobalMailAccount.java deleted file mode 100644 index bdc72a8..0000000 --- a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/GlobalMailAccount.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.xmzs.common.mail.utils; - -import cn.hutool.core.io.IORuntimeException; - -/** - * 鍏ㄥ眬閭欢甯愭埛锛屼緷璧栦簬閭欢閰嶇疆鏂囦欢{@link MailAccount#MAIL_SETTING_PATHS} - * - * @author looly - */ -public enum GlobalMailAccount { - INSTANCE; - - private final MailAccount mailAccount; - - /** - * 鏋勯�� - */ - GlobalMailAccount() { - mailAccount = createDefaultAccount(); - } - - /** - * 鑾峰緱閭欢甯愭埛 - * - * @return 閭欢甯愭埛 - */ - public MailAccount getAccount() { - return this.mailAccount; - } - - /** - * 鍒涘缓榛樿甯愭埛 - * - * @return MailAccount - */ - private MailAccount createDefaultAccount() { - for (String mailSettingPath : MailAccount.MAIL_SETTING_PATHS) { - try { - return new MailAccount(mailSettingPath); - } catch (IORuntimeException ignore) { - //ignore - } - } - return null; - } -} diff --git a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/InternalMailUtil.java b/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/InternalMailUtil.java deleted file mode 100644 index 0426754..0000000 --- a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/InternalMailUtil.java +++ /dev/null @@ -1,108 +0,0 @@ -package com.xmzs.common.mail.utils; - -import cn.hutool.core.util.ArrayUtil; -import jakarta.mail.internet.AddressException; -import jakarta.mail.internet.InternetAddress; -import jakarta.mail.internet.MimeUtility; - -import java.io.UnsupportedEncodingException; -import java.nio.charset.Charset; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -/** - * 閭欢鍐呴儴宸ュ叿绫� - * - * @author looly - * @since 3.2.3 - */ -public class InternalMailUtil { - - /** - * 灏嗗涓瓧绗︿覆閭欢鍦板潃杞负{@link InternetAddress}鍒楄〃<br> - * 鍗曚釜瀛楃涓插湴鍧�鍙互鏄涓湴鍧�鍚堝苟鐨勫瓧绗︿覆 - * - * @param addrStrs 鍦板潃鏁扮粍 - * @param charset 缂栫爜锛堜富瑕佺敤浜庝腑鏂囩敤鎴峰悕鐨勭紪鐮侊級 - * @return 鍦板潃鏁扮粍 - * @since 4.0.3 - */ - public static InternetAddress[] parseAddressFromStrs(String[] addrStrs, Charset charset) { - final List<InternetAddress> resultList = new ArrayList<>(addrStrs.length); - InternetAddress[] addrs; - for (String addrStr : addrStrs) { - addrs = parseAddress(addrStr, charset); - if (ArrayUtil.isNotEmpty(addrs)) { - Collections.addAll(resultList, addrs); - } - } - return resultList.toArray(new InternetAddress[0]); - } - - /** - * 瑙f瀽绗竴涓湴鍧� - * - * @param address 鍦板潃瀛楃涓� - * @param charset 缂栫爜锛寋@code null}琛ㄧず浣跨敤绯荤粺灞炴�у畾涔夌殑缂栫爜鎴栫郴缁熺紪鐮� - * @return 鍦板潃鍒楄〃 - */ - public static InternetAddress parseFirstAddress(String address, Charset charset) { - final InternetAddress[] internetAddresses = parseAddress(address, charset); - if (ArrayUtil.isEmpty(internetAddresses)) { - try { - return new InternetAddress(address); - } catch (AddressException e) { - throw new MailException(e); - } - } - return internetAddresses[0]; - } - - /** - * 灏嗕竴涓湴鍧�瀛楃涓茶В鏋愪负澶氫釜鍦板潃<br> - * 鍦板潃闂翠娇鐢�" "銆�","銆�";"鍒嗛殧 - * - * @param address 鍦板潃瀛楃涓� - * @param charset 缂栫爜锛寋@code null}琛ㄧず浣跨敤绯荤粺灞炴�у畾涔夌殑缂栫爜鎴栫郴缁熺紪鐮� - * @return 鍦板潃鍒楄〃 - */ - public static InternetAddress[] parseAddress(String address, Charset charset) { - InternetAddress[] addresses; - try { - addresses = InternetAddress.parse(address); - } catch (AddressException e) { - throw new MailException(e); - } - //缂栫爜鐢ㄦ埛鍚� - if (ArrayUtil.isNotEmpty(addresses)) { - final String charsetStr = null == charset ? null : charset.name(); - for (InternetAddress internetAddress : addresses) { - try { - internetAddress.setPersonal(internetAddress.getPersonal(), charsetStr); - } catch (UnsupportedEncodingException e) { - throw new MailException(e); - } - } - } - - return addresses; - } - - /** - * 缂栫爜涓枃瀛楃<br> - * 缂栫爜澶辫触杩斿洖鍘熷瓧绗︿覆 - * - * @param text 琚紪鐮佺殑鏂囨湰 - * @param charset 缂栫爜 - * @return 缂栫爜鍚庣殑缁撴灉 - */ - public static String encodeText(String text, Charset charset) { - try { - return MimeUtility.encodeText(text, charset.name(), null); - } catch (UnsupportedEncodingException e) { - // ignore - } - return text; - } -} diff --git a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/Mail.java b/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/Mail.java deleted file mode 100644 index 51d3b47..0000000 --- a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/Mail.java +++ /dev/null @@ -1,483 +0,0 @@ -package com.xmzs.common.mail.utils; - -import cn.hutool.core.builder.Builder; -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.io.IORuntimeException; -import cn.hutool.core.io.IoUtil; -import cn.hutool.core.util.ArrayUtil; -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import jakarta.activation.DataHandler; -import jakarta.activation.DataSource; -import jakarta.activation.FileDataSource; -import jakarta.activation.FileTypeMap; -import jakarta.mail.*; -import jakarta.mail.internet.MimeBodyPart; -import jakarta.mail.internet.MimeMessage; -import jakarta.mail.internet.MimeMultipart; -import jakarta.mail.internet.MimeUtility; -import jakarta.mail.util.ByteArrayDataSource; - -import java.io.*; -import java.nio.charset.Charset; -import java.util.Date; - -/** - * 閭欢鍙戦�佸鎴风 - * - * @author looly - * @since 3.2.0 - */ -public class Mail implements Builder<MimeMessage> { - @Serial - private static final long serialVersionUID = 1L; - - /** - * 閭甯愭埛淇℃伅浠ュ強涓�浜涘鎴风閰嶇疆淇℃伅 - */ - private final MailAccount mailAccount; - /** - * 鏀朵欢浜哄垪琛� - */ - private String[] tos; - /** - * 鎶勯�佷汉鍒楄〃锛坈arbon copy锛� - */ - private String[] ccs; - /** - * 瀵嗛�佷汉鍒楄〃锛坆lind carbon copy锛� - */ - private String[] bccs; - /** - * 鍥炲鍦板潃(reply-to) - */ - private String[] reply; - /** - * 鏍囬 - */ - private String title; - /** - * 鍐呭 - */ - private String content; - /** - * 鏄惁涓篐TML - */ - private boolean isHtml; - /** - * 姝f枃銆侀檮浠跺拰鍥剧墖鐨勬贩鍚堥儴鍒� - */ - private final Multipart multipart = new MimeMultipart(); - /** - * 鏄惁浣跨敤鍏ㄥ眬浼氳瘽锛岄粯璁や负false - */ - private boolean useGlobalSession = false; - - /** - * debug杈撳嚭浣嶇疆锛屽彲浠ヨ嚜瀹氫箟debug鏃ュ織 - */ - private PrintStream debugOutput; - - /** - * 鍒涘缓閭欢瀹㈡埛绔� - * - * @param mailAccount 閭欢甯愬彿 - * @return Mail - */ - public static Mail create(MailAccount mailAccount) { - return new Mail(mailAccount); - } - - /** - * 鍒涘缓閭欢瀹㈡埛绔紝浣跨敤鍏ㄥ眬閭欢甯愭埛 - * - * @return Mail - */ - public static Mail create() { - return new Mail(); - } - - // --------------------------------------------------------------- Constructor start - - /** - * 鏋勯�狅紝浣跨敤鍏ㄥ眬閭欢甯愭埛 - */ - public Mail() { - this(GlobalMailAccount.INSTANCE.getAccount()); - } - - /** - * 鏋勯�� - * - * @param mailAccount 閭欢甯愭埛锛屽鏋滀负null浣跨敤榛樿閰嶇疆鏂囦欢鐨勫叏灞�閭欢閰嶇疆 - */ - public Mail(MailAccount mailAccount) { - mailAccount = (null != mailAccount) ? mailAccount : GlobalMailAccount.INSTANCE.getAccount(); - this.mailAccount = mailAccount.defaultIfEmpty(); - } - // --------------------------------------------------------------- Constructor end - - // --------------------------------------------------------------- Getters and Setters start - - /** - * 璁剧疆鏀朵欢浜� - * - * @param tos 鏀朵欢浜哄垪琛� - * @return this - * @see #setTos(String...) - */ - public Mail to(String... tos) { - return setTos(tos); - } - - /** - * 璁剧疆澶氫釜鏀朵欢浜� - * - * @param tos 鏀朵欢浜哄垪琛� - * @return this - */ - public Mail setTos(String... tos) { - this.tos = tos; - return this; - } - - /** - * 璁剧疆澶氫釜鎶勯�佷汉锛坈arbon copy锛� - * - * @param ccs 鎶勯�佷汉鍒楄〃 - * @return this - * @since 4.0.3 - */ - public Mail setCcs(String... ccs) { - this.ccs = ccs; - return this; - } - - /** - * 璁剧疆澶氫釜瀵嗛�佷汉锛坆lind carbon copy锛� - * - * @param bccs 瀵嗛�佷汉鍒楄〃 - * @return this - * @since 4.0.3 - */ - public Mail setBccs(String... bccs) { - this.bccs = bccs; - return this; - } - - /** - * 璁剧疆澶氫釜鍥炲鍦板潃(reply-to) - * - * @param reply 鍥炲鍦板潃(reply-to)鍒楄〃 - * @return this - * @since 4.6.0 - */ - public Mail setReply(String... reply) { - this.reply = reply; - return this; - } - - /** - * 璁剧疆鏍囬 - * - * @param title 鏍囬 - * @return this - */ - public Mail setTitle(String title) { - this.title = title; - return this; - } - - /** - * 璁剧疆姝f枃<br> - * 姝f枃鍙互鏄櫘閫氭枃鏈篃鍙互鏄疕TML锛堥粯璁ゆ櫘閫氭枃鏈級锛屽彲浠ラ�氳繃璋冪敤{@link #setHtml(boolean)} 璁剧疆鏄惁涓篐TML - * - * @param content 姝f枃 - * @return this - */ - public Mail setContent(String content) { - this.content = content; - return this; - } - - /** - * 璁剧疆鏄惁鏄疕TML - * - * @param isHtml 鏄惁涓篐TML - * @return this - */ - public Mail setHtml(boolean isHtml) { - this.isHtml = isHtml; - return this; - } - - /** - * 璁剧疆姝f枃 - * - * @param content 姝f枃鍐呭 - * @param isHtml 鏄惁涓篐TML - * @return this - */ - public Mail setContent(String content, boolean isHtml) { - setContent(content); - return setHtml(isHtml); - } - - /** - * 璁剧疆鏂囦欢绫诲瀷闄勪欢锛屾枃浠跺彲浠ユ槸鍥剧墖鏂囦欢锛屾鏃惰嚜鍔ㄨ缃甤id锛堟鏂囦腑寮曠敤鍥剧墖锛夛紝榛樿cid涓烘枃浠跺悕 - * - * @param files 闄勪欢鏂囦欢鍒楄〃 - * @return this - */ - public Mail setFiles(File... files) { - if (ArrayUtil.isEmpty(files)) { - return this; - } - - final DataSource[] attachments = new DataSource[files.length]; - for (int i = 0; i < files.length; i++) { - attachments[i] = new FileDataSource(files[i]); - } - return setAttachments(attachments); - } - - /** - * 澧炲姞闄勪欢鎴栧浘鐗囷紝闄勪欢浣跨敤{@link DataSource} 褰㈠紡琛ㄧず锛屽彲浠ヤ娇鐢▄@link FileDataSource}鍖呰鏂囦欢琛ㄧず鏂囦欢闄勪欢 - * - * @param attachments 闄勪欢鍒楄〃 - * @return this - * @since 4.0.9 - */ - public Mail setAttachments(DataSource... attachments) { - if (ArrayUtil.isNotEmpty(attachments)) { - final Charset charset = this.mailAccount.getCharset(); - MimeBodyPart bodyPart; - String nameEncoded; - try { - for (DataSource attachment : attachments) { - bodyPart = new MimeBodyPart(); - bodyPart.setDataHandler(new DataHandler(attachment)); - nameEncoded = attachment.getName(); - if (this.mailAccount.isEncodefilename()) { - nameEncoded = InternalMailUtil.encodeText(nameEncoded, charset); - } - // 鏅�氶檮浠舵枃浠跺悕 - bodyPart.setFileName(nameEncoded); - if (StrUtil.startWith(attachment.getContentType(), "image/")) { - // 鍥剧墖闄勪欢锛岀敤浜庢鏂囦腑寮曠敤鍥剧墖 - bodyPart.setContentID(nameEncoded); - } - this.multipart.addBodyPart(bodyPart); - } - } catch (MessagingException e) { - throw new MailException(e); - } - } - return this; - } - - /** - * 澧炲姞鍥剧墖锛屽浘鐗囩殑閿搴斿埌閭欢妯℃澘涓殑鍗犱綅瀛楃涓诧紝鍥剧墖绫诲瀷榛樿涓�"image/jpeg" - * - * @param cid 鍥剧墖涓庡崰浣嶇锛屽崰浣嶇鏍煎紡涓篶id:${cid} - * @param imageStream 鍥剧墖鏂囦欢 - * @return this - * @since 4.6.3 - */ - public Mail addImage(String cid, InputStream imageStream) { - return addImage(cid, imageStream, null); - } - - /** - * 澧炲姞鍥剧墖锛屽浘鐗囩殑閿搴斿埌閭欢妯℃澘涓殑鍗犱綅瀛楃涓� - * - * @param cid 鍥剧墖涓庡崰浣嶇锛屽崰浣嶇鏍煎紡涓篶id:${cid} - * @param imageStream 鍥剧墖娴侊紝涓嶅叧闂� - * @param contentType 鍥剧墖绫诲瀷锛宯ull璧嬪�奸粯璁ょ殑"image/jpeg" - * @return this - * @since 4.6.3 - */ - public Mail addImage(String cid, InputStream imageStream, String contentType) { - ByteArrayDataSource imgSource; - try { - imgSource = new ByteArrayDataSource(imageStream, ObjectUtil.defaultIfNull(contentType, "image/jpeg")); - } catch (IOException e) { - throw new IORuntimeException(e); - } - imgSource.setName(cid); - return setAttachments(imgSource); - } - - /** - * 澧炲姞鍥剧墖锛屽浘鐗囩殑閿搴斿埌閭欢妯℃澘涓殑鍗犱綅瀛楃涓� - * - * @param cid 鍥剧墖涓庡崰浣嶇锛屽崰浣嶇鏍煎紡涓篶id:${cid} - * @param imageFile 鍥剧墖鏂囦欢 - * @return this - * @since 4.6.3 - */ - public Mail addImage(String cid, File imageFile) { - InputStream in = null; - try { - in = FileUtil.getInputStream(imageFile); - return addImage(cid, in, FileTypeMap.getDefaultFileTypeMap().getContentType(imageFile)); - } finally { - IoUtil.close(in); - } - } - - /** - * 璁剧疆瀛楃闆嗙紪鐮� - * - * @param charset 瀛楃闆嗙紪鐮� - * @return this - * @see MailAccount#setCharset(Charset) - */ - public Mail setCharset(Charset charset) { - this.mailAccount.setCharset(charset); - return this; - } - - /** - * 璁剧疆鏄惁浣跨敤鍏ㄥ眬浼氳瘽锛岄粯璁や负true - * - * @param isUseGlobalSession 鏄惁浣跨敤鍏ㄥ眬浼氳瘽锛岄粯璁や负true - * @return this - * @since 4.0.2 - */ - public Mail setUseGlobalSession(boolean isUseGlobalSession) { - this.useGlobalSession = isUseGlobalSession; - return this; - } - - /** - * 璁剧疆debug杈撳嚭浣嶇疆锛屽彲浠ヨ嚜瀹氫箟debug鏃ュ織 - * - * @param debugOutput debug杈撳嚭浣嶇疆 - * @return this - * @since 5.5.6 - */ - public Mail setDebugOutput(PrintStream debugOutput) { - this.debugOutput = debugOutput; - return this; - } - // --------------------------------------------------------------- Getters and Setters end - - @Override - public MimeMessage build() { - try { - return buildMsg(); - } catch (MessagingException e) { - throw new MailException(e); - } - } - - /** - * 鍙戦�� - * - * @return message-id - * @throws MailException 閭欢鍙戦�佸紓甯� - */ - public String send() throws MailException { - try { - return doSend(); - } catch (MessagingException e) { - if (e instanceof SendFailedException) { - // 褰撳湴鍧�鏃犳晥鏃讹紝鏄剧ず鏇村姞璇︾粏鐨勬棤鏁堝湴鍧�淇℃伅 - final Address[] invalidAddresses = ((SendFailedException) e).getInvalidAddresses(); - final String msg = StrUtil.format("Invalid Addresses: {}", ArrayUtil.toString(invalidAddresses)); - throw new MailException(msg, e); - } - throw new MailException(e); - } - } - - // --------------------------------------------------------------- Private method start - - /** - * 鎵ц鍙戦�� - * - * @return message-id - * @throws MessagingException 鍙戦�佸紓甯� - */ - private String doSend() throws MessagingException { - final MimeMessage mimeMessage = buildMsg(); - Transport.send(mimeMessage); - return mimeMessage.getMessageID(); - } - - /** - * 鏋勫缓娑堟伅 - * - * @return {@link MimeMessage}娑堟伅 - * @throws MessagingException 娑堟伅寮傚父 - */ - private MimeMessage buildMsg() throws MessagingException { - final Charset charset = this.mailAccount.getCharset(); - final MimeMessage msg = new MimeMessage(getSession()); - // 鍙戜欢浜� - final String from = this.mailAccount.getFrom(); - if (StrUtil.isEmpty(from)) { - // 鐢ㄦ埛鏈彁渚涘彂閫佹柟锛屽垯浠嶴ession涓嚜鍔ㄨ幏鍙� - msg.setFrom(); - } else { - msg.setFrom(InternalMailUtil.parseFirstAddress(from, charset)); - } - // 鏍囬 - msg.setSubject(this.title, (null == charset) ? null : charset.name()); - // 鍙戦�佹椂闂� - msg.setSentDate(new Date()); - // 鍐呭鍜岄檮浠� - msg.setContent(buildContent(charset)); - // 鏀朵欢浜� - msg.setRecipients(MimeMessage.RecipientType.TO, InternalMailUtil.parseAddressFromStrs(this.tos, charset)); - // 鎶勯�佷汉 - if (ArrayUtil.isNotEmpty(this.ccs)) { - msg.setRecipients(MimeMessage.RecipientType.CC, InternalMailUtil.parseAddressFromStrs(this.ccs, charset)); - } - // 瀵嗛�佷汉 - if (ArrayUtil.isNotEmpty(this.bccs)) { - msg.setRecipients(MimeMessage.RecipientType.BCC, InternalMailUtil.parseAddressFromStrs(this.bccs, charset)); - } - // 鍥炲鍦板潃(reply-to) - if (ArrayUtil.isNotEmpty(this.reply)) { - msg.setReplyTo(InternalMailUtil.parseAddressFromStrs(this.reply, charset)); - } - - return msg; - } - - /** - * 鏋勫缓閭欢淇℃伅涓讳綋 - * - * @param charset 缂栫爜锛寋@code null}鍒欎娇鐢▄@link MimeUtility#getDefaultJavaCharset()} - * @return 閭欢淇℃伅涓讳綋 - * @throws MessagingException 娑堟伅寮傚父 - */ - private Multipart buildContent(Charset charset) throws MessagingException { - final String charsetStr = null != charset ? charset.name() : MimeUtility.getDefaultJavaCharset(); - // 姝f枃 - final MimeBodyPart body = new MimeBodyPart(); - body.setContent(content, StrUtil.format("text/{}; charset={}", isHtml ? "html" : "plain", charsetStr)); - this.multipart.addBodyPart(body); - - return this.multipart; - } - - /** - * 鑾峰彇榛樿閭欢浼氳瘽<br> - * 濡傛灉涓哄叏灞�鍗曚緥鐨勪細璇濓紝鍒欏叏灞�鍙厑璁镐竴涓偖浠跺笎鍙凤紝鍚﹀垯姣忔鍙戦�侀偖浠朵細鏂板缓涓�涓柊鐨勪細璇� - * - * @return 閭欢浼氳瘽 {@link Session} - */ - private Session getSession() { - final Session session = MailUtils.getSession(this.mailAccount, this.useGlobalSession); - - if (null != this.debugOutput) { - session.setDebugOut(debugOutput); - } - - return session; - } - // --------------------------------------------------------------- Private method end -} diff --git a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/MailAccount.java b/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/MailAccount.java deleted file mode 100644 index 8e0fbd2..0000000 --- a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/MailAccount.java +++ /dev/null @@ -1,659 +0,0 @@ -package com.xmzs.common.mail.utils; - -import cn.hutool.core.util.CharsetUtil; -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import cn.hutool.setting.Setting; - -import java.io.Serial; -import java.io.Serializable; -import java.nio.charset.Charset; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -/** - * 閭欢璐︽埛瀵硅薄 - * - * @author Luxiaolei - */ -public class MailAccount implements Serializable { - @Serial - private static final long serialVersionUID = -6937313421815719204L; - - private static final String MAIL_PROTOCOL = "mail.transport.protocol"; - private static final String SMTP_HOST = "mail.smtp.host"; - private static final String SMTP_PORT = "mail.smtp.port"; - private static final String SMTP_AUTH = "mail.smtp.auth"; - private static final String SMTP_TIMEOUT = "mail.smtp.timeout"; - private static final String SMTP_CONNECTION_TIMEOUT = "mail.smtp.connectiontimeout"; - private static final String SMTP_WRITE_TIMEOUT = "mail.smtp.writetimeout"; - - // SSL - private static final String STARTTLS_ENABLE = "mail.smtp.starttls.enable"; - private static final String SSL_ENABLE = "mail.smtp.ssl.enable"; - private static final String SSL_PROTOCOLS = "mail.smtp.ssl.protocols"; - private static final String SOCKET_FACTORY = "mail.smtp.socketFactory.class"; - private static final String SOCKET_FACTORY_FALLBACK = "mail.smtp.socketFactory.fallback"; - private static final String SOCKET_FACTORY_PORT = "smtp.socketFactory.port"; - - // System Properties - private static final String SPLIT_LONG_PARAMS = "mail.mime.splitlongparameters"; - //private static final String ENCODE_FILE_NAME = "mail.mime.encodefilename"; - //private static final String CHARSET = "mail.mime.charset"; - - // 鍏朵粬 - private static final String MAIL_DEBUG = "mail.debug"; - - public static final String[] MAIL_SETTING_PATHS = new String[]{"config/mail.setting", "config/mailAccount.setting", "mail.setting"}; - - /** - * SMTP鏈嶅姟鍣ㄥ煙鍚� - */ - private String host; - /** - * SMTP鏈嶅姟绔彛 - */ - private Integer port; - /** - * 鏄惁闇�瑕佺敤鎴峰悕瀵嗙爜楠岃瘉 - */ - private Boolean auth; - /** - * 鐢ㄦ埛鍚� - */ - private String user; - /** - * 瀵嗙爜 - */ - private String pass; - /** - * 鍙戦�佹柟锛岄伒寰猂FC-822鏍囧噯 - */ - private String from; - - /** - * 鏄惁鎵撳紑璋冭瘯妯″紡锛岃皟璇曟ā寮忎細鏄剧ず涓庨偖浠舵湇鍔″櫒閫氫俊杩囩▼锛岄粯璁や笉寮�鍚� - */ - private boolean debug; - /** - * 缂栫爜鐢ㄤ簬缂栫爜閭欢姝f枃鍜屽彂閫佷汉銆佹敹浠朵汉绛変腑鏂� - */ - private Charset charset = CharsetUtil.CHARSET_UTF_8; - /** - * 瀵逛簬瓒呴暱鍙傛暟鏄惁鍒囧垎涓哄浠斤紝榛樿涓篺alse锛堝浗鍐呴偖绠遍檮浠朵笉鏀寔鍒囧垎鐨勯檮浠跺悕锛� - */ - private boolean splitlongparameters = false; - /** - * 瀵逛簬鏂囦欢鍚嶆槸鍚︿娇鐢▄@link #charset}缂栫爜锛岄粯璁や负 {@code true} - */ - private boolean encodefilename = true; - - /** - * 浣跨敤 STARTTLS瀹夊叏杩炴帴锛孲TARTTLS鏄绾枃鏈�氫俊鍗忚鐨勬墿灞曘�傚畠灏嗙函鏂囨湰杩炴帴鍗囩骇涓哄姞瀵嗚繛鎺ワ紙TLS鎴朣SL锛夛紝 鑰屼笉鏄娇鐢ㄤ竴涓崟鐙殑鍔犲瘑閫氫俊绔彛銆� - */ - private boolean starttlsEnable = false; - /** - * 浣跨敤 SSL瀹夊叏杩炴帴 - */ - private Boolean sslEnable; - - /** - * SSL鍗忚锛屽涓崗璁敤绌烘牸鍒嗛殧 - */ - private String sslProtocols; - - /** - * 鎸囧畾瀹炵幇javax.net.SocketFactory鎺ュ彛鐨勭被鐨勫悕绉�,杩欎釜绫诲皢琚敤浜庡垱寤篠MTP鐨勫鎺ュ瓧 - */ - private String socketFactoryClass = "javax.net.ssl.SSLSocketFactory"; - /** - * 濡傛灉璁剧疆涓簍rue,鏈兘鍒涘缓涓�涓鎺ュ瓧浣跨敤鎸囧畾鐨勫鎺ュ瓧宸ュ巶绫诲皢瀵艰嚧浣跨敤java.net.Socket鍒涘缓鐨勫鎺ュ瓧绫�, 榛樿鍊间负true - */ - private boolean socketFactoryFallback; - /** - * 鎸囧畾鐨勭鍙h繛鎺ュ埌鍦ㄤ娇鐢ㄦ寚瀹氱殑濂楁帴瀛楀伐鍘傘�傚鏋滄病鏈夎缃�,灏嗕娇鐢ㄩ粯璁ょ鍙� - */ - private int socketFactoryPort = 465; - - /** - * SMTP瓒呮椂鏃堕暱锛屽崟浣嶆绉掞紝缂虹渷鍊间笉瓒呮椂 - */ - private long timeout; - /** - * Socket杩炴帴瓒呮椂鍊硷紝鍗曚綅姣锛岀己鐪佸�间笉瓒呮椂 - */ - private long connectionTimeout; - /** - * Socket鍐欏嚭瓒呮椂鍊硷紝鍗曚綅姣锛岀己鐪佸�间笉瓒呮椂 - */ - private long writeTimeout; - - /** - * 鑷畾涔夌殑鍏朵粬灞炴�э紝姝よ嚜瀹氫箟灞炴�т細瑕嗙洊榛樿灞炴�� - */ - private final Map<String, Object> customProperty = new HashMap<>(); - - // -------------------------------------------------------------- Constructor start - - /** - * 鏋勯��,鎵�鏈夊弬鏁伴渶鑷瀹氫箟鎴栦繚鎸侀粯璁ゅ�� - */ - public MailAccount() { - } - - /** - * 鏋勯�� - * - * @param settingPath 閰嶇疆鏂囦欢璺緞 - */ - public MailAccount(String settingPath) { - this(new Setting(settingPath)); - } - - /** - * 鏋勯�� - * - * @param setting 閰嶇疆鏂囦欢 - */ - public MailAccount(Setting setting) { - setting.toBean(this); - } - - // -------------------------------------------------------------- Constructor end - - /** - * 鑾峰緱SMTP鏈嶅姟鍣ㄥ煙鍚� - * - * @return SMTP鏈嶅姟鍣ㄥ煙鍚� - */ - public String getHost() { - return host; - } - - /** - * 璁剧疆SMTP鏈嶅姟鍣ㄥ煙鍚� - * - * @param host SMTP鏈嶅姟鍣ㄥ煙鍚� - * @return this - */ - public MailAccount setHost(String host) { - this.host = host; - return this; - } - - /** - * 鑾峰緱SMTP鏈嶅姟绔彛 - * - * @return SMTP鏈嶅姟绔彛 - */ - public Integer getPort() { - return port; - } - - /** - * 璁剧疆SMTP鏈嶅姟绔彛 - * - * @param port SMTP鏈嶅姟绔彛 - * @return this - */ - public MailAccount setPort(Integer port) { - this.port = port; - return this; - } - - /** - * 鏄惁闇�瑕佺敤鎴峰悕瀵嗙爜楠岃瘉 - * - * @return 鏄惁闇�瑕佺敤鎴峰悕瀵嗙爜楠岃瘉 - */ - public Boolean isAuth() { - return auth; - } - - /** - * 璁剧疆鏄惁闇�瑕佺敤鎴峰悕瀵嗙爜楠岃瘉 - * - * @param isAuth 鏄惁闇�瑕佺敤鎴峰悕瀵嗙爜楠岃瘉 - * @return this - */ - public MailAccount setAuth(boolean isAuth) { - this.auth = isAuth; - return this; - } - - /** - * 鑾峰彇鐢ㄦ埛鍚� - * - * @return 鐢ㄦ埛鍚� - */ - public String getUser() { - return user; - } - - /** - * 璁剧疆鐢ㄦ埛鍚� - * - * @param user 鐢ㄦ埛鍚� - * @return this - */ - public MailAccount setUser(String user) { - this.user = user; - return this; - } - - /** - * 鑾峰彇瀵嗙爜 - * - * @return 瀵嗙爜 - */ - public String getPass() { - return pass; - } - - /** - * 璁剧疆瀵嗙爜 - * - * @param pass 瀵嗙爜 - * @return this - */ - public MailAccount setPass(String pass) { - this.pass = pass; - return this; - } - - /** - * 鑾峰彇鍙戦�佹柟锛岄伒寰猂FC-822鏍囧噯 - * - * @return 鍙戦�佹柟锛岄伒寰猂FC-822鏍囧噯 - */ - public String getFrom() { - return from; - } - - /** - * 璁剧疆鍙戦�佹柟锛岄伒寰猂FC-822鏍囧噯<br> - * 鍙戜欢浜哄彲浠ユ槸浠ヤ笅褰㈠紡锛� - * - * <pre> - * 1. user@xxx.xx - * 2. name <user@xxx.xx> - * </pre> - * - * @param from 鍙戦�佹柟锛岄伒寰猂FC-822鏍囧噯 - * @return this - */ - public MailAccount setFrom(String from) { - this.from = from; - return this; - } - - /** - * 鏄惁鎵撳紑璋冭瘯妯″紡锛岃皟璇曟ā寮忎細鏄剧ず涓庨偖浠舵湇鍔″櫒閫氫俊杩囩▼锛岄粯璁や笉寮�鍚� - * - * @return 鏄惁鎵撳紑璋冭瘯妯″紡锛岃皟璇曟ā寮忎細鏄剧ず涓庨偖浠舵湇鍔″櫒閫氫俊杩囩▼锛岄粯璁や笉寮�鍚� - * @since 4.0.2 - */ - public boolean isDebug() { - return debug; - } - - /** - * 璁剧疆鏄惁鎵撳紑璋冭瘯妯″紡锛岃皟璇曟ā寮忎細鏄剧ず涓庨偖浠舵湇鍔″櫒閫氫俊杩囩▼锛岄粯璁や笉寮�鍚� - * - * @param debug 鏄惁鎵撳紑璋冭瘯妯″紡锛岃皟璇曟ā寮忎細鏄剧ず涓庨偖浠舵湇鍔″櫒閫氫俊杩囩▼锛岄粯璁や笉寮�鍚� - * @return this - * @since 4.0.2 - */ - public MailAccount setDebug(boolean debug) { - this.debug = debug; - return this; - } - - /** - * 鑾峰彇瀛楃闆嗙紪鐮� - * - * @return 缂栫爜锛屽彲鑳戒负{@code null} - */ - public Charset getCharset() { - return charset; - } - - /** - * 璁剧疆瀛楃闆嗙紪鐮侊紝姝ら�夐」涓嶄細淇敼鍏ㄥ眬閰嶇疆锛岃嫢淇敼鍏ㄥ眬閰嶇疆锛岃璁剧疆姝ら」涓簕@code null}骞惰缃細 - * <pre> - * System.setProperty("mail.mime.charset", charset); - * </pre> - * - * @param charset 瀛楃闆嗙紪鐮侊紝{@code null} 鍒欒〃绀轰娇鐢ㄥ叏灞�璁剧疆鐨勯粯璁ょ紪鐮侊紝鍏ㄥ眬缂栫爜涓簃ail.mime.charset绯荤粺灞炴�� - * @return this - */ - public MailAccount setCharset(Charset charset) { - this.charset = charset; - return this; - } - - /** - * 瀵逛簬瓒呴暱鍙傛暟鏄惁鍒囧垎涓哄浠斤紝榛樿涓篺alse锛堝浗鍐呴偖绠遍檮浠朵笉鏀寔鍒囧垎鐨勯檮浠跺悕锛� - * - * @return 瀵逛簬瓒呴暱鍙傛暟鏄惁鍒囧垎涓哄浠� - */ - public boolean isSplitlongparameters() { - return splitlongparameters; - } - - /** - * 璁剧疆瀵逛簬瓒呴暱鍙傛暟鏄惁鍒囧垎涓哄浠斤紝榛樿涓篺alse锛堝浗鍐呴偖绠遍檮浠朵笉鏀寔鍒囧垎鐨勯檮浠跺悕锛�<br> - * 娉ㄦ剰姝ら」涓哄叏灞�璁剧疆锛屾椤逛細璋冪敤 - * <pre> - * System.setProperty("mail.mime.splitlongparameters", true) - * </pre> - * - * @param splitlongparameters 瀵逛簬瓒呴暱鍙傛暟鏄惁鍒囧垎涓哄浠� - */ - public void setSplitlongparameters(boolean splitlongparameters) { - this.splitlongparameters = splitlongparameters; - } - - /** - * 瀵逛簬鏂囦欢鍚嶆槸鍚︿娇鐢▄@link #charset}缂栫爜锛岄粯璁や负 {@code true} - * - * @return 瀵逛簬鏂囦欢鍚嶆槸鍚︿娇鐢▄@link #charset}缂栫爜锛岄粯璁や负 {@code true} - * @since 5.7.16 - */ - public boolean isEncodefilename() { - - return encodefilename; - } - - /** - * 璁剧疆瀵逛簬鏂囦欢鍚嶆槸鍚︿娇鐢▄@link #charset}缂栫爜锛屾閫夐」涓嶄細淇敼鍏ㄥ眬閰嶇疆<br> - * 濡傛灉姝ら�夐」璁剧疆涓簕@code false}锛屽垯鏄惁缂栫爜鍙栧喅浜庝袱涓郴缁熷睘鎬э細 - * <ul> - * <li>mail.mime.encodefilename 鏄惁缂栫爜闄勪欢鏂囦欢鍚�</li> - * <li>mail.mime.charset 缂栫爜鏂囦欢鍚嶇殑缂栫爜</li> - * </ul> - * - * @param encodefilename 瀵逛簬鏂囦欢鍚嶆槸鍚︿娇鐢▄@link #charset}缂栫爜 - * @since 5.7.16 - */ - public void setEncodefilename(boolean encodefilename) { - this.encodefilename = encodefilename; - } - - /** - * 鏄惁浣跨敤 STARTTLS瀹夊叏杩炴帴锛孲TARTTLS鏄绾枃鏈�氫俊鍗忚鐨勬墿灞曘�傚畠灏嗙函鏂囨湰杩炴帴鍗囩骇涓哄姞瀵嗚繛鎺ワ紙TLS鎴朣SL锛夛紝 鑰屼笉鏄娇鐢ㄤ竴涓崟鐙殑鍔犲瘑閫氫俊绔彛銆� - * - * @return 鏄惁浣跨敤 STARTTLS瀹夊叏杩炴帴 - */ - public boolean isStarttlsEnable() { - return this.starttlsEnable; - } - - /** - * 璁剧疆鏄惁浣跨敤STARTTLS瀹夊叏杩炴帴锛孲TARTTLS鏄绾枃鏈�氫俊鍗忚鐨勬墿灞曘�傚畠灏嗙函鏂囨湰杩炴帴鍗囩骇涓哄姞瀵嗚繛鎺ワ紙TLS鎴朣SL锛夛紝 鑰屼笉鏄娇鐢ㄤ竴涓崟鐙殑鍔犲瘑閫氫俊绔彛銆� - * - * @param startttlsEnable 鏄惁浣跨敤STARTTLS瀹夊叏杩炴帴 - * @return this - */ - public MailAccount setStarttlsEnable(boolean startttlsEnable) { - this.starttlsEnable = startttlsEnable; - return this; - } - - /** - * 鏄惁浣跨敤 SSL瀹夊叏杩炴帴 - * - * @return 鏄惁浣跨敤 SSL瀹夊叏杩炴帴 - */ - public Boolean isSslEnable() { - return this.sslEnable; - } - - /** - * 璁剧疆鏄惁浣跨敤SSL瀹夊叏杩炴帴 - * - * @param sslEnable 鏄惁浣跨敤SSL瀹夊叏杩炴帴 - * @return this - */ - public MailAccount setSslEnable(Boolean sslEnable) { - this.sslEnable = sslEnable; - return this; - } - - /** - * 鑾峰彇SSL鍗忚锛屽涓崗璁敤绌烘牸鍒嗛殧 - * - * @return SSL鍗忚锛屽涓崗璁敤绌烘牸鍒嗛殧 - * @since 5.5.7 - */ - public String getSslProtocols() { - return sslProtocols; - } - - /** - * 璁剧疆SSL鍗忚锛屽涓崗璁敤绌烘牸鍒嗛殧 - * - * @param sslProtocols SSL鍗忚锛屽涓崗璁敤绌烘牸鍒嗛殧 - * @since 5.5.7 - */ - public void setSslProtocols(String sslProtocols) { - this.sslProtocols = sslProtocols; - } - - /** - * 鑾峰彇鎸囧畾瀹炵幇javax.net.SocketFactory鎺ュ彛鐨勭被鐨勫悕绉�,杩欎釜绫诲皢琚敤浜庡垱寤篠MTP鐨勫鎺ュ瓧 - * - * @return 鎸囧畾瀹炵幇javax.net.SocketFactory鎺ュ彛鐨勭被鐨勫悕绉�, 杩欎釜绫诲皢琚敤浜庡垱寤篠MTP鐨勫鎺ュ瓧 - */ - public String getSocketFactoryClass() { - return socketFactoryClass; - } - - /** - * 璁剧疆鎸囧畾瀹炵幇javax.net.SocketFactory鎺ュ彛鐨勭被鐨勫悕绉�,杩欎釜绫诲皢琚敤浜庡垱寤篠MTP鐨勫鎺ュ瓧 - * - * @param socketFactoryClass 鎸囧畾瀹炵幇javax.net.SocketFactory鎺ュ彛鐨勭被鐨勫悕绉�,杩欎釜绫诲皢琚敤浜庡垱寤篠MTP鐨勫鎺ュ瓧 - * @return this - */ - public MailAccount setSocketFactoryClass(String socketFactoryClass) { - this.socketFactoryClass = socketFactoryClass; - return this; - } - - /** - * 濡傛灉璁剧疆涓簍rue,鏈兘鍒涘缓涓�涓鎺ュ瓧浣跨敤鎸囧畾鐨勫鎺ュ瓧宸ュ巶绫诲皢瀵艰嚧浣跨敤java.net.Socket鍒涘缓鐨勫鎺ュ瓧绫�, 榛樿鍊间负true - * - * @return 濡傛灉璁剧疆涓簍rue, 鏈兘鍒涘缓涓�涓鎺ュ瓧浣跨敤鎸囧畾鐨勫鎺ュ瓧宸ュ巶绫诲皢瀵艰嚧浣跨敤java.net.Socket鍒涘缓鐨勫鎺ュ瓧绫�, 榛樿鍊间负true - */ - public boolean isSocketFactoryFallback() { - return socketFactoryFallback; - } - - /** - * 濡傛灉璁剧疆涓簍rue,鏈兘鍒涘缓涓�涓鎺ュ瓧浣跨敤鎸囧畾鐨勫鎺ュ瓧宸ュ巶绫诲皢瀵艰嚧浣跨敤java.net.Socket鍒涘缓鐨勫鎺ュ瓧绫�, 榛樿鍊间负true - * - * @param socketFactoryFallback 濡傛灉璁剧疆涓簍rue,鏈兘鍒涘缓涓�涓鎺ュ瓧浣跨敤鎸囧畾鐨勫鎺ュ瓧宸ュ巶绫诲皢瀵艰嚧浣跨敤java.net.Socket鍒涘缓鐨勫鎺ュ瓧绫�, 榛樿鍊间负true - * @return this - */ - public MailAccount setSocketFactoryFallback(boolean socketFactoryFallback) { - this.socketFactoryFallback = socketFactoryFallback; - return this; - } - - /** - * 鑾峰彇鎸囧畾鐨勭鍙h繛鎺ュ埌鍦ㄤ娇鐢ㄦ寚瀹氱殑濂楁帴瀛楀伐鍘傘�傚鏋滄病鏈夎缃�,灏嗕娇鐢ㄩ粯璁ょ鍙� - * - * @return 鎸囧畾鐨勭鍙h繛鎺ュ埌鍦ㄤ娇鐢ㄦ寚瀹氱殑濂楁帴瀛楀伐鍘傘�傚鏋滄病鏈夎缃�,灏嗕娇鐢ㄩ粯璁ょ鍙� - */ - public int getSocketFactoryPort() { - return socketFactoryPort; - } - - /** - * 鎸囧畾鐨勭鍙h繛鎺ュ埌鍦ㄤ娇鐢ㄦ寚瀹氱殑濂楁帴瀛楀伐鍘傘�傚鏋滄病鏈夎缃�,灏嗕娇鐢ㄩ粯璁ょ鍙� - * - * @param socketFactoryPort 鎸囧畾鐨勭鍙h繛鎺ュ埌鍦ㄤ娇鐢ㄦ寚瀹氱殑濂楁帴瀛楀伐鍘傘�傚鏋滄病鏈夎缃�,灏嗕娇鐢ㄩ粯璁ょ鍙� - * @return this - */ - public MailAccount setSocketFactoryPort(int socketFactoryPort) { - this.socketFactoryPort = socketFactoryPort; - return this; - } - - /** - * 璁剧疆SMTP瓒呮椂鏃堕暱锛屽崟浣嶆绉掞紝缂虹渷鍊间笉瓒呮椂 - * - * @param timeout SMTP瓒呮椂鏃堕暱锛屽崟浣嶆绉掞紝缂虹渷鍊间笉瓒呮椂 - * @return this - * @since 4.1.17 - */ - public MailAccount setTimeout(long timeout) { - this.timeout = timeout; - return this; - } - - /** - * 璁剧疆Socket杩炴帴瓒呮椂鍊硷紝鍗曚綅姣锛岀己鐪佸�间笉瓒呮椂 - * - * @param connectionTimeout Socket杩炴帴瓒呮椂鍊硷紝鍗曚綅姣锛岀己鐪佸�间笉瓒呮椂 - * @return this - * @since 4.1.17 - */ - public MailAccount setConnectionTimeout(long connectionTimeout) { - this.connectionTimeout = connectionTimeout; - return this; - } - - /** - * 璁剧疆Socket鍐欏嚭瓒呮椂鍊硷紝鍗曚綅姣锛岀己鐪佸�间笉瓒呮椂 - * - * @param writeTimeout Socket鍐欏嚭瓒呮椂鍊硷紝鍗曚綅姣锛岀己鐪佸�间笉瓒呮椂 - * @return this - * @since 5.8.3 - */ - public MailAccount setWriteTimeout(long writeTimeout) { - this.writeTimeout = writeTimeout; - return this; - } - - /** - * 鑾峰彇鑷畾涔夊睘鎬у垪琛� - * - * @return 鑷畾涔夊弬鏁板垪琛� - * @since 5.6.4 - */ - public Map<String, Object> getCustomProperty() { - return customProperty; - } - - /** - * 璁剧疆鑷畾涔夊睘鎬э紝濡俶ail.smtp.ssl.socketFactory - * - * @param key 灞炴�у悕锛岀┖鐧借蹇界暐 - * @param value 灞炴�у�硷紝 null琚拷鐣� - * @return this - * @since 5.6.4 - */ - public MailAccount setCustomProperty(String key, Object value) { - if (StrUtil.isNotBlank(key) && ObjectUtil.isNotNull(value)) { - this.customProperty.put(key, value); - } - return this; - } - - /** - * 鑾峰緱SMTP鐩稿叧淇℃伅 - * - * @return {@link Properties} - */ - public Properties getSmtpProps() { - //鍏ㄥ眬绯荤粺鍙傛暟 - System.setProperty(SPLIT_LONG_PARAMS, String.valueOf(this.splitlongparameters)); - - final Properties p = new Properties(); - p.put(MAIL_PROTOCOL, "smtp"); - p.put(SMTP_HOST, this.host); - p.put(SMTP_PORT, String.valueOf(this.port)); - p.put(SMTP_AUTH, String.valueOf(this.auth)); - if (this.timeout > 0) { - p.put(SMTP_TIMEOUT, String.valueOf(this.timeout)); - } - if (this.connectionTimeout > 0) { - p.put(SMTP_CONNECTION_TIMEOUT, String.valueOf(this.connectionTimeout)); - } - // issue#2355 - if (this.writeTimeout > 0) { - p.put(SMTP_WRITE_TIMEOUT, String.valueOf(this.writeTimeout)); - } - - p.put(MAIL_DEBUG, String.valueOf(this.debug)); - - if (this.starttlsEnable) { - //STARTTLS鏄绾枃鏈�氫俊鍗忚鐨勬墿灞曘�傚畠灏嗙函鏂囨湰杩炴帴鍗囩骇涓哄姞瀵嗚繛鎺ワ紙TLS鎴朣SL锛夛紝 鑰屼笉鏄娇鐢ㄤ竴涓崟鐙殑鍔犲瘑閫氫俊绔彛銆� - p.put(STARTTLS_ENABLE, "true"); - - if (null == this.sslEnable) { - //涓轰簡鍏煎鏃х増鏈紝褰撶敤鎴锋病鏈夋椤归厤缃椂锛屾寜鐓tarttlsEnable寮�鍚姸鎬佹椂瀵瑰緟 - this.sslEnable = true; - } - } - - // SSL - if (null != this.sslEnable && this.sslEnable) { - p.put(SSL_ENABLE, "true"); - p.put(SOCKET_FACTORY, socketFactoryClass); - p.put(SOCKET_FACTORY_FALLBACK, String.valueOf(this.socketFactoryFallback)); - p.put(SOCKET_FACTORY_PORT, String.valueOf(this.socketFactoryPort)); - // issue#IZN95@Gitee锛屽湪Linux涓嬮渶鑷畾涔塖SL鍗忚鐗堟湰 - if (StrUtil.isNotBlank(this.sslProtocols)) { - p.put(SSL_PROTOCOLS, this.sslProtocols); - } - } - - // 琛ュ厖鑷畾涔夊睘鎬э紝鍏佽鑷畾灞炴�ц鐩栧凡缁忚缃殑鍊� - p.putAll(this.customProperty); - - return p; - } - - /** - * 濡傛灉鏌愪簺鍊间负null锛屼娇鐢ㄩ粯璁ゅ�� - * - * @return this - */ - public MailAccount defaultIfEmpty() { - // 鍘绘帀鍙戜欢浜虹殑濮撳悕閮ㄥ垎 - final String fromAddress = InternalMailUtil.parseFirstAddress(this.from, this.charset).getAddress(); - - if (StrUtil.isBlank(this.host)) { - // 濡傛灉SMTP鍦板潃涓虹┖锛岄粯璁や娇鐢╯mtp.<鍙戜欢浜洪偖绠卞悗缂�> - this.host = StrUtil.format("smtp.{}", StrUtil.subSuf(fromAddress, fromAddress.indexOf('@') + 1)); - } - if (StrUtil.isBlank(user)) { - // 濡傛灉鐢ㄦ埛鍚嶄负绌猴紝榛樿涓哄彂浠朵汉锛坕ssue#I4FYVY@Gitee锛� - //this.user = StrUtil.subPre(fromAddress, fromAddress.indexOf('@')); - this.user = fromAddress; - } - if (null == this.auth) { - // 濡傛灉瀵嗙爜闈炵┖鐧斤紝鍒欎娇鐢ㄨ璇佹ā寮� - this.auth = (false == StrUtil.isBlank(this.pass)); - } - if (null == this.port) { - // 绔彛鍦⊿SL鐘舵�佷笅榛樿涓巗ocketFactoryPort涓�鑷达紝闈濻SL鐘舵�佷笅榛樿涓�25 - this.port = (null != this.sslEnable && this.sslEnable) ? this.socketFactoryPort : 25; - } - if (null == this.charset) { - // 榛樿UTF-8缂栫爜 - this.charset = CharsetUtil.CHARSET_UTF_8; - } - - return this; - } - - @Override - public String toString() { - return "MailAccount [host=" + host + ", port=" + port + ", auth=" + auth + ", user=" + user + ", pass=" + (StrUtil.isEmpty(this.pass) ? "" : "******") + ", from=" + from + ", startttlsEnable=" - + starttlsEnable + ", socketFactoryClass=" + socketFactoryClass + ", socketFactoryFallback=" + socketFactoryFallback + ", socketFactoryPort=" + socketFactoryPort + "]"; - } -} diff --git a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/MailException.java b/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/MailException.java deleted file mode 100644 index c5caaf3..0000000 --- a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/MailException.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.xmzs.common.mail.utils; - -import cn.hutool.core.exceptions.ExceptionUtil; -import cn.hutool.core.util.StrUtil; - -import java.io.Serial; - -/** - * 閭欢寮傚父 - * - * @author xiaoleilu - */ -public class MailException extends RuntimeException { - @Serial - private static final long serialVersionUID = 8247610319171014183L; - - public MailException(Throwable e) { - super(ExceptionUtil.getMessage(e), e); - } - - public MailException(String message) { - super(message); - } - - public MailException(String messageTemplate, Object... params) { - super(StrUtil.format(messageTemplate, params)); - } - - public MailException(String message, Throwable throwable) { - super(message, throwable); - } - - public MailException(String message, Throwable throwable, boolean enableSuppression, boolean writableStackTrace) { - super(message, throwable, enableSuppression, writableStackTrace); - } - - public MailException(Throwable throwable, String messageTemplate, Object... params) { - super(StrUtil.format(messageTemplate, params), throwable); - } -} diff --git a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/MailUtils.java b/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/MailUtils.java deleted file mode 100644 index 8a422b6..0000000 --- a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/MailUtils.java +++ /dev/null @@ -1,468 +0,0 @@ -package com.xmzs.common.mail.utils; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.io.IoUtil; -import cn.hutool.core.map.MapUtil; -import cn.hutool.core.util.CharUtil; -import cn.hutool.core.util.StrUtil; -import jakarta.mail.Authenticator; -import jakarta.mail.Session; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.core.utils.StringUtils; - -import java.io.File; -import java.io.InputStream; -import java.util.Collection; -import java.util.List; -import java.util.Map; - - -/** - * 閭欢宸ュ叿绫� - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class MailUtils { - - private static final MailAccount ACCOUNT = SpringUtils.getBean(MailAccount.class); - - /** - * 鑾峰彇閭欢鍙戦�佸疄渚� - */ - public static MailAccount getMailAccount() { - return ACCOUNT; - } - - /** - * 鑾峰彇閭欢鍙戦�佸疄渚� (鑷畾涔夊彂閫佷汉浠ュ強鎺堟潈鐮�) - * - * @param user 鍙戦�佷汉 - * @param pass 鎺堟潈鐮� - */ - public static MailAccount getMailAccount(String from, String user, String pass) { - ACCOUNT.setFrom(StringUtils.blankToDefault(from, ACCOUNT.getFrom())); - ACCOUNT.setUser(StringUtils.blankToDefault(user, ACCOUNT.getUser())); - ACCOUNT.setPass(StringUtils.blankToDefault(pass, ACCOUNT.getPass())); - return ACCOUNT; - } - - /** - * 浣跨敤閰嶇疆鏂囦欢涓缃殑璐︽埛鍙戦�佹枃鏈偖浠讹紝鍙戦�佺粰鍗曚釜鎴栧涓敹浠朵汉<br> - * 澶氫釜鏀朵欢浜哄彲浠ヤ娇鐢ㄩ�楀彿鈥�,鈥濆垎闅旓紝涔熷彲浠ラ�氳繃鍒嗗彿鈥�;鈥濆垎闅� - * - * @param to 鏀朵欢浜� - * @param subject 鏍囬 - * @param content 姝f枃 - * @param files 闄勪欢鍒楄〃 - * @return message-id - * @since 3.2.0 - */ - public static String sendText(String to, String subject, String content, File... files) { - return send(to, subject, content, false, files); - } - - /** - * 浣跨敤閰嶇疆鏂囦欢涓缃殑璐︽埛鍙戦�丠TML閭欢锛屽彂閫佺粰鍗曚釜鎴栧涓敹浠朵汉<br> - * 澶氫釜鏀朵欢浜哄彲浠ヤ娇鐢ㄩ�楀彿鈥�,鈥濆垎闅旓紝涔熷彲浠ラ�氳繃鍒嗗彿鈥�;鈥濆垎闅� - * - * @param to 鏀朵欢浜� - * @param subject 鏍囬 - * @param content 姝f枃 - * @param files 闄勪欢鍒楄〃 - * @return message-id - * @since 3.2.0 - */ - public static String sendHtml(String to, String subject, String content, File... files) { - return send(to, subject, content, true, files); - } - - /** - * 浣跨敤閰嶇疆鏂囦欢涓缃殑璐︽埛鍙戦�侀偖浠讹紝鍙戦�佸崟涓垨澶氫釜鏀朵欢浜�<br> - * 澶氫釜鏀朵欢浜哄彲浠ヤ娇鐢ㄩ�楀彿鈥�,鈥濆垎闅旓紝涔熷彲浠ラ�氳繃鍒嗗彿鈥�;鈥濆垎闅� - * - * @param to 鏀朵欢浜� - * @param subject 鏍囬 - * @param content 姝f枃 - * @param isHtml 鏄惁涓篐TML - * @param files 闄勪欢鍒楄〃 - * @return message-id - */ - public static String send(String to, String subject, String content, boolean isHtml, File... files) { - return send(splitAddress(to), subject, content, isHtml, files); - } - - /** - * 浣跨敤閰嶇疆鏂囦欢涓缃殑璐︽埛鍙戦�侀偖浠讹紝鍙戦�佸崟涓垨澶氫釜鏀朵欢浜�<br> - * 澶氫釜鏀朵欢浜恒�佹妱閫佷汉銆佸瘑閫佷汉鍙互浣跨敤閫楀彿鈥�,鈥濆垎闅旓紝涔熷彲浠ラ�氳繃鍒嗗彿鈥�;鈥濆垎闅� - * - * @param to 鏀朵欢浜猴紝鍙互浣跨敤閫楀彿鈥�,鈥濆垎闅旓紝涔熷彲浠ラ�氳繃鍒嗗彿鈥�;鈥濆垎闅� - * @param cc 鎶勯�佷汉锛屽彲浠ヤ娇鐢ㄩ�楀彿鈥�,鈥濆垎闅旓紝涔熷彲浠ラ�氳繃鍒嗗彿鈥�;鈥濆垎闅� - * @param bcc 瀵嗛�佷汉锛屽彲浠ヤ娇鐢ㄩ�楀彿鈥�,鈥濆垎闅旓紝涔熷彲浠ラ�氳繃鍒嗗彿鈥�;鈥濆垎闅� - * @param subject 鏍囬 - * @param content 姝f枃 - * @param isHtml 鏄惁涓篐TML - * @param files 闄勪欢鍒楄〃 - * @return message-id - * @since 4.0.3 - */ - public static String send(String to, String cc, String bcc, String subject, String content, boolean isHtml, File... files) { - return send(splitAddress(to), splitAddress(cc), splitAddress(bcc), subject, content, isHtml, files); - } - - /** - * 浣跨敤閰嶇疆鏂囦欢涓缃殑璐︽埛鍙戦�佹枃鏈偖浠讹紝鍙戦�佺粰澶氫汉 - * - * @param tos 鏀朵欢浜哄垪琛� - * @param subject 鏍囬 - * @param content 姝f枃 - * @param files 闄勪欢鍒楄〃 - * @return message-id - */ - public static String sendText(Collection<String> tos, String subject, String content, File... files) { - return send(tos, subject, content, false, files); - } - - /** - * 浣跨敤閰嶇疆鏂囦欢涓缃殑璐︽埛鍙戦�丠TML閭欢锛屽彂閫佺粰澶氫汉 - * - * @param tos 鏀朵欢浜哄垪琛� - * @param subject 鏍囬 - * @param content 姝f枃 - * @param files 闄勪欢鍒楄〃 - * @return message-id - * @since 3.2.0 - */ - public static String sendHtml(Collection<String> tos, String subject, String content, File... files) { - return send(tos, subject, content, true, files); - } - - /** - * 浣跨敤閰嶇疆鏂囦欢涓缃殑璐︽埛鍙戦�侀偖浠讹紝鍙戦�佺粰澶氫汉 - * - * @param tos 鏀朵欢浜哄垪琛� - * @param subject 鏍囬 - * @param content 姝f枃 - * @param isHtml 鏄惁涓篐TML - * @param files 闄勪欢鍒楄〃 - * @return message-id - */ - public static String send(Collection<String> tos, String subject, String content, boolean isHtml, File... files) { - return send(tos, null, null, subject, content, isHtml, files); - } - - /** - * 浣跨敤閰嶇疆鏂囦欢涓缃殑璐︽埛鍙戦�侀偖浠讹紝鍙戦�佺粰澶氫汉 - * - * @param tos 鏀朵欢浜哄垪琛� - * @param ccs 鎶勯�佷汉鍒楄〃锛屽彲浠ヤ负null鎴栫┖ - * @param bccs 瀵嗛�佷汉鍒楄〃锛屽彲浠ヤ负null鎴栫┖ - * @param subject 鏍囬 - * @param content 姝f枃 - * @param isHtml 鏄惁涓篐TML - * @param files 闄勪欢鍒楄〃 - * @return message-id - * @since 4.0.3 - */ - public static String send(Collection<String> tos, Collection<String> ccs, Collection<String> bccs, String subject, String content, boolean isHtml, File... files) { - return send(getMailAccount(), true, tos, ccs, bccs, subject, content, null, isHtml, files); - } - - // ------------------------------------------------------------------------------------------------------------------------------- Custom MailAccount - - /** - * 鍙戦�侀偖浠剁粰澶氫汉 - * - * @param mailAccount 閭欢璁よ瘉瀵硅薄 - * @param to 鏀朵欢浜猴紝澶氫釜鏀朵欢浜洪�楀彿鎴栬�呭垎鍙烽殧寮� - * @param subject 鏍囬 - * @param content 姝f枃 - * @param isHtml 鏄惁涓篐TML鏍煎紡 - * @param files 闄勪欢鍒楄〃 - * @return message-id - * @since 3.2.0 - */ - public static String send(MailAccount mailAccount, String to, String subject, String content, boolean isHtml, File... files) { - return send(mailAccount, splitAddress(to), subject, content, isHtml, files); - } - - /** - * 鍙戦�侀偖浠剁粰澶氫汉 - * - * @param mailAccount 閭欢甯愭埛淇℃伅 - * @param tos 鏀朵欢浜哄垪琛� - * @param subject 鏍囬 - * @param content 姝f枃 - * @param isHtml 鏄惁涓篐TML鏍煎紡 - * @param files 闄勪欢鍒楄〃 - * @return message-id - */ - public static String send(MailAccount mailAccount, Collection<String> tos, String subject, String content, boolean isHtml, File... files) { - return send(mailAccount, tos, null, null, subject, content, isHtml, files); - } - - /** - * 鍙戦�侀偖浠剁粰澶氫汉 - * - * @param mailAccount 閭欢甯愭埛淇℃伅 - * @param tos 鏀朵欢浜哄垪琛� - * @param ccs 鎶勯�佷汉鍒楄〃锛屽彲浠ヤ负null鎴栫┖ - * @param bccs 瀵嗛�佷汉鍒楄〃锛屽彲浠ヤ负null鎴栫┖ - * @param subject 鏍囬 - * @param content 姝f枃 - * @param isHtml 鏄惁涓篐TML鏍煎紡 - * @param files 闄勪欢鍒楄〃 - * @return message-id - * @since 4.0.3 - */ - public static String send(MailAccount mailAccount, Collection<String> tos, Collection<String> ccs, Collection<String> bccs, String subject, String content, boolean isHtml, File... files) { - return send(mailAccount, false, tos, ccs, bccs, subject, content, null, isHtml, files); - } - - /** - * 浣跨敤閰嶇疆鏂囦欢涓缃殑璐︽埛鍙戦�丠TML閭欢锛屽彂閫佺粰鍗曚釜鎴栧涓敹浠朵汉<br> - * 澶氫釜鏀朵欢浜哄彲浠ヤ娇鐢ㄩ�楀彿鈥�,鈥濆垎闅旓紝涔熷彲浠ラ�氳繃鍒嗗彿鈥�;鈥濆垎闅� - * - * @param to 鏀朵欢浜� - * @param subject 鏍囬 - * @param content 姝f枃 - * @param imageMap 鍥剧墖涓庡崰浣嶇锛屽崰浣嶇鏍煎紡涓篶id:$IMAGE_PLACEHOLDER - * @param files 闄勪欢鍒楄〃 - * @return message-id - * @since 3.2.0 - */ - public static String sendHtml(String to, String subject, String content, Map<String, InputStream> imageMap, File... files) { - return send(to, subject, content, imageMap, true, files); - } - - /** - * 浣跨敤閰嶇疆鏂囦欢涓缃殑璐︽埛鍙戦�侀偖浠讹紝鍙戦�佸崟涓垨澶氫釜鏀朵欢浜�<br> - * 澶氫釜鏀朵欢浜哄彲浠ヤ娇鐢ㄩ�楀彿鈥�,鈥濆垎闅旓紝涔熷彲浠ラ�氳繃鍒嗗彿鈥�;鈥濆垎闅� - * - * @param to 鏀朵欢浜� - * @param subject 鏍囬 - * @param content 姝f枃 - * @param imageMap 鍥剧墖涓庡崰浣嶇锛屽崰浣嶇鏍煎紡涓篶id:$IMAGE_PLACEHOLDER - * @param isHtml 鏄惁涓篐TML - * @param files 闄勪欢鍒楄〃 - * @return message-id - */ - public static String send(String to, String subject, String content, Map<String, InputStream> imageMap, boolean isHtml, File... files) { - return send(splitAddress(to), subject, content, imageMap, isHtml, files); - } - - /** - * 浣跨敤閰嶇疆鏂囦欢涓缃殑璐︽埛鍙戦�侀偖浠讹紝鍙戦�佸崟涓垨澶氫釜鏀朵欢浜�<br> - * 澶氫釜鏀朵欢浜恒�佹妱閫佷汉銆佸瘑閫佷汉鍙互浣跨敤閫楀彿鈥�,鈥濆垎闅旓紝涔熷彲浠ラ�氳繃鍒嗗彿鈥�;鈥濆垎闅� - * - * @param to 鏀朵欢浜猴紝鍙互浣跨敤閫楀彿鈥�,鈥濆垎闅旓紝涔熷彲浠ラ�氳繃鍒嗗彿鈥�;鈥濆垎闅� - * @param cc 鎶勯�佷汉锛屽彲浠ヤ娇鐢ㄩ�楀彿鈥�,鈥濆垎闅旓紝涔熷彲浠ラ�氳繃鍒嗗彿鈥�;鈥濆垎闅� - * @param bcc 瀵嗛�佷汉锛屽彲浠ヤ娇鐢ㄩ�楀彿鈥�,鈥濆垎闅旓紝涔熷彲浠ラ�氳繃鍒嗗彿鈥�;鈥濆垎闅� - * @param subject 鏍囬 - * @param content 姝f枃 - * @param imageMap 鍥剧墖涓庡崰浣嶇锛屽崰浣嶇鏍煎紡涓篶id:$IMAGE_PLACEHOLDER - * @param isHtml 鏄惁涓篐TML - * @param files 闄勪欢鍒楄〃 - * @return message-id - * @since 4.0.3 - */ - public static String send(String to, String cc, String bcc, String subject, String content, Map<String, InputStream> imageMap, boolean isHtml, File... files) { - return send(splitAddress(to), splitAddress(cc), splitAddress(bcc), subject, content, imageMap, isHtml, files); - } - - /** - * 浣跨敤閰嶇疆鏂囦欢涓缃殑璐︽埛鍙戦�丠TML閭欢锛屽彂閫佺粰澶氫汉 - * - * @param tos 鏀朵欢浜哄垪琛� - * @param subject 鏍囬 - * @param content 姝f枃 - * @param imageMap 鍥剧墖涓庡崰浣嶇锛屽崰浣嶇鏍煎紡涓篶id:$IMAGE_PLACEHOLDER - * @param files 闄勪欢鍒楄〃 - * @return message-id - * @since 3.2.0 - */ - public static String sendHtml(Collection<String> tos, String subject, String content, Map<String, InputStream> imageMap, File... files) { - return send(tos, subject, content, imageMap, true, files); - } - - /** - * 浣跨敤閰嶇疆鏂囦欢涓缃殑璐︽埛鍙戦�侀偖浠讹紝鍙戦�佺粰澶氫汉 - * - * @param tos 鏀朵欢浜哄垪琛� - * @param subject 鏍囬 - * @param content 姝f枃 - * @param imageMap 鍥剧墖涓庡崰浣嶇锛屽崰浣嶇鏍煎紡涓篶id:$IMAGE_PLACEHOLDER - * @param isHtml 鏄惁涓篐TML - * @param files 闄勪欢鍒楄〃 - * @return message-id - */ - public static String send(Collection<String> tos, String subject, String content, Map<String, InputStream> imageMap, boolean isHtml, File... files) { - return send(tos, null, null, subject, content, imageMap, isHtml, files); - } - - /** - * 浣跨敤閰嶇疆鏂囦欢涓缃殑璐︽埛鍙戦�侀偖浠讹紝鍙戦�佺粰澶氫汉 - * - * @param tos 鏀朵欢浜哄垪琛� - * @param ccs 鎶勯�佷汉鍒楄〃锛屽彲浠ヤ负null鎴栫┖ - * @param bccs 瀵嗛�佷汉鍒楄〃锛屽彲浠ヤ负null鎴栫┖ - * @param subject 鏍囬 - * @param content 姝f枃 - * @param imageMap 鍥剧墖涓庡崰浣嶇锛屽崰浣嶇鏍煎紡涓篶id:$IMAGE_PLACEHOLDER - * @param isHtml 鏄惁涓篐TML - * @param files 闄勪欢鍒楄〃 - * @return message-id - * @since 4.0.3 - */ - public static String send(Collection<String> tos, Collection<String> ccs, Collection<String> bccs, String subject, String content, Map<String, InputStream> imageMap, boolean isHtml, File... files) { - return send(getMailAccount(), true, tos, ccs, bccs, subject, content, imageMap, isHtml, files); - } - - // ------------------------------------------------------------------------------------------------------------------------------- Custom MailAccount - - /** - * 鍙戦�侀偖浠剁粰澶氫汉 - * - * @param mailAccount 閭欢璁よ瘉瀵硅薄 - * @param to 鏀朵欢浜猴紝澶氫釜鏀朵欢浜洪�楀彿鎴栬�呭垎鍙烽殧寮� - * @param subject 鏍囬 - * @param content 姝f枃 - * @param imageMap 鍥剧墖涓庡崰浣嶇锛屽崰浣嶇鏍煎紡涓篶id:$IMAGE_PLACEHOLDER - * @param isHtml 鏄惁涓篐TML鏍煎紡 - * @param files 闄勪欢鍒楄〃 - * @return message-id - * @since 3.2.0 - */ - public static String send(MailAccount mailAccount, String to, String subject, String content, Map<String, InputStream> imageMap, boolean isHtml, File... files) { - return send(mailAccount, splitAddress(to), subject, content, imageMap, isHtml, files); - } - - /** - * 鍙戦�侀偖浠剁粰澶氫汉 - * - * @param mailAccount 閭欢甯愭埛淇℃伅 - * @param tos 鏀朵欢浜哄垪琛� - * @param subject 鏍囬 - * @param content 姝f枃 - * @param imageMap 鍥剧墖涓庡崰浣嶇锛屽崰浣嶇鏍煎紡涓篶id:$IMAGE_PLACEHOLDER - * @param isHtml 鏄惁涓篐TML鏍煎紡 - * @param files 闄勪欢鍒楄〃 - * @return message-id - * @since 4.6.3 - */ - public static String send(MailAccount mailAccount, Collection<String> tos, String subject, String content, Map<String, InputStream> imageMap, boolean isHtml, File... files) { - return send(mailAccount, tos, null, null, subject, content, imageMap, isHtml, files); - } - - /** - * 鍙戦�侀偖浠剁粰澶氫汉 - * - * @param mailAccount 閭欢甯愭埛淇℃伅 - * @param tos 鏀朵欢浜哄垪琛� - * @param ccs 鎶勯�佷汉鍒楄〃锛屽彲浠ヤ负null鎴栫┖ - * @param bccs 瀵嗛�佷汉鍒楄〃锛屽彲浠ヤ负null鎴栫┖ - * @param subject 鏍囬 - * @param content 姝f枃 - * @param imageMap 鍥剧墖涓庡崰浣嶇锛屽崰浣嶇鏍煎紡涓篶id:$IMAGE_PLACEHOLDER - * @param isHtml 鏄惁涓篐TML鏍煎紡 - * @param files 闄勪欢鍒楄〃 - * @return message-id - * @since 4.6.3 - */ - public static String send(MailAccount mailAccount, Collection<String> tos, Collection<String> ccs, Collection<String> bccs, String subject, String content, Map<String, InputStream> imageMap, - boolean isHtml, File... files) { - return send(mailAccount, false, tos, ccs, bccs, subject, content, imageMap, isHtml, files); - } - - /** - * 鏍规嵁閰嶇疆鏂囦欢锛岃幏鍙栭偖浠跺鎴风浼氳瘽 - * - * @param mailAccount 閭欢璐︽埛閰嶇疆 - * @param isSingleton 鏄惁鍗曚緥锛堝叏灞�鍏变韩浼氳瘽锛� - * @return {@link Session} - * @since 5.5.7 - */ - public static Session getSession(MailAccount mailAccount, boolean isSingleton) { - Authenticator authenticator = null; - if (mailAccount.isAuth()) { - authenticator = new UserPassAuthenticator(mailAccount.getUser(), mailAccount.getPass()); - } - - return isSingleton ? Session.getDefaultInstance(mailAccount.getSmtpProps(), authenticator) // - : Session.getInstance(mailAccount.getSmtpProps(), authenticator); - } - - // ------------------------------------------------------------------------------------------------------------------------ Private method start - - /** - * 鍙戦�侀偖浠剁粰澶氫汉 - * - * @param mailAccount 閭欢甯愭埛淇℃伅 - * @param useGlobalSession 鏄惁鍏ㄥ眬鍏变韩Session - * @param tos 鏀朵欢浜哄垪琛� - * @param ccs 鎶勯�佷汉鍒楄〃锛屽彲浠ヤ负null鎴栫┖ - * @param bccs 瀵嗛�佷汉鍒楄〃锛屽彲浠ヤ负null鎴栫┖ - * @param subject 鏍囬 - * @param content 姝f枃 - * @param imageMap 鍥剧墖涓庡崰浣嶇锛屽崰浣嶇鏍煎紡涓篶id:${cid} - * @param isHtml 鏄惁涓篐TML鏍煎紡 - * @param files 闄勪欢鍒楄〃 - * @return message-id - * @since 4.6.3 - */ - private static String send(MailAccount mailAccount, boolean useGlobalSession, Collection<String> tos, Collection<String> ccs, Collection<String> bccs, String subject, String content, - Map<String, InputStream> imageMap, boolean isHtml, File... files) { - final Mail mail = Mail.create(mailAccount).setUseGlobalSession(useGlobalSession); - - // 鍙�夋妱閫佷汉 - if (CollUtil.isNotEmpty(ccs)) { - mail.setCcs(ccs.toArray(new String[0])); - } - // 鍙�夊瘑閫佷汉 - if (CollUtil.isNotEmpty(bccs)) { - mail.setBccs(bccs.toArray(new String[0])); - } - - mail.setTos(tos.toArray(new String[0])); - mail.setTitle(subject); - mail.setContent(content); - mail.setHtml(isHtml); - mail.setFiles(files); - - // 鍥剧墖 - if (MapUtil.isNotEmpty(imageMap)) { - for (Map.Entry<String, InputStream> entry : imageMap.entrySet()) { - mail.addImage(entry.getKey(), entry.getValue()); - // 鍏抽棴娴� - IoUtil.close(entry.getValue()); - } - } - - return mail.send(); - } - - /** - * 灏嗗涓仈绯讳汉杞负鍒楄〃锛屽垎闅旂涓洪�楀彿鎴栬�呭垎鍙� - * - * @param addresses 澶氫釜鑱旂郴浜猴紝濡傛灉涓虹┖杩斿洖null - * @return 鑱旂郴浜哄垪琛� - */ - private static List<String> splitAddress(String addresses) { - if (StrUtil.isBlank(addresses)) { - return null; - } - - List<String> result; - if (StrUtil.contains(addresses, CharUtil.COMMA)) { - result = StrUtil.splitTrim(addresses, CharUtil.COMMA); - } else if (StrUtil.contains(addresses, ';')) { - result = StrUtil.splitTrim(addresses, ';'); - } else { - result = CollUtil.newArrayList(addresses); - } - return result; - } - - // ------------------------------------------------------------------------------------------------------------------------ Private method end - -} diff --git a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/UserPassAuthenticator.java b/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/UserPassAuthenticator.java deleted file mode 100644 index 9f3ebac..0000000 --- a/ruoyi-common/ruoyi-common-mail/src/main/java/com/xmzs/common/mail/utils/UserPassAuthenticator.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.xmzs.common.mail.utils; - -import jakarta.mail.Authenticator; -import jakarta.mail.PasswordAuthentication; - -/** - * 鐢ㄦ埛鍚嶅瘑鐮侀獙璇佸櫒 - * - * @author looly - * @since 3.1.2 - */ -public class UserPassAuthenticator extends Authenticator { - - private final String user; - private final String pass; - - /** - * 鏋勯�� - * - * @param user 鐢ㄦ埛鍚� - * @param pass 瀵嗙爜 - */ - public UserPassAuthenticator(String user, String pass) { - this.user = user; - this.pass = pass; - } - - @Override - protected PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(this.user, this.pass); - } - -} diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/annotation/DataColumn.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/annotation/DataColumn.java deleted file mode 100644 index 5b86fa1..0000000 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/annotation/DataColumn.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.xmzs.common.mybatis.annotation; - -import java.lang.annotation.*; - -/** - * 鏁版嵁鏉冮檺 - * - * 涓�涓敞瑙e彧鑳藉搴斾竴涓ā鏉� - * - * @author Lion Li - * @version 3.5.0 - */ -@Target(ElementType.METHOD) -@Retention(RetentionPolicy.RUNTIME) -@Documented -public @interface DataColumn { - - /** - * 鍗犱綅绗﹀叧閿瓧 - */ - String[] key() default "deptName"; - - /** - * 鍗犱綅绗︽浛鎹㈠�� - */ - String[] value() default "dept_id"; - -} diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/annotation/DataPermission.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/annotation/DataPermission.java deleted file mode 100644 index 8737eee..0000000 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/annotation/DataPermission.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.common.mybatis.annotation; - -import java.lang.annotation.*; - -/** - * 鏁版嵁鏉冮檺缁� - * - * @author Lion Li - * @version 3.5.0 - */ -@Target({ElementType.METHOD, ElementType.TYPE}) -@Retention(RetentionPolicy.RUNTIME) -@Documented -public @interface DataPermission { - - DataColumn[] value(); - -} diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/config/MybatisPlusConfig.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/config/MybatisPlusConfig.java deleted file mode 100644 index 9ffde5e..0000000 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/config/MybatisPlusConfig.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.xmzs.common.mybatis.config; - -import cn.hutool.core.net.NetUtil; -import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; -import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator; -import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator; -import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; -import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor; -import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; -import com.xmzs.common.mybatis.handler.InjectionMetaObjectHandler; -import com.xmzs.common.mybatis.interceptor.PlusDataPermissionInterceptor; -import org.mybatis.spring.annotation.MapperScan; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.context.annotation.Bean; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -/** - * mybatis-plus閰嶇疆绫�(涓嬫柟娉ㄩ噴鏈夋彃浠朵粙缁�) - * - * @author Lion Li - */ -@EnableTransactionManagement(proxyTargetClass = true) -@AutoConfiguration -@MapperScan("${mybatis-plus.mapperPackage}") -public class MybatisPlusConfig { - - @Bean - public MybatisPlusInterceptor mybatisPlusInterceptor() { - MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); - // 鏁版嵁鏉冮檺澶勭悊 - interceptor.addInnerInterceptor(dataPermissionInterceptor()); - // 鍒嗛〉鎻掍欢 - interceptor.addInnerInterceptor(paginationInnerInterceptor()); - // 涔愯閿佹彃浠� - interceptor.addInnerInterceptor(optimisticLockerInnerInterceptor()); - return interceptor; - } - - /** - * 鏁版嵁鏉冮檺鎷︽埅鍣� - */ - public PlusDataPermissionInterceptor dataPermissionInterceptor() { - return new PlusDataPermissionInterceptor(); - } - - /** - * 鍒嗛〉鎻掍欢锛岃嚜鍔ㄨ瘑鍒暟鎹簱绫诲瀷 - */ - public PaginationInnerInterceptor paginationInnerInterceptor() { - PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor(); - // 璁剧疆鏈�澶у崟椤甸檺鍒舵暟閲忥紝榛樿 500 鏉★紝-1 涓嶅彈闄愬埗 - paginationInnerInterceptor.setMaxLimit(-1L); - // 鍒嗛〉鍚堢悊鍖� - paginationInnerInterceptor.setOverflow(true); - return paginationInnerInterceptor; - } - - /** - * 涔愯閿佹彃浠� - */ - public OptimisticLockerInnerInterceptor optimisticLockerInnerInterceptor() { - return new OptimisticLockerInnerInterceptor(); - } - - /** - * 鍏冨璞″瓧娈靛~鍏呮帶鍒跺櫒 - */ - @Bean - public MetaObjectHandler metaObjectHandler() { - return new InjectionMetaObjectHandler(); - } - - /** - * 浣跨敤缃戝崱淇℃伅缁戝畾闆姳鐢熸垚鍣� - * 闃叉闆嗙兢闆姳ID閲嶅 - */ - @Bean - public IdentifierGenerator idGenerator() { - return new DefaultIdentifierGenerator(NetUtil.getLocalhost()); - } - - /** - * PaginationInnerInterceptor 鍒嗛〉鎻掍欢锛岃嚜鍔ㄨ瘑鍒暟鎹簱绫诲瀷 - * https://baomidou.com/pages/97710a/ - * OptimisticLockerInnerInterceptor 涔愯閿佹彃浠� - * https://baomidou.com/pages/0d93c0/ - * MetaObjectHandler 鍏冨璞″瓧娈靛~鍏呮帶鍒跺櫒 - * https://baomidou.com/pages/4c6bcf/ - * ISqlInjector sql娉ㄥ叆鍣� - * https://baomidou.com/pages/42ea4a/ - * BlockAttackInnerInterceptor 濡傛灉鏄鍏ㄨ〃鐨勫垹闄ゆ垨鏇存柊鎿嶄綔锛屽氨浼氱粓姝㈣鎿嶄綔 - * https://baomidou.com/pages/f9a237/ - * IllegalSQLInnerInterceptor sql鎬ц兘瑙勮寖鎻掍欢(鍨冨溇SQL鎷︽埅) - * IdentifierGenerator 鑷畾涔変富閿瓥鐣� - * https://baomidou.com/pages/568eb2/ - * TenantLineInnerInterceptor 澶氱鎴锋彃浠� - * https://baomidou.com/pages/aef2f2/ - * DynamicTableNameInnerInterceptor 鍔ㄦ�佽〃鍚嶆彃浠� - * https://baomidou.com/pages/2a45ff/ - */ - -} diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/core/domain/BaseEntity.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/core/domain/BaseEntity.java deleted file mode 100644 index 732f414..0000000 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/core/domain/BaseEntity.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.xmzs.common.mybatis.core.domain; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.TableField; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * Entity鍩虹被 - * - * @author Lion Li - */ - -@Data -public class BaseEntity implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 鎼滅储鍊� - */ - @JsonIgnore - @TableField(exist = false) - private String searchValue; - - /** - * 鍒涘缓閮ㄩ棬 - */ - @TableField(fill = FieldFill.INSERT) - private Long createDept; - - /** - * 鍒涘缓鑰� - */ - @TableField(fill = FieldFill.INSERT) - private Long createBy; - - /** - * 鍒涘缓鏃堕棿 - */ - @TableField(fill = FieldFill.INSERT) - private Date createTime; - - /** - * 鏇存柊鑰� - */ - @TableField(fill = FieldFill.INSERT_UPDATE) - private Long updateBy; - - /** - * 鏇存柊鏃堕棿 - */ - @TableField(fill = FieldFill.INSERT_UPDATE) - private Date updateTime; - - /** - * 璇锋眰鍙傛暟 - */ - @JsonInclude(JsonInclude.Include.NON_EMPTY) - @TableField(exist = false) - private Map<String, Object> params = new HashMap<>(); - -} diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/core/mapper/BaseMapperPlus.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/core/mapper/BaseMapperPlus.java deleted file mode 100644 index 8db817b..0000000 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/core/mapper/BaseMapperPlus.java +++ /dev/null @@ -1,198 +0,0 @@ -package com.xmzs.common.mybatis.core.mapper; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.ReflectionKit; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.toolkit.Db; -import com.xmzs.common.core.utils.MapstructUtils; -import org.apache.ibatis.logging.Log; -import org.apache.ibatis.logging.LogFactory; - -import java.io.Serializable; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.function.Function; -import java.util.stream.Collectors; - -/** - * 鑷畾涔� Mapper 鎺ュ彛, 瀹炵幇 鑷畾涔夋墿灞� - * - * @param <T> table 娉涘瀷 - * @param <V> vo 娉涘瀷 - * @author Lion Li - * @since 2021-05-13 - */ -@SuppressWarnings("unchecked") -public interface BaseMapperPlus<T, V> extends BaseMapper<T> { - - Log log = LogFactory.getLog(BaseMapperPlus.class); - - default Class<V> currentVoClass() { - return (Class<V>) ReflectionKit.getSuperClassGenericType(this.getClass(), BaseMapperPlus.class, 1); - } - - default Class<T> currentModelClass() { - return (Class<T>) ReflectionKit.getSuperClassGenericType(this.getClass(), BaseMapperPlus.class, 0); - } - - default List<T> selectList() { - return this.selectList(new QueryWrapper<>()); - } - - /** - * 鎵归噺鎻掑叆 - */ - default boolean insertBatch(Collection<T> entityList) { - return Db.saveBatch(entityList); - } - - /** - * 鎵归噺鏇存柊 - */ - default boolean updateBatchById(Collection<T> entityList) { - return Db.updateBatchById(entityList); - } - - /** - * 鎵归噺鎻掑叆鎴栨洿鏂� - */ - default boolean insertOrUpdateBatch(Collection<T> entityList) { - return Db.saveOrUpdateBatch(entityList); - } - - /** - * 鎵归噺鎻掑叆(鍖呭惈闄愬埗鏉℃暟) - */ - default boolean insertBatch(Collection<T> entityList, int batchSize) { - return Db.saveBatch(entityList, batchSize); - } - - /** - * 鎵归噺鏇存柊(鍖呭惈闄愬埗鏉℃暟) - */ - default boolean updateBatchById(Collection<T> entityList, int batchSize) { - return Db.updateBatchById(entityList, batchSize); - } - - /** - * 鎵归噺鎻掑叆鎴栨洿鏂�(鍖呭惈闄愬埗鏉℃暟) - */ - default boolean insertOrUpdateBatch(Collection<T> entityList, int batchSize) { - return Db.saveOrUpdateBatch(entityList, batchSize); - } - - /** - * 鎻掑叆鎴栨洿鏂�(鍖呭惈闄愬埗鏉℃暟) - */ - default boolean insertOrUpdate(T entity) { - return Db.saveOrUpdate(entity); - } - - default V selectVoById(Serializable id) { - return selectVoById(id, this.currentVoClass()); - } - - /** - * 鏍规嵁 ID 鏌ヨ - */ - default <C> C selectVoById(Serializable id, Class<C> voClass) { - T obj = this.selectById(id); - if (ObjectUtil.isNull(obj)) { - return null; - } - return MapstructUtils.convert(obj, voClass); - } - - default List<V> selectVoBatchIds(Collection<? extends Serializable> idList) { - return selectVoBatchIds(idList, this.currentVoClass()); - } - - /** - * 鏌ヨ锛堟牴鎹甀D 鎵归噺鏌ヨ锛� - */ - default <C> List<C> selectVoBatchIds(Collection<? extends Serializable> idList, Class<C> voClass) { - List<T> list = this.selectBatchIds(idList); - if (CollUtil.isEmpty(list)) { - return CollUtil.newArrayList(); - } - return MapstructUtils.convert(list, voClass); - } - - default List<V> selectVoByMap(Map<String, Object> map) { - return selectVoByMap(map, this.currentVoClass()); - } - - /** - * 鏌ヨ锛堟牴鎹� columnMap 鏉′欢锛� - */ - default <C> List<C> selectVoByMap(Map<String, Object> map, Class<C> voClass) { - List<T> list = this.selectByMap(map); - if (CollUtil.isEmpty(list)) { - return CollUtil.newArrayList(); - } - return MapstructUtils.convert(list, voClass); - } - - default V selectVoOne(Wrapper<T> wrapper) { - return selectVoOne(wrapper, this.currentVoClass()); - } - - /** - * 鏍规嵁 entity 鏉′欢锛屾煡璇竴鏉¤褰� - */ - default <C> C selectVoOne(Wrapper<T> wrapper, Class<C> voClass) { - T obj = this.selectOne(wrapper); - if (ObjectUtil.isNull(obj)) { - return null; - } - return MapstructUtils.convert(obj, voClass); - } - - default List<V> selectVoList() { - return selectVoList(new QueryWrapper<>(), this.currentVoClass()); - } - - default List<V> selectVoList(Wrapper<T> wrapper) { - return selectVoList(wrapper, this.currentVoClass()); - } - - /** - * 鏍规嵁 entity 鏉′欢锛屾煡璇㈠叏閮ㄨ褰� - */ - default <C> List<C> selectVoList(Wrapper<T> wrapper, Class<C> voClass) { - List<T> list = this.selectList(wrapper); - if (CollUtil.isEmpty(list)) { - return CollUtil.newArrayList(); - } - return MapstructUtils.convert(list, voClass); - } - - default <P extends IPage<V>> P selectVoPage(IPage<T> page, Wrapper<T> wrapper) { - return selectVoPage(page, wrapper, this.currentVoClass()); - } - - /** - * 鍒嗛〉鏌ヨVO - */ - default <C, P extends IPage<C>> P selectVoPage(IPage<T> page, Wrapper<T> wrapper, Class<C> voClass) { - IPage<T> pageData = this.selectPage(page, wrapper); - IPage<C> voPage = new Page<>(pageData.getCurrent(), pageData.getSize(), pageData.getTotal()); - if (CollUtil.isEmpty(pageData.getRecords())) { - return (P) voPage; - } - voPage.setRecords(MapstructUtils.convert(pageData.getRecords(), voClass)); - return (P) voPage; - } - - default <C> List<C> selectObjs(Wrapper<T> wrapper, Function<? super Object, C> mapper) { - return this.selectObjs(wrapper).stream().filter(Objects::nonNull).map(mapper).collect(Collectors.toList()); - } - -} diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/core/page/PageQuery.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/core/page/PageQuery.java deleted file mode 100644 index 4e43f11..0000000 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/core/page/PageQuery.java +++ /dev/null @@ -1,114 +0,0 @@ -package com.xmzs.common.mybatis.core.page; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.core.metadata.OrderItem; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.core.utils.sql.SqlUtil; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -/** - * 鍒嗛〉鏌ヨ瀹炰綋绫� - * - * @author Lion Li - */ - -@Data -public class PageQuery implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 鍒嗛〉澶у皬 - */ - private Integer pageSize; - - /** - * 褰撳墠椤垫暟 - */ - private Integer pageNum; - - /** - * 鎺掑簭鍒� - */ - private String orderByColumn; - - /** - * 鎺掑簭鐨勬柟鍚慸esc鎴栬�卆sc - */ - private String isAsc; - - /** - * 褰撳墠璁板綍璧峰绱㈠紩 榛樿鍊� - */ - public static final int DEFAULT_PAGE_NUM = 1; - - /** - * 姣忛〉鏄剧ず璁板綍鏁� 榛樿鍊� 榛樿鏌ュ叏閮� - */ - public static final int DEFAULT_PAGE_SIZE = Integer.MAX_VALUE; - - public <T> Page<T> build() { - Integer pageNum = ObjectUtil.defaultIfNull(getPageNum(), DEFAULT_PAGE_NUM); - Integer pageSize = ObjectUtil.defaultIfNull(getPageSize(), DEFAULT_PAGE_SIZE); - if (pageNum <= 0) { - pageNum = DEFAULT_PAGE_NUM; - } - Page<T> page = new Page<>(pageNum, pageSize); - List<OrderItem> orderItems = buildOrderItem(); - if (CollUtil.isNotEmpty(orderItems)) { - page.addOrder(orderItems); - } - return page; - } - - /** - * 鏋勫缓鎺掑簭 - * - * 鏀寔鐨勭敤娉曞涓�: - * {isAsc:"asc",orderByColumn:"id"} order by id asc - * {isAsc:"asc",orderByColumn:"id,createTime"} order by id asc,create_time asc - * {isAsc:"desc",orderByColumn:"id,createTime"} order by id desc,create_time desc - * {isAsc:"asc,desc",orderByColumn:"id,createTime"} order by id asc,create_time desc - */ - private List<OrderItem> buildOrderItem() { - if (StringUtils.isBlank(orderByColumn) || StringUtils.isBlank(isAsc)) { - return null; - } - String orderBy = SqlUtil.escapeOrderBySql(orderByColumn); - orderBy = StringUtils.toUnderScoreCase(orderBy); - - // 鍏煎鍓嶇鎺掑簭绫诲瀷 - isAsc = StringUtils.replaceEach(isAsc, new String[]{"ascending", "descending"}, new String[]{"asc", "desc"}); - - String[] orderByArr = orderBy.split(StringUtils.SEPARATOR); - String[] isAscArr = isAsc.split(StringUtils.SEPARATOR); - if (isAscArr.length != 1 && isAscArr.length != orderByArr.length) { - throw new ServiceException("鎺掑簭鍙傛暟鏈夎"); - } - - List<OrderItem> list = new ArrayList<>(); - // 姣忎釜瀛楁鍚勮嚜鎺掑簭 - for (int i = 0; i < orderByArr.length; i++) { - String orderByStr = orderByArr[i]; - String isAscStr = isAscArr.length == 1 ? isAscArr[0] : isAscArr[i]; - if ("asc".equals(isAscStr)) { - list.add(OrderItem.asc(orderByStr)); - } else if ("desc".equals(isAscStr)) { - list.add(OrderItem.desc(orderByStr)); - } else { - throw new ServiceException("鎺掑簭鍙傛暟鏈夎"); - } - } - return list; - } - -} diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/core/page/TableDataInfo.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/core/page/TableDataInfo.java deleted file mode 100644 index 631f83b..0000000 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/core/page/TableDataInfo.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.xmzs.common.mybatis.core.page; - -import cn.hutool.http.HttpStatus; -import com.baomidou.mybatisplus.core.metadata.IPage; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serial; -import java.io.Serializable; -import java.util.List; - -/** - * 琛ㄦ牸鍒嗛〉鏁版嵁瀵硅薄 - * - * @author Lion Li - */ - -@Data -@NoArgsConstructor -public class TableDataInfo<T> implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 鎬昏褰曟暟 - */ - private long total; - - /** - * 鍒楄〃鏁版嵁 - */ - private List<T> rows; - - /** - * 娑堟伅鐘舵�佺爜 - */ - private int code; - - /** - * 娑堟伅鍐呭 - */ - private String msg; - - /** - * 鍒嗛〉 - * - * @param list 鍒楄〃鏁版嵁 - * @param total 鎬昏褰曟暟 - */ - public TableDataInfo(List<T> list, long total) { - this.rows = list; - this.total = total; - } - - public static <T> TableDataInfo<T> build(IPage<T> page) { - TableDataInfo<T> rspData = new TableDataInfo<>(); - rspData.setCode(HttpStatus.HTTP_OK); - rspData.setMsg("鏌ヨ鎴愬姛"); - rspData.setRows(page.getRecords()); - rspData.setTotal(page.getTotal()); - return rspData; - } - - public static <T> TableDataInfo<T> build(List<T> list) { - TableDataInfo<T> rspData = new TableDataInfo<>(); - rspData.setCode(HttpStatus.HTTP_OK); - rspData.setMsg("鏌ヨ鎴愬姛"); - rspData.setRows(list); - rspData.setTotal(list.size()); - return rspData; - } - - public static <T> TableDataInfo<T> build() { - TableDataInfo<T> rspData = new TableDataInfo<>(); - rspData.setCode(HttpStatus.HTTP_OK); - rspData.setMsg("鏌ヨ鎴愬姛"); - return rspData; - } - -} diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/enums/DataBaseType.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/enums/DataBaseType.java deleted file mode 100644 index 5e7d47c..0000000 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/enums/DataBaseType.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.xmzs.common.mybatis.enums; - -import com.xmzs.common.core.utils.StringUtils; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 鏁版嵁搴撶被鍨� - * - * @author Lion Li - */ -@Getter -@AllArgsConstructor -public enum DataBaseType { - - /** - * MySQL - */ - MY_SQL("MySQL"), - - /** - * Oracle - */ - ORACLE("Oracle"), - - /** - * PostgreSQL - */ - POSTGRE_SQL("PostgreSQL"), - - /** - * SQL Server - */ - SQL_SERVER("Microsoft SQL Server"); - - private final String type; - - public static DataBaseType find(String databaseProductName) { - if (StringUtils.isBlank(databaseProductName)) { - return null; - } - for (DataBaseType type : values()) { - if (type.getType().equals(databaseProductName)) { - return type; - } - } - return null; - } -} diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/enums/DataScopeType.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/enums/DataScopeType.java deleted file mode 100644 index 7b566e9..0000000 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/enums/DataScopeType.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.xmzs.common.mybatis.enums; - -import com.xmzs.common.core.utils.StringUtils; -import lombok.AllArgsConstructor; -import lombok.Getter; -import com.xmzs.common.mybatis.helper.DataPermissionHelper; - -/** - * 鏁版嵁鏉冮檺绫诲瀷 - * <p> - * 璇硶鏀寔 spel 妯℃澘琛ㄨ揪寮� - * <p> - * 鍐呯疆鏁版嵁 user 褰撳墠鐢ㄦ埛 鍐呭鍙傝�� LoginUser - * 濡傞渶鎵╁睍鏁版嵁 鍙娇鐢� {@link DataPermissionHelper} 鎿嶄綔 - * 鍐呯疆鏈嶅姟 sdss 绯荤粺鏁版嵁鏉冮檺鏈嶅姟 鍐呭鍙傝�� SysDataScopeService - * 濡傞渶鎵╁睍鏇村鑷畾涔夋湇鍔� 鍙互鍙傝�� sdss 鑷缂栧啓 - * - * @author Lion Li - * @version 3.5.0 - */ -@Getter -@AllArgsConstructor -public enum DataScopeType { - - /** - * 鍏ㄩ儴鏁版嵁鏉冮檺 - */ - ALL("1", "", ""), - - /** - * 鑷畾鏁版嵁鏉冮檺 - */ - CUSTOM("2", " #{#deptName} IN ( #{@sdss.getRoleCustom( #user.roleId )} ) ", ""), - - /** - * 閮ㄩ棬鏁版嵁鏉冮檺 - */ - DEPT("3", " #{#deptName} = #{#user.deptId} ", ""), - - /** - * 閮ㄩ棬鍙婁互涓嬫暟鎹潈闄� - */ - DEPT_AND_CHILD("4", " #{#deptName} IN ( #{@sdss.getDeptAndChild( #user.deptId )} )", ""), - - /** - * 浠呮湰浜烘暟鎹潈闄� - */ - SELF("5", " #{#userName} = #{#user.userId} ", " 1 = 0 "); - - private final String code; - - /** - * 璇硶 閲囩敤 spel 妯℃澘琛ㄨ揪寮� - */ - private final String sqlTemplate; - - /** - * 涓嶆弧瓒� sqlTemplate 鍒欏~鍏� - */ - private final String elseSql; - - public static DataScopeType findCode(String code) { - if (StringUtils.isBlank(code)) { - return null; - } - for (DataScopeType type : values()) { - if (type.getCode().equals(code)) { - return type; - } - } - return null; - } -} diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/handler/InjectionMetaObjectHandler.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/handler/InjectionMetaObjectHandler.java deleted file mode 100644 index cc37dcd..0000000 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/handler/InjectionMetaObjectHandler.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.xmzs.common.mybatis.handler; - -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.http.HttpStatus; -import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; -import com.xmzs.common.core.domain.model.LoginUser; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.common.satoken.utils.LoginHelper; -import lombok.extern.slf4j.Slf4j; -import org.apache.ibatis.reflection.MetaObject; - -import java.util.Date; - -/** - * MP娉ㄥ叆澶勭悊鍣� - * - * @author Lion Li - * @date 2021/4/25 - */ -@Slf4j -public class InjectionMetaObjectHandler implements MetaObjectHandler { - - @Override - public void insertFill(MetaObject metaObject) { - try { - if (ObjectUtil.isNotNull(metaObject) && metaObject.getOriginalObject() instanceof BaseEntity baseEntity) { - Date current = ObjectUtil.isNotNull(baseEntity.getCreateTime()) - ? baseEntity.getCreateTime() : new Date(); - baseEntity.setCreateTime(current); - baseEntity.setUpdateTime(current); - LoginUser loginUser = getLoginUser(); - if (ObjectUtil.isNotNull(loginUser)) { - Long userId = ObjectUtil.isNotNull(baseEntity.getCreateBy()) - ? baseEntity.getCreateBy() : loginUser.getUserId(); - // 褰撳墠宸茬櫥褰� 涓� 鍒涘缓浜轰负绌� 鍒欏~鍏� - baseEntity.setCreateBy(userId); - // 褰撳墠宸茬櫥褰� 涓� 鏇存柊浜轰负绌� 鍒欏~鍏� - baseEntity.setUpdateBy(userId); - baseEntity.setCreateDept(ObjectUtil.isNotNull(baseEntity.getCreateDept()) - ? baseEntity.getCreateDept() : loginUser.getDeptId()); - } - } - } catch (Exception e) { - throw new ServiceException("鑷姩娉ㄥ叆寮傚父 => " + e.getMessage(), HttpStatus.HTTP_UNAUTHORIZED); - } - } - - @Override - public void updateFill(MetaObject metaObject) { - try { - if (ObjectUtil.isNotNull(metaObject) && metaObject.getOriginalObject() instanceof BaseEntity baseEntity) { - Date current = new Date(); - // 鏇存柊鏃堕棿濉厖(涓嶇涓轰笉涓虹┖) - baseEntity.setUpdateTime(current); - LoginUser loginUser = getLoginUser(); - // 褰撳墠宸茬櫥褰� 鏇存柊浜哄~鍏�(涓嶇涓轰笉涓虹┖) - if (ObjectUtil.isNotNull(loginUser)) { - baseEntity.setUpdateBy(loginUser.getUserId()); - } - } - } catch (Exception e) { - throw new ServiceException("鑷姩娉ㄥ叆寮傚父 => " + e.getMessage(), HttpStatus.HTTP_UNAUTHORIZED); - } - } - - /** - * 鑾峰彇鐧诲綍鐢ㄦ埛鍚� - */ - private LoginUser getLoginUser() { - LoginUser loginUser; - try { - loginUser = LoginHelper.getLoginUser(); - } catch (Exception e) { - log.warn("鑷姩娉ㄥ叆璀﹀憡 => 鐢ㄦ埛鏈櫥褰�"); - return null; - } - return loginUser; - } - -} diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/handler/MybatisExceptionHandler.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/handler/MybatisExceptionHandler.java deleted file mode 100644 index b072fa1..0000000 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/handler/MybatisExceptionHandler.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.xmzs.common.mybatis.handler; - -import com.xmzs.common.core.domain.R; -import lombok.extern.slf4j.Slf4j; -import org.mybatis.spring.MyBatisSystemException; -import org.springframework.dao.DuplicateKeyException; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.RestControllerAdvice; - -import jakarta.servlet.http.HttpServletRequest; - -/** - * Mybatis寮傚父澶勭悊鍣� - * - * @author Lion Li - */ -@Slf4j -@RestControllerAdvice -public class MybatisExceptionHandler { - - /** - * 涓婚敭鎴朥NIQUE绱㈠紩锛屾暟鎹噸澶嶅紓甯� - */ - @ExceptionHandler(DuplicateKeyException.class) - public R<Void> handleDuplicateKeyException(DuplicateKeyException e, HttpServletRequest request) { - String requestURI = request.getRequestURI(); - log.error("璇锋眰鍦板潃'{}',鏁版嵁搴撲腑宸插瓨鍦ㄨ褰�'{}'", requestURI, e.getMessage()); - return R.fail("鏁版嵁搴撲腑宸插瓨鍦ㄨ璁板綍锛岃鑱旂郴绠$悊鍛樼‘璁�"); - } - - /** - * Mybatis绯荤粺寮傚父 閫氱敤澶勭悊 - */ - @ExceptionHandler(MyBatisSystemException.class) - public R<Void> handleCannotFindDataSourceException(MyBatisSystemException e, HttpServletRequest request) { - String requestURI = request.getRequestURI(); - String message = e.getMessage(); - if (message.contains("CannotFindDataSourceException")) { - log.error("璇锋眰鍦板潃'{}', 鏈壘鍒版暟鎹簮", requestURI); - return R.fail("鏈壘鍒版暟鎹簮锛岃鑱旂郴绠$悊鍛樼‘璁�"); - } - log.error("璇锋眰鍦板潃'{}', Mybatis绯荤粺寮傚父", requestURI, e); - return R.fail(message); - } - -} diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/handler/PlusDataPermissionHandler.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/handler/PlusDataPermissionHandler.java deleted file mode 100644 index 87c312e..0000000 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/handler/PlusDataPermissionHandler.java +++ /dev/null @@ -1,198 +0,0 @@ -package com.xmzs.common.mybatis.handler; - -import cn.hutool.core.annotation.AnnotationUtil; -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.collection.ConcurrentHashSet; -import cn.hutool.core.util.ArrayUtil; -import cn.hutool.core.util.ClassUtil; -import cn.hutool.core.util.ObjectUtil; -import com.xmzs.common.core.domain.dto.RoleDTO; -import com.xmzs.common.core.domain.model.LoginUser; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.core.utils.StreamUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.annotation.DataColumn; -import com.xmzs.common.mybatis.annotation.DataPermission; -import com.xmzs.common.mybatis.enums.DataScopeType; -import com.xmzs.common.mybatis.helper.DataPermissionHelper; -import com.xmzs.common.satoken.utils.LoginHelper; -import lombok.extern.slf4j.Slf4j; -import net.sf.jsqlparser.JSQLParserException; -import net.sf.jsqlparser.expression.Expression; -import net.sf.jsqlparser.expression.Parenthesis; -import net.sf.jsqlparser.expression.operators.conditional.AndExpression; -import net.sf.jsqlparser.parser.CCJSqlParserUtil; -import org.springframework.context.expression.BeanFactoryResolver; -import org.springframework.expression.BeanResolver; -import org.springframework.expression.ExpressionParser; -import org.springframework.expression.ParserContext; -import org.springframework.expression.common.TemplateParserContext; -import org.springframework.expression.spel.standard.SpelExpressionParser; -import org.springframework.expression.spel.support.StandardEvaluationContext; - -import java.lang.reflect.Method; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; -import java.util.function.Function; - -/** - * 鏁版嵁鏉冮檺杩囨护 - * - * @author Lion Li - * @version 3.5.0 - */ -@Slf4j -public class PlusDataPermissionHandler { - - /** - * 鏂规硶鎴栫被(鍚嶇О) 涓� 娉ㄨВ鐨勬槧灏勫叧绯荤紦瀛� - */ - private final Map<String, DataPermission> dataPermissionCacheMap = new ConcurrentHashMap<>(); - - /** - * 鏃犳晥娉ㄨВ鏂规硶缂撳瓨鐢ㄤ簬蹇�熻繑鍥� - */ - private final Set<String> invalidCacheSet = new ConcurrentHashSet<>(); - - /** - * spel 瑙f瀽鍣� - */ - private final ExpressionParser parser = new SpelExpressionParser(); - private final ParserContext parserContext = new TemplateParserContext(); - /** - * bean瑙f瀽鍣� 鐢ㄤ簬澶勭悊 spel 琛ㄨ揪寮忎腑瀵� bean 鐨勮皟鐢� - */ - private final BeanResolver beanResolver = new BeanFactoryResolver(SpringUtils.getBeanFactory()); - - - public Expression getSqlSegment(Expression where, String mappedStatementId, boolean isSelect) { - DataColumn[] dataColumns = findAnnotation(mappedStatementId); - if (ArrayUtil.isEmpty(dataColumns)) { - invalidCacheSet.add(mappedStatementId); - return where; - } - LoginUser currentUser = DataPermissionHelper.getVariable("user"); - if (ObjectUtil.isNull(currentUser)) { - currentUser = LoginHelper.getLoginUser(); - DataPermissionHelper.setVariable("user", currentUser); - } - // 濡傛灉鏄秴绾х鐞嗗憳鎴栫鎴风鐞嗗憳锛屽垯涓嶈繃婊ゆ暟鎹� - if (LoginHelper.isSuperAdmin() || LoginHelper.isTenantAdmin()) { - return where; - } - String dataFilterSql = buildDataFilter(dataColumns, isSelect); - if (StringUtils.isBlank(dataFilterSql)) { - return where; - } - try { - Expression expression = CCJSqlParserUtil.parseExpression(dataFilterSql); - // 鏁版嵁鏉冮檺浣跨敤鍗曠嫭鐨勬嫭鍙� 闃叉涓庡叾浠栨潯浠跺啿绐� - Parenthesis parenthesis = new Parenthesis(expression); - if (ObjectUtil.isNotNull(where)) { - return new AndExpression(where, parenthesis); - } else { - return parenthesis; - } - } catch (JSQLParserException e) { - throw new ServiceException("鏁版嵁鏉冮檺瑙f瀽寮傚父 => " + e.getMessage()); - } - } - - /** - * 鏋勯�犳暟鎹繃婊ql - */ - private String buildDataFilter(DataColumn[] dataColumns, boolean isSelect) { - // 鏇存柊鎴栧垹闄ら渶婊¤冻鎵�鏈夋潯浠� - String joinStr = isSelect ? " OR " : " AND "; - LoginUser user = DataPermissionHelper.getVariable("user"); - StandardEvaluationContext context = new StandardEvaluationContext(); - context.setBeanResolver(beanResolver); - DataPermissionHelper.getContext().forEach(context::setVariable); - Set<String> conditions = new HashSet<>(); - for (RoleDTO role : user.getRoles()) { - user.setRoleId(role.getRoleId()); - // 鑾峰彇瑙掕壊鏉冮檺娉涘瀷 - DataScopeType type = DataScopeType.findCode(role.getDataScope()); - if (ObjectUtil.isNull(type)) { - throw new ServiceException("瑙掕壊鏁版嵁鑼冨洿寮傚父 => " + role.getDataScope()); - } - // 鍏ㄩ儴鏁版嵁鏉冮檺鐩存帴杩斿洖 - if (type == DataScopeType.ALL) { - return ""; - } - boolean isSuccess = false; - for (DataColumn dataColumn : dataColumns) { - if (dataColumn.key().length != dataColumn.value().length) { - throw new ServiceException("瑙掕壊鏁版嵁鑼冨洿寮傚父 => key涓巚alue闀垮害涓嶅尮閰�"); - } - // 涓嶅寘鍚� key 鍙橀噺 鍒欎笉澶勭悊 - if (!StringUtils.containsAny(type.getSqlTemplate(), - Arrays.stream(dataColumn.key()).map(key -> "#" + key).toArray(String[]::new) - )) { - continue; - } - // 璁剧疆娉ㄨВ鍙橀噺 key 涓鸿〃杈惧紡鍙橀噺 value 涓哄彉閲忓�� - for (int i = 0; i < dataColumn.key().length; i++) { - context.setVariable(dataColumn.key()[i], dataColumn.value()[i]); - } - - // 瑙f瀽sql妯℃澘骞跺~鍏� - String sql = parser.parseExpression(type.getSqlTemplate(), parserContext).getValue(context, String.class); - conditions.add(joinStr + sql); - isSuccess = true; - } - // 鏈鐞嗘垚鍔熷垯濉厖鍏滃簳鏂规 - if (!isSuccess && StringUtils.isNotBlank(type.getElseSql())) { - conditions.add(joinStr + type.getElseSql()); - } - } - - if (CollUtil.isNotEmpty(conditions)) { - String sql = StreamUtils.join(conditions, Function.identity(), ""); - return sql.substring(joinStr.length()); - } - return ""; - } - - private DataColumn[] findAnnotation(String mappedStatementId) { - StringBuilder sb = new StringBuilder(mappedStatementId); - int index = sb.lastIndexOf("."); - String clazzName = sb.substring(0, index); - String methodName = sb.substring(index + 1, sb.length()); - Class<?> clazz = ClassUtil.loadClass(clazzName); - List<Method> methods = Arrays.stream(ClassUtil.getDeclaredMethods(clazz)) - .filter(method -> method.getName().equals(methodName)).toList(); - DataPermission dataPermission; - // 鑾峰彇鏂规硶娉ㄨВ - for (Method method : methods) { - dataPermission = dataPermissionCacheMap.get(mappedStatementId); - if (ObjectUtil.isNotNull(dataPermission)) { - return dataPermission.value(); - } - if (AnnotationUtil.hasAnnotation(method, DataPermission.class)) { - dataPermission = AnnotationUtil.getAnnotation(method, DataPermission.class); - dataPermissionCacheMap.put(mappedStatementId, dataPermission); - return dataPermission.value(); - } - } - dataPermission = dataPermissionCacheMap.get(clazz.getName()); - if (ObjectUtil.isNotNull(dataPermission)) { - return dataPermission.value(); - } - // 鑾峰彇绫绘敞瑙� - if (AnnotationUtil.hasAnnotation(clazz, DataPermission.class)) { - dataPermission = AnnotationUtil.getAnnotation(clazz, DataPermission.class); - dataPermissionCacheMap.put(clazz.getName(), dataPermission); - return dataPermission.value(); - } - return null; - } - - /** - * 鏄惁涓烘棤鏁堟柟娉� 鏃犳暟鎹潈闄� - */ - public boolean isInvalid(String mappedStatementId) { - return invalidCacheSet.contains(mappedStatementId); - } -} diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/helper/DataBaseHelper.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/helper/DataBaseHelper.java deleted file mode 100644 index 6306857..0000000 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/helper/DataBaseHelper.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.xmzs.common.mybatis.helper; - -import cn.hutool.core.convert.Convert; -import com.baomidou.dynamic.datasource.DynamicRoutingDataSource; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.mybatis.enums.DataBaseType; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; - -import javax.sql.DataSource; -import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.SQLException; - -/** - * 鏁版嵁搴撳姪鎵� - * - * @author Lion Li - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class DataBaseHelper { - - private static final DynamicRoutingDataSource DS = SpringUtils.getBean(DynamicRoutingDataSource.class); - - /** - * 鑾峰彇褰撳墠鏁版嵁搴撶被鍨� - */ - public static DataBaseType getDataBaseType() { - DataSource dataSource = DS.determineDataSource(); - try (Connection conn = dataSource.getConnection()) { - DatabaseMetaData metaData = conn.getMetaData(); - String databaseProductName = metaData.getDatabaseProductName(); - return DataBaseType.find(databaseProductName); - } catch (SQLException e) { - throw new ServiceException(e.getMessage()); - } - } - - public static boolean isMySql() { - return DataBaseType.MY_SQL == getDataBaseType(); - } - - public static boolean isOracle() { - return DataBaseType.ORACLE == getDataBaseType(); - } - - public static boolean isPostgerSql() { - return DataBaseType.POSTGRE_SQL == getDataBaseType(); - } - - public static boolean isSqlServer() { - return DataBaseType.SQL_SERVER == getDataBaseType(); - } - - public static String findInSet(Object var1, String var2) { - DataBaseType dataBasyType = getDataBaseType(); - String var = Convert.toStr(var1); - if (dataBasyType == DataBaseType.SQL_SERVER) { - // charindex(',100,' , ',0,100,101,') <> 0 - return "charindex(',%s,' , ','+%s+',') <> 0".formatted(var, var2); - } else if (dataBasyType == DataBaseType.POSTGRE_SQL) { - // (select position(',100,' in ',0,100,101,')) <> 0 - return "(select position(',%s,' in ','||%s||',')) <> 0".formatted(var, var2); - } else if (dataBasyType == DataBaseType.ORACLE) { - // instr(',0,100,101,' , ',100,') <> 0 - return "instr(','||%s||',' , ',%s,') <> 0".formatted(var2, var); - } - // find_in_set(100 , '0,100,101') - return "find_in_set('%s' , %s) <> 0".formatted(var, var2); - } -} diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/helper/DataPermissionHelper.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/helper/DataPermissionHelper.java deleted file mode 100644 index 74e5a21..0000000 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/helper/DataPermissionHelper.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.xmzs.common.mybatis.helper; - -import cn.dev33.satoken.context.SaHolder; -import cn.dev33.satoken.context.model.SaStorage; -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.core.plugins.IgnoreStrategy; -import com.baomidou.mybatisplus.core.plugins.InterceptorIgnoreHelper; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; - -import java.util.HashMap; -import java.util.Map; -import java.util.function.Supplier; - -/** - * 鏁版嵁鏉冮檺鍔╂墜 - * - * @author Lion Li - * @version 3.5.0 - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -@SuppressWarnings("unchecked cast") -public class DataPermissionHelper { - - private static final String DATA_PERMISSION_KEY = "data:permission"; - - public static <T> T getVariable(String key) { - Map<String, Object> context = getContext(); - return (T) context.get(key); - } - - - public static void setVariable(String key, Object value) { - Map<String, Object> context = getContext(); - context.put(key, value); - } - - public static Map<String, Object> getContext() { - SaStorage saStorage = SaHolder.getStorage(); - Object attribute = saStorage.get(DATA_PERMISSION_KEY); - if (ObjectUtil.isNull(attribute)) { - saStorage.set(DATA_PERMISSION_KEY, new HashMap<>()); - attribute = saStorage.get(DATA_PERMISSION_KEY); - } - if (attribute instanceof Map map) { - return map; - } - throw new NullPointerException("data permission context type exception"); - } - - /** - * 寮�鍚拷鐣ユ暟鎹潈闄�(寮�鍚悗闇�鎵嬪姩璋冪敤 {@link #disableIgnore()} 鍏抽棴) - */ - public static void enableIgnore() { - InterceptorIgnoreHelper.handle(IgnoreStrategy.builder().dataPermission(true).build()); - } - - /** - * 鍏抽棴蹇界暐鏁版嵁鏉冮檺 - */ - public static void disableIgnore() { - InterceptorIgnoreHelper.clearIgnoreStrategy(); - } - - /** - * 鍦ㄥ拷鐣ユ暟鎹潈闄愪腑鎵ц - * - * @param handle 澶勭悊鎵ц鏂规硶 - */ - public static void ignore(Runnable handle) { - enableIgnore(); - try { - handle.run(); - } finally { - disableIgnore(); - } - } - - /** - * 鍦ㄥ拷鐣ユ暟鎹潈闄愪腑鎵ц - * - * @param handle 澶勭悊鎵ц鏂规硶 - */ - public static <T> T ignore(Supplier<T> handle) { - enableIgnore(); - try { - return handle.get(); - } finally { - disableIgnore(); - } - } - -} diff --git a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/interceptor/PlusDataPermissionInterceptor.java b/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/interceptor/PlusDataPermissionInterceptor.java deleted file mode 100644 index e434c24..0000000 --- a/ruoyi-common/ruoyi-common-mybatis/src/main/java/com/xmzs/common/mybatis/interceptor/PlusDataPermissionInterceptor.java +++ /dev/null @@ -1,107 +0,0 @@ -package com.xmzs.common.mybatis.interceptor; - -import com.baomidou.mybatisplus.core.plugins.InterceptorIgnoreHelper; -import com.baomidou.mybatisplus.core.toolkit.PluginUtils; -import com.baomidou.mybatisplus.extension.parser.JsqlParserSupport; -import com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor; -import com.xmzs.common.mybatis.handler.PlusDataPermissionHandler; -import net.sf.jsqlparser.expression.Expression; -import net.sf.jsqlparser.statement.delete.Delete; -import net.sf.jsqlparser.statement.select.PlainSelect; -import net.sf.jsqlparser.statement.select.Select; -import net.sf.jsqlparser.statement.select.SelectBody; -import net.sf.jsqlparser.statement.select.SetOperationList; -import net.sf.jsqlparser.statement.update.Update; -import org.apache.ibatis.executor.Executor; -import org.apache.ibatis.executor.statement.StatementHandler; -import org.apache.ibatis.mapping.BoundSql; -import org.apache.ibatis.mapping.MappedStatement; -import org.apache.ibatis.mapping.SqlCommandType; -import org.apache.ibatis.session.ResultHandler; -import org.apache.ibatis.session.RowBounds; - -import java.sql.Connection; -import java.sql.SQLException; -import java.util.List; - -/** - * 鏁版嵁鏉冮檺鎷︽埅鍣� - * - * @author Lion Li - * @version 3.5.0 - */ -public class PlusDataPermissionInterceptor extends JsqlParserSupport implements InnerInterceptor { - - private final PlusDataPermissionHandler dataPermissionHandler = new PlusDataPermissionHandler(); - - @Override - public void beforeQuery(Executor executor, MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) throws SQLException { - // 妫�鏌ュ拷鐣ユ敞瑙� - if (InterceptorIgnoreHelper.willIgnoreDataPermission(ms.getId())) { - return; - } - // 妫�鏌ユ槸鍚︽棤鏁� 鏃犳暟鎹潈闄愭敞瑙� - if (dataPermissionHandler.isInvalid(ms.getId())) { - return; - } - // 瑙f瀽 sql 鍒嗛厤瀵瑰簲鏂规硶 - PluginUtils.MPBoundSql mpBs = PluginUtils.mpBoundSql(boundSql); - mpBs.sql(parserSingle(mpBs.sql(), ms.getId())); - } - - @Override - public void beforePrepare(StatementHandler sh, Connection connection, Integer transactionTimeout) { - PluginUtils.MPStatementHandler mpSh = PluginUtils.mpStatementHandler(sh); - MappedStatement ms = mpSh.mappedStatement(); - SqlCommandType sct = ms.getSqlCommandType(); - if (sct == SqlCommandType.UPDATE || sct == SqlCommandType.DELETE) { - if (InterceptorIgnoreHelper.willIgnoreDataPermission(ms.getId())) { - return; - } - PluginUtils.MPBoundSql mpBs = mpSh.mPBoundSql(); - mpBs.sql(parserMulti(mpBs.sql(), ms.getId())); - } - } - - @Override - protected void processSelect(Select select, int index, String sql, Object obj) { - SelectBody selectBody = select.getSelectBody(); - if (selectBody instanceof PlainSelect plainSelect) { - this.setWhere(plainSelect, (String) obj); - } else if (selectBody instanceof SetOperationList setOperationList) { - List<SelectBody> selectBodyList = setOperationList.getSelects(); - selectBodyList.forEach(s -> this.setWhere((PlainSelect) s, (String) obj)); - } - } - - @Override - protected void processUpdate(Update update, int index, String sql, Object obj) { - Expression sqlSegment = dataPermissionHandler.getSqlSegment(update.getWhere(), (String) obj, false); - if (null != sqlSegment) { - update.setWhere(sqlSegment); - } - } - - @Override - protected void processDelete(Delete delete, int index, String sql, Object obj) { - Expression sqlSegment = dataPermissionHandler.getSqlSegment(delete.getWhere(), (String) obj, false); - if (null != sqlSegment) { - delete.setWhere(sqlSegment); - } - } - - /** - * 璁剧疆 where 鏉′欢 - * - * @param plainSelect 鏌ヨ瀵硅薄 - * @param mappedStatementId 鎵ц鏂规硶id - */ - protected void setWhere(PlainSelect plainSelect, String mappedStatementId) { - Expression sqlSegment = dataPermissionHandler.getSqlSegment(plainSelect.getWhere(), mappedStatementId, true); - if (null != sqlSegment) { - plainSelect.setWhere(sqlSegment); - } - } - -} - diff --git a/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/constant/OssConstant.java b/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/constant/OssConstant.java deleted file mode 100644 index 5b7d456..0000000 --- a/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/constant/OssConstant.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.xmzs.common.oss.constant; - -import java.util.Arrays; -import java.util.List; - -/** - * 瀵硅薄瀛樺偍甯搁噺 - * - * @author Lion Li - */ -public interface OssConstant { - - /** - * 榛樿閰嶇疆KEY - */ - String DEFAULT_CONFIG_KEY = "sys_oss:default_config"; - - /** - * 棰勮鍒楄〃璧勬簮寮�鍏矺ey - */ - String PEREVIEW_LIST_RESOURCE_KEY = "sys.oss.previewListResource"; - - /** - * 绯荤粺鏁版嵁ids - */ - List<Long> SYSTEM_DATA_IDS = Arrays.asList(1L, 2L, 3L, 4L); - - /** - * 浜戞湇鍔″晢 - */ - String[] CLOUD_SERVICE = new String[] {"aliyun", "qcloud", "qiniu", "obs"}; - - /** - * https 鐘舵�� - */ - String IS_HTTPS = "Y"; - -} diff --git a/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/core/OssClient.java b/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/core/OssClient.java deleted file mode 100644 index 3eda58a..0000000 --- a/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/core/OssClient.java +++ /dev/null @@ -1,245 +0,0 @@ -package com.xmzs.common.oss.core; - -import cn.hutool.core.io.IoUtil; -import cn.hutool.core.util.IdUtil; -import com.amazonaws.ClientConfiguration; -import com.amazonaws.HttpMethod; -import com.amazonaws.Protocol; -import com.amazonaws.auth.AWSCredentials; -import com.amazonaws.auth.AWSCredentialsProvider; -import com.amazonaws.auth.AWSStaticCredentialsProvider; -import com.amazonaws.auth.BasicAWSCredentials; -import com.amazonaws.client.builder.AwsClientBuilder; -import com.amazonaws.services.s3.AmazonS3; -import com.amazonaws.services.s3.AmazonS3Client; -import com.amazonaws.services.s3.AmazonS3ClientBuilder; -import com.amazonaws.services.s3.model.*; -import com.xmzs.common.core.utils.DateUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.oss.constant.OssConstant; -import com.xmzs.common.oss.entity.UploadResult; -import com.xmzs.common.oss.enumd.AccessPolicyType; -import com.xmzs.common.oss.enumd.PolicyType; -import com.xmzs.common.oss.exception.OssException; -import com.xmzs.common.oss.properties.OssProperties; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.net.URL; -import java.util.Date; - -/** - * S3 瀛樺偍鍗忚 鎵�鏈夊吋瀹筍3鍗忚鐨勪簯鍘傚晢鍧囨敮鎸� - * 闃块噷浜� 鑵捐浜� 涓冪墰浜� minio - * - * @author Lion Li - */ -public class OssClient { - - private final String configKey; - - private final OssProperties properties; - - private final AmazonS3 client; - - public OssClient(String configKey, OssProperties ossProperties) { - this.configKey = configKey; - this.properties = ossProperties; - try { - AwsClientBuilder.EndpointConfiguration endpointConfig = - new AwsClientBuilder.EndpointConfiguration(properties.getEndpoint(), properties.getRegion()); - - AWSCredentials credentials = new BasicAWSCredentials(properties.getAccessKey(), properties.getSecretKey()); - AWSCredentialsProvider credentialsProvider = new AWSStaticCredentialsProvider(credentials); - ClientConfiguration clientConfig = new ClientConfiguration(); - if (OssConstant.IS_HTTPS.equals(properties.getIsHttps())) { - clientConfig.setProtocol(Protocol.HTTPS); - } else { - clientConfig.setProtocol(Protocol.HTTP); - } - AmazonS3ClientBuilder build = AmazonS3Client.builder() - .withEndpointConfiguration(endpointConfig) - .withClientConfiguration(clientConfig) - .withCredentials(credentialsProvider) - .disableChunkedEncoding(); - if (!StringUtils.containsAny(properties.getEndpoint(), OssConstant.CLOUD_SERVICE)) { - // minio 浣跨敤https闄愬埗浣跨敤鍩熷悕璁块棶 闇�瑕佹閰嶇疆 绔欑偣濉煙鍚� - build.enablePathStyleAccess(); - } - this.client = build.build(); - - createBucket(); - } catch (Exception e) { - if (e instanceof OssException) { - throw e; - } - throw new OssException("閰嶇疆閿欒! 璇锋鏌ョ郴缁熼厤缃�:[" + e.getMessage() + "]"); - } - } - - public void createBucket() { - try { - String bucketName = properties.getBucketName(); - if (client.doesBucketExistV2(bucketName)) { - return; - } - CreateBucketRequest createBucketRequest = new CreateBucketRequest(bucketName); - AccessPolicyType accessPolicy = getAccessPolicy(); - createBucketRequest.setCannedAcl(accessPolicy.getAcl()); - client.createBucket(createBucketRequest); - client.setBucketPolicy(bucketName, getPolicy(bucketName, accessPolicy.getPolicyType())); - } catch (Exception e) { - throw new OssException("鍒涘缓Bucket澶辫触, 璇锋牳瀵归厤缃俊鎭�:[" + e.getMessage() + "]"); - } - } - - public UploadResult upload(byte[] data, String path, String contentType) { - return upload(new ByteArrayInputStream(data), path, contentType); - } - - public UploadResult upload(InputStream inputStream, String path, String contentType) { - if (!(inputStream instanceof ByteArrayInputStream)) { - inputStream = new ByteArrayInputStream(IoUtil.readBytes(inputStream)); - } - try { - ObjectMetadata metadata = new ObjectMetadata(); - metadata.setContentType(contentType); - metadata.setContentLength(inputStream.available()); - PutObjectRequest putObjectRequest = new PutObjectRequest(properties.getBucketName(), path, inputStream, metadata); - // 璁剧疆涓婁紶瀵硅薄鐨� Acl 涓哄叕鍏辫 - putObjectRequest.setCannedAcl(getAccessPolicy().getAcl()); - client.putObject(putObjectRequest); - } catch (Exception e) { - throw new OssException("涓婁紶鏂囦欢澶辫触锛岃妫�鏌ラ厤缃俊鎭�:[" + e.getMessage() + "]"); - } - return UploadResult.builder().url(getUrl() + "/" + path).filename(path).build(); - } - - public void delete(String path) { - path = path.replace(getUrl() + "/", ""); - try { - client.deleteObject(properties.getBucketName(), path); - } catch (Exception e) { - throw new OssException("鍒犻櫎鏂囦欢澶辫触锛岃妫�鏌ラ厤缃俊鎭�:[" + e.getMessage() + "]"); - } - } - - public UploadResult uploadSuffix(byte[] data, String suffix, String contentType) { - return upload(data, getPath(properties.getPrefix(), suffix), contentType); - } - - public UploadResult uploadSuffix(InputStream inputStream, String suffix, String contentType) { - return upload(inputStream, getPath(properties.getPrefix(), suffix), contentType); - } - - /** - * 鑾峰彇鏂囦欢鍏冩暟鎹� - * - * @param path 瀹屾暣鏂囦欢璺緞 - */ - public ObjectMetadata getObjectMetadata(String path) { - path = path.replace(getUrl() + "/", ""); - S3Object object = client.getObject(properties.getBucketName(), path); - return object.getObjectMetadata(); - } - - public InputStream getObjectContent(String path) { - path = path.replace(getUrl() + "/", ""); - S3Object object = client.getObject(properties.getBucketName(), path); - return object.getObjectContent(); - } - - public String getUrl() { - String domain = properties.getDomain(); - String endpoint = properties.getEndpoint(); - String header = OssConstant.IS_HTTPS.equals(properties.getIsHttps()) ? "https://" : "http://"; - // 浜戞湇鍔″晢鐩存帴杩斿洖 - if (StringUtils.containsAny(endpoint, OssConstant.CLOUD_SERVICE)) { - if (StringUtils.isNotBlank(domain)) { - return header + domain; - } - return header + properties.getBucketName() + "." + endpoint; - } - // minio 鍗曠嫭澶勭悊 - if (StringUtils.isNotBlank(domain)) { - return header + domain + "/" + properties.getBucketName(); - } - return header + endpoint + "/" + properties.getBucketName(); - } - - public String getPath(String prefix, String suffix) { - // 鐢熸垚uuid - String uuid = IdUtil.fastSimpleUUID(); - // 鏂囦欢璺緞 - String path = DateUtils.datePath() + "/" + uuid; - if (StringUtils.isNotBlank(prefix)) { - path = prefix + "/" + path; - } - return path + suffix; - } - - - public String getConfigKey() { - return configKey; - } - - /** - * 鑾峰彇绉佹湁URL閾炬帴 - * - * @param objectKey 瀵硅薄KEY - * @param second 鎺堟潈鏃堕棿 - */ - public String getPrivateUrl(String objectKey, Integer second) { - GeneratePresignedUrlRequest generatePresignedUrlRequest = - new GeneratePresignedUrlRequest(properties.getBucketName(), objectKey) - .withMethod(HttpMethod.GET) - .withExpiration(new Date(System.currentTimeMillis() + 1000L * second)); - URL url = client.generatePresignedUrl(generatePresignedUrlRequest); - return url.toString(); - } - - /** - * 妫�鏌ラ厤缃槸鍚︾浉鍚� - */ - public boolean checkPropertiesSame(OssProperties properties) { - return this.properties.equals(properties); - } - - /** - * 鑾峰彇褰撳墠妗舵潈闄愮被鍨� - * - * @return 褰撳墠妗舵潈闄愮被鍨媍ode - */ - public AccessPolicyType getAccessPolicy() { - return AccessPolicyType.getByType(properties.getAccessPolicy()); - } - - private static String getPolicy(String bucketName, PolicyType policyType) { - StringBuilder builder = new StringBuilder(); - builder.append("{\n\"Statement\": [\n{\n\"Action\": [\n"); - builder.append(switch (policyType) { - case WRITE -> "\"s3:GetBucketLocation\",\n\"s3:ListBucketMultipartUploads\"\n"; - case READ_WRITE -> "\"s3:GetBucketLocation\",\n\"s3:ListBucket\",\n\"s3:ListBucketMultipartUploads\"\n"; - default -> "\"s3:GetBucketLocation\"\n"; - }); - builder.append("],\n\"Effect\": \"Allow\",\n\"Principal\": \"*\",\n\"Resource\": \"arn:aws:s3:::"); - builder.append(bucketName); - builder.append("\"\n},\n"); - if (policyType == PolicyType.READ) { - builder.append("{\n\"Action\": [\n\"s3:ListBucket\"\n],\n\"Effect\": \"Deny\",\n\"Principal\": \"*\",\n\"Resource\": \"arn:aws:s3:::"); - builder.append(bucketName); - builder.append("\"\n},\n"); - } - builder.append("{\n\"Action\": "); - builder.append(switch (policyType) { - case WRITE -> "[\n\"s3:AbortMultipartUpload\",\n\"s3:DeleteObject\",\n\"s3:ListMultipartUploadParts\",\n\"s3:PutObject\"\n],\n"; - case READ_WRITE -> "[\n\"s3:AbortMultipartUpload\",\n\"s3:DeleteObject\",\n\"s3:GetObject\",\n\"s3:ListMultipartUploadParts\",\n\"s3:PutObject\"\n],\n"; - default -> "\"s3:GetObject\",\n"; - }); - builder.append("\"Effect\": \"Allow\",\n\"Principal\": \"*\",\n\"Resource\": \"arn:aws:s3:::"); - builder.append(bucketName); - builder.append("/*\"\n}\n],\n\"Version\": \"2012-10-17\"\n}\n"); - return builder.toString(); - } - -} diff --git a/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/entity/UploadResult.java b/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/entity/UploadResult.java deleted file mode 100644 index df55445..0000000 --- a/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/entity/UploadResult.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.xmzs.common.oss.entity; - -import lombok.Builder; -import lombok.Data; - -/** - * 涓婁紶杩斿洖浣� - * - * @author Lion Li - */ -@Data -@Builder -public class UploadResult { - - /** - * 鏂囦欢璺緞 - */ - private String url; - - /** - * 鏂囦欢鍚� - */ - private String filename; -} diff --git a/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/enumd/AccessPolicyType.java b/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/enumd/AccessPolicyType.java deleted file mode 100644 index 0d71f94..0000000 --- a/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/enumd/AccessPolicyType.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.xmzs.common.oss.enumd; - -import com.amazonaws.services.s3.model.CannedAccessControlList; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 妗惰闂瓥鐣ラ厤缃� - * - * @author 闄堣碀 - */ -@Getter -@AllArgsConstructor -public enum AccessPolicyType { - - /** - * private - */ - PRIVATE("0", CannedAccessControlList.Private, PolicyType.WRITE), - - /** - * public - */ - PUBLIC("1", CannedAccessControlList.PublicRead, PolicyType.READ), - - /** - * custom - */ - CUSTOM("2",CannedAccessControlList.PublicRead, PolicyType.READ); - - /** - * 妗� 鏉冮檺绫诲瀷 - */ - private final String type; - - /** - * 鏂囦欢瀵硅薄 鏉冮檺绫诲瀷 - */ - private final CannedAccessControlList acl; - - /** - * 妗剁瓥鐣ョ被鍨� - */ - private final PolicyType policyType; - - public static AccessPolicyType getByType(String type) { - for (AccessPolicyType value : values()) { - if (value.getType().equals(type)) { - return value; - } - } - throw new RuntimeException("'type' not found By " + type); - } - -} diff --git a/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/enumd/PolicyType.java b/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/enumd/PolicyType.java deleted file mode 100644 index ad9d30a..0000000 --- a/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/enumd/PolicyType.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.xmzs.common.oss.enumd; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * minio绛栫暐閰嶇疆 - * - * @author Lion Li - */ -@Getter -@AllArgsConstructor -public enum PolicyType { - - /** - * 鍙 - */ - READ("read-only"), - - /** - * 鍙啓 - */ - WRITE("write-only"), - - /** - * 璇诲啓 - */ - READ_WRITE("read-write"); - - /** - * 绫诲瀷 - */ - private final String type; - -} diff --git a/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/exception/OssException.java b/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/exception/OssException.java deleted file mode 100644 index 0029ca6..0000000 --- a/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/exception/OssException.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.xmzs.common.oss.exception; - -import java.io.Serial; - -/** - * OSS寮傚父绫� - * - * @author Lion Li - */ -public class OssException extends RuntimeException { - - @Serial - private static final long serialVersionUID = 1L; - - public OssException(String msg) { - super(msg); - } - -} diff --git a/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/factory/OssFactory.java b/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/factory/OssFactory.java deleted file mode 100644 index 220c092..0000000 --- a/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/factory/OssFactory.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.xmzs.common.oss.factory; - -import com.xmzs.common.core.constant.CacheNames; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.json.utils.JsonUtils; -import com.xmzs.common.oss.constant.OssConstant; -import com.xmzs.common.oss.core.OssClient; -import com.xmzs.common.oss.exception.OssException; -import com.xmzs.common.oss.properties.OssProperties; -import com.xmzs.common.redis.utils.CacheUtils; -import com.xmzs.common.redis.utils.RedisUtils; -import lombok.extern.slf4j.Slf4j; - -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -/** - * 鏂囦欢涓婁紶Factory - * - * @author Lion Li - */ -@Slf4j -public class OssFactory { - - private static final Map<String, OssClient> CLIENT_CACHE = new ConcurrentHashMap<>(); - - /** - * 鑾峰彇榛樿瀹炰緥 - */ - public static OssClient instance() { - // 鑾峰彇redis 榛樿绫诲瀷 - String configKey = RedisUtils.getCacheObject(OssConstant.DEFAULT_CONFIG_KEY); - if (StringUtils.isEmpty(configKey)) { - throw new OssException("鏂囦欢瀛樺偍鏈嶅姟绫诲瀷鏃犳硶鎵惧埌!"); - } - return instance(configKey); - } - - /** - * 鏍规嵁绫诲瀷鑾峰彇瀹炰緥 - */ - public static OssClient instance(String configKey) { - String json = CacheUtils.get(CacheNames.SYS_OSS_CONFIG, configKey); - if (json == null) { - throw new OssException("绯荤粺寮傚父, '" + configKey + "'閰嶇疆淇℃伅涓嶅瓨鍦�!"); - } - OssProperties properties = JsonUtils.parseObject(json, OssProperties.class); - OssClient client = CLIENT_CACHE.get(configKey); - if (client == null) { - CLIENT_CACHE.put(configKey, new OssClient(configKey, properties)); - log.info("鍒涘缓OSS瀹炰緥 key => {}", configKey); - return CLIENT_CACHE.get(configKey); - } - // 閰嶇疆涓嶇浉鍚屽垯閲嶆柊鏋勫缓 - if (!client.checkPropertiesSame(properties)) { - CLIENT_CACHE.put(configKey, new OssClient(configKey, properties)); - log.info("閲嶈浇OSS瀹炰緥 key => {}", configKey); - return CLIENT_CACHE.get(configKey); - } - return client; - } - -} diff --git a/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/properties/OssProperties.java b/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/properties/OssProperties.java deleted file mode 100644 index cbc5df7..0000000 --- a/ruoyi-common/ruoyi-common-oss/src/main/java/com/xmzs/common/oss/properties/OssProperties.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.xmzs.common.oss.properties; - -import lombok.Data; - -/** - * OSS瀵硅薄瀛樺偍 閰嶇疆灞炴�� - * - * @author Lion Li - */ -@Data -public class OssProperties { - - /** - * 璁块棶绔欑偣 - */ - private String endpoint; - - /** - * 鑷畾涔夊煙鍚� - */ - private String domain; - - /** - * 鍓嶇紑 - */ - private String prefix; - - /** - * ACCESS_KEY - */ - private String accessKey; - - /** - * SECRET_KEY - */ - private String secretKey; - - /** - * 瀛樺偍绌洪棿鍚� - */ - private String bucketName; - - /** - * 瀛樺偍鍖哄煙 - */ - private String region; - - /** - * 鏄惁https锛圷=鏄�,N=鍚︼級 - */ - private String isHttps; - - /** - * 妗舵潈闄愮被鍨�(0private 1public 2custom) - */ - private String accessPolicy; - -} diff --git a/ruoyi-common/ruoyi-common-pay/src/main/java/com/xmzs/common/config/PayConfig.java b/ruoyi-common/ruoyi-common-pay/src/main/java/com/xmzs/common/config/PayConfig.java deleted file mode 100644 index 97436ac..0000000 --- a/ruoyi-common/ruoyi-common-pay/src/main/java/com/xmzs/common/config/PayConfig.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.xmzs.common.config; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -/** - * 鏀粯閰嶇疆淇℃伅 - * - * @author Admin - */ -@Data -@Component -@ConfigurationProperties(prefix = "pay") -public class PayConfig { - - /** - * 鍟嗘埛ID - */ - private String pid; - - /** - * 鎺ュ彛鍦板潃 - */ - private String payUrl; - - /** - * 绉侀挜 - */ - private String key ; - - /** - * 鏈嶅姟鍣ㄥ紓姝ラ�氱煡鍦板潃 - */ - private String notify_url; - - /** - * 椤甸潰璺宠浆閫氱煡鍦板潃 - */ - private String return_url; - - /** - * 鏀粯鏂瑰紡 - */ - private String type; - - /** - * 璁惧绫诲瀷 - */ - private String device; - - /** - * 鍔犲瘑鏂瑰紡榛樿MD5 - */ - private String sign_type; - -} diff --git a/ruoyi-common/ruoyi-common-pay/src/main/java/com/xmzs/common/response/PayResponse.java b/ruoyi-common/ruoyi-common-pay/src/main/java/com/xmzs/common/response/PayResponse.java deleted file mode 100644 index de1d782..0000000 --- a/ruoyi-common/ruoyi-common-pay/src/main/java/com/xmzs/common/response/PayResponse.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.xmzs.common.response; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import lombok.Data; - -/** - * 鏀粯缁撴灉鍝嶅簲 - * - * @author: wangle - * @date: 2023/7/3 - */ -@Data -public class PayResponse { - - /** - * 鍟嗘埛ID - */ - private String pid; - - /** - * 鏄撴敮浠樿鍗曞彿 - */ - - @JsonProperty("trade_no") - private String trade_no; - - /** - * 鍟嗘埛璁㈠崟鍙� - */ - @JsonProperty("out_trade_no") - private String out_trade_no; - - /** - * 鏀粯鏂瑰紡 - */ - private String type; - - /** - * 鍟嗗搧鍚嶇О - */ - private String name; - - /** - * 鍟嗗搧閲戦 - */ - private String money; - - /** - * 鏀粯鐘舵�� - */ - @JsonProperty("trade_status") - private String trade_status; - - /** - * 涓氬姟鎵╁睍鍙傛暟 - */ - private String param; - - /** - * 绛惧悕瀛楃涓� - */ - private String sign; - - /** - * 绛惧悕绫诲瀷 - */ - @JsonProperty("sign_type") - private String signType; - -} diff --git a/ruoyi-common/ruoyi-common-pay/src/main/java/com/xmzs/common/service/PayService.java b/ruoyi-common/ruoyi-common-pay/src/main/java/com/xmzs/common/service/PayService.java deleted file mode 100644 index 78d1cb9..0000000 --- a/ruoyi-common/ruoyi-common-pay/src/main/java/com/xmzs/common/service/PayService.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.xmzs.common.service; - -/** - * 鏀粯鏈嶅姟 - * - * @author: wangle - * @date: 2023/7/3 - */ -public interface PayService { - - /** - * 鑾峰彇鏀粯鍦板潃 - * - * @Date 2023/7/3 - * @param orderNo - * @param name - * @param money - * @param clientIp - * @return String - **/ - String getPayUrl(String orderNo, String name, double money, String clientIp); -} diff --git a/ruoyi-common/ruoyi-common-pay/src/main/java/com/xmzs/common/service/impl/PayServiceImpl.java b/ruoyi-common/ruoyi-common-pay/src/main/java/com/xmzs/common/service/impl/PayServiceImpl.java deleted file mode 100644 index b084aa4..0000000 --- a/ruoyi-common/ruoyi-common-pay/src/main/java/com/xmzs/common/service/impl/PayServiceImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.xmzs.common.service.impl; - -import cn.hutool.http.HttpUtil; -import cn.hutool.json.JSONObject; - -import com.xmzs.common.config.PayConfig; -import com.xmzs.common.service.PayService; -import com.xmzs.common.utils.MD5Util; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; - -import java.util.HashMap; -import java.util.Map; - -/** - * 鏀粯鏈嶅姟 - * @author Admin - */ -@Service -@RequiredArgsConstructor -@Slf4j -public class PayServiceImpl implements PayService { - - private final PayConfig payConfig; - @Override - public String getPayUrl(String orderNo, String name, double money, String clientIp) { - String out_trade_no = orderNo, sign = ""; - //灏佽璇锋眰鍙傛暟 - String mdString = "clientip=" + clientIp + "&device=" + payConfig.getDevice() + "&money=" + money + "&name=" + name + "&" + - "notify_url=" + payConfig.getNotify_url() + "&out_trade_no=" + out_trade_no + "&pid=" + payConfig.getPid() + "&return_url=" + payConfig.getReturn_url() + - "&type=" + payConfig.getType() + payConfig.getKey(); - sign = MD5Util.GetMD5Code(mdString); - Map<String, Object> map = new HashMap<>(10); - map.put("clientip", clientIp); - map.put("device", payConfig.getDevice()); - map.put("money", money); - map.put("name", name); - map.put("notify_url", payConfig.getNotify_url()); - map.put("out_trade_no", out_trade_no); - map.put("pid", payConfig.getPid()); - map.put("return_url", payConfig.getReturn_url()); - map.put("sign_type", payConfig.getSign_type()); - map.put("type", payConfig.getType()); - map.put("sign", sign); - String body = HttpUtil.post(payConfig.getPayUrl(), map); - log.info("鏀粯杩斿洖淇℃伅锛歿},閰嶇疆淇℃伅: {}",body,payConfig); - JSONObject jsonObject = new JSONObject(body); - return (String) jsonObject.get("qrcode"); - } -} diff --git a/ruoyi-common/ruoyi-common-pay/src/main/java/com/xmzs/common/utils/MD5Util.java b/ruoyi-common/ruoyi-common-pay/src/main/java/com/xmzs/common/utils/MD5Util.java deleted file mode 100644 index 1327cca..0000000 --- a/ruoyi-common/ruoyi-common-pay/src/main/java/com/xmzs/common/utils/MD5Util.java +++ /dev/null @@ -1,107 +0,0 @@ -package com.xmzs.common.utils; - -import cn.hutool.core.util.StrUtil; - -import java.io.UnsupportedEncodingException; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.util.Map; -import java.util.TreeMap; - -/** - * MD5 绠楁硶 - * - * @author Admin - */ -public class MD5Util { - - /** - * 鍏ㄥ眬鏁扮粍 - */ - public final static String[] strDigits = { "0", "1", "2", "3", "4", "5", - "6", "7", "8", "9", "a", "b", "c", "d", "e", "f" }; - - public MD5Util() { - } - - /** - * 杩斿洖褰㈠紡涓烘暟瀛楄窡瀛楃涓� - * - * @Date 2023/7/3 - * @param bByte - * @return String - **/ - public static String byteToArrayString(byte bByte) { - int iRet = bByte; - if (iRet < 0) { - iRet += 256; - } - int iD1 = iRet / 16; - int iD2 = iRet % 16; - return strDigits[iD1] + strDigits[iD2]; - } - - /** - * 杞崲瀛楄妭鏁扮粍涓�16杩涘埗瀛椾覆 - * - * @Date 2023/7/3 - * @param bByte - * @return String - **/ - public static String byteToString(byte[] bByte) { - StringBuffer sBuffer = new StringBuffer(); - for (int i = 0; i < bByte.length; i++) { - sBuffer.append(byteToArrayString(bByte[i])); - } - return sBuffer.toString(); - } - - /** - * 鐢熸垚md5浠g爜 - * - * @Date 2023/7/3 - * @param strObj - * @return String - **/ - public static String GetMD5Code(String strObj) { - String resultString = null; - try { - resultString = new String(strObj); - MessageDigest md = MessageDigest.getInstance("MD5"); - resultString = byteToString(md.digest(strObj.getBytes())); - } catch (NoSuchAlgorithmException ex) { - ex.printStackTrace(); - } - return resultString; - } - - /** - * 缁勮绛惧悕鐨勫瓧娈� - * - * @param params 鍙傛暟 - * @param urlEncoder 鏄惁urlEncoder - * @return {String} - */ - public static String packageSign(Map<String, Object> params, boolean urlEncoder) { - // 鍏堝皢鍙傛暟浠ュ叾鍙傛暟鍚嶇殑瀛楀吀搴忓崌搴忚繘琛屾帓搴� - TreeMap<String, Object> sortedParams = new TreeMap<String, Object>(params); - // 閬嶅巻鎺掑簭鍚庣殑瀛楀吀锛屽皢鎵�鏈夊弬鏁版寜"key=value"鏍煎紡鎷兼帴鍦ㄤ竴璧� - StringBuilder sb = new StringBuilder(); - boolean first = true; - for (Map.Entry<String, Object> param : sortedParams.entrySet()) { - String value = String.valueOf(param.getValue()); - if (StrUtil.isBlank(value)) { - continue; - } - if (first) { - first = false; - } else { - sb.append("&"); - } - sb.append(param.getKey()).append("="); - sb.append(value); - } - return sb.toString(); - } - -} diff --git a/ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/xmzs/common/ratelimiter/annotation/RateLimiter.java b/ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/xmzs/common/ratelimiter/annotation/RateLimiter.java deleted file mode 100644 index 94e5969..0000000 --- a/ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/xmzs/common/ratelimiter/annotation/RateLimiter.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.xmzs.common.ratelimiter.annotation; - -import com.xmzs.common.ratelimiter.enums.LimitType; - -import java.lang.annotation.*; - -/** - * 闄愭祦娉ㄨВ - * - * @author Lion Li - */ -@Target(ElementType.METHOD) -@Retention(RetentionPolicy.RUNTIME) -@Documented -public @interface RateLimiter { - /** - * 闄愭祦key,鏀寔浣跨敤Spring el琛ㄨ揪寮忔潵鍔ㄦ�佽幏鍙栨柟娉曚笂鐨勫弬鏁板�� - * 鏍煎紡绫讳技浜� #code.id #{#code} - */ - String key() default ""; - - /** - * 闄愭祦鏃堕棿,鍗曚綅绉� - */ - int time() default 60; - - /** - * 闄愭祦娆℃暟 - */ - int count() default 100; - - /** - * 闄愭祦绫诲瀷 - */ - LimitType limitType() default LimitType.DEFAULT; - - /** - * 鎻愮ず娑堟伅 鏀寔鍥介檯鍖� 鏍煎紡涓� {code} - */ - String message() default "{rate.limiter.message}"; -} diff --git a/ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/xmzs/common/ratelimiter/aspectj/RateLimiterAspect.java b/ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/xmzs/common/ratelimiter/aspectj/RateLimiterAspect.java deleted file mode 100644 index ec9ac99..0000000 --- a/ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/xmzs/common/ratelimiter/aspectj/RateLimiterAspect.java +++ /dev/null @@ -1,127 +0,0 @@ -package com.xmzs.common.ratelimiter.aspectj; - -import cn.hutool.core.util.ArrayUtil; -import com.xmzs.common.core.constant.GlobalConstants; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.utils.MessageUtils; -import com.xmzs.common.core.utils.ServletUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.ratelimiter.annotation.RateLimiter; -import com.xmzs.common.ratelimiter.enums.LimitType; -import com.xmzs.common.redis.utils.RedisUtils; -import lombok.extern.slf4j.Slf4j; -import org.aspectj.lang.JoinPoint; -import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.annotation.Before; -import org.aspectj.lang.reflect.MethodSignature; -import org.redisson.api.RateType; -import org.springframework.core.DefaultParameterNameDiscoverer; -import org.springframework.core.ParameterNameDiscoverer; -import org.springframework.expression.EvaluationContext; -import org.springframework.expression.Expression; -import org.springframework.expression.ExpressionParser; -import org.springframework.expression.ParserContext; -import org.springframework.expression.common.TemplateParserContext; -import org.springframework.expression.spel.standard.SpelExpressionParser; -import org.springframework.expression.spel.support.StandardEvaluationContext; - -import java.lang.reflect.Method; - -/** - * 闄愭祦澶勭悊 - * - * @author Lion Li - */ -@Slf4j -@Aspect -public class RateLimiterAspect { - - /** - * 瀹氫箟spel琛ㄨ揪寮忚В鏋愬櫒 - */ - private final ExpressionParser parser = new SpelExpressionParser(); - /** - * 瀹氫箟spel瑙f瀽妯$増 - */ - private final ParserContext parserContext = new TemplateParserContext(); - /** - * 瀹氫箟spel涓婁笅鏂囧璞¤繘琛岃В鏋� - */ - private final EvaluationContext context = new StandardEvaluationContext(); - /** - * 鏂规硶鍙傛暟瑙f瀽鍣� - */ - private final ParameterNameDiscoverer pnd = new DefaultParameterNameDiscoverer(); - - @Before("@annotation(rateLimiter)") - public void doBefore(JoinPoint point, RateLimiter rateLimiter) throws Throwable { - int time = rateLimiter.time(); - int count = rateLimiter.count(); - String combineKey = getCombineKey(rateLimiter, point); - try { - RateType rateType = RateType.OVERALL; - if (rateLimiter.limitType() == LimitType.CLUSTER) { - rateType = RateType.PER_CLIENT; - } - long number = RedisUtils.rateLimiter(combineKey, rateType, count, time); - if (number == -1) { - String message = rateLimiter.message(); - if (StringUtils.startsWith(message, "{") && StringUtils.endsWith(message, "}")) { - message = MessageUtils.message(StringUtils.substring(message, 1, message.length() - 1)); - } - throw new ServiceException(message); - } - log.info("闄愬埗浠ょ墝 => {}, 鍓╀綑浠ょ墝 => {}, 缂撳瓨key => '{}'", count, number, combineKey); - } catch (Exception e) { - if (e instanceof ServiceException) { - throw e; - } else { - throw new RuntimeException("鏈嶅姟鍣ㄩ檺娴佸紓甯革紝璇风◢鍊欏啀璇�"); - } - } - } - - public String getCombineKey(RateLimiter rateLimiter, JoinPoint point) { - String key = rateLimiter.key(); - // 鑾峰彇鏂规硶(閫氳繃鏂规硶绛惧悕鏉ヨ幏鍙�) - MethodSignature signature = (MethodSignature) point.getSignature(); - Method method = signature.getMethod(); - Class<?> targetClass = method.getDeclaringClass(); - // 鍒ゆ柇鏄惁鏄痵pel鏍煎紡 - if (StringUtils.containsAny(key, "#")) { - // 鑾峰彇鍙傛暟鍊� - Object[] args = point.getArgs(); - // 鑾峰彇鏂规硶涓婂弬鏁扮殑鍚嶇О - String[] parameterNames = pnd.getParameterNames(method); - if (ArrayUtil.isEmpty(parameterNames)) { - throw new ServiceException("闄愭祦key瑙f瀽寮傚父!璇疯仈绯荤鐞嗗憳!"); - } - for (int i = 0; i < parameterNames.length; i++) { - context.setVariable(parameterNames[i], args[i]); - } - // 瑙f瀽杩斿洖缁檏ey - try { - Expression expression; - if (StringUtils.startsWith(key, parserContext.getExpressionPrefix()) - && StringUtils.endsWith(key, parserContext.getExpressionSuffix())) { - expression = parser.parseExpression(key, parserContext); - } else { - expression = parser.parseExpression(key); - } - key = expression.getValue(context, String.class) + ":"; - } catch (Exception e) { - throw new ServiceException("闄愭祦key瑙f瀽寮傚父!璇疯仈绯荤鐞嗗憳!"); - } - } - StringBuilder stringBuffer = new StringBuilder(GlobalConstants.RATE_LIMIT_KEY); - stringBuffer.append(ServletUtils.getRequest().getRequestURI()).append(":"); - if (rateLimiter.limitType() == LimitType.IP) { - // 鑾峰彇璇锋眰ip - stringBuffer.append(ServletUtils.getClientIP()).append(":"); - } else if (rateLimiter.limitType() == LimitType.CLUSTER) { - // 鑾峰彇瀹㈡埛绔疄渚媔d - stringBuffer.append(RedisUtils.getClient().getId()).append(":"); - } - return stringBuffer.append(key).toString(); - } -} diff --git a/ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/xmzs/common/ratelimiter/config/RateLimiterConfig.java b/ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/xmzs/common/ratelimiter/config/RateLimiterConfig.java deleted file mode 100644 index 32a3c90..0000000 --- a/ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/xmzs/common/ratelimiter/config/RateLimiterConfig.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.xmzs.common.ratelimiter.config; - -import com.xmzs.common.ratelimiter.aspectj.RateLimiterAspect; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.context.annotation.Bean; -import org.springframework.data.redis.connection.RedisConfiguration; - -/** - * @author guangxin - * @date 2023/1/18 - */ -@AutoConfiguration(after = RedisConfiguration.class) -public class RateLimiterConfig { - - @Bean - public RateLimiterAspect rateLimiterAspect() { - return new RateLimiterAspect(); - } - -} diff --git a/ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/xmzs/common/ratelimiter/enums/LimitType.java b/ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/xmzs/common/ratelimiter/enums/LimitType.java deleted file mode 100644 index df9c8e6..0000000 --- a/ruoyi-common/ruoyi-common-ratelimiter/src/main/java/com/xmzs/common/ratelimiter/enums/LimitType.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.xmzs.common.ratelimiter.enums; - -/** - * 闄愭祦绫诲瀷 - * - * @author ruoyi - */ - -public enum LimitType { - /** - * 榛樿绛栫暐鍏ㄥ眬闄愭祦 - */ - DEFAULT, - - /** - * 鏍规嵁璇锋眰鑰匢P杩涜闄愭祦 - */ - IP, - - /** - * 瀹炰緥闄愭祦(闆嗙兢澶氬悗绔疄渚�) - */ - CLUSTER -} diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/config/RedisConfig.java b/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/config/RedisConfig.java deleted file mode 100644 index cd57b82..0000000 --- a/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/config/RedisConfig.java +++ /dev/null @@ -1,130 +0,0 @@ -package com.xmzs.common.redis.config; - -import cn.hutool.core.util.ObjectUtil; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xmzs.common.redis.config.properties.RedissonProperties; -import com.xmzs.common.redis.handler.KeyPrefixHandler; -import com.xmzs.common.redis.manager.PlusSpringCacheManager; -import lombok.extern.slf4j.Slf4j; -import org.redisson.codec.JsonJacksonCodec; -import org.redisson.spring.starter.RedissonAutoConfigurationCustomizer; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.cache.CacheManager; -import org.springframework.cache.annotation.EnableCaching; -import org.springframework.context.annotation.Bean; - -/** - * redis閰嶇疆 - * - * @author Lion Li - */ -@Slf4j -@AutoConfiguration -@EnableCaching -@EnableConfigurationProperties(RedissonProperties.class) -public class RedisConfig { - - @Autowired - private RedissonProperties redissonProperties; - - @Autowired - private ObjectMapper objectMapper; - - @Bean - public RedissonAutoConfigurationCustomizer redissonCustomizer() { - return config -> { - config.setThreads(redissonProperties.getThreads()) - .setNettyThreads(redissonProperties.getNettyThreads()) - .setCodec(new JsonJacksonCodec(objectMapper)); - RedissonProperties.SingleServerConfig singleServerConfig = redissonProperties.getSingleServerConfig(); - if (ObjectUtil.isNotNull(singleServerConfig)) { - // 浣跨敤鍗曟満妯″紡 - config.useSingleServer() - //璁剧疆redis key鍓嶇紑 - .setNameMapper(new KeyPrefixHandler(redissonProperties.getKeyPrefix())) - .setTimeout(singleServerConfig.getTimeout()) - .setClientName(singleServerConfig.getClientName()) - .setIdleConnectionTimeout(singleServerConfig.getIdleConnectionTimeout()) - .setSubscriptionConnectionPoolSize(singleServerConfig.getSubscriptionConnectionPoolSize()) - .setConnectionMinimumIdleSize(singleServerConfig.getConnectionMinimumIdleSize()) - .setConnectionPoolSize(singleServerConfig.getConnectionPoolSize()); - } - // 闆嗙兢閰嶇疆鏂瑰紡 鍙傝�冧笅鏂规敞閲� - RedissonProperties.ClusterServersConfig clusterServersConfig = redissonProperties.getClusterServersConfig(); - if (ObjectUtil.isNotNull(clusterServersConfig)) { - config.useClusterServers() - //璁剧疆redis key鍓嶇紑 - .setNameMapper(new KeyPrefixHandler(redissonProperties.getKeyPrefix())) - .setTimeout(clusterServersConfig.getTimeout()) - .setClientName(clusterServersConfig.getClientName()) - .setIdleConnectionTimeout(clusterServersConfig.getIdleConnectionTimeout()) - .setSubscriptionConnectionPoolSize(clusterServersConfig.getSubscriptionConnectionPoolSize()) - .setMasterConnectionMinimumIdleSize(clusterServersConfig.getMasterConnectionMinimumIdleSize()) - .setMasterConnectionPoolSize(clusterServersConfig.getMasterConnectionPoolSize()) - .setSlaveConnectionMinimumIdleSize(clusterServersConfig.getSlaveConnectionMinimumIdleSize()) - .setSlaveConnectionPoolSize(clusterServersConfig.getSlaveConnectionPoolSize()) - .setReadMode(clusterServersConfig.getReadMode()) - .setSubscriptionMode(clusterServersConfig.getSubscriptionMode()); - } - log.info("鍒濆鍖� redis 閰嶇疆"); - }; - } - - /** - * 鑷畾涔夌紦瀛樼鐞嗗櫒 鏁村悎spring-cache - */ - @Bean - public CacheManager cacheManager() { - return new PlusSpringCacheManager(); - } - - /** - * redis闆嗙兢閰嶇疆 yml - * - * --- # redis 闆嗙兢閰嶇疆(鍗曟満涓庨泦缇ゅ彧鑳藉紑鍚竴涓彟涓�涓渶瑕佹敞閲婃帀) - * spring: - * redis: - * cluster: - * nodes: - * - 192.168.0.100:6379 - * - 192.168.0.101:6379 - * - 192.168.0.102:6379 - * # 瀵嗙爜 - * password: - * # 杩炴帴瓒呮椂鏃堕棿 - * timeout: 10s - * # 鏄惁寮�鍚痵sl - * ssl: false - * - * redisson: - * # 绾跨▼姹犳暟閲� - * threads: 16 - * # Netty绾跨▼姹犳暟閲� - * nettyThreads: 32 - * # 闆嗙兢閰嶇疆 - * clusterServersConfig: - * # 瀹㈡埛绔悕绉� - * clientName: ${ruoyi.name} - * # master鏈�灏忕┖闂茶繛鎺ユ暟 - * masterConnectionMinimumIdleSize: 32 - * # master杩炴帴姹犲ぇ灏� - * masterConnectionPoolSize: 64 - * # slave鏈�灏忕┖闂茶繛鎺ユ暟 - * slaveConnectionMinimumIdleSize: 32 - * # slave杩炴帴姹犲ぇ灏� - * slaveConnectionPoolSize: 64 - * # 杩炴帴绌洪棽瓒呮椂锛屽崟浣嶏細姣 - * idleConnectionTimeout: 10000 - * # 鍛戒护绛夊緟瓒呮椂锛屽崟浣嶏細姣 - * timeout: 3000 - * # 鍙戝竷鍜岃闃呰繛鎺ユ睜澶у皬 - * subscriptionConnectionPoolSize: 50 - * # 璇诲彇妯″紡 - * readMode: "SLAVE" - * # 璁㈤槄妯″紡 - * subscriptionMode: "MASTER" - */ - -} diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/config/properties/RedissonProperties.java b/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/config/properties/RedissonProperties.java deleted file mode 100644 index 18c5d21..0000000 --- a/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/config/properties/RedissonProperties.java +++ /dev/null @@ -1,135 +0,0 @@ -package com.xmzs.common.redis.config.properties; - -import lombok.Data; -import lombok.NoArgsConstructor; -import org.redisson.config.ReadMode; -import org.redisson.config.SubscriptionMode; -import org.springframework.boot.context.properties.ConfigurationProperties; - -/** - * Redisson 閰嶇疆灞炴�� - * - * @author Lion Li - */ -@Data -@ConfigurationProperties(prefix = "redisson") -public class RedissonProperties { - - /** - * redis缂撳瓨key鍓嶇紑 - */ - private String keyPrefix; - - /** - * 绾跨▼姹犳暟閲�,榛樿鍊� = 褰撳墠澶勭悊鏍告暟閲� * 2 - */ - private int threads; - - /** - * Netty绾跨▼姹犳暟閲�,榛樿鍊� = 褰撳墠澶勭悊鏍告暟閲� * 2 - */ - private int nettyThreads; - - /** - * 鍗曟満鏈嶅姟閰嶇疆 - */ - private SingleServerConfig singleServerConfig; - - /** - * 闆嗙兢鏈嶅姟閰嶇疆 - */ - private ClusterServersConfig clusterServersConfig; - - @Data - @NoArgsConstructor - public static class SingleServerConfig { - - /** - * 瀹㈡埛绔悕绉� - */ - private String clientName; - - /** - * 鏈�灏忕┖闂茶繛鎺ユ暟 - */ - private int connectionMinimumIdleSize; - - /** - * 杩炴帴姹犲ぇ灏� - */ - private int connectionPoolSize; - - /** - * 杩炴帴绌洪棽瓒呮椂锛屽崟浣嶏細姣 - */ - private int idleConnectionTimeout; - - /** - * 鍛戒护绛夊緟瓒呮椂锛屽崟浣嶏細姣 - */ - private int timeout; - - /** - * 鍙戝竷鍜岃闃呰繛鎺ユ睜澶у皬 - */ - private int subscriptionConnectionPoolSize; - - } - - @Data - @NoArgsConstructor - public static class ClusterServersConfig { - - /** - * 瀹㈡埛绔悕绉� - */ - private String clientName; - - /** - * master鏈�灏忕┖闂茶繛鎺ユ暟 - */ - private int masterConnectionMinimumIdleSize; - - /** - * master杩炴帴姹犲ぇ灏� - */ - private int masterConnectionPoolSize; - - /** - * slave鏈�灏忕┖闂茶繛鎺ユ暟 - */ - private int slaveConnectionMinimumIdleSize; - - /** - * slave杩炴帴姹犲ぇ灏� - */ - private int slaveConnectionPoolSize; - - /** - * 杩炴帴绌洪棽瓒呮椂锛屽崟浣嶏細姣 - */ - private int idleConnectionTimeout; - - /** - * 鍛戒护绛夊緟瓒呮椂锛屽崟浣嶏細姣 - */ - private int timeout; - - /** - * 鍙戝竷鍜岃闃呰繛鎺ユ睜澶у皬 - */ - private int subscriptionConnectionPoolSize; - - /** - * 璇诲彇妯″紡 - */ - private ReadMode readMode; - - /** - * 璁㈤槄妯″紡 - */ - private SubscriptionMode subscriptionMode; - - } - -} diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/handler/KeyPrefixHandler.java b/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/handler/KeyPrefixHandler.java deleted file mode 100644 index 2d06db4..0000000 --- a/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/handler/KeyPrefixHandler.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.xmzs.common.redis.handler; - -import com.xmzs.common.core.utils.StringUtils; -import org.redisson.api.NameMapper; - -/** - * redis缂撳瓨key鍓嶇紑澶勭悊 - * - * @author ye - * @date 2022/7/14 17:44 - * @since 4.3.0 - */ -public class KeyPrefixHandler implements NameMapper { - - private final String keyPrefix; - - public KeyPrefixHandler(String keyPrefix) { - //鍓嶇紑涓虹┖ 鍒欒繑鍥炵┖鍓嶇紑 - this.keyPrefix = StringUtils.isBlank(keyPrefix) ? "" : keyPrefix + ":"; - } - - /** - * 澧炲姞鍓嶇紑 - */ - @Override - public String map(String name) { - if (StringUtils.isBlank(name)) { - return null; - } - if (StringUtils.isNotBlank(keyPrefix) && !name.startsWith(keyPrefix)) { - return keyPrefix + name; - } - return name; - } - - /** - * 鍘婚櫎鍓嶇紑 - */ - @Override - public String unmap(String name) { - if (StringUtils.isBlank(name)) { - return null; - } - if (StringUtils.isNotBlank(keyPrefix) && name.startsWith(keyPrefix)) { - return name.substring(keyPrefix.length()); - } - return name; - } - -} diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/manager/PlusSpringCacheManager.java b/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/manager/PlusSpringCacheManager.java deleted file mode 100644 index ce618d9..0000000 --- a/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/manager/PlusSpringCacheManager.java +++ /dev/null @@ -1,191 +0,0 @@ -/** - * Copyright (c) 2013-2021 Nikita Koksharov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.xmzs.common.redis.manager; - -import com.xmzs.common.redis.utils.RedisUtils; -import org.redisson.api.RMap; -import org.redisson.api.RMapCache; -import org.redisson.spring.cache.CacheConfig; -import org.redisson.spring.cache.RedissonCache; -import org.springframework.boot.convert.DurationStyle; -import org.springframework.cache.Cache; -import org.springframework.cache.CacheManager; -import org.springframework.cache.transaction.TransactionAwareCacheDecorator; -import org.springframework.util.StringUtils; - -import java.util.Collection; -import java.util.Collections; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; - -/** - * A {@link org.springframework.cache.CacheManager} implementation - * backed by Redisson instance. - * <p> - * 淇敼 RedissonSpringCacheManager 婧愮爜 - * 閲嶅啓 cacheName 澶勭悊鏂规硶 鏀寔澶氬弬鏁� - * - * @author Nikita Koksharov - * - */ -@SuppressWarnings("unchecked") -public class PlusSpringCacheManager implements CacheManager { - - private boolean dynamic = true; - - private boolean allowNullValues = true; - - private boolean transactionAware = true; - - Map<String, CacheConfig> configMap = new ConcurrentHashMap<>(); - ConcurrentMap<String, Cache> instanceMap = new ConcurrentHashMap<>(); - - /** - * Creates CacheManager supplied by Redisson instance - */ - public PlusSpringCacheManager() { - } - - - /** - * Defines possibility of storing {@code null} values. - * <p> - * Default is <code>true</code> - * - * @param allowNullValues stores if <code>true</code> - */ - public void setAllowNullValues(boolean allowNullValues) { - this.allowNullValues = allowNullValues; - } - - /** - * Defines if cache aware of Spring-managed transactions. - * If {@code true} put/evict operations are executed only for successful transaction in after-commit phase. - * <p> - * Default is <code>false</code> - * - * @param transactionAware cache is transaction aware if <code>true</code> - */ - public void setTransactionAware(boolean transactionAware) { - this.transactionAware = transactionAware; - } - - /** - * Defines 'fixed' cache names. - * A new cache instance will not be created in dynamic for non-defined names. - * <p> - * `null` parameter setups dynamic mode - * - * @param names of caches - */ - public void setCacheNames(Collection<String> names) { - if (names != null) { - for (String name : names) { - getCache(name); - } - dynamic = false; - } else { - dynamic = true; - } - } - - /** - * Set cache config mapped by cache name - * - * @param config object - */ - public void setConfig(Map<String, ? extends CacheConfig> config) { - this.configMap = (Map<String, CacheConfig>) config; - } - - protected CacheConfig createDefaultConfig() { - return new CacheConfig(); - } - - @Override - public Cache getCache(String name) { - Cache cache = instanceMap.get(name); - if (cache != null) { - return cache; - } - if (!dynamic) { - return cache; - } - - CacheConfig config = configMap.get(name); - if (config == null) { - config = createDefaultConfig(); - configMap.put(name, config); - } - - // 閲嶅啓 cacheName 鏀寔澶氬弬鏁� - String[] array = StringUtils.delimitedListToStringArray(name, "#"); - name = array[0]; - if (array.length > 1) { - config.setTTL(DurationStyle.detectAndParse(array[1]).toMillis()); - } - if (array.length > 2) { - config.setMaxIdleTime(DurationStyle.detectAndParse(array[2]).toMillis()); - } - if (array.length > 3) { - config.setMaxSize(Integer.parseInt(array[3])); - } - - if (config.getMaxIdleTime() == 0 && config.getTTL() == 0 && config.getMaxSize() == 0) { - return createMap(name, config); - } - - return createMapCache(name, config); - } - - private Cache createMap(String name, CacheConfig config) { - RMap<Object, Object> map = RedisUtils.getClient().getMap(name); - - Cache cache = new RedissonCache(map, allowNullValues); - if (transactionAware) { - cache = new TransactionAwareCacheDecorator(cache); - } - Cache oldCache = instanceMap.putIfAbsent(name, cache); - if (oldCache != null) { - cache = oldCache; - } - return cache; - } - - private Cache createMapCache(String name, CacheConfig config) { - RMapCache<Object, Object> map = RedisUtils.getClient().getMapCache(name); - - Cache cache = new RedissonCache(map, config, allowNullValues); - if (transactionAware) { - cache = new TransactionAwareCacheDecorator(cache); - } - Cache oldCache = instanceMap.putIfAbsent(name, cache); - if (oldCache != null) { - cache = oldCache; - } else { - map.setMaxSize(config.getMaxSize()); - } - return cache; - } - - @Override - public Collection<String> getCacheNames() { - return Collections.unmodifiableSet(configMap.keySet()); - } - - -} diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/utils/CacheUtils.java b/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/utils/CacheUtils.java deleted file mode 100644 index 0358d3b..0000000 --- a/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/utils/CacheUtils.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.xmzs.common.redis.utils; - -import com.xmzs.common.core.utils.SpringUtils; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import org.redisson.api.RMap; -import org.springframework.cache.Cache; -import org.springframework.cache.CacheManager; - -import java.util.Set; - -/** - * 缂撳瓨鎿嶄綔宸ュ叿绫� {@link } - * - * @author Michelle.Chung - * @date 2022/8/13 - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -@SuppressWarnings(value = {"unchecked"}) -public class CacheUtils { - - private static final CacheManager CACHE_MANAGER = SpringUtils.getBean(CacheManager.class); - - /** - * 鑾峰彇缂撳瓨缁勫唴鎵�鏈夌殑KEY - * - * @param cacheNames 缂撳瓨缁勫悕绉� - */ - public static Set<Object> keys(String cacheNames) { - RMap<Object, Object> rmap = (RMap<Object, Object>) CACHE_MANAGER.getCache(cacheNames).getNativeCache(); - return rmap.keySet(); - } - - /** - * 鑾峰彇缂撳瓨鍊� - * - * @param cacheNames 缂撳瓨缁勫悕绉� - * @param key 缂撳瓨key - */ - public static <T> T get(String cacheNames, Object key) { - Cache.ValueWrapper wrapper = CACHE_MANAGER.getCache(cacheNames).get(key); - return wrapper != null ? (T) wrapper.get() : null; - } - - /** - * 淇濆瓨缂撳瓨鍊� - * - * @param cacheNames 缂撳瓨缁勫悕绉� - * @param key 缂撳瓨key - * @param value 缂撳瓨鍊� - */ - public static void put(String cacheNames, Object key, Object value) { - CACHE_MANAGER.getCache(cacheNames).put(key, value); - } - - /** - * 鍒犻櫎缂撳瓨鍊� - * - * @param cacheNames 缂撳瓨缁勫悕绉� - * @param key 缂撳瓨key - */ - public static void evict(String cacheNames, Object key) { - CACHE_MANAGER.getCache(cacheNames).evict(key); - } - - /** - * 娓呯┖缂撳瓨鍊� - * - * @param cacheNames 缂撳瓨缁勫悕绉� - */ - public static void clear(String cacheNames) { - CACHE_MANAGER.getCache(cacheNames).clear(); - } - -} diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/utils/QueueUtils.java b/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/utils/QueueUtils.java deleted file mode 100644 index 8f1c650..0000000 --- a/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/utils/QueueUtils.java +++ /dev/null @@ -1,180 +0,0 @@ -package com.xmzs.common.redis.utils; - -import com.xmzs.common.core.utils.SpringUtils; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import org.redisson.api.*; - -import java.util.concurrent.TimeUnit; -import java.util.function.Consumer; - -/** - * 鍒嗗竷寮忛槦鍒楀伐鍏� - * 杞婚噺绾ч槦鍒� 閲嶉噺绾ф暟鎹噺 璇蜂娇鐢� MQ - * 瑕佹眰 redis 5.X 浠ヤ笂 - * - * @author Lion Li - * @version 3.6.0 鏂板 - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class QueueUtils { - - private static final RedissonClient CLIENT = SpringUtils.getBean(RedissonClient.class); - - - /** - * 鑾峰彇瀹㈡埛绔疄渚� - */ - public static RedissonClient getClient() { - return CLIENT; - } - - /** - * 娣诲姞鏅�氶槦鍒楁暟鎹� - * - * @param queueName 闃熷垪鍚� - * @param data 鏁版嵁 - */ - public static <T> boolean addQueueObject(String queueName, T data) { - RBlockingQueue<T> queue = CLIENT.getBlockingQueue(queueName); - return queue.offer(data); - } - - /** - * 閫氱敤鑾峰彇涓�涓槦鍒楁暟鎹� 娌℃湁鏁版嵁杩斿洖 null(涓嶆敮鎸佸欢杩熼槦鍒�) - * - * @param queueName 闃熷垪鍚� - */ - public static <T> T getQueueObject(String queueName) { - RBlockingQueue<T> queue = CLIENT.getBlockingQueue(queueName); - return queue.poll(); - } - - /** - * 閫氱敤鍒犻櫎闃熷垪鏁版嵁(涓嶆敮鎸佸欢杩熼槦鍒�) - */ - public static <T> boolean removeQueueObject(String queueName, T data) { - RBlockingQueue<T> queue = CLIENT.getBlockingQueue(queueName); - return queue.remove(data); - } - - /** - * 閫氱敤閿�姣侀槦鍒� 鎵�鏈夐樆濉炵洃鍚� 鎶ラ敊(涓嶆敮鎸佸欢杩熼槦鍒�) - */ - public static <T> boolean destroyQueue(String queueName) { - RBlockingQueue<T> queue = CLIENT.getBlockingQueue(queueName); - return queue.delete(); - } - - /** - * 娣诲姞寤惰繜闃熷垪鏁版嵁 榛樿姣 - * - * @param queueName 闃熷垪鍚� - * @param data 鏁版嵁 - * @param time 寤惰繜鏃堕棿 - */ - public static <T> void addDelayedQueueObject(String queueName, T data, long time) { - addDelayedQueueObject(queueName, data, time, TimeUnit.MILLISECONDS); - } - - /** - * 娣诲姞寤惰繜闃熷垪鏁版嵁 - * - * @param queueName 闃熷垪鍚� - * @param data 鏁版嵁 - * @param time 寤惰繜鏃堕棿 - * @param timeUnit 鍗曚綅 - */ - public static <T> void addDelayedQueueObject(String queueName, T data, long time, TimeUnit timeUnit) { - RBlockingQueue<T> queue = CLIENT.getBlockingQueue(queueName); - RDelayedQueue<T> delayedQueue = CLIENT.getDelayedQueue(queue); - delayedQueue.offer(data, time, timeUnit); - } - - /** - * 鑾峰彇涓�涓欢杩熼槦鍒楁暟鎹� 娌℃湁鏁版嵁杩斿洖 null - * - * @param queueName 闃熷垪鍚� - */ - public static <T> T getDelayedQueueObject(String queueName) { - RBlockingQueue<T> queue = CLIENT.getBlockingQueue(queueName); - RDelayedQueue<T> delayedQueue = CLIENT.getDelayedQueue(queue); - return delayedQueue.poll(); - } - - /** - * 鍒犻櫎寤惰繜闃熷垪鏁版嵁 - */ - public static <T> boolean removeDelayedQueueObject(String queueName, T data) { - RBlockingQueue<T> queue = CLIENT.getBlockingQueue(queueName); - RDelayedQueue<T> delayedQueue = CLIENT.getDelayedQueue(queue); - return delayedQueue.remove(data); - } - - /** - * 閿�姣佸欢杩熼槦鍒� 鎵�鏈夐樆濉炵洃鍚� 鎶ラ敊 - */ - public static <T> void destroyDelayedQueue(String queueName) { - RBlockingQueue<T> queue = CLIENT.getBlockingQueue(queueName); - RDelayedQueue<T> delayedQueue = CLIENT.getDelayedQueue(queue); - delayedQueue.destroy(); - } - - /** - * 娣诲姞浼樺厛闃熷垪鏁版嵁 - * - * @param queueName 闃熷垪鍚� - * @param data 鏁版嵁 - */ - public static <T> boolean addPriorityQueueObject(String queueName, T data) { - RPriorityBlockingQueue<T> priorityBlockingQueue = CLIENT.getPriorityBlockingQueue(queueName); - return priorityBlockingQueue.offer(data); - } - - /** - * 灏濊瘯璁剧疆 鏈夌晫闃熷垪 瀹归噺 鐢ㄤ簬闄愬埗鏁伴噺 - * - * @param queueName 闃熷垪鍚� - * @param capacity 瀹归噺 - */ - public static <T> boolean trySetBoundedQueueCapacity(String queueName, int capacity) { - RBoundedBlockingQueue<T> boundedBlockingQueue = CLIENT.getBoundedBlockingQueue(queueName); - return boundedBlockingQueue.trySetCapacity(capacity); - } - - /** - * 灏濊瘯璁剧疆 鏈夌晫闃熷垪 瀹归噺 鐢ㄤ簬闄愬埗鏁伴噺 - * - * @param queueName 闃熷垪鍚� - * @param capacity 瀹归噺 - * @param destroy 宸插瓨鍦ㄦ槸鍚﹂攢姣� - */ - public static <T> boolean trySetBoundedQueueCapacity(String queueName, int capacity, boolean destroy) { - RBoundedBlockingQueue<T> boundedBlockingQueue = CLIENT.getBoundedBlockingQueue(queueName); - if (boundedBlockingQueue.isExists() && destroy) { - destroyQueue(queueName); - } - return boundedBlockingQueue.trySetCapacity(capacity); - } - - /** - * 娣诲姞鏈夌晫闃熷垪鏁版嵁 - * - * @param queueName 闃熷垪鍚� - * @param data 鏁版嵁 - * @return 娣诲姞鎴愬姛 true 宸茶揪鍒扮晫闄� false - */ - public static <T> boolean addBoundedQueueObject(String queueName, T data) { - RBoundedBlockingQueue<T> boundedBlockingQueue = CLIENT.getBoundedBlockingQueue(queueName); - return boundedBlockingQueue.offer(data); - } - - /** - * 璁㈤槄闃诲闃熷垪(鍙闃呮墍鏈夊疄鐜扮被 渚嬪: 寤惰繜 浼樺厛 鏈夌晫 绛�) - */ - public static <T> void subscribeBlockingQueue(String queueName, Consumer<T> consumer) { - RBlockingQueue<T> queue = CLIENT.getBlockingQueue(queueName); - queue.subscribeOnElements(consumer); - } - -} diff --git a/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/utils/RedisUtils.java b/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/utils/RedisUtils.java deleted file mode 100644 index c549d1e..0000000 --- a/ruoyi-common/ruoyi-common-redis/src/main/java/com/xmzs/common/redis/utils/RedisUtils.java +++ /dev/null @@ -1,462 +0,0 @@ -package com.xmzs.common.redis.utils; - -import com.xmzs.common.core.utils.SpringUtils; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import org.redisson.api.*; - -import java.time.Duration; -import java.util.Collection; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -/** - * redis 宸ュ叿绫� - * - * @author Lion Li - * @version 3.1.0 鏂板 - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -@SuppressWarnings(value = {"unchecked", "rawtypes"}) -public class RedisUtils { - - private static final RedissonClient CLIENT = SpringUtils.getBean(RedissonClient.class); - - /** - * 闄愭祦 - * - * @param key 闄愭祦key - * @param rateType 闄愭祦绫诲瀷 - * @param rate 閫熺巼 - * @param rateInterval 閫熺巼闂撮殧 - * @return -1 琛ㄧず澶辫触 - */ - public static long rateLimiter(String key, RateType rateType, int rate, int rateInterval) { - RRateLimiter rateLimiter = CLIENT.getRateLimiter(key); - rateLimiter.trySetRate(rateType, rate, rateInterval, RateIntervalUnit.SECONDS); - if (rateLimiter.tryAcquire()) { - return rateLimiter.availablePermits(); - } else { - return -1L; - } - } - - /** - * 鑾峰彇瀹㈡埛绔疄渚� - */ - public static RedissonClient getClient() { - return CLIENT; - } - - /** - * 鍙戝竷閫氶亾娑堟伅 - * - * @param channelKey 閫氶亾key - * @param msg 鍙戦�佹暟鎹� - * @param consumer 鑷畾涔夊鐞� - */ - public static <T> void publish(String channelKey, T msg, Consumer<T> consumer) { - RTopic topic = CLIENT.getTopic(channelKey); - topic.publish(msg); - consumer.accept(msg); - } - - public static <T> void publish(String channelKey, T msg) { - RTopic topic = CLIENT.getTopic(channelKey); - topic.publish(msg); - } - - /** - * 璁㈤槄閫氶亾鎺ユ敹娑堟伅 - * - * @param channelKey 閫氶亾key - * @param clazz 娑堟伅绫诲瀷 - * @param consumer 鑷畾涔夊鐞� - */ - public static <T> void subscribe(String channelKey, Class<T> clazz, Consumer<T> consumer) { - RTopic topic = CLIENT.getTopic(channelKey); - topic.addListener(clazz, (channel, msg) -> consumer.accept(msg)); - } - - /** - * 缂撳瓨鍩烘湰鐨勫璞★紝Integer銆丼tring銆佸疄浣撶被绛� - * - * @param key 缂撳瓨鐨勯敭鍊� - * @param value 缂撳瓨鐨勫�� - */ - public static <T> void setCacheObject(final String key, final T value) { - setCacheObject(key, value, false); - } - - /** - * 缂撳瓨鍩烘湰鐨勫璞★紝淇濈暀褰撳墠瀵硅薄 TTL 鏈夋晥鏈� - * - * @param key 缂撳瓨鐨勯敭鍊� - * @param value 缂撳瓨鐨勫�� - * @param isSaveTtl 鏄惁淇濈暀TTL鏈夋晥鏈�(渚嬪: set涔嬪墠ttl鍓╀綑90 set涔嬪悗杩樻槸涓�90) - * @since Redis 6.X 浠ヤ笂浣跨敤 setAndKeepTTL 鍏煎 5.X 鏂规 - */ - public static <T> void setCacheObject(final String key, final T value, final boolean isSaveTtl) { - RBucket<T> bucket = CLIENT.getBucket(key); - if (isSaveTtl) { - try { - bucket.setAndKeepTTL(value); - } catch (Exception e) { - long timeToLive = bucket.remainTimeToLive(); - setCacheObject(key, value, Duration.ofMillis(timeToLive)); - } - } else { - bucket.set(value); - } - } - - /** - * 缂撳瓨鍩烘湰鐨勫璞★紝Integer銆丼tring銆佸疄浣撶被绛� - * - * @param key 缂撳瓨鐨勯敭鍊� - * @param value 缂撳瓨鐨勫�� - * @param duration 鏃堕棿 - */ - public static <T> void setCacheObject(final String key, final T value, final Duration duration) { - RBatch batch = CLIENT.createBatch(); - RBucketAsync<T> bucket = batch.getBucket(key); - bucket.setAsync(value); - bucket.expireAsync(duration); - batch.execute(); - } - - /** - * 娉ㄥ唽瀵硅薄鐩戝惉鍣� - * <p> - * key 鐩戝惉鍣ㄩ渶寮�鍚� `notify-keyspace-events` 绛� redis 鐩稿叧閰嶇疆 - * - * @param key 缂撳瓨鐨勯敭鍊� - * @param listener 鐩戝惉鍣ㄩ厤缃� - */ - public static <T> void addObjectListener(final String key, final ObjectListener listener) { - RBucket<T> result = CLIENT.getBucket(key); - result.addListener(listener); - } - - /** - * 璁剧疆鏈夋晥鏃堕棿 - * - * @param key Redis閿� - * @param timeout 瓒呮椂鏃堕棿 - * @return true=璁剧疆鎴愬姛锛沠alse=璁剧疆澶辫触 - */ - public static boolean expire(final String key, final long timeout) { - return expire(key, Duration.ofSeconds(timeout)); - } - - /** - * 璁剧疆鏈夋晥鏃堕棿 - * - * @param key Redis閿� - * @param duration 瓒呮椂鏃堕棿 - * @return true=璁剧疆鎴愬姛锛沠alse=璁剧疆澶辫触 - */ - public static boolean expire(final String key, final Duration duration) { - RBucket rBucket = CLIENT.getBucket(key); - return rBucket.expire(duration); - } - - /** - * 鑾峰緱缂撳瓨鐨勫熀鏈璞°�� - * - * @param key 缂撳瓨閿�� - * @return 缂撳瓨閿�煎搴旂殑鏁版嵁 - */ - public static <T> T getCacheObject(final String key) { - RBucket<T> rBucket = CLIENT.getBucket(key); - return rBucket.get(); - } - - /** - * 鑾峰緱key鍓╀綑瀛樻椿鏃堕棿 - * - * @param key 缂撳瓨閿�� - * @return 鍓╀綑瀛樻椿鏃堕棿 - */ - public static <T> long getTimeToLive(final String key) { - RBucket<T> rBucket = CLIENT.getBucket(key); - return rBucket.remainTimeToLive(); - } - - /** - * 鍒犻櫎鍗曚釜瀵硅薄 - * - * @param key 缂撳瓨鐨勯敭鍊� - */ - public static boolean deleteObject(final String key) { - return CLIENT.getBucket(key).delete(); - } - - /** - * 鍒犻櫎闆嗗悎瀵硅薄 - * - * @param collection 澶氫釜瀵硅薄 - */ - public static void deleteObject(final Collection collection) { - RBatch batch = CLIENT.createBatch(); - collection.forEach(t -> { - batch.getBucket(t.toString()).deleteAsync(); - }); - batch.execute(); - } - - /** - * 妫�鏌ョ紦瀛樺璞℃槸鍚﹀瓨鍦� - * - * @param key 缂撳瓨鐨勯敭鍊� - */ - public static boolean isExistsObject(final String key) { - return CLIENT.getBucket(key).isExists(); - } - - /** - * 缂撳瓨List鏁版嵁 - * - * @param key 缂撳瓨鐨勯敭鍊� - * @param dataList 寰呯紦瀛樼殑List鏁版嵁 - * @return 缂撳瓨鐨勫璞� - */ - public static <T> boolean setCacheList(final String key, final List<T> dataList) { - RList<T> rList = CLIENT.getList(key); - return rList.addAll(dataList); - } - - /** - * 娉ㄥ唽List鐩戝惉鍣� - * <p> - * key 鐩戝惉鍣ㄩ渶寮�鍚� `notify-keyspace-events` 绛� redis 鐩稿叧閰嶇疆 - * - * @param key 缂撳瓨鐨勯敭鍊� - * @param listener 鐩戝惉鍣ㄩ厤缃� - */ - public static <T> void addListListener(final String key, final ObjectListener listener) { - RList<T> rList = CLIENT.getList(key); - rList.addListener(listener); - } - - /** - * 鑾峰緱缂撳瓨鐨刲ist瀵硅薄 - * - * @param key 缂撳瓨鐨勯敭鍊� - * @return 缂撳瓨閿�煎搴旂殑鏁版嵁 - */ - public static <T> List<T> getCacheList(final String key) { - RList<T> rList = CLIENT.getList(key); - return rList.readAll(); - } - - /** - * 缂撳瓨Set - * - * @param key 缂撳瓨閿�� - * @param dataSet 缂撳瓨鐨勬暟鎹� - * @return 缂撳瓨鏁版嵁鐨勫璞� - */ - public static <T> boolean setCacheSet(final String key, final Set<T> dataSet) { - RSet<T> rSet = CLIENT.getSet(key); - return rSet.addAll(dataSet); - } - - /** - * 娉ㄥ唽Set鐩戝惉鍣� - * <p> - * key 鐩戝惉鍣ㄩ渶寮�鍚� `notify-keyspace-events` 绛� redis 鐩稿叧閰嶇疆 - * - * @param key 缂撳瓨鐨勯敭鍊� - * @param listener 鐩戝惉鍣ㄩ厤缃� - */ - public static <T> void addSetListener(final String key, final ObjectListener listener) { - RSet<T> rSet = CLIENT.getSet(key); - rSet.addListener(listener); - } - - /** - * 鑾峰緱缂撳瓨鐨剆et - * - * @param key 缂撳瓨鐨刱ey - * @return set瀵硅薄 - */ - public static <T> Set<T> getCacheSet(final String key) { - RSet<T> rSet = CLIENT.getSet(key); - return rSet.readAll(); - } - - /** - * 缂撳瓨Map - * - * @param key 缂撳瓨鐨勯敭鍊� - * @param dataMap 缂撳瓨鐨勬暟鎹� - */ - public static <T> void setCacheMap(final String key, final Map<String, T> dataMap) { - if (dataMap != null) { - RMap<String, T> rMap = CLIENT.getMap(key); - rMap.putAll(dataMap); - } - } - - /** - * 娉ㄥ唽Map鐩戝惉鍣� - * <p> - * key 鐩戝惉鍣ㄩ渶寮�鍚� `notify-keyspace-events` 绛� redis 鐩稿叧閰嶇疆 - * - * @param key 缂撳瓨鐨勯敭鍊� - * @param listener 鐩戝惉鍣ㄩ厤缃� - */ - public static <T> void addMapListener(final String key, final ObjectListener listener) { - RMap<String, T> rMap = CLIENT.getMap(key); - rMap.addListener(listener); - } - - /** - * 鑾峰緱缂撳瓨鐨凪ap - * - * @param key 缂撳瓨鐨勯敭鍊� - * @return map瀵硅薄 - */ - public static <T> Map<String, T> getCacheMap(final String key) { - RMap<String, T> rMap = CLIENT.getMap(key); - return rMap.getAll(rMap.keySet()); - } - - /** - * 鑾峰緱缂撳瓨Map鐨刱ey鍒楄〃 - * - * @param key 缂撳瓨鐨勯敭鍊� - * @return key鍒楄〃 - */ - public static <T> Set<String> getCacheMapKeySet(final String key) { - RMap<String, T> rMap = CLIENT.getMap(key); - return rMap.keySet(); - } - - /** - * 寰�Hash涓瓨鍏ユ暟鎹� - * - * @param key Redis閿� - * @param hKey Hash閿� - * @param value 鍊� - */ - public static <T> void setCacheMapValue(final String key, final String hKey, final T value) { - RMap<String, T> rMap = CLIENT.getMap(key); - rMap.put(hKey, value); - } - - /** - * 鑾峰彇Hash涓殑鏁版嵁 - * - * @param key Redis閿� - * @param hKey Hash閿� - * @return Hash涓殑瀵硅薄 - */ - public static <T> T getCacheMapValue(final String key, final String hKey) { - RMap<String, T> rMap = CLIENT.getMap(key); - return rMap.get(hKey); - } - - /** - * 鍒犻櫎Hash涓殑鏁版嵁 - * - * @param key Redis閿� - * @param hKey Hash閿� - * @return Hash涓殑瀵硅薄 - */ - public static <T> T delCacheMapValue(final String key, final String hKey) { - RMap<String, T> rMap = CLIENT.getMap(key); - return rMap.remove(hKey); - } - - /** - * 鑾峰彇澶氫釜Hash涓殑鏁版嵁 - * - * @param key Redis閿� - * @param hKeys Hash閿泦鍚� - * @return Hash瀵硅薄闆嗗悎 - */ - public static <K, V> Map<K, V> getMultiCacheMapValue(final String key, final Set<K> hKeys) { - RMap<K, V> rMap = CLIENT.getMap(key); - return rMap.getAll(hKeys); - } - - /** - * 璁剧疆鍘熷瓙鍊� - * - * @param key Redis閿� - * @param value 鍊� - */ - public static void setAtomicValue(String key, long value) { - RAtomicLong atomic = CLIENT.getAtomicLong(key); - atomic.set(value); - } - - /** - * 鑾峰彇鍘熷瓙鍊� - * - * @param key Redis閿� - * @return 褰撳墠鍊� - */ - public static long getAtomicValue(String key) { - RAtomicLong atomic = CLIENT.getAtomicLong(key); - return atomic.get(); - } - - /** - * 閫掑鍘熷瓙鍊� - * - * @param key Redis閿� - * @return 褰撳墠鍊� - */ - public static long incrAtomicValue(String key) { - RAtomicLong atomic = CLIENT.getAtomicLong(key); - return atomic.incrementAndGet(); - } - - /** - * 閫掑噺鍘熷瓙鍊� - * - * @param key Redis閿� - * @return 褰撳墠鍊� - */ - public static long decrAtomicValue(String key) { - RAtomicLong atomic = CLIENT.getAtomicLong(key); - return atomic.decrementAndGet(); - } - - /** - * 鑾峰緱缂撳瓨鐨勫熀鏈璞″垪琛� - * - * @param pattern 瀛楃涓插墠缂� - * @return 瀵硅薄鍒楄〃 - */ - public static Collection<String> keys(final String pattern) { - Stream<String> stream = CLIENT.getKeys().getKeysStreamByPattern(pattern); - return stream.collect(Collectors.toList()); - } - - /** - * 鍒犻櫎缂撳瓨鐨勫熀鏈璞″垪琛� - * - * @param pattern 瀛楃涓插墠缂� - */ - public static void deleteKeys(final String pattern) { - CLIENT.getKeys().deleteByPattern(pattern); - } - - /** - * 妫�鏌edis涓槸鍚﹀瓨鍦╧ey - * - * @param key 閿� - */ - public static Boolean hasKey(String key) { - RKeys rKeys = CLIENT.getKeys(); - return rKeys.countExists(key) > 0; - } -} diff --git a/ruoyi-common/ruoyi-common-satoken/src/main/java/com/xmzs/common/satoken/config/SaTokenConfig.java b/ruoyi-common/ruoyi-common-satoken/src/main/java/com/xmzs/common/satoken/config/SaTokenConfig.java deleted file mode 100644 index c947ab6..0000000 --- a/ruoyi-common/ruoyi-common-satoken/src/main/java/com/xmzs/common/satoken/config/SaTokenConfig.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.xmzs.common.satoken.config; - -import cn.dev33.satoken.dao.SaTokenDao; -import cn.dev33.satoken.jwt.StpLogicJwtForSimple; -import cn.dev33.satoken.stp.StpInterface; -import cn.dev33.satoken.stp.StpLogic; -import com.xmzs.common.satoken.core.dao.PlusSaTokenDao; -import com.xmzs.common.satoken.core.service.SaPermissionImpl; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.context.annotation.Bean; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; - -/** - * sa-token 閰嶇疆 - * - * @author Lion Li - */ -@AutoConfiguration -public class SaTokenConfig implements WebMvcConfigurer { - - @Bean - public StpLogic getStpLogicJwt() { - // Sa-Token 鏁村悎 jwt (绠�鍗曟ā寮�) - return new StpLogicJwtForSimple(); - } - - /** - * 鏉冮檺鎺ュ彛瀹炵幇(浣跨敤bean娉ㄥ叆鏂逛究鐢ㄦ埛鏇挎崲) - */ - @Bean - public StpInterface stpInterface() { - return new SaPermissionImpl(); - } - - /** - * 鑷畾涔塪ao灞傚瓨鍌� - */ - @Bean - public SaTokenDao saTokenDao() { - return new PlusSaTokenDao(); - } - -} diff --git a/ruoyi-common/ruoyi-common-satoken/src/main/java/com/xmzs/common/satoken/core/dao/PlusSaTokenDao.java b/ruoyi-common/ruoyi-common-satoken/src/main/java/com/xmzs/common/satoken/core/dao/PlusSaTokenDao.java deleted file mode 100644 index 6defa1a..0000000 --- a/ruoyi-common/ruoyi-common-satoken/src/main/java/com/xmzs/common/satoken/core/dao/PlusSaTokenDao.java +++ /dev/null @@ -1,176 +0,0 @@ -package com.xmzs.common.satoken.core.dao; - -import cn.dev33.satoken.dao.SaTokenDao; -import cn.dev33.satoken.util.SaFoxUtil; -import com.xmzs.common.redis.utils.RedisUtils; - -import java.time.Duration; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -/** - * Sa-Token鎸佷箙灞傛帴鍙�(浣跨敤妗嗘灦鑷甫RedisUtils瀹炵幇 鍗忚缁熶竴) - * - * @author Lion Li - */ -public class PlusSaTokenDao implements SaTokenDao { - - /** - * 鑾峰彇Value锛屽鏃犺繑绌� - */ - @Override - public String get(String key) { - return RedisUtils.getCacheObject(key); - } - - /** - * 鍐欏叆Value锛屽苟璁惧畾瀛樻椿鏃堕棿 (鍗曚綅: 绉�) - */ - @Override - public void set(String key, String value, long timeout) { - if (timeout == 0 || timeout <= NOT_VALUE_EXPIRE) { - return; - } - // 鍒ゆ柇鏄惁涓烘案涓嶈繃鏈� - if (timeout == NEVER_EXPIRE) { - RedisUtils.setCacheObject(key, value); - } else { - RedisUtils.setCacheObject(key, value, Duration.ofSeconds(timeout)); - } - } - - /** - * 淇慨鏀规寚瀹歬ey-value閿�煎 (杩囨湡鏃堕棿涓嶅彉) - */ - @Override - public void update(String key, String value) { - long expire = getTimeout(key); - // -2 = 鏃犳閿� - if (expire == NOT_VALUE_EXPIRE) { - return; - } - this.set(key, value, expire); - } - - /** - * 鍒犻櫎Value - */ - @Override - public void delete(String key) { - RedisUtils.deleteObject(key); - } - - /** - * 鑾峰彇Value鐨勫墿浣欏瓨娲绘椂闂� (鍗曚綅: 绉�) - */ - @Override - public long getTimeout(String key) { - long timeout = RedisUtils.getTimeToLive(key); - return timeout < 0 ? timeout : timeout / 1000; - } - - /** - * 淇敼Value鐨勫墿浣欏瓨娲绘椂闂� (鍗曚綅: 绉�) - */ - @Override - public void updateTimeout(String key, long timeout) { - // 鍒ゆ柇鏄惁鎯宠璁剧疆涓烘案涔� - if (timeout == NEVER_EXPIRE) { - long expire = getTimeout(key); - if (expire == NEVER_EXPIRE) { - // 濡傛灉鍏跺凡缁忚璁剧疆涓烘案涔咃紝鍒欎笉浣滀换浣曞鐞� - } else { - // 濡傛灉灏氭湭琚缃负姘镐箙锛岄偅涔堝啀娆et涓�娆� - this.set(key, this.get(key), timeout); - } - return; - } - RedisUtils.expire(key, Duration.ofSeconds(timeout)); - } - - - /** - * 鑾峰彇Object锛屽鏃犺繑绌� - */ - @Override - public Object getObject(String key) { - return RedisUtils.getCacheObject(key); - } - - /** - * 鍐欏叆Object锛屽苟璁惧畾瀛樻椿鏃堕棿 (鍗曚綅: 绉�) - */ - @Override - public void setObject(String key, Object object, long timeout) { - if (timeout == 0 || timeout <= NOT_VALUE_EXPIRE) { - return; - } - // 鍒ゆ柇鏄惁涓烘案涓嶈繃鏈� - if (timeout == NEVER_EXPIRE) { - RedisUtils.setCacheObject(key, object); - } else { - RedisUtils.setCacheObject(key, object, Duration.ofSeconds(timeout)); - } - } - - /** - * 鏇存柊Object (杩囨湡鏃堕棿涓嶅彉) - */ - @Override - public void updateObject(String key, Object object) { - long expire = getObjectTimeout(key); - // -2 = 鏃犳閿� - if (expire == NOT_VALUE_EXPIRE) { - return; - } - this.setObject(key, object, expire); - } - - /** - * 鍒犻櫎Object - */ - @Override - public void deleteObject(String key) { - RedisUtils.deleteObject(key); - } - - /** - * 鑾峰彇Object鐨勫墿浣欏瓨娲绘椂闂� (鍗曚綅: 绉�) - */ - @Override - public long getObjectTimeout(String key) { - long timeout = RedisUtils.getTimeToLive(key); - return timeout < 0 ? timeout : timeout / 1000; - } - - /** - * 淇敼Object鐨勫墿浣欏瓨娲绘椂闂� (鍗曚綅: 绉�) - */ - @Override - public void updateObjectTimeout(String key, long timeout) { - // 鍒ゆ柇鏄惁鎯宠璁剧疆涓烘案涔� - if (timeout == NEVER_EXPIRE) { - long expire = getObjectTimeout(key); - if (expire == NEVER_EXPIRE) { - // 濡傛灉鍏跺凡缁忚璁剧疆涓烘案涔咃紝鍒欎笉浣滀换浣曞鐞� - } else { - // 濡傛灉灏氭湭琚缃负姘镐箙锛岄偅涔堝啀娆et涓�娆� - this.setObject(key, this.getObject(key), timeout); - } - return; - } - RedisUtils.expire(key, Duration.ofSeconds(timeout)); - } - - - /** - * 鎼滅储鏁版嵁 - */ - @Override - public List<String> searchData(String prefix, String keyword, int start, int size, boolean sortType) { - Collection<String> keys = RedisUtils.keys(prefix + "*" + keyword + "*"); - List<String> list = new ArrayList<>(keys); - return SaFoxUtil.searchList(list, start, size, sortType); - } -} diff --git a/ruoyi-common/ruoyi-common-satoken/src/main/java/com/xmzs/common/satoken/core/service/SaPermissionImpl.java b/ruoyi-common/ruoyi-common-satoken/src/main/java/com/xmzs/common/satoken/core/service/SaPermissionImpl.java deleted file mode 100644 index a677048..0000000 --- a/ruoyi-common/ruoyi-common-satoken/src/main/java/com/xmzs/common/satoken/core/service/SaPermissionImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.xmzs.common.satoken.core.service; - -import cn.dev33.satoken.stp.StpInterface; -import com.xmzs.common.core.domain.model.LoginUser; -import com.xmzs.common.core.enums.UserType; -import com.xmzs.common.satoken.utils.LoginHelper; - -import java.util.ArrayList; -import java.util.List; - -/** - * sa-token 鏉冮檺绠$悊瀹炵幇绫� - * - * @author Lion Li - */ -public class SaPermissionImpl implements StpInterface { - - /** - * 鑾峰彇鑿滃崟鏉冮檺鍒楄〃 - */ - @Override - public List<String> getPermissionList(Object loginId, String loginType) { - LoginUser loginUser = LoginHelper.getLoginUser(); - UserType userType = UserType.getUserType(loginUser.getUserType()); - if (userType == UserType.SYS_USER) { - return new ArrayList<>(loginUser.getMenuPermission()); - } else if (userType == UserType.APP_USER) { - // 鍏朵粬绔� 鑷鏍规嵁涓氬姟缂栧啓 - } - return new ArrayList<>(); - } - - /** - * 鑾峰彇瑙掕壊鏉冮檺鍒楄〃 - */ - @Override - public List<String> getRoleList(Object loginId, String loginType) { - LoginUser loginUser = LoginHelper.getLoginUser(); - UserType userType = UserType.getUserType(loginUser.getUserType()); - if (userType == UserType.SYS_USER) { - return new ArrayList<>(loginUser.getRolePermission()); - } else if (userType == UserType.APP_USER) { - // 鍏朵粬绔� 鑷鏍规嵁涓氬姟缂栧啓 - } - return new ArrayList<>(); - } -} diff --git a/ruoyi-common/ruoyi-common-satoken/src/main/java/com/xmzs/common/satoken/listener/UserActionListener.java b/ruoyi-common/ruoyi-common-satoken/src/main/java/com/xmzs/common/satoken/listener/UserActionListener.java deleted file mode 100644 index 3ab2097..0000000 --- a/ruoyi-common/ruoyi-common-satoken/src/main/java/com/xmzs/common/satoken/listener/UserActionListener.java +++ /dev/null @@ -1,139 +0,0 @@ -package com.xmzs.common.satoken.listener; - -import cn.dev33.satoken.config.SaTokenConfig; -import cn.dev33.satoken.listener.SaTokenListener; -import cn.dev33.satoken.stp.SaLoginModel; -import cn.hutool.http.useragent.UserAgent; -import cn.hutool.http.useragent.UserAgentUtil; -import com.xmzs.common.core.constant.CacheConstants; -import com.xmzs.common.core.domain.dto.UserOnlineDTO; -import com.xmzs.common.core.domain.model.LoginUser; -import com.xmzs.common.core.enums.UserType; -import com.xmzs.common.redis.utils.RedisUtils; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.common.core.utils.ip.AddressUtils; -import com.xmzs.common.core.utils.ServletUtils; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -import java.time.Duration; - -/** - * 鐢ㄦ埛琛屼负 渚﹀惉鍣ㄧ殑瀹炵幇 - * - * @author Lion Li - */ -@RequiredArgsConstructor -@Component -@Slf4j -public class UserActionListener implements SaTokenListener { - - private final SaTokenConfig tokenConfig; - - /** - * 姣忔鐧诲綍鏃惰Е鍙� - */ - @Override - public void doLogin(String loginType, Object loginId, String tokenValue, SaLoginModel loginModel) { - UserType userType = UserType.getUserType(loginId.toString()); - if (userType == UserType.SYS_USER) { - UserAgent userAgent = UserAgentUtil.parse(ServletUtils.getRequest().getHeader("User-Agent")); - String ip = ServletUtils.getClientIP(); - LoginUser user = LoginHelper.getLoginUser(); - UserOnlineDTO dto = new UserOnlineDTO(); - dto.setIpaddr(ip); - // dto.setLoginLocation(AddressUtils.getRealAddressByIP(ip)); - dto.setBrowser(userAgent.getBrowser().getName()); - dto.setOs(userAgent.getOs().getName()); - dto.setLoginTime(System.currentTimeMillis()); - dto.setTokenId(tokenValue); - dto.setUserName(user.getUsername()); - dto.setDeptName(user.getDeptName()); - if(tokenConfig.getTimeout() == -1) { - RedisUtils.setCacheObject(CacheConstants.ONLINE_TOKEN_KEY + tokenValue, dto); - } else { - RedisUtils.setCacheObject(CacheConstants.ONLINE_TOKEN_KEY + tokenValue, dto, Duration.ofSeconds(tokenConfig.getTimeout())); - } - log.info("user doLogin, userId:{}, token:{}", loginId, tokenValue); - } else if (userType == UserType.APP_USER) { - // app绔� 鑷鏍规嵁涓氬姟缂栧啓 - } - } - - /** - * 姣忔娉ㄩ攢鏃惰Е鍙� - */ - @Override - public void doLogout(String loginType, Object loginId, String tokenValue) { - RedisUtils.deleteObject(CacheConstants.ONLINE_TOKEN_KEY + tokenValue); - log.info("user doLogout, userId:{}, token:{}", loginId, tokenValue); - } - - /** - * 姣忔琚涪涓嬬嚎鏃惰Е鍙� - */ - @Override - public void doKickout(String loginType, Object loginId, String tokenValue) { - RedisUtils.deleteObject(CacheConstants.ONLINE_TOKEN_KEY + tokenValue); - log.info("user doKickout, userId:{}, token:{}", loginId, tokenValue); - } - - /** - * 姣忔琚《涓嬬嚎鏃惰Е鍙� - */ - @Override - public void doReplaced(String loginType, Object loginId, String tokenValue) { - RedisUtils.deleteObject(CacheConstants.ONLINE_TOKEN_KEY + tokenValue); - log.info("user doReplaced, userId:{}, token:{}", loginId, tokenValue); - } - - /** - * 姣忔琚皝绂佹椂瑙﹀彂 - */ - @Override - public void doDisable(String loginType, Object loginId, String service, int level, long disableTime) { - } - - /** - * 姣忔琚В灏佹椂瑙﹀彂 - */ - @Override - public void doUntieDisable(String loginType, Object loginId, String service) { - } - - /** - * 姣忔鎵撳紑浜岀骇璁よ瘉鏃惰Е鍙� - */ - @Override - public void doOpenSafe(String loginType, String tokenValue, String service, long safeTime) { - } - - /** - * 姣忔鍒涘缓Session鏃惰Е鍙� - */ - @Override - public void doCloseSafe(String loginType, String tokenValue, String service) { - } - - /** - * 姣忔鍒涘缓Session鏃惰Е鍙� - */ - @Override - public void doCreateSession(String id) { - } - - /** - * 姣忔娉ㄩ攢Session鏃惰Е鍙� - */ - @Override - public void doLogoutSession(String id) { - } - - /** - * 姣忔Token缁湡鏃惰Е鍙� - */ - @Override - public void doRenewTimeout(String tokenValue, Object loginId, long timeout) { - } -} diff --git a/ruoyi-common/ruoyi-common-satoken/src/main/java/com/xmzs/common/satoken/utils/LoginHelper.java b/ruoyi-common/ruoyi-common-satoken/src/main/java/com/xmzs/common/satoken/utils/LoginHelper.java deleted file mode 100644 index af170c9..0000000 --- a/ruoyi-common/ruoyi-common-satoken/src/main/java/com/xmzs/common/satoken/utils/LoginHelper.java +++ /dev/null @@ -1,172 +0,0 @@ -package com.xmzs.common.satoken.utils; - -import cn.dev33.satoken.context.SaHolder; -import cn.dev33.satoken.context.model.SaStorage; -import cn.dev33.satoken.stp.SaLoginModel; -import cn.dev33.satoken.stp.StpUtil; -import cn.hutool.core.convert.Convert; -import cn.hutool.core.util.ObjectUtil; -import com.xmzs.common.core.constant.TenantConstants; -import com.xmzs.common.core.constant.UserConstants; -import com.xmzs.common.core.domain.model.LoginUser; -import com.xmzs.common.core.enums.DeviceType; -import com.xmzs.common.core.enums.UserType; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; - -import java.util.Set; - -/** - * 鐧诲綍閴存潈鍔╂墜 - * <p> - * user_type 涓� 鐢ㄦ埛绫诲瀷 鍚屼竴涓敤鎴疯〃 鍙互鏈夊绉嶇敤鎴风被鍨� 渚嬪 pc,app - * deivce 涓� 璁惧绫诲瀷 鍚屼竴涓敤鎴风被鍨� 鍙互鏈� 澶氱璁惧绫诲瀷 渚嬪 web,ios - * 鍙互缁勬垚 鐢ㄦ埛绫诲瀷涓庤澶囩被鍨嬪瀵瑰鐨� 鏉冮檺鐏垫椿鎺у埗 - * <p> - * 澶氱敤鎴蜂綋绯� 閽堝 澶氱鐢ㄦ埛绫诲瀷 浣嗘潈闄愭帶鍒朵笉涓�鑷� - * 鍙互缁勬垚 澶氱敤鎴风被鍨嬭〃涓庡璁惧绫诲瀷 鍒嗗埆鎺у埗鏉冮檺 - * - * @author Lion Li - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class LoginHelper { - - public static final String LOGIN_USER_KEY = "loginUser"; - public static final String TENANT_KEY = "tenantId"; - public static final String USER_KEY = "userId"; - - /** - * 鐧诲綍绯荤粺 - * - * @param loginUser 鐧诲綍鐢ㄦ埛淇℃伅 - */ - public static void login(LoginUser loginUser) { - loginByDevice(loginUser, null); - } - - /** - * 鐧诲綍绯荤粺 鍩轰簬 璁惧绫诲瀷 - * 閽堝鐩稿悓鐢ㄦ埛浣撶郴涓嶅悓璁惧 - * - * @param loginUser 鐧诲綍鐢ㄦ埛淇℃伅 - */ - public static void loginByDevice(LoginUser loginUser, DeviceType deviceType) { - SaStorage storage = SaHolder.getStorage(); - storage.set(LOGIN_USER_KEY, loginUser); - storage.set(TENANT_KEY, loginUser.getTenantId()); - storage.set(USER_KEY, loginUser.getUserId()); - SaLoginModel model = new SaLoginModel(); - if (ObjectUtil.isNotNull(deviceType)) { - model.setDevice(deviceType.getDevice()); - } - StpUtil.login(loginUser.getLoginId(), - model.setExtra(TENANT_KEY, loginUser.getTenantId()) - .setExtra(USER_KEY, loginUser.getUserId())); - StpUtil.getTokenSession().set(LOGIN_USER_KEY, loginUser); - } - - /** - * 鑾峰彇鐢ㄦ埛(澶氱骇缂撳瓨) - */ - public static LoginUser getLoginUser() { - LoginUser loginUser = (LoginUser) SaHolder.getStorage().get(LOGIN_USER_KEY); - if (loginUser != null) { - return loginUser; - } - loginUser = (LoginUser) StpUtil.getTokenSession().get(LOGIN_USER_KEY); - SaHolder.getStorage().set(LOGIN_USER_KEY, loginUser); - return loginUser; - } - - /** - * 鑾峰彇鐢ㄦ埛鍩轰簬token - */ - public static LoginUser getLoginUser(String token) { - return (LoginUser) StpUtil.getTokenSessionByToken(token).get(LOGIN_USER_KEY); - } - - /** - * 鑾峰彇鐢ㄦ埛id - */ - public static Long getUserId() { - Long userId; - try { - userId = Convert.toLong(SaHolder.getStorage().get(USER_KEY)); - if (ObjectUtil.isNull(userId)) { - userId = Convert.toLong(StpUtil.getExtra(USER_KEY)); - SaHolder.getStorage().set(USER_KEY, userId); - } - } catch (Exception e) { - return null; - } - return userId; - } - - /** - * 鑾峰彇绉熸埛ID - */ - public static String getTenantId() { - String tenantId; - try { - tenantId = (String) SaHolder.getStorage().get(TENANT_KEY); - if (ObjectUtil.isNull(tenantId)) { - tenantId = (String) StpUtil.getExtra(TENANT_KEY); - SaHolder.getStorage().set(TENANT_KEY, tenantId); - } - } catch (Exception e) { - return null; - } - return tenantId; - } - - /** - * 鑾峰彇閮ㄩ棬ID - */ - public static Long getDeptId() { - return getLoginUser().getDeptId(); - } - - /** - * 鑾峰彇鐢ㄦ埛璐︽埛 - */ - public static String getUsername() { - return getLoginUser().getUsername(); - } - - /** - * 鑾峰彇鐢ㄦ埛绫诲瀷 - */ - public static UserType getUserType() { - String loginId = StpUtil.getLoginIdAsString(); - return UserType.getUserType(loginId); - } - - /** - * 鏄惁涓鸿秴绾х鐞嗗憳 - * - * @param userId 鐢ㄦ埛ID - * @return 缁撴灉 - */ - public static boolean isSuperAdmin(Long userId) { - return UserConstants.SUPER_ADMIN_ID.equals(userId); - } - - public static boolean isSuperAdmin() { - return isSuperAdmin(getUserId()); - } - - /** - * 鏄惁涓鸿秴绾х鐞嗗憳 - * - * @param rolePermission 瑙掕壊鏉冮檺鏍囪瘑缁� - * @return 缁撴灉 - */ - public static boolean isTenantAdmin(Set<String> rolePermission) { - return rolePermission.contains(TenantConstants.TENANT_ADMIN_ROLE_KEY); - } - - public static boolean isTenantAdmin() { - return isTenantAdmin(getLoginUser().getRolePermission()); - } - -} diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/com/xmzs/common/security/config/SecurityConfig.java b/ruoyi-common/ruoyi-common-security/src/main/java/com/xmzs/common/security/config/SecurityConfig.java deleted file mode 100644 index e18cc4a..0000000 --- a/ruoyi-common/ruoyi-common-security/src/main/java/com/xmzs/common/security/config/SecurityConfig.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.xmzs.common.security.config; - -import cn.dev33.satoken.interceptor.SaInterceptor; -import cn.dev33.satoken.router.SaRouter; -import cn.dev33.satoken.stp.StpUtil; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.security.config.properties.SecurityProperties; -import com.xmzs.common.security.handler.AllUrlHandler; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; - -/** - * 鏉冮檺瀹夊叏閰嶇疆 - * - * @author Lion Li - */ - -@Slf4j -@AutoConfiguration -@EnableConfigurationProperties(SecurityProperties.class) -@RequiredArgsConstructor -public class SecurityConfig implements WebMvcConfigurer { - - private final SecurityProperties securityProperties; - - /** - * 娉ㄥ唽sa-token鐨勬嫤鎴櫒 - */ - @Override - public void addInterceptors(InterceptorRegistry registry) { - // 娉ㄥ唽璺敱鎷︽埅鍣紝鑷畾涔夐獙璇佽鍒� - registry.addInterceptor(new SaInterceptor(handler -> { - AllUrlHandler allUrlHandler = SpringUtils.getBean(AllUrlHandler.class); - // 鐧诲綍楠岃瘉 -- 鎺掗櫎澶氫釜璺緞 - SaRouter - // 鑾峰彇鎵�鏈夌殑 - .match(allUrlHandler.getUrls()) - // 瀵规湭鎺掗櫎鐨勮矾寰勮繘琛屾鏌� - .check(() -> { - // 妫�鏌ユ槸鍚︾櫥褰� 鏄惁鏈塼oken - StpUtil.checkLogin(); - - // 鏈夋晥鐜囧奖鍝� 鐢ㄤ簬涓存椂娴嬭瘯 - // if (log.isDebugEnabled()) { - // log.debug("鍓╀綑鏈夋晥鏃堕棿: {}", StpUtil.getTokenTimeout()); - // log.debug("涓存椂鏈夋晥鏃堕棿: {}", StpUtil.getTokenActivityTimeout()); - // } - - }); - })).addPathPatterns("/**") - // 鎺掗櫎涓嶉渶瑕佹嫤鎴殑璺緞 - .excludePathPatterns(securityProperties.getExcludes()); - } - -} diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/com/xmzs/common/security/config/properties/SecurityProperties.java b/ruoyi-common/ruoyi-common-security/src/main/java/com/xmzs/common/security/config/properties/SecurityProperties.java deleted file mode 100644 index f4cf99f..0000000 --- a/ruoyi-common/ruoyi-common-security/src/main/java/com/xmzs/common/security/config/properties/SecurityProperties.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.common.security.config.properties; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; - -/** - * Security 閰嶇疆灞炴�� - * - * @author Lion Li - */ -@Data -@ConfigurationProperties(prefix = "security") -public class SecurityProperties { - - /** - * 鎺掗櫎璺緞 - */ - private String[] excludes; - - -} diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/com/xmzs/common/security/handler/AllUrlHandler.java b/ruoyi-common/ruoyi-common-security/src/main/java/com/xmzs/common/security/handler/AllUrlHandler.java deleted file mode 100644 index a7b396c..0000000 --- a/ruoyi-common/ruoyi-common-security/src/main/java/com/xmzs/common/security/handler/AllUrlHandler.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.xmzs.common.security.handler; - -import cn.hutool.core.util.ReUtil; -import com.xmzs.common.core.utils.SpringUtils; -import lombok.Data; -import org.springframework.beans.factory.InitializingBean; -import org.springframework.web.method.HandlerMethod; -import org.springframework.web.servlet.mvc.method.RequestMappingInfo; -import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; - -import java.util.*; -import java.util.regex.Pattern; - -/** - * 鑾峰彇鎵�鏈塙rl閰嶇疆 - * - * @author Lion Li - */ -@Data -public class AllUrlHandler implements InitializingBean { - - private static final Pattern PATTERN = Pattern.compile("\\{(.*?)\\}"); - - private List<String> urls = new ArrayList<>(); - - @Override - public void afterPropertiesSet() { - Set<String> set = new HashSet<>(); - RequestMappingHandlerMapping mapping = SpringUtils.getBean("requestMappingHandlerMapping", RequestMappingHandlerMapping.class); - Map<RequestMappingInfo, HandlerMethod> map = mapping.getHandlerMethods(); - map.keySet().forEach(info -> { - // 鑾峰彇娉ㄨВ涓婅竟鐨� path 鏇夸唬 path variable 涓� * - if(info.getPathPatternsCondition()!=null){ - Objects.requireNonNull(info.getPathPatternsCondition().getPatterns()) - .forEach(url -> set.add(ReUtil.replaceAll(url.getPatternString(), PATTERN, "*"))); - } - }); - urls.addAll(set); - } - -} diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/com/xmzs/common/security/handler/GlobalExceptionHandler.java b/ruoyi-common/ruoyi-common-security/src/main/java/com/xmzs/common/security/handler/GlobalExceptionHandler.java deleted file mode 100644 index 6788ea5..0000000 --- a/ruoyi-common/ruoyi-common-security/src/main/java/com/xmzs/common/security/handler/GlobalExceptionHandler.java +++ /dev/null @@ -1,141 +0,0 @@ -package com.xmzs.common.security.handler; - -import cn.dev33.satoken.exception.NotLoginException; -import cn.dev33.satoken.exception.NotPermissionException; -import cn.dev33.satoken.exception.NotRoleException; -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.http.HttpStatus; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.exception.DemoModeException; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.utils.StreamUtils; -import lombok.extern.slf4j.Slf4j; -import org.springframework.context.support.DefaultMessageSourceResolvable; -import org.springframework.validation.BindException; -import org.springframework.web.HttpRequestMethodNotSupportedException; -import org.springframework.web.bind.MethodArgumentNotValidException; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.RestControllerAdvice; - -import jakarta.servlet.http.HttpServletRequest; -import jakarta.validation.ConstraintViolation; -import jakarta.validation.ConstraintViolationException; - -/** - * 鍏ㄥ眬寮傚父澶勭悊鍣� - * - * @author Lion Li - */ -@Slf4j -@RestControllerAdvice -public class GlobalExceptionHandler { - - /** - * 鏉冮檺鐮佸紓甯� - */ - @ExceptionHandler(NotPermissionException.class) - public R<Void> handleNotPermissionException(NotPermissionException e, HttpServletRequest request) { - String requestURI = request.getRequestURI(); - log.error("璇锋眰鍦板潃'{}',鏉冮檺鐮佹牎楠屽け璐�'{}'", requestURI, e.getMessage()); - return R.fail(HttpStatus.HTTP_FORBIDDEN, "娌℃湁璁块棶鏉冮檺锛岃鑱旂郴绠$悊鍛樻巿鏉�"); - } - - /** - * 瑙掕壊鏉冮檺寮傚父 - */ - @ExceptionHandler(NotRoleException.class) - public R<Void> handleNotRoleException(NotRoleException e, HttpServletRequest request) { - String requestURI = request.getRequestURI(); - log.error("璇锋眰鍦板潃'{}',瑙掕壊鏉冮檺鏍¢獙澶辫触'{}'", requestURI, e.getMessage()); - return R.fail(HttpStatus.HTTP_FORBIDDEN, "娌℃湁璁块棶鏉冮檺锛岃鑱旂郴绠$悊鍛樻巿鏉�"); - } - - /** - * 璁よ瘉澶辫触 - */ - @ExceptionHandler(NotLoginException.class) - public R<Void> handleNotLoginException(NotLoginException e, HttpServletRequest request) { - String requestURI = request.getRequestURI(); - log.error("璇锋眰鍦板潃'{}',璁よ瘉澶辫触'{}',鏃犳硶璁块棶绯荤粺璧勬簮", requestURI, e.getMessage()); - return R.fail(HttpStatus.HTTP_UNAUTHORIZED, "璁よ瘉澶辫触锛屾棤娉曡闂郴缁熻祫婧�"); - } - - /** - * 璇锋眰鏂瑰紡涓嶆敮鎸� - */ - @ExceptionHandler(HttpRequestMethodNotSupportedException.class) - public R<Void> handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException e, - HttpServletRequest request) { - String requestURI = request.getRequestURI(); - log.error("璇锋眰鍦板潃'{}',涓嶆敮鎸�'{}'璇锋眰", requestURI, e.getMethod()); - return R.fail(e.getMessage()); - } - - /** - * 涓氬姟寮傚父 - */ - @ExceptionHandler(ServiceException.class) - public R<Void> handleServiceException(ServiceException e, HttpServletRequest request) { - log.error(e.getMessage(), e); - Integer code = e.getCode(); - return ObjectUtil.isNotNull(code) ? R.fail(code, e.getMessage()) : R.fail(e.getMessage()); - } - - /** - * 鎷︽埅鏈煡鐨勮繍琛屾椂寮傚父 - */ - @ExceptionHandler(RuntimeException.class) - public R<Void> handleRuntimeException(RuntimeException e, HttpServletRequest request) { - String requestURI = request.getRequestURI(); - log.error("璇锋眰鍦板潃'{}',鍙戠敓鏈煡寮傚父.", requestURI, e); - return R.fail(e.getMessage()); - } - - /** - * 绯荤粺寮傚父 - */ - @ExceptionHandler(Exception.class) - public R<Void> handleException(Exception e, HttpServletRequest request) { - String requestURI = request.getRequestURI(); - log.error("璇锋眰鍦板潃'{}',鍙戠敓绯荤粺寮傚父.", requestURI, e); - return R.fail(e.getMessage()); - } - - /** - * 鑷畾涔夐獙璇佸紓甯� - */ - @ExceptionHandler(BindException.class) - public R<Void> handleBindException(BindException e) { - log.error(e.getMessage(), e); - String message = StreamUtils.join(e.getAllErrors(), DefaultMessageSourceResolvable::getDefaultMessage, ", "); - return R.fail(message); - } - - /** - * 鑷畾涔夐獙璇佸紓甯� - */ - @ExceptionHandler(ConstraintViolationException.class) - public R<Void> constraintViolationException(ConstraintViolationException e) { - log.error(e.getMessage(), e); - String message = StreamUtils.join(e.getConstraintViolations(), ConstraintViolation::getMessage, ", "); - return R.fail(message); - } - - /** - * 鑷畾涔夐獙璇佸紓甯� - */ - @ExceptionHandler(MethodArgumentNotValidException.class) - public R<Void> handleMethodArgumentNotValidException(MethodArgumentNotValidException e) { - log.error(e.getMessage(), e); - String message = e.getBindingResult().getFieldError().getDefaultMessage(); - return R.fail(message); - } - - /** - * 婕旂ず妯″紡寮傚父 - */ - @ExceptionHandler(DemoModeException.class) - public R<Void> handleDemoModeException(DemoModeException e) { - return R.fail("婕旂ず妯″紡锛屼笉鍏佽鎿嶄綔"); - } -} diff --git a/ruoyi-common/ruoyi-common-sensitive/src/main/java/com/xmzs/common/sensitive/annotation/Sensitive.java b/ruoyi-common/ruoyi-common-sensitive/src/main/java/com/xmzs/common/sensitive/annotation/Sensitive.java deleted file mode 100644 index a508f48..0000000 --- a/ruoyi-common/ruoyi-common-sensitive/src/main/java/com/xmzs/common/sensitive/annotation/Sensitive.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.xmzs.common.sensitive.annotation; - -import com.fasterxml.jackson.annotation.JacksonAnnotationsInside; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.xmzs.common.sensitive.core.SensitiveStrategy; -import com.xmzs.common.sensitive.handler.SensitiveHandler; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * 鏁版嵁鑴辨晱娉ㄨВ - * - * @author zhujie - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -@JacksonAnnotationsInside -@JsonSerialize(using = SensitiveHandler.class) -public @interface Sensitive { - SensitiveStrategy strategy(); -} diff --git a/ruoyi-common/ruoyi-common-sensitive/src/main/java/com/xmzs/common/sensitive/core/SensitiveService.java b/ruoyi-common/ruoyi-common-sensitive/src/main/java/com/xmzs/common/sensitive/core/SensitiveService.java deleted file mode 100644 index 0f93569..0000000 --- a/ruoyi-common/ruoyi-common-sensitive/src/main/java/com/xmzs/common/sensitive/core/SensitiveService.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.common.sensitive.core; - -/** - * 鑴辨晱鏈嶅姟 - * 榛樿绠$悊鍛樹笉杩囨护 - * 闇�鑷鏍规嵁涓氬姟閲嶅啓瀹炵幇 - * - * @author Lion Li - * @version 3.6.0 - */ -public interface SensitiveService { - - /** - * 鏄惁鑴辨晱 - */ - boolean isSensitive(); - -} diff --git a/ruoyi-common/ruoyi-common-sensitive/src/main/java/com/xmzs/common/sensitive/core/SensitiveStrategy.java b/ruoyi-common/ruoyi-common-sensitive/src/main/java/com/xmzs/common/sensitive/core/SensitiveStrategy.java deleted file mode 100644 index 14e32a6..0000000 --- a/ruoyi-common/ruoyi-common-sensitive/src/main/java/com/xmzs/common/sensitive/core/SensitiveStrategy.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.xmzs.common.sensitive.core; - -import cn.hutool.core.util.DesensitizedUtil; -import lombok.AllArgsConstructor; - -import java.util.function.Function; - -/** - * 鑴辨晱绛栫暐 - * - * @author Yjoioooo - * @version 3.6.0 - */ -@AllArgsConstructor -public enum SensitiveStrategy { - - /** - * 韬唤璇佽劚鏁� - */ - ID_CARD(s -> DesensitizedUtil.idCardNum(s, 3, 4)), - - /** - * 鎵嬫満鍙疯劚鏁� - */ - PHONE(DesensitizedUtil::mobilePhone), - - /** - * 鍦板潃鑴辨晱 - */ - ADDRESS(s -> DesensitizedUtil.address(s, 8)), - - /** - * 閭鑴辨晱 - */ - EMAIL(DesensitizedUtil::email), - - /** - * 閾惰鍗� - */ - BANK_CARD(DesensitizedUtil::bankCard); - - //鍙嚜琛屾坊鍔犲叾浠栬劚鏁忕瓥鐣� - - private final Function<String, String> desensitizer; - - public Function<String, String> desensitizer() { - return desensitizer; - } -} diff --git a/ruoyi-common/ruoyi-common-sensitive/src/main/java/com/xmzs/common/sensitive/handler/SensitiveHandler.java b/ruoyi-common/ruoyi-common-sensitive/src/main/java/com/xmzs/common/sensitive/handler/SensitiveHandler.java deleted file mode 100644 index 10899dd..0000000 --- a/ruoyi-common/ruoyi-common-sensitive/src/main/java/com/xmzs/common/sensitive/handler/SensitiveHandler.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.xmzs.common.sensitive.handler; - -import cn.hutool.core.util.ObjectUtil; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.BeanProperty; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.ser.ContextualSerializer; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.sensitive.annotation.Sensitive; -import com.xmzs.common.sensitive.core.SensitiveService; -import com.xmzs.common.sensitive.core.SensitiveStrategy; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.BeansException; - -import java.io.IOException; -import java.util.Objects; - -/** - * 鏁版嵁鑴辨晱json搴忓垪鍖栧伐鍏� - * - * @author Yjoioooo - */ -@Slf4j -public class SensitiveHandler extends JsonSerializer<String> implements ContextualSerializer { - - private SensitiveStrategy strategy; - - @Override - public void serialize(String value, JsonGenerator gen, SerializerProvider serializers) throws IOException { - try { - SensitiveService sensitiveService = SpringUtils.getBean(SensitiveService.class); - if (ObjectUtil.isNotNull(sensitiveService) && sensitiveService.isSensitive()) { - gen.writeString(strategy.desensitizer().apply(value)); - } else { - gen.writeString(value); - } - } catch (BeansException e) { - log.error("鑴辨晱瀹炵幇涓嶅瓨鍦�, 閲囩敤榛樿澶勭悊 => {}", e.getMessage()); - gen.writeString(value); - } - } - - @Override - public JsonSerializer<?> createContextual(SerializerProvider prov, BeanProperty property) throws JsonMappingException { - Sensitive annotation = property.getAnnotation(Sensitive.class); - if (Objects.nonNull(annotation) && Objects.equals(String.class, property.getType().getRawClass())) { - this.strategy = annotation.strategy(); - return this; - } - return prov.findValueSerializer(property.getType(), property); - } -} diff --git a/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/config/SmsConfig.java b/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/config/SmsConfig.java deleted file mode 100644 index 4d33b44..0000000 --- a/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/config/SmsConfig.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.xmzs.common.sms.config; - -import com.xmzs.common.sms.config.properties.SmsProperties; -import com.xmzs.common.sms.core.AliyunSmsTemplate; -import com.xmzs.common.sms.core.SmsTemplate; -import com.xmzs.common.sms.core.TencentSmsTemplate; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * 鐭俊閰嶇疆绫� - * - * @author Lion Li - * @version 4.2.0 - */ -@AutoConfiguration -@EnableConfigurationProperties(SmsProperties.class) -public class SmsConfig { - - @Configuration - @ConditionalOnProperty(value = "sms.enabled", havingValue = "true") - @ConditionalOnClass(com.aliyun.dysmsapi20170525.Client.class) - static class AliyunSmsConfig { - - @Bean - public SmsTemplate aliyunSmsTemplate(SmsProperties smsProperties) { - return new AliyunSmsTemplate(smsProperties); - } - - } - - @Configuration - @ConditionalOnProperty(value = "sms.enabled", havingValue = "true") - @ConditionalOnClass(com.tencentcloudapi.sms.v20190711.SmsClient.class) - static class TencentSmsConfig { - - @Bean - public SmsTemplate tencentSmsTemplate(SmsProperties smsProperties) { - return new TencentSmsTemplate(smsProperties); - } - - } - -} diff --git a/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/config/properties/SmsProperties.java b/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/config/properties/SmsProperties.java deleted file mode 100644 index 52e3413..0000000 --- a/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/config/properties/SmsProperties.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.xmzs.common.sms.config.properties; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; - -/** - * SMS鐭俊 閰嶇疆灞炴�� - * - * @author Lion Li - * @version 4.2.0 - */ -@Data -@ConfigurationProperties(prefix = "sms") -public class SmsProperties { - - private Boolean enabled; - - /** - * 閰嶇疆鑺傜偣 - * 闃块噷浜� dysmsapi.aliyuncs.com - * 鑵捐浜� sms.tencentcloudapi.com - */ - private String endpoint; - - /** - * key - */ - private String accessKeyId; - - /** - * 瀵嗗寵 - */ - private String accessKeySecret; - - /* - * 鐭俊绛惧悕 - */ - private String signName; - - /** - * 鐭俊搴旂敤ID (鑵捐涓撳睘) - */ - private String sdkAppId; - -} diff --git a/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/core/AliyunSmsTemplate.java b/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/core/AliyunSmsTemplate.java deleted file mode 100644 index f224ebc..0000000 --- a/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/core/AliyunSmsTemplate.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.xmzs.common.sms.core; - -import com.aliyun.dysmsapi20170525.Client; -import com.aliyun.dysmsapi20170525.models.SendSmsRequest; -import com.aliyun.dysmsapi20170525.models.SendSmsResponse; -import com.aliyun.teaopenapi.models.Config; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.json.utils.JsonUtils; -import com.xmzs.common.sms.config.properties.SmsProperties; -import com.xmzs.common.sms.entity.SmsResult; -import com.xmzs.common.sms.exception.SmsException; -import lombok.SneakyThrows; - -import java.util.Map; - -/** - * Aliyun 鐭俊妯℃澘 - * - * @author Lion Li - * @version 4.2.0 - */ -public class AliyunSmsTemplate implements SmsTemplate { - - private SmsProperties properties; - - private Client client; - - @SneakyThrows(Exception.class) - public AliyunSmsTemplate(SmsProperties smsProperties) { - this.properties = smsProperties; - Config config = new Config() - // 鎮ㄧ殑AccessKey ID - .setAccessKeyId(smsProperties.getAccessKeyId()) - // 鎮ㄧ殑AccessKey Secret - .setAccessKeySecret(smsProperties.getAccessKeySecret()) - // 璁块棶鐨勫煙鍚� - .setEndpoint(smsProperties.getEndpoint()); - this.client = new Client(config); - } - - @Override - public SmsResult send(String phones, String templateId, Map<String, String> param) { - if (StringUtils.isBlank(phones)) { - throw new SmsException("鎵嬫満鍙蜂笉鑳戒负绌�"); - } - if (StringUtils.isBlank(templateId)) { - throw new SmsException("妯℃澘ID涓嶈兘涓虹┖"); - } - SendSmsRequest req = new SendSmsRequest() - .setPhoneNumbers(phones) - .setSignName(properties.getSignName()) - .setTemplateCode(templateId) - .setTemplateParam(JsonUtils.toJsonString(param)); - try { - SendSmsResponse resp = client.sendSms(req); - return SmsResult.builder() - .isSuccess("OK".equals(resp.getBody().getCode())) - .message(resp.getBody().getMessage()) - .response(JsonUtils.toJsonString(resp)) - .build(); - } catch (Exception e) { - throw new SmsException(e.getMessage()); - } - } - -} diff --git a/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/core/SmsTemplate.java b/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/core/SmsTemplate.java deleted file mode 100644 index f214ea8..0000000 --- a/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/core/SmsTemplate.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xmzs.common.sms.core; - -import com.xmzs.common.sms.entity.SmsResult; - -import java.util.Map; - -/** - * 鐭俊妯℃澘 - * - * @author Lion Li - * @version 4.2.0 - */ -public interface SmsTemplate { - - /** - * 鍙戦�佺煭淇� - * - * @param phones 鐢佃瘽鍙�(澶氫釜閫楀彿鍒嗗壊) - * @param templateId 妯℃澘id - * @param param 妯℃澘瀵瑰簲鍙傛暟 - * 闃块噷 闇�浣跨敤 妯℃澘鍙橀噺鍚嶇О瀵瑰簲鍐呭 渚嬪: code=1234 - * 鑵捐 闇�浣跨敤 妯℃澘鍙橀噺椤哄簭瀵瑰簲鍐呭 渚嬪: 1=1234, 1涓烘ā鏉垮唴绗竴涓弬鏁� - */ - SmsResult send(String phones, String templateId, Map<String, String> param); - -} diff --git a/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/core/TencentSmsTemplate.java b/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/core/TencentSmsTemplate.java deleted file mode 100644 index fb64d66..0000000 --- a/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/core/TencentSmsTemplate.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.xmzs.common.sms.core; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.ArrayUtil; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.json.utils.JsonUtils; -import com.xmzs.common.sms.config.properties.SmsProperties; -import com.xmzs.common.sms.entity.SmsResult; -import com.xmzs.common.sms.exception.SmsException; -import com.tencentcloudapi.common.Credential; -import com.tencentcloudapi.common.profile.ClientProfile; -import com.tencentcloudapi.common.profile.HttpProfile; -import com.tencentcloudapi.sms.v20190711.SmsClient; -import com.tencentcloudapi.sms.v20190711.models.SendSmsRequest; -import com.tencentcloudapi.sms.v20190711.models.SendSmsResponse; -import com.tencentcloudapi.sms.v20190711.models.SendStatus; -import lombok.SneakyThrows; - -import java.util.Arrays; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -/** - * Tencent 鐭俊妯℃澘 - * - * @author Lion Li - * @version 4.2.0 - */ -public class TencentSmsTemplate implements SmsTemplate { - - private SmsProperties properties; - - private SmsClient client; - - @SneakyThrows(Exception.class) - public TencentSmsTemplate(SmsProperties smsProperties) { - this.properties = smsProperties; - Credential credential = new Credential(smsProperties.getAccessKeyId(), smsProperties.getAccessKeySecret()); - HttpProfile httpProfile = new HttpProfile(); - httpProfile.setEndpoint(smsProperties.getEndpoint()); - ClientProfile clientProfile = new ClientProfile(); - clientProfile.setHttpProfile(httpProfile); - this.client = new SmsClient(credential, "", clientProfile); - } - - @Override - public SmsResult send(String phones, String templateId, Map<String, String> param) { - if (StringUtils.isBlank(phones)) { - throw new SmsException("鎵嬫満鍙蜂笉鑳戒负绌�"); - } - if (StringUtils.isBlank(templateId)) { - throw new SmsException("妯℃澘ID涓嶈兘涓虹┖"); - } - SendSmsRequest req = new SendSmsRequest(); - Set<String> set = Arrays.stream(phones.split(StringUtils.SEPARATOR)).map(p -> "+86" + p).collect(Collectors.toSet()); - req.setPhoneNumberSet(ArrayUtil.toArray(set, String.class)); - if (CollUtil.isNotEmpty(param)) { - req.setTemplateParamSet(ArrayUtil.toArray(param.values(), String.class)); - } - req.setTemplateID(templateId); - req.setSign(properties.getSignName()); - req.setSmsSdkAppid(properties.getSdkAppId()); - try { - SendSmsResponse resp = client.SendSms(req); - SmsResult.SmsResultBuilder builder = SmsResult.builder() - .isSuccess(true) - .message("send success") - .response(JsonUtils.toJsonString(resp)); - for (SendStatus sendStatus : resp.getSendStatusSet()) { - if (!"Ok".equals(sendStatus.getCode())) { - builder.isSuccess(false).message(sendStatus.getMessage()); - break; - } - } - return builder.build(); - } catch (Exception e) { - throw new SmsException(e.getMessage()); - } - } - -} diff --git a/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/entity/SmsResult.java b/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/entity/SmsResult.java deleted file mode 100644 index 264ae76..0000000 --- a/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/entity/SmsResult.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.xmzs.common.sms.entity; - -import lombok.Builder; -import lombok.Data; - -/** - * 涓婁紶杩斿洖浣� - * - * @author Lion Li - */ -@Data -@Builder -public class SmsResult { - - /** - * 鏄惁鎴愬姛 - */ - private boolean isSuccess; - - /** - * 鍝嶅簲娑堟伅 - */ - private String message; - - /** - * 瀹為檯鍝嶅簲浣� - * <p> - * 鍙嚜琛岃浆鎹负 SDK 瀵瑰簲鐨� SendSmsResponse - */ - private String response; -} diff --git a/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/exception/SmsException.java b/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/exception/SmsException.java deleted file mode 100644 index 0ecadfb..0000000 --- a/ruoyi-common/ruoyi-common-sms/src/main/java/com/xmzs/common/sms/exception/SmsException.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.xmzs.common.sms.exception; - -import java.io.Serial; - -/** - * Sms寮傚父绫� - * - * @author Lion Li - */ -public class SmsException extends RuntimeException { - - @Serial - private static final long serialVersionUID = 1L; - - public SmsException(String msg) { - super(msg); - } - -} diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/config/TenantConfig.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/config/TenantConfig.java deleted file mode 100644 index 9ab360b..0000000 --- a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/config/TenantConfig.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.xmzs.common.tenant.config; - -import cn.dev33.satoken.dao.SaTokenDao; -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; -import com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor; -import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor; -import com.xmzs.common.core.utils.reflect.ReflectUtils; -import com.xmzs.common.mybatis.config.MybatisPlusConfig; -import com.xmzs.common.redis.config.RedisConfig; -import com.xmzs.common.redis.config.properties.RedissonProperties; -import com.xmzs.common.tenant.core.TenantSaTokenDao; -import com.xmzs.common.tenant.handle.PlusTenantLineHandler; -import com.xmzs.common.tenant.handle.TenantKeyPrefixHandler; -import com.xmzs.common.tenant.manager.TenantSpringCacheManager; -import com.xmzs.common.tenant.properties.TenantProperties; -import org.redisson.config.ClusterServersConfig; -import org.redisson.config.SingleServerConfig; -import org.redisson.spring.starter.RedissonAutoConfigurationCustomizer; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.cache.CacheManager; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Primary; - -import java.util.ArrayList; -import java.util.List; - -/** - * 绉熸埛閰嶇疆绫� - * - * @author Lion Li - */ -@EnableConfigurationProperties(TenantProperties.class) -@AutoConfiguration(after = {RedisConfig.class, MybatisPlusConfig.class}) -@ConditionalOnProperty(value = "tenant.enable", havingValue = "true") -public class TenantConfig { - - /** - * 鍒濆鍖栫鎴烽厤缃� - */ - @Bean - public boolean tenantInit(MybatisPlusInterceptor mybatisPlusInterceptor, - TenantProperties tenantProperties) { - List<InnerInterceptor> interceptors = new ArrayList<>(); - // 澶氱鎴锋彃浠� 蹇呴』鏀惧埌绗竴浣� - interceptors.add(tenantLineInnerInterceptor(tenantProperties)); - interceptors.addAll(mybatisPlusInterceptor.getInterceptors()); - mybatisPlusInterceptor.setInterceptors(interceptors); - return true; - } - - /** - * 澶氱鎴锋彃浠� - */ - public TenantLineInnerInterceptor tenantLineInnerInterceptor(TenantProperties tenantProperties) { - return new TenantLineInnerInterceptor(new PlusTenantLineHandler(tenantProperties)); - } - - @Bean - public RedissonAutoConfigurationCustomizer tenantRedissonCustomizer(RedissonProperties redissonProperties) { - return config -> { - TenantKeyPrefixHandler nameMapper = new TenantKeyPrefixHandler(redissonProperties.getKeyPrefix()); - SingleServerConfig singleServerConfig = ReflectUtils.invokeGetter(config, "singleServerConfig"); - if (ObjectUtil.isNotNull(singleServerConfig)) { - // 浣跨敤鍗曟満妯″紡 - // 璁剧疆澶氱鎴� redis key鍓嶇紑 - singleServerConfig.setNameMapper(nameMapper); - ReflectUtils.invokeSetter(config, "singleServerConfig", singleServerConfig); - } - ClusterServersConfig clusterServersConfig = ReflectUtils.invokeGetter(config, "clusterServersConfig"); - // 闆嗙兢閰嶇疆鏂瑰紡 鍙傝�冧笅鏂规敞閲� - if (ObjectUtil.isNotNull(clusterServersConfig)) { - // 璁剧疆澶氱鎴� redis key鍓嶇紑 - clusterServersConfig.setNameMapper(nameMapper); - ReflectUtils.invokeSetter(config, "clusterServersConfig", clusterServersConfig); - } - }; - } - - /** - * 澶氱鎴风紦瀛樼鐞嗗櫒 - */ - @Primary - @Bean - public CacheManager tenantCacheManager() { - return new TenantSpringCacheManager(); - } - - /** - * 澶氱鎴烽壌鏉僤ao瀹炵幇 - */ - @Primary - @Bean - public SaTokenDao tenantSaTokenDao() { - return new TenantSaTokenDao(); - } - -} diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/core/TenantEntity.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/core/TenantEntity.java deleted file mode 100644 index efe2bf6..0000000 --- a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/core/TenantEntity.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.common.tenant.core; - -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 绉熸埛鍩虹被 - * - * @author Michelle.Chung - */ -@Data -@EqualsAndHashCode(callSuper = true) -public class TenantEntity extends BaseEntity { - - /** - * 绉熸埛缂栧彿 - */ - private String tenantId; - -} diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/core/TenantSaTokenDao.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/core/TenantSaTokenDao.java deleted file mode 100644 index 53e267b..0000000 --- a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/core/TenantSaTokenDao.java +++ /dev/null @@ -1,148 +0,0 @@ -package com.xmzs.common.tenant.core; - -import com.xmzs.common.core.constant.GlobalConstants; -import com.xmzs.common.redis.utils.RedisUtils; -import com.xmzs.common.satoken.core.dao.PlusSaTokenDao; - -import java.time.Duration; -import java.util.List; - -/** - * SaToken 璁よ瘉鏁版嵁鎸佷箙灞� 閫傞厤澶氱鎴� - * - * @author Lion Li - */ -public class TenantSaTokenDao extends PlusSaTokenDao { - - @Override - public String get(String key) { - return super.get(GlobalConstants.GLOBAL_REDIS_KEY + key); - } - - @Override - public void set(String key, String value, long timeout) { - super.set(GlobalConstants.GLOBAL_REDIS_KEY + key, value, timeout); - } - - /** - * 淇慨鏀规寚瀹歬ey-value閿�煎 (杩囨湡鏃堕棿涓嶅彉) - */ - @Override - public void update(String key, String value) { - long expire = getTimeout(key); - // -2 = 鏃犳閿� - if (expire == NOT_VALUE_EXPIRE) { - return; - } - this.set(key, value, expire); - } - - /** - * 鍒犻櫎Value - */ - @Override - public void delete(String key) { - super.delete(GlobalConstants.GLOBAL_REDIS_KEY + key); - } - - /** - * 鑾峰彇Value鐨勫墿浣欏瓨娲绘椂闂� (鍗曚綅: 绉�) - */ - @Override - public long getTimeout(String key) { - return super.getTimeout(GlobalConstants.GLOBAL_REDIS_KEY + key); - } - - /** - * 淇敼Value鐨勫墿浣欏瓨娲绘椂闂� (鍗曚綅: 绉�) - */ - @Override - public void updateTimeout(String key, long timeout) { - // 鍒ゆ柇鏄惁鎯宠璁剧疆涓烘案涔� - if (timeout == NEVER_EXPIRE) { - long expire = getTimeout(key); - if (expire == NEVER_EXPIRE) { - // 濡傛灉鍏跺凡缁忚璁剧疆涓烘案涔咃紝鍒欎笉浣滀换浣曞鐞� - } else { - // 濡傛灉灏氭湭琚缃负姘镐箙锛岄偅涔堝啀娆et涓�娆� - this.set(key, this.get(key), timeout); - } - return; - } - RedisUtils.expire(GlobalConstants.GLOBAL_REDIS_KEY + key, Duration.ofSeconds(timeout)); - } - - - /** - * 鑾峰彇Object锛屽鏃犺繑绌� - */ - @Override - public Object getObject(String key) { - return super.getObject(GlobalConstants.GLOBAL_REDIS_KEY + key); - } - - /** - * 鍐欏叆Object锛屽苟璁惧畾瀛樻椿鏃堕棿 (鍗曚綅: 绉�) - */ - @Override - public void setObject(String key, Object object, long timeout) { - super.setObject(GlobalConstants.GLOBAL_REDIS_KEY + key, object, timeout); - } - - /** - * 鏇存柊Object (杩囨湡鏃堕棿涓嶅彉) - */ - @Override - public void updateObject(String key, Object object) { - long expire = getObjectTimeout(key); - // -2 = 鏃犳閿� - if (expire == NOT_VALUE_EXPIRE) { - return; - } - this.setObject(key, object, expire); - } - - /** - * 鍒犻櫎Object - */ - @Override - public void deleteObject(String key) { - super.deleteObject(GlobalConstants.GLOBAL_REDIS_KEY + key); - } - - /** - * 鑾峰彇Object鐨勫墿浣欏瓨娲绘椂闂� (鍗曚綅: 绉�) - */ - @Override - public long getObjectTimeout(String key) { - return super.getObjectTimeout(GlobalConstants.GLOBAL_REDIS_KEY + key); - } - - /** - * 淇敼Object鐨勫墿浣欏瓨娲绘椂闂� (鍗曚綅: 绉�) - */ - @Override - public void updateObjectTimeout(String key, long timeout) { - // 鍒ゆ柇鏄惁鎯宠璁剧疆涓烘案涔� - if (timeout == NEVER_EXPIRE) { - long expire = getObjectTimeout(key); - if (expire == NEVER_EXPIRE) { - // 濡傛灉鍏跺凡缁忚璁剧疆涓烘案涔咃紝鍒欎笉浣滀换浣曞鐞� - } else { - // 濡傛灉灏氭湭琚缃负姘镐箙锛岄偅涔堝啀娆et涓�娆� - this.setObject(key, this.getObject(key), timeout); - } - return; - } - RedisUtils.expire(GlobalConstants.GLOBAL_REDIS_KEY + key, Duration.ofSeconds(timeout)); - } - - - /** - * 鎼滅储鏁版嵁 - */ - @Override - public List<String> searchData(String prefix, String keyword, int start, int size, boolean sortType) { - return super.searchData(GlobalConstants.GLOBAL_REDIS_KEY + prefix, keyword, start, size, sortType); - } -} diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/exception/TenantException.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/exception/TenantException.java deleted file mode 100644 index 23e549d..0000000 --- a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/exception/TenantException.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.xmzs.common.tenant.exception; - -import com.xmzs.common.core.exception.base.BaseException; - -import java.io.Serial; - -/** - * 绉熸埛寮傚父绫� - * - * @author Lion Li - */ -public class TenantException extends BaseException { - - @Serial - private static final long serialVersionUID = 1L; - - public TenantException(String code, Object... args) { - super("tenant", code, args, null); - } -} diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/handle/PlusTenantLineHandler.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/handle/PlusTenantLineHandler.java deleted file mode 100644 index 6d8106c..0000000 --- a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/handle/PlusTenantLineHandler.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.xmzs.common.tenant.handle; - -import cn.hutool.core.collection.ListUtil; -import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.common.tenant.helper.TenantHelper; -import com.xmzs.common.tenant.properties.TenantProperties; -import lombok.AllArgsConstructor; -import net.sf.jsqlparser.expression.Expression; -import net.sf.jsqlparser.expression.NullValue; -import net.sf.jsqlparser.expression.StringValue; - -import java.util.List; - -/** - * 鑷畾涔夌鎴峰鐞嗗櫒 - * - * @author Lion Li - */ -@AllArgsConstructor -public class PlusTenantLineHandler implements TenantLineHandler { - - private final TenantProperties tenantProperties; - - @Override - public Expression getTenantId() { - String tenantId = LoginHelper.getTenantId(); - if (StringUtils.isBlank(tenantId)) { - return new NullValue(); - } - String dynamicTenantId = TenantHelper.getDynamic(); - if (StringUtils.isNotBlank(dynamicTenantId)) { - // 杩斿洖鍔ㄦ�佺鎴� - return new StringValue(dynamicTenantId); - } - // 杩斿洖鍥哄畾绉熸埛 - return new StringValue(tenantId); - } - - @Override - public boolean ignoreTable(String tableName) { - String tenantId = LoginHelper.getTenantId(); - // 鍒ゆ柇鏄惁鏈夌鎴� - if (StringUtils.isNotBlank(tenantId)) { - // 涓嶉渶瑕佽繃婊ょ鎴风殑琛� - List<String> excludes = tenantProperties.getExcludes(); - // 闈炰笟鍔¤〃 - List<String> tables = ListUtil.toList( - "gen_table", - "gen_table_column" - ); - tables.addAll(excludes); - return tables.contains(tableName); - } - return true; - } - -} diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/handle/TenantKeyPrefixHandler.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/handle/TenantKeyPrefixHandler.java deleted file mode 100644 index 18a49a2..0000000 --- a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/handle/TenantKeyPrefixHandler.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.xmzs.common.tenant.handle; - -import com.xmzs.common.core.constant.GlobalConstants; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.redis.handler.KeyPrefixHandler; -import com.xmzs.common.tenant.helper.TenantHelper; - -/** - * 澶氱鎴穜edis缂撳瓨key鍓嶇紑澶勭悊 - * - * @author Lion Li - */ -public class TenantKeyPrefixHandler extends KeyPrefixHandler { - - public TenantKeyPrefixHandler(String keyPrefix) { - super(keyPrefix); - } - - /** - * 澧炲姞鍓嶇紑 - */ - @Override - public String map(String name) { - if (StringUtils.isBlank(name)) { - return null; - } - if (StringUtils.contains(name, GlobalConstants.GLOBAL_REDIS_KEY)) { - return super.map(name); - } - String tenantId = TenantHelper.getTenantId(); - if (StringUtils.startsWith(name, tenantId)) { - // 濡傛灉瀛樺湪鍒欑洿鎺ヨ繑鍥� - return super.map(name); - } - return super.map(tenantId + ":" + name); - } - - /** - * 鍘婚櫎鍓嶇紑 - */ - @Override - public String unmap(String name) { - String unmap = super.unmap(name); - if (StringUtils.isBlank(unmap)) { - return null; - } - if (StringUtils.contains(name, GlobalConstants.GLOBAL_REDIS_KEY)) { - return super.unmap(name); - } - String tenantId = TenantHelper.getTenantId(); - if (StringUtils.startsWith(unmap, tenantId)) { - // 濡傛灉瀛樺湪鍒欏垹闄� - return unmap.substring((tenantId + ":").length()); - } - return unmap; - } - -} diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/helper/TenantHelper.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/helper/TenantHelper.java deleted file mode 100644 index ba8ca15..0000000 --- a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/helper/TenantHelper.java +++ /dev/null @@ -1,140 +0,0 @@ -package com.xmzs.common.tenant.helper; - -import cn.dev33.satoken.context.SaHolder; -import cn.dev33.satoken.spring.SpringMVCUtil; -import cn.hutool.core.convert.Convert; -import com.alibaba.ttl.TransmittableThreadLocal; -import com.baomidou.mybatisplus.core.plugins.IgnoreStrategy; -import com.baomidou.mybatisplus.core.plugins.InterceptorIgnoreHelper; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import com.xmzs.common.core.constant.GlobalConstants; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.redis.utils.RedisUtils; -import com.xmzs.common.satoken.utils.LoginHelper; - -import java.util.function.Supplier; - -/** - * 绉熸埛鍔╂墜 - * - * @author Lion Li - */ -@Slf4j -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class TenantHelper { - - private static final String DYNAMIC_TENANT_KEY = GlobalConstants.GLOBAL_REDIS_KEY + "dynamicTenant"; - - private static final ThreadLocal<String> TEMP_DYNAMIC_TENANT = new TransmittableThreadLocal<>(); - - /** - * 绉熸埛鍔熻兘鏄惁鍚敤 - */ - public static boolean isEnable() { - return Convert.toBool(SpringUtils.getProperty("tenant.enable"), false); - } - - /** - * 寮�鍚拷鐣ョ鎴�(寮�鍚悗闇�鎵嬪姩璋冪敤 {@link #disableIgnore()} 鍏抽棴) - */ - public static void enableIgnore() { - InterceptorIgnoreHelper.handle(IgnoreStrategy.builder().tenantLine(true).build()); - } - - /** - * 鍏抽棴蹇界暐绉熸埛 - */ - public static void disableIgnore() { - InterceptorIgnoreHelper.clearIgnoreStrategy(); - } - - /** - * 鍦ㄥ拷鐣ョ鎴蜂腑鎵ц - * - * @param handle 澶勭悊鎵ц鏂规硶 - */ - public static void ignore(Runnable handle) { - enableIgnore(); - try { - handle.run(); - } finally { - disableIgnore(); - } - } - - /** - * 鍦ㄥ拷鐣ョ鎴蜂腑鎵ц - * - * @param handle 澶勭悊鎵ц鏂规硶 - */ - public static <T> T ignore(Supplier<T> handle) { - enableIgnore(); - try { - return handle.get(); - } finally { - disableIgnore(); - } - } - - /** - * 璁剧疆鍔ㄦ�佺鎴�(涓�鐩存湁鏁� 闇�瑕佹墜鍔ㄦ竻鐞�) - * <p> - * 濡傛灉涓洪潪web鐜 閭d箞鍙湪褰撳墠绾跨▼鍐呯敓鏁� - */ - public static void setDynamic(String tenantId) { - if (!SpringMVCUtil.isWeb()) { - TEMP_DYNAMIC_TENANT.set(tenantId); - return; - } - String cacheKey = DYNAMIC_TENANT_KEY + ":" + LoginHelper.getUserId(); - RedisUtils.setCacheObject(cacheKey, tenantId); - SaHolder.getStorage().set(cacheKey, tenantId); - } - - /** - * 鑾峰彇鍔ㄦ�佺鎴�(涓�鐩存湁鏁� 闇�瑕佹墜鍔ㄦ竻鐞�) - * <p> - * 濡傛灉涓洪潪web鐜 閭d箞鍙湪褰撳墠绾跨▼鍐呯敓鏁� - */ - public static String getDynamic() { - if (!SpringMVCUtil.isWeb()) { - return TEMP_DYNAMIC_TENANT.get(); - } - String cacheKey = DYNAMIC_TENANT_KEY + ":" + LoginHelper.getUserId(); - String tenantId = (String) SaHolder.getStorage().get(cacheKey); - if (StringUtils.isNotBlank(tenantId)) { - return tenantId; - } - tenantId = RedisUtils.getCacheObject(cacheKey); - SaHolder.getStorage().set(cacheKey, tenantId); - return tenantId; - } - - /** - * 娓呴櫎鍔ㄦ�佺鎴� - */ - public static void clearDynamic() { - if (!SpringMVCUtil.isWeb()) { - TEMP_DYNAMIC_TENANT.remove(); - return; - } - String cacheKey = DYNAMIC_TENANT_KEY + ":" + LoginHelper.getUserId(); - RedisUtils.deleteObject(cacheKey); - SaHolder.getStorage().delete(cacheKey); - } - - /** - * 鑾峰彇褰撳墠绉熸埛id(鍔ㄦ�佺鎴蜂紭鍏�) - */ - public static String getTenantId() { - String tenantId = TenantHelper.getDynamic(); - if (StringUtils.isBlank(tenantId)) { - tenantId = LoginHelper.getTenantId(); - } - return tenantId; - } - -} diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/manager/TenantSpringCacheManager.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/manager/TenantSpringCacheManager.java deleted file mode 100644 index 966f2c5..0000000 --- a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/manager/TenantSpringCacheManager.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.xmzs.common.tenant.manager; - -import com.xmzs.common.core.constant.GlobalConstants; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.redis.manager.PlusSpringCacheManager; -import com.xmzs.common.tenant.helper.TenantHelper; -import org.springframework.cache.Cache; - -/** - * 閲嶅啓 cacheName 澶勭悊鏂规硶 鏀寔澶氱鎴� - * - * @author Lion Li - */ -public class TenantSpringCacheManager extends PlusSpringCacheManager { - - public TenantSpringCacheManager() { - } - - @Override - public Cache getCache(String name) { - if (StringUtils.contains(name, GlobalConstants.GLOBAL_REDIS_KEY)) { - return super.getCache(name); - } - String tenantId = TenantHelper.getTenantId(); - if (StringUtils.startsWith(name, tenantId)) { - // 濡傛灉瀛樺湪鍒欑洿鎺ヨ繑鍥� - return super.getCache(name); - } - return super.getCache(tenantId + ":" + name); - } - -} diff --git a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/properties/TenantProperties.java b/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/properties/TenantProperties.java deleted file mode 100644 index 00ad9e8..0000000 --- a/ruoyi-common/ruoyi-common-tenant/src/main/java/com/xmzs/common/tenant/properties/TenantProperties.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.xmzs.common.tenant.properties; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; - -import java.util.List; - -/** - * 绉熸埛 閰嶇疆灞炴�� - * - * @author Lion Li - */ -@Data -@ConfigurationProperties(prefix = "tenant") -public class TenantProperties { - - /** - * 鏄惁鍚敤 - */ - private Boolean enable; - - /** - * 鎺掗櫎琛� - */ - private List<String> excludes; - -} diff --git a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/annotation/Translation.java b/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/annotation/Translation.java deleted file mode 100644 index 256b038..0000000 --- a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/annotation/Translation.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.xmzs.common.translation.annotation; - -import com.fasterxml.jackson.annotation.JacksonAnnotationsInside; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.xmzs.common.translation.core.handler.TranslationHandler; - -import java.lang.annotation.*; - -/** - * 閫氱敤缈昏瘧娉ㄨВ - * - * @author Lion Li - */ -@Inherited -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.FIELD, ElementType.METHOD}) -@Documented -@JacksonAnnotationsInside -@JsonSerialize(using = TranslationHandler.class) -public @interface Translation { - - /** - * 绫诲瀷 (闇�涓庡疄鐜扮被涓婄殑 {@link TranslationType} 娉ㄨВtype瀵瑰簲) - * <p> - * 榛樿鍙栧綋鍓嶅瓧娈电殑鍊� 濡傛灉璁剧疆浜� @{@link Translation#mapper()} 鍒欏彇鏄犲皠瀛楁鐨勫�� - */ - String type(); - - /** - * 鏄犲皠瀛楁 (濡傛灉涓嶄负绌哄垯鍙栨瀛楁鐨勫��) - */ - String mapper() default ""; - - /** - * 鍏朵粬鏉′欢 渚嬪: 瀛楀吀type(sys_user_sex) - */ - String other() default ""; - -} diff --git a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/annotation/TranslationType.java b/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/annotation/TranslationType.java deleted file mode 100644 index 6222235..0000000 --- a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/annotation/TranslationType.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.xmzs.common.translation.annotation; - -import com.xmzs.common.translation.core.TranslationInterface; - -import java.lang.annotation.*; - -/** - * 缈昏瘧绫诲瀷娉ㄨВ (鏍囨敞鍒皗@link TranslationInterface} 鐨勫疄鐜扮被) - * - * @author Lion Li - */ -@Inherited -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE}) -@Documented -public @interface TranslationType { - - /** - * 绫诲瀷 - */ - String type(); - -} diff --git a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/config/TranslationConfig.java b/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/config/TranslationConfig.java deleted file mode 100644 index 164ee21..0000000 --- a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/config/TranslationConfig.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.xmzs.common.translation.config; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xmzs.common.translation.annotation.TranslationType; -import com.xmzs.common.translation.core.TranslationInterface; -import com.xmzs.common.translation.core.handler.TranslationBeanSerializerModifier; -import com.xmzs.common.translation.core.handler.TranslationHandler; -import jakarta.annotation.PostConstruct; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.AutoConfiguration; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * 缈昏瘧妯″潡閰嶇疆绫� - * - * @author Lion Li - */ -@Slf4j -@AutoConfiguration -public class TranslationConfig { - - @Autowired - private List<TranslationInterface<?>> list; - - @Autowired - private ObjectMapper objectMapper; - - @PostConstruct - public void init() { - Map<String, TranslationInterface<?>> map = new HashMap<>(list.size()); - for (TranslationInterface<?> trans : list) { - if (trans.getClass().isAnnotationPresent(TranslationType.class)) { - TranslationType annotation = trans.getClass().getAnnotation(TranslationType.class); - map.put(annotation.type(), trans); - } else { - log.warn(trans.getClass().getName() + " 缈昏瘧瀹炵幇绫绘湭鏍囨敞 TranslationType 娉ㄨВ!"); - } - } - TranslationHandler.TRANSLATION_MAPPER.putAll(map); - // 璁剧疆 Bean 搴忓垪鍖栦慨鏀瑰櫒 - objectMapper.setSerializerFactory( - objectMapper.getSerializerFactory() - .withSerializerModifier(new TranslationBeanSerializerModifier())); - } - -} diff --git a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/constant/TransConstant.java b/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/constant/TransConstant.java deleted file mode 100644 index 2afa6d8..0000000 --- a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/constant/TransConstant.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.xmzs.common.translation.constant; - -/** - * 缈昏瘧甯搁噺 - * - * @author Lion Li - */ -public interface TransConstant { - - /** - * 鐢ㄦ埛id杞处鍙� - */ - String USER_ID_TO_NAME = "user_id_to_name"; - - /** - * 閮ㄩ棬id杞悕绉� - */ - String DEPT_ID_TO_NAME = "dept_id_to_name"; - - /** - * 瀛楀吀type杞琹abel - */ - String DICT_TYPE_TO_LABEL = "dict_type_to_label"; - - /** - * ossId杞瑄rl - */ - String OSS_ID_TO_URL = "oss_id_to_url"; - -} diff --git a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/TranslationInterface.java b/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/TranslationInterface.java deleted file mode 100644 index b3e1dc7..0000000 --- a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/TranslationInterface.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.xmzs.common.translation.core; - -import com.xmzs.common.translation.annotation.TranslationType; - -/** - * 缈昏瘧鎺ュ彛 (瀹炵幇绫婚渶鏍囨敞 {@link TranslationType} 娉ㄨВ鏍囨槑缈昏瘧绫诲瀷) - * - * @author Lion Li - */ -public interface TranslationInterface<T> { - - /** - * 缈昏瘧 - * - * @param key 闇�瑕佽缈昏瘧鐨勯敭(涓嶄负绌�) - * @param other 鍏朵粬鍙傛暟 - * @return 杩斿洖閿搴旂殑鍊� - */ - T translation(Object key, String other); -} diff --git a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/handler/TranslationBeanSerializerModifier.java b/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/handler/TranslationBeanSerializerModifier.java deleted file mode 100644 index c38097d..0000000 --- a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/handler/TranslationBeanSerializerModifier.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.xmzs.common.translation.core.handler; - -import com.fasterxml.jackson.databind.BeanDescription; -import com.fasterxml.jackson.databind.SerializationConfig; -import com.fasterxml.jackson.databind.ser.BeanPropertyWriter; -import com.fasterxml.jackson.databind.ser.BeanSerializerModifier; - -import java.util.List; - -/** - * Bean 搴忓垪鍖栦慨鏀瑰櫒 瑙e喅 Null 琚崟鐙鐞嗛棶棰� - * - * @author Lion Li - */ -public class TranslationBeanSerializerModifier extends BeanSerializerModifier { - - @Override - public List<BeanPropertyWriter> changeProperties(SerializationConfig config, BeanDescription beanDesc, - List<BeanPropertyWriter> beanProperties) { - for (BeanPropertyWriter writer : beanProperties) { - // 濡傛灉搴忓垪鍖栧櫒涓� TranslationHandler 鐨勮瘽 灏� Null 鍊间篃浜ょ粰浠栧鐞� - if (writer.getSerializer() instanceof TranslationHandler serializer) { - writer.assignNullSerializer(serializer); - } - } - return beanProperties; - } - -} diff --git a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/handler/TranslationHandler.java b/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/handler/TranslationHandler.java deleted file mode 100644 index 4d4bcab..0000000 --- a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/handler/TranslationHandler.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.xmzs.common.translation.core.handler; - -import cn.hutool.core.util.ObjectUtil; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.BeanProperty; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.ser.ContextualSerializer; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.core.utils.reflect.ReflectUtils; -import com.xmzs.common.translation.annotation.Translation; -import com.xmzs.common.translation.core.TranslationInterface; -import lombok.extern.slf4j.Slf4j; - -import java.io.IOException; -import java.util.Map; -import java.util.Objects; -import java.util.concurrent.ConcurrentHashMap; - -/** - * 缈昏瘧澶勭悊鍣� - * - * @author Lion Li - */ -@Slf4j -public class TranslationHandler extends JsonSerializer<Object> implements ContextualSerializer { - - /** - * 鍏ㄥ眬缈昏瘧瀹炵幇绫绘槧灏勫櫒 - */ - public static final Map<String, TranslationInterface<?>> TRANSLATION_MAPPER = new ConcurrentHashMap<>(); - - private Translation translation; - - @Override - public void serialize(Object value, JsonGenerator gen, SerializerProvider serializers) throws IOException { - TranslationInterface<?> trans = TRANSLATION_MAPPER.get(translation.type()); - if (ObjectUtil.isNotNull(trans)) { - // 濡傛灉鏄犲皠瀛楁涓嶄负绌� 鍒欏彇鏄犲皠瀛楁鐨勫�� - if (StringUtils.isNotBlank(translation.mapper())) { - value = ReflectUtils.invokeGetter(gen.getCurrentValue(), translation.mapper()); - } - // 濡傛灉涓� null 鐩存帴鍐欏嚭 - if (ObjectUtil.isNull(value)) { - gen.writeNull(); - return; - } - Object result = trans.translation(value, translation.other()); - gen.writeObject(result); - } else { - gen.writeObject(value); - } - } - - @Override - public JsonSerializer<?> createContextual(SerializerProvider prov, BeanProperty property) throws JsonMappingException { - Translation translation = property.getAnnotation(Translation.class); - if (Objects.nonNull(translation)) { - this.translation = translation; - return this; - } - return prov.findValueSerializer(property.getType(), property); - } -} diff --git a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/impl/DeptNameTranslationImpl.java b/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/impl/DeptNameTranslationImpl.java deleted file mode 100644 index 7c92cb0..0000000 --- a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/impl/DeptNameTranslationImpl.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.xmzs.common.translation.core.impl; - -import com.xmzs.common.core.service.DeptService; -import com.xmzs.common.translation.annotation.TranslationType; -import com.xmzs.common.translation.constant.TransConstant; -import com.xmzs.common.translation.core.TranslationInterface; -import lombok.AllArgsConstructor; - -/** - * 閮ㄩ棬缈昏瘧瀹炵幇 - * - * @author Lion Li - */ -@AllArgsConstructor -@TranslationType(type = TransConstant.DEPT_ID_TO_NAME) -public class DeptNameTranslationImpl implements TranslationInterface<String> { - - private final DeptService deptService; - - @Override - public String translation(Object key, String other) { - if (key instanceof String ids) { - return deptService.selectDeptNameByIds(ids); - } else if (key instanceof Long id) { - return deptService.selectDeptNameByIds(id.toString()); - } - return null; - } -} diff --git a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/impl/DictTypeTranslationImpl.java b/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/impl/DictTypeTranslationImpl.java deleted file mode 100644 index 4fb6557..0000000 --- a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/impl/DictTypeTranslationImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.xmzs.common.translation.core.impl; - -import com.xmzs.common.core.service.DictService; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.translation.annotation.TranslationType; -import com.xmzs.common.translation.constant.TransConstant; -import com.xmzs.common.translation.core.TranslationInterface; -import lombok.AllArgsConstructor; - -/** - * 瀛楀吀缈昏瘧瀹炵幇 - * - * @author Lion Li - */ -@AllArgsConstructor -@TranslationType(type = TransConstant.DICT_TYPE_TO_LABEL) -public class DictTypeTranslationImpl implements TranslationInterface<String> { - - private final DictService dictService; - - @Override - public String translation(Object key, String other) { - if (key instanceof String dictValue && StringUtils.isNotBlank(other)) { - return dictService.getDictLabel(other, dictValue); - } - return null; - } -} diff --git a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/impl/OssUrlTranslationImpl.java b/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/impl/OssUrlTranslationImpl.java deleted file mode 100644 index 5337acf..0000000 --- a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/impl/OssUrlTranslationImpl.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.xmzs.common.translation.core.impl; - -import com.xmzs.common.core.service.OssService; -import com.xmzs.common.translation.annotation.TranslationType; -import com.xmzs.common.translation.constant.TransConstant; -import com.xmzs.common.translation.core.TranslationInterface; -import lombok.AllArgsConstructor; - -/** - * OSS缈昏瘧瀹炵幇 - * - * @author Lion Li - */ -@AllArgsConstructor -@TranslationType(type = TransConstant.OSS_ID_TO_URL) -public class OssUrlTranslationImpl implements TranslationInterface<String> { - - private final OssService ossService; - - @Override - public String translation(Object key, String other) { - if (key instanceof String ids) { - return ossService.selectUrlByIds(ids); - } else if (key instanceof Long id) { - return ossService.selectUrlByIds(id.toString()); - } - return null; - } -} diff --git a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/impl/UserNameTranslationImpl.java b/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/impl/UserNameTranslationImpl.java deleted file mode 100644 index 5ae02c7..0000000 --- a/ruoyi-common/ruoyi-common-translation/src/main/java/com/xmzs/common/translation/core/impl/UserNameTranslationImpl.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.xmzs.common.translation.core.impl; - -import com.xmzs.common.core.service.UserService; -import com.xmzs.common.translation.annotation.TranslationType; -import com.xmzs.common.translation.constant.TransConstant; -import com.xmzs.common.translation.core.TranslationInterface; -import lombok.AllArgsConstructor; - -/** - * 鐢ㄦ埛鍚嶇炕璇戝疄鐜� - * - * @author Lion Li - */ -@AllArgsConstructor -@TranslationType(type = TransConstant.USER_ID_TO_NAME) -public class UserNameTranslationImpl implements TranslationInterface<String> { - - private final UserService userService; - - @Override - public String translation(Object key, String other) { - if (key instanceof Long id) { - return userService.selectUserNameById(id); - } - return null; - } -} diff --git a/ruoyi-common/ruoyi-common-web/pom.xml b/ruoyi-common/ruoyi-common-web/pom.xml index 04fdb56..97b9351 100644 --- a/ruoyi-common/ruoyi-common-web/pom.xml +++ b/ruoyi-common/ruoyi-common-web/pom.xml @@ -33,17 +33,21 @@ <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> - <artifactId>spring-boot-starter-tomcat</artifactId> <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> </dependency> + + <!-- web 瀹瑰櫒浣跨敤 undertow 鎬ц兘鏇村己 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-undertow</artifactId> </dependency> + + <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/CaptchaConfig.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/CaptchaConfig.java deleted file mode 100644 index 84f6170..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/CaptchaConfig.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.xmzs.common.web.config; - -import cn.hutool.captcha.CaptchaUtil; -import cn.hutool.captcha.CircleCaptcha; -import cn.hutool.captcha.LineCaptcha; -import cn.hutool.captcha.ShearCaptcha; -import com.xmzs.common.web.config.properties.CaptchaProperties; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Lazy; - -import java.awt.*; - -/** - * 楠岃瘉鐮侀厤缃� - * - * @author Lion Li - */ -@AutoConfiguration -@EnableConfigurationProperties(CaptchaProperties.class) -public class CaptchaConfig { - - private static final int WIDTH = 160; - private static final int HEIGHT = 60; - private static final Color BACKGROUND = Color.PINK; - private static final Font FONT = new Font("Arial", Font.BOLD, 48); - - /** - * 鍦嗗湀骞叉壈楠岃瘉鐮� - */ - @Lazy - @Bean - public CircleCaptcha circleCaptcha() { - CircleCaptcha captcha = CaptchaUtil.createCircleCaptcha(WIDTH, HEIGHT); - captcha.setBackground(BACKGROUND); - captcha.setFont(FONT); - return captcha; - } - - /** - * 绾挎骞叉壈鐨勯獙璇佺爜 - */ - @Lazy - @Bean - public LineCaptcha lineCaptcha() { - LineCaptcha captcha = CaptchaUtil.createLineCaptcha(WIDTH, HEIGHT); - captcha.setBackground(BACKGROUND); - captcha.setFont(FONT); - return captcha; - } - - /** - * 鎵洸骞叉壈楠岃瘉鐮� - */ - @Lazy - @Bean - public ShearCaptcha shearCaptcha() { - ShearCaptcha captcha = CaptchaUtil.createShearCaptcha(WIDTH, HEIGHT); - captcha.setBackground(BACKGROUND); - captcha.setFont(FONT); - return captcha; - } - -} diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/FilterConfig.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/FilterConfig.java deleted file mode 100644 index 20962f3..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/FilterConfig.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.xmzs.common.web.config; - -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.web.config.properties.XssProperties; -import com.xmzs.common.web.filter.RepeatableFilter; -import com.xmzs.common.web.filter.XssFilter; -import jakarta.servlet.DispatcherType; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.boot.web.servlet.FilterRegistrationBean; -import org.springframework.context.annotation.Bean; - -import java.util.HashMap; -import java.util.Map; - -/** - * Filter閰嶇疆 - * - * @author Lion Li - */ -@AutoConfiguration -@EnableConfigurationProperties(XssProperties.class) -public class FilterConfig { - - @SuppressWarnings({"rawtypes", "unchecked"}) - @Bean - @ConditionalOnProperty(value = "xss.enabled", havingValue = "true") - public FilterRegistrationBean xssFilterRegistration(XssProperties xssProperties) { - FilterRegistrationBean registration = new FilterRegistrationBean(); - registration.setDispatcherTypes(DispatcherType.REQUEST); - registration.setFilter(new XssFilter()); - registration.addUrlPatterns(StringUtils.split(xssProperties.getUrlPatterns(), StringUtils.SEPARATOR)); - registration.setName("xssFilter"); - registration.setOrder(FilterRegistrationBean.HIGHEST_PRECEDENCE); - Map<String, String> initParameters = new HashMap<>(); - initParameters.put("excludes", xssProperties.getExcludes()); - registration.setInitParameters(initParameters); - return registration; - } - - @SuppressWarnings({"rawtypes", "unchecked"}) - @Bean - public FilterRegistrationBean someFilterRegistration() { - FilterRegistrationBean registration = new FilterRegistrationBean(); - registration.setFilter(new RepeatableFilter()); - registration.addUrlPatterns("/*"); - registration.setName("repeatableFilter"); - registration.setOrder(FilterRegistrationBean.LOWEST_PRECEDENCE); - return registration; - } - -} diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/I18nConfig.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/I18nConfig.java deleted file mode 100644 index e0e5b84..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/I18nConfig.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.xmzs.common.web.config; - -import com.xmzs.common.web.core.I18nLocaleResolver; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration; -import org.springframework.context.annotation.Bean; -import org.springframework.web.servlet.LocaleResolver; - -/** - * 鍥介檯鍖栭厤缃� - * - * @author Lion Li - */ -@AutoConfiguration(before = WebMvcAutoConfiguration.class) -public class I18nConfig { - - @Bean - public LocaleResolver localeResolver() { - return new I18nLocaleResolver(); - } - -} diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/ResourcesConfig.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/ResourcesConfig.java deleted file mode 100644 index df747c5..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/ResourcesConfig.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.xmzs.common.web.config; - -import com.xmzs.common.web.interceptor.PlusWebInvokeTimeInterceptor; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.context.annotation.Bean; -import org.springframework.web.cors.CorsConfiguration; -import org.springframework.web.cors.UrlBasedCorsConfigurationSource; -import org.springframework.web.filter.CorsFilter; -import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; - -/** - * 閫氱敤閰嶇疆 - * - * @author Lion Li - */ -@AutoConfiguration -public class ResourcesConfig implements WebMvcConfigurer { - - @Override - public void addInterceptors(InterceptorRegistry registry) { - // 鍏ㄥ眬璁块棶鎬ц兘鎷︽埅 - registry.addInterceptor(new PlusWebInvokeTimeInterceptor()); - } - - @Override - public void addResourceHandlers(ResourceHandlerRegistry registry) { - } - - /** - * 璺ㄥ煙閰嶇疆 - */ - @Bean - public CorsFilter corsFilter() { - CorsConfiguration config = new CorsConfiguration(); - config.setAllowCredentials(true); - // 璁剧疆璁块棶婧愬湴鍧� - config.addAllowedOriginPattern("*"); - // 璁剧疆璁块棶婧愯姹傚ご - config.addAllowedHeader("*"); - // 璁剧疆璁块棶婧愯姹傛柟娉� - config.addAllowedMethod("*"); - // 鏈夋晥鏈� 1800绉� - config.setMaxAge(1800L); - // 娣诲姞鏄犲皠璺緞锛屾嫤鎴竴鍒囪姹� - UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); - source.registerCorsConfiguration("/**", config); - // 杩斿洖鏂扮殑CorsFilter - return new CorsFilter(source); - } -} diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/UndertowConfig.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/UndertowConfig.java deleted file mode 100644 index 1d3a4d3..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/UndertowConfig.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.xmzs.common.web.config; - -import io.undertow.server.DefaultByteBufferPool; -import io.undertow.websockets.jsr.WebSocketDeploymentInfo; -import org.springframework.boot.autoconfigure.AutoConfiguration; -import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory; -import org.springframework.boot.web.server.WebServerFactoryCustomizer; - -/** - * Undertow 鑷畾涔夐厤缃� - * - * @author Lion Li - */ -@AutoConfiguration -public class UndertowConfig implements WebServerFactoryCustomizer<UndertowServletWebServerFactory> { - - /** - * 璁剧疆 Undertow 鐨� websocket 缂撳啿姹� - */ - @Override - public void customize(UndertowServletWebServerFactory factory) { - // 榛樿涓嶇洿鎺ュ垎閰嶅唴瀛� 濡傛灉椤圭洰涓娇鐢ㄤ簡 websocket 寤鸿鐩存帴鍒嗛厤 - factory.addDeploymentInfoCustomizers(deploymentInfo -> { - WebSocketDeploymentInfo webSocketDeploymentInfo = new WebSocketDeploymentInfo(); - webSocketDeploymentInfo.setBuffers(new DefaultByteBufferPool(false, 512)); - deploymentInfo.addServletContextAttribute("io.undertow.websockets.jsr.WebSocketDeploymentInfo", webSocketDeploymentInfo); - }); - } - -} diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/properties/CaptchaProperties.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/properties/CaptchaProperties.java deleted file mode 100644 index 8a83e26..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/properties/CaptchaProperties.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.xmzs.common.web.config.properties; - -import com.xmzs.common.web.enums.CaptchaCategory; -import com.xmzs.common.web.enums.CaptchaType; -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; - -/** - * 楠岃瘉鐮� 閰嶇疆灞炴�� - * - * @author Lion Li - */ -@Data -@ConfigurationProperties(prefix = "captcha") -public class CaptchaProperties { - - private Boolean enable; - - /** - * 楠岃瘉鐮佺被鍨� - */ - private CaptchaType type; - - /** - * 楠岃瘉鐮佺被鍒� - */ - private CaptchaCategory category; - - /** - * 鏁板瓧楠岃瘉鐮佷綅鏁� - */ - private Integer numberLength; - - /** - * 瀛楃楠岃瘉鐮侀暱搴� - */ - private Integer charLength; -} diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/properties/XssProperties.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/properties/XssProperties.java deleted file mode 100644 index 8d381f3..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/config/properties/XssProperties.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.xmzs.common.web.config.properties; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; - -/** - * xss杩囨护 閰嶇疆灞炴�� - * - * @author Lion Li - */ -@Data -@ConfigurationProperties(prefix = "xss") -public class XssProperties { - - /** - * 杩囨护寮�鍏� - */ - private String enabled; - - /** - * 鎺掗櫎閾炬帴锛堝涓敤閫楀彿鍒嗛殧锛� - */ - private String excludes; - - /** - * 鍖归厤閾炬帴 - */ - private String urlPatterns; - -} diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/core/BaseController.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/core/BaseController.java deleted file mode 100644 index b5c8732..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/core/BaseController.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.xmzs.common.web.core; - -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.utils.StringUtils; - -/** - * web灞傞�氱敤鏁版嵁澶勭悊 - * - * @author Lion Li - */ -public class BaseController { - - /** - * 鍝嶅簲杩斿洖缁撴灉 - * - * @param rows 褰卞搷琛屾暟 - * @return 鎿嶄綔缁撴灉 - */ - protected R<Void> toAjax(int rows) { - return rows > 0 ? R.ok() : R.fail(); - } - - /** - * 鍝嶅簲杩斿洖缁撴灉 - * - * @param result 缁撴灉 - * @return 鎿嶄綔缁撴灉 - */ - protected R<Void> toAjax(boolean result) { - return result ? R.ok() : R.fail(); - } - - /** - * 椤甸潰璺宠浆 - */ - public String redirect(String url) { - return StringUtils.format("redirect:{}", url); - } - -} diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/core/I18nLocaleResolver.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/core/I18nLocaleResolver.java deleted file mode 100644 index f84e21a..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/core/I18nLocaleResolver.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.xmzs.common.web.core; - -import org.springframework.web.servlet.LocaleResolver; - -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import java.util.Locale; - -/** - * 鑾峰彇璇锋眰澶村浗闄呭寲淇℃伅 - * - * @author Lion Li - */ -public class I18nLocaleResolver implements LocaleResolver { - - @Override - public Locale resolveLocale(HttpServletRequest httpServletRequest) { - String language = httpServletRequest.getHeader("content-language"); - Locale locale = Locale.getDefault(); - if (language != null && language.length() > 0) { - String[] split = language.split("_"); - locale = new Locale(split[0], split[1]); - } - return locale; - } - - @Override - public void setLocale(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Locale locale) { - - } -} diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/enums/CaptchaCategory.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/enums/CaptchaCategory.java deleted file mode 100644 index 8f1ce6b..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/enums/CaptchaCategory.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.xmzs.common.web.enums; - -import cn.hutool.captcha.AbstractCaptcha; -import cn.hutool.captcha.CircleCaptcha; -import cn.hutool.captcha.LineCaptcha; -import cn.hutool.captcha.ShearCaptcha; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 楠岃瘉鐮佺被鍒� - * - * @author Lion Li - */ -@Getter -@AllArgsConstructor -public enum CaptchaCategory { - - /** - * 绾挎骞叉壈 - */ - LINE(LineCaptcha.class), - - /** - * 鍦嗗湀骞叉壈 - */ - CIRCLE(CircleCaptcha.class), - - /** - * 鎵洸骞叉壈 - */ - SHEAR(ShearCaptcha.class); - - private final Class<? extends AbstractCaptcha> clazz; -} diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/enums/CaptchaType.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/enums/CaptchaType.java deleted file mode 100644 index 929d972..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/enums/CaptchaType.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.xmzs.common.web.enums; - -import cn.hutool.captcha.generator.CodeGenerator; -import cn.hutool.captcha.generator.RandomGenerator; -import com.xmzs.common.web.utils.UnsignedMathGenerator; -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * 楠岃瘉鐮佺被鍨� - * - * @author Lion Li - */ -@Getter -@AllArgsConstructor -public enum CaptchaType { - - /** - * 鏁板瓧 - */ - MATH(UnsignedMathGenerator.class), - - /** - * 瀛楃 - */ - CHAR(RandomGenerator.class); - - private final Class<? extends CodeGenerator> clazz; -} diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/filter/RepeatableFilter.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/filter/RepeatableFilter.java deleted file mode 100644 index 2575864..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/filter/RepeatableFilter.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.xmzs.common.web.filter; - -import com.xmzs.common.core.utils.StringUtils; -import org.springframework.http.MediaType; - -import jakarta.servlet.*; -import jakarta.servlet.http.HttpServletRequest; -import java.io.IOException; - -/** - * Repeatable 杩囨护鍣� - * - * @author ruoyi - */ -public class RepeatableFilter implements Filter { - @Override - public void init(FilterConfig filterConfig) throws ServletException { - - } - - @Override - public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) - throws IOException, ServletException { - ServletRequest requestWrapper = null; - if (request instanceof HttpServletRequest - && StringUtils.startsWithIgnoreCase(request.getContentType(), MediaType.APPLICATION_JSON_VALUE)) { - requestWrapper = new RepeatedlyRequestWrapper((HttpServletRequest) request, response); - } - if (null == requestWrapper) { - chain.doFilter(request, response); - } else { - chain.doFilter(requestWrapper, response); - } - } - - @Override - public void destroy() { - - } -} diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/filter/RepeatedlyRequestWrapper.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/filter/RepeatedlyRequestWrapper.java deleted file mode 100644 index 3a73d34..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/filter/RepeatedlyRequestWrapper.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.xmzs.common.web.filter; - -import cn.hutool.core.io.IoUtil; -import com.xmzs.common.core.constant.Constants; - -import jakarta.servlet.ReadListener; -import jakarta.servlet.ServletInputStream; -import jakarta.servlet.ServletResponse; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletRequestWrapper; - -import java.io.BufferedReader; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStreamReader; - -/** - * 鏋勫缓鍙噸澶嶈鍙杋nputStream鐨剅equest - * - * @author ruoyi - */ -public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper { - private final byte[] body; - - public RepeatedlyRequestWrapper(HttpServletRequest request, ServletResponse response) throws IOException { - super(request); - request.setCharacterEncoding(Constants.UTF8); - response.setCharacterEncoding(Constants.UTF8); - - body = IoUtil.readBytes(request.getInputStream(), false); - } - - @Override - public BufferedReader getReader() throws IOException { - return new BufferedReader(new InputStreamReader(getInputStream())); - } - - @Override - public ServletInputStream getInputStream() throws IOException { - final ByteArrayInputStream bais = new ByteArrayInputStream(body); - return new ServletInputStream() { - @Override - public int read() throws IOException { - return bais.read(); - } - - @Override - public int available() throws IOException { - return body.length; - } - - @Override - public boolean isFinished() { - return false; - } - - @Override - public boolean isReady() { - return false; - } - - @Override - public void setReadListener(ReadListener readListener) { - - } - }; - } -} diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/filter/XssFilter.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/filter/XssFilter.java deleted file mode 100644 index 84e459f..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/filter/XssFilter.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.xmzs.common.web.filter; - -import com.xmzs.common.core.utils.StringUtils; -import org.springframework.http.HttpMethod; - -import jakarta.servlet.*; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** - * 闃叉XSS鏀诲嚮鐨勮繃婊ゅ櫒 - * - * @author ruoyi - */ -public class XssFilter implements Filter { - /** - * 鎺掗櫎閾炬帴 - */ - public List<String> excludes = new ArrayList<>(); - - @Override - public void init(FilterConfig filterConfig) throws ServletException { - String tempExcludes = filterConfig.getInitParameter("excludes"); - if (StringUtils.isNotEmpty(tempExcludes)) { - String[] url = tempExcludes.split(StringUtils.SEPARATOR); - for (int i = 0; url != null && i < url.length; i++) { - excludes.add(url[i]); - } - } - } - - @Override - public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) - throws IOException, ServletException { - HttpServletRequest req = (HttpServletRequest) request; - HttpServletResponse resp = (HttpServletResponse) response; - if (handleExcludeURL(req, resp)) { - chain.doFilter(request, response); - return; - } - XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper((HttpServletRequest) request); - chain.doFilter(xssRequest, response); - } - - private boolean handleExcludeURL(HttpServletRequest request, HttpServletResponse response) { - String url = request.getServletPath(); - String method = request.getMethod(); - // GET DELETE 涓嶈繃婊� - if (method == null || HttpMethod.GET.matches(method) || HttpMethod.DELETE.matches(method)) { - return true; - } - return StringUtils.matches(url, excludes); - } - - @Override - public void destroy() { - - } -} diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/filter/XssHttpServletRequestWrapper.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/filter/XssHttpServletRequestWrapper.java deleted file mode 100644 index 44d8cf8..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/filter/XssHttpServletRequestWrapper.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.xmzs.common.web.filter; - -import cn.hutool.core.io.IoUtil; -import cn.hutool.core.util.StrUtil; -import cn.hutool.http.HtmlUtil; -import com.xmzs.common.core.utils.StringUtils; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; - -import jakarta.servlet.ReadListener; -import jakarta.servlet.ServletInputStream; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletRequestWrapper; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.nio.charset.StandardCharsets; - -/** - * XSS杩囨护澶勭悊 - * - * @author ruoyi - */ -public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper { - /** - * @param request - */ - public XssHttpServletRequestWrapper(HttpServletRequest request) { - super(request); - } - - @Override - public String[] getParameterValues(String name) { - String[] values = super.getParameterValues(name); - if (values != null) { - int length = values.length; - String[] escapseValues = new String[length]; - for (int i = 0; i < length; i++) { - // 闃瞲ss鏀诲嚮鍜岃繃婊ゅ墠鍚庣┖鏍� - escapseValues[i] = HtmlUtil.cleanHtmlTag(values[i]).trim(); - } - return escapseValues; - } - return super.getParameterValues(name); - } - - @Override - public ServletInputStream getInputStream() throws IOException { - // 闈瀓son绫诲瀷锛岀洿鎺ヨ繑鍥� - if (!isJsonRequest()) { - return super.getInputStream(); - } - - // 涓虹┖锛岀洿鎺ヨ繑鍥� - String json = StrUtil.str(IoUtil.readBytes(super.getInputStream(), false), StandardCharsets.UTF_8); - if (StringUtils.isEmpty(json)) { - return super.getInputStream(); - } - - // xss杩囨护 - json = HtmlUtil.cleanHtmlTag(json).trim(); - byte[] jsonBytes = json.getBytes(StandardCharsets.UTF_8); - final ByteArrayInputStream bis = IoUtil.toStream(jsonBytes); - return new ServletInputStream() { - @Override - public boolean isFinished() { - return true; - } - - @Override - public boolean isReady() { - return true; - } - - @Override - public int available() throws IOException { - return jsonBytes.length; - } - - @Override - public void setReadListener(ReadListener readListener) { - } - - @Override - public int read() throws IOException { - return bis.read(); - } - }; - } - - /** - * 鏄惁鏄疛son璇锋眰 - */ - public boolean isJsonRequest() { - String header = super.getHeader(HttpHeaders.CONTENT_TYPE); - return StringUtils.startsWithIgnoreCase(header, MediaType.APPLICATION_JSON_VALUE); - } -} diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/interceptor/PlusWebInvokeTimeInterceptor.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/interceptor/PlusWebInvokeTimeInterceptor.java deleted file mode 100644 index 7f8a4e4..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/interceptor/PlusWebInvokeTimeInterceptor.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.xmzs.common.web.interceptor; - -import cn.hutool.core.io.IoUtil; -import cn.hutool.core.map.MapUtil; -import com.alibaba.ttl.TransmittableThreadLocal; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.json.utils.JsonUtils; -import com.xmzs.common.web.filter.RepeatedlyRequestWrapper; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.time.StopWatch; -import org.springframework.http.MediaType; -import org.springframework.web.servlet.HandlerInterceptor; -import org.springframework.web.servlet.ModelAndView; - -import java.io.BufferedReader; -import java.util.Map; - -/** - * web鐨勮皟鐢ㄦ椂闂寸粺璁℃嫤鎴櫒 - * dev鐜鏈夋晥 - * - * @author Lion Li - * @since 3.3.0 - */ -@Slf4j -public class PlusWebInvokeTimeInterceptor implements HandlerInterceptor { - - private final String prodProfile = "prod"; - - private final TransmittableThreadLocal<StopWatch> invokeTimeTL = new TransmittableThreadLocal<>(); - - @Override - public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { - if (!prodProfile.equals(SpringUtils.getActiveProfile())) { - String url = request.getMethod() + " " + request.getRequestURI(); - - // 鎵撳嵃璇锋眰鍙傛暟 - if (isJsonRequest(request)) { - String jsonParam = ""; - if (request instanceof RepeatedlyRequestWrapper) { - BufferedReader reader = request.getReader(); - jsonParam = IoUtil.read(reader); - } - log.debug("[PLUS]寮�濮嬭姹� => URL[{}],鍙傛暟绫诲瀷[json],鍙傛暟:[{}]", url, jsonParam); - } else { - Map<String, String[]> parameterMap = request.getParameterMap(); - if (MapUtil.isNotEmpty(parameterMap)) { - String parameters = JsonUtils.toJsonString(parameterMap); - log.debug("[PLUS]寮�濮嬭姹� => URL[{}],鍙傛暟绫诲瀷[param],鍙傛暟:[{}]", url, parameters); - } else { - log.debug("[PLUS]寮�濮嬭姹� => URL[{}],鏃犲弬鏁�", url); - } - } - - StopWatch stopWatch = new StopWatch(); - invokeTimeTL.set(stopWatch); - stopWatch.start(); - } - return true; - } - - @Override - public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { - - } - - @Override - public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { -// if (!prodProfile.equals(SpringUtils.getActiveProfile())) { -// StopWatch stopWatch = invokeTimeTL.get(); -// stopWatch.stop(); -// log.debug("[PLUS]缁撴潫璇锋眰 => URL[{}],鑰楁椂:[{}]姣", request.getMethod() + " " + request.getRequestURI(), stopWatch.getTime()); -// invokeTimeTL.remove(); -// } - } - - /** - * 鍒ゆ柇鏈璇锋眰鐨勬暟鎹被鍨嬫槸鍚︿负json - * - * @param request request - * @return boolean - */ - private boolean isJsonRequest(HttpServletRequest request) { - String contentType = request.getContentType(); - if (contentType != null) { - return StringUtils.startsWithIgnoreCase(contentType, MediaType.APPLICATION_JSON_VALUE); - } - return false; - } - -} diff --git a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/utils/UnsignedMathGenerator.java b/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/utils/UnsignedMathGenerator.java deleted file mode 100644 index aec75e5..0000000 --- a/ruoyi-common/ruoyi-common-web/src/main/java/com/xmzs/common/web/utils/UnsignedMathGenerator.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.xmzs.common.web.utils; - -import cn.hutool.captcha.generator.CodeGenerator; -import cn.hutool.core.math.Calculator; -import cn.hutool.core.util.CharUtil; -import cn.hutool.core.util.RandomUtil; -import com.xmzs.common.core.utils.StringUtils; - -import java.io.Serial; - -/** - * 鏃犵鍙疯绠楃敓鎴愬櫒 - * - * @author Lion Li - */ -public class UnsignedMathGenerator implements CodeGenerator { - - @Serial - private static final long serialVersionUID = -5514819971774091076L; - - private static final String OPERATORS = "+-*"; - - /** - * 鍙備笌璁$畻鏁板瓧鏈�澶ч暱搴� - */ - private final int numberLength; - - /** - * 鏋勯�� - */ - public UnsignedMathGenerator() { - this(2); - } - - /** - * 鏋勯�� - * - * @param numberLength 鍙備笌璁$畻鏈�澶ф暟瀛椾綅鏁� - */ - public UnsignedMathGenerator(int numberLength) { - this.numberLength = numberLength; - } - - @Override - public String generate() { - final int limit = getLimit(); - int a = RandomUtil.randomInt(limit); - int b = RandomUtil.randomInt(limit); - String max = Integer.toString(Math.max(a,b)); - String min = Integer.toString(Math.min(a,b)); - max = StringUtils.rightPad(max, this.numberLength, CharUtil.SPACE); - min = StringUtils.rightPad(min, this.numberLength, CharUtil.SPACE); - - return max + RandomUtil.randomChar(OPERATORS) + min + '='; - } - - @Override - public boolean verify(String code, String userInputCode) { - int result; - try { - result = Integer.parseInt(userInputCode); - } catch (NumberFormatException e) { - // 鐢ㄦ埛杈撳叆闈炴暟瀛� - return false; - } - - final int calculateResult = (int) Calculator.conversion(code); - return result == calculateResult; - } - - /** - * 鑾峰彇楠岃瘉鐮侀暱搴� - * - * @return 楠岃瘉鐮侀暱搴� - */ - public int getLength() { - return this.numberLength * 2 + 2; - } - - /** - * 鏍规嵁闀垮害鑾峰彇鍙備笌璁$畻鏁板瓧鏈�澶у�� - * - * @return 鏈�澶у�� - */ - private int getLimit() { - return Integer.parseInt("1" + StringUtils.repeat('0', this.numberLength)); - } -} diff --git a/ruoyi-common/ruoyi-common-wechat/pom.xml b/ruoyi-common/ruoyi-common-wechat/pom.xml index 4d61230..26ac86c 100644 --- a/ruoyi-common/ruoyi-common-wechat/pom.xml +++ b/ruoyi-common/ruoyi-common-wechat/pom.xml @@ -1,51 +1,68 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> +<?xml version="1.0" encoding="UTF-8"?> +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> <parent> - <groupId>com.xmzs</groupId> + <groupId>org.ruoyi</groupId> <artifactId>ruoyi-common</artifactId> <version>${revision}</version> <relativePath>../pom.xml</relativePath> </parent> - - <modelVersion>4.0.0</modelVersion> - <artifactId>ruoyi-common-wechat</artifactId> - - <description> - ruoyi-common-wechat 寰俊鏈嶅姟 - </description> - + <version>1.0.0</version> + <description>ruoyi-common-wechat 寰俊鏈嶅姟</description> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> - <!-- emoji --> + <dependency> + <groupId>com.jfinal</groupId> + <artifactId>jfinal</artifactId> + <version>3.5</version> + </dependency> + <dependency> + <groupId>com.jfinal</groupId> + <artifactId>cos</artifactId> + <version>2017.5</version> + </dependency> + + <dependency> + <groupId>com.jfinal</groupId> + <artifactId>jfinal-undertow</artifactId> + <version>1.4</version> + </dependency> + + <dependency> + <groupId>com.alibaba</groupId> + <artifactId>druid</artifactId> + <version>1.0.29</version> + </dependency> + <dependency> <groupId>com.vdurmont</groupId> <artifactId>emoji-java</artifactId> <version>3.2.0</version> </dependency> - - <!-- https://mvnrepository.com/artifact/javax.activation/activation --> <dependency> <groupId>javax.activation</groupId> <artifactId>activation</artifactId> <version>1.1.1</version> </dependency> - - <!-- qq --> <dependency> <groupId>net.mamoe</groupId> <artifactId>mirai-core-jvm</artifactId> <version>2.16.0</version> </dependency> - <dependency> - <groupId>com.xmzs</groupId> + <groupId>org.ruoyi</groupId> <artifactId>ruoyi-common-json</artifactId> </dependency> + <dependency> + <groupId>com.alibaba</groupId> + <artifactId>fastjson</artifactId> + <version>1.2.31</version> + </dependency> </dependencies> - </project> diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/Wechat.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/Wechat.java deleted file mode 100644 index 59158fc..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/Wechat.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.xmzs.common.wechat; - -import com.xmzs.common.wechat.core.MsgCenter; -import com.xmzs.common.wechat.face.IMsgHandlerFace; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - - - -public class Wechat { - private static final Logger LOG = LoggerFactory.getLogger(Wechat.class); - private IMsgHandlerFace msgHandler; - - public Wechat(IMsgHandlerFace msgHandler) { - System.setProperty("jsse.enableSNIExtension", "false"); // 闃叉SSL閿欒 - this.msgHandler = msgHandler; - } - - public void start() { - LOG.info("+++++++++++++++++++寮�濮嬫秷鎭鐞�+++++++++++++++++++++"); - new Thread(new Runnable() { - @Override - public void run() { - MsgCenter.handleMsg(msgHandler); - } - }).start(); - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/api/AssistTools.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/api/AssistTools.java deleted file mode 100644 index 9d3d032..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/api/AssistTools.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.xmzs.common.wechat.api; - -import java.io.File; -import java.io.IOException; - -import okhttp3.Call; -import okhttp3.MediaType; -import okhttp3.MultipartBody; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.RequestBody; -import okhttp3.Response; - -/** - * 杈呭姪宸ュ叿绫伙紝璇ョ被鏆傛椂鏈敤锛岃蹇界暐 - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�5鏈�22鏃� 涓嬪崍10:34:46 - * @version 1.0 - * - */ -public class AssistTools { - private static OkHttpClient client = new OkHttpClient(); - private static final MediaType MEDIA_TYPE_PNG = MediaType.parse("image/png"); - - public static boolean sendQrPicToServer(String username, String password, String uploadUrl, String localPath) - throws IOException { - File file = new File(localPath); - RequestBody requestBody = new MultipartBody.Builder().addFormDataPart("username", username) - .addFormDataPart("password", password) - .addFormDataPart("file", file.getName(), RequestBody.create(MEDIA_TYPE_PNG, file)).build(); - Request request = new Request.Builder().url(uploadUrl).post(requestBody).build(); - Call call = client.newCall(request); - try { - Response response = call.execute(); - System.out.println(response.body().string()); - } catch (IOException e) { - e.printStackTrace(); - } - return true; - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/api/MessageTools.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/api/MessageTools.java deleted file mode 100644 index ed0bb4e..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/api/MessageTools.java +++ /dev/null @@ -1,424 +0,0 @@ -package com.xmzs.common.wechat.api; - -import java.io.File; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; - -import javax.activation.MimetypesFileTypeMap; - -import org.apache.commons.lang3.StringUtils; -import org.apache.http.Consts; -import org.apache.http.HttpEntity; -import org.apache.http.entity.ContentType; -import org.apache.http.entity.mime.HttpMultipartMode; -import org.apache.http.entity.mime.MultipartEntityBuilder; -import org.apache.http.util.EntityUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; - -import com.xmzs.common.wechat.beans.BaseMsg; -import com.xmzs.common.wechat.beans.RecommendInfo; -import com.xmzs.common.wechat.core.Core; -import com.xmzs.common.wechat.utils.Config; -import com.xmzs.common.wechat.utils.MyHttpClient; -import com.xmzs.common.wechat.utils.enums.StorageLoginInfoEnum; -import com.xmzs.common.wechat.utils.enums.URLEnum; -import com.xmzs.common.wechat.utils.enums.VerifyFriendEnum; - -/** - * 娑堟伅澶勭悊绫� - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�23鏃� 涓嬪崍2:30:37 - * @version 1.0 - * - */ -public class MessageTools { - private static Logger LOG = LoggerFactory.getLogger(MessageTools.class); - private static Core core = Core.getInstance(); - private static MyHttpClient myHttpClient = core.getMyHttpClient(); - - /** - * 鏍规嵁UserName鍙戦�佹枃鏈秷鎭� - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�4鏃� 涓嬪崍11:17:38 - * @param msg - * @param toUserName - */ - private static void sendMsg(String text, String toUserName) { - if (text == null) { - return; - } - LOG.info(String.format("鍙戦�佹秷鎭� %s: %s", toUserName, text)); - webWxSendMsg(1, text, toUserName); - } - - /** - * 鏍规嵁ID鍙戦�佹枃鏈秷鎭� - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�6鏃� 涓婂崍11:45:51 - * @param text - * @param id - */ - public static void sendMsgById(String text, String id) { - if (text == null) { - return; - } - sendMsg(text, id); - } - - /** - * 鏍规嵁NickName鍙戦�佹枃鏈秷鎭� - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�4鏃� 涓嬪崍11:17:38 - * @param text - * @param nickName - */ - public static boolean sendMsgByNickName(String text, String nickName) { - if (nickName != null) { - String toUserName = WechatTools.getUserNameByNickName(nickName); - if (toUserName != null) { - webWxSendMsg(1, text, toUserName); - return true; - } - } - return false; - - } - - /** - * 娑堟伅鍙戦�� - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�23鏃� 涓嬪崍2:32:02 - * @param msgType - * @param content - * @param toUserName - */ - public static void webWxSendMsg(int msgType, String content, String toUserName) { - String url = String.format(URLEnum.WEB_WX_SEND_MSG.getUrl(), core.getLoginInfo().get("url")); - Map<String, Object> msgMap = new HashMap<String, Object>(); - msgMap.put("Type", msgType); - msgMap.put("Content", content); - msgMap.put("FromUserName", core.getUserName()); - msgMap.put("ToUserName", toUserName == null ? core.getUserName() : toUserName); - msgMap.put("LocalID", new Date().getTime() * 10); - msgMap.put("ClientMsgId", new Date().getTime() * 10); - Map<String, Object> paramMap = core.getParamMap(); - paramMap.put("Msg", msgMap); - paramMap.put("Scene", 0); - try { - String paramStr = JSON.toJSONString(paramMap); - HttpEntity entity = myHttpClient.doPost(url, paramStr); - EntityUtils.toString(entity, Consts.UTF_8); - } catch (Exception e) { - LOG.error("webWxSendMsg", e); - } - } - - /** - * 涓婁紶澶氬獟浣撴枃浠跺埌 寰俊鏈嶅姟鍣紝鐩墠搴旇鏀寔3绉嶇被鍨�: 1. pic 鐩存帴鏄剧ず锛屽寘鍚浘鐗囷紝琛ㄦ儏 2.video 3.doc 鏄剧ず涓烘枃浠讹紝鍖呭惈PDF绛� - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�7鏃� 涓婂崍12:41:13 - * @param filePath - * @return - */ - private static JSONObject webWxUploadMedia(String filePath) { - File file = new File(filePath); - if (!file.exists() && file.isFile()) { - LOG.info("file is not exist"); - return null; - } - String url = String.format(URLEnum.WEB_WX_UPLOAD_MEDIA.getUrl(), core.getLoginInfo().get("fileUrl")); - String mimeType = new MimetypesFileTypeMap().getContentType(file); - String mediaType = ""; - if (mimeType == null) { - mimeType = "text/plain"; - } else { - mediaType = mimeType.split("/")[0].equals("image") ? "pic" : "doc"; - } - String lastModifieDate = new SimpleDateFormat("yyyy MM dd HH:mm:ss").format(new Date()); - long fileSize = file.length(); - String passTicket = (String) core.getLoginInfo().get("pass_ticket"); - String clientMediaId = new Date().getTime() - + String.valueOf(new Random().nextLong()).substring(0, 4); - String webwxDataTicket = MyHttpClient.getCookie("webwx_data_ticket"); - if (webwxDataTicket == null) { - LOG.error("get cookie webwx_data_ticket error"); - return null; - } - - Map<String, Object> paramMap = core.getParamMap(); - - paramMap.put("ClientMediaId", clientMediaId); - paramMap.put("TotalLen", fileSize); - paramMap.put("StartPos", 0); - paramMap.put("DataLen", fileSize); - paramMap.put("MediaType", 4); - - MultipartEntityBuilder builder = MultipartEntityBuilder.create(); - builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE); - - builder.addTextBody("id", "WU_FILE_0", ContentType.TEXT_PLAIN); - builder.addTextBody("name", filePath, ContentType.TEXT_PLAIN); - builder.addTextBody("type", mimeType, ContentType.TEXT_PLAIN); - builder.addTextBody("lastModifieDate", lastModifieDate, ContentType.TEXT_PLAIN); - builder.addTextBody("size", String.valueOf(fileSize), ContentType.TEXT_PLAIN); - builder.addTextBody("mediatype", mediaType, ContentType.TEXT_PLAIN); - builder.addTextBody("uploadmediarequest", JSON.toJSONString(paramMap), ContentType.TEXT_PLAIN); - builder.addTextBody("webwx_data_ticket", webwxDataTicket, ContentType.TEXT_PLAIN); - builder.addTextBody("pass_ticket", passTicket, ContentType.TEXT_PLAIN); - builder.addBinaryBody("filename", file, ContentType.create(mimeType), filePath); - HttpEntity reqEntity = builder.build(); - HttpEntity entity = myHttpClient.doPostFile(url, reqEntity); - if (entity != null) { - try { - String result = EntityUtils.toString(entity, Consts.UTF_8); - return JSON.parseObject(result); - } catch (Exception e) { - LOG.error("webWxUploadMedia 閿欒锛� ", e); - } - - } - return null; - } - - /** - * 鏍规嵁NickName鍙戦�佸浘鐗囨秷鎭� - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�7鏃� 涓嬪崍10:32:45 - * @param nackName - * @return - */ - public static boolean sendPicMsgByNickName(String nickName, String filePath) { - String toUserName = WechatTools.getUserNameByNickName(nickName); - if (toUserName != null) { - return sendPicMsgByUserId(toUserName, filePath); - } - return false; - } - - /** - * 鏍规嵁鐢ㄦ埛id鍙戦�佸浘鐗囨秷鎭� - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�7鏃� 涓嬪崍10:34:24 - * @param userId - * @param filePath - * @return - */ - public static boolean sendPicMsgByUserId(String userId, String filePath) { - JSONObject responseObj = webWxUploadMedia(filePath); - if (responseObj != null) { - String mediaId = responseObj.getString("MediaId"); - if (mediaId != null) { - return webWxSendMsgImg(userId, mediaId); - } - } - return false; - } - - /** - * 鍙戦�佸浘鐗囨秷鎭紝鍐呴儴璋冪敤 - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�7鏃� 涓嬪崍10:38:55 - * @return - */ - private static boolean webWxSendMsgImg(String userId, String mediaId) { - String url = String.format("%s/webwxsendmsgimg?fun=async&f=json&pass_ticket=%s", core.getLoginInfo().get("url"), - core.getLoginInfo().get("pass_ticket")); - Map<String, Object> msgMap = new HashMap<String, Object>(); - msgMap.put("Type", 3); - msgMap.put("MediaId", mediaId); - msgMap.put("FromUserName", core.getUserSelf().getString("UserName")); - msgMap.put("ToUserName", userId); - String clientMsgId = String.valueOf(new Date().getTime()) - + String.valueOf(new Random().nextLong()).substring(1, 5); - msgMap.put("LocalID", clientMsgId); - msgMap.put("ClientMsgId", clientMsgId); - Map<String, Object> paramMap = core.getParamMap(); - paramMap.put("BaseRequest", core.getParamMap().get("BaseRequest")); - paramMap.put("Msg", msgMap); - String paramStr = JSON.toJSONString(paramMap); - HttpEntity entity = myHttpClient.doPost(url, paramStr); - if (entity != null) { - try { - String result = EntityUtils.toString(entity, Consts.UTF_8); - return JSON.parseObject(result).getJSONObject("BaseResponse").getInteger("Ret") == 0; - } catch (Exception e) { - LOG.error("webWxSendMsgImg 閿欒锛� ", e); - } - } - return false; - - } - - /** - * 鏍规嵁鐢ㄦ埛id鍙戦�佹枃浠� - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�7鏃� 涓嬪崍11:57:36 - * @param userId - * @param filePath - * @return - */ - public static boolean sendFileMsgByUserId(String userId, String filePath) { - String title = new File(filePath).getName(); - Map<String, String> data = new HashMap<String, String>(); - data.put("appid", Config.API_WXAPPID); - data.put("title", title); - data.put("totallen", ""); - data.put("attachid", ""); - data.put("type", "6"); // APPMSGTYPE_ATTACH - data.put("fileext", title.split("\\.")[1]); // 鏂囦欢鍚庣紑 - JSONObject responseObj = webWxUploadMedia(filePath); - if (responseObj != null) { - data.put("totallen", responseObj.getString("StartPos")); - data.put("attachid", responseObj.getString("MediaId")); - } else { - LOG.error("sednFileMsgByUserId 閿欒: ", data); - } - return webWxSendAppMsg(userId, data); - } - - /** - * 鏍规嵁鐢ㄦ埛鏄电О鍙戦�佹枃浠舵秷鎭� - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�10鏃� 涓嬪崍10:59:27 - * @param nickName - * @param filePath - * @return - */ - public static boolean sendFileMsgByNickName(String nickName, String filePath) { - String toUserName = WechatTools.getUserNameByNickName(nickName); - if (toUserName != null) { - return sendFileMsgByUserId(toUserName, filePath); - } - return false; - } - - /** - * 鍐呴儴璋冪敤 - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�10鏃� 涓婂崍12:21:28 - * @param userId - * @param data - * @return - */ - private static boolean webWxSendAppMsg(String userId, Map<String, String> data) { - String url = String.format("%s/webwxsendappmsg?fun=async&f=json&pass_ticket=%s", core.getLoginInfo().get("url"), - core.getLoginInfo().get("pass_ticket")); - String clientMsgId = String.valueOf(new Date().getTime()) - + String.valueOf(new Random().nextLong()).substring(1, 5); - String content = "<appmsg appid='wxeb7ec651dd0aefa9' sdkver=''><title>" + data.get("title") - + "</title><des></des><action></action><type>6</type><content></content><url></url><lowurl></lowurl>" - + "<appattach><totallen>" + data.get("totallen") + "</totallen><attachid>" + data.get("attachid") - + "</attachid><fileext>" + data.get("fileext") + "</fileext></appattach><extinfo></extinfo></appmsg>"; - Map<String, Object> msgMap = new HashMap<String, Object>(); - msgMap.put("Type", data.get("type")); - msgMap.put("Content", content); - msgMap.put("FromUserName", core.getUserSelf().getString("UserName")); - msgMap.put("ToUserName", userId); - msgMap.put("LocalID", clientMsgId); - msgMap.put("ClientMsgId", clientMsgId); - /* - * Map<String, Object> paramMap = new HashMap<String, Object>(); - * - * @SuppressWarnings("unchecked") Map<String, Map<String, String>> - * baseRequestMap = (Map<String, Map<String, String>>) - * core.getLoginInfo() .get("baseRequest"); paramMap.put("BaseRequest", - * baseRequestMap.get("BaseRequest")); - */ - - Map<String, Object> paramMap = core.getParamMap(); - paramMap.put("Msg", msgMap); - paramMap.put("Scene", 0); - String paramStr = JSON.toJSONString(paramMap); - HttpEntity entity = myHttpClient.doPost(url, paramStr); - if (entity != null) { - try { - String result = EntityUtils.toString(entity, Consts.UTF_8); - return JSON.parseObject(result).getJSONObject("BaseResponse").getInteger("Ret") == 0; - } catch (Exception e) { - LOG.error("閿欒: ", e); - } - } - return false; - } - - /** - * 琚姩娣诲姞濂藉弸 - * - * @date 2017骞�6鏈�29鏃� 涓嬪崍10:08:43 - * @param msg - * @param accept - * true 鎺ュ彈 false 鎷掔粷 - */ - public static void addFriend(BaseMsg msg, boolean accept) { - if (!accept) { // 涓嶆坊鍔� - return; - } - int status = VerifyFriendEnum.ACCEPT.getCode(); // 鎺ュ彈濂藉弸璇锋眰 - RecommendInfo recommendInfo = msg.getRecommendInfo(); - String userName = recommendInfo.getUserName(); - String ticket = recommendInfo.getTicket(); - // 鏇存柊濂藉弸鍒楄〃 - // TODO 姝ゅ闇�瑕佹洿鏂板ソ鍙嬪垪琛� - // core.getContactList().add(msg.getJSONObject("RecommendInfo")); - - String url = String.format(URLEnum.WEB_WX_VERIFYUSER.getUrl(), core.getLoginInfo().get("url"), - String.valueOf(System.currentTimeMillis() / 3158L), core.getLoginInfo().get("pass_ticket")); - - List<Map<String, Object>> verifyUserList = new ArrayList<Map<String, Object>>(); - Map<String, Object> verifyUser = new HashMap<String, Object>(); - verifyUser.put("Value", userName); - verifyUser.put("VerifyUserTicket", ticket); - verifyUserList.add(verifyUser); - - List<Integer> sceneList = new ArrayList<Integer>(); - sceneList.add(33); - - JSONObject body = new JSONObject(); - body.put("BaseRequest", core.getParamMap().get("BaseRequest")); - body.put("Opcode", status); - body.put("VerifyUserListSize", 1); - body.put("VerifyUserList", verifyUserList); - body.put("VerifyContent", ""); - body.put("SceneListCount", 1); - body.put("SceneList", sceneList); - body.put("skey", core.getLoginInfo().get(StorageLoginInfoEnum.skey.getKey())); - - String result = null; - try { - String paramStr = JSON.toJSONString(body); - HttpEntity entity = myHttpClient.doPost(url, paramStr); - result = EntityUtils.toString(entity, Consts.UTF_8); - } catch (Exception e) { - LOG.error("webWxSendMsg", e); - } - - if (StringUtils.isBlank(result)) { - LOG.error("琚姩娣诲姞濂藉弸澶辫触"); - } - - LOG.debug(result); - - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/api/WechatTools.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/api/WechatTools.java deleted file mode 100644 index 1be5e44..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/api/WechatTools.java +++ /dev/null @@ -1,215 +0,0 @@ -package com.xmzs.common.wechat.api; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.http.Consts; -import org.apache.http.HttpEntity; -import org.apache.http.message.BasicNameValuePair; -import org.apache.http.util.EntityUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; - -import com.xmzs.common.wechat.core.Core; -import com.xmzs.common.wechat.utils.enums.StorageLoginInfoEnum; -import com.xmzs.common.wechat.utils.enums.URLEnum; - -/** - * 寰俊灏忓伐鍏凤紝濡傝幏濂藉弸鍒楄〃绛� - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�5鏈�4鏃� 涓嬪崍10:49:16 - * @version 1.0 - * - */ -public class WechatTools { - private static Logger LOG = LoggerFactory.getLogger(WechatTools.class); - - private static Core core = Core.getInstance(); - - /** - * 鏍规嵁鐢ㄦ埛鍚嶅彂閫佹枃鏈秷鎭� - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�4鏃� 涓嬪崍10:43:14 - * @param msg - * @param toUserName - */ - public static void sendMsgByUserName(String msg, String toUserName) { - MessageTools.sendMsgById(msg, toUserName); - } - - /** - * <p> - * 閫氳繃RealName鑾峰彇鏈UserName - * </p> - * <p> - * 濡侼ickName涓�"yaphone"锛屽垯鑾峰彇UserName= - * "@1212d3356aea8285e5bbe7b91229936bc183780a8ffa469f2d638bf0d2e4fc63"锛� - * 鍙�氳繃UserName鍙戦�佹秷鎭� - * </p> - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�4鏃� 涓嬪崍10:56:31 - * @param name - * @return - */ - public static String getUserNameByNickName(String nickName) { - for (JSONObject o : core.getContactList()) { - if (o.getString("NickName").equals(nickName)) { - return o.getString("UserName"); - } - } - return null; - } - - /** - * 杩斿洖濂藉弸鏄电О鍒楄〃 - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�4鏃� 涓嬪崍11:37:20 - * @return - */ - public static List<String> getContactNickNameList() { - List<String> contactNickNameList = new ArrayList<String>(); - for (JSONObject o : core.getContactList()) { - contactNickNameList.add(o.getString("NickName")); - } - return contactNickNameList; - } - - /** - * 杩斿洖濂藉弸瀹屾暣淇℃伅鍒楄〃 - * - * @date 2017骞�6鏈�26鏃� 涓嬪崍9:45:39 - * @return - */ - public static List<JSONObject> getContactList() { - return core.getContactList(); - } - - /** - * 杩斿洖缇ゅ垪琛� - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�5鏃� 涓嬪崍9:55:21 - * @return - */ - public static List<JSONObject> getGroupList() { - return core.getGroupList(); - } - - /** - * 鑾峰彇缇D鍒楄〃 - * - * @date 2017骞�6鏈�21鏃� 涓嬪崍11:42:56 - * @return - */ - public static List<String> getGroupIdList() { - return core.getGroupIdList(); - } - - /** - * 鑾峰彇缇ickName鍒楄〃 - * - * @date 2017骞�6鏈�21鏃� 涓嬪崍11:43:38 - * @return - */ - public static List<String> getGroupNickNameList() { - return core.getGroupNickNameList(); - } - - /** - * 鏍规嵁groupIdList杩斿洖缇ゆ垚鍛樺垪琛� - * - * @date 2017骞�6鏈�13鏃� 涓嬪崍11:12:31 - * @param groupId - * @return - */ - public static JSONArray getMemberListByGroupId(String groupId) { - return core.getGroupMemeberMap().get(groupId); - } - - /** - * 閫�鍑哄井淇� - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�18鏃� 涓嬪崍11:56:54 - */ - public static void logout() { - webWxLogout(); - } - - private static boolean webWxLogout() { - String url = String.format(URLEnum.WEB_WX_LOGOUT.getUrl(), - core.getLoginInfo().get(StorageLoginInfoEnum.url.getKey())); - List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>(); - params.add(new BasicNameValuePair("redirect", "1")); - params.add(new BasicNameValuePair("type", "1")); - params.add( - new BasicNameValuePair("skey", (String) core.getLoginInfo().get(StorageLoginInfoEnum.skey.getKey()))); - try { - HttpEntity entity = core.getMyHttpClient().doGet(url, params, false, null); - String text = EntityUtils.toString(entity, Consts.UTF_8); // 鏃犳秷鎭� - return true; - } catch (Exception e) { - LOG.debug(e.getMessage()); - } - return false; - } - - public static void setUserInfo() { - for (JSONObject o : core.getContactList()) { - core.getUserInfoMap().put(o.getString("NickName"), o); - core.getUserInfoMap().put(o.getString("UserName"), o); - } - } - - /** - * - * 鏍规嵁鐢ㄦ埛鏄电О璁剧疆澶囨敞鍚嶇О - * - * @date 2017骞�5鏈�27鏃� 涓婂崍12:21:40 - * @param userName - * @param remName - */ - public static void remarkNameByNickName(String nickName, String remName) { - String url = String.format(URLEnum.WEB_WX_REMARKNAME.getUrl(), core.getLoginInfo().get("url"), - core.getLoginInfo().get(StorageLoginInfoEnum.pass_ticket.getKey())); - Map<String, Object> msgMap = new HashMap<String, Object>(); - Map<String, Object> msgMap_BaseRequest = new HashMap<String, Object>(); - msgMap.put("CmdId", 2); - msgMap.put("RemarkName", remName); - msgMap.put("UserName", core.getUserInfoMap().get(nickName).get("UserName")); - msgMap_BaseRequest.put("Uin", core.getLoginInfo().get(StorageLoginInfoEnum.wxuin.getKey())); - msgMap_BaseRequest.put("Sid", core.getLoginInfo().get(StorageLoginInfoEnum.wxsid.getKey())); - msgMap_BaseRequest.put("Skey", core.getLoginInfo().get(StorageLoginInfoEnum.skey.getKey())); - msgMap_BaseRequest.put("DeviceID", core.getLoginInfo().get(StorageLoginInfoEnum.deviceid.getKey())); - msgMap.put("BaseRequest", msgMap_BaseRequest); - try { - String paramStr = JSON.toJSONString(msgMap); - HttpEntity entity = core.getMyHttpClient().doPost(url, paramStr); - // String result = EntityUtils.toString(entity, Consts.UTF_8); - LOG.info("淇敼澶囨敞" + remName); - } catch (Exception e) { - LOG.error("remarkNameByUserName", e); - } - } - - /** - * 鑾峰彇寰俊鍦ㄧ嚎鐘舵�� - * - * @date 2017骞�6鏈�16鏃� 涓婂崍12:47:46 - * @return - */ - public static boolean getWechatStatus() { - return core.isAlive(); - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/beans/AppInfo.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/beans/AppInfo.java deleted file mode 100644 index 77e9443..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/beans/AppInfo.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.xmzs.common.wechat.beans; - -import java.io.Serializable; - -/** - * AppInfo - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�7鏈�3鏃� 涓嬪崍10:38:14 - * @version 1.0 - * - */ -public class AppInfo implements Serializable { - /** - * - */ - private static final long serialVersionUID = 1L; - private int type; - private String appId; - - public int getType() { - return type; - } - - public void setType(int type) { - this.type = type; - } - - public String getAppId() { - return appId; - } - - public void setAppId(String appId) { - this.appId = appId; - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/beans/BaseMsg.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/beans/BaseMsg.java deleted file mode 100644 index 2e3506f..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/beans/BaseMsg.java +++ /dev/null @@ -1,293 +0,0 @@ -package com.xmzs.common.wechat.beans; - -import java.io.Serializable; - -/** - * 鏀跺埌鐨勫井淇℃秷鎭� - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�7鏈�3鏃� 涓嬪崍10:28:06 - * @version 1.0 - * - */ -public class BaseMsg implements Serializable { - /** - * - */ - private static final long serialVersionUID = 1L; - private int subMsgType; - private int voiceLength; - private String fileName; - private int imgHeight; - private String toUserName; - private int hasProductId; - private int imgStatus; - private String url; - private int imgWidth; - private int forwardFlag; - private int status; - private String Ticket; - /** 鎺ㄨ崘娑堟伅鎶ユ枃 **/ - private RecommendInfo recommendInfo; - private long createTime; - private String newMsgId; - /** 鏂囨湰娑堟伅鍐呭 **/ - private String text; - /** 娑堟伅绫诲瀷 **/ - private int msgType; - /** 鏄惁涓虹兢娑堟伅 **/ - private boolean groupMsg; - private String msgId; - private int statusNotifyCode; - private AppInfo appInfo; - private int appMsgType; - private String Type; - private int playLength; - private String mediaId; - private String content; - private String statusNotifyUserName; - /** 娑堟伅鍙戦�佽�匢D **/ - private String fromUserName; - private String oriContent; - private String fileSize; - - public int getSubMsgType() { - return subMsgType; - } - - public void setSubMsgType(int subMsgType) { - this.subMsgType = subMsgType; - } - - public int getVoiceLength() { - return voiceLength; - } - - public void setVoiceLength(int voiceLength) { - this.voiceLength = voiceLength; - } - - public String getFileName() { - return fileName; - } - - public void setFileName(String fileName) { - this.fileName = fileName; - } - - public int getImgHeight() { - return imgHeight; - } - - public void setImgHeight(int imgHeight) { - this.imgHeight = imgHeight; - } - - public String getToUserName() { - return toUserName; - } - - public void setToUserName(String toUserName) { - this.toUserName = toUserName; - } - - public int getHasProductId() { - return hasProductId; - } - - public void setHasProductId(int hasProductId) { - this.hasProductId = hasProductId; - } - - public int getImgStatus() { - return imgStatus; - } - - public void setImgStatus(int imgStatus) { - this.imgStatus = imgStatus; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public int getImgWidth() { - return imgWidth; - } - - public void setImgWidth(int imgWidth) { - this.imgWidth = imgWidth; - } - - public int getForwardFlag() { - return forwardFlag; - } - - public void setForwardFlag(int forwardFlag) { - this.forwardFlag = forwardFlag; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - - public String getTicket() { - return Ticket; - } - - public void setTicket(String ticket) { - Ticket = ticket; - } - - public RecommendInfo getRecommendInfo() { - return recommendInfo; - } - - public void setRecommendInfo(RecommendInfo recommendInfo) { - this.recommendInfo = recommendInfo; - } - - public long getCreateTime() { - return createTime; - } - - public void setCreateTime(long createTime) { - this.createTime = createTime; - } - - public String getNewMsgId() { - return newMsgId; - } - - public void setNewMsgId(String newMsgId) { - this.newMsgId = newMsgId; - } - - public String getText() { - return text; - } - - public void setText(String text) { - this.text = text; - } - - public int getMsgType() { - return msgType; - } - - public void setMsgType(int msgType) { - this.msgType = msgType; - } - - public boolean isGroupMsg() { - return groupMsg; - } - - public void setGroupMsg(boolean groupMsg) { - this.groupMsg = groupMsg; - } - - public String getMsgId() { - return msgId; - } - - public void setMsgId(String msgId) { - this.msgId = msgId; - } - - public int getStatusNotifyCode() { - return statusNotifyCode; - } - - public void setStatusNotifyCode(int statusNotifyCode) { - this.statusNotifyCode = statusNotifyCode; - } - - public AppInfo getAppInfo() { - return appInfo; - } - - public void setAppInfo(AppInfo appInfo) { - this.appInfo = appInfo; - } - - public int getAppMsgType() { - return appMsgType; - } - - public void setAppMsgType(int appMsgType) { - this.appMsgType = appMsgType; - } - - public String getType() { - return Type; - } - - public void setType(String type) { - Type = type; - } - - public int getPlayLength() { - return playLength; - } - - public void setPlayLength(int playLength) { - this.playLength = playLength; - } - - public String getMediaId() { - return mediaId; - } - - public void setMediaId(String mediaId) { - this.mediaId = mediaId; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public String getStatusNotifyUserName() { - return statusNotifyUserName; - } - - public void setStatusNotifyUserName(String statusNotifyUserName) { - this.statusNotifyUserName = statusNotifyUserName; - } - - public String getFromUserName() { - return fromUserName; - } - - public void setFromUserName(String fromUserName) { - this.fromUserName = fromUserName; - } - - public String getOriContent() { - return oriContent; - } - - public void setOriContent(String oriContent) { - this.oriContent = oriContent; - } - - public String getFileSize() { - return fileSize; - } - - public void setFileSize(String fileSize) { - this.fileSize = fileSize; - } -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/beans/RecommendInfo.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/beans/RecommendInfo.java deleted file mode 100644 index a2d0cf4..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/beans/RecommendInfo.java +++ /dev/null @@ -1,146 +0,0 @@ -package com.xmzs.common.wechat.beans; - -import java.io.Serializable; - -/** - * RecommendInfo - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�7鏈�3鏃� 涓嬪崍10:35:14 - * @version 1.0 - * - */ -public class RecommendInfo implements Serializable { - /** - * - */ - private static final long serialVersionUID = 1L; - - private String ticket; - private String userName; - private int sex; - private int attrStatus; - private String city; - private String nickName; - private int scene; - private String province; - private String content; - private String alias; - private String signature; - private int opCode; - private int qQNum; - private int verifyFlag; - - public String getTicket() { - return ticket; - } - - public void setTicket(String ticket) { - this.ticket = ticket; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public int getSex() { - return sex; - } - - public void setSex(int sex) { - this.sex = sex; - } - - public int getAttrStatus() { - return attrStatus; - } - - public void setAttrStatus(int attrStatus) { - this.attrStatus = attrStatus; - } - - public String getCity() { - return city; - } - - public void setCity(String city) { - this.city = city; - } - - public String getNickName() { - return nickName; - } - - public void setNickName(String nickName) { - this.nickName = nickName; - } - - public int getScene() { - return scene; - } - - public void setScene(int scene) { - this.scene = scene; - } - - public String getProvince() { - return province; - } - - public void setProvince(String province) { - this.province = province; - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content; - } - - public String getAlias() { - return alias; - } - - public void setAlias(String alias) { - this.alias = alias; - } - - public String getSignature() { - return signature; - } - - public void setSignature(String signature) { - this.signature = signature; - } - - public int getOpCode() { - return opCode; - } - - public void setOpCode(int opCode) { - this.opCode = opCode; - } - - public int getqQNum() { - return qQNum; - } - - public void setqQNum(int qQNum) { - this.qQNum = qQNum; - } - - public int getVerifyFlag() { - return verifyFlag; - } - - public void setVerifyFlag(int verifyFlag) { - this.verifyFlag = verifyFlag; - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/controller/LoginController.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/controller/LoginController.java deleted file mode 100644 index 4748348..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/controller/LoginController.java +++ /dev/null @@ -1,89 +0,0 @@ -package com.xmzs.common.wechat.controller; - - -import com.xmzs.common.core.exception.base.BaseException; -import com.xmzs.common.wechat.utils.SleepUtils; -import com.xmzs.common.wechat.utils.enums.URLEnum; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.xmzs.common.wechat.api.WechatTools; -import com.xmzs.common.wechat.core.Core; -import com.xmzs.common.wechat.service.ILoginService; -import com.xmzs.common.wechat.service.impl.LoginServiceImpl; -import com.xmzs.common.wechat.thread.CheckLoginStatusThread; - -import com.xmzs.common.wechat.utils.tools.CommonTools; - -/** - * 鐧婚檰鎺у埗鍣� - * - * @author https://github.com/yaphone - * @version 1.0 - * @date 鍒涘缓鏃堕棿锛�2017骞�5鏈�13鏃� 涓嬪崍12:56:07 - */ -public class LoginController { - private static Logger LOG = LoggerFactory.getLogger(LoginController.class); - private ILoginService loginService = new LoginServiceImpl(); - private static Core core = Core.getInstance(); - - - /** - * 鑾峰彇浜岀淮鐮佸湴鍧� - * 椋庨櫓:宸茬櫥褰曡处鍙蜂笉鍙皟鐢ㄨ鎺ュ彛,浼氱Щ闄ゅ綋鍓峜ore淇℃伅 - * @return - */ - public String login_1() { - if (core.isAlive()) { - LOG.warn("寰俊宸茬櫥闄�"); - throw new BaseException("寰俊宸茬櫥闄�"); - } - LOG.info("1.鑾峰彇寰俊UUID"); - while (loginService.getUuid() == null) { - LOG.warn("1.1. 鑾峰彇寰俊UUID澶辫触锛屼竴绉掑悗閲嶆柊鑾峰彇"); - SleepUtils.sleep(1000); - } - LOG.info("2. 鑾峰彇鐧婚檰浜岀淮鐮佸浘鐗�"); - return URLEnum.QRCODE_URL.getUrl() + core.getUuid(); - } - - - public void login_2() { - LOG.info("3. 璇锋壂鎻忎簩缁寸爜鍥剧墖锛屽苟鍦ㄦ墜鏈轰笂纭"); - if (!core.isAlive()) { - loginService.login(); - core.setAlive(true); - LOG.info(("鐧婚檰鎴愬姛")); - } - LOG.info("4. 鐧婚檰瓒呮椂锛岃閲嶆柊鎵弿浜岀淮鐮佸浘鐗�"); - - - LOG.info("5. 鐧婚檰鎴愬姛锛屽井淇″垵濮嬪寲"); - if (!loginService.webWxInit()) { - LOG.info("6. 寰俊鍒濆鍖栧紓甯�"); - System.exit(0); - } - - LOG.info("6. 寮�鍚井淇$姸鎬侀�氱煡"); - loginService.wxStatusNotify(); - - LOG.info("7. 娓呴櫎銆傘�傘�傘��"); - CommonTools.clearScreen(); - LOG.info(String.format("娆㈣繋鍥炴潵锛� %s", core.getNickName())); - - LOG.info("8. 寮�濮嬫帴鏀舵秷鎭�"); - loginService.startReceiving(); - - LOG.info("9. 鑾峰彇鑱旂郴浜轰俊鎭�"); - loginService.webWxGetContact(); - - LOG.info("10. 鑾峰彇缇ゅソ鍙嬪強缇ゅソ鍙嬪垪琛�"); - loginService.WebWxBatchGetContact(); - - LOG.info("11. 缂撳瓨鏈鐧婚檰濂藉弸鐩稿叧娑堟伅"); - WechatTools.setUserInfo(); // 鐧婚檰鎴愬姛鍚庣紦瀛樻湰娆$櫥闄嗗ソ鍙嬬浉鍏虫秷鎭紙NickName, UserName锛� - - LOG.info("12.寮�鍚井淇$姸鎬佹娴嬬嚎绋�"); - new Thread(new CheckLoginStatusThread()).start(); - } -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/core/Core.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/core/Core.java deleted file mode 100644 index e916932..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/core/Core.java +++ /dev/null @@ -1,276 +0,0 @@ -package com.xmzs.common.wechat.core; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; - -import com.xmzs.common.wechat.beans.BaseMsg; -import com.xmzs.common.wechat.utils.MyHttpClient; -import com.xmzs.common.wechat.utils.enums.parameters.BaseParaEnum; - -/** - * 鏍稿績瀛樺偍绫伙紝鍏ㄥ眬鍙繚瀛樹竴浠斤紝鍗曚緥妯″紡 - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�23鏃� 涓嬪崍2:33:56 - * @version 1.0 - * - */ -public class Core { - - private static Core instance; - - private Core() { - - } - - public static Core getInstance() { - if (instance == null) { - synchronized (Core.class) { - instance = new Core(); - } - } - return instance; - } - - boolean alive = false; - private int memberCount = 0; - - private String indexUrl; - - private String userName; - private String nickName; - private List<BaseMsg> msgList = new ArrayList<BaseMsg>(); - - private JSONObject userSelf; // 鐧婚檰璐﹀彿鑷韩淇℃伅 - private List<JSONObject> memberList = new ArrayList<JSONObject>(); // 濂藉弸+缇よ亰+鍏紬鍙�+鐗规畩璐﹀彿 - private List<JSONObject> contactList = new ArrayList<JSONObject>();// 濂藉弸 - private List<JSONObject> groupList = new ArrayList<JSONObject>();; // 缇� - private Map<String, JSONArray> groupMemeberMap = new HashMap<String, JSONArray>(); // 缇よ亰鎴愬憳瀛楀吀 - private List<JSONObject> publicUsersList = new ArrayList<JSONObject>();;// 鍏紬鍙凤紡鏈嶅姟鍙� - private List<JSONObject> specialUsersList = new ArrayList<JSONObject>();;// 鐗规畩璐﹀彿 - private List<String> groupIdList = new ArrayList<String>(); // 缇D鍒楄〃 - private List<String> groupNickNameList = new ArrayList<String>(); // 缇ickName鍒楄〃 - - private Map<String, JSONObject> userInfoMap = new HashMap<String, JSONObject>(); - - Map<String, Object> loginInfo = new HashMap<String, Object>(); - // CloseableHttpClient httpClient = HttpClients.createDefault(); - MyHttpClient myHttpClient = MyHttpClient.getInstance(); - String uuid = null; - - boolean useHotReload = false; - String hotReloadDir = "itchat.pkl"; - int receivingRetryCount = 5; - - private long lastNormalRetcodeTime; // 鏈�鍚庝竴娆℃敹鍒版甯竢etcode鐨勬椂闂达紝绉掍负鍗曚綅 - - /** - * 璇锋眰鍙傛暟 - */ - public Map<String, Object> getParamMap() { - return new HashMap<String, Object>(1) { - /** - * - */ - private static final long serialVersionUID = 1L; - - { - Map<String, String> map = new HashMap<String, String>(); - for (BaseParaEnum baseRequest : BaseParaEnum.values()) { - map.put(baseRequest.para(), getLoginInfo().get(baseRequest.value()).toString()); - } - put("BaseRequest", map); - } - }; - } - - public boolean isAlive() { - return alive; - } - - public void setAlive(boolean alive) { - this.alive = alive; - } - - public List<JSONObject> getMemberList() { - return memberList; - } - - public void setMemberList(List<JSONObject> memberList) { - this.memberList = memberList; - } - - public Map<String, Object> getLoginInfo() { - return loginInfo; - } - - public void setLoginInfo(Map<String, Object> loginInfo) { - this.loginInfo = loginInfo; - } - - public String getUuid() { - return uuid; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } - - public int getMemberCount() { - return memberCount; - } - - public void setMemberCount(int memberCount) { - this.memberCount = memberCount; - } - - public boolean isUseHotReload() { - return useHotReload; - } - - public void setUseHotReload(boolean useHotReload) { - this.useHotReload = useHotReload; - } - - public String getHotReloadDir() { - return hotReloadDir; - } - - public void setHotReloadDir(String hotReloadDir) { - this.hotReloadDir = hotReloadDir; - } - - public int getReceivingRetryCount() { - return receivingRetryCount; - } - - public void setReceivingRetryCount(int receivingRetryCount) { - this.receivingRetryCount = receivingRetryCount; - } - - public MyHttpClient getMyHttpClient() { - return myHttpClient; - } - - public List<BaseMsg> getMsgList() { - return msgList; - } - - public void setMsgList(List<BaseMsg> msgList) { - this.msgList = msgList; - } - - public void setMyHttpClient(MyHttpClient myHttpClient) { - this.myHttpClient = myHttpClient; - } - - public List<String> getGroupIdList() { - return groupIdList; - } - - public void setGroupIdList(List<String> groupIdList) { - this.groupIdList = groupIdList; - } - - public List<JSONObject> getContactList() { - return contactList; - } - - public void setContactList(List<JSONObject> contactList) { - this.contactList = contactList; - } - - public List<JSONObject> getGroupList() { - return groupList; - } - - public void setGroupList(List<JSONObject> groupList) { - this.groupList = groupList; - } - - public List<JSONObject> getPublicUsersList() { - return publicUsersList; - } - - public void setPublicUsersList(List<JSONObject> publicUsersList) { - this.publicUsersList = publicUsersList; - } - - public List<JSONObject> getSpecialUsersList() { - return specialUsersList; - } - - public void setSpecialUsersList(List<JSONObject> specialUsersList) { - this.specialUsersList = specialUsersList; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getNickName() { - return nickName; - } - - public void setNickName(String nickName) { - this.nickName = nickName; - } - - public JSONObject getUserSelf() { - return userSelf; - } - - public void setUserSelf(JSONObject userSelf) { - this.userSelf = userSelf; - } - - public Map<String, JSONObject> getUserInfoMap() { - return userInfoMap; - } - - public void setUserInfoMap(Map<String, JSONObject> userInfoMap) { - this.userInfoMap = userInfoMap; - } - - public synchronized long getLastNormalRetcodeTime() { - return lastNormalRetcodeTime; - } - - public synchronized void setLastNormalRetcodeTime(long lastNormalRetcodeTime) { - this.lastNormalRetcodeTime = lastNormalRetcodeTime; - } - - public List<String> getGroupNickNameList() { - return groupNickNameList; - } - - public void setGroupNickNameList(List<String> groupNickNameList) { - this.groupNickNameList = groupNickNameList; - } - - public Map<String, JSONArray> getGroupMemeberMap() { - return groupMemeberMap; - } - - public void setGroupMemeberMap(Map<String, JSONArray> groupMemeberMap) { - this.groupMemeberMap = groupMemeberMap; - } - - public String getIndexUrl() { - return indexUrl; - } - - public void setIndexUrl(String indexUrl) { - this.indexUrl = indexUrl; - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/core/MsgCenter.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/core/MsgCenter.java deleted file mode 100644 index 4a5a766..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/core/MsgCenter.java +++ /dev/null @@ -1,171 +0,0 @@ -package com.xmzs.common.wechat.core; - -import java.util.concurrent.TimeUnit; -import java.util.regex.Matcher; - -import com.xmzs.common.wechat.utils.enums.MsgCodeEnum; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; - -import com.xmzs.common.wechat.api.MessageTools; -import com.xmzs.common.wechat.beans.BaseMsg; -import com.xmzs.common.wechat.face.IMsgHandlerFace; - -import com.xmzs.common.wechat.utils.enums.MsgTypeEnum; -import com.xmzs.common.wechat.utils.tools.CommonTools; - -/** - * 娑堟伅澶勭悊涓績 - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�5鏈�14鏃� 涓嬪崍12:47:50 - * @version 1.0 - * - */ -public class MsgCenter { - private static Logger LOG = LoggerFactory.getLogger(MsgCenter.class); - - private static Core core = Core.getInstance(); - - /** - * 鎺ユ敹娑堟伅锛屾斁鍏ラ槦鍒� - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�23鏃� 涓嬪崍2:30:48 - * @param msgList - * @return - */ - public static JSONArray produceMsg(JSONArray msgList) { - JSONArray result = new JSONArray(); - for (int i = 0; i < msgList.size(); i++) { - JSONObject msg = new JSONObject(); - JSONObject m = msgList.getJSONObject(i); - m.put("groupMsg", false);// 鏄惁鏄兢娑堟伅 - if (m.getString("FromUserName").contains("@@") || m.getString("ToUserName").contains("@@")) { // 缇よ亰娑堟伅 - if (m.getString("FromUserName").contains("@@") - && !core.getGroupIdList().contains(m.getString("FromUserName"))) { - core.getGroupIdList().add((m.getString("FromUserName"))); - } else if (m.getString("ToUserName").contains("@@") - && !core.getGroupIdList().contains(m.getString("ToUserName"))) { - core.getGroupIdList().add((m.getString("ToUserName"))); - } - // 缇ゆ秷鎭笌鏅�氭秷鎭笉鍚岀殑鏄湪鍏舵秷鎭綋锛圕ontent锛変腑浼氬寘鍚彂閫佽�卛d鍙�":<br/>"娑堟伅锛岃繖閲岄渶瑕佸鐞嗕竴涓嬶紝鍘绘帀澶氫綑淇℃伅锛屽彧淇濈暀娑堟伅鍐呭 - if (m.getString("Content").contains("<br/>")) { - String content = m.getString("Content").substring(m.getString("Content").indexOf("<br/>") + 5); - m.put("Content", content); - m.put("groupMsg", true); - } - } else { - CommonTools.msgFormatter(m, "Content"); - } - if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_TEXT.getCode())) { // words - // 鏂囨湰娑堟伅 - if (m.getString("Url").length() != 0) { - String regEx = "(.+?\\(.+?\\))"; - Matcher matcher = CommonTools.getMatcher(regEx, m.getString("Content")); - String data = "Map"; - if (matcher.find()) { - data = matcher.group(1); - } - msg.put("Type", "Map"); - msg.put("Text", data); - } else { - msg.put("Type", MsgTypeEnum.TEXT.getType()); - msg.put("Text", m.getString("Content")); - } - m.put("Type", msg.getString("Type")); - m.put("Text", msg.getString("Text")); - } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_IMAGE.getCode()) - || m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_EMOTICON.getCode())) { // 鍥剧墖娑堟伅 - m.put("Type", MsgTypeEnum.PIC.getType()); - } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_VOICE.getCode())) { // 璇煶娑堟伅 - m.put("Type", MsgTypeEnum.VOICE.getType()); - } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_VERIFYMSG.getCode())) {// friends - // 濂藉弸纭娑堟伅 - // MessageTools.addFriend(core, userName, 3, ticket); // 纭娣诲姞濂藉弸 - m.put("Type", MsgTypeEnum.VERIFYMSG.getType()); - - } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_SHARECARD.getCode())) { // 鍏变韩鍚嶇墖 - m.put("Type", MsgTypeEnum.NAMECARD.getType()); - - } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_VIDEO.getCode()) - || m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_MICROVIDEO.getCode())) {// viedo - m.put("Type", MsgTypeEnum.VIEDO.getType()); - } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_MEDIA.getCode())) { // 澶氬獟浣撴秷鎭� - m.put("Type", MsgTypeEnum.MEDIA.getType()); - } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_STATUSNOTIFY.getCode())) {// phone - // init - // 寰俊鍒濆鍖栨秷鎭� - - } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_SYS.getCode())) {// 绯荤粺娑堟伅 - m.put("Type", MsgTypeEnum.SYS.getType()); - } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_RECALLED.getCode())) { // 鎾ゅ洖娑堟伅 - - } else { - LOG.info("Useless msg"); - } - LOG.info("鏀跺埌娑堟伅涓�鏉★紝鏉ヨ嚜: " + m.getString("FromUserName")); - result.add(m); - } - return result; - } - - /** - * 娑堟伅澶勭悊 - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�14鏃� 涓婂崍10:52:34 - * @param msgHandler - */ - public static void handleMsg(IMsgHandlerFace msgHandler) { - while (true) { - if (core.getMsgList().size() > 0 && core.getMsgList().get(0).getContent() != null) { - if (core.getMsgList().get(0).getContent().length() > 0) { - BaseMsg msg = core.getMsgList().get(0); - if (msg.getType() != null) { - try { - if (msg.getType().equals(MsgTypeEnum.TEXT.getType())) { - String result = msgHandler.textMsgHandle(msg); - MessageTools.sendMsgById(result, core.getMsgList().get(0).getFromUserName()); - } else if (msg.getType().equals(MsgTypeEnum.PIC.getType())) { - - String result = msgHandler.picMsgHandle(msg); - MessageTools.sendMsgById(result, core.getMsgList().get(0).getFromUserName()); - } else if (msg.getType().equals(MsgTypeEnum.VOICE.getType())) { - String result = msgHandler.voiceMsgHandle(msg); - MessageTools.sendMsgById(result, core.getMsgList().get(0).getFromUserName()); - } else if (msg.getType().equals(MsgTypeEnum.VIEDO.getType())) { - String result = msgHandler.viedoMsgHandle(msg); - MessageTools.sendMsgById(result, core.getMsgList().get(0).getFromUserName()); - } else if (msg.getType().equals(MsgTypeEnum.NAMECARD.getType())) { - String result = msgHandler.nameCardMsgHandle(msg); - MessageTools.sendMsgById(result, core.getMsgList().get(0).getFromUserName()); - } else if (msg.getType().equals(MsgTypeEnum.SYS.getType())) { // 绯荤粺娑堟伅 - msgHandler.sysMsgHandle(msg); - } else if (msg.getType().equals(MsgTypeEnum.VERIFYMSG.getType())) { // 纭娣诲姞濂藉弸娑堟伅 - String result = msgHandler.verifyAddFriendMsgHandle(msg); - MessageTools.sendMsgById(result, - core.getMsgList().get(0).getRecommendInfo().getUserName()); - } else if (msg.getType().equals(MsgTypeEnum.MEDIA.getType())) { // 澶氬獟浣撴秷鎭� - String result = msgHandler.mediaMsgHandle(msg); - MessageTools.sendMsgById(result, core.getMsgList().get(0).getFromUserName()); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } - core.getMsgList().remove(0); - } - try { - TimeUnit.MILLISECONDS.sleep(1000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/face/IMsgHandlerFace.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/face/IMsgHandlerFace.java deleted file mode 100644 index 18542db..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/face/IMsgHandlerFace.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.xmzs.common.wechat.face; - -import com.xmzs.common.wechat.beans.BaseMsg; - -/** - * 娑堟伅澶勭悊鎺ュ彛 - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�20鏃� 涓婂崍12:13:49 - * @version 1.0 - * - */ -public interface IMsgHandlerFace { - /** - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�20鏃� 涓婂崍12:15:00 - * @param msg - * @return - */ - public String textMsgHandle(BaseMsg msg); - - /** - * 澶勭悊鍥剧墖娑堟伅 - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�21鏃� 涓嬪崍11:07:06 - * @param msg - * @return - */ - public String picMsgHandle(BaseMsg msg); - - /** - * 澶勭悊澹伴煶娑堟伅 - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�22鏃� 涓婂崍12:09:44 - * @param msg - * @return - */ - public String voiceMsgHandle(BaseMsg msg); - - /** - * 澶勭悊灏忚棰戞秷鎭� - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�23鏃� 涓嬪崍12:19:50 - * @param msg - * @return - */ - public String viedoMsgHandle(BaseMsg msg); - - /** - * 澶勭悊鍚嶇墖娑堟伅 - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�1鏃� 涓婂崍12:50:50 - * @param msg - * @return - */ - public String nameCardMsgHandle(BaseMsg msg); - - /** - * 澶勭悊绯荤粺娑堟伅 - * - * @author Relyn - * @date 2017骞�6鏈�21鏃�17:43:51 - * @param msg - * @return - */ - public void sysMsgHandle(BaseMsg msg); - - /** - * 澶勭悊纭娣诲姞濂藉弸娑堟伅 - * - * @date 2017骞�6鏈�28鏃� 涓嬪崍10:15:30 - * @param msg - * @return - */ - public String verifyAddFriendMsgHandle(BaseMsg msg); - - /** - * 澶勭悊鏀跺埌鐨勬枃浠舵秷鎭� - * - * @date 2017骞�7鏈�21鏃� 涓嬪崍11:59:14 - * @param msg - * @return - */ - public String mediaMsgHandle(BaseMsg msg); - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/service/ILoginService.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/service/ILoginService.java deleted file mode 100644 index 4ee3ecd..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/service/ILoginService.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.xmzs.common.wechat.service; - -/** - * 鐧婚檰鏈嶅姟鎺ュ彛 - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�5鏈�13鏃� 涓婂崍12:07:21 - * @version 1.0 - * - */ -public interface ILoginService { - - /** - * 鐧婚檰 - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�13鏃� 涓婂崍12:14:07 - * @return - */ - boolean login(); - - /** - * 鑾峰彇UUID - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�13鏃� 涓婂崍12:21:40 - * @param qrPath - * @return - */ - String getUuid(); - - /** - * 鑾峰彇浜岀淮鐮佸浘鐗� - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�13鏃� 涓婂崍12:13:51 - * @param qrPath - * @return - */ - boolean getQR(String qrPath); - - /** - * web鍒濆鍖� - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�13鏃� 涓婂崍12:14:13 - * @return - */ - boolean webWxInit(); - - /** - * 寰俊鐘舵�侀�氱煡 - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�13鏃� 涓婂崍12:14:24 - */ - void wxStatusNotify(); - - /** - * 鎺ユ敹娑堟伅 - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�13鏃� 涓婂崍12:14:37 - */ - void startReceiving(); - - /** - * 鑾峰彇寰俊鑱旂郴浜� - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�13鏃� 涓嬪崍2:26:18 - */ - void webWxGetContact(); - - /** - * 鎵归噺鑾峰彇鑱旂郴浜轰俊鎭� - * - * @date 2017骞�6鏈�22鏃� 涓嬪崍11:24:35 - */ - void WebWxBatchGetContact(); - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/service/impl/LoginServiceImpl.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/service/impl/LoginServiceImpl.java deleted file mode 100644 index a286a1e..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/service/impl/LoginServiceImpl.java +++ /dev/null @@ -1,687 +0,0 @@ -package com.xmzs.common.wechat.service.impl; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.OutputStream; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Random; -import java.util.regex.Matcher; - -import com.xmzs.common.wechat.utils.SleepUtils; -import org.apache.http.Consts; -import org.apache.http.HttpEntity; -import org.apache.http.message.BasicNameValuePair; -import org.apache.http.util.EntityUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Document; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; - -import com.xmzs.common.wechat.beans.BaseMsg; -import com.xmzs.common.wechat.core.Core; -import com.xmzs.common.wechat.core.MsgCenter; -import com.xmzs.common.wechat.service.ILoginService; -import com.xmzs.common.wechat.utils.Config; -import com.xmzs.common.wechat.utils.MyHttpClient; - -import com.xmzs.common.wechat.utils.enums.ResultEnum; -import com.xmzs.common.wechat.utils.enums.RetCodeEnum; -import com.xmzs.common.wechat.utils.enums.StorageLoginInfoEnum; -import com.xmzs.common.wechat.utils.enums.URLEnum; -import com.xmzs.common.wechat.utils.enums.parameters.BaseParaEnum; -import com.xmzs.common.wechat.utils.enums.parameters.LoginParaEnum; -import com.xmzs.common.wechat.utils.enums.parameters.StatusNotifyParaEnum; -import com.xmzs.common.wechat.utils.enums.parameters.UUIDParaEnum; -import com.xmzs.common.wechat.utils.tools.CommonTools; - -/** - * 鐧婚檰鏈嶅姟瀹炵幇绫� - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�5鏈�13鏃� 涓婂崍12:09:35 - * @version 1.0 - * - */ -public class LoginServiceImpl implements ILoginService { - private static Logger LOG = LoggerFactory.getLogger(LoginServiceImpl.class); - - private Core core = Core.getInstance(); - private MyHttpClient httpClient = core.getMyHttpClient(); - - private MyHttpClient myHttpClient = core.getMyHttpClient(); - - public LoginServiceImpl() { - - } - - @Override - public boolean login() { - - boolean isLogin = false; - // 缁勮鍙傛暟鍜孶RL - List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>(); - params.add(new BasicNameValuePair(LoginParaEnum.LOGIN_ICON.para(), LoginParaEnum.LOGIN_ICON.value())); - params.add(new BasicNameValuePair(LoginParaEnum.UUID.para(), core.getUuid())); - params.add(new BasicNameValuePair(LoginParaEnum.TIP.para(), LoginParaEnum.TIP.value())); - - // long time = 4000; - while (!isLogin) { - // SleepUtils.sleep(time += 1000); - long millis = System.currentTimeMillis(); - params.add(new BasicNameValuePair(LoginParaEnum.R.para(), String.valueOf(millis / 1579L))); - params.add(new BasicNameValuePair(LoginParaEnum._1.para(), String.valueOf(millis))); - HttpEntity entity = httpClient.doGet(URLEnum.LOGIN_URL.getUrl(), params, true, null); - - try { - String result = EntityUtils.toString(entity); - String status = checklogin(result); - - if (ResultEnum.SUCCESS.getCode().equals(status)) { - processLoginInfo(result); // 澶勭悊缁撴灉 - isLogin = true; - core.setAlive(isLogin); - break; - } - if (ResultEnum.WAIT_CONFIRM.getCode().equals(status)) { - LOG.info("璇风偣鍑诲井淇$‘璁ゆ寜閽紝杩涜鐧婚檰"); - } - - } catch (Exception e) { - LOG.error("寰俊鐧婚檰寮傚父锛�", e); - } - } - return isLogin; - } - - @Override - public String getUuid() { - // 缁勮鍙傛暟鍜孶RL - List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>(); - params.add(new BasicNameValuePair(UUIDParaEnum.APP_ID.para(), UUIDParaEnum.APP_ID.value())); - params.add(new BasicNameValuePair(UUIDParaEnum.REDIRECT_URL.para(), - UUIDParaEnum.REDIRECT_URL.value())); - params.add(new BasicNameValuePair(UUIDParaEnum.FUN.para(), UUIDParaEnum.FUN.value())); - params.add(new BasicNameValuePair(UUIDParaEnum.LANG.para(), UUIDParaEnum.LANG.value())); - params.add(new BasicNameValuePair(UUIDParaEnum._1.para(), String.valueOf(System.currentTimeMillis()))); - - HttpEntity entity = httpClient.doGet(URLEnum.UUID_URL.getUrl(), params, true, null); - - try { - String result = EntityUtils.toString(entity); - String regEx = "window.QRLogin.code = (\\d+); window.QRLogin.uuid = \"(\\S+?)\";"; - Matcher matcher = CommonTools.getMatcher(regEx, result); - if (matcher.find()) { - if ((ResultEnum.SUCCESS.getCode().equals(matcher.group(1)))) { - core.setUuid(matcher.group(2)); - } - } - } catch (Exception e) { - LOG.error(e.getMessage(), e); - } - - return core.getUuid(); - } - - @Override - public boolean getQR(String qrPath) { - qrPath = qrPath + File.separator + "QR.jpg"; - String qrUrl = URLEnum.QRCODE_URL.getUrl() + core.getUuid(); - HttpEntity entity = myHttpClient.doGet(qrUrl, null, true, null); - try { - OutputStream out = new FileOutputStream(qrPath); - byte[] bytes = EntityUtils.toByteArray(entity); - out.write(bytes); - out.flush(); - out.close(); - try { - CommonTools.printQr(qrPath); // 鎵撳紑鐧婚檰浜岀淮鐮佸浘鐗� - } catch (Exception e) { - LOG.info(e.getMessage()); - } - - } catch (Exception e) { - LOG.info(e.getMessage()); - return false; - } - - return true; - } - - @Override - public boolean webWxInit() { - core.setAlive(true); - core.setLastNormalRetcodeTime(System.currentTimeMillis()); - // 缁勮璇锋眰URL鍜屽弬鏁� - String url = String.format(URLEnum.INIT_URL.getUrl(), - core.getLoginInfo().get(StorageLoginInfoEnum.url.getKey()), - String.valueOf(System.currentTimeMillis() / 3158L), - core.getLoginInfo().get(StorageLoginInfoEnum.pass_ticket.getKey())); - - Map<String, Object> paramMap = core.getParamMap(); - - // 璇锋眰鍒濆鍖栨帴鍙� - HttpEntity entity = httpClient.doPost(url, JSON.toJSONString(paramMap)); - try { - String result = EntityUtils.toString(entity, Consts.UTF_8); - JSONObject obj = JSON.parseObject(result); - - JSONObject user = obj.getJSONObject(StorageLoginInfoEnum.User.getKey()); - JSONObject syncKey = obj.getJSONObject(StorageLoginInfoEnum.SyncKey.getKey()); - - core.getLoginInfo().put(StorageLoginInfoEnum.InviteStartCount.getKey(), - obj.getInteger(StorageLoginInfoEnum.InviteStartCount.getKey())); - core.getLoginInfo().put(StorageLoginInfoEnum.SyncKey.getKey(), syncKey); - - JSONArray syncArray = syncKey.getJSONArray("List"); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < syncArray.size(); i++) { - sb.append(syncArray.getJSONObject(i).getString("Key") + "_" - + syncArray.getJSONObject(i).getString("Val") + "|"); - } - // 1_661706053|2_661706420|3_661706415|1000_1494151022| - String synckey = sb.toString(); - - // 1_661706053|2_661706420|3_661706415|1000_1494151022 - core.getLoginInfo().put(StorageLoginInfoEnum.synckey.getKey(), synckey.substring(0, synckey.length() - 1));// 1_656161336|2_656161626|3_656161313|11_656159955|13_656120033|201_1492273724|1000_1492265953|1001_1492250432|1004_1491805192 - core.setUserName(user.getString("UserName")); - core.setNickName(user.getString("NickName")); - core.setUserSelf(obj.getJSONObject("User")); - - String chatSet = obj.getString("ChatSet"); - String[] chatSetArray = chatSet.split(","); - for (int i = 0; i < chatSetArray.length; i++) { - if (chatSetArray[i].indexOf("@@") != -1) { - // 鏇存柊GroupIdList - core.getGroupIdList().add(chatSetArray[i]); // - } - } - // JSONArray contactListArray = obj.getJSONArray("ContactList"); - // for (int i = 0; i < contactListArray.size(); i++) { - // JSONObject o = contactListArray.getJSONObject(i); - // if (o.getString("UserName").indexOf("@@") != -1) { - // core.getGroupIdList().add(o.getString("UserName")); // - // // 鏇存柊GroupIdList - // core.getGroupList().add(o); // 鏇存柊GroupList - // core.getGroupNickNameList().add(o.getString("NickName")); - // } - // } - } catch (Exception e) { - e.printStackTrace(); - return false; - } - return true; - } - - @Override - public void wxStatusNotify() { - // 缁勮璇锋眰URL鍜屽弬鏁� - String url = String.format(URLEnum.STATUS_NOTIFY_URL.getUrl(), - core.getLoginInfo().get(StorageLoginInfoEnum.pass_ticket.getKey())); - - Map<String, Object> paramMap = core.getParamMap(); - paramMap.put(StatusNotifyParaEnum.CODE.para(), StatusNotifyParaEnum.CODE.value()); - paramMap.put(StatusNotifyParaEnum.FROM_USERNAME.para(), core.getUserName()); - paramMap.put(StatusNotifyParaEnum.TO_USERNAME.para(), core.getUserName()); - paramMap.put(StatusNotifyParaEnum.CLIENT_MSG_ID.para(), System.currentTimeMillis()); - String paramStr = JSON.toJSONString(paramMap); - - try { - HttpEntity entity = httpClient.doPost(url, paramStr); - EntityUtils.toString(entity, Consts.UTF_8); - } catch (Exception e) { - LOG.error("寰俊鐘舵�侀�氱煡鎺ュ彛澶辫触锛�", e); - } - - } - - @Override - public void startReceiving() { - core.setAlive(true); - new Thread(new Runnable() { - int retryCount = 0; - - @Override - public void run() { - while (core.isAlive()) { - try { - Map<String, String> resultMap = syncCheck(); - LOG.info(JSONObject.toJSONString(resultMap)); - String retcode = resultMap.get("retcode"); - String selector = resultMap.get("selector"); - if (retcode.equals(RetCodeEnum.UNKOWN.getCode())) { - LOG.info(RetCodeEnum.UNKOWN.getType()); - continue; - } else if (retcode.equals(RetCodeEnum.LOGIN_OUT.getCode())) { // 閫�鍑� - LOG.info(RetCodeEnum.LOGIN_OUT.getType()); - break; - } else if (retcode.equals(RetCodeEnum.LOGIN_OTHERWHERE.getCode())) { // 鍏跺畠鍦版柟鐧婚檰 - LOG.info(RetCodeEnum.LOGIN_OTHERWHERE.getType()); - break; - } else if (retcode.equals(RetCodeEnum.MOBILE_LOGIN_OUT.getCode())) { // 绉诲姩绔��鍑� - LOG.info(RetCodeEnum.MOBILE_LOGIN_OUT.getType()); - break; - } else if (retcode.equals(RetCodeEnum.NORMAL.getCode())) { - core.setLastNormalRetcodeTime(System.currentTimeMillis()); // 鏈�鍚庢敹鍒版甯告姤鏂囨椂闂� - JSONObject msgObj = webWxSync(); - if (selector.equals("2")) { - if (msgObj != null) { - try { - JSONArray msgList = new JSONArray(); - msgList = msgObj.getJSONArray("AddMsgList"); - msgList = MsgCenter.produceMsg(msgList); - for (int j = 0; j < msgList.size(); j++) { - BaseMsg baseMsg = JSON.toJavaObject(msgList.getJSONObject(j), - BaseMsg.class); - core.getMsgList().add(baseMsg); - } - } catch (Exception e) { - LOG.info(e.getMessage()); - } - } - } else if (selector.equals("7")) { - webWxSync(); - } else if (selector.equals("4")) { - continue; - } else if (selector.equals("3")) { - continue; - } else if (selector.equals("6")) { - if (msgObj != null) { - try { - JSONArray msgList = new JSONArray(); - msgList = msgObj.getJSONArray("AddMsgList"); - JSONArray modContactList = msgObj.getJSONArray("ModContactList"); // 瀛樺湪鍒犻櫎鎴栬�呮柊澧炵殑濂藉弸淇℃伅 - msgList = MsgCenter.produceMsg(msgList); - for (int j = 0; j < msgList.size(); j++) { - JSONObject userInfo = modContactList.getJSONObject(j); - // 瀛樺湪涓诲姩鍔犲ソ鍙嬩箣鍚庣殑鍚屾鑱旂郴浜哄埌鏈湴 - core.getContactList().add(userInfo); - } - } catch (Exception e) { - LOG.info(e.getMessage()); - } - } - - } - } else { - JSONObject obj = webWxSync(); - } - } catch (Exception e) { - LOG.info(e.getMessage()); - retryCount += 1; - if (core.getReceivingRetryCount() < retryCount) { - core.setAlive(false); - } else { - try { - Thread.sleep(1000); - } catch (InterruptedException e1) { - LOG.info(e.getMessage()); - } - } - } - - } - } - }).start(); - - } - - @Override - public void webWxGetContact() { - String url = String.format(URLEnum.WEB_WX_GET_CONTACT.getUrl(), - core.getLoginInfo().get(StorageLoginInfoEnum.url.getKey())); - Map<String, Object> paramMap = core.getParamMap(); - HttpEntity entity = httpClient.doPost(url, JSON.toJSONString(paramMap)); - - try { - String result = EntityUtils.toString(entity, Consts.UTF_8); - JSONObject fullFriendsJsonList = JSON.parseObject(result); - // 鏌ョ湅seq鏄惁涓�0锛�0琛ㄧず濂藉弸鍒楄〃宸插叏閮ㄨ幏鍙栧畬姣曪紝鑻ュぇ浜�0锛屽垯琛ㄧず濂藉弸鍒楄〃鏈幏鍙栧畬姣曪紝褰撳墠鐨勫瓧鑺傛暟锛堟柇鐐圭画浼狅級 - long seq = 0; - long currentTime = 0L; - List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>(); - if (fullFriendsJsonList.get("Seq") != null) { - seq = fullFriendsJsonList.getLong("Seq"); - currentTime = new Date().getTime(); - } - core.setMemberCount(fullFriendsJsonList.getInteger(StorageLoginInfoEnum.MemberCount.getKey())); - JSONArray member = fullFriendsJsonList.getJSONArray(StorageLoginInfoEnum.MemberList.getKey()); - // 寰幆鑾峰彇seq鐩村埌涓�0锛屽嵆鑾峰彇鍏ㄩ儴濂藉弸鍒楄〃 ==0锛氬ソ鍙嬭幏鍙栧畬姣� >0锛氬ソ鍙嬫湭鑾峰彇瀹屾瘯锛屾鏃秙eq涓哄凡鑾峰彇鐨勫瓧鑺傛暟 - while (seq > 0) { - // 璁剧疆seq浼犲弬 - params.add(new BasicNameValuePair("r", String.valueOf(currentTime))); - params.add(new BasicNameValuePair("seq", String.valueOf(seq))); - entity = httpClient.doGet(url, params, false, null); - - params.remove(new BasicNameValuePair("r", String.valueOf(currentTime))); - params.remove(new BasicNameValuePair("seq", String.valueOf(seq))); - - result = EntityUtils.toString(entity, Consts.UTF_8); - fullFriendsJsonList = JSON.parseObject(result); - - if (fullFriendsJsonList.get("Seq") != null) { - seq = fullFriendsJsonList.getLong("Seq"); - currentTime = new Date().getTime(); - } - - // 绱姞濂藉弸鍒楄〃 - member.addAll(fullFriendsJsonList.getJSONArray(StorageLoginInfoEnum.MemberList.getKey())); - } - core.setMemberCount(member.size()); - for (Iterator<?> iterator = member.iterator(); iterator.hasNext();) { - JSONObject o = (JSONObject) iterator.next(); - if ((o.getInteger("VerifyFlag") & 8) != 0) { // 鍏紬鍙�/鏈嶅姟鍙� - core.getPublicUsersList().add(o); - } else if (Config.API_SPECIAL_USER.contains(o.getString("UserName"))) { // 鐗规畩璐﹀彿 - core.getSpecialUsersList().add(o); - } else if (o.getString("UserName").indexOf("@@") != -1) { // 缇よ亰 - if (!core.getGroupIdList().contains(o.getString("UserName"))) { - core.getGroupNickNameList().add(o.getString("NickName")); - core.getGroupIdList().add(o.getString("UserName")); - core.getGroupList().add(o); - } - } else if (o.getString("UserName").equals(core.getUserSelf().getString("UserName"))) { // 鑷繁 - core.getContactList().remove(o); - } else { // 鏅�氳仈绯讳汉 - core.getContactList().add(o); - } - } - return; - } catch (Exception e) { - LOG.error(e.getMessage(), e); - } - return; - } - - @Override - public void WebWxBatchGetContact() { - String url = String.format(URLEnum.WEB_WX_BATCH_GET_CONTACT.getUrl(), - core.getLoginInfo().get(StorageLoginInfoEnum.url.getKey()), new Date().getTime(), - core.getLoginInfo().get(StorageLoginInfoEnum.pass_ticket.getKey())); - Map<String, Object> paramMap = core.getParamMap(); - paramMap.put("Count", core.getGroupIdList().size()); - List<Map<String, String>> list = new ArrayList<Map<String, String>>(); - for (int i = 0; i < core.getGroupIdList().size(); i++) { - HashMap<String, String> map = new HashMap<String, String>(); - map.put("UserName", core.getGroupIdList().get(i)); - map.put("EncryChatRoomId", ""); - list.add(map); - } - paramMap.put("List", list); - HttpEntity entity = httpClient.doPost(url, JSON.toJSONString(paramMap)); - try { - String text = EntityUtils.toString(entity, Consts.UTF_8); - JSONObject obj = JSON.parseObject(text); - JSONArray contactList = obj.getJSONArray("ContactList"); - for (int i = 0; i < contactList.size(); i++) { // 缇ゅソ鍙� - if (contactList.getJSONObject(i).getString("UserName").indexOf("@@") > -1) { // 缇� - core.getGroupNickNameList().add(contactList.getJSONObject(i).getString("NickName")); // 鏇存柊缇ゆ樀绉板垪琛� - core.getGroupList().add(contactList.getJSONObject(i)); // 鏇存柊缇や俊鎭紙鎵�鏈夛級鍒楄〃 - core.getGroupMemeberMap().put(contactList.getJSONObject(i).getString("UserName"), - contactList.getJSONObject(i).getJSONArray("MemberList")); // 鏇存柊缇ゆ垚鍛楳ap - } - } - } catch (Exception e) { - LOG.info(e.getMessage()); - } - } - - /** - * 妫�鏌ョ櫥闄嗙姸鎬� - * - * @param result - * @return - */ - public String checklogin(String result) { - String regEx = "window.code=(\\d+)"; - Matcher matcher = CommonTools.getMatcher(regEx, result); - if (matcher.find()) { - return matcher.group(1); - } - return null; - } - - /** - * 澶勭悊鐧婚檰淇℃伅 - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�9鏃� 涓嬪崍12:16:26 - * @param loginContent - */ - private void processLoginInfo(String loginContent) { - String regEx = "window.redirect_uri=\"(\\S+)\";"; - Matcher matcher = CommonTools.getMatcher(regEx, loginContent); - if (matcher.find()) { - String originalUrl = matcher.group(1); - String url = originalUrl.substring(0, originalUrl.lastIndexOf('/')); // https://wx2.qq.com/cgi-bin/mmwebwx-bin - core.getLoginInfo().put("url", url); - Map<String, List<String>> possibleUrlMap = this.getPossibleUrlMap(); - Iterator<Entry<String, List<String>>> iterator = possibleUrlMap.entrySet().iterator(); - Map.Entry<String, List<String>> entry; - String fileUrl; - String syncUrl; - while (iterator.hasNext()) { - entry = iterator.next(); - String indexUrl = entry.getKey(); - fileUrl = "https://" + entry.getValue().get(0) + "/cgi-bin/mmwebwx-bin"; - syncUrl = "https://" + entry.getValue().get(1) + "/cgi-bin/mmwebwx-bin"; - if (core.getLoginInfo().get("url").toString().contains(indexUrl)) { - core.setIndexUrl(indexUrl); - core.getLoginInfo().put("fileUrl", fileUrl); - core.getLoginInfo().put("syncUrl", syncUrl); - break; - } - } - if (core.getLoginInfo().get("fileUrl") == null && core.getLoginInfo().get("syncUrl") == null) { - core.getLoginInfo().put("fileUrl", url); - core.getLoginInfo().put("syncUrl", url); - } - core.getLoginInfo().put("deviceid", "e" + String.valueOf(new Random().nextLong()).substring(1, 16)); // 鐢熸垚15浣嶉殢鏈烘暟 - core.getLoginInfo().put("BaseRequest", new ArrayList<String>()); - String text = ""; - - try { - HttpEntity entity = myHttpClient.doGet(originalUrl, null, false, null); - text = EntityUtils.toString(entity); - } catch (Exception e) { - LOG.info(e.getMessage()); - return; - } - //add by 榛橀潪榛� 2017-08-01 22:28:09 - //濡傛灉鐧诲綍琚姝㈡椂锛屽垯鐧诲綍杩斿洖鐨刴essage鍐呭涓嶄负绌猴紝涓嬮潰浠g爜鍒欏垽鏂櫥褰曞唴瀹规槸鍚︿负绌猴紝涓嶄负绌哄垯閫�鍑虹▼搴� - String msg = getLoginMessage(text); - if (!"".equals(msg)){ - LOG.info(msg); - System.exit(0); - } - Document doc = CommonTools.xmlParser(text); - if (doc != null) { - core.getLoginInfo().put(StorageLoginInfoEnum.skey.getKey(), - doc.getElementsByTagName(StorageLoginInfoEnum.skey.getKey()).item(0).getFirstChild() - .getNodeValue()); - core.getLoginInfo().put(StorageLoginInfoEnum.wxsid.getKey(), - doc.getElementsByTagName(StorageLoginInfoEnum.wxsid.getKey()).item(0).getFirstChild() - .getNodeValue()); - core.getLoginInfo().put(StorageLoginInfoEnum.wxuin.getKey(), - doc.getElementsByTagName(StorageLoginInfoEnum.wxuin.getKey()).item(0).getFirstChild() - .getNodeValue()); - core.getLoginInfo().put(StorageLoginInfoEnum.pass_ticket.getKey(), - doc.getElementsByTagName(StorageLoginInfoEnum.pass_ticket.getKey()).item(0).getFirstChild() - .getNodeValue()); - } - - } - } - - private Map<String, List<String>> getPossibleUrlMap() { - Map<String, List<String>> possibleUrlMap = new HashMap<String, List<String>>(); - possibleUrlMap.put("wx.qq.com", new ArrayList<String>() { - /** - * - */ - private static final long serialVersionUID = 1L; - - { - add("file.wx.qq.com"); - add("webpush.wx.qq.com"); - } - }); - - possibleUrlMap.put("wx2.qq.com", new ArrayList<String>() { - /** - * - */ - private static final long serialVersionUID = 1L; - - { - add("file.wx2.qq.com"); - add("webpush.wx2.qq.com"); - } - }); - possibleUrlMap.put("wx8.qq.com", new ArrayList<String>() { - /** - * - */ - private static final long serialVersionUID = 1L; - - { - add("file.wx8.qq.com"); - add("webpush.wx8.qq.com"); - } - }); - - possibleUrlMap.put("web2.wechat.com", new ArrayList<String>() { - /** - * - */ - private static final long serialVersionUID = 1L; - - { - add("file.web2.wechat.com"); - add("webpush.web2.wechat.com"); - } - }); - possibleUrlMap.put("wechat.com", new ArrayList<String>() { - /** - * - */ - private static final long serialVersionUID = 1L; - - { - add("file.web.wechat.com"); - add("webpush.web.wechat.com"); - } - }); - return possibleUrlMap; - } - - /** - * 鍚屾娑堟伅 sync the messages - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�12鏃� 涓婂崍12:24:55 - * @return - */ - private JSONObject webWxSync() { - JSONObject result = null; - String url = String.format(URLEnum.WEB_WX_SYNC_URL.getUrl(), - core.getLoginInfo().get(StorageLoginInfoEnum.url.getKey()), - core.getLoginInfo().get(StorageLoginInfoEnum.wxsid.getKey()), - core.getLoginInfo().get(StorageLoginInfoEnum.skey.getKey()), - core.getLoginInfo().get(StorageLoginInfoEnum.pass_ticket.getKey())); - Map<String, Object> paramMap = core.getParamMap(); - paramMap.put(StorageLoginInfoEnum.SyncKey.getKey(), - core.getLoginInfo().get(StorageLoginInfoEnum.SyncKey.getKey())); - paramMap.put("rr", -new Date().getTime() / 1000); - String paramStr = JSON.toJSONString(paramMap); - try { - HttpEntity entity = myHttpClient.doPost(url, paramStr); - String text = EntityUtils.toString(entity, Consts.UTF_8); - JSONObject obj = JSON.parseObject(text); - if (obj.getJSONObject("BaseResponse").getInteger("Ret") != 0) { - result = null; - } else { - result = obj; - core.getLoginInfo().put(StorageLoginInfoEnum.SyncKey.getKey(), obj.getJSONObject("SyncCheckKey")); - JSONArray syncArray = obj.getJSONObject(StorageLoginInfoEnum.SyncKey.getKey()).getJSONArray("List"); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < syncArray.size(); i++) { - sb.append(syncArray.getJSONObject(i).getString("Key") + "_" - + syncArray.getJSONObject(i).getString("Val") + "|"); - } - String synckey = sb.toString(); - core.getLoginInfo().put(StorageLoginInfoEnum.synckey.getKey(), - synckey.substring(0, synckey.length() - 1));// 1_656161336|2_656161626|3_656161313|11_656159955|13_656120033|201_1492273724|1000_1492265953|1001_1492250432|1004_1491805192 - } - } catch (Exception e) { - LOG.info(e.getMessage()); - } - return result; - - } - - /** - * 妫�鏌ユ槸鍚︽湁鏂版秷鎭� check whether there's a message - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�16鏃� 涓婂崍11:11:34 - * @return - * - */ - private Map<String, String> syncCheck() { - Map<String, String> resultMap = new HashMap<String, String>(); - // 缁勮璇锋眰URL鍜屽弬鏁� - String url = core.getLoginInfo().get(StorageLoginInfoEnum.syncUrl.getKey()) + URLEnum.SYNC_CHECK_URL.getUrl(); - List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>(); - for (BaseParaEnum baseRequest : BaseParaEnum.values()) { - params.add(new BasicNameValuePair(baseRequest.para().toLowerCase(), - core.getLoginInfo().get(baseRequest.value()).toString())); - } - params.add(new BasicNameValuePair("r", String.valueOf(new Date().getTime()))); - params.add(new BasicNameValuePair("synckey", (String) core.getLoginInfo().get("synckey"))); - params.add(new BasicNameValuePair("_", String.valueOf(new Date().getTime()))); - SleepUtils.sleep(7); - try { - HttpEntity entity = myHttpClient.doGet(url, params, true, null); - if (entity == null) { - resultMap.put("retcode", "9999"); - resultMap.put("selector", "9999"); - return resultMap; - } - String text = EntityUtils.toString(entity); - String regEx = "window.synccheck=\\{retcode:\"(\\d+)\",selector:\"(\\d+)\"\\}"; - Matcher matcher = CommonTools.getMatcher(regEx, text); - if (!matcher.find() || matcher.group(1).equals("2")) { - LOG.info(String.format("Unexpected sync check result: %s", text)); - } else { - resultMap.put("retcode", matcher.group(1)); - resultMap.put("selector", matcher.group(2)); - } - } catch (Exception e) { - e.printStackTrace(); - } - return resultMap; - } - - /** - * 瑙f瀽鐧诲綍杩斿洖鐨勬秷鎭紝濡傛灉鎴愬姛鐧诲綍锛屽垯message涓虹┖ - * @param result - * @return - */ - public String getLoginMessage(String result){ - String[] strArr = result.split("<message>"); - String[] rs = strArr[1].split("</message>"); - if (rs!=null && rs.length>1) { - return rs[0]; - } - return ""; - } -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/thread/CheckLoginStatusThread.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/thread/CheckLoginStatusThread.java deleted file mode 100644 index 3e484d2..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/thread/CheckLoginStatusThread.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.xmzs.common.wechat.thread; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.xmzs.common.wechat.core.Core; -import com.xmzs.common.wechat.utils.SleepUtils; - -/** - * 妫�鏌ュ井淇″湪绾跨姸鎬� - * <p> - * 濡備綍鏉ユ劅鐭ュ井淇$姸鎬侊紵 - * 寰俊浼氭湁蹇冭烦鍖咃紝LoginServiceImpl.syncCheck()姝e父鍦ㄧ嚎鎯呭喌涓嬭繑鍥炵殑娑堟伅涓璻etcode鎶ユ枃搴旇涓�"0"锛屽績璺抽棿闅斾竴鑸湪25绉掞紝 - * 閭d箞鍙互閫氳繃鏈�鍚庢敹鍒版甯告姤鏂囩殑鏃堕棿鏉ヤ綔涓哄垽鏂槸鍚﹀湪绾跨殑渚濇嵁銆傝嫢鎶ユ枃闂撮殧澶т簬60绉掞紝鍒欒涓哄凡鎺夌嚎銆� - * </p> - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�5鏈�17鏃� 涓嬪崍10:53:15 - * @version 1.0 - * - */ -public class CheckLoginStatusThread implements Runnable { - private static Logger LOG = LoggerFactory.getLogger(CheckLoginStatusThread.class); - private Core core = Core.getInstance(); - - @Override - public void run() { - while (core.isAlive()) { - long t1 = System.currentTimeMillis(); // 绉掍负鍗曚綅 - if (t1 - core.getLastNormalRetcodeTime() > 60 * 1000) { // 瓒呰繃60绉掞紝鍒や负绂荤嚎 - core.setAlive(false); - LOG.info("寰俊宸茬绾�"); - } - SleepUtils.sleep(10 * 1000); // 浼戠湢10绉� - } - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/Config.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/Config.java deleted file mode 100644 index bc5bc6a..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/Config.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.xmzs.common.wechat.utils; - -import com.xmzs.common.wechat.utils.enums.OsNameEnum; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; - - -/** - * 閰嶇疆淇℃伅 - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�23鏃� 涓嬪崍2:26:21 - * @version 1.0 - * - */ -public class Config { - - public static final String API_WXAPPID = "API_WXAPPID"; - - public static final String picDir = "D://itchat4j"; - public static final String VERSION = "1.4.1"; - public static final String BASE_URL = "https://login.weixin.qq.com"; - public static final String REFERER = "https://wx.qq.com/?&lang=zh_CN&target=t"; - public static final String OS = ""; - public static final String DIR = ""; - public static final String DEFAULT_QR = "QR.jpg"; - public static final String USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36"; - public static final String UOS_PATCH_CLIENT_VERSION = "2.0.0"; - - public static final String UOS_PATCH_EXTSPAM = - "Go8FCIkFEokFCggwMDAwMDAwMRAGGvAESySibk50w5Wb3uTl2c2h64jVVrV7gNs06GFlWplHQbY/5FfiO++1yH4ykCyNPWKXmco+wfQzK5R98D3so7rJ5LmGFvBLjGceleySrc3SOf2Pc1gVehzJgODeS0lDL3/I/0S2SSE98YgKleq6Uqx6ndTy9yaL9qFxJL7eiA/R3SEfTaW1SBoSITIu+EEkXff+Pv8NHOk7N57rcGk1w0ZzRrQDkXTOXFN2iHYIzAAZPIOY45Lsh+A4slpgnDiaOvRtlQYCt97nmPLuTipOJ8Qc5pM7ZsOsAPPrCQL7nK0I7aPrFDF0q4ziUUKettzW8MrAaiVfmbD1/VkmLNVqqZVvBCtRblXb5FHmtS8FxnqCzYP4WFvz3T0TcrOqwLX1M/DQvcHaGGw0B0y4bZMs7lVScGBFxMj3vbFi2SRKbKhaitxHfYHAOAa0X7/MSS0RNAjdwoyGHeOepXOKY+h3iHeqCvgOH6LOifdHf/1aaZNwSkGotYnYScW8Yx63LnSwba7+hESrtPa/huRmB9KWvMCKbDThL/nne14hnL277EDCSocPu3rOSYjuB9gKSOdVmWsj9Dxb/iZIe+S6AiG29Esm+/eUacSba0k8wn5HhHg9d4tIcixrxveflc8vi2/wNQGVFNsGO6tB5WF0xf/plngOvQ1/ivGV/C1Qpdhzznh0ExAVJ6dwzNg7qIEBaw+BzTJTUuRcPk92Sn6QDn2Pu3mpONaEumacjW4w6ipPnPw+g2TfywJjeEcpSZaP4Q3YV5HG8D6UjWA4GSkBKculWpdCMadx0usMomsSS/74QgpYqcPkmamB4nVv1JxczYITIqItIKjD35IGKAUwAA=="; - - - public static final ArrayList<String> API_SPECIAL_USER = new ArrayList<String>(Arrays.asList("filehelper", "weibo", - "qqmail", "fmessage", "tmessage", "qmessage", "qqsync", "floatbottle", "lbsapp", "shakeapp", "medianote", - "qqfriend", "readerapp", "blogapp", "facebookapp", "masssendapp", "meishiapp", "feedsapp", "voip", - "blogappweixin", "brandsessionholder", "weixin", "weixinreminder", "officialaccounts", "wxitil", - "notification_messages", "wxid_novlwrv3lqwv11", "gh_22b87fa7cb3c", "userexperience_alarm")); - - /** - * 鑾峰彇鏂囦欢鐩綍 - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�8鏃� 涓嬪崍10:27:42 - * @return - */ - public static String getLocalPath() { - String localPath = null; - try { - localPath = new File("").getCanonicalPath(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return localPath; - } - - /** - * 鑾峰彇绯荤粺骞冲彴 - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�8鏃� 涓嬪崍10:27:53 - */ - public static OsNameEnum getOsNameEnum() { - String os = System.getProperty("os.name").toUpperCase(); - if (os.indexOf(OsNameEnum.DARWIN.toString()) >= 0) { - return OsNameEnum.DARWIN; - } else if (os.indexOf(OsNameEnum.WINDOWS.toString()) >= 0) { - return OsNameEnum.WINDOWS; - } else if (os.indexOf(OsNameEnum.LINUX.toString()) >= 0) { - return OsNameEnum.LINUX; - } else if (os.indexOf(OsNameEnum.MAC.toString()) >= 0) { - return OsNameEnum.MAC; - } - return OsNameEnum.OTHER; - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/ConstantConfigEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/ConstantConfigEnum.java deleted file mode 100644 index 2b22777..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/ConstantConfigEnum.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.xmzs.common.wechat.utils; - -/** - * 甯搁噺 - * - * @author https=//github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�5鏈�5鏃� 涓嬪崍11=29=04 - * @version 1.0 - * - */ -public class ConstantConfigEnum { - public static final int APPMSGTYPE_TEXT = 1; - public static final int APPMSGTYPE_IMG = 2; - public static final int APPMSGTYPE_AUDIO = 3; - public static final int APPMSGTYPE_VIDEO = 4; - public static final int APPMSGTYPE_URL = 5; - public static final int APPMSGTYPE_ATTACH = 6; - public static final int APPMSGTYPE_OPEN = 7; - public static final int APPMSGTYPE_EMOJI = 8; - public static final int APPMSGTYPE_VOICE_REMIND = 9; - public static final int APPMSGTYPE_SCAN_GOOD = 10; - public static final int APPMSGTYPE_GOOD = 13; - public static final int APPMSGTYPE_EMOTION = 15; - public static final int APPMSGTYPE_CARD_TICKET = 16; - public static final int APPMSGTYPE_REALTIME_SHARE_LOCATION = 17; - // public static final int APPMSGTYPE_TRANSFERS = 2e3; - public static final int APPMSGTYPE_RED_ENVELOPES = 2001; - public static final int APPMSGTYPE_READER_TYPE = 100001; - public static final int UPLOAD_MEDIA_TYPE_IMAGE = 1; - public static final int UPLOAD_MEDIA_TYPE_VIDEO = 2; - public static final int UPLOAD_MEDIA_TYPE_AUDIO = 3; - public static final int UPLOAD_MEDIA_TYPE_ATTACHMENT = 4; - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/MsgKeywords.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/MsgKeywords.java deleted file mode 100644 index 53e287b..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/MsgKeywords.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.xmzs.common.wechat.utils; - -public class MsgKeywords { - public static String newFriendStr = "鎴戦�氳繃浜嗕綘鐨勬湅鍙嬮獙璇佽姹�"; - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/MyHttpClient.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/MyHttpClient.java deleted file mode 100644 index e23ce65..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/MyHttpClient.java +++ /dev/null @@ -1,194 +0,0 @@ -package com.xmzs.common.wechat.utils; - -import java.io.IOException; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; -import java.util.logging.Logger; - -import org.apache.http.Consts; -import org.apache.http.HttpEntity; -import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.CookieStore; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.entity.UrlEncodedFormEntity; -import org.apache.http.client.methods.CloseableHttpResponse; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.cookie.Cookie; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.BasicCookieStore; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.message.BasicNameValuePair; -import org.apache.http.util.EntityUtils; - -/** - * HTTP璁块棶绫伙紝瀵笰pache HttpClient杩涜绠�鍗曞皝瑁咃紝閫傞厤鍣ㄦā寮� - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�9鏃� 涓嬪崍7:05:04 - * @version 1.0 - * - */ -public class MyHttpClient { - private Logger logger = Logger.getLogger("MyHttpClient"); - - private static CloseableHttpClient httpClient = HttpClients.createDefault(); - - private static MyHttpClient instance = null; - - private static CookieStore cookieStore; - - static { - cookieStore = new BasicCookieStore(); - - // 灏咰ookieStore璁剧疆鍒癶ttpClient涓� - httpClient = HttpClients.custom().setDefaultCookieStore(cookieStore).build(); - } - - public static String getCookie(String name) { - List<Cookie> cookies = cookieStore.getCookies(); - for (Cookie cookie : cookies) { - if (cookie.getName().equalsIgnoreCase(name)) { - return cookie.getValue(); - } - } - return null; - - } - - private MyHttpClient() { - - } - - /** - * 鑾峰彇cookies - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�7鏃� 涓嬪崍8:37:17 - * @return - */ - public static MyHttpClient getInstance() { - if (instance == null) { - synchronized (MyHttpClient.class) { - if (instance == null) { - instance = new MyHttpClient(); - } - } - } - return instance; - } - - /** - * 澶勭悊GET璇锋眰 - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�9鏃� 涓嬪崍7:06:19 - * @param url - * @param params - * @return - */ - public HttpEntity doGet(String url, List<BasicNameValuePair> params, boolean redirect, - Map<String, String> headerMap) { - HttpEntity entity = null; - HttpGet httpGet = new HttpGet(); - - try { - if (params != null) { - String paramStr = EntityUtils.toString(new UrlEncodedFormEntity(params, Consts.UTF_8)); - httpGet = new HttpGet(url + "?" + paramStr); - } else { - httpGet = new HttpGet(url); - } - if (!redirect) { - httpGet.setConfig(RequestConfig.custom().setRedirectsEnabled(false).build()); // 绂佹閲嶅畾鍚� - } - httpGet.setHeader("User-Agent", Config.USER_AGENT); - httpGet.setHeader("client-version", Config.UOS_PATCH_CLIENT_VERSION); - httpGet.setHeader("extspam", Config.UOS_PATCH_EXTSPAM); - httpGet.setHeader("referer", Config.REFERER); - if (headerMap != null) { - Set<Entry<String, String>> entries = headerMap.entrySet(); - for (Entry<String, String> entry : entries) { - httpGet.setHeader(entry.getKey(), entry.getValue()); - } - } - CloseableHttpResponse response = httpClient.execute(httpGet); - entity = response.getEntity(); - } catch (ClientProtocolException e) { - logger.info(e.getMessage()); - } catch (IOException e) { - logger.info(e.getMessage()); - } - - return entity; - } - - /** - * 澶勭悊POST璇锋眰 - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�9鏃� 涓嬪崍7:06:35 - * @param url - * @param params - * @return - */ - public HttpEntity doPost(String url, String paramsStr) { - HttpEntity entity = null; - HttpPost httpPost = new HttpPost(); - try { - StringEntity params = new StringEntity(paramsStr, Consts.UTF_8); - httpPost = new HttpPost(url); - httpPost.setEntity(params); - httpPost.setHeader("Content-type", "application/json; charset=utf-8"); - httpPost.setHeader("User-Agent", Config.USER_AGENT); - httpPost.setHeader("client-version", Config.UOS_PATCH_CLIENT_VERSION); - httpPost.setHeader("extspam", Config.UOS_PATCH_EXTSPAM); - httpPost.setHeader("referer", Config.REFERER); - - CloseableHttpResponse response = httpClient.execute(httpPost); - entity = response.getEntity(); - } catch (ClientProtocolException e) { - logger.info(e.getMessage()); - } catch (IOException e) { - logger.info(e.getMessage()); - } - - return entity; - } - - /** - * 涓婁紶鏂囦欢鍒版湇鍔″櫒 - * - * @author https://github.com/yaphone - * @date 2017骞�5鏈�7鏃� 涓嬪崍9:19:23 - * @param url - * @param reqEntity - * @return - */ - public HttpEntity doPostFile(String url, HttpEntity reqEntity) { - HttpEntity entity = null; - HttpPost httpPost = new HttpPost(url); - httpPost.setHeader("User-Agent", Config.USER_AGENT); - httpPost.setHeader("client-version", Config.UOS_PATCH_CLIENT_VERSION); - httpPost.setHeader("extspam", Config.UOS_PATCH_EXTSPAM); - httpPost.setHeader("referer", Config.REFERER); - - httpPost.setEntity(reqEntity); - try { - CloseableHttpResponse response = httpClient.execute(httpPost); - entity = response.getEntity(); - - } catch (Exception e) { - logger.info(e.getMessage()); - } - return entity; - } - - public static CloseableHttpClient getHttpClient() { - return httpClient; - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/SleepUtils.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/SleepUtils.java deleted file mode 100644 index b945606..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/SleepUtils.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.xmzs.common.wechat.utils; - -/** - * Created by xiaoxiaomo on 2017/5/6. - */ -public class SleepUtils { - - /** - * 姣涓哄崟浣� - * @param time - */ - public static void sleep( long time ){ - try { - Thread.sleep( time ); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/MsgCodeEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/MsgCodeEnum.java deleted file mode 100644 index ec136f3..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/MsgCodeEnum.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.xmzs.common.wechat.utils.enums; - -/** - * 娑堟伅绫诲瀷 - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�23鏃� 涓嬪崍12:15:00 - * @version 1.0 - * - */ -public enum MsgCodeEnum { - - // public static final int MSGTYPE_TEXT = 1; // 鏂囨湰娑堟伅绫诲瀷 - // public static final int MSGTYPE_IMAGE = 3; // 鍥剧墖娑堟伅 - // public static final int MSGTYPE_VOICE = 34; // 璇煶娑堟伅 - // public static final int MSGTYPE_VIDEO = 43; // 灏忚棰戞秷鎭� - // public static final int MSGTYPE_MICROVIDEO = 62; // 鐭棰戞秷鎭� - // public static final int MSGTYPE_EMOTICON = 47; // 琛ㄦ儏娑堟伅 - // public static final int MSGTYPE_APP = 49; - // public static final int MSGTYPE_VOIPMSG = 50; - // public static final int MSGTYPE_VOIPNOTIFY = 52; - // public static final int MSGTYPE_VOIPINVITE = 53; - // public static final int MSGTYPE_LOCATION = 48; - // public static final int MSGTYPE_STATUSNOTIFY = 51; - // public static final int MSGTYPE_SYSNOTICE = 9999; - // public static final int MSGTYPE_POSSIBLEFRIEND_MSG = 40; - // public static final int MSGTYPE_VERIFYMSG = 37; - // public static final int MSGTYPE_SHARECARD = 42; - // public static final int MSGTYPE_SYS = 10000; - // public static final int MSGTYPE_RECALLED = 10002; - MSGTYPE_TEXT(1, "鏂囨湰娑堟伅绫诲瀷"), - MSGTYPE_IMAGE(3, "鍥剧墖娑堟伅"), - MSGTYPE_VOICE(34, "璇煶娑堟伅"), - MSGTYPE_VIDEO(43, "灏忚棰戞秷鎭�"), - MSGTYPE_MICROVIDEO(62, "鐭棰戞秷鎭�"), - MSGTYPE_EMOTICON(47, "琛ㄦ儏娑堟伅"), - MSGTYPE_MEDIA(49, "澶氬獟浣撴秷鎭�"), - MSGTYPE_VOIPMSG(50, ""), - MSGTYPE_VOIPNOTIFY(52, ""), - MSGTYPE_VOIPINVITE(53, ""), - MSGTYPE_LOCATION(48, ""), - MSGTYPE_STATUSNOTIFY(51, ""), - MSGTYPE_SYSNOTICE(9999, ""), - MSGTYPE_POSSIBLEFRIEND_MSG(40, ""), - MSGTYPE_VERIFYMSG(37, "濂藉弸璇锋眰"), - MSGTYPE_SHARECARD(42, ""), - MSGTYPE_SYS(10000, "绯荤粺娑堟伅"), - MSGTYPE_RECALLED(10002, "") - - ; - - private int code; - private String type; - - MsgCodeEnum(int code, String type) { - this.code = code; - this.type = type; - } - - public int getCode() { - return code; - } - - public String getType() { - return type; - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/MsgTypeEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/MsgTypeEnum.java deleted file mode 100644 index 63ef450..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/MsgTypeEnum.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.xmzs.common.wechat.utils.enums; - - -/** - * 娑堟伅绫诲瀷鏋氫妇绫� - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�5鏈�13鏃� 涓嬪崍11:53:00 - * @version 1.0 - * - */ -public enum MsgTypeEnum { - TEXT("Text", "鏂囨湰娑堟伅"), - PIC("Pic", "鍥剧墖娑堟伅"), - VOICE("Voice", "璇煶娑堟伅"), - VIEDO("Viedo", "灏忚棰戞秷鎭�"), - NAMECARD("NameCard", "鍚嶇墖娑堟伅"), - SYS("Sys", "绯荤粺娑堟伅"), - VERIFYMSG("VerifyMsg", "娣诲姞濂藉弸"), - MEDIA("app", "鏂囦欢娑堟伅"); - - private String type; - private String code; - - MsgTypeEnum(String type, String code) { - this.type = type; - this.code = code; - } - - public String getType() { - return type; - } - - public String getCode() { - return code; - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/OsNameEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/OsNameEnum.java deleted file mode 100644 index 1a00a43..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/OsNameEnum.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.xmzs.common.wechat.utils.enums; - -/** - * 绯荤粺骞冲彴 - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�8鏃� 涓嬪崍10:36:28 - * @version 1.0 - * - */ -public enum OsNameEnum { - WINDOWS, LINUX, DARWIN, MAC, OTHER -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/ResultEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/ResultEnum.java deleted file mode 100644 index f21b20a..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/ResultEnum.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.xmzs.common.wechat.utils.enums; - -/** - * 杩斿洖缁撴瀯鏋氫妇绫� - * <p> - * Created by xiaoxiaomo on 2017/5/6. - */ -public enum ResultEnum { - - SUCCESS("200", "鎴愬姛"), - WAIT_CONFIRM("201", "璇峰湪鎵嬫満涓婄偣鍑荤‘璁�"), - WAIT_SCAN("400", "璇锋壂鎻忎簩缁寸爜"); - - private String code; - private String msg; - - ResultEnum(String code, String msg) { - this.code = code; - this.msg = msg; - } - - public String getCode() { - return code; - } - -// public static MsgInfoEnum getCode(String code) { -// switch (code) { -// case "Text": -// return MsgInfoEnum.TEXT; -// default: -// return MsgInfoEnum.VIDEO; -// } -// } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/RetCodeEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/RetCodeEnum.java deleted file mode 100644 index f8e8082..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/RetCodeEnum.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.xmzs.common.wechat.utils.enums; - -public enum RetCodeEnum { - - NORMAL("0", "鏅��"), - LOGIN_OUT("1102", "閫�鍑�"), - LOGIN_OTHERWHERE("1101", "鍏跺畠鍦版柟鐧婚檰"), - MOBILE_LOGIN_OUT("1102", "绉诲姩绔��鍑�"), - UNKOWN("9999", "鏈煡") - - ; - - - private String code; - private String type; - - RetCodeEnum(String code, String type) { - this.code = code; - this.type = type; - } - - public String getCode() { - return code; - } - - public String getType() { - return type; - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/StorageLoginInfoEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/StorageLoginInfoEnum.java deleted file mode 100644 index fa68b3b..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/StorageLoginInfoEnum.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.xmzs.common.wechat.utils.enums; - -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; - -import java.util.HashMap; -import java.util.Map; - -/** - * Created by xiaoxiaomo on 2017/5/7. - */ -public enum StorageLoginInfoEnum { - - //URL - url("url",new String()), - fileUrl("fileUrl",new String()), - syncUrl("syncUrl",new String()), - - deviceid("deviceid",new String()), //鐢熸垚15浣嶉殢鏈烘暟 - - //baseRequest - skey("skey",new String()), - wxsid("wxsid",new String()), - wxuin("wxuin",new String()), - pass_ticket("pass_ticket",new String()), - - - InviteStartCount("InviteStartCount",0), - User("User",new JSONObject()), - SyncKey("SyncKey",new JSONObject()), - synckey("synckey",new String()), - - - - MemberCount("MemberCount",new String()), - MemberList("MemberList",new JSONArray()), - - - - ; - - private String key; - private Object type; - - StorageLoginInfoEnum(String key, Object type) { - this.key = key; - this.type = type; - } - - public String getKey() { - return key; - } - - - public Object getType() { - return type; - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/URLEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/URLEnum.java deleted file mode 100644 index 06348ef..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/URLEnum.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.xmzs.common.wechat.utils.enums; - -/** - * URL - * Created by xiaoxiaomo on 2017/5/6. - */ -public enum URLEnum { - - - - BASE_URL("https://login.weixin.qq.com","鍩烘湰鐨刄RL"), - UUID_URL(BASE_URL.url+"/jslogin","UUIDLURL"), - QRCODE_URL(BASE_URL.url+"/qrcode/","鍒濆鍖朥RL"), - STATUS_NOTIFY_URL(BASE_URL.url+"/webwxstatusnotify?lang=zh_CN&pass_ticket=%s","寰俊鐘舵�侀�氱煡"), - LOGIN_URL(BASE_URL.url+"/cgi-bin/mmwebwx-bin/login","鐧婚檰URL"), - INIT_URL("%s/webwxinit?r=%s&pass_ticket=%s","鍒濆鍖朥RL"), - SYNC_CHECK_URL("/synccheck","妫�鏌ュ績璺砋RL"), - WEB_WX_SYNC_URL("%s/webwxsync?sid=%s&skey=%s&pass_ticket=%s","web寰俊娑堟伅鍚屾URL"), - WEB_WX_GET_CONTACT("%s/webwxgetcontact","web寰俊鑾峰彇鑱旂郴浜轰俊鎭疷RL"), - WEB_WX_SEND_MSG("%s/webwxsendmsg","鍙戦�佹秷鎭疷RL"), - WEB_WX_UPLOAD_MEDIA("%s/webwxuploadmedia?f=json", "涓婁紶鏂囦欢鍒版湇鍔″櫒"), - WEB_WX_GET_MSG_IMG("%s/webwxgetmsgimg", "涓嬭浇鍥剧墖娑堟伅"), - WEB_WX_GET_VOICE("%s/webwxgetvoice", "涓嬭浇璇煶娑堟伅"), - WEB_WX_GET_VIEDO("%s/webwxgetvideo", "涓嬭浇璇煶娑堟伅"), - WEB_WX_PUSH_LOGIN("%s/webwxpushloginurl", "涓嶆壂鐮佺櫥闄�"), - WEB_WX_LOGOUT("%s/webwxlogout", "閫�鍑哄井淇�"), - WEB_WX_BATCH_GET_CONTACT("%s/webwxbatchgetcontact?type=ex&r=%s&lang=zh_CN&pass_ticket=%s", "鏌ヨ缇や俊鎭�"), - WEB_WX_REMARKNAME("%s/webwxoplog?lang=zh_CN&pass_ticket=%s", "淇敼濂藉弸澶囨敞"), - WEB_WX_VERIFYUSER("%s/webwxverifyuser?r=%s&lang=zh_CN&pass_ticket=%s", "琚姩娣诲姞濂藉弸"), - WEB_WX_GET_MEDIA("%s/webwxgetmedia", "涓嬭浇鏂囦欢") - - - - - ; - - private String url; - private String msg; - - URLEnum(String url, String msg) { - this.url = url; - this.msg = msg; - } - - - public String getUrl() { - return url; - } -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/VerifyFriendEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/VerifyFriendEnum.java deleted file mode 100644 index 1ea2213..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/VerifyFriendEnum.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.xmzs.common.wechat.utils.enums; - -/** - * 纭娣诲姞濂藉弸Enum - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�6鏈�29鏃� 涓嬪崍9:47:14 - * @version 1.0 - * - */ -public enum VerifyFriendEnum { - - ADD(2, "娣诲姞"), - ACCEPT(3, "鎺ュ彈"); - - private int code; - private String desc; - - private VerifyFriendEnum(int code, String desc) { - this.code = code; - this.desc = desc; - } - - public int getCode() { - return code; - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/parameters/BaseParaEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/parameters/BaseParaEnum.java deleted file mode 100644 index 9bdd7e7..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/parameters/BaseParaEnum.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.xmzs.common.wechat.utils.enums.parameters; - -/** - * - * 鍩烘湰璇锋眰鍙傛暟 - * 1. webWxInit 鍒濆鍖� - * 2. wxStatusNotify 寰俊鐘舵�侀�氱煡 - * - * <p> - * Created by xiaoxiaomo on 2017/5/7. - */ -public enum BaseParaEnum { - - Uin("Uin", "wxuin"), - Sid("Sid", "wxsid"), - Skey("Skey", "skey"), - DeviceID("DeviceID", "pass_ticket"); - - private String para; - private String value; - - BaseParaEnum(String para, String value) { - this.para = para; - this.value = value; - } - - public String para() { - return para; - } - - - public Object value() { - return value; - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/parameters/LoginParaEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/parameters/LoginParaEnum.java deleted file mode 100644 index da06b32..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/parameters/LoginParaEnum.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.xmzs.common.wechat.utils.enums.parameters; - -/** - * 鐧婚檰 - * <p> - * Created by xiaoxiaomo on 2017/5/7. - */ -public enum LoginParaEnum { - - LOGIN_ICON("loginicon", "true"), - UUID("uuid", ""), - TIP("tip", "0"), - R("r", ""), - _1("_", ""); - - private String para; - private String value; - - LoginParaEnum(String para, String value) { - this.para = para; - this.value = value; - } - - public String para() { - return para; - } - - public String value() { - return value; - } -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/parameters/StatusNotifyParaEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/parameters/StatusNotifyParaEnum.java deleted file mode 100644 index c70a481..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/parameters/StatusNotifyParaEnum.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.xmzs.common.wechat.utils.enums.parameters; - -/** - * 鐘舵�侀�氱煡 - * <p> - * Created by xiaoxiaomo on 2017/5/7. - */ -public enum StatusNotifyParaEnum { - - CODE("Code", "3"), - FROM_USERNAME("FromUserName", ""), - TO_USERNAME("ToUserName", ""), - CLIENT_MSG_ID("ClientMsgId", ""); //鏃堕棿鎴� - - private String para; - private String value; - - StatusNotifyParaEnum(String para, String value) { - this.para = para; - this.value = value; - } - - public String para() { - return para; - } - - public String value() { - return value; - } -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/parameters/UUIDParaEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/parameters/UUIDParaEnum.java deleted file mode 100644 index 6805b54..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/enums/parameters/UUIDParaEnum.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.xmzs.common.wechat.utils.enums.parameters; - -/** - * UUID - * <p> - * Created by xiaoxiaomo on 2017/5/7. - */ -public enum UUIDParaEnum { - - APP_ID("appid", "wx782c26e4c19acffb"), - FUN("fun", "new"), - LANG("lang", "zh_CN"), - REDIRECT_URL("redirect_uri", - "https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?mod=desktop"), - _1("_", "鏃堕棿鎴�"); - - - private String para; - private String value; - - UUIDParaEnum(String para, String value) { - this.para = para; - this.value = value; - } - - public String para() { - return para; - } - - public String value() { - return value; - } -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/tools/CommonTools.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/tools/CommonTools.java deleted file mode 100644 index 6bb567d..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/tools/CommonTools.java +++ /dev/null @@ -1,243 +0,0 @@ -package com.xmzs.common.wechat.utils.tools; - -import java.io.StringReader; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; - -import org.w3c.dom.Document; -import org.xml.sax.InputSource; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import com.vdurmont.emoji.EmojiParser; - -import com.xmzs.common.wechat.utils.Config; -import com.xmzs.common.wechat.utils.enums.OsNameEnum; - -/** - * 甯哥敤宸ュ叿绫� - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�8鏃� 涓嬪崍10:59:55 - * @version 1.0 - * - */ -public class CommonTools { - - public static boolean printQr(String qrPath) { - - switch (Config.getOsNameEnum()) { - case WINDOWS: - if (Config.getOsNameEnum().equals(OsNameEnum.WINDOWS)) { - Runtime runtime = Runtime.getRuntime(); - try { - runtime.exec("cmd /c start " + qrPath); - } catch (Exception e) { - e.printStackTrace(); - } - } - break; - case MAC: - if (Config.getOsNameEnum().equals(OsNameEnum.MAC)) { - Runtime runtime = Runtime.getRuntime(); - try { - runtime.exec("open " + qrPath); - } catch (Exception e) { - e.printStackTrace(); - } - } - break; - - default: - break; - } - return true; - } - - public static boolean clearScreen() { - switch (Config.getOsNameEnum()) { - case WINDOWS: - if (Config.getOsNameEnum().equals(OsNameEnum.WINDOWS)) { - Runtime runtime = Runtime.getRuntime(); - try { - runtime.exec("cmd /c " + "cls"); - } catch (Exception e) { - e.printStackTrace(); - } - } - break; - - default: - break; - } - return true; - } - - /** - * 姝e垯琛ㄨ揪寮忓鐞嗗伐鍏� - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�9鏃� 涓婂崍12:27:10 - * @return - */ - public static Matcher getMatcher(String regEx, String text) { - Pattern pattern = Pattern.compile(regEx); - Matcher matcher = pattern.matcher(text); - return matcher; - } - - /** - * xml瑙f瀽鍣� - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�9鏃� 涓嬪崍6:24:25 - * @param text - * @return - */ - public static Document xmlParser(String text) { - Document doc = null; - StringReader sr = new StringReader(text); - InputSource is = new InputSource(sr); - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - try { - DocumentBuilder builder = factory.newDocumentBuilder(); - doc = builder.parse(is); - } catch (Exception e) { - e.printStackTrace(); - } - return doc; - } - - public static JSONObject structFriendInfo(JSONObject userObj) { - Map<String, Object> friendInfoTemplate = new HashMap<String, Object>(); - friendInfoTemplate.put("UserName", ""); - friendInfoTemplate.put("City", ""); - friendInfoTemplate.put("DisplayName", ""); - friendInfoTemplate.put("PYQuanPin", ""); - friendInfoTemplate.put("RemarkPYInitial", ""); - friendInfoTemplate.put("Province", ""); - friendInfoTemplate.put("KeyWord", ""); - friendInfoTemplate.put("RemarkName", ""); - friendInfoTemplate.put("PYInitial", ""); - friendInfoTemplate.put("EncryChatRoomId", ""); - friendInfoTemplate.put("Alias", ""); - friendInfoTemplate.put("Signature", ""); - friendInfoTemplate.put("NickName", ""); - friendInfoTemplate.put("RemarkPYQuanPin", ""); - friendInfoTemplate.put("HeadImgUrl", ""); - - friendInfoTemplate.put("UniFriend", 0); - friendInfoTemplate.put("Sex", 0); - friendInfoTemplate.put("AppAccountFlag", 0); - friendInfoTemplate.put("VerifyFlag", 0); - friendInfoTemplate.put("ChatRoomId", 0); - friendInfoTemplate.put("HideInputBarFlag", 0); - friendInfoTemplate.put("AttrStatus", 0); - friendInfoTemplate.put("SnsFlag", 0); - friendInfoTemplate.put("MemberCount", 0); - friendInfoTemplate.put("OwnerUin", 0); - friendInfoTemplate.put("ContactFlag", 0); - friendInfoTemplate.put("Uin", 0); - friendInfoTemplate.put("StarFriend", 0); - friendInfoTemplate.put("Statues", 0); - - friendInfoTemplate.put("MemberList", new ArrayList<Object>()); - - JSONObject r = new JSONObject(); - Set<String> keySet = friendInfoTemplate.keySet(); - for (String key : keySet) { - if (userObj.containsKey(key)) { - r.put(key, userObj.get(key)); - } else { - r.put(key, friendInfoTemplate.get(key)); - } - } - - return r; - } - - public static String getSynckey(JSONObject obj) { - JSONArray obj2 = obj.getJSONArray("List"); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < obj2.size(); i++) { - JSONObject obj3 = (JSONObject) JSON.toJSON(obj2.get(i)); - sb.append(obj3.get("Val") + "|"); - } - return sb.substring(0, sb.length() - 1); // 656159784|656159911|656159873|1491905341 - - } - - public static JSONObject searchDictList(List<JSONObject> list, String key, String value) { - JSONObject r = null; - for (JSONObject i : list) { - if (i.getString(key).equals(value)) { - r = i; - break; - } - } - return r; - } - - /** - * 澶勭悊emoji琛ㄦ儏 - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�23鏃� 涓嬪崍2:39:04 - * @param d - * @param k - */ - public static void emojiFormatter(JSONObject d, String k) { - Matcher matcher = getMatcher("<span class=\"emoji emoji(.{1,10})\"></span>", d.getString(k)); - StringBuilder sb = new StringBuilder(); - String content = d.getString(k); - int lastStart = 0; - while (matcher.find()) { - String str = matcher.group(1); - if (str.length() == 6) { - - } else if (str.length() == 10) { - - } else { - str = "&#x" + str + ";"; - String tmp = content.substring(lastStart, matcher.start()); - sb.append(tmp + str); - lastStart = matcher.end(); - } - } - if (lastStart < content.length()) { - sb.append(content.substring(lastStart)); - } - if (sb.length() != 0) { - d.put(k, EmojiParser.parseToUnicode(sb.toString())); - } else { - d.put(k, content); - } - - } - - /** - * 娑堟伅鏍煎紡鍖� - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�23鏃� 涓嬪崍4:19:08 - * @param d - * @param k - */ - public static void msgFormatter(JSONObject d, String k) { - d.put(k, d.getString(k).replace("<br/>", "\n")); - emojiFormatter(d, k); - // TODO 涓巈moji琛ㄦ儏鏈夐儴鍒嗗吋瀹归棶棰橈紝鐩墠鏆傛湭澶勭悊瑙g爜澶勭悊 d.put(k, - // StringEscapeUtils.unescapeHtml4(d.getString(k))); - - } - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/tools/DownloadTools.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/tools/DownloadTools.java deleted file mode 100644 index 88166ca..0000000 --- a/ruoyi-common/ruoyi-common-wechat/src/main/java/com/xmzs/common/wechat/utils/tools/DownloadTools.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.xmzs.common.wechat.utils.tools; - -import java.io.FileOutputStream; -import java.io.OutputStream; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.logging.Logger; - -import org.apache.http.HttpEntity; -import org.apache.http.message.BasicNameValuePair; -import org.apache.http.util.EntityUtils; - -import com.xmzs.common.wechat.beans.BaseMsg; -import com.xmzs.common.wechat.core.Core; -import com.xmzs.common.wechat.utils.MyHttpClient; -import com.xmzs.common.wechat.utils.enums.MsgTypeEnum; -import com.xmzs.common.wechat.utils.enums.URLEnum; - -/** - * 涓嬭浇宸ュ叿绫� - * - * @author https://github.com/yaphone - * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�21鏃� 涓嬪崍11:18:46 - * @version 1.0 - * - */ -public class DownloadTools { - private static Logger logger = Logger.getLogger("DownloadTools"); - private static Core core = Core.getInstance(); - private static MyHttpClient myHttpClient = core.getMyHttpClient(); - - /** - * 澶勭悊涓嬭浇浠诲姟 - * - * @author https://github.com/yaphone - * @date 2017骞�4鏈�21鏃� 涓嬪崍11:00:25 - * @param url - * @param msgId - * @param path - * @return - */ - public static Object getDownloadFn(BaseMsg msg, String type, String path) { - Map<String, String> headerMap = new HashMap<String, String>(); - List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>(); - String url = ""; - if (type.equals(MsgTypeEnum.PIC.getType())) { - url = String.format(URLEnum.WEB_WX_GET_MSG_IMG.getUrl(), (String) core.getLoginInfo().get("url")); - } else if (type.equals(MsgTypeEnum.VOICE.getType())) { - url = String.format(URLEnum.WEB_WX_GET_VOICE.getUrl(), (String) core.getLoginInfo().get("url")); - } else if (type.equals(MsgTypeEnum.VIEDO.getType())) { - headerMap.put("Range", "bytes=0-"); - url = String.format(URLEnum.WEB_WX_GET_VIEDO.getUrl(), (String) core.getLoginInfo().get("url")); - } else if (type.equals(MsgTypeEnum.MEDIA.getType())) { - headerMap.put("Range", "bytes=0-"); - url = String.format(URLEnum.WEB_WX_GET_MEDIA.getUrl(), (String) core.getLoginInfo().get("fileUrl")); - params.add(new BasicNameValuePair("sender", msg.getFromUserName())); - params.add(new BasicNameValuePair("mediaid", msg.getMediaId())); - params.add(new BasicNameValuePair("filename", msg.getFileName())); - } - params.add(new BasicNameValuePair("msgid", msg.getNewMsgId())); - params.add(new BasicNameValuePair("skey", (String) core.getLoginInfo().get("skey"))); - HttpEntity entity = myHttpClient.doGet(url, params, true, headerMap); - try { - OutputStream out = new FileOutputStream(path); - byte[] bytes = EntityUtils.toByteArray(entity); - out.write(bytes); - out.flush(); - out.close(); - // Tools.printQr(path); - - } catch (Exception e) { - logger.info(e.getMessage()); - return false; - } - return null; - }; - -} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/api/MessageTools.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/api/MessageTools.java new file mode 100644 index 0000000..9ed005a --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/api/MessageTools.java @@ -0,0 +1,546 @@ +package org.ruoyi.common.wechat.itchat4j.api; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import org.apache.commons.lang3.StringUtils; +import org.apache.http.Consts; +import org.apache.http.HttpEntity; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.mime.HttpMultipartMode; +import org.apache.http.entity.mime.MultipartEntityBuilder; +import org.apache.http.util.EntityUtils; +import org.ruoyi.common.wechat.itchat4j.beans.BaseMsg; +import org.ruoyi.common.wechat.itchat4j.beans.RecommendInfo; +import org.ruoyi.common.wechat.itchat4j.core.Core; +import org.ruoyi.common.wechat.itchat4j.core.CoreManage; +import org.ruoyi.common.wechat.itchat4j.utils.Config; +import org.ruoyi.common.wechat.itchat4j.utils.LogInterface; +import org.ruoyi.common.wechat.itchat4j.utils.enums.SendMsgType; +import org.ruoyi.common.wechat.itchat4j.utils.enums.StorageLoginInfoEnum; +import org.ruoyi.common.wechat.itchat4j.utils.enums.URLEnum; +import org.ruoyi.common.wechat.itchat4j.utils.enums.VerifyFriendEnum; +import org.ruoyi.common.wechat.web.constant.UploadConstant; + +import javax.activation.MimetypesFileTypeMap; +import java.io.File; +import java.text.SimpleDateFormat; +import java.util.*; + +/** + * 娑堟伅澶勭悊绫� + * + * @author https://github.com/yaphone + * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�23鏃� 涓嬪崍2:30:37 + * @version 1.0 + * + * @author WesleyOne 淇敼 + */ +public class MessageTools implements LogInterface { + + + /** + * 閫氳繃UserName鍙戦�佹秷鎭� + * @param toUserName + * @param uniqueKey + * @param data + * @param type + * @return + */ + public static boolean send(String toUserName, String uniqueKey, String data, String type){ + String nickName = WechatTools.getNickNameByUserName(toUserName, uniqueKey); + if (SendMsgType.TEXT.toValue().equals(type)){ + LOG.info("鍙戦�佹枃鏈� {}:{}", nickName, data); + return MessageTools.sendMsgById(data,toUserName,uniqueKey); + }else if (SendMsgType.IMG.toValue().equals(type)){ + LOG.info("鍙戦�佸浘鐗� {}:{}", nickName, UploadConstant.IMG_PATH_SEP+data); + return MessageTools.sendPicMsgByUserId(toUserName,UploadConstant.IMG_PATH_SEP+data,uniqueKey); + }else if (SendMsgType.FILE.toValue().equals(type)){ + LOG.info("鍙戦�佹枃浠� {}:{}",nickName,UploadConstant.FILE_PATH_SEP+data); + return MessageTools.sendFileMsgByUserId(toUserName,UploadConstant.FILE_PATH_SEP+data,uniqueKey); + } + return false; + } + + /** + * 閫氳繃NickName鍙戦�佹秷鎭� + * @param nickName + * @param uniqueKey + * @param data + * @param type + * @param isGroup + * @return + */ + public static boolean sendByNickName(String nickName, String uniqueKey, String data, String type,boolean isGroup){ + + if (SendMsgType.TEXT.toValue().equals(type)){ + LOG.info("鍙戦�佹枃鏈� {}:{}", nickName, data); + return MessageTools.sendMsgByNickNameApi(data, nickName, uniqueKey, isGroup); + }else if (SendMsgType.IMG.toValue().equals(type)){ + LOG.info("鍙戦�佸浘鐗� {}:{}", nickName, UploadConstant.IMG_PATH_SEP+data); + return MessageTools.sendPicMsgByNickNameApi(nickName, UploadConstant.IMG_PATH_SEP + data, uniqueKey, isGroup); + }else if (SendMsgType.FILE.toValue().equals(type)){ + LOG.info("鍙戦�佹枃浠� {}:{}",nickName,UploadConstant.FILE_PATH_SEP+data); + return MessageTools.sendFileMsgByNickNameApi(nickName,UploadConstant.FILE_PATH_SEP+data,uniqueKey,isGroup); + } + return false; + } + + + /** + * 鏍规嵁UserName鍙戦�佹枃鏈秷鎭� + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�6鏃� 涓婂崍11:45:51 + * @param text + * @param toUserName + * @param uniqueKey + */ + public static boolean sendMsgById(String text, String toUserName, String uniqueKey) { + if (text == null) { + return false; + } + return webWxSendMsg(1, text, toUserName, uniqueKey); + } + + /** + * 鏍规嵁NickName鍙戦�佹枃鏈秷鎭� + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�4鏃� 涓嬪崍11:17:38 + * @param text + * @param nickName + */ + public static boolean sendMsgByNickName(String text, String nickName, String uniqueKey) { + if (nickName != null) { + String toUserName = WechatTools.getContactUserNameByNickName(nickName,uniqueKey); + if (toUserName != null) { + return sendMsgById(text, toUserName, uniqueKey); + } + } + return false; + + } + + public static boolean sendMsgByNickNameApi(String text, String nickName, String uniqueKey, boolean isGroup){ + if (isGroup){ + return sendGroupMsgByNickName(text,nickName,uniqueKey); + }else{ + return sendMsgByNickName(text,nickName,uniqueKey); + } + } + + + /** + * 鏍规嵁NickName鍙戦�佺兢鏂囨湰娑堟伅 + * @param text + * @param nickName + * @param uniqueKey + * @return + */ + private static boolean sendGroupMsgByNickName(String text, String nickName, String uniqueKey) { + if (nickName != null) { + String toUserName = WechatTools.getGroupUserNameByNickName(nickName,uniqueKey); + if (toUserName != null) { + return sendMsgById(text, toUserName, uniqueKey); + } + } + return false; + + } + + /** + * 娑堟伅鍙戦�� + * + * @author https://github.com/yaphone + * @date 2017骞�4鏈�23鏃� 涓嬪崍2:32:02 + * @param msgType + * @param content + * @param toUserName + */ + public static boolean webWxSendMsg(int msgType, String content, String toUserName, String uniqueKey) { + Core core = CoreManage.getInstance(uniqueKey); + if (!core.isAlive()){ + return false; + } + String url = String.format(URLEnum.WEB_WX_SEND_MSG.getUrl(), core.getLoginInfo().get("url")); + Map<String, Object> msgMap = new HashMap<String, Object>(12); + msgMap.put("Type", msgType); + msgMap.put("Content", content); + msgMap.put("FromUserName", core.getUserName()); + msgMap.put("ToUserName", toUserName == null ? core.getUserName() : toUserName); + msgMap.put("LocalID", System.currentTimeMillis() * 10); + msgMap.put("ClientMsgId", System.currentTimeMillis() * 10); + Map<String, Object> paramMap = core.getParamMap(); + paramMap.put("Msg", msgMap); + paramMap.put("Scene", 0); + try { + String paramStr = JSON.toJSONString(paramMap); + HttpEntity entity = core.getMyHttpClient().doPost(url, paramStr); + EntityUtils.toString(entity, Consts.UTF_8); + return true; + } catch (Exception e) { + LOG.error("webWxSendMsg", e); + return false; + } + } + + /** + * 涓婁紶澶氬獟浣撴枃浠跺埌 寰俊鏈嶅姟鍣紝鐩墠搴旇鏀寔3绉嶇被鍨�: 1. pic 鐩存帴鏄剧ず锛屽寘鍚浘鐗囷紝琛ㄦ儏 2.video 3.doc 鏄剧ず涓烘枃浠讹紝鍖呭惈PDF绛� + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�7鏃� 涓婂崍12:41:13 + * @param filePath + * @return + */ + private static JSONObject webWxUploadMedia(String filePath, String uniqueKey) { + Core core = CoreManage.getInstance(uniqueKey); + File f = new File(filePath); + if (!f.exists() || !f.isFile()) { + LOG.info("file is not exist"); + return null; + } + String url = String.format(URLEnum.WEB_WX_UPLOAD_MEDIA.getUrl(), core.getLoginInfo().get("fileUrl")); + String mimeType = new MimetypesFileTypeMap().getContentType(f); + String mediaType = ""; + if (mimeType == null) { + mimeType = "text/plain"; + } else { + mediaType = mimeType.split("/")[0].equals("image") ? "pic" : "doc"; + } + String lastModifieDate = new SimpleDateFormat("yyyy MM dd HH:mm:ss").format(new Date()); + long fileSize = f.length(); + String passTicket = (String) core.getLoginInfo().get("pass_ticket"); + String clientMediaId = String.valueOf(System.currentTimeMillis()) + + String.valueOf(new Random().nextLong()).substring(0, 4); + String webwxDataTicket = core.getMyHttpClient().getCookie("webwx_data_ticket"); + if (webwxDataTicket == null) { + LOG.error("get cookie webwx_data_ticket error"); + return null; + } + + Map<String, Object> paramMap = core.getParamMap(); + + paramMap.put("ClientMediaId", clientMediaId); + paramMap.put("TotalLen", fileSize); + paramMap.put("StartPos", 0); + paramMap.put("DataLen", fileSize); + paramMap.put("MediaType", 4); + + MultipartEntityBuilder builder = MultipartEntityBuilder.create(); + builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE); + + builder.addTextBody("id", "WU_FILE_0", ContentType.TEXT_PLAIN); + builder.addTextBody("name", filePath, ContentType.TEXT_PLAIN); + builder.addTextBody("type", mimeType, ContentType.TEXT_PLAIN); + builder.addTextBody("lastModifieDate", lastModifieDate, ContentType.TEXT_PLAIN); + builder.addTextBody("size", String.valueOf(fileSize), ContentType.TEXT_PLAIN); + builder.addTextBody("mediatype", mediaType, ContentType.TEXT_PLAIN); + builder.addTextBody("uploadmediarequest", JSON.toJSONString(paramMap), ContentType.TEXT_PLAIN); + builder.addTextBody("webwx_data_ticket", webwxDataTicket, ContentType.TEXT_PLAIN); + builder.addTextBody("pass_ticket", passTicket, ContentType.TEXT_PLAIN); + builder.addBinaryBody("filename", f, ContentType.create(mimeType), filePath); + HttpEntity reqEntity = builder.build(); + HttpEntity entity = core.getMyHttpClient().doPostFile(url, reqEntity); + if (entity != null) { + try { + String result = EntityUtils.toString(entity, Consts.UTF_8); + return JSON.parseObject(result); + } catch (Exception e) { + LOG.error("webWxUploadMedia 閿欒锛� ", e); + } + + } + return null; + } + + + public static boolean sendPicMsgByNickNameApi(String nickName, String filePath, String uniqueKey,boolean isGroup){ + if (isGroup){ + return sendGroupPicMsgByNickName(nickName, filePath, uniqueKey); + }else { + return sendPicMsgByNickName(nickName, filePath, uniqueKey); + } + } + + /** + * 鏍规嵁NickName鍙戦�佸浘鐗囨秷鎭� + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�7鏃� 涓嬪崍10:32:45 + * @param nickName + * @param filePath + * @return + */ + public static boolean sendPicMsgByNickName(String nickName, String filePath, String uniqueKey) { + String toUserName = WechatTools.getContactUserNameByNickName(nickName,uniqueKey); + if (toUserName != null) { + LOG.info("鍙戦�佸浘鐗� {}:{}",nickName,filePath); + return sendPicMsgByUserId(toUserName, filePath, uniqueKey); + } + return false; + } + + /** + * 鏍规嵁缇ょ殑NickName鍙戦�佸浘鐗囨秷鎭埌缇� + * @param nickName + * @param filePath + * @param uniqueKey + * @return + */ + public static boolean sendGroupPicMsgByNickName(String nickName, String filePath, String uniqueKey) { + String toUserName = WechatTools.getGroupUserNameByNickName(nickName,uniqueKey); + if (toUserName != null) { + LOG.info("鍙戦�佺兢鍥剧墖 {}:{}",nickName,filePath); + return sendPicMsgByUserId(toUserName, filePath, uniqueKey); + } + return false; + } + + /** + * 鏍规嵁鐢ㄦ埛id鍙戦�佸浘鐗囨秷鎭� + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�7鏃� 涓嬪崍10:34:24 + * @param userId + * @param filePath + * @param uniqueKey + * @return + */ + public static boolean sendPicMsgByUserId(String userId, String filePath, String uniqueKey) { + JSONObject responseObj = webWxUploadMedia(filePath, uniqueKey); + if (responseObj != null) { + String mediaId = responseObj.getString("MediaId"); + if (mediaId != null) { + return webWxSendMsgImg(userId, mediaId, uniqueKey); + } + } + return false; + } + + /** + * 鍙戦�佸浘鐗囨秷鎭紝鍐呴儴璋冪敤 + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�7鏃� 涓嬪崍10:38:55 + * @return + */ + private static boolean webWxSendMsgImg(String userId, String mediaId, String uniqueKey) { + Core core = CoreManage.getInstance(uniqueKey); + if (!core.isAlive()){ + return false; + } + String url = String.format("%s/webwxsendmsgimg?fun=async&f=json&pass_ticket=%s", core.getLoginInfo().get("url"), + core.getLoginInfo().get("pass_ticket")); + Map<String, Object> msgMap = new HashMap<String, Object>(8); + msgMap.put("Type", 3); + msgMap.put("MediaId", mediaId); + msgMap.put("FromUserName", core.getUserSelf().getString("UserName")); + msgMap.put("ToUserName", userId); + String clientMsgId = String.valueOf(System.currentTimeMillis()) + + String.valueOf(new Random().nextLong()).substring(1, 5); + msgMap.put("LocalID", clientMsgId); + msgMap.put("ClientMsgId", clientMsgId); + Map<String, Object> paramMap = core.getParamMap(); + paramMap.put("BaseRequest", core.getParamMap().get("BaseRequest")); + paramMap.put("Msg", msgMap); + String paramStr = JSON.toJSONString(paramMap); + HttpEntity entity = core.getMyHttpClient().doPost(url, paramStr); + if (entity != null) { + try { + String result = EntityUtils.toString(entity, Consts.UTF_8); + return JSON.parseObject(result).getJSONObject("BaseResponse").getInteger("Ret") == 0; + } catch (Exception e) { + LOG.error("webWxSendMsgImg 閿欒锛� ", e); + } + } + return false; + + } + + /** + * 鏍规嵁鐢ㄦ埛id鍙戦�佹枃浠� + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�7鏃� 涓嬪崍11:57:36 + * @param userId + * @param filePath + * @return + */ + private static boolean sendFileMsgByUserId(String userId, String filePath, String uniqueKey) { + String title = new File(filePath).getName(); + Map<String, String> data = new HashMap<String, String>(12); + data.put("appid", Config.API_WXAPPID); + data.put("title", title); + data.put("totallen", ""); + data.put("attachid", ""); + data.put("type", "6"); // APPMSGTYPE_ATTACH + data.put("fileext", title.split("\\.")[1]); // 鏂囦欢鍚庣紑 + JSONObject responseObj = webWxUploadMedia(filePath, uniqueKey); + if (responseObj != null) { + data.put("totallen", responseObj.getString("StartPos")); + data.put("attachid", responseObj.getString("MediaId")); + } else { + LOG.error("sednFileMsgByUserId 閿欒: ", data); + } + return webWxSendAppMsg(userId, data, uniqueKey); + } + + public static boolean sendFileMsgByNickNameApi(String nickName, String filePath, String uniqueKey, boolean isGroup){ + if (isGroup){ + return sendGroupFileMsgByNickName(nickName,filePath,uniqueKey); + }else { + return sendFileMsgByNickName(nickName,filePath,uniqueKey); + } + } + + + /** + * 鏍规嵁鐢ㄦ埛鏄电О鍙戦�佹枃浠舵秷鎭� + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�10鏃� 涓嬪崍10:59:27 + * @param nickName + * @param filePath + * @return + */ + private static boolean sendFileMsgByNickName(String nickName, String filePath, String uniqueKey) { + String toUserName = WechatTools.getContactUserNameByNickName(nickName,uniqueKey); + if (toUserName != null) { + LOG.info("鍙戦�佹枃浠� {}:{}",nickName,filePath); + return sendFileMsgByUserId(toUserName, filePath, uniqueKey); + } + return false; + } + + /** + * 鏍规嵁缇ゆ樀绉板彂閫佹枃浠舵秷鎭� + * @param nickName + * @param filePath + * @param uniqueKey + * @return + */ + private static boolean sendGroupFileMsgByNickName(String nickName, String filePath, String uniqueKey) { + String toUserName = WechatTools.getGroupUserNameByNickName(nickName,uniqueKey); + if (toUserName != null) { + LOG.info("鍙戦�佹枃浠� {}:{}",nickName,filePath); + return sendFileMsgByUserId(toUserName, filePath, uniqueKey); + } + return false; + } + + /** + * 鍐呴儴璋冪敤 + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�10鏃� 涓婂崍12:21:28 + * @param userId + * @param data + * @param uniqueKey + * @return + */ + private static boolean webWxSendAppMsg(String userId, Map<String, String> data, String uniqueKey) { + Core core = CoreManage.getInstance(uniqueKey); + if (!core.isAlive()){ + return false; + } + String url = String.format("%s/webwxsendappmsg?fun=async&f=json&pass_ticket=%s", core.getLoginInfo().get("url"), + core.getLoginInfo().get("pass_ticket")); + String clientMsgId = String.valueOf(System.currentTimeMillis()) + + String.valueOf(new Random().nextLong()).substring(1, 5); + String content = "<appmsg appid='wxeb7ec651dd0aefa9' sdkver=''><title>" + data.get("title") + + "</title><des></des><action></action><type>6</type><content></content><url></url><lowurl></lowurl>" + + "<appattach><totallen>" + data.get("totallen") + "</totallen><attachid>" + data.get("attachid") + + "</attachid><fileext>" + data.get("fileext") + "</fileext></appattach><extinfo></extinfo></appmsg>"; + Map<String, Object> msgMap = new HashMap<String, Object>(12); + msgMap.put("Type", data.get("type")); + msgMap.put("Content", content); + msgMap.put("FromUserName", core.getUserSelf().getString("UserName")); + msgMap.put("ToUserName", userId); + msgMap.put("LocalID", clientMsgId); + msgMap.put("ClientMsgId", clientMsgId); + /* + * Map<String, Object> paramMap = new HashMap<String, Object>(); + * + * @SuppressWarnings("unchecked") Map<String, Map<String, String>> + * baseRequestMap = (Map<String, Map<String, String>>) + * core.getLoginInfo() .get("baseRequest"); paramMap.put("BaseRequest", + * baseRequestMap.get("BaseRequest")); + */ + + Map<String, Object> paramMap = core.getParamMap(); + paramMap.put("Msg", msgMap); + paramMap.put("Scene", 0); + String paramStr = JSON.toJSONString(paramMap); + HttpEntity entity = core.getMyHttpClient().doPost(url, paramStr); + if (entity != null) { + try { + String result = EntityUtils.toString(entity, Consts.UTF_8); + return JSON.parseObject(result).getJSONObject("BaseResponse").getInteger("Ret") == 0; + } catch (Exception e) { + LOG.error("閿欒: ", e); + } + } + return false; + } + + /** + * 琚姩娣诲姞濂藉弸 + * + * @date 2017骞�6鏈�29鏃� 涓嬪崍10:08:43 + * @param msg + * @param accept + * true 鎺ュ彈 false 鎷掔粷 + */ + private static void addFriend(BaseMsg msg, boolean accept, String uniqueKey) { + Core core = CoreManage.getInstance(uniqueKey); + if (!accept) { // 涓嶆坊鍔� + return; + } + int status = VerifyFriendEnum.ACCEPT.getCode(); // 鎺ュ彈濂藉弸璇锋眰 + RecommendInfo recommendInfo = msg.getRecommendInfo(); + String userName = recommendInfo.getUserName(); + String ticket = recommendInfo.getTicket(); + // 鏇存柊濂藉弸鍒楄〃 + // TODO 姝ゅ闇�瑕佹洿鏂板ソ鍙嬪垪琛� + // core.getContactList().add(msg.getJSONObject("RecommendInfo")); + + String url = String.format(URLEnum.WEB_WX_VERIFYUSER.getUrl(), core.getLoginInfo().get("url"), + String.valueOf(System.currentTimeMillis() / 3158L), core.getLoginInfo().get("pass_ticket")); + + List<Map<String, Object>> verifyUserList = new ArrayList<Map<String, Object>>(); + Map<String, Object> verifyUser = new HashMap<String, Object>(); + verifyUser.put("Value", userName); + verifyUser.put("VerifyUserTicket", ticket); + verifyUserList.add(verifyUser); + + List<Integer> sceneList = new ArrayList<Integer>(); + sceneList.add(33); + + JSONObject body = new JSONObject(); + body.put("BaseRequest", core.getParamMap().get("BaseRequest")); + body.put("Opcode", status); + body.put("VerifyUserListSize", 1); + body.put("VerifyUserList", verifyUserList); + body.put("VerifyContent", ""); + body.put("SceneListCount", 1); + body.put("SceneList", sceneList); + body.put("skey", core.getLoginInfo().get(StorageLoginInfoEnum.skey.getKey())); + + String result = null; + try { + String paramStr = JSON.toJSONString(body); + HttpEntity entity = core.getMyHttpClient().doPost(url, paramStr); + result = EntityUtils.toString(entity, Consts.UTF_8); + } catch (Exception e) { + LOG.error("webWxSendMsg", e); + } + + if (StringUtils.isBlank(result)) { + LOG.error("琚姩娣诲姞濂藉弸澶辫触"); + } + + LOG.debug(result); + + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/api/WechatTools.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/api/WechatTools.java new file mode 100644 index 0000000..5700a65 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/api/WechatTools.java @@ -0,0 +1,352 @@ +package org.ruoyi.common.wechat.itchat4j.api; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import org.apache.commons.lang3.StringUtils; +import org.apache.http.Consts; +import org.apache.http.HttpEntity; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import org.ruoyi.common.wechat.itchat4j.core.Core; +import org.ruoyi.common.wechat.itchat4j.core.CoreManage; +import org.ruoyi.common.wechat.itchat4j.utils.LogInterface; +import org.ruoyi.common.wechat.itchat4j.utils.enums.StorageLoginInfoEnum; +import org.ruoyi.common.wechat.itchat4j.utils.enums.URLEnum; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 寰俊灏忓伐鍏凤紝濡傝幏濂藉弸鍒楄〃,鏍规嵁鏄电О鏌ユ壘濂藉弸鎴栫兢绛� + * + * @author https://github.com/yaphone + * @date 鍒涘缓鏃堕棿锛�2017骞�5鏈�4鏃� 涓嬪崍10:49:16 + * @version 1.0 + * + * @author WesleyOne 淇敼 + */ +public class WechatTools implements LogInterface { + + /** + * 杩斿洖濂藉弸鏄电О鍒楄〃 + * @param uniqueKey + * @return + */ + public static List<String> getContactNickNameList(String uniqueKey) { + Core core = CoreManage.getInstance(uniqueKey); + List<String> contactNickNameList = new ArrayList<String>(); + for (JSONObject o : core.getContactList()) { + contactNickNameList.add(o.getString("NickName")); + // 椤轰究鍒蜂笅缂撳瓨 + core.getUserInfoMap().put(o.getString("NickName"),o); + core.getUserInfoMap().put(o.getString("UserName"),o); + } + return contactNickNameList; + } + + /** + * 杩斿洖濂藉弸瀹屾暣淇℃伅鍒楄〃 + * @param uniqueKey + * @return + */ + public static List<JSONObject> getContactList(String uniqueKey) { + Core core = CoreManage.getInstance(uniqueKey); + return core.getContactList(); + } + + /** + * 杩斿洖缇ゅ垪琛� + * @param uniqueKey + * @return + */ + public static List<JSONObject> getGroupList(String uniqueKey) { + Core core = CoreManage.getInstance(uniqueKey); + return core.getGroupList(); + } + + /** + * 鑾峰彇缇ickName鍒楄〃 + * @param uniqueKey + * @return + */ + public static List<String> getGroupNickNameList(String uniqueKey) { + Core core = CoreManage.getInstance(uniqueKey); + List<String> groupNickNameList = new ArrayList<String>(); + for (JSONObject o : core.getGroupList()) { + groupNickNameList.add(o.getString("NickName")); + } + return groupNickNameList; + } + + /** + * 鑾峰彇缇ゆ墍鏈夋垚鍛樹俊鎭� + * @param groupId + * @param uniqueKey + * @return + */ + public static JSONArray getGroupMemberByGroupId(String groupId, String uniqueKey){ + Core core = CoreManage.getInstance(uniqueKey); + JSONObject jsonObject = core.getGroupInfoMap().get(groupId); + if (jsonObject == null){ + return new JSONArray(); + } + return jsonObject.getJSONArray("MemberList"); + } + + /** + * 閫氳繃缇ゆ垚鍛業D鑾峰彇鏄电О + * @param groupId + * @param uniqueKey + * @param memberId + * @return + */ + public static String getMemberNickName(String groupId, String uniqueKey, String memberId){ + JSONArray members = getGroupMemberByGroupId(groupId, uniqueKey); + int size = members.size(); + if (size > 0){ + for (int i=0;i<size;i++){ + JSONObject jsonObject = members.getJSONObject(i); + if (memberId.equals(jsonObject.getString("UserName"))){ + return jsonObject.getString("NickName"); + } + } + } + return ""; + } + + /** + * 閫�鍑哄井淇� + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�18鏃� 涓嬪崍11:56:54 + */ + public static void logout(String uniqueKey) { + webWxLogout(uniqueKey); + } + + private static boolean webWxLogout(String uniqueKey) { + Core core = CoreManage.getInstance(uniqueKey); + String url = String.format(URLEnum.WEB_WX_LOGOUT.getUrl(), + core.getLoginInfo().get(StorageLoginInfoEnum.url.getKey())); + List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>(); + params.add(new BasicNameValuePair("redirect", "1")); + params.add(new BasicNameValuePair("type", "1")); + params.add( + new BasicNameValuePair("skey", (String) core.getLoginInfo().get(StorageLoginInfoEnum.skey.getKey()))); + try { + HttpEntity entity = core.getMyHttpClient().doGet(url, params, false, null); + String text = EntityUtils.toString(entity, Consts.UTF_8); + return true; + } catch (Exception e) { + LOG.debug(e.getMessage()); + } finally { + // 寮哄埗閫�鍑猴紝鎻愮ず鐩稿叧绾跨▼閫�鍑� + core.setAlive(false); + } + return false; + } + + public static void setUserInfo(String uniqueKey) { + Core core = CoreManage.getInstance(uniqueKey); + for (JSONObject o : core.getContactList()) { + core.getUserInfoMap().put(o.getString("NickName"), o); + core.getUserInfoMap().put(o.getString("UserName"), o); + } + } + + /** + * + * 鏍规嵁鐢ㄦ埛鏄电О璁剧疆澶囨敞鍚嶇О + * + * @date 2017骞�5鏈�27鏃� 涓婂崍12:21:40 + * @param nickName + * @param remName + */ + public static void remarkNameByNickName(String nickName, String remName, String uniqueKey) { + Core core = CoreManage.getInstance(uniqueKey); + String url = String.format(URLEnum.WEB_WX_REMARKNAME.getUrl(), core.getLoginInfo().get("url"), + core.getLoginInfo().get(StorageLoginInfoEnum.pass_ticket.getKey())); + Map<String, Object> msgMap = new HashMap<String, Object>(8); + Map<String, Object> msgMap_BaseRequest = new HashMap<String, Object>(8); + msgMap.put("CmdId", 2); + msgMap.put("RemarkName", remName); + msgMap.put("UserName", core.getUserInfoMap().get(nickName).get("UserName")); + msgMap_BaseRequest.put("Uin", core.getLoginInfo().get(StorageLoginInfoEnum.wxuin.getKey())); + msgMap_BaseRequest.put("Sid", core.getLoginInfo().get(StorageLoginInfoEnum.wxsid.getKey())); + msgMap_BaseRequest.put("Skey", core.getLoginInfo().get(StorageLoginInfoEnum.skey.getKey())); + msgMap_BaseRequest.put("DeviceID", core.getLoginInfo().get(StorageLoginInfoEnum.deviceid.getKey())); + msgMap.put("BaseRequest", msgMap_BaseRequest); + try { + String paramStr = JSON.toJSONString(msgMap); + HttpEntity entity = core.getMyHttpClient().doPost(url, paramStr); + // String result = EntityUtils.toString(entity, Consts.UTF_8); + LOG.info("淇敼澶囨敞" + remName); + } catch (Exception e) { + LOG.error("remarkNameByUserName", e); + } + } + + /** + * 鑾峰彇寰俊鍦ㄧ嚎鐘舵�� + * + * @date 2017骞�6鏈�16鏃� 涓婂崍12:47:46 + * @return + */ + public static boolean getWechatStatus(String uniqueKey) { + Core core = CoreManage.getInstance(uniqueKey); + return core.isAlive(); + } + + + /** + * + * @param userName + * @param nickName + * @return + */ + private static JSONObject getContactByNickNameAndUserName(String userName, String nickName, String uniqueKey){ + Core core = CoreManage.getInstance(uniqueKey); + // 閫氳繃userName鏌ヨ + if (StringUtils.isNotEmpty(userName) && StringUtils.isEmpty(nickName)){ + for (JSONObject contact:core.getContactList()){ + if (userName.equals(contact.getString("UserName"))){ + return contact; + } + } + } + + // 閫氳繃缇ゆ樀绉版煡璇� + if (StringUtils.isNotEmpty(nickName) && StringUtils.isEmpty(userName)){ + for (JSONObject contact:core.getContactList()){ + if (nickName.equals(contact.getString("NickName"))){ + return contact; + } + } + } + + // 閫氳繃userName鍜屾樀绉拌仈鍚堟煡 + if (StringUtils.isNotEmpty(userName) && StringUtils.isNotEmpty(nickName)){ + for (JSONObject contact:core.getContactList()){ + if (nickName.equals(contact.getString("NickName")) && userName.equals(contact.getString("UserName"))){ + return contact; + } + } + } + + return null; + } + + /** + * 閫氳繃缇d鏌ユ壘缇ゆ樀绉� + * @param userName + * @return + */ + public static String getContactNickNameByUserName(String userName, String uniqueKey){ + JSONObject contact = getContactByNickNameAndUserName(userName,null, uniqueKey); + if (contact!=null && StringUtils.isNotEmpty(contact.getString("NickName"))){ + return contact.getString("NickName"); + }else{ + return ""; + } + } + + /** + * 閫氳繃缇ゆ樀绉版煡鎵剧兢id + * @param nickName + * @return + */ + public static String getContactUserNameByNickName(String nickName, String uniqueKey){ + JSONObject contact = getContactByNickNameAndUserName(null,nickName,uniqueKey); + if (contact!=null && StringUtils.isNotEmpty(contact.getString("UserName"))){ + return contact.getString("UserName"); + }else{ + return null; + } + } + + /** + * 閫氳繃userName鎴栨樀绉版煡鎵剧兢淇℃伅 + * @param userName + * @return + */ + private static JSONObject getGroupByNickNameAndUserName(String userName, String nickName, String uniqueKey){ + Core core = CoreManage.getInstance(uniqueKey); + // 閫氳繃userName鏌ヨ + if (StringUtils.isNotEmpty(userName) && StringUtils.isEmpty(nickName)){ + for (JSONObject group:core.getGroupList()){ + if (userName.equals(group.getString("UserName"))){ + return group; + } + } + } + + // 閫氳繃缇ゆ樀绉版煡璇� + if (StringUtils.isNotEmpty(nickName) && StringUtils.isEmpty(userName)){ + for (JSONObject group:core.getGroupList()){ + if (nickName.equals(group.getString("NickName"))){ + return group; + } + } + } + + // 閫氳繃userName鍜屾樀绉拌仈鍚堟煡 + if (StringUtils.isNotEmpty(userName) && StringUtils.isNotEmpty(nickName)){ + for (JSONObject group:core.getGroupList()){ + if (nickName.equals(group.getString("NickName")) && userName.equals(group.getString("UserName"))){ + return group; + } + } + } + + return null; + } + + /** + * 閫氳繃缇d鏌ユ壘缇ゆ樀绉� + * @param userName + * @return + */ + public static String getGroupNickNameByUserName(String userName, String uniqueKey){ + JSONObject group = getGroupByNickNameAndUserName(userName,null,uniqueKey); + if (group!=null && StringUtils.isNotEmpty(group.getString("NickName"))){ + return group.getString("NickName"); + }else{ + return ""; + } + } + + /** + * 閫氳繃缇ゆ樀绉版煡鎵剧兢id + * @param nickName + * @return + */ + public static String getGroupUserNameByNickName(String nickName, String uniqueKey){ + JSONObject group = getGroupByNickNameAndUserName(null,nickName, uniqueKey); + if (group!=null && StringUtils.isNotEmpty(group.getString("UserName"))){ + return group.getString("UserName"); + }else{ + return null; + } + } + + /** + * 閫氳繃UserName鏌ユ壘NickName + * 鍙煡缇ゅ悕鍜屽ソ鍙嬪悕 + * @param userName + * @param uniqueKey + * @return + */ + public static String getNickNameByUserName(String userName, String uniqueKey){ + if (userName.startsWith("@@")){ + return getGroupNickNameByUserName(userName,uniqueKey); + }else if (userName.startsWith("@")){ + return getContactNickNameByUserName(userName,uniqueKey); + }else { + return ""; + } + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/AppInfo.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/AppInfo.java new file mode 100644 index 0000000..4f80a30 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/AppInfo.java @@ -0,0 +1,37 @@ +package org.ruoyi.common.wechat.itchat4j.beans; + +import java.io.Serializable; + +/** + * AppInfo + * + * @author https://github.com/yaphone + * @date 鍒涘缓鏃堕棿锛�2017骞�7鏈�3鏃� 涓嬪崍10:38:14 + * @version 1.0 + * + */ +public class AppInfo implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; + private int type; + private String appId; + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } + + public String getAppId() { + return appId; + } + + public void setAppId(String appId) { + this.appId = appId; + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/BaseMsg.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/BaseMsg.java new file mode 100644 index 0000000..43146a8 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/BaseMsg.java @@ -0,0 +1,330 @@ +package org.ruoyi.common.wechat.itchat4j.beans; + +import java.io.Serializable; + +/** + * 鏀跺埌鐨勫井淇℃秷鎭� + * + * @author https://github.com/yaphone + * @date 鍒涘缓鏃堕棿锛�2017骞�7鏈�3鏃� 涓嬪崍10:28:06 + * @version 1.0 + * + */ +public class BaseMsg implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; + private int subMsgType; + private int voiceLength; + private String fileName; + private int imgHeight; + private String toUserName; + private int hasProductId; + private int imgStatus; + private String url; + private int imgWidth; + private int forwardFlag; + private int status; + private String Ticket; + /** 鎺ㄨ崘娑堟伅鎶ユ枃 **/ + private RecommendInfo recommendInfo; + private long createTime; + private String newMsgId; + /** 鏂囨湰娑堟伅鍐呭 **/ + private String text; + /** 娑堟伅绫诲瀷 **/ + private int msgType; + /** 鏄惁涓虹兢娑堟伅 **/ + private boolean groupMsg; + private String msgId; + private int statusNotifyCode; + private AppInfo appInfo; + private int appMsgType; + private String Type; + private int playLength; + private String mediaId; + private String content; + private String statusNotifyUserName; + private boolean atMe; + // 缇ゅ彂閫佽�匢D鏄电О + private String sendMemberId; + private String memberNickname; + /** 娑堟伅鍙戦�佽�匢D **/ + private String fromUserName; + private String oriContent; + private String fileSize; + private String fromNickName; + + public int getSubMsgType() { + return subMsgType; + } + + public void setSubMsgType(int subMsgType) { + this.subMsgType = subMsgType; + } + + public int getVoiceLength() { + return voiceLength; + } + + public void setVoiceLength(int voiceLength) { + this.voiceLength = voiceLength; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public int getImgHeight() { + return imgHeight; + } + + public void setImgHeight(int imgHeight) { + this.imgHeight = imgHeight; + } + + public String getToUserName() { + return toUserName; + } + + public void setToUserName(String toUserName) { + this.toUserName = toUserName; + } + + public int getHasProductId() { + return hasProductId; + } + + public void setHasProductId(int hasProductId) { + this.hasProductId = hasProductId; + } + + public int getImgStatus() { + return imgStatus; + } + + public void setImgStatus(int imgStatus) { + this.imgStatus = imgStatus; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public int getImgWidth() { + return imgWidth; + } + + public void setImgWidth(int imgWidth) { + this.imgWidth = imgWidth; + } + + public int getForwardFlag() { + return forwardFlag; + } + + public void setForwardFlag(int forwardFlag) { + this.forwardFlag = forwardFlag; + } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + public String getTicket() { + return Ticket; + } + + public void setTicket(String ticket) { + Ticket = ticket; + } + + public RecommendInfo getRecommendInfo() { + return recommendInfo; + } + + public void setRecommendInfo(RecommendInfo recommendInfo) { + this.recommendInfo = recommendInfo; + } + + public long getCreateTime() { + return createTime; + } + + public void setCreateTime(long createTime) { + this.createTime = createTime; + } + + public String getNewMsgId() { + return newMsgId; + } + + public void setNewMsgId(String newMsgId) { + this.newMsgId = newMsgId; + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + + public int getMsgType() { + return msgType; + } + + public void setMsgType(int msgType) { + this.msgType = msgType; + } + + public boolean isGroupMsg() { + return groupMsg; + } + + public void setGroupMsg(boolean groupMsg) { + this.groupMsg = groupMsg; + } + + public String getMsgId() { + return msgId; + } + + public void setMsgId(String msgId) { + this.msgId = msgId; + } + + public int getStatusNotifyCode() { + return statusNotifyCode; + } + + public void setStatusNotifyCode(int statusNotifyCode) { + this.statusNotifyCode = statusNotifyCode; + } + + public AppInfo getAppInfo() { + return appInfo; + } + + public void setAppInfo(AppInfo appInfo) { + this.appInfo = appInfo; + } + + public int getAppMsgType() { + return appMsgType; + } + + public void setAppMsgType(int appMsgType) { + this.appMsgType = appMsgType; + } + + public String getType() { + return Type; + } + + public void setType(String type) { + Type = type; + } + + public int getPlayLength() { + return playLength; + } + + public void setPlayLength(int playLength) { + this.playLength = playLength; + } + + public String getMediaId() { + return mediaId; + } + + public void setMediaId(String mediaId) { + this.mediaId = mediaId; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getStatusNotifyUserName() { + return statusNotifyUserName; + } + + public void setStatusNotifyUserName(String statusNotifyUserName) { + this.statusNotifyUserName = statusNotifyUserName; + } + + public String getFromUserName() { + return fromUserName; + } + + public void setFromUserName(String fromUserName) { + this.fromUserName = fromUserName; + } + + public String getOriContent() { + return oriContent; + } + + public void setOriContent(String oriContent) { + this.oriContent = oriContent; + } + + public String getFileSize() { + return fileSize; + } + + public void setFileSize(String fileSize) { + this.fileSize = fileSize; + } + + public String getMemberNickname() { + return memberNickname; + } + + public void setMemberNickname(String memberNickname) { + this.memberNickname = memberNickname; + } + + public String getFromNickName() { + return fromNickName; + } + + public void setFromNickName(String fromNickName) { + this.fromNickName = fromNickName; + } + + public String getSendMemberId() { + return sendMemberId; + } + + public void setSendMemberId(String sendMemberId) { + this.sendMemberId = sendMemberId; + } + + public boolean isAtMe() { + return atMe; + } + + public void setAtMe(boolean atMe) { + this.atMe = atMe; + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/BaseResponse.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/BaseResponse.java new file mode 100644 index 0000000..063495f --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/BaseResponse.java @@ -0,0 +1,28 @@ +package org.ruoyi.common.wechat.itchat4j.beans; + +/** + * @author WesleyOne + * @create 2018/12/21 + */ +@Deprecated +public class BaseResponse { + + private Integer Ret; + private String ErrMsg; + + public Integer getRet() { + return Ret; + } + + public void setRet(Integer ret) { + Ret = ret; + } + + public String getErrMsg() { + return ErrMsg; + } + + public void setErrMsg(String errMsg) { + ErrMsg = errMsg; + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/Member.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/Member.java new file mode 100644 index 0000000..2a84d25 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/Member.java @@ -0,0 +1,306 @@ +package org.ruoyi.common.wechat.itchat4j.beans; + +import java.util.List; + +/** + * 鎴愬憳淇℃伅瀵硅薄 + * + * 鏉ヨ嚜鑾峰彇濂藉弸鍒楄〃 + * /cgi-bin/mmwebwx-bin/webwxgetcontact + * MemberList涓崟浣� + * @author WesleyOne + * @create 2018/12/21 + */ +@Deprecated +public class Member { + + private String Alias; + private Integer AppAccountFlag; + private Integer AttrStatus; + private Integer ChatRoomId; + private String City; + private Integer ContactFlag; + /** + * 缇ゆ樀绉� + */ + private String DisplayName; + private String EncryChatRoomId; + private String HeadImgUrl; + private Integer HideInputBarFlag; + private Integer IsOwner; + private String KeyWord; + private Integer MemberCount; + private List<Member> MemberList; + private String NickName; + private Integer OwnerUin; + private String PYInitial; + private String PYQuanPin; + private String Province; + /** + * 澶囨敞鍚嶃�侀鎷笺�佸叏鎷� + */ + private String RemarkName; + private String RemarkPYInitial; + private String RemarkPYQuanPin; + + private Integer Sex; + private String Signature; + private Integer SnsFlag; + private Integer StarFriend; + private Integer Statues; + private Integer Uin; + private Integer UniFriend; + private String UserName; + /** + * 鐢ㄦ潵鍒ゆ柇鏄惁鏄叕浼楀彿鎴栨湇鍔″彿鐨勫瓧娈� + */ + private String VerifyFlag; + + public String getAlias() { + return Alias; + } + + public void setAlias(String alias) { + Alias = alias; + } + + public Integer getAppAccountFlag() { + return AppAccountFlag; + } + + public void setAppAccountFlag(Integer appAccountFlag) { + AppAccountFlag = appAccountFlag; + } + + public Integer getAttrStatus() { + return AttrStatus; + } + + public void setAttrStatus(Integer attrStatus) { + AttrStatus = attrStatus; + } + + public Integer getChatRoomId() { + return ChatRoomId; + } + + public void setChatRoomId(Integer chatRoomId) { + ChatRoomId = chatRoomId; + } + + public String getCity() { + return City; + } + + public void setCity(String city) { + City = city; + } + + public Integer getContactFlag() { + return ContactFlag; + } + + public void setContactFlag(Integer contactFlag) { + ContactFlag = contactFlag; + } + + public String getDisplayName() { + return DisplayName; + } + + public void setDisplayName(String displayName) { + DisplayName = displayName; + } + + public String getEncryChatRoomId() { + return EncryChatRoomId; + } + + public void setEncryChatRoomId(String encryChatRoomId) { + EncryChatRoomId = encryChatRoomId; + } + + public String getHeadImgUrl() { + return HeadImgUrl; + } + + public void setHeadImgUrl(String headImgUrl) { + HeadImgUrl = headImgUrl; + } + + public Integer getHideInputBarFlag() { + return HideInputBarFlag; + } + + public void setHideInputBarFlag(Integer hideInputBarFlag) { + HideInputBarFlag = hideInputBarFlag; + } + + public Integer getIsOwner() { + return IsOwner; + } + + public void setIsOwner(Integer isOwner) { + IsOwner = isOwner; + } + + public String getKeyWord() { + return KeyWord; + } + + public void setKeyWord(String keyWord) { + KeyWord = keyWord; + } + + public Integer getMemberCount() { + return MemberCount; + } + + public void setMemberCount(Integer memberCount) { + MemberCount = memberCount; + } + + public List<Member> getMemberList() { + return MemberList; + } + + public void setMemberList(List<Member> memberList) { + MemberList = memberList; + } + + public String getNickName() { + return NickName; + } + + public void setNickName(String nickName) { + NickName = nickName; + } + + public Integer getOwnerUin() { + return OwnerUin; + } + + public void setOwnerUin(Integer ownerUin) { + OwnerUin = ownerUin; + } + + public String getPYInitial() { + return PYInitial; + } + + public void setPYInitial(String PYInitial) { + this.PYInitial = PYInitial; + } + + public String getPYQuanPin() { + return PYQuanPin; + } + + public void setPYQuanPin(String PYQuanPin) { + this.PYQuanPin = PYQuanPin; + } + + public String getProvince() { + return Province; + } + + public void setProvince(String province) { + Province = province; + } + + public String getRemarkName() { + return RemarkName; + } + + public void setRemarkName(String remarkName) { + RemarkName = remarkName; + } + + public String getRemarkPYInitial() { + return RemarkPYInitial; + } + + public void setRemarkPYInitial(String remarkPYInitial) { + RemarkPYInitial = remarkPYInitial; + } + + public String getRemarkPYQuanPin() { + return RemarkPYQuanPin; + } + + public void setRemarkPYQuanPin(String remarkPYQuanPin) { + RemarkPYQuanPin = remarkPYQuanPin; + } + + public Integer getSex() { + return Sex; + } + + public void setSex(Integer sex) { + Sex = sex; + } + + public String getSignature() { + return Signature; + } + + public void setSignature(String signature) { + Signature = signature; + } + + public Integer getSnsFlag() { + return SnsFlag; + } + + public void setSnsFlag(Integer snsFlag) { + SnsFlag = snsFlag; + } + + public Integer getStarFriend() { + return StarFriend; + } + + public void setStarFriend(Integer starFriend) { + StarFriend = starFriend; + } + + public Integer getStatues() { + return Statues; + } + + public void setStatues(Integer statues) { + Statues = statues; + } + + public Integer getUin() { + return Uin; + } + + public void setUin(Integer uin) { + Uin = uin; + } + + public Integer getUniFriend() { + return UniFriend; + } + + public void setUniFriend(Integer uniFriend) { + UniFriend = uniFriend; + } + + public String getUserName() { + return UserName; + } + + public void setUserName(String userName) { + UserName = userName; + } + + public String getVerifyFlag() { + return VerifyFlag; + } + + public void setVerifyFlag(String verifyFlag) { + VerifyFlag = verifyFlag; + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/RecommendInfo.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/RecommendInfo.java new file mode 100644 index 0000000..51c8221 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/RecommendInfo.java @@ -0,0 +1,146 @@ +package org.ruoyi.common.wechat.itchat4j.beans; + +import java.io.Serializable; + +/** + * RecommendInfo + * + * @author https://github.com/yaphone + * @date 鍒涘缓鏃堕棿锛�2017骞�7鏈�3鏃� 涓嬪崍10:35:14 + * @version 1.0 + * + */ +public class RecommendInfo implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; + + private String ticket; + private String userName; + private int sex; + private int attrStatus; + private String city; + private String nickName; + private int scene; + private String province; + private String content; + private String alias; + private String signature; + private int opCode; + private int qQNum; + private int verifyFlag; + + public String getTicket() { + return ticket; + } + + public void setTicket(String ticket) { + this.ticket = ticket; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public int getSex() { + return sex; + } + + public void setSex(int sex) { + this.sex = sex; + } + + public int getAttrStatus() { + return attrStatus; + } + + public void setAttrStatus(int attrStatus) { + this.attrStatus = attrStatus; + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public int getScene() { + return scene; + } + + public void setScene(int scene) { + this.scene = scene; + } + + public String getProvince() { + return province; + } + + public void setProvince(String province) { + this.province = province; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getAlias() { + return alias; + } + + public void setAlias(String alias) { + this.alias = alias; + } + + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + public int getOpCode() { + return opCode; + } + + public void setOpCode(int opCode) { + this.opCode = opCode; + } + + public int getqQNum() { + return qQNum; + } + + public void setqQNum(int qQNum) { + this.qQNum = qQNum; + } + + public int getVerifyFlag() { + return verifyFlag; + } + + public void setVerifyFlag(int verifyFlag) { + this.verifyFlag = verifyFlag; + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/SendMsg.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/SendMsg.java new file mode 100644 index 0000000..33661f9 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/SendMsg.java @@ -0,0 +1,59 @@ +package org.ruoyi.common.wechat.itchat4j.beans; + +import org.ruoyi.common.wechat.itchat4j.utils.enums.SendMsgType; + +import java.io.Serializable; + +/** + * 鍙戦�佹秷鎭綋 + * @author WesleyOne + * @create 2019/1/7 + */ +public class SendMsg implements Serializable { + + private String userName; + private String nickName; + private String message; + private SendMsgType msgType; + private boolean isGroup; + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public SendMsgType getMsgType() { + return msgType; + } + + public void setMsgType(SendMsgType msgType) { + this.msgType = msgType; + } + + public boolean isGroup() { + return isGroup; + } + + public void setGroup(boolean group) { + isGroup = group; + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/SyncKey.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/SyncKey.java new file mode 100644 index 0000000..de8078c --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/SyncKey.java @@ -0,0 +1,52 @@ +package org.ruoyi.common.wechat.itchat4j.beans; + +import java.util.List; + +/** + * @author WesleyOne + * @create 2018/12/21 + */ +@Deprecated +public class SyncKey { + + private Integer Count; + + private List<KV> List; + + public Integer getCount() { + return Count; + } + + public void setCount(Integer count) { + Count = count; + } + + public java.util.List<KV> getList() { + return List; + } + + public void setList(java.util.List<KV> list) { + List = list; + } + + class KV{ + private Integer Key; + private Long Val; + + public Integer getKey() { + return Key; + } + + public void setKey(Integer key) { + Key = key; + } + + public Long getVal() { + return Val; + } + + public void setVal(Long val) { + Val = val; + } + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/User.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/User.java new file mode 100644 index 0000000..750bb5f --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/User.java @@ -0,0 +1,54 @@ +package org.ruoyi.common.wechat.itchat4j.beans; + +/* +AppAccountFlag: 0 +ContactFlag: 0 +HeadImgFlag: 1 +HeadImgUrl: "/cgi-bin/mmwebwx-bin/webwxgeticon?seq=778915892&username=@7e6934104b3cf1f92dd11344c63a06833ae54bd43b34229b5cc472c4d05eba4a&skey=@crypt_a24169c_f4c07f70afe861da5e8a6e1947044b6e" +HideInputBarFlag: 0 +NickName: "[猫隆掳]忙鈩⑩�溍р�毰�" +PYInitial: "" +PYQuanPin: "" +RemarkName: "" +RemarkPYInitial: "" +RemarkPYQuanPin: "" +Sex: 1 +Signature: "盲潞潞氓路楼忙鈩⒙好┡∨�" +SnsFlag: 49 +StarFriend: 0 +Uin: 902478981 +UserName: "@7e6934104b3cf1f92dd11344c63a06833ae54bd43b34229b5cc472c4d05eba4a" +VerifyFlag: 0 +WebWxPluginSwitch: 0 +*/ + +/** + * @author WesleyOne + * @create 2018/12/21 + */ +@Deprecated +public class User { + + private String AppAccountFlag; + private String ContactFlag; + private String HeadImgFlag; + private String HeadImgUrl; + private String HideInputBarFlag; + private String NickName; + private String PYInitial; + private String PYQuanPin; + private String RemarkName; + private String RemarkPYInitial; + private String RemarkPYQuanPin; + private String Sex; + /** + * 绛惧悕 + */ + private String Signature; + private String SnsFlag; + private String StarFriend; + private String Uin; + private String UserName; + private String VerifyFlag; + private String WebWxPluginSwitch; +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/WebWxInit.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/WebWxInit.java new file mode 100644 index 0000000..fba7077 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/beans/WebWxInit.java @@ -0,0 +1,43 @@ +package org.ruoyi.common.wechat.itchat4j.beans; + +import java.util.List; + +/** + * @author WesleyOne + * @create 2018/12/21 + */ +@Deprecated +public class WebWxInit { + + private BaseResponse BaseResponse; + + private String ChatSet; + + private Long ClickReportInterval; + + private Long ClientVersion; + + private List<Member> ContactList; + + private Integer Count; + + private Integer GrayScale; + + private Integer InviteStartCount; + + /** + * 璁㈤槄鍙峰瓧娈电渷鐣� + * MPSubscribeMsgCount + * MPSubscribeMsgList + */ + + private String SKey; + + private SyncKey SyncKey; + + private Long SystemTime; + + private User User; + + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/client/HttpClientManage.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/client/HttpClientManage.java new file mode 100644 index 0000000..7e15786 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/client/HttpClientManage.java @@ -0,0 +1,34 @@ +package org.ruoyi.common.wechat.itchat4j.client; + +import org.apache.commons.lang3.StringUtils; +import org.apache.http.client.CookieStore; + +import java.util.HashMap; + +/** + * 澶氬紑璇锋眰绫荤鐞� + * @author WesleyOne + * @create 2018/12/15 + */ +public class HttpClientManage { + + private static HashMap<String,SingleHttpClient> clientMap = new HashMap<>(32); + + public static SingleHttpClient getInstance(String uniqueKey){ + return getInstance(uniqueKey,null); + } + + public static SingleHttpClient getInstance(String uniqueKey,CookieStore outCookieStore) { + if (StringUtils.isEmpty(uniqueKey)){ + return null; + } + SingleHttpClient client; + + // outCookieStore涓嶄负绌烘椂涔熼噸鏂版瀯閫�,涓昏鐢ㄤ簬鐑櫥褰� + if (!clientMap.containsKey(uniqueKey) || clientMap.get(uniqueKey) == null || outCookieStore != null){ + client = SingleHttpClient.getInstance(outCookieStore); + clientMap.put(uniqueKey, client); + } + return clientMap.get(uniqueKey); + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/client/SingleHttpClient.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/client/SingleHttpClient.java new file mode 100644 index 0000000..7fcc9bf --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/client/SingleHttpClient.java @@ -0,0 +1,187 @@ +package org.ruoyi.common.wechat.itchat4j.client; + +import org.apache.http.Consts; +import org.apache.http.HttpEntity; +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.CookieStore; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.entity.UrlEncodedFormEntity; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.cookie.Cookie; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.BasicCookieStore; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.DefaultHttpRequestRetryHandler; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import org.ruoyi.common.wechat.itchat4j.utils.Config; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * @author WesleyOne + * @create 2018/12/15 + */ +public class SingleHttpClient { + private Logger logger = LoggerFactory.getLogger("UTILLOG"); + + private CloseableHttpClient httpClient ; + + private CookieStore cookieStore; + + private String uniqueKey; + + public String getCookie(String name) { + List<Cookie> cookies = cookieStore.getCookies(); + for (Cookie cookie : cookies) { + if (cookie.getName().equalsIgnoreCase(name)) { + return cookie.getValue(); + } + } + return null; + + } + + private SingleHttpClient(CookieStore outCookieStore){ + if (outCookieStore == null){ + outCookieStore = new BasicCookieStore(); + } + this.cookieStore = outCookieStore; + httpClient = HttpClients.custom().setDefaultCookieStore(cookieStore).setRetryHandler(new DefaultHttpRequestRetryHandler(0,false)).build(); + } + + private SingleHttpClient(){ + this(null); + } + + public static SingleHttpClient getInstance(CookieStore outCookieStore){ + return new SingleHttpClient(outCookieStore); + } + + /** + * 澶勭悊GET璇锋眰 + * + * @author https://github.com/yaphone + * @date 2017骞�4鏈�9鏃� 涓嬪崍7:06:19 + * @param url + * @param params + * @return + */ + public HttpEntity doGet(String url, List<BasicNameValuePair> params, boolean redirect, + Map<String, String> headerMap) { + HttpEntity entity = null; + HttpGet httpGet = new HttpGet(); + + try { + if (params != null) { + String paramStr = EntityUtils.toString(new UrlEncodedFormEntity(params, Consts.UTF_8)); + httpGet = new HttpGet(url + "?" + paramStr); +// System.out.println(url + "?" + paramStr); + } else { + httpGet = new HttpGet(url); + } + if (!redirect) { + // 绂佹閲嶅畾鍚� + httpGet.setConfig(RequestConfig.custom().setRedirectsEnabled(false).build()); + } + httpGet.setHeader("User-Agent", Config.USER_AGENT); + if (headerMap != null) { + Set<Map.Entry<String, String>> entries = headerMap.entrySet(); + for (Map.Entry<String, String> entry : entries) { + httpGet.setHeader(entry.getKey(), entry.getValue()); + } + } + CloseableHttpResponse response = httpClient.execute(httpGet); + entity = response.getEntity(); + } catch (ClientProtocolException e) { + logger.error(e.getMessage()); + } catch (IOException e) { + logger.error(e.getMessage()); + } catch (Exception e){ + logger.error(e.getMessage()); + } + return entity; + } + + /** + * 澶勭悊POST璇锋眰 + * + * @author https://github.com/yaphone + * @date 2017骞�4鏈�9鏃� 涓嬪崍7:06:35 + * @param url + * @param paramsStr + * @return + */ + public HttpEntity doPost(String url, String paramsStr) { + return doPost(url,paramsStr,null); + } + + public HttpEntity doPost(String url, String paramsStr, Map<String, String> headerMap) { + HttpEntity entity = null; + HttpPost httpPost = new HttpPost(); + try { + StringEntity params = new StringEntity(paramsStr, Consts.UTF_8); + httpPost = new HttpPost(url); + httpPost.setEntity(params); + httpPost.setHeader("Content-type", "application/json; charset=utf-8"); + httpPost.setHeader("User-Agent", Config.USER_AGENT); + if (headerMap != null) { + Set<Map.Entry<String, String>> entries = headerMap.entrySet(); + for (Map.Entry<String, String> entry : entries) { + httpPost.setHeader(entry.getKey(), entry.getValue()); + } + } + CloseableHttpResponse response = httpClient.execute(httpPost); + entity = response.getEntity(); + } catch (ClientProtocolException e) { + logger.error(e.getMessage()); + } catch (IOException e) { + logger.error(e.getMessage()); + } catch (Exception e){ + logger.error(e.getMessage()); + } + return entity; + } + + /** + * 涓婁紶鏂囦欢鍒版湇鍔″櫒 + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�7鏃� 涓嬪崍9:19:23 + * @param url + * @param reqEntity + * @return + */ + public HttpEntity doPostFile(String url, HttpEntity reqEntity) { + HttpEntity entity = null; + HttpPost httpPost = new HttpPost(url); + httpPost.setHeader("User-Agent", Config.USER_AGENT); + httpPost.setEntity(reqEntity); + try { + CloseableHttpResponse response = httpClient.execute(httpPost); + entity = response.getEntity(); + + } catch (Exception e) { + logger.error(e.getMessage()); + } + return entity; + } + + + public CookieStore getCookieStore() { + return this.cookieStore; + } + + public void setCookieStore(CookieStore cookieStore) { + this.cookieStore = cookieStore; + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/controller/LoginController.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/controller/LoginController.java new file mode 100644 index 0000000..171f73f --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/controller/LoginController.java @@ -0,0 +1,148 @@ +package org.ruoyi.common.wechat.itchat4j.controller; + +import org.ruoyi.common.wechat.itchat4j.core.Core; +import org.ruoyi.common.wechat.itchat4j.core.CoreManage; +import org.ruoyi.common.wechat.itchat4j.core.MsgCenter; +import org.ruoyi.common.wechat.itchat4j.service.ILoginService; +import org.ruoyi.common.wechat.itchat4j.service.impl.LoginServiceImpl; +import org.ruoyi.common.wechat.itchat4j.utils.LogInterface; +import org.ruoyi.common.wechat.itchat4j.utils.SleepUtils; +import org.ruoyi.common.wechat.itchat4j.utils.enums.URLEnum; +import org.ruoyi.common.wechat.web.base.BaseException; + +/** + * 鐧婚檰鎺у埗鍣� + * + * @author https://github.com/yaphone + * @date 鍒涘缓鏃堕棿锛�2017骞�5鏈�13鏃� 涓嬪崍12:56:07 + * @version 1.0 + * + * @author WesleyOne 淇敼 + */ +public class LoginController implements LogInterface { + + private ILoginService loginService; + private String uniqueKey; + private Core core; + + public LoginController(String uniqueKey){ + this.uniqueKey = uniqueKey; + this.loginService = new LoginServiceImpl(uniqueKey); + this.core = CoreManage.getInstance(uniqueKey); + } + + /** + * 鑾峰彇浜岀淮鐮佸湴鍧� + * 椋庨櫓:宸茬櫥褰曡处鍙蜂笉鍙皟鐢ㄨ鎺ュ彛,浼氱Щ闄ゅ綋鍓峜ore淇℃伅 + * @return + */ + public String login_1() throws BaseException { + if (core.isAlive()) { + LOG.warn("寰俊宸茬櫥闄�"); + throw new BaseException("寰俊宸茬櫥闄�"); + } + LOG.info("1.鑾峰彇寰俊UUID"); + while (loginService.getUuid() == null) { + LOG.warn("1.1. 鑾峰彇寰俊UUID澶辫触锛屼竴绉掑悗閲嶆柊鑾峰彇"); + SleepUtils.sleep(1000); + } + LOG.info("2. 鑾峰彇鐧婚檰浜岀淮鐮佸浘鐗�"); + return URLEnum.QRCODE_URL.getUrl() + core.getUuid(); + } + + /** + * 纭鐧诲綍 + * @return + */ + public boolean login_2(){ + + boolean result = false; + + LOG.info("3. 璇锋壂鎻忎簩缁寸爜鍥剧墖锛屽苟鍦ㄦ墜鏈轰笂纭"); + if (!core.isAlive()) { + if (loginService.login()){ + core.setAlive(true); + LOG.info(("3.1鐧婚檰鎴愬姛")); + result = true; + } + } + return result; + } + + /** + * 鍔犺浇鏁版嵁 + * @return + */ + public boolean login_3() { + + boolean result = true; + + LOG.info("4.寰俊鍒濆鍖�"); + if (!loginService.webWxInit()) { + LOG.info("4.1 寰俊鍒濆鍖栧紓甯�"); + result = false; + } + + if (result){ + + LOG.info("5. 寮�鍚井淇$姸鎬侀�氱煡"); + loginService.wxStatusNotify(); + + LOG.info(String.format("娆㈣繋鍥炴潵锛� %s", core.getNickName())); + LOG.info("6.+++寮�鍚秷鎭彂閫佺嚎绋媅"+uniqueKey+"]+++"); + Thread sendThread = new Thread(core.getThreadGroup(), () -> MsgCenter.sendMsg(uniqueKey), "SEND-" + uniqueKey); + sendThread.start(); + + LOG.info("8. +++寮�濮嬫帴鏀舵秷鎭嚎绋媅"+uniqueKey+"]+++"); + loginService.startReceiving(); + + LOG.info("9. 鑾峰彇鑱旂郴浜轰俊鎭�"); + loginService.webWxGetContact(); + + LOG.info("10. 鑾峰彇缇ゅソ鍙嬪強缇ゅソ鍙嬪垪琛ㄥ強缂撳瓨"); + loginService.WebWxBatchGetContact(); + + } + + if (!result){ + core.setAlive(false); + return false; + } + + core.setFinishInit(true); + + return true; + } + + public boolean reboot(){ + + core.setFinishInit(false); + // 閲嶆柊鍔犺浇鏁版嵁 + boolean result = true; + LOG.info("1.鍒锋柊鍒濆鍖栦俊鎭�"); + if (!loginService.webWxInit()) { + LOG.info("1.1 寰俊鍒濆鍖栧紓甯�"); + result = false; + } + + if (result){ + LOG.info("2. 鍒锋柊寮�鍚井淇$姸鎬侀�氱煡"); + loginService.wxStatusNotify(); + + LOG.info("3. 鍒锋柊鑾峰彇鑱旂郴浜轰俊鎭�"); + loginService.webWxGetContact(); + + LOG.info("4. 鍒锋柊鑾峰彇缇ゅソ鍙嬪強缇ゅソ鍙嬪垪琛�"); + loginService.WebWxBatchGetContact(); + } + + if (!result){ + core.setAlive(false); + return false; + } + + core.setFinishInit(true); + return true; + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/core/Core.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/core/Core.java new file mode 100644 index 0000000..a1c65aa --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/core/Core.java @@ -0,0 +1,371 @@ +package org.ruoyi.common.wechat.itchat4j.core; + +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.annotation.JSONField; +import org.ruoyi.common.wechat.itchat4j.beans.BaseMsg; +import org.ruoyi.common.wechat.itchat4j.beans.SendMsg; +import org.ruoyi.common.wechat.itchat4j.beans.User; +import org.ruoyi.common.wechat.itchat4j.client.HttpClientManage; +import org.ruoyi.common.wechat.itchat4j.client.SingleHttpClient; +import org.ruoyi.common.wechat.itchat4j.service.impl.LoginServiceImpl; +import org.ruoyi.common.wechat.itchat4j.utils.enums.parameters.BaseParaEnum; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 鏍稿績瀛樺偍绫伙紝鍏ㄥ眬鍙繚瀛樹竴浠斤紝鍗曚緥妯″紡 + * + * @author https://github.com/yaphone + * @author WesleyOne 淇敼 + * @version 1.0 + * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�23鏃� 涓嬪崍2:33:56 + */ +public class Core { + + private Core() { + + } + + private Core(String uniqueKey) { + this.uniqueKey = uniqueKey; + this.myHttpClient = HttpClientManage.getInstance(this.uniqueKey); + this.threadGroup = new ThreadGroup(this.uniqueKey); + } + + protected static Core getInstance(String uniqueKey) { + return new Core(uniqueKey); + } + + private String uniqueKey; + + boolean alive = false; + + /** + * 绠$悊褰撳墠鏈哄櫒浜虹殑鎵�鏈変笟鍔$嚎绋� + */ + @JSONField(serialize = false) + private ThreadGroup threadGroup; + + @JSONField(serialize = false) + boolean isFinishInit = false; + + /** + * login,webWxInit + * 鐧诲綍鎺ュ彛鑾峰彇 + */ + private String indexUrl; + private String userName; + private String nickName; + String uuid = null; + /** + * webWxInit + * InviteStartCount + * SyncKey + * synckey 闅忕潃姣忔鑾峰彇鏈�鏂版秷鎭悗鐨勮繑鍥炲�兼洿鏂帮紝鍏剁洰鐨勫湪浜庢瘡娆″悓姝ユ秷鎭悗璁板綍涓�涓綋鍓嶅悓姝ョ殑鐘舵�� + */ + Map<String, Object> loginInfo = new HashMap<String, Object>(); + + /** + * webWxInit + * 鐧婚檰璐﹀彿鑷韩淇℃伅 + * + * @see User + */ + private JSONObject userSelf; + + + /** + * 鍒濆鍖�/cgi-bin/mmwebwx-bin/webwxinit + * 鏈�鍚庝竴娆℃敹鍒版甯竢etcode鐨勬椂闂达紝绉掍负鍗曚綅 + * <p> + * synccheck鍒锋柊 + */ + private long lastNormalRetcodeTime; + + + /** + * synccheck鍜寃ebWxSync瀹归敊娆℃暟,瓒呰繃閫�鍑� + */ + int receivingRetryCount = 5; + + + @JSONField(serialize = false) + SingleHttpClient myHttpClient; + + public SingleHttpClient getMyHttpClient() { + return HttpClientManage.getInstance(uniqueKey); + } + + /** + * 鍒濆璇濇椂鑾峰彇鑱旂郴浜烘椂鍒涘缓 + * @see LoginServiceImpl#webWxGetContact() + */ + /** + * memberList闀垮害 + */ + @JSONField(serialize = false) + private int memberCount = 0; + /** + * 濂藉弸+缇よ亰+鍏紬鍙�+鐗规畩璐﹀彿 + * 娉ㄦ剰锛氫笉涓诲姩鎻掑叆,鑾峰彇鏃堕�氳繃鍏朵粬鍑犱釜璐﹀彿闆嗗悎鍚堝苟 + */ + @JSONField(serialize = false) + private List<JSONObject> memberList = new ArrayList<JSONObject>(); + /** + * 濂藉弸 + */ + @JSONField(serialize = false) + private List<JSONObject> contactList = new ArrayList<JSONObject>(); + /** + * 缇� + */ + @JSONField(serialize = false) + private List<JSONObject> groupList = new ArrayList<JSONObject>(); + /** + * 鍏紬鍙�/鏈嶅姟鍙� + */ + @Deprecated + @JSONField(serialize = false) + private List<JSONObject> publicUsersList = new ArrayList<JSONObject>(); + /** + * 鐗规畩璐﹀彿 + */ + @JSONField(serialize = false) + private List<JSONObject> specialUsersList = new ArrayList<JSONObject>(); + + /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */ + + /** + * synccheck鍜寃ebWxSynct娣诲姞 + * 寮傛鎺ュ彈娑堟伅瀛樺偍 + */ + @JSONField(serialize = false) + private List<BaseMsg> msgList = new ArrayList<>(); + + /** + * 寮傛鍙戦�佹秷鎭瓨鍌� + */ + @JSONField(serialize = false) + private List<SendMsg> sendList = new ArrayList(); + + /******************************** + * 缂撳瓨瀛楁,鐢ㄤ簬蹇�熸煡鎵� + ********************************/ + + /** + * 寰俊鏄电О涓嶈兘瓒呰繃16浣嶏紝鑰孖D姣旇緝闀匡紝骞茶剢鐢ㄤ竴涓狹ap + * 缇D鎴栨樀绉�,缇や俊鎭� + * 娉ㄦ剰:瀛樺湪鐩稿悓鏄电О浼氬悗鑰呰鐩栧墠鑰� + * <p> + * WebWxBatchGetContact涔嬪悗鍙互閫氳繃 + * .getJSONArray("MemberList")鑾峰彇缇ゆ垚鍛樺垪琛� + */ + @JSONField(serialize = false) + private Map<String, JSONObject> groupInfoMap = new HashMap<>(1024); + + /** + * 寰俊鏄电О涓嶈兘瓒呰繃16浣嶏紝鑰孖D姣旇緝闀匡紝骞茶剢鐢ㄤ竴涓狹ap + * 鐜╁ID鎴栨樀绉帮紝鐜╁淇℃伅 + * 娉ㄦ剰:瀛樺湪鐩稿悓鏄电О浼氬悗鑰呰鐩栧墠鑰� + */ + @JSONField(serialize = false) + private Map<String, JSONObject> userInfoMap = new HashMap<>(1024); + + /* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */ + + /** + * 璇锋眰鍙傛暟 + */ + @JSONField(serialize = false) + public Map<String, Object> getParamMap() { + return new HashMap<String, Object>(1) { + /** + * + */ + private static final long serialVersionUID = 1L; + + { + Map<String, String> map = new HashMap<>(16); + for (BaseParaEnum baseRequest : BaseParaEnum.values()) { + map.put(baseRequest.para(), getLoginInfo().get(baseRequest.value()).toString()); + } + put("BaseRequest", map); + } + }; + } + + public String getUniqueKey() { + return uniqueKey; + } + + public void setUniqueKey(String uniqueKey) { + this.uniqueKey = uniqueKey; + } + + public boolean isAlive() { + return alive; + } + + public void setAlive(boolean alive) { + this.alive = alive; + if (!alive) { + this.isFinishInit = false; + } + } + + public String getIndexUrl() { + return indexUrl; + } + + public void setIndexUrl(String indexUrl) { + this.indexUrl = indexUrl; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public Map<String, Object> getLoginInfo() { + return loginInfo; + } + + public void setLoginInfo(Map<String, Object> loginInfo) { + this.loginInfo = loginInfo; + } + + public JSONObject getUserSelf() { + return userSelf; + } + + public void setUserSelf(JSONObject userSelf) { + this.userSelf = userSelf; + } + + public long getLastNormalRetcodeTime() { + return lastNormalRetcodeTime; + } + + public void setLastNormalRetcodeTime(long lastNormalRetcodeTime) { + this.lastNormalRetcodeTime = lastNormalRetcodeTime; + } + + public int getReceivingRetryCount() { + return receivingRetryCount; + } + + public void setReceivingRetryCount(int receivingRetryCount) { + this.receivingRetryCount = receivingRetryCount; + } + + public int getMemberCount() { + return getContactList().size() + getGroupList().size() + getPublicUsersList().size() + getSpecialUsersList().size(); + } + + public List<JSONObject> getMemberList() { + List<JSONObject> memberList = new ArrayList<>(); + memberList.addAll(this.getContactList()); + memberList.addAll(this.getGroupList()); + memberList.addAll(this.getPublicUsersList()); + memberList.addAll(this.getSpecialUsersList()); + return memberList; + } + + public List<JSONObject> getContactList() { + return contactList; + } + + public void setContactList(List<JSONObject> contactList) { + this.contactList = contactList; + } + + public List<JSONObject> getGroupList() { + return groupList; + } + + public void setGroupList(List<JSONObject> groupList) { + this.groupList = groupList; + } + + public List<JSONObject> getPublicUsersList() { + return publicUsersList; + } + + public void setPublicUsersList(List<JSONObject> publicUsersList) { + this.publicUsersList = publicUsersList; + } + + public List<JSONObject> getSpecialUsersList() { + return specialUsersList; + } + + public void setSpecialUsersList(List<JSONObject> specialUsersList) { + this.specialUsersList = specialUsersList; + } + + public List<BaseMsg> getMsgList() { + return msgList; + } + + public void setMsgList(List<BaseMsg> msgList) { + this.msgList = msgList; + } + + public Map<String, JSONObject> getGroupInfoMap() { + return groupInfoMap; + } + + public void setGroupInfoMap(Map<String, JSONObject> groupInfoMap) { + this.groupInfoMap = groupInfoMap; + } + + public Map<String, JSONObject> getUserInfoMap() { + return userInfoMap; + } + + public void setUserInfoMap(Map<String, JSONObject> userInfoMap) { + this.userInfoMap = userInfoMap; + } + + public boolean isFinishInit() { + return isFinishInit; + } + + public void setFinishInit(boolean finishInit) { + isFinishInit = finishInit; + } + + public ThreadGroup getThreadGroup() { + return threadGroup; + } + + public void setThreadGroup(ThreadGroup threadGroup) { + this.threadGroup = threadGroup; + } + + public List<SendMsg> getSendList() { + return sendList; + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/core/CoreManage.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/core/CoreManage.java new file mode 100644 index 0000000..140903f --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/core/CoreManage.java @@ -0,0 +1,323 @@ +package org.ruoyi.common.wechat.itchat4j.core; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import org.apache.commons.lang3.StringUtils; +import org.apache.http.impl.client.BasicCookieStore; +import org.apache.http.impl.cookie.BasicClientCookie; +import org.ruoyi.common.wechat.itchat4j.beans.SendMsg; +import org.ruoyi.common.wechat.itchat4j.client.HttpClientManage; +import org.ruoyi.common.wechat.itchat4j.controller.LoginController; +import org.ruoyi.common.wechat.itchat4j.utils.LogInterface; +import org.ruoyi.common.wechat.itchat4j.utils.enums.SendMsgType; +import org.ruoyi.common.wechat.itchat4j.utils.tools.CommonTools; + +import java.io.*; +import java.util.Collection; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; + +/** + * 澶氬紑绠$悊 + * + * @author WesleyOne + * @create 2018/12/13 + */ +public class CoreManage implements LogInterface { + + static int MAX_CORE_NUM = 50; + private static HashMap<String, Core> coreMap = new HashMap<>(MAX_CORE_NUM / 3 * 4 + 1); + + // 鏄惁鐑姞杞� + public static boolean USE_HOT_RELOAD = false; + public static String HOT_RELOAD_DIR = "/Users/wesley/output/hotreload/wxwobot.hot"; + + public static Core getInstance(String uniqueKey) { + if (StringUtils.isEmpty(uniqueKey)) { + return null; + } + Core core; + if (!coreMap.containsKey(uniqueKey) || coreMap.get(uniqueKey) == null) { + core = Core.getInstance(uniqueKey); + coreMap.put(uniqueKey, core); + } + return coreMap.get(uniqueKey); + } + + /** + * 绉婚櫎 + * + * @param uniqueKey + */ + public static void remove(String uniqueKey) { + if (coreMap.containsKey(uniqueKey)) { + coreMap.remove(uniqueKey); + } + } + + /** + * 鏌ヨ鏄惁鍦ㄧ嚎 + * + * @param uniqueKey + * @return + */ + public static boolean isActive(String uniqueKey) { + if (StringUtils.isNotEmpty(uniqueKey) && coreMap.containsKey(uniqueKey) && coreMap.get(uniqueKey).isAlive()) { + return true; + } + return false; + } + + /** + * 鎸佷箙鍖� + */ + public static void persistence() { + + // 鏍煎紡鍖栨暟鎹� + Collection<Core> valueCollection = coreMap.values(); + int size = valueCollection.size(); + // 娌℃湁鏁版嵁涓嶆搷浣� + if (size <= 0) { + return; + } + LOG.info("鐧诲綍鏁版嵁鎸佷箙鍖栦腑"); + Iterator<Core> iterator = valueCollection.iterator(); + JSONArray jsonArray = new JSONArray(); + while (iterator.hasNext()) { + Core core = iterator.next(); + if (core.isAlive()) { + JSONObject jsonObject = new JSONObject(); + jsonObject.put("core", core); + jsonObject.put("cookies", core.getMyHttpClient().getCookieStore().getCookies()); + jsonArray.add(jsonObject); + } + } + + try { + File file = new File(HOT_RELOAD_DIR); + if (!file.exists()) { + file.createNewFile(); + } + // 姣忔瑕嗙洊 + FileWriter fileWritter = new FileWriter(HOT_RELOAD_DIR, false); + fileWritter.write(jsonArray.toJSONString()); + fileWritter.close(); + + LOG.info("鐧诲綍鏁版嵁鎸佷箙鍖栧畬鎴�"); + } catch (IOException e) { + e.printStackTrace(); + } + } + + /** + * 鍚姩鍔犺浇鎸佷箙鍖栨枃浠� + */ + public static void reload() { + if (USE_HOT_RELOAD) { + File file = new File(HOT_RELOAD_DIR); + if (file.exists()) { + LOG.info("鐧诲綍鏁版嵁鐑姞杞戒腑"); + StringBuilder stringBuilder = new StringBuilder(); + try { + FileReader fr = new FileReader(HOT_RELOAD_DIR); + BufferedReader bf = new BufferedReader(fr); + String str; + // 鎸夎璇诲彇瀛楃涓� + while ((str = bf.readLine()) != null) { + stringBuilder.append(str); + } + bf.close(); + fr.close(); + } catch (IOException e) { + e.printStackTrace(); + return; + } + String result = stringBuilder.toString(); + if (StringUtils.isEmpty(result)) { + return; + } + + JSONArray jsonArray = JSONArray.parseArray(result); + int size = jsonArray.size(); + if (size > 0) { + // 灏佽鎴愮嚎绋嬫搷浣� + for (int i = 0; i < size; i++) { + JSONObject jsonObject = jsonArray.getJSONObject(i); + ReloadThread reloadThread = new ReloadThread(jsonObject); + Thread thread = new Thread(reloadThread); + thread.start(); + } + } + + LOG.info("鐧诲綍鏁版嵁鐑姞杞藉畬鎴�"); + } + } + } + + private static class ReloadThread implements Runnable { + + private JSONObject reloadObject; + + public ReloadThread(JSONObject object) { + this.reloadObject = object; + } + + @Override + public void run() { + Core core = null; + try { + /** + * 鍒濆鍖朇ore, + * 1.鑾峰彇鐧诲叆鐨勭姸鎬佷俊鎭苟瑁呭叆CoreManage + * 2.鏋勫缓ThreadGroup + * 3.鑾峰彇Cookies骞惰鍏ttpClientManage + * 4.鑾峰彇淇℃伅鍙婂惎鍔ㄧ嚎绋� + */ + JSONObject jsonObject = this.reloadObject; + core = jsonObject.getObject("core", Core.class); + String uniqueKey = core.getUniqueKey(); + if (core.isAlive()) { + core.setThreadGroup(new ThreadGroup(uniqueKey)); + coreMap.put(uniqueKey, core); + + JSONArray cookiesJsonArray = jsonObject.getJSONArray("cookies"); + int arraySize = cookiesJsonArray.size(); + if (arraySize <= 0) { + return; + } + + // 瑁呰浇鍘焎ookie淇℃伅,json瑙f瀽cookie寮傚父锛屽共鑴嗘墜鍔ㄥ皝瑁� + BasicCookieStore cookieStore = new BasicCookieStore(); + for (int ci = 0; ci < arraySize; ci++) { + JSONObject cookieJson = cookiesJsonArray.getJSONObject(ci); + String name = cookieJson.getString("name"); + String value = cookieJson.getString("value"); + String domain = cookieJson.getString("domain"); + String path = cookieJson.getString("path"); + Boolean persistent = cookieJson.getBoolean("persistent"); + Boolean secure = cookieJson.getBoolean("secure"); + Long expiryDate = cookieJson.getLong("expiryDate"); + Integer version = cookieJson.getInteger("version"); + + BasicClientCookie cookie = new BasicClientCookie(name, value); + cookie.setDomain(domain); + cookie.setPath(path); + cookie.setSecure(secure); + cookie.setExpiryDate(new Date(expiryDate)); + cookie.setVersion(version); + + cookieStore.addCookie(cookie); + } + // 蹇呴』鍦ㄦ瀯寤篶lient鏃跺氨鏀惧叆cookie + HttpClientManage.getInstance(uniqueKey, cookieStore); + //瑁呰浇core淇℃伅鍙婂惎鍔ㄧ嚎绋� + LoginController login = new LoginController(uniqueKey); + if (!login.login_3()) { + // 鍔犺浇澶辫触閫�鍑� + core.setAlive(false); + return; + } + LOG.info("鐑櫥褰曟垚鍔�: {}", uniqueKey); + } + } catch (Exception e) { + e.printStackTrace(); + if (core != null) { + core.setAlive(false); + core = null; + } + } + } + } + + + /** + * 瀛樻斁鏂扮殑缇�,鏄电Оemoji澶勭悊 + * + * @param core + * @param jsonObject + */ + public static void addNewGroup(Core core, JSONObject jsonObject) { + String userName = jsonObject.getString("UserName"); + + CommonTools.emojiFormatter2(jsonObject, "NickName"); + // 鍒犻櫎閲嶅鐨� + core.getGroupList().removeIf(group -> userName.equals(group.getString("UserName"))); + + core.getGroupList().add(jsonObject); + core.getGroupInfoMap().put(jsonObject.getString("NickName"), jsonObject); + core.getGroupInfoMap().put(userName, jsonObject); + } + + + /** + * 瀛樻斁鏂扮殑鑱旂郴浜�,鏄电Оemoji澶勭悊 + * + * @param core + * @param jsonObject + */ + public static void addNewContact(Core core, JSONObject jsonObject) { + String userName = jsonObject.getString("UserName"); + + CommonTools.emojiFormatter2(jsonObject, "NickName"); + // 鍒犻櫎閲嶅鐨� + core.getContactList().removeIf(contact -> userName.equals(contact.getString("UserName"))); + + core.getContactList().add(jsonObject); + core.getUserInfoMap().put(jsonObject.getString("NickName"), jsonObject); + core.getUserInfoMap().put(userName, jsonObject); + } + + /** + * 娑堟伅缁熶竴鍔犲埌闃熷垪閲屽鐞�1 + * 鐢ㄤ簬宸茬煡UserName + * + * @param uniqueKey + * @param toUserName + * @param data + * @param type + */ + public static void addSendMsg4UserName(String uniqueKey, String toUserName, String data, SendMsgType type) { + if (StringUtils.isEmpty(uniqueKey) || StringUtils.isEmpty(toUserName) || StringUtils.isEmpty(data) || type == null) { + LOG.error("娑堟伅鍙傛暟涓嶅畬鏁� uk:{} un: {} data: {} ", uniqueKey, toUserName, data); + return; + } + + SendMsg sendMsg = new SendMsg(); + sendMsg.setUserName(toUserName); + sendMsg.setMessage(data); + sendMsg.setMsgType(type); + boolean isGroup = true; + if (toUserName != null && !toUserName.startsWith("@@")) { + isGroup = false; + } + sendMsg.setGroup(isGroup); + CoreManage.getInstance(uniqueKey).getSendList().add(sendMsg); + } + + /** + * 娑堟伅缁熶竴鍔犲埌闃熷垪閲屽鐞�2 + * 鐢ㄤ簬宸茬煡NickName + * + * @param uniqueKey + * @param toNickName + * @param data + * @param type + * @param isGroup + */ + public static void addSendMsg4NickName(String uniqueKey, String toNickName, String data, SendMsgType type, Boolean isGroup) { + + if (StringUtils.isEmpty(uniqueKey) || StringUtils.isEmpty(toNickName) || StringUtils.isEmpty(data) || type == null) { + LOG.error("娑堟伅鍙傛暟涓嶅畬鏁� uk:{} nn: {} data: {} ", uniqueKey, toNickName, data); + return; + } + + SendMsg sendMsg = new SendMsg(); + sendMsg.setNickName(toNickName); + sendMsg.setMessage(data); + sendMsg.setMsgType(type); + sendMsg.setGroup(isGroup); + CoreManage.getInstance(uniqueKey).getSendList().add(sendMsg); + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/core/MsgCenter.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/core/MsgCenter.java new file mode 100644 index 0000000..9a8f607 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/core/MsgCenter.java @@ -0,0 +1,273 @@ +package org.ruoyi.common.wechat.itchat4j.core; + + +import cn.hutool.core.collection.CollectionUtil; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import org.apache.commons.lang3.StringUtils; +import org.ruoyi.common.wechat.itchat4j.api.MessageTools; +import org.ruoyi.common.wechat.itchat4j.api.WechatTools; +import org.ruoyi.common.wechat.itchat4j.beans.BaseMsg; +import org.ruoyi.common.wechat.itchat4j.beans.SendMsg; +import org.ruoyi.common.wechat.itchat4j.face.IMsgHandlerFace; +import org.ruoyi.common.wechat.itchat4j.utils.LogInterface; +import org.ruoyi.common.wechat.itchat4j.utils.MoreConfig; +import org.ruoyi.common.wechat.itchat4j.utils.enums.MsgCodeEnum; +import org.ruoyi.common.wechat.itchat4j.utils.enums.MsgTypeEnum; +import org.ruoyi.common.wechat.itchat4j.utils.enums.SendMsgType; +import org.ruoyi.common.wechat.itchat4j.utils.tools.CommonTools; + +import java.util.ArrayList; +import java.util.List; + +/** + * 娑堟伅澶勭悊涓績 + * + * @author https://github.com/yaphone + * @author WesleyOne 淇敼 + * @version 1.0 + * @date 鍒涘缓鏃堕棿锛�2017骞�5鏈�14鏃� 涓嬪崍12:47:50 + */ +public class MsgCenter implements LogInterface { + + /** + * 鎺ユ敹娑堟伅锛屾斁鍏ラ槦鍒� + * + * @param msgList + * @return + * @author https://github.com/yaphone + * @date 2017骞�4鏈�23鏃� 涓嬪崍2:30:48 + */ + public static JSONArray produceMsg(JSONArray msgList, String uniqueKey) { + Core core = CoreManage.getInstance(uniqueKey); + JSONArray result = new JSONArray(); + // 鐢ㄤ簬鏆傚瓨鏈煡缇D,鏈�鍚庤皟鐢╳ebwxbatchgetcontact鑾峰彇 + List<String> unknowGroup = new ArrayList<>(); + + for (int i = 0; i < msgList.size(); i++) { + JSONObject m = msgList.getJSONObject(i); + // 鏄惁鏄兢娑堟伅 + boolean isGroupMsg = false; + boolean isAtMe = false; + if (m.getString("FromUserName").contains("@@") || m.getString("ToUserName").contains("@@")) { + // 缇よ亰娑堟伅 + isGroupMsg = true; + if (m.getString("FromUserName").contains("@@") + && !core.getGroupInfoMap().containsKey(m.getString("FromUserName"))) { + unknowGroup.add(m.getString("FromUserName")); + } else if (m.getString("ToUserName").contains("@@") + && !core.getGroupInfoMap().containsKey(m.getString("ToUserName"))) { + unknowGroup.add(m.getString("ToUserName")); + } + // 缇ゆ秷鎭笌鏅�氭秷鎭笉鍚岀殑鏄湪鍏舵秷鎭綋锛圕ontent锛変腑浼氬寘鍚彂閫佽�卛d鍙�":<br/>"娑堟伅锛岃繖閲岄渶瑕佸鐞嗕竴涓嬶紝鍘绘帀澶氫綑淇℃伅锛屽彧淇濈暀娑堟伅鍐呭 + String splitCode = ":<br/>"; + if (m.getString("Content").contains(splitCode)) { + String source = m.getString("Content"); + String content = source.substring(source.indexOf(splitCode) + splitCode.length()); + String sendMemberId = source.substring(0, source.indexOf(splitCode)); + + m.put("Content", content); + m.put(MoreConfig.SEND_MEMBER_ID, sendMemberId); + + if (content.contains("@" + core.getNickName())) { + isAtMe = true; + } + } + + } + m.put("groupMsg", isGroupMsg); + m.put("atMe", isAtMe); + // 1.鏂囨湰娑堟伅 + if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_TEXT.getCode())) { + if (m.getString("Url").length() != 0) { + // 1.1鍒嗕韩浣嶇疆 涓嶅鐞� + continue; +// String[] contents = m.getString("Content").split(":"); +// String data = "Map"; +// if (contents.length>0) { +// data = contents[0]+":"+m.getString("Url"); +// } +// m.put("Type", MsgTypeEnum.MAP.getType()); +// m.put("Text", data); +// LOG.warn("MAP_CONTENT: {},URL: {}",m.getString("Content"),m.getString("Url")); + /** + * MAP_CONTENT: 婊ㄥ叴灏忓尯(涓滃尯):/cgi-bin/mmwebwx-bin/webwxgetpubliclinkimg?url=xxx&msgid=7525662842661720095&pictype=location,URL: http://apis.map.qq.com/uri/v1/geocoder?coord=30.191660,120.200508 + */ + + } else { + // 1.2 鏅�氭枃鏈� + m.put("Type", MsgTypeEnum.TEXT.getType()); + CommonTools.emojiFormatter2(m, "Content"); + m.put("Text", m.getString("Content")); + + } + } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_IMAGE.getCode()) + || m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_EMOTICON.getCode())) { + // 2.鍥剧墖娑堟伅 涓嶅鐞� + continue; +// m.put("Type", MsgTypeEnum.PIC.getType()); + } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_VOICE.getCode())) { + // 3.璇煶娑堟伅 涓嶅鐞� + continue; +// m.put("Type", MsgTypeEnum.VOICE.getType()); + } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_VERIFYMSG.getCode())) { + // 4.濂藉弸纭娑堟伅 涓嶅鐞� + continue; + // MessageTools.addFriend(core, userName, 3, ticket); // 纭娣诲姞濂藉弸 +// m.put("Type", MsgTypeEnum.VERIFYMSG.getType()); + } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_SHARECARD.getCode())) { + // 5.鍏变韩鍚嶇墖 涓嶅鐞� +// m.put("Type", MsgTypeEnum.NAMECARD.getType()); + } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_VIDEO.getCode()) + || m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_MICROVIDEO.getCode())) { + // 6.瑙嗛 涓嶅鐞� + continue; +// m.put("Type", MsgTypeEnum.VIEDO.getType()); + } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_MEDIA.getCode())) { + // 7.鍒嗕韩閾炬帴 涓嶅鐞� + continue; +// m.put("Type", MsgTypeEnum.MEDIA.getType()); + } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_STATUSNOTIFY.getCode())) { + // 寰俊鍒濆鍖栨秷鎭� 绯荤粺 + m.put("Type", MsgTypeEnum.SYS.getType()); + } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_SYS.getCode())) { + // 绯荤粺娑堟伅 绯荤粺 + m.put("Type", MsgTypeEnum.SYS.getType()); + } else if (m.getInteger("MsgType").equals(MsgCodeEnum.MSGTYPE_RECALLED.getCode())) { + // 鎾ゅ洖娑堟伅 绯荤粺 涓嶅鐞� + continue; +// m.put("Type", MsgTypeEnum.SYS.getType()); + } else { + LOG.error("Useless msg: {} \n {}", m.getInteger("MsgType"), m.getString("Content")); + } + + /** + * 鏃ュ織 + * 鏄剧ず鏀跺埌鐨勬秷鎭� + */ + String nickName; + String memberName = ""; + if (m.getBoolean("groupMsg")) { + nickName = WechatTools.getGroupNickNameByUserName(m.getString("FromUserName"), uniqueKey); + + if (m.getString(MoreConfig.SEND_MEMBER_ID) != null) { + // 鑾峰彇鎴愬憳鏄电О + memberName = WechatTools.getMemberNickName(m.getString("FromUserName"), uniqueKey, m.getString(MoreConfig.SEND_MEMBER_ID)); + m.put(MoreConfig.SEND_MEMBER_NICKNAMW, memberName); + } + } else { + nickName = WechatTools.getContactNickNameByUserName(m.getString("FromUserName"), uniqueKey); + } + m.put("fromNickName", nickName); + LOG.info("鏀跺埌銆恵}銆�=>銆恵}銆戞秷鎭�,鏉ヨ嚜: {} 鍐呭:\n{} ", + MsgCodeEnum.fromCode(m.getInteger("MsgType")) == null ? "鏈煡绫诲瀷" + m.getInteger("MsgType") : MsgCodeEnum.fromCode(m.getInteger("MsgType")).getType(), + m.getString("Type"), + nickName + " : " + memberName, + StringUtils.isNotEmpty(m.getString("Content")) ? m.getString("Content") : ""); + result.add(m); + } + return result; + } + + /** + * 寰俊鎺ユ敹娑堟伅澶勭悊 + * + * @param uniqueKey + * @author https://github.com/yaphone + * @date 2017骞�5鏈�14鏃� 涓婂崍10:52:34 + */ + public static void handleMsg(String uniqueKey, IMsgHandlerFace msgHandler) { + Core core = CoreManage.getInstance(uniqueKey); + while (true) { + if (!core.isAlive()) { + LOG.info("鍋滄娑堟伅澶勭悊"); + break; + } + if (core.getMsgList().size() > 0 && core.getMsgList().get(0).getContent() != null) { + if (core.getMsgList().get(0).getContent().length() > 0) { + BaseMsg msg = core.getMsgList().get(0); + if (msg.getType() != null) { + try { + if (msg.getType().equals(MsgTypeEnum.TEXT.getType())) { + msgHandler.textMsgHandle(msg); + } else if (msg.getType().equals(MsgTypeEnum.PIC.getType())) { + msgHandler.picMsgHandle(msg); + } else if (msg.getType().equals(MsgTypeEnum.VOICE.getType())) { + msgHandler.voiceMsgHandle(msg); + } else if (msg.getType().equals(MsgTypeEnum.VIEDO.getType())) { + msgHandler.videoMsgHandle(msg); + } else if (msg.getType().equals(MsgTypeEnum.NAMECARD.getType())) { + msgHandler.nameCardMsgHandle(msg); + } else if (msg.getType().equals(MsgTypeEnum.SYS.getType())) { + msgHandler.sysMsgHandle(msg); + } else if (msg.getType().equals(MsgTypeEnum.VERIFYMSG.getType())) { + msgHandler.verifyAddFriendMsgHandle(msg); + } else if (msg.getType().equals(MsgTypeEnum.MEDIA.getType())) { + msgHandler.mediaMsgHandle(msg); + } else { + LOG.warn("鏆傛湭澶勭悊淇℃伅銆恵}銆�", msg.getType()); + } + } catch (Exception e) { + LOG.error(e.getMessage(), e); + } + } + } + core.getMsgList().remove(0); + } + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + LOG.error("娑堟伅澶勭悊涓柇"); + break; + } + } + } + + /** + * 缁熶竴鍙戦�佹秷鎭� + * + * @param uniqueKey + */ + public static void sendMsg(String uniqueKey) { + Core core = CoreManage.getInstance(uniqueKey); + while (true) { + if (core == null || !core.isAlive()) { + LOG.info("鍋滄娑堟伅鍙戦��"); + break; + } + if (CollectionUtil.isNotEmpty(core.getSendList())) { + SendMsg sendMsg = core.getSendList().get(0); + try { + String userName = sendMsg.getUserName(); + String nickName = sendMsg.getNickName(); + String message = sendMsg.getMessage(); + boolean isGroup = sendMsg.isGroup(); + SendMsgType msgType = sendMsg.getMsgType(); + if (StringUtils.isNotEmpty(message) && msgType != null) { + if (StringUtils.isNotEmpty(userName)) { + MessageTools.send(userName, uniqueKey, message, msgType.toValue()); + } else if (StringUtils.isNotEmpty(nickName)) { + MessageTools.sendByNickName(nickName, uniqueKey, message, msgType.toValue(), isGroup); + } else { + LOG.error("鏃犳晥鍙戦�佹秷鎭�: {}", JSONObject.toJSONString(sendMsg)); + } + } + } catch (Exception e) { + LOG.error(e.getMessage(), e); + } + core.getSendList().remove(0); + } + try { + // 鎺у埗鍙戦�侀鐜� + Thread.sleep(2000); + } catch (InterruptedException e) { + e.printStackTrace(); + LOG.error("娑堟伅鍙戦�佷腑鏂�"); + break; + } + } + + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/face/IMsgHandlerFace.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/face/IMsgHandlerFace.java new file mode 100644 index 0000000..31e2c2a --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/face/IMsgHandlerFace.java @@ -0,0 +1,93 @@ +package org.ruoyi.common.wechat.itchat4j.face; + +import org.ruoyi.common.wechat.itchat4j.beans.BaseMsg; + +/** + * 娑堟伅澶勭悊鎺ュ彛 + * + * @author https://github.com/yaphone + * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�20鏃� 涓婂崍12:13:49 + * @version 1.0 + * + * @author WesleyOne 淇敼 + */ +public interface IMsgHandlerFace { + + /** + * + * @author https://github.com/yaphone + * @date 2017骞�4鏈�20鏃� 涓婂崍12:15:00 + * @param msg + * @return + */ + void textMsgHandle(BaseMsg msg); + + /** + * 澶勭悊鍥剧墖娑堟伅 + * + * @author https://github.com/yaphone + * @date 2017骞�4鏈�21鏃� 涓嬪崍11:07:06 + * @param msg + * @return + */ + void picMsgHandle(BaseMsg msg); + + /** + * 澶勭悊澹伴煶娑堟伅 + * + * @author https://github.com/yaphone + * @date 2017骞�4鏈�22鏃� 涓婂崍12:09:44 + * @param msg + * @return + */ + void voiceMsgHandle(BaseMsg msg); + + /** + * 澶勭悊灏忚棰戞秷鎭� + * + * @author https://github.com/yaphone + * @date 2017骞�4鏈�23鏃� 涓嬪崍12:19:50 + * @param msg + * @return + */ + void videoMsgHandle(BaseMsg msg); + + /** + * 澶勭悊鍚嶇墖娑堟伅 + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�1鏃� 涓婂崍12:50:50 + * @param msg + * @return + */ + void nameCardMsgHandle(BaseMsg msg); + + /** + * 澶勭悊绯荤粺娑堟伅 + * + * @author Relyn + * @date 2017骞�6鏈�21鏃�17:43:51 + * @param msg + * @return + */ + void sysMsgHandle(BaseMsg msg); + + /** + * 澶勭悊纭娣诲姞濂藉弸娑堟伅 + * + * @date 2017骞�6鏈�28鏃� 涓嬪崍10:15:30 + * @param msg + * @return + */ + void verifyAddFriendMsgHandle(BaseMsg msg); + + /** + * 澶勭悊鏀跺埌鐨勬枃浠舵秷鎭� + * + * @date 2017骞�7鏈�21鏃� 涓嬪崍11:59:14 + * @param msg + * @return + */ + void mediaMsgHandle(BaseMsg msg); + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/service/ILoginService.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/service/ILoginService.java new file mode 100644 index 0000000..97a7cb5 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/service/ILoginService.java @@ -0,0 +1,85 @@ +package org.ruoyi.common.wechat.itchat4j.service; + + + +/** + * 鐧婚檰鏈嶅姟鎺ュ彛 + * + * @author https://github.com/yaphone + * @date 鍒涘缓鏃堕棿锛�2017骞�5鏈�13鏃� 涓婂崍12:07:21 + * @version 1.0 + * + * @author WesleyOne 淇敼 + */ +public interface ILoginService { + + /** + * 鐧婚檰 + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�13鏃� 涓婂崍12:14:07 + * @return + */ + boolean login(); + + /** + * 鑾峰彇UUID + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�13鏃� 涓婂崍12:21:40 + * @return + */ + String getUuid(); + + /** + * 鑾峰彇浜岀淮鐮佸浘鐗� + * (鐩存帴鑾峰彇鍥剧墖閾炬帴,涓嶄笅杞芥枃浠�) + * @author https://github.com/yaphone + * @date 2017骞�5鏈�13鏃� 涓婂崍12:13:51 + * @param qrPath + * @return + */ + @Deprecated + boolean getQR(String qrPath); + + /** + * web鍒濆鍖� + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�13鏃� 涓婂崍12:14:13 + * @return + */ + boolean webWxInit(); + + /** + * 寰俊鐘舵�侀�氱煡 + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�13鏃� 涓婂崍12:14:24 + */ + void wxStatusNotify(); + + /** + * 鎺ユ敹娑堟伅 + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�13鏃� 涓婂崍12:14:37 + */ + void startReceiving(); + + /** + * 鑾峰彇寰俊鑱旂郴浜� + * + * @author https://github.com/yaphone + * @date 2017骞�5鏈�13鏃� 涓嬪崍2:26:18 + */ + void webWxGetContact(); + + /** + * 鎵归噺鑾峰彇鑱旂郴浜轰俊鎭� + * + * @date 2017骞�6鏈�22鏃� 涓嬪崍11:24:35 + */ + void WebWxBatchGetContact(); + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/service/impl/LoginServiceImpl.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/service/impl/LoginServiceImpl.java new file mode 100644 index 0000000..9e1d021 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/service/impl/LoginServiceImpl.java @@ -0,0 +1,894 @@ +package org.ruoyi.common.wechat.itchat4j.service.impl; + + +import cn.hutool.core.collection.CollectionUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import org.apache.commons.lang3.StringUtils; +import org.apache.http.Consts; +import org.apache.http.HttpEntity; +import org.apache.http.cookie.Cookie; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import org.ruoyi.common.wechat.itchat4j.beans.BaseMsg; +import org.ruoyi.common.wechat.itchat4j.beans.Member; +import org.ruoyi.common.wechat.itchat4j.beans.WebWxInit; +import org.ruoyi.common.wechat.itchat4j.core.Core; +import org.ruoyi.common.wechat.itchat4j.core.CoreManage; +import org.ruoyi.common.wechat.itchat4j.core.MsgCenter; +import org.ruoyi.common.wechat.itchat4j.service.ILoginService; +import org.ruoyi.common.wechat.itchat4j.utils.LogInterface; +import org.ruoyi.common.wechat.itchat4j.utils.SleepUtils; +import org.ruoyi.common.wechat.itchat4j.utils.enums.*; +import org.ruoyi.common.wechat.itchat4j.utils.enums.parameters.BaseParaEnum; +import org.ruoyi.common.wechat.itchat4j.utils.enums.parameters.LoginParaEnum; +import org.ruoyi.common.wechat.itchat4j.utils.enums.parameters.StatusNotifyParaEnum; +import org.ruoyi.common.wechat.itchat4j.utils.enums.parameters.UUIDParaEnum; +import org.ruoyi.common.wechat.itchat4j.utils.tools.CommonTools; +import org.w3c.dom.Document; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.OutputStream; +import java.util.*; +import java.util.Map.Entry; +import java.util.regex.Matcher; + +/** + * 鐧婚檰鏈嶅姟瀹炵幇绫� + * + * @author https://github.com/yaphone + * @author WesleyOne 淇敼 + * @version 1.0 + * @date 鍒涘缓鏃堕棿锛�2017骞�5鏈�13鏃� 涓婂崍12:09:35 + */ +public class LoginServiceImpl implements ILoginService, LogInterface { + private Core core; + private String uniqueKey; + + public LoginServiceImpl(String uniqueKey) { + this.uniqueKey = uniqueKey; + this.core = CoreManage.getInstance(uniqueKey); + } + + @Override + public boolean login() { + + boolean isLogin = false; + // 缁勮鍙傛暟鍜孶RL + List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>(); + params.add(new BasicNameValuePair(LoginParaEnum.LOGIN_ICON.para(), LoginParaEnum.LOGIN_ICON.value())); + params.add(new BasicNameValuePair(LoginParaEnum.UUID.para(), core.getUuid())); + params.add(new BasicNameValuePair(LoginParaEnum.TIP.para(), LoginParaEnum.TIP.value())); + + // long time = 4000; + long startMillis = System.currentTimeMillis(); + boolean overTime = false; + + while (!isLogin && !overTime) { + // 闃叉璇锋眰閲嶅鏃剁殑闂 + if (core.isAlive()) { + break; + } + + long millis = System.currentTimeMillis(); + params.add(new BasicNameValuePair(LoginParaEnum.R.para(), String.valueOf(millis / 1579L))); + params.add(new BasicNameValuePair(LoginParaEnum._1.para(), String.valueOf(millis))); + HttpEntity entity = core.getMyHttpClient().doGet(URLEnum.LOGIN_URL.getUrl(), params, true, null); + + try { + String result = EntityUtils.toString(entity); + String status = checklogin(result); + if (ResultEnum.SUCCESS.getCode().equals(status)) { + // 澶勭悊缁撴灉 + if (processLoginInfo(result)) { + isLogin = true; + core.setAlive(isLogin); + break; + } else { + isLogin = false; + core.setAlive(isLogin); + // 鐧诲叆寮傚父鐩存帴閫�鍑猴紝闃叉姝诲惊鐜� + break; + } + } + if (ResultEnum.WAIT_CONFIRM.getCode().equals(status)) { + LOG.info("璇风偣鍑诲井淇$‘璁ゆ寜閽紝杩涜鐧婚檰"); + } + + } catch (Exception e) { + LOG.error("寰俊鐧婚檰寮傚父锛�", e); + break; + } + // 3鍒嗛挓瓒呮椂涓嶅啀璇锋眰 + SleepUtils.sleep(1000); + overTime = (millis - startMillis) > 1000 * 180; + } + return isLogin; + } + + + @Override + public String getUuid() { + // 缁勮鍙傛暟鍜孶RL + List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>(); + params.add(new BasicNameValuePair(UUIDParaEnum.APP_ID.para(), UUIDParaEnum.APP_ID.value())); + params.add(new BasicNameValuePair(UUIDParaEnum.FUN.para(), UUIDParaEnum.FUN.value())); + params.add(new BasicNameValuePair(UUIDParaEnum.LANG.para(), UUIDParaEnum.LANG.value())); + params.add(new BasicNameValuePair(UUIDParaEnum._1.para(), String.valueOf(System.currentTimeMillis()))); + + HttpEntity entity = core.getMyHttpClient().doGet(URLEnum.UUID_URL.getUrl(), params, true, null); + + try { + String result = EntityUtils.toString(entity); + String regEx = "window.QRLogin.code = (\\d+); window.QRLogin.uuid = \"(\\S+?)\";"; + Matcher matcher = CommonTools.getMatcher(regEx, result); + LOG.info(result); + if (matcher.find()) { + if ((ResultEnum.SUCCESS.getCode().equals(matcher.group(1)))) { + core.setUuid(matcher.group(2)); + } + } + } catch (Exception e) { + LOG.error(e.getMessage(), e); + } + + return core.getUuid(); + } + + @Deprecated + @Override + public boolean getQR(String qrPath) { + return getQR(qrPath, false); + } + + @Deprecated + public boolean getQR(String qrPath, boolean open) { + qrPath = qrPath + File.separator + "QR.jpg"; + String qrUrl = URLEnum.QRCODE_URL.getUrl() + core.getUuid(); + HttpEntity entity = core.getMyHttpClient().doGet(qrUrl, null, true, null); + try { + // 鏂囦欢宸插瓨鍦ㄥ厛鍒犻櫎 + File file = new File(qrPath); + if (file.exists() && file.isFile()) { + file.delete(); + } + // 鍐欏叆浜岀淮鐮� + OutputStream out = new FileOutputStream(qrPath); + byte[] bytes = EntityUtils.toByteArray(entity); + out.write(bytes); + out.flush(); + out.close(); + if (open) { + try { + CommonTools.printQr(qrPath); // 鎵撳紑鐧婚檰浜岀淮鐮佸浘鐗� + } catch (Exception e) { + LOG.info(e.getMessage()); + } + } + + } catch (Exception e) { + e.printStackTrace(); + LOG.error(e.getMessage(), e); + return false; + } + + return true; + } + + /** + * 鑾峰彇鑷韩鐧诲綍淇℃伅缂撳瓨 + * + * @return + */ + @Override + public boolean webWxInit() { + core.setAlive(true); + core.setLastNormalRetcodeTime(System.currentTimeMillis()); + + try { + // 缁勮璇锋眰URL鍜屽弬鏁� + String url = String.format(URLEnum.INIT_URL.getUrl(), + core.getLoginInfo().get(StorageLoginInfoEnum.url.getKey()), + System.currentTimeMillis() / 3158L, + core.getLoginInfo().get(StorageLoginInfoEnum.pass_ticket.getKey())); + Map<String, Object> paramMap = core.getParamMap(); + + // 璇锋眰鍒濆鍖栨帴鍙� + HttpEntity entity = core.getMyHttpClient().doPost(url, JSONObject.toJSONString(paramMap), getPersistentCookieMap()); + String result = EntityUtils.toString(entity, Consts.UTF_8); + + /** + * 鐩稿叧杩斿洖淇℃伅锛屾湰椤圭洰鏈仛灏佽 + * @see WebWxInit + */ + JSONObject obj = JSON.parseObject(result); + + JSONObject user = obj.getJSONObject(StorageLoginInfoEnum.User.getKey()); + JSONObject syncKey = obj.getJSONObject(StorageLoginInfoEnum.SyncKey.getKey()); + + core.getLoginInfo().put(StorageLoginInfoEnum.InviteStartCount.getKey(), + obj.getInteger(StorageLoginInfoEnum.InviteStartCount.getKey())); + core.getLoginInfo().put(StorageLoginInfoEnum.SyncKey.getKey(), syncKey); + + JSONArray syncArray = syncKey.getJSONArray("List"); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < syncArray.size(); i++) { + sb.append(syncArray.getJSONObject(i).getString("Key") + "_" + + syncArray.getJSONObject(i).getString("Val") + "|"); + } + // 1_661706053|2_661706420|3_661706415|1000_1494151022| + String synckey = sb.toString(); + + // 1_661706053|2_661706420|3_661706415|1000_1494151022 + core.getLoginInfo().put(StorageLoginInfoEnum.synckey.getKey(), synckey.substring(0, synckey.length() - 1)); + core.setUserName(user.getString("UserName")); + core.setNickName(user.getString("NickName")); + core.setUserSelf(obj.getJSONObject("User")); + + /** + * TIP: + * ContactList姝ゅ鍙槸閮ㄥ垎锛屼笉鍋氬鐞嗭紝webwxgetcontact鎺ュ彛缁熶竴澶勭悊 + * MPSubscribeMsgList 鍏紬鍙锋湇鍔″彿涔熶笉澶勭悊 + */ + } catch (Exception e) { + LOG.error("鐑櫥褰曞嚭鐜拌寮傚父璇峰拷鐣�" + e.getMessage(), e); + core.setAlive(false); + return false; + } + return true; + } + + @Override + public void wxStatusNotify() { + // 缁勮璇锋眰URL鍜屽弬鏁� + String url = String.format(URLEnum.STATUS_NOTIFY_URL.getUrl(), + core.getLoginInfo().get(StorageLoginInfoEnum.pass_ticket.getKey())); + + Map<String, Object> paramMap = core.getParamMap(); + paramMap.put(StatusNotifyParaEnum.CODE.para(), StatusNotifyParaEnum.CODE.value()); + paramMap.put(StatusNotifyParaEnum.FROM_USERNAME.para(), core.getUserName()); + paramMap.put(StatusNotifyParaEnum.TO_USERNAME.para(), core.getUserName()); + paramMap.put(StatusNotifyParaEnum.CLIENT_MSG_ID.para(), System.currentTimeMillis()); + String paramStr = JSON.toJSONString(paramMap); + + try { + HttpEntity entity = core.getMyHttpClient().doPost(url, paramStr); +// String result = EntityUtils.toString(entity, Consts.UTF_8); +// LOG.info(result); + } catch (Exception e) { + LOG.error("寰俊鐘舵�侀�氱煡鎺ュ彛澶辫触锛�", e); + } + + } + + @Override + public void startReceiving() { + core.setAlive(true); + Thread thread = new Thread(core.getThreadGroup(), new Runnable() { + int retryCount = 0; + + @Override + public void run() { + while (core.isAlive()) { + try { + long startTime = System.currentTimeMillis(); + Map<String, String> resultMap = syncCheck(); + LOG.info(JSONObject.toJSONString(resultMap)); + String retcode = resultMap.get("retcode"); + String selector = resultMap.get("selector"); + RetCodeEnum retCodeEnum = RetCodeEnum.fromCode(retcode); + if (retCodeEnum != null) { + LOG.info(retCodeEnum.getType()); + if (retcode.equals(RetCodeEnum.UNKOWN.getCode())) { + // 闃叉棰戠箒璇锋眰 + Thread.sleep(1000); + continue; + } else if (retcode.equals(RetCodeEnum.SUCCESS.getCode())) { + // 淇敼鏈�鍚庢敹鍒版甯告姤鏂囨椂闂� + core.setLastNormalRetcodeTime(System.currentTimeMillis()); + SelectorEnum selectorEnum = SelectorEnum.fromCode(selector); + if (selectorEnum != null) { + if (selector.equals(SelectorEnum.NORMAL.getCode())) { + continue; + } else if (selector.equals(SelectorEnum.NEW_MSG.getCode())) { + // 鏈夋柊娑堟伅 +// processWebwxSync(); + } else if (selector.equals(SelectorEnum.ENTER_OR_LEAVE_CHAT.getCode())) { +// processWebwxSync(); + } else if (selector.equals(SelectorEnum.MOD_CONTACT.getCode())) { +// processWebwxSync(); + } else if (selector.equals(SelectorEnum.SELECTOR_3.getCode())) { +// processWebwxSync(); +// continue; + } else if (selector.equals(SelectorEnum.ADD_OR_DEL_CONTACT.getCode())) { +// processWebwxSync(); + } else { + LOG.error("UNKNOW SELECTOR CODE {}", selector); + } + } else { + // 闃叉鏂扮被鍨嬩笉澶勭悊鍫嗙Н +// processWebwxSync(); + } + } else if (retcode.equals(RetCodeEnum.NOT_LOGIN_CHECK.getCode()) || + retcode.equals(RetCodeEnum.TICKET_ERROR.getCode()) || + retcode.equals(RetCodeEnum.PARAM_ERROR.getCode()) || + retcode.equals(RetCodeEnum.NOT_LOGIN_WARN.getCode()) || + retcode.equals(RetCodeEnum.COOKIE_INVALID_ERROR.getCode()) || + retcode.equals(RetCodeEnum.LOGIN_ENV_ERROR.getCode())) { + // 鐘舵�佸紓甯哥洿鎺ラ��鍑� + core.setAlive(false); + break; + } else { + // 闃叉棰戠箒璇锋眰 + Thread.sleep(1000); + break; + } + } else { + LOG.error("鐗规畩retcode锛� {}", retcode); + } + // 缁熺粺灏濊瘯鑾峰彇鏂版秷鎭� + processWebwxSync(); + if (System.currentTimeMillis() - startTime < 1000 * 1) { + Thread.sleep(1000); + } + } catch (InterruptedException e0) { + LOG.error("绾跨▼涓柇"); + core.setAlive(false); + break; + } catch (Exception e) { + LOG.error(e.getMessage()); + retryCount += 1; + if (core.getReceivingRetryCount() < retryCount) { + core.setAlive(false); + } else { + try { + Thread.sleep(1000); + } catch (InterruptedException e1) { + LOG.error(e.getMessage()); + break; + } + } + } + + } + } + }, "REC-" + uniqueKey); + thread.start(); + } + + + private void processWebwxSync() { + JSONObject msgObj = webWxSync(); + if (msgObj != null) { + Integer addMsgCount = msgObj.getInteger("AddMsgCount"); + Integer ModMsgCount = msgObj.getInteger("ModContactCount"); + Integer DelContactCount = msgObj.getInteger("DelContactCount"); + Integer ModChatRoomMemberCount = msgObj.getInteger("ModChatRoomMemberCount"); + + + if (addMsgCount > 0 || ModMsgCount > 0 || DelContactCount > 0 || ModChatRoomMemberCount > 0) { + LOG.info("鎺ユ敹鍘熸枃:{}", msgObj.toJSONString()); + } + + // 鐢ㄤ簬閫氱煡鑾峰彇璇︾粏璇︾粏 + List<String> modUserName = new ArrayList<>(); + + // 澶勭悊鏂版秷鎭� + try { + + if (addMsgCount > 0) { + JSONArray msgList = msgObj.getJSONArray("AddMsgList"); + msgList = MsgCenter.produceMsg(msgList, uniqueKey); + for (int j = 0; j < msgList.size(); j++) { + BaseMsg baseMsg = JSON.toJavaObject(msgList.getJSONObject(j), + BaseMsg.class); + // TODO 鏃ュ織 + LOG.info("澶勭悊鍚庡璞�:{}", JSON.toJSONString(baseMsg)); + core.getMsgList().add(baseMsg); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + + // 澶勭悊淇敼鑱旂郴浜烘垨缇ゆ垚鍛� + try { + if (ModMsgCount > 0) { + JSONArray list = msgObj.getJSONArray("ModContactList"); + int size = list.size(); + for (int j = 0; j < size; j++) { + String userName = list.getJSONObject(j).getString("UserName"); + if (userName.startsWith("@@")) { + CoreManage.addNewGroup(core, list.getJSONObject(j)); + } else if (userName.startsWith("@")) { + CoreManage.addNewContact(core, list.getJSONObject(j)); + } + modUserName.add(userName); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + + /** + * 娌℃湁鑾峰彇杩囨暟鎹紝涓嶇煡閬撳共鍟ョ敤 + * DelContactCount: 0 + * DelContactList: [] + * ModChatRoomMemberCount: 0 + * ModChatRoomMemberList: [] + */ + + // 鑾峰彇璇︾粏淇℃伅 + WebWxBatchGetContact(modUserName); + + } + + + } + + + @Override + public void webWxGetContact() { + String url = String.format(URLEnum.WEB_WX_GET_CONTACT.getUrl(), + core.getLoginInfo().get(StorageLoginInfoEnum.url.getKey())); + JSONArray member = new JSONArray(); + try { + + // 寰幆鑾峰彇seq鐩村埌涓�0锛屽嵆鑾峰彇鍏ㄩ儴濂藉弸鍒楄〃 ==0锛氬ソ鍙嬭幏鍙栧畬姣� >0锛氬ソ鍙嬫湭鑾峰彇瀹屾瘯锛屾鏃秙eq涓哄凡鑾峰彇鐨勫瓧鑺傛暟 + Long seq = 0L; + do { + // 璁剧疆seq浼犲弬 + List<BasicNameValuePair> params = new ArrayList<>(); + params.add(new BasicNameValuePair("r", String.valueOf(System.currentTimeMillis()))); + params.add(new BasicNameValuePair("seq", String.valueOf(seq))); + params.add(new BasicNameValuePair("skey", core.getLoginInfo().get(BaseParaEnum.Skey.value()).toString())); + HttpEntity entity = core.getMyHttpClient().doGet(url, params, false, getPersistentCookieMap()); + + String result = EntityUtils.toString(entity, Consts.UTF_8); + JSONObject fullFriendsJsonList = JSON.parseObject(result); + + if (fullFriendsJsonList.get("Seq") != null) { + seq = fullFriendsJsonList.getLong("Seq"); + } + + // 绱姞濂藉弸鍒楄〃 + member.addAll(fullFriendsJsonList.getJSONArray(StorageLoginInfoEnum.MemberList.getKey())); + } while (seq > 0); + Iterator<?> iterator = member.iterator(); + while (iterator.hasNext()) { + /** + * @see Member + */ + JSONObject o = (JSONObject) iterator.next(); + + String userName = o.getString("UserName"); + + if (StringUtils.isEmpty(userName)) { + LOG.error("{} 濂藉弸鍒楄〃瀛樺湪UserName绌�", core.getUniqueKey()); + continue; + } + /** + * 鑷繁淇℃伅涓嶆坊鍔� + */ + if (userName.equals(core.getUserName())) { + continue; + } + + /** + * 寮�澶碄@ => 缇よ亰 + * 寮�澶碄 => VerifyFlag -> == 0 濂藉弸 + * -> != 0 鍏紬鍙枫�佹湇鍔″彿 + * 涓嶅惈@寮�澶达紙鍏朵粬锛� => 鐗规畩璐﹀彿 + */ + + if (userName.startsWith("@@")) { + // 缇よ亰 + CoreManage.addNewGroup(core, o); + + } else if (userName.startsWith("@")) { + Integer verifyFlag = o.getInteger("VerifyFlag"); + if (verifyFlag != null && verifyFlag == 0) { + // 濂藉弸 + CoreManage.addNewContact(core, o); + } else { + // 鍏紬鍙� + core.getPublicUsersList().add(o); + } + } else { + // 鐗规畩璐﹀彿 + core.getSpecialUsersList().add(o); + } + } + } catch (Exception e) { + LOG.error(e.getMessage(), e); + } + return; + } + + /** + * 鑾峰彇缇ゅ拰濂藉弸璇︾粏淇℃伅 + * 棣栨鍔犺浇鐢� + */ + @Override + public void WebWxBatchGetContact() { + + Map<String, Object> paramMap = core.getParamMap(); + // 澶勭悊缇ゆ垚鍛樹俊鎭� + int size = core.getGroupList().size(); + List<Map<String, String>> list = new ArrayList<>(); + for (int i = 0; i < size; i++) { + HashMap<String, String> map = new HashMap<>(4); + map.put("UserName", core.getGroupList().get(i).getString("UserName")); + map.put("EncryChatRoomId", ""); + list.add(map); + } + // 澶勭悊鐜╁ + int sizeUser = core.getContactList().size(); + for (int i = 0; i < sizeUser; i++) { + HashMap<String, String> map = new HashMap<>(4); + map.put("UserName", core.getContactList().get(i).getString("UserName")); + map.put("EncryChatRoomId", ""); + list.add(map); + } + + WebWxBatchGetContactMain(paramMap, list); + } + + /** + * 鑾峰彇缇ゅ拰濂藉弸璇︾粏淇℃伅 + * 杩囩▼涓浂鏁f煡璇� + */ + public void WebWxBatchGetContact(List<String> userNameList) { + + if (CollectionUtil.isEmpty(userNameList)) { + return; + } + + String url = String.format(URLEnum.WEB_WX_BATCH_GET_CONTACT.getUrl(), + core.getLoginInfo().get(StorageLoginInfoEnum.url.getKey()), System.currentTimeMillis(), + core.getLoginInfo().get(StorageLoginInfoEnum.pass_ticket.getKey())); + Map<String, Object> paramMap = core.getParamMap(); + // 涓轰簡鑾峰彇缇ゆ垚鍛樹俊鎭� + List<Map<String, String>> list = new ArrayList<>(); + int size = userNameList.size(); + for (int i = 0; i < size; i++) { + HashMap<String, String> map = new HashMap<>(4); + map.put("UserName", userNameList.get(i)); + map.put("EncryChatRoomId", ""); + list.add(map); + } + WebWxBatchGetContactMain(paramMap, list); + } + + private void WebWxBatchGetContactMain(Map<String, Object> paramMap, List<Map<String, String>> list) { + + String url = String.format(URLEnum.WEB_WX_BATCH_GET_CONTACT.getUrl(), + core.getLoginInfo().get(StorageLoginInfoEnum.url.getKey()), System.currentTimeMillis(), + core.getLoginInfo().get(StorageLoginInfoEnum.pass_ticket.getKey())); + + int totalSize = list.size(); + + int batchSize = 50; + int num = totalSize / batchSize; + if (totalSize % batchSize > 0) { + num += 1; + } + + for (int i = 0; i < num; i++) { + int startNum = i * batchSize; + int endNum = (i + 1) * batchSize; + if (endNum > totalSize) { + endNum = totalSize; + } + paramMap.put("Count", endNum - startNum); + paramMap.put("List", list.subList(startNum, endNum)); + HttpEntity entity = core.getMyHttpClient().doPost(url, JSON.toJSONString(paramMap), getPersistentCookieMap()); + try { + String text = EntityUtils.toString(entity, Consts.UTF_8); + JSONObject obj = JSON.parseObject(text); + JSONArray contactList = obj.getJSONArray("ContactList"); + int contactSize = contactList.size(); + if (contactSize > 0) { + for (int j = 0; j < contactSize; j++) { + String userName = contactList.getJSONObject(j).getString("UserName"); + if (userName.startsWith("@@")) { + CoreManage.addNewGroup(core, contactList.getJSONObject(j)); + } else if (userName.startsWith("@")) { + CoreManage.addNewContact(core, contactList.getJSONObject(j)); + } + } + } + } catch (Exception e) { + LOG.info(e.getMessage()); + } + } + } + + + /** + * 妫�鏌ョ櫥闄嗙姸鎬� + * + * @param result + * @return + */ + public String checklogin(String result) { + String regEx = "window.code=(\\d+)"; + Matcher matcher = CommonTools.getMatcher(regEx, result); + if (matcher.find()) { + return matcher.group(1); + } + return null; + } + + /** + * 澶勭悊鐧婚檰淇℃伅 + * + * @param loginContent + * @author https://github.com/yaphone + * @date 2017骞�4鏈�9鏃� 涓嬪崍12:16:26 + */ + private boolean processLoginInfo(String loginContent) { + String regEx = "window.redirect_uri=\"(\\S+)\";"; + Matcher matcher = CommonTools.getMatcher(regEx, loginContent); + if (matcher.find()) { + String originalUrl = matcher.group(1); + String url = originalUrl.substring(0, originalUrl.lastIndexOf('/')); + core.getLoginInfo().put("url", url); + Map<String, List<String>> possibleUrlMap = this.getPossibleUrlMap(); + Iterator<Entry<String, List<String>>> iterator = possibleUrlMap.entrySet().iterator(); + Entry<String, List<String>> entry; + String fileUrl; + String syncUrl; + while (iterator.hasNext()) { + entry = iterator.next(); + String indexUrl = entry.getKey(); + fileUrl = "https://" + entry.getValue().get(0) + "/cgi-bin/mmwebwx-bin"; + syncUrl = "https://" + entry.getValue().get(1) + "/cgi-bin/mmwebwx-bin"; + if (core.getLoginInfo().get("url").toString().contains(indexUrl)) { + core.setIndexUrl(indexUrl); + core.getLoginInfo().put("fileUrl", fileUrl); + core.getLoginInfo().put("syncUrl", syncUrl); + break; + } + } + if (core.getLoginInfo().get("fileUrl") == null && core.getLoginInfo().get("syncUrl") == null) { + core.getLoginInfo().put("fileUrl", url); + core.getLoginInfo().put("syncUrl", url); + } + core.getLoginInfo().put("deviceid", "e" + String.valueOf(new Random().nextLong()).substring(1, 16)); // 鐢熸垚15浣嶉殢鏈烘暟 + core.getLoginInfo().put("BaseRequest", new ArrayList<String>()); + String text = ""; + + try { + Map<String, String> header = new HashMap<>(); + header.put("client-version", "2.0.0"); + header.put("extspam", "Go8FCIkFEokFCggwMDAwMDAwMRAGGvAESySibk50w5Wb3uTl2c2h64jVVrV7gNs06GFlWplHQbY/5FfiO++1yH4ykCyNPWKXmco+wfQzK5R98D3so7rJ5LmGFvBLjGceleySrc3SOf2Pc1gVehzJgODeS0lDL3/I/0S2SSE98YgKleq6Uqx6ndTy9yaL9qFxJL7eiA/R3SEfTaW1SBoSITIu+EEkXff+Pv8NHOk7N57rcGk1w0ZzRrQDkXTOXFN2iHYIzAAZPIOY45Lsh+A4slpgnDiaOvRtlQYCt97nmPLuTipOJ8Qc5pM7ZsOsAPPrCQL7nK0I7aPrFDF0q4ziUUKettzW8MrAaiVfmbD1/VkmLNVqqZVvBCtRblXb5FHmtS8FxnqCzYP4WFvz3T0TcrOqwLX1M/DQvcHaGGw0B0y4bZMs7lVScGBFxMj3vbFi2SRKbKhaitxHfYHAOAa0X7/MSS0RNAjdwoyGHeOepXOKY+h3iHeqCvgOH6LOifdHf/1aaZNwSkGotYnYScW8Yx63LnSwba7+hESrtPa/huRmB9KWvMCKbDThL/nne14hnL277EDCSocPu3rOSYjuB9gKSOdVmWsj9Dxb/iZIe+S6AiG29Esm+/eUacSba0k8wn5HhHg9d4tIcixrxveflc8vi2/wNQGVFNsGO6tB5WF0xf/plngOvQ1/ivGV/C1Qpdhzznh0ExAVJ6dwzNg7qIEBaw+BzTJTUuRcPk92Sn6QDn2Pu3mpONaEumacjW4w6ipPnPw+g2TfywJjeEcpSZaP4Q3YV5HG8D6UjWA4GSkBKculWpdCMadx0usMomsSS/74QgpYqcPkmamB4nVv1JxczYITIqItIKjD35IGKAUwAA=="); + originalUrl = originalUrl + "&fun=new&version=v2&mod=desktop&lang=zh_CN"; + HttpEntity entity = core.getMyHttpClient().doGet(originalUrl, null, false, header); + text = EntityUtils.toString(entity); + } catch (Exception e) { + LOG.info(e.getMessage()); + return false; + } + //add by 榛橀潪榛� 2017-08-01 22:28:09 + //濡傛灉鐧诲綍琚姝㈡椂锛屽垯鐧诲綍杩斿洖鐨刴essage鍐呭涓嶄负绌猴紝涓嬮潰浠g爜鍒欏垽鏂櫥褰曞唴瀹规槸鍚︿负绌猴紝涓嶄负绌哄垯閫�鍑虹▼搴� + String msg = getLoginMessage(text); + if (!"".equals(msg)) { + LOG.info(msg); +// System.exit(0); + return false; + } + Document doc = CommonTools.xmlParser(text); + if (doc != null) { + core.getLoginInfo().put(StorageLoginInfoEnum.skey.getKey(), + doc.getElementsByTagName(StorageLoginInfoEnum.skey.getKey()).item(0).getFirstChild() + .getNodeValue()); + core.getLoginInfo().put(StorageLoginInfoEnum.wxsid.getKey(), + doc.getElementsByTagName(StorageLoginInfoEnum.wxsid.getKey()).item(0).getFirstChild() + .getNodeValue()); + core.getLoginInfo().put(StorageLoginInfoEnum.wxuin.getKey(), + doc.getElementsByTagName(StorageLoginInfoEnum.wxuin.getKey()).item(0).getFirstChild() + .getNodeValue()); + core.getLoginInfo().put(StorageLoginInfoEnum.pass_ticket.getKey(), + doc.getElementsByTagName(StorageLoginInfoEnum.pass_ticket.getKey()).item(0).getFirstChild() + .getNodeValue()); + } + + } + return true; + } + + private Map<String, List<String>> getPossibleUrlMap() { + Map<String, List<String>> possibleUrlMap = new HashMap<String, List<String>>(); + possibleUrlMap.put("wx.qq.com", new ArrayList<String>() { + /** + * + */ + private static final long serialVersionUID = 1L; + + { + add("file.wx.qq.com"); + add("webpush.wx.qq.com"); + } + }); + + possibleUrlMap.put("wx2.qq.com", new ArrayList<String>() { + /** + * + */ + private static final long serialVersionUID = 1L; + + { + add("file.wx2.qq.com"); + add("webpush.wx2.qq.com"); + } + }); + possibleUrlMap.put("wx8.qq.com", new ArrayList<String>() { + /** + * + */ + private static final long serialVersionUID = 1L; + + { + add("file.wx8.qq.com"); + add("webpush.wx8.qq.com"); + } + }); + + possibleUrlMap.put("web2.wechat.com", new ArrayList<String>() { + /** + * + */ + private static final long serialVersionUID = 1L; + + { + add("file.web2.wechat.com"); + add("webpush.web2.wechat.com"); + } + }); + possibleUrlMap.put("wechat.com", new ArrayList<String>() { + /** + * + */ + private static final long serialVersionUID = 1L; + + { + add("file.web.wechat.com"); + add("webpush.web.wechat.com"); + } + }); + return possibleUrlMap; + } + + /** + * 鍚屾娑堟伅 sync the messages + * + * @return + * @author https://github.com/yaphone + * @date 2017骞�5鏈�12鏃� 涓婂崍12:24:55 + */ + private JSONObject webWxSync() { + JSONObject result = null; + String url = String.format(URLEnum.WEB_WX_SYNC_URL.getUrl(), + core.getLoginInfo().get(StorageLoginInfoEnum.url.getKey()), + core.getLoginInfo().get(StorageLoginInfoEnum.wxsid.getKey()), + core.getLoginInfo().get(StorageLoginInfoEnum.skey.getKey()), + core.getLoginInfo().get(StorageLoginInfoEnum.pass_ticket.getKey())); + Map<String, Object> paramMap = core.getParamMap(); + paramMap.put(StorageLoginInfoEnum.SyncKey.getKey(), + core.getLoginInfo().get(StorageLoginInfoEnum.SyncKey.getKey())); + paramMap.put("rr", -System.currentTimeMillis() / 1000); + String paramStr = JSON.toJSONString(paramMap); + try { + HttpEntity entity = core.getMyHttpClient().doPost(url, paramStr, getPersistentCookieMap()); + String text = EntityUtils.toString(entity, Consts.UTF_8); + JSONObject obj = JSON.parseObject(text); + if (obj.getJSONObject("BaseResponse").getInteger("Ret") != 0) { + result = null; + } else { + result = obj; + core.getLoginInfo().put(StorageLoginInfoEnum.SyncKey.getKey(), obj.getJSONObject("SyncCheckKey")); + JSONArray syncArray = obj.getJSONObject(StorageLoginInfoEnum.SyncKey.getKey()).getJSONArray("List"); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < syncArray.size(); i++) { + sb.append(syncArray.getJSONObject(i).getString("Key") + "_" + + syncArray.getJSONObject(i).getString("Val") + "|"); + } + String synckey = sb.toString(); + /** + * 闅忕潃姣忔鑾峰彇鏈�鏂版秷鎭紙鍙傝9锛夊悗鐨勮繑鍥炲�兼洿鏂帮紝鍏剁洰鐨勫湪浜庢瘡娆″悓姝ユ秷鎭悗璁板綍涓�涓綋鍓嶅悓姝ョ殑鐘舵�� + */ + core.getLoginInfo().put(StorageLoginInfoEnum.synckey.getKey(), + synckey.substring(0, synckey.length() - 1));// 1_656161336|2_656161626|3_656161313|11_656159955|13_656120033|201_1492273724|1000_1492265953|1001_1492250432|1004_1491805192 + } + } catch (Exception e) { + LOG.info(e.getMessage()); + } + return result; + + } + + /** + * 妫�鏌ユ槸鍚︽湁鏂版秷鎭� check whether there's a message + * + * @return + * @author https://github.com/yaphone + * @date 2017骞�4鏈�16鏃� 涓婂崍11:11:34 + */ + private Map<String, String> syncCheck() { + Map<String, String> resultMap = new HashMap<String, String>(); + // 缁勮璇锋眰URL鍜屽弬鏁� + String url = core.getLoginInfo().get(StorageLoginInfoEnum.syncUrl.getKey()) + URLEnum.SYNC_CHECK_URL.getUrl(); + List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>(); + for (BaseParaEnum baseRequest : BaseParaEnum.values()) { + params.add(new BasicNameValuePair(baseRequest.para().toLowerCase(), + core.getLoginInfo().get(baseRequest.value()).toString())); + } + params.add(new BasicNameValuePair("r", String.valueOf(System.currentTimeMillis()))); + params.add(new BasicNameValuePair("synckey", (String) core.getLoginInfo().get("synckey"))); + params.add(new BasicNameValuePair("_", String.valueOf(System.currentTimeMillis()))); + try { + HttpEntity entity = core.getMyHttpClient().doGet(url, params, true, getPersistentCookieMap()); + if (entity == null) { + resultMap.put("retcode", "9999"); + resultMap.put("selector", "9999"); + return resultMap; + } + String text = EntityUtils.toString(entity); + String regEx = "window.synccheck=\\{retcode:\"(\\d+)\",selector:\"(\\d+)\"\\}"; + Matcher matcher = CommonTools.getMatcher(regEx, text); + if (!matcher.find() || matcher.group(1).equals("2")) { + LOG.info(String.format("Unexpected sync check result: %s", text)); + } else { + resultMap.put("retcode", matcher.group(1)); + resultMap.put("selector", matcher.group(2)); + } + } catch (Exception e) { + e.printStackTrace(); + } + return resultMap; + } + + private Map<String, String> getPersistentCookieMap() { + /** + * 浠ヤ笅閮ㄥ垎纭繚cookie瀛樺湪header涓紝閲嶅惎鏃堕渶瑕佸己鍒舵墜鍔ㄦ坊鍔狅紝 + * TODO 涓嶅己鍒跺姞閲嶅惎浼歝ookie澶辨晥,杩樹笉纭畾闂 + */ + String cookieStr = null; + if (core != null && core.getMyHttpClient() != null && core.getMyHttpClient().getCookieStore() != null) { + List<Cookie> cookies = core.getMyHttpClient().getCookieStore().getCookies(); + StringBuilder sb = new StringBuilder(); + if (CollectionUtil.isNotEmpty(cookies)) { + for (Cookie ck : cookies) { + sb.append(ck.getName()).append('=').append(ck.getValue()).append(';'); + } + cookieStr = sb.toString().substring(0, sb.toString().length() - 1); + } + + } + Map<String, String> headerMap = null; + if (cookieStr != null) { + headerMap = new HashMap<>(6); + headerMap.put("Cookie", cookieStr); + } + /* ^-----------------------------------------------^ */ + return headerMap; + } + + /** + * 瑙f瀽鐧诲綍杩斿洖鐨勬秷鎭紝濡傛灉鎴愬姛鐧诲綍锛屽垯message涓虹┖ + * + * @param result + * @return + */ + public String getLoginMessage(String result) { + String[] strArr = result.split("<message>"); + String[] rs = strArr[1].split("</message>"); + if (rs != null && rs.length > 1) { + return rs[0]; + } + return ""; + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/Config.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/Config.java new file mode 100644 index 0000000..af88ac3 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/Config.java @@ -0,0 +1,78 @@ +package org.ruoyi.common.wechat.itchat4j.utils; + +import org.ruoyi.common.wechat.itchat4j.utils.enums.OsNameEnum; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; + +/** + * 閰嶇疆淇℃伅 + * + * @author https://github.com/yaphone + * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�23鏃� 涓嬪崍2:26:21 + * @version 1.0 + * + */ +public class Config { + + public static final String API_WXAPPID = "API_WXAPPID"; + + public static final String picDir = "D://org.ruoyi.common.wechat"; + public static final String VERSION = "1.2.18"; + public static final String BASE_URL = "https://login.weixin.qq.com"; + public static final String OS = ""; + public static final String DIR = ""; + public static final String DEFAULT_QR = "QR.jpg"; + public static final String USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36"; + + /** + * 浠呬粎鐢ㄤ簬鍙傝�� + */ + @Deprecated + public static final ArrayList<String> API_SPECIAL_USER = new ArrayList<String>(Arrays.asList("filehelper", "weibo", + "qqmail", "fmessage", "tmessage", "qmessage", "qqsync", "floatbottle", "lbsapp", "shakeapp", "medianote", + "qqfriend", "readerapp", "blogapp", "facebookapp", "masssendapp", "meishiapp", "feedsapp", "voip", + "blogappweixin", "brandsessionholder", "weixin", "weixinreminder", "officialaccounts", "wxitil", + "notification_messages", "wxid_novlwrv3lqwv11", "gh_22b87fa7cb3c", "userexperience_alarm")); + + /** + * 鑾峰彇鏂囦欢鐩綍 + * + * @author https://github.com/yaphone + * @date 2017骞�4鏈�8鏃� 涓嬪崍10:27:42 + * @return + */ + public static String getLocalPath() { + String localPath = null; + try { + localPath = new File("").getCanonicalPath(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return localPath; + } + + /** + * 鑾峰彇绯荤粺骞冲彴 + * + * @author https://github.com/yaphone + * @date 2017骞�4鏈�8鏃� 涓嬪崍10:27:53 + */ + public static OsNameEnum getOsNameEnum() { + String os = System.getProperty("os.name").toUpperCase(); + if (os.indexOf(OsNameEnum.DARWIN.toString()) >= 0) { + return OsNameEnum.DARWIN; + } else if (os.indexOf(OsNameEnum.WINDOWS.toString()) >= 0) { + return OsNameEnum.WINDOWS; + } else if (os.indexOf(OsNameEnum.LINUX.toString()) >= 0) { + return OsNameEnum.LINUX; + } else if (os.indexOf(OsNameEnum.MAC.toString()) >= 0) { + return OsNameEnum.MAC; + } + return OsNameEnum.OTHER; + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/ConstantConfigEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/ConstantConfigEnum.java new file mode 100644 index 0000000..95bd116 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/ConstantConfigEnum.java @@ -0,0 +1,34 @@ +package org.ruoyi.common.wechat.itchat4j.utils; + +/** + * 甯搁噺 + * + * @author https=//github.com/yaphone + * @date 鍒涘缓鏃堕棿锛�2017骞�5鏈�5鏃� 涓嬪崍11=29=04 + * @version 1.0 + * + */ +public class ConstantConfigEnum { + public static final int APPMSGTYPE_TEXT = 1; + public static final int APPMSGTYPE_IMG = 2; + public static final int APPMSGTYPE_AUDIO = 3; + public static final int APPMSGTYPE_VIDEO = 4; + public static final int APPMSGTYPE_URL = 5; + public static final int APPMSGTYPE_ATTACH = 6; + public static final int APPMSGTYPE_OPEN = 7; + public static final int APPMSGTYPE_EMOJI = 8; + public static final int APPMSGTYPE_VOICE_REMIND = 9; + public static final int APPMSGTYPE_SCAN_GOOD = 10; + public static final int APPMSGTYPE_GOOD = 13; + public static final int APPMSGTYPE_EMOTION = 15; + public static final int APPMSGTYPE_CARD_TICKET = 16; + public static final int APPMSGTYPE_REALTIME_SHARE_LOCATION = 17; + // public static final int APPMSGTYPE_TRANSFERS = 2e3; + public static final int APPMSGTYPE_RED_ENVELOPES = 2001; + public static final int APPMSGTYPE_READER_TYPE = 100001; + public static final int UPLOAD_MEDIA_TYPE_IMAGE = 1; + public static final int UPLOAD_MEDIA_TYPE_VIDEO = 2; + public static final int UPLOAD_MEDIA_TYPE_AUDIO = 3; + public static final int UPLOAD_MEDIA_TYPE_ATTACHMENT = 4; + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/LogInterface.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/LogInterface.java new file mode 100644 index 0000000..176c279 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/LogInterface.java @@ -0,0 +1,13 @@ +package org.ruoyi.common.wechat.itchat4j.utils; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * 鍏叡鏃ュ織鎺ュ彛 + * @author WesleyOne + * @create 2018/12/12 + */ +public interface LogInterface { + public final Logger LOG = LoggerFactory.getLogger("WXROBLOG"); +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/MoreConfig.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/MoreConfig.java new file mode 100644 index 0000000..88d125c --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/MoreConfig.java @@ -0,0 +1,12 @@ +package org.ruoyi.common.wechat.itchat4j.utils; + +/** + * @author WesleyOne + * @create 2018/12/19 + */ +public class MoreConfig { + + //瀛樺偍缇よ亰鎴愬憳ID鐨勯敭鏍囪瘑 + public static final String SEND_MEMBER_ID = "sendMemberId"; + public static final String SEND_MEMBER_NICKNAMW = "memberNickname"; +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/SleepUtils.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/SleepUtils.java new file mode 100644 index 0000000..bff1901 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/SleepUtils.java @@ -0,0 +1,20 @@ +package org.ruoyi.common.wechat.itchat4j.utils; + +/** + * Created by xiaoxiaomo on 2017/5/6. + */ +public class SleepUtils { + + /** + * 姣涓哄崟浣� + * @param time + */ + public static void sleep( long time ){ + try { + Thread.sleep( time ); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/MsgCodeEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/MsgCodeEnum.java new file mode 100644 index 0000000..b8a5f23 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/MsgCodeEnum.java @@ -0,0 +1,64 @@ +package org.ruoyi.common.wechat.itchat4j.utils.enums; + +import java.util.EnumSet; +import java.util.HashMap; +import java.util.Map; + +/** + * 娑堟伅绫诲瀷 + * + * @author https://github.com/yaphone + * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�23鏃� 涓嬪崍12:15:00 + * @version 1.0 + * + */ +public enum MsgCodeEnum { + + MSGTYPE_TEXT(1, "鏂囨湰娑堟伅"), + MSGTYPE_IMAGE(3, "鍥剧墖娑堟伅"), + MSGTYPE_VOICE(34, "璇煶娑堟伅"), + MSGTYPE_VERIFYMSG(37, "濂藉弸璇锋眰"), + MSGTYPE_POSSIBLEFRIEND_MSG(40, "POSSIBLEFRIEND_MSG"), + MSGTYPE_SHARECARD(42, "鍒嗕韩鍚嶇墖"), + MSGTYPE_VIDEO(43, "瑙嗛娑堟伅"), + MSGTYPE_EMOTICON(47, "琛ㄦ儏娑堟伅"), + MSGTYPE_LOCATION(48, "浣嶇疆娑堟伅"), + MSGTYPE_MEDIA(49, "鍒嗕韩閾炬帴"), + MSGTYPE_VOIPMSG(50, "VOIPMSG"), + MSGTYPE_STATUSNOTIFY(51, "鐘舵�侀�氱煡"), + MSGTYPE_VOIPNOTIFY(52, "VOIPNOTIFY"), + MSGTYPE_VOIPINVITE(53, "VOIPINVITE"), + MSGTYPE_MICROVIDEO(62, "鐭棰戞秷鎭�"), + MSGTYPE_SYSNOTICE(9999, "SYSNOTICE"), + MSGTYPE_SYS(10000, "绯荤粺娑堟伅"), + MSGTYPE_RECALLED(10002, "鎾ゅ洖娑堟伅") + + ; + + private static final Map<Integer, MsgCodeEnum> lookup = new HashMap<>(); + static { + for (MsgCodeEnum s : EnumSet.allOf(MsgCodeEnum.class)){ + lookup.put(s.getCode(), s); + } + } + public static MsgCodeEnum fromCode(int code) { + return lookup.get(code); + } + + private int code; + private String type; + + MsgCodeEnum(int code, String type) { + this.code = code; + this.type = type; + } + + public int getCode() { + return code; + } + + public String getType() { + return type; + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/MsgTypeEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/MsgTypeEnum.java new file mode 100644 index 0000000..66c0907 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/MsgTypeEnum.java @@ -0,0 +1,41 @@ +package org.ruoyi.common.wechat.itchat4j.utils.enums; + + +/** + * 娑堟伅绫诲瀷鏋氫妇绫� + * + * @author https://github.com/yaphone + * @date 鍒涘缓鏃堕棿锛�2017骞�5鏈�13鏃� 涓嬪崍11:53:00 + * @version 1.0 + * + */ +public enum MsgTypeEnum { + TEXT("Text", "鏂囨湰娑堟伅"), + MAP("MAP", "鍦扮悊浣嶇疆"), + PIC("Pic", "鍥剧墖娑堟伅"), + VOICE("Voice", "璇煶娑堟伅"), + VIEDO("Viedo", "灏忚棰戞秷鎭�"), + NAMECARD("NameCard", "鍚嶇墖娑堟伅"), + SYS("Sys", "绯荤粺娑堟伅"), + VERIFYMSG("VerifyMsg", "娣诲姞濂藉弸"), + + // 鍦板潃鍒嗕韩 + MEDIA("app", "鏂囦欢娑堟伅"); + + private String type; + private String code; + + MsgTypeEnum(String type, String code) { + this.type = type; + this.code = code; + } + + public String getType() { + return type; + } + + public String getCode() { + return code; + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/OsNameEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/OsNameEnum.java new file mode 100644 index 0000000..0272d76 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/OsNameEnum.java @@ -0,0 +1,13 @@ +package org.ruoyi.common.wechat.itchat4j.utils.enums; + +/** + * 绯荤粺骞冲彴 + * + * @author https://github.com/yaphone + * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�8鏃� 涓嬪崍10:36:28 + * @version 1.0 + * + */ +public enum OsNameEnum { + WINDOWS, LINUX, DARWIN, MAC, OTHER +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/ResultEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/ResultEnum.java new file mode 100644 index 0000000..8c4cdaa --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/ResultEnum.java @@ -0,0 +1,25 @@ +package org.ruoyi.common.wechat.itchat4j.utils.enums; + +import lombok.Getter; + +/** + * 杩斿洖缁撴瀯鏋氫妇绫� + * <p> + * Created by xiaoxiaomo on 2017/5/6. + */ +@Getter +public enum ResultEnum { + + SUCCESS("200", "鎴愬姛"), + WAIT_CONFIRM("201", "璇峰湪鎵嬫満涓婄偣鍑荤‘璁�"), + WAIT_SCAN("400", "璇锋壂鎻忎簩缁寸爜"); + + + private final String code; + private final String msg; + + ResultEnum(String code, String msg) { + this.code = code; + this.msg = msg; + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/RetCodeEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/RetCodeEnum.java new file mode 100644 index 0000000..e4628f2 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/RetCodeEnum.java @@ -0,0 +1,49 @@ +package org.ruoyi.common.wechat.itchat4j.utils.enums; + +import java.util.EnumSet; +import java.util.HashMap; +import java.util.Map; + + +public enum RetCodeEnum { + + UNKOWN("9999", "鏈煡"), + SUCCESS("0", "鎴愬姛"), + TICKET_ERROR("-14", "ticket閿欒"), + PARAM_ERROR("1", "浼犲叆鍙傛暟閿欒"), + NOT_LOGIN_WARN("1100", "鏈櫥褰曟彁绀�"), + NOT_LOGIN_CHECK("1101", "鏈娴嬪埌鐧诲綍"), + COOKIE_INVALID_ERROR("1102", "cookie鍊兼棤鏁�"), + LOGIN_ENV_ERROR("1203", "褰撳墠鐧诲綍鐜寮傚父锛屼负浜嗗畨鍏ㄨ捣瑙佽涓嶈鍦╳eb绔繘琛岀櫥褰�"), + TOO_OFEN("1205", "鎿嶄綔棰戠箒") + ; + + private static final Map<String, RetCodeEnum> lookup = new HashMap<String, RetCodeEnum>(); + static { + for (RetCodeEnum s : EnumSet.allOf(RetCodeEnum.class)){ + lookup.put(s.getCode(), s); + } + } + public static RetCodeEnum fromCode(String code) { + return lookup.get(code); + } + + private String code; + private String type; + + RetCodeEnum(String code, String type) { + this.code = code; + this.type = type; + } + + public String getCode() { + return code; + } + + public String getType() { + return type; + } + + + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/SelectorEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/SelectorEnum.java new file mode 100644 index 0000000..99b3048 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/SelectorEnum.java @@ -0,0 +1,48 @@ +package org.ruoyi.common.wechat.itchat4j.utils.enums; + + +import java.util.EnumSet; +import java.util.HashMap; +import java.util.Map; + +/** + * @author WesleyOne + * @create 2018/12/21 + */ +public enum SelectorEnum { + + + UNKOWN("9999", "鏈煡"), + NORMAL("0", "姝e父"), + NEW_MSG("2", "鏈夋柊娑堟伅"), + SELECTOR_3("3", "璁块棶棰戠箒#"), + MOD_CONTACT("4", "鏈変汉淇敼浜嗚嚜宸辩殑鏄电О鎴栦綘淇敼浜嗗埆浜虹殑澶囨敞"), + ADD_OR_DEL_CONTACT("6", "瀛樺湪鍒犻櫎鎴栬�呮柊澧炵殑濂藉弸淇℃伅"), + ENTER_OR_LEAVE_CHAT("7", "杩涘叆鎴栫寮�鑱婂ぉ鐣岄潰"); + + private static final Map<String, SelectorEnum> lookup = new HashMap<>(); + static { + for (SelectorEnum s : EnumSet.allOf(SelectorEnum.class)) { + lookup.put(s.getCode(), s); + } + } + public static SelectorEnum fromCode(String code) { + return lookup.get(code); + } + + private String code; + private String type; + + SelectorEnum(String code, String type) { + this.code = code; + this.type = type; + } + + public String getCode() { + return code; + } + + public String getType() { + return type; + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/SendMsgType.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/SendMsgType.java new file mode 100644 index 0000000..4a42436 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/SendMsgType.java @@ -0,0 +1,65 @@ +package org.ruoyi.common.wechat.itchat4j.utils.enums; + +import com.jfinal.plugin.activerecord.Record; + +import java.util.*; +/** + * 鍙戦�佺被鍨� + * @author WesleyOne + * @create 2018/12/14 + */ +public enum SendMsgType { + + IMG("IMG","鍥剧墖"), + FILE("FILE","鏂囦欢"), + TEXT("TEXT","绾枃鏈�") + ; + + private String value; + private String name; + + SendMsgType(String value, String name) { + this.value = value; + this.name = name; + } + + + private static final Map<String, SendMsgType> lookup = new HashMap<>(); + public static List<Record> LIST_KV = new ArrayList<>(); + static { + for (SendMsgType s : EnumSet.allOf(SendMsgType.class)){ + lookup.put(s.toValue(), s); + LIST_KV.add(new Record().set("v",s.toValue()).set("n",s.toName())); + } + } + + + /** + * 鑾峰彇鏋氫妇鐨勫�硷紙鏁存暟鍊笺�佸瓧绗︿覆鍊肩瓑锛� + * @return + */ + public String toValue() { + return this.value; + } + + public String toName() { + return this.name; + } + + + /** + * 鏍规嵁鍊硷紙鏁存暟鍊笺�佸瓧绗︿覆鍊肩瓑锛夎幏鍙栫浉搴旂殑鏋氫妇绫诲瀷 + * @param value + * @return + */ + public static SendMsgType fromValue(String value) { + return lookup.get(value); + } + + public boolean equal(SendMsgType type){ + if (type != null && this.toValue().equals(type.toValue())){ + return true; + } + return false; + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/StorageLoginInfoEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/StorageLoginInfoEnum.java new file mode 100644 index 0000000..a9722ee --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/StorageLoginInfoEnum.java @@ -0,0 +1,57 @@ +package org.ruoyi.common.wechat.itchat4j.utils.enums; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; + +/** + * Created by xiaoxiaomo on 2017/5/7. + */ +public enum StorageLoginInfoEnum { + + //URL + url("url",new String()), + fileUrl("fileUrl",new String()), + syncUrl("syncUrl",new String()), + //鐢熸垚15浣嶉殢鏈烘暟 + deviceid("deviceid",new String()), + + //baseRequest + skey("skey",new String()), + wxsid("wxsid",new String()), + wxuin("wxuin",new String()), + pass_ticket("pass_ticket",new String()), + + + InviteStartCount("InviteStartCount",new Integer(0)), + // 鐧诲綍鐢ㄦ埛鐧诲綍鏃朵俊鎭� + User("User",new JSONObject()), + SyncKey("SyncKey",new JSONObject()), + synckey("synckey",new String()), + + + + MemberCount("MemberCount",new String()), + MemberList("MemberList",new JSONArray()), + + + + ; + + private String key; + private Object type; + + StorageLoginInfoEnum(String key, Object type) { + this.key = key; + this.type = type; + } + + public String getKey() { + return key; + } + + + public Object getType() { + return type; + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/URLEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/URLEnum.java new file mode 100644 index 0000000..2f713c1 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/URLEnum.java @@ -0,0 +1,49 @@ +package org.ruoyi.common.wechat.itchat4j.utils.enums; + +/** + * URL + * Created by xiaoxiaomo on 2017/5/6. + */ +public enum URLEnum { + + + + BASE_URL("https://login.weixin.qq.com","鍩烘湰鐨刄RL"), + UUID_URL(BASE_URL.url+"/jslogin","UUIDLURL"), + QRCODE_URL(BASE_URL.url+"/qrcode/","鍒濆鍖朥RL"), + STATUS_NOTIFY_URL(BASE_URL.url+"/webwxstatusnotify?lang=zh_CN&pass_ticket=%s","寰俊鐘舵�侀�氱煡"), + LOGIN_URL(BASE_URL.url+"/cgi-bin/mmwebwx-bin/login","鐧婚檰URL"), + INIT_URL("%s/webwxinit?r=%s&pass_ticket=%s","鍒濆鍖朥RL"), + SYNC_CHECK_URL("/synccheck","妫�鏌ュ績璺砋RL"), + WEB_WX_SYNC_URL("%s/webwxsync?sid=%s&skey=%s&pass_ticket=%s&lang=zh_CN","web寰俊娑堟伅鍚屾URL"), + WEB_WX_GET_CONTACT("%s/webwxgetcontact","web寰俊鑾峰彇鑱旂郴浜轰俊鎭疷RL"), + WEB_WX_SEND_MSG("%s/webwxsendmsg","鍙戦�佹秷鎭疷RL"), + WEB_WX_UPLOAD_MEDIA("%s/webwxuploadmedia?f=json", "涓婁紶鏂囦欢鍒版湇鍔″櫒"), + WEB_WX_GET_MSG_IMG("%s/webwxgetmsgimg", "涓嬭浇鍥剧墖娑堟伅"), + WEB_WX_GET_VOICE("%s/webwxgetvoice", "涓嬭浇璇煶娑堟伅"), + WEB_WX_GET_VIEDO("%s/webwxgetvideo", "涓嬭浇璇煶娑堟伅"), + WEB_WX_PUSH_LOGIN("%s/webwxpushloginurl", "涓嶆壂鐮佺櫥闄�"), + WEB_WX_LOGOUT("%s/webwxlogout", "閫�鍑哄井淇�"), + WEB_WX_BATCH_GET_CONTACT("%s/webwxbatchgetcontact?type=ex&r=%s&lang=zh_CN&pass_ticket=%s", "鏌ヨ缇や俊鎭�"), + WEB_WX_REMARKNAME("%s/webwxoplog?lang=zh_CN&pass_ticket=%s", "淇敼濂藉弸澶囨敞"), + WEB_WX_VERIFYUSER("%s/webwxverifyuser?r=%s&lang=zh_CN&pass_ticket=%s", "琚姩娣诲姞濂藉弸"), + WEB_WX_GET_MEDIA("%s/webwxgetmedia", "涓嬭浇鏂囦欢") + + + + + ; + + private String url; + private String msg; + + URLEnum(String url, String msg) { + this.url = url; + this.msg = msg; + } + + + public String getUrl() { + return url; + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/VerifyFriendEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/VerifyFriendEnum.java new file mode 100644 index 0000000..8ff1ea1 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/VerifyFriendEnum.java @@ -0,0 +1,28 @@ +package org.ruoyi.common.wechat.itchat4j.utils.enums; + +/** + * 纭娣诲姞濂藉弸Enum + * + * @author https://github.com/yaphone + * @date 鍒涘缓鏃堕棿锛�2017骞�6鏈�29鏃� 涓嬪崍9:47:14 + * @version 1.0 + * + */ +public enum VerifyFriendEnum { + + ADD(2, "娣诲姞"), + ACCEPT(3, "鎺ュ彈"); + + private int code; + private String desc; + + private VerifyFriendEnum(int code, String desc) { + this.code = code; + this.desc = desc; + } + + public int getCode() { + return code; + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/parameters/BaseParaEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/parameters/BaseParaEnum.java new file mode 100644 index 0000000..7631ff3 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/parameters/BaseParaEnum.java @@ -0,0 +1,36 @@ +package org.ruoyi.common.wechat.itchat4j.utils.enums.parameters; + +/** + * + * 鍩烘湰璇锋眰鍙傛暟 + * 1. webWxInit 鍒濆鍖� + * 2. wxStatusNotify 寰俊鐘舵�侀�氱煡 + * + * <p> + * Created by xiaoxiaomo on 2017/5/7. + */ +public enum BaseParaEnum { + + Uin("Uin", "wxuin"), + Sid("Sid", "wxsid"), + Skey("Skey", "skey"), + DeviceID("DeviceID", "pass_ticket"); + + private String para; + private String value; + + BaseParaEnum(String para, String value) { + this.para = para; + this.value = value; + } + + public String para() { + return para; + } + + + public Object value() { + return value; + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/parameters/LoginParaEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/parameters/LoginParaEnum.java new file mode 100644 index 0000000..507c87e --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/parameters/LoginParaEnum.java @@ -0,0 +1,31 @@ +package org.ruoyi.common.wechat.itchat4j.utils.enums.parameters; + +/** + * 鐧婚檰 + * <p> + * Created by xiaoxiaomo on 2017/5/7. + */ +public enum LoginParaEnum { + + LOGIN_ICON("loginicon", "true"), + UUID("uuid", ""), + TIP("tip", "0"), + R("r", ""), + _1("_", ""); + + private String para; + private String value; + + LoginParaEnum(String para, String value) { + this.para = para; + this.value = value; + } + + public String para() { + return para; + } + + public String value() { + return value; + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/parameters/StatusNotifyParaEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/parameters/StatusNotifyParaEnum.java new file mode 100644 index 0000000..6e105e6 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/parameters/StatusNotifyParaEnum.java @@ -0,0 +1,31 @@ +package org.ruoyi.common.wechat.itchat4j.utils.enums.parameters; + +/** + * 鐘舵�侀�氱煡 + * <p> + * Created by xiaoxiaomo on 2017/5/7. + */ +public enum StatusNotifyParaEnum { + + CODE("Code", "3"), + FROM_USERNAME("FromUserName", ""), + TO_USERNAME("ToUserName", ""), + //鏃堕棿鎴� + CLIENT_MSG_ID("ClientMsgId", ""); + + private String para; + private String value; + + StatusNotifyParaEnum(String para, String value) { + this.para = para; + this.value = value; + } + + public String para() { + return para; + } + + public String value() { + return value; + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/parameters/UUIDParaEnum.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/parameters/UUIDParaEnum.java new file mode 100644 index 0000000..5d00258 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/enums/parameters/UUIDParaEnum.java @@ -0,0 +1,30 @@ +package org.ruoyi.common.wechat.itchat4j.utils.enums.parameters; + +/** + * UUID + * <p> + * Created by xiaoxiaomo on 2017/5/7. + */ +public enum UUIDParaEnum { + + APP_ID("appid", "wx782c26e4c19acffb"), + FUN("fun", "new"), + LANG("lang", "zh_CN"), + _1("_", "鏃堕棿鎴�"); + + private String para; + private String value; + + UUIDParaEnum(String para, String value) { + this.para = para; + this.value = value; + } + + public String para() { + return para; + } + + public String value() { + return value; + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/tools/CommonTools.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/tools/CommonTools.java new file mode 100644 index 0000000..17b2aff --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/tools/CommonTools.java @@ -0,0 +1,301 @@ +package org.ruoyi.common.wechat.itchat4j.utils.tools; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.vdurmont.emoji.EmojiParser; +import org.ruoyi.common.wechat.itchat4j.utils.Config; +import org.ruoyi.common.wechat.itchat4j.utils.enums.OsNameEnum; +import org.w3c.dom.Document; +import org.xml.sax.InputSource; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import java.io.StringReader; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * 甯哥敤宸ュ叿绫� + * + * @author https://github.com/yaphone + * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�8鏃� 涓嬪崍10:59:55 + * @version 1.0 + * + */ +public class CommonTools { + + public static boolean printQr(String qrPath) { + + switch (Config.getOsNameEnum()) { + case WINDOWS: + if (Config.getOsNameEnum().equals(OsNameEnum.WINDOWS)) { + Runtime runtime = Runtime.getRuntime(); + try { + runtime.exec("cmd /c start " + qrPath); + } catch (Exception e) { + e.printStackTrace(); + } + } + break; + case MAC: + if (Config.getOsNameEnum().equals(OsNameEnum.MAC)) { + Runtime runtime = Runtime.getRuntime(); + try { + runtime.exec("open " + qrPath); + } catch (Exception e) { + e.printStackTrace(); + } + } + break; + + default: + break; + } + return true; + } + + public static boolean clearScreen() { + switch (Config.getOsNameEnum()) { + case WINDOWS: + if (Config.getOsNameEnum().equals(OsNameEnum.WINDOWS)) { + Runtime runtime = Runtime.getRuntime(); + try { + runtime.exec("cmd /c " + "cls"); + } catch (Exception e) { + e.printStackTrace(); + } + } + break; + + default: + break; + } + return true; + } + + /** + * 姝e垯琛ㄨ揪寮忓鐞嗗伐鍏� + * + * @author https://github.com/yaphone + * @date 2017骞�4鏈�9鏃� 涓婂崍12:27:10 + * @return + */ + public static Matcher getMatcher(String regEx, String text) { + Pattern pattern = Pattern.compile(regEx); + Matcher matcher = pattern.matcher(text); + return matcher; + } + + /** + * xml瑙f瀽鍣� + * + * @author https://github.com/yaphone + * @date 2017骞�4鏈�9鏃� 涓嬪崍6:24:25 + * @param text + * @return + */ + public static Document xmlParser(String text) { + Document doc = null; + StringReader sr = new StringReader(text); + InputSource is = new InputSource(sr); + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + try { + DocumentBuilder builder = factory.newDocumentBuilder(); + doc = builder.parse(is); + } catch (Exception e) { + e.printStackTrace(); + } + return doc; + } + + public static JSONObject structFriendInfo(JSONObject userObj) { + Map<String, Object> friendInfoTemplate = new HashMap<String, Object>(); + friendInfoTemplate.put("UserName", ""); + friendInfoTemplate.put("City", ""); + friendInfoTemplate.put("DisplayName", ""); + friendInfoTemplate.put("PYQuanPin", ""); + friendInfoTemplate.put("RemarkPYInitial", ""); + friendInfoTemplate.put("Province", ""); + friendInfoTemplate.put("KeyWord", ""); + friendInfoTemplate.put("RemarkName", ""); + friendInfoTemplate.put("PYInitial", ""); + friendInfoTemplate.put("EncryChatRoomId", ""); + friendInfoTemplate.put("Alias", ""); + friendInfoTemplate.put("Signature", ""); + friendInfoTemplate.put("NickName", ""); + friendInfoTemplate.put("RemarkPYQuanPin", ""); + friendInfoTemplate.put("HeadImgUrl", ""); + + friendInfoTemplate.put("UniFriend", 0); + friendInfoTemplate.put("Sex", 0); + friendInfoTemplate.put("AppAccountFlag", 0); + friendInfoTemplate.put("VerifyFlag", 0); + friendInfoTemplate.put("ChatRoomId", 0); + friendInfoTemplate.put("HideInputBarFlag", 0); + friendInfoTemplate.put("AttrStatus", 0); + friendInfoTemplate.put("SnsFlag", 0); + friendInfoTemplate.put("MemberCount", 0); + friendInfoTemplate.put("OwnerUin", 0); + friendInfoTemplate.put("ContactFlag", 0); + friendInfoTemplate.put("Uin", 0); + friendInfoTemplate.put("StarFriend", 0); + friendInfoTemplate.put("Statues", 0); + + friendInfoTemplate.put("MemberList", new ArrayList<Object>()); + + JSONObject r = new JSONObject(); + Set<String> keySet = friendInfoTemplate.keySet(); + for (String key : keySet) { + if (userObj.containsKey(key)) { + r.put(key, userObj.get(key)); + } else { + r.put(key, friendInfoTemplate.get(key)); + } + } + + return r; + } + + public static String getSynckey(JSONObject obj) { + JSONArray obj2 = obj.getJSONArray("List"); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < obj2.size(); i++) { + JSONObject obj3 = (JSONObject) JSON.toJSON(obj2.get(i)); + sb.append(obj3.get("Val") + "|"); + } + return sb.substring(0, sb.length() - 1); // 656159784|656159911|656159873|1491905341 + + } + + public static JSONObject searchDictList(List<JSONObject> list, String key, String value) { + JSONObject r = null; + for (JSONObject i : list) { + if (i.getString(key).equals(value)) { + r = i; + break; + } + } + return r; + } + + /** + * 澶勭悊emoji琛ㄦ儏 + * + * @author https://github.com/yaphone + * @date 2017骞�4鏈�23鏃� 涓嬪崍2:39:04 + * @param d + * @param k + */ + public static void emojiFormatter(JSONObject d, String k) { +// Matcher matcher = getMatcher("<span class=\"emoji emoji(.{1,10})\"></span>", d.getString(k)); + Matcher matcher = getMatcher("<span class=\"emoji emoji(.+?)\"></span>", d.getString(k)); + StringBuilder sb = new StringBuilder(); + String content = d.getString(k); + int lastStart = 0; + while (matcher.find()) { + String str = matcher.group(1); + if (str.length() == 6) { + + } else if (str.length() == 10) { + + } else { + str = "&#x" + str + ";"; + String tmp = content.substring(lastStart, matcher.start()); + sb.append(tmp + str); + lastStart = matcher.end(); + } + } + if (lastStart < content.length()) { + sb.append(content.substring(lastStart)); + } + if (sb.length() != 0) { + d.put(k, EmojiParser.parseToUnicode(sb.toString())); + } else { + d.put(k, content); + } + + } + + /** + * 杞寲鎴恆lias + * @param d + * @param k + */ + public static void emojiFormatter2(JSONObject d, String k) { + Matcher matcher = getMatcher("<span class=\"emoji emoji(.+?)\"></span>", d.getString(k)); + StringBuilder sb = new StringBuilder(); + String content = d.getString(k); + int lastStart = 0; + while (matcher.find()) { + String str = matcher.group(1); + if (str.length() == 6) { + + } else if (str.length() == 10) { + + } else { + str = "&#x" + str + ";"; + String tmp = content.substring(lastStart, matcher.start()); + sb.append(tmp + str); + lastStart = matcher.end(); + } + } + if (lastStart < content.length()) { + sb.append(content.substring(lastStart)); + } + if (sb.length() != 0) { + d.put(k, EmojiParser.parseToAliases(EmojiParser.parseToUnicode(sb.toString()))); + } else { + d.put(k, content); + } + + } + + /** + * 娑堟伅鏍煎紡鍖� + * + * @author https://github.com/yaphone + * @date 2017骞�4鏈�23鏃� 涓嬪崍4:19:08 + * @param d + * @param k + */ + public static void msgFormatter(JSONObject d, String k) { + d.put(k, d.getString(k).replace("<br/>", "\n")); + emojiFormatter(d, k); + // TODO 涓巈moji琛ㄦ儏鏈夐儴鍒嗗吋瀹归棶棰橈紝鐩墠鏆傛湭澶勭悊瑙g爜澶勭悊 d.put(k, + // StringEscapeUtils.unescapeHtml4(d.getString(k))); + + } + + public static void main(String[] args) { + String str2 = "涓夌敓涓変笘<span class=\"emoji emoji1f46f\"></span>鍗佷笁姘�<span class=\"emoji emoji1f440\"></span>"; + + Matcher matcher = getMatcher("<span class=\"emoji emoji(.+?)\"></span>", str2); + StringBuilder sb = new StringBuilder(); + String content = str2; + int lastStart = 0; + while (matcher.find()) { + String str = matcher.group(1); + if (str.length() == 6) { + + } else if (str.length() == 10) { + + } else { + str = "&#x" + str + ";"; + String tmp = content.substring(lastStart, matcher.start()); + sb.append(tmp + str); + lastStart = matcher.end(); + } + } + if (lastStart < content.length()) { + sb.append(content.substring(lastStart)); + } + if (sb.length() != 0) { + System.out.println(EmojiParser.parseToUnicode(sb.toString())); + System.out.println(EmojiParser.parseToAliases(EmojiParser.parseToUnicode(sb.toString()))); + System.out.println(EmojiParser.removeAllEmojis(sb.toString())); + } + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/tools/DownloadTools.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/tools/DownloadTools.java new file mode 100644 index 0000000..3b1f360 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/itchat4j/utils/tools/DownloadTools.java @@ -0,0 +1,77 @@ +package org.ruoyi.common.wechat.itchat4j.utils.tools; + +import org.apache.http.HttpEntity; +import org.apache.http.message.BasicNameValuePair; +import org.apache.http.util.EntityUtils; +import org.ruoyi.common.wechat.itchat4j.beans.BaseMsg; +import org.ruoyi.common.wechat.itchat4j.core.Core; +import org.ruoyi.common.wechat.itchat4j.core.CoreManage; +import org.ruoyi.common.wechat.itchat4j.utils.LogInterface; +import org.ruoyi.common.wechat.itchat4j.utils.enums.MsgTypeEnum; +import org.ruoyi.common.wechat.itchat4j.utils.enums.URLEnum; + +import java.io.FileOutputStream; +import java.io.OutputStream; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.logging.Logger; + +/** + * 涓嬭浇宸ュ叿绫� + * + * @author https://github.com/yaphone + * @date 鍒涘缓鏃堕棿锛�2017骞�4鏈�21鏃� 涓嬪崍11:18:46 + * @version 1.0 + * + */ +public class DownloadTools implements LogInterface { + private static Logger logger = Logger.getLogger("UTILLOG"); + + /** + * 澶勭悊涓嬭浇浠诲姟 + * + * @author https://github.com/yaphone + * @date 2017骞�4鏈�21鏃� 涓嬪崍11:00:25 + * @param msg + * @param type + * @param path + * @return + */ + public static Object getDownloadFn(BaseMsg msg, String type, String path, String uniqueKey) { + Core core = CoreManage.getInstance(uniqueKey); + Map<String, String> headerMap = new HashMap<String, String>(); + List<BasicNameValuePair> params = new ArrayList<BasicNameValuePair>(); + String url = ""; + if (type.equals(MsgTypeEnum.PIC.getType())) { + url = String.format(URLEnum.WEB_WX_GET_MSG_IMG.getUrl(), (String) core.getLoginInfo().get("url")); + } else if (type.equals(MsgTypeEnum.VOICE.getType())) { + url = String.format(URLEnum.WEB_WX_GET_VOICE.getUrl(), (String) core.getLoginInfo().get("url")); + } else if (type.equals(MsgTypeEnum.VIEDO.getType())) { + headerMap.put("Range", "bytes=0-"); + url = String.format(URLEnum.WEB_WX_GET_VIEDO.getUrl(), (String) core.getLoginInfo().get("url")); + } else if (type.equals(MsgTypeEnum.MEDIA.getType())) { + headerMap.put("Range", "bytes=0-"); + url = String.format(URLEnum.WEB_WX_GET_MEDIA.getUrl(), (String) core.getLoginInfo().get("fileUrl")); + params.add(new BasicNameValuePair("sender", msg.getFromUserName())); + params.add(new BasicNameValuePair("mediaid", msg.getMediaId())); + params.add(new BasicNameValuePair("filename", msg.getFileName())); + } + params.add(new BasicNameValuePair("msgid", msg.getNewMsgId())); + params.add(new BasicNameValuePair("skey", (String) core.getLoginInfo().get("skey"))); + HttpEntity entity = core.getMyHttpClient().doGet(url, params, true, headerMap); + try { + OutputStream out = new FileOutputStream(path); + byte[] bytes = EntityUtils.toByteArray(entity); + out.write(bytes); + out.flush(); + out.close(); + } catch (Exception e) { + logger.info(e.getMessage()); + return false; + } + return null; + }; + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/annotation/UnCheckLogin.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/annotation/UnCheckLogin.java new file mode 100644 index 0000000..22ec06c --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/annotation/UnCheckLogin.java @@ -0,0 +1,11 @@ +package org.ruoyi.common.wechat.web.annotation; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +/** + * 涓嶆鏌ョ櫥褰� + */ +@Retention(RetentionPolicy.RUNTIME) +public @interface UnCheckLogin { +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/base/BaseError.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/base/BaseError.java new file mode 100644 index 0000000..41c263c --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/base/BaseError.java @@ -0,0 +1,56 @@ +package org.ruoyi.common.wechat.web.base; + +import java.util.EnumSet; +import java.util.HashMap; +import java.util.Map; + +/** + * 閿欒绠$悊 + * @author WesleyOne + * @create 2018/7/28 + */ +public enum BaseError { + + UNPERMISSION("09","娌℃湁鎿嶄綔鏉冮檺"), + UNLOGIN("01","鏈櫥褰曟垨鐧诲綍杩囨湡"), + OPERATION_ERR("8899","鎿嶄綔澶辫触!"), + NORMAL_ERR("8999","鍙傛暟寮傚父"), + SYSTEM_ERR("9999","绯荤粺寮傚父"); + + + private String code; + private String msg; + BaseError(String code, String msg) { + this.code = code; + this.msg = msg; + } + + + private static final Map<String, BaseError> lookup = new HashMap<String, BaseError>(); + static { + for (BaseError s : EnumSet.allOf(BaseError.class)) + lookup.put(s.getMsg(), s); + } + + /** + * 鑾峰彇鏋氫妇鐨勫�硷紙鏁存暟鍊笺�佸瓧绗︿覆鍊肩瓑锛� + * @return + */ + public String getCode() { + return this.code; + } + + public String getMsg() { + return this.msg; + } + + + /** + * 鏍规嵁鍊硷紙鏁存暟鍊笺�佸瓧绗︿覆鍊肩瓑锛夎幏鍙栫浉搴旂殑鏋氫妇绫诲瀷 + * @param code + * @return + */ + public static BaseError fromValue(String code) { + return lookup.get(code); + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/base/BaseException.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/base/BaseException.java new file mode 100644 index 0000000..aecd571 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/base/BaseException.java @@ -0,0 +1,40 @@ +package org.ruoyi.common.wechat.web.base; + +import java.io.Serializable; + +/** + * 缁熶竴寮傚父瀵硅薄 + * @author WesleyOne + * @create 2018/7/28 + */ +public class BaseException extends Exception implements Serializable { + + private static final long serialVersionUID = 2007525058641283836L; + + private String code; + + public BaseException(String code, String msg) { + super(msg); + this.code = code; + + } + + public BaseException(BaseError baseError) { + super(baseError.getMsg()); + this.code = baseError.getCode(); + } + + public BaseException(String msg) { + super(msg); + this.code = BaseError.NORMAL_ERR.getCode(); + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/base/BaseResponse.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/base/BaseResponse.java new file mode 100644 index 0000000..c8468a4 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/base/BaseResponse.java @@ -0,0 +1,85 @@ +package org.ruoyi.common.wechat.web.base; + +/** + * @author WesleyOne + * @create 2018/7/28 + */ +public class BaseResponse<T> { + public static BaseResponse OK = new BaseResponse(); + + private String code = "00"; + private String message = "鎿嶄綔鎴愬姛"; + + private T data; + public BaseResponse() { + } + + public BaseResponse(T data) { + this.data = data; + } + + public BaseResponse(String code, String message) { + this.code = code; + this.message = message; + } + + public static BaseResponse success(){ + return new BaseResponse(); + } + + public static BaseResponse success(Object o){ + return new BaseResponse(o); + } + + public static BaseResponse error(String code,String msg){ + BaseResponse r = new BaseResponse(); + r.setCode(code); + r.setMessage(msg); + return r; + } + public static BaseResponse error(BaseError baseError){ + BaseResponse r = new BaseResponse(); + r.setCode(baseError.getCode()); + r.setMessage(baseError.getMsg()); + return r; + } + + /** + * 鏈櫥褰曡繑鍥� + * @return + */ + public static BaseResponse unLogin(){ + BaseResponse r = new BaseResponse(); + r.setCode(BaseError.UNLOGIN.getCode()); + r.setMessage(BaseError.UNLOGIN.getMsg()); + return r; + } + + /** + * 鏃犳潈闄愯繑鍥� + * @return + */ + public static BaseResponse unPermission(){ + BaseResponse r = new BaseResponse(); + r.setCode(BaseError.UNPERMISSION.getCode()); + r.setMessage(BaseError.UNPERMISSION.getMsg()); + return r; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/cache/UserSession.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/cache/UserSession.java new file mode 100644 index 0000000..a915d7f --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/cache/UserSession.java @@ -0,0 +1,30 @@ +package org.ruoyi.common.wechat.web.cache; + +import org.ruoyi.common.wechat.web.utils.LRUCache; + +import java.util.LinkedHashMap; + +/** + * 绠�鍗曠殑鏈湴浼氳瘽瀛樺偍 + * @author WesleyOne + * @create 2018/9/25 + */ +public class UserSession { + public static LinkedHashMap<String,String> USERSESSION_CACHE = new LRUCache<String, String>(64); + + public static void addUserSession(String username,String userSession){ + USERSESSION_CACHE.put(username,userSession); + } + + public static void delUserSession(String username){ + USERSESSION_CACHE.remove(username); + } + + public static boolean checkUserSession(String username,String userSession){ + String s = USERSESSION_CACHE.get(username); + if (userSession!=null&&userSession.equals(s)){ + return true; + } + return false; + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/common/MyConfig.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/common/MyConfig.java new file mode 100644 index 0000000..779f1a5 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/common/MyConfig.java @@ -0,0 +1,153 @@ +package org.ruoyi.common.wechat.web.common; + +import com.alibaba.druid.filter.stat.StatFilter; +import com.alibaba.druid.wall.WallFilter; +import com.jfinal.config.*; +import com.jfinal.json.FastJsonFactory; +import com.jfinal.kit.PropKit; +import com.jfinal.plugin.activerecord.ActiveRecordPlugin; +import com.jfinal.plugin.activerecord.dialect.MysqlDialect; +import com.jfinal.plugin.druid.DruidPlugin; +import com.jfinal.server.undertow.UndertowServer; +import com.jfinal.template.Engine; +import com.jfinal.template.source.ClassPathSourceFactory; +import org.ruoyi.common.wechat.itchat4j.core.CoreManage; +import org.ruoyi.common.wechat.web.constant.UploadConstant; +import org.ruoyi.common.wechat.web.interceptor.ExceptionInterceptor; +import org.ruoyi.common.wechat.web.model._MappingKit; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; + + +/** + * JFinal椤圭洰鐨勬牳蹇冮厤缃� + * 璇︽儏鏌ョ湅瀹樻柟鏂囨。 + * https://www.jfinal.com/doc + * + * @author WesleyOne + */ +public class MyConfig extends JFinalConfig { + + public final Logger LOG = LoggerFactory.getLogger(this.getClass()); + + public static void main(String[] args) { + UndertowServer.start(MyConfig.class, 8180, true); + } + + /** + * 閰嶇疆甯搁噺 + */ + @Override + public void configConstant(Constants me) { + PropKit.use("appConfig.properties"); + me.setDevMode(PropKit.getBoolean("devMode", false)); + //涓婁紶鐨勬枃浠剁殑鏈�澶�50M + me.setMaxPostSize(10 * 1024 * 1024); + me.setEncoding("UTF-8"); + me.setJsonFactory(new FastJsonFactory()); + me.setError404View("/WEB-INF/templates/404.html"); + } + + /** + * 閰嶇疆璺敱 + */ + @Override + public void configRoute(Routes me) { + me.add(new MyRoute()); + me.add(new OutRoute()); + } + + @Override + public void configEngine(Engine me) { + me.setDevMode(PropKit.use("appConfig.properties").getBoolean("devMode", false)); + me.addSharedFunction("/WEB-INF/templates/bs4temp/layout.html"); + me.addSharedObject("imgDomain" , UploadConstant.IMG_URL); + me.addSharedObject("filedomain" , UploadConstant.FILE_URL); + } + + /** + * 閰嶇疆鎻掍欢 + */ + @Override + public void configPlugin(Plugins me) { + // 閰嶇疆 druid 鏁版嵁搴撹繛鎺ユ睜鎻掍欢 + DruidPlugin druidPlugin = createDruidPlugin(); + druidPlugin.addFilter(new StatFilter()); + WallFilter wall = new WallFilter(); + wall.setDbType("mysql"); + druidPlugin.addFilter(wall); + druidPlugin.setInitialSize(1); + me.add(druidPlugin); + + // 閰嶇疆ActiveRecord鎻掍欢 + ActiveRecordPlugin arp = new ActiveRecordPlugin(druidPlugin); + _MappingKit.mapping(arp); + arp.setDialect(new MysqlDialect()); + arp.setShowSql(PropKit.use("appConfig.properties").getBoolean("devMode", false)); + arp.getEngine().setSourceFactory(new ClassPathSourceFactory()); + me.add(arp); + } + + public static DruidPlugin createDruidPlugin() { + return new DruidPlugin(PropKit.get("jdbcUrl"), PropKit.get("user"), PropKit.get("password").trim()); + } + /** + * 閰嶇疆鍏ㄥ眬鎷︽埅鍣� + */ + @Override + public void configInterceptor(Interceptors me) { + me.add(new ExceptionInterceptor()); + } + + /** + * 閰嶇疆澶勭悊鍣� + */ + @Override + public void configHandler(Handlers me) { + } + + @Override + public void afterJFinalStart() { + System.setProperty("jsse.enableSNIExtension", "false"); + // 妫�鏌ユ枃浠跺す(/鐑櫥褰�/涓嬭浇鏍圭洰褰�)鏄惁瀛樺湪 + checkFileExist(); + + // 鐑櫥闄嗘搷浣� + CoreManage.reload(); + } + + @Override + public void beforeJFinalStop() { + CoreManage.persistence(); + } + + /** + * 妫�鏌ユ枃浠跺す(/鐑櫥褰�/涓嬭浇鏍圭洰褰�)鏄惁瀛樺湪 + */ + private void checkFileExist() { + String hotReloadDir = PropKit.get("hotReloadDir"); + String downloadPath = PropKit.get("download_path"); + String logPath = PropKit.get("log_path"); + File hotReloadFile = new File(hotReloadDir); + if (!hotReloadFile.exists()){ + if (!hotReloadFile.mkdirs()) { + LOG.error("鐑姞杞芥枃浠跺す鍒涘缓澶辫触[{}]",hotReloadDir); + } + } + File downloadFile = new File(downloadPath); + if (!downloadFile.exists()){ + if (!downloadFile.mkdirs()) { + LOG.error("涓嬭浇鏂囦欢澶瑰垱寤哄け璐{}]",downloadPath); + } + } + File logFile = new File(logPath); + if (!logFile.exists()){ + if (!logFile.mkdirs()) { + LOG.error("鏃ュ織鏂囦欢澶瑰垱寤哄け璐{}]",logPath); + } + } + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/common/MyRoute.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/common/MyRoute.java new file mode 100644 index 0000000..b4b89fb --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/common/MyRoute.java @@ -0,0 +1,30 @@ +package org.ruoyi.common.wechat.web.common; + +import com.jfinal.config.Routes; +import org.ruoyi.common.wechat.web.controller.*; +import org.ruoyi.common.wechat.web.interceptor.VisitLogInterceptor; + +/** + * 绠$悊鍚庡彴璺敱缁熶竴绠$悊 + * @author wesleyOne + */ +public class MyRoute extends Routes { + + + @Override + public void config() { + //璁剧疆瑙嗗浘鏍圭洰褰� + setBaseViewPath("/WEB-INF/templates"); + //璁剧疆鎷︽埅鍣紝鍓嶉潰鐨勫厛鎵ц + addInterceptor(new VisitLogInterceptor()); + //娣诲姞璺敱 + add("/", IndexController.class); + add("/rob",RobotController.class); + add("/robwk",RobotWorkController.class); + add("/relate",RelateController.class); + add("/kw",KeyWordController.class); + + add("/upload",UploadController.class); + add("/tool",ToolController.class); + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/common/OutRoute.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/common/OutRoute.java new file mode 100644 index 0000000..979389f --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/common/OutRoute.java @@ -0,0 +1,21 @@ +package org.ruoyi.common.wechat.web.common; + +import com.jfinal.config.Routes; +import org.ruoyi.common.wechat.web.controller.ExtendController; +import org.ruoyi.common.wechat.web.interceptor.VisitLogInterceptor4down; + +/** + * 瀵瑰璺敱缁熶竴绠$悊 + * @author WesleyOne + * @create 2018/9/25 + */ +public class OutRoute extends Routes { + @Override + public void config() { + //璁剧疆瑙嗗浘鏍圭洰褰� + setBaseViewPath("/WEB-INF/templates"); + addInterceptor(new VisitLogInterceptor4down()); + //娣诲姞璺敱 + add("/ext", ExtendController.class); + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/constant/ConfigKeys.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/constant/ConfigKeys.java new file mode 100644 index 0000000..76577c4 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/constant/ConfigKeys.java @@ -0,0 +1,21 @@ +package org.ruoyi.common.wechat.web.constant; + +/** + * @author WesleyOne + * @create 2018/12/13 + */ +public class ConfigKeys { + + /** + * 榛樿鍏ㄥ眬鍏抽敭瀛楀洖澶嶇敤鏄电О锛岃瀛楁瓒呰繃16瀛楃闃叉涓庣敤鎴锋樀绉板啿绐� + * + * http://kf.qq.com/touch/wxappfaq/150910F322eY150910eIV32Q.html?platform=14 + * 寰俊鏄电О璁剧疆瑙勫垯 + * 鏈�澶氬彲璁剧疆16涓眽瀛楋紝鍙缃惈鏈変腑鏂囥�佽嫳鏂囥�佹暟瀛椼�佺鍙风粍鍚堢殑鏄电О锛屼絾涓嶅缓璁缃壒娈婂瓧绗︺�� + * 娓╅Θ鎻愮ず锛�1涓鍙风浉褰撲簬涓�涓眽瀛楋紝2涓暟瀛�/鑻辨枃鐩稿綋浜�1涓眽瀛楋紱 + */ + public static final String DEAFAULT_KEYWORD = "榛樿鍏ㄥ眬鍏抽敭瀛楀洖澶嶇敤鏄电О-璇峰嬁淇敼"; + public static final String DEAFAULT_WELCOME = "榛樿缇ゆ杩庢柊浜虹敤-璇峰嬁淇敼"; + + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/constant/UploadConstant.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/constant/UploadConstant.java new file mode 100644 index 0000000..3155faf --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/constant/UploadConstant.java @@ -0,0 +1,21 @@ +package org.ruoyi.common.wechat.web.constant; + +import com.jfinal.kit.PathKit; + +import java.io.File; + +public class UploadConstant { + + public static final String IMG_FOLD = "img"; + public static final String FILE_FOLD = "file"; + + public static final String IMG_URL = "/"+IMG_FOLD+"/"; + public static final String FILE_URL = "/"+FILE_FOLD+"/"; + + public static final String IMG_PATH = PathKit.getWebRootPath()+ File.separator +IMG_FOLD; + public static final String FILE_PATH = PathKit.getWebRootPath()+ File.separator +FILE_FOLD; + public static final String IMG_PATH_SEP = IMG_PATH + File.separator; + public static final String FILE_PATH_SEP = FILE_PATH + File.separator; + + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/ExtendController.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/ExtendController.java new file mode 100644 index 0000000..dcd0f4e --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/ExtendController.java @@ -0,0 +1,125 @@ +package org.ruoyi.common.wechat.web.controller; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import org.apache.commons.lang3.StringUtils; +import org.ruoyi.common.wechat.itchat4j.core.CoreManage; +import org.ruoyi.common.wechat.itchat4j.utils.enums.SendMsgType; +import org.ruoyi.common.wechat.web.model.WxRobRelation; +import org.ruoyi.common.wechat.web.utils.IpUtil; + +/** + * 瀵瑰鎺ュ彛 + * @author WesleyOne + * @create 2018/12/16 + */ +public class ExtendController extends _BaseController { + + + /** + * 瀵瑰閫氱敤瑙勫垯鍙戞秷鎭� + * 鍙傛暟: + * ok 澶栨帴鍞竴鐮� + * msg 娑堟伅鍒楄〃 + * 绫诲瀷鍙傝�傽see org.ruoyi.common.wechat.itchat4j.utils.enums.SendMsgType + * TEXT 鏂囨湰娑堟伅涓� + * IMG 鍥剧墖鍚嶄覆锛堥渶瑕佸悗鍙�-閫氱敤宸ュ叿-涓婁紶鑾峰彇锛� + * FILE 鏂囦欢鍚嶄覆锛堥渶瑕佸悗鍙�-閫氱敤宸ュ叿-涓婁紶鑾峰彇锛� + * 渚嬪瓙: + * {"ok":"test123", + * "msg":[ + * {"type":"TEXT","body":"鎴戞槸娑堟伅浣�"}, + * {"type":"IMG","body":"ty6yLk3X_1545142908614.jpg"}, + * {"type":"FILE","body":"ty6yLk3X_1545142537914.txt"}, + * ] + * } + * + * 璇存槑: + * 鍙戦�侀『搴忔寜鐓у垪琛ㄩ『搴忎粠鍓嶅線鍚庡彂 + * + * 杩斿洖: + * 00 鎴愬姛 + * 01 澶栨帴鐮佷笉瀛樺湪 + * 02 澶栨帴鐮佸け鏁� + * 03 IP鏈�氳繃瀹℃牳 + * + */ + public void sendMsg(){ + + JSONObject postParam = getPostParam(); + String outKey = postParam.getString("ok"); + String msgStr = postParam.getString("msg"); + JSONArray msgs = JSONArray.parseArray(msgStr); + + if (StringUtils.isEmpty(outKey)){ + setCode("01"); + setMsg("澶栨帴鐮佷笉瀛樺湪"); + renderJson(); + return; + } + + WxRobRelation relationRecord = WxRobRelation.dao.findFirst("SELECT * FROM wx_rob_relation WHERE out_key = ? LIMIT 1", outKey); + + /** + * 鏍¢獙IP + * 1.閰嶇疆绌哄垯鎷掔粷鎵�鏈� + * 2.瀛樺湪0.0.0.0涓嶆牎楠� + */ + String whiteList = relationRecord.getWhiteList(); + if (StringUtils.isEmpty(whiteList) || !relationRecord.getEnable()){ + setCode("02"); + setMsg("澶栨帴鐮佸け鏁堟垨鏈厤缃櫧鍚嶅崟"); + renderJson(); + return; + } + String allPassIp = "0.0.0.0"; + // 涓嶆槸瀹屽叏寮�鏀綢P骞朵笖璁块棶IP涓嶅瓨鍦� + if (!whiteList.contains(allPassIp)){ + String outRealIp = IpUtil.getRealIp(getRequest()); + if (!whiteList.contains(outRealIp)){ + setCode("03"); + setMsg("IP鏈�氳繃瀹℃牳"); + renderJson(); + return; + } + } + + String uniqueKey = relationRecord.getUniqueKey(); + // 鏌ョ湅鏈哄櫒鏄惁鍔犺浇瀹屾垚 + if (!CoreManage.getInstance(uniqueKey).isAlive() || !CoreManage.getInstance(uniqueKey).isFinishInit()){ + setCode("05"); + setMsg("鏈哄櫒鏈噯澶囧畬鎴�"); + renderJson(); + return; + } + + + /** + * 娣诲姞鍒版秷鎭槦鍒� + */ + Boolean toGroup = relationRecord.getToGroup(); + String nickName = relationRecord.getNickName(); + // 鍗曟璇锋眰鏈�澶ф秷鎭暟 + int maxMessages = 10; + int msgLength = msgs.size(); + if (msgLength<maxMessages){ + maxMessages = msgLength; + } + // 鍒拌繖涓�姝ラ粯璁よ繑鍥炴垚鍔� + boolean result = true; + for (int i=0;i<maxMessages;i++){ + JSONObject message = msgs.getJSONObject(i); + String type = message.getString("type"); + String body = message.getString("body"); + + CoreManage.addSendMsg4NickName(uniqueKey,nickName,body,SendMsgType.fromValue(type),toGroup); + } + + if (!result){ + setOperateErr(); + } + + renderJson(); + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/IndexController.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/IndexController.java new file mode 100644 index 0000000..a98e53e --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/IndexController.java @@ -0,0 +1,99 @@ +package org.ruoyi.common.wechat.web.controller; + +import com.jfinal.kit.PropKit; +import org.apache.commons.lang3.RandomStringUtils; +import org.ruoyi.common.wechat.web.annotation.UnCheckLogin; +import org.ruoyi.common.wechat.web.cache.UserSession; + +import java.util.UUID; + +/** + * @author WesleyOne + * @create 2018/7/27 + */ +public class IndexController extends _BaseController { + + public static final String WX_ROB_LOGIN_ = "WX_ROB_LOGIN_"; + + public void index(){ + + setAttr("username",getCookie("uid")); + setAttr("imgdomain",PropKit.get("imgDomain")); + + + renderTemplate("index.html"); + } + + @UnCheckLogin + public void login(){ + redirect("/",false); + // 娴嬭瘯鍏嶇櫥褰� + if (PropKit.getBoolean("devMode")){ + redirect("/loginPost?username=wxwobot&password=wxwobot",true); + return; + } + renderTemplate("login.html"); + } + + /** + * 鐧诲叆 + */ + @UnCheckLogin + public void loginPost(){ + String sid = UUID.randomUUID().toString(); + UserSession.addUserSession("wxwobot",sid); + addCookie("uid","wxwobot",-1); + addCookie("sid",sid,-1); + redirect("/",false); + //return; + + +// String username = getPara("username"); +// String password = getPara("password"); +// if (vldParamNull(username,"鐢ㄦ埛鍚嶄笉鑳戒负绌�")|| +// vldParamNull(password,"瀵嗙爜涓嶈兘涓虹┖")){ +// return; +// } +// +// // 鑾峰彇鐪熷疄瀵嗙爜銆傛澶勪负浜嗘柟渚跨洿鎺ヤ粠閰嶇疆鏂囦欢閲岃幏鍙� +// String pass = PropKit.use("passport.properties").get(username); +// // 娓呮缂撳瓨,鍙互淇敼閰嶇疆鏂囦欢鐩存帴淇敼 +// PropKit.useless("passport.properties"); +// +// if (StringUtils.isNotEmpty(password) && pass != null && pass.equals(MD5Util.MD5Encrypt(password))){ +// +// //String sid = UUID.randomUUID().toString(); +// UserSession.addUserSession(username,sid); +// addCookie("uid",username,-1); +// addCookie("sid",sid,-1); +// redirect("/",false); +// return; +// }else { +// setAttr("error","璐﹀彿瀵嗙爜涓嶆纭�"); +// renderTemplate("login.html"); +// } + } + + @UnCheckLogin + public void logout(){ + String uid = getUid(); + if (uid!=null){ + UserSession.delUserSession(uid); + } + redirect("/login",false); + } + + /** + * 娓稿鐧诲綍 + */ + @UnCheckLogin + public void visitLogin() { + String visitName = RandomStringUtils.randomAlphabetic(5); + String sid = UUID.randomUUID().toString(); + UserSession.addUserSession(visitName,sid); + addCookie("uid",visitName,-1); + addCookie("sid",sid,-1); + redirect("/",false); + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/KeyWordController.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/KeyWordController.java new file mode 100644 index 0000000..2e68dd2 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/KeyWordController.java @@ -0,0 +1,191 @@ +package org.ruoyi.common.wechat.web.controller; + +import com.alibaba.fastjson.JSONObject; +import com.jfinal.plugin.activerecord.Page; +import com.jfinal.render.JsonRender; +import org.apache.commons.lang3.StringUtils; +import org.ruoyi.common.wechat.itchat4j.api.WechatTools; +import org.ruoyi.common.wechat.web.enums.KeyMsgValueType; +import org.ruoyi.common.wechat.web.model.WxRobKeyword; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * TODO 鍏抽敭璇嶆搷浣� + * @author WesleyOne + * @create 2018/12/16 + */ +public class KeyWordController extends _BaseController{ + + public void index(){ + + String uniqueKey = getPara("uk"); + if (StringUtils.isNotEmpty(uniqueKey)){ + setAttr("search_uk",uniqueKey); + } + setAttr("keys",KeyMsgValueType.LIST_KV); + renderTemplate("index.html"); + } + + + public void list(){ + int rows = getParaToInt("limit", 10); + int pageNum = getPageNum(getParaToInt("offset", 1), rows); + String uniqueKey = getPara("uniqueKey"); + String keyData = getPara("keyData"); + String nickName = getPara("nickName"); + String typeData = getPara("typeData"); + Boolean enable = getParaToBoolean("enable"); + Boolean togrp = getParaToBoolean("togrp"); + + String where = " where 1=1 "; + if (StringUtils.isNotEmpty(uniqueKey)){ + where += " and unique_key = '"+uniqueKey + "' "; + } + if (StringUtils.isNotEmpty(keyData)) { + where += " and key_data LIKE '" + keyData + "%' "; + } + if (StringUtils.isNotEmpty(nickName)) { + where += " and nick_name LIKE '" + nickName + "%' "; + } + if (KeyMsgValueType.fromValue(typeData) != null){ + where += " and type_data = '" + typeData + "' "; + } + if (enable != null){ + + where += " and enable = " + (enable?1:0); + } + if (togrp != null){ + where += " and to_group = " + (togrp?1:0); + } + + Page<WxRobKeyword> page = WxRobKeyword.dao.paginate(pageNum, rows, "select * ", + " from wx_rob_keyword "+where); + + setAttrs(buildPagination(page.getList(), page.getTotalRow())); + render(new JsonRender().forIE()); + } + + public void editIndex(){ + Integer kid = getParaToInt("kid"); + WxRobKeyword kwRecord; + boolean isEdit = true; + List<String> groupNickNames = new ArrayList<>(); + if (kid != null){ + kwRecord = WxRobKeyword.dao.findById(kid); + }else{ + isEdit = false; + kwRecord = new WxRobKeyword(); + String uniqueKey = getPara("uk"); + if (StringUtils.isNotEmpty(uniqueKey)){ + kwRecord.setUniqueKey(uniqueKey); + groupNickNames.addAll(WechatTools.getGroupNickNameList(uniqueKey)); + } + // 榛樿鏄剧ず鏂囨湰 + kwRecord.setTypeData(KeyMsgValueType.TEXT.toValue()); + } + setAttr("isEdit",isEdit); + setAttr("form",kwRecord); + + setAttr("keys",KeyMsgValueType.LIST_KV); + setAttr("groupNickNames",groupNickNames); + renderTemplate("editIndex.html"); + } + + /** + * 鏂板淇敼 + */ + public void editKeyWord(){ + JSONObject postParam = getPostParam(); + Long id = postParam.getLong("kid"); + String uniqueKey = postParam.getString("uniqueKey"); + String keyData = postParam.getString("keyData"); + String valueData = postParam.getString("valueData"); + String nickName = postParam.getString("nickName"); + String typeData = postParam.getString("typeData"); + Boolean enable = postParam.getBoolean("enable"); + Boolean toGroup = postParam.getBoolean("toGroup"); + + WxRobKeyword editRecord = new WxRobKeyword(); + + if (StringUtils.isNotEmpty(keyData)){ + editRecord.setKeyData(keyData); + } + if (StringUtils.isNotEmpty(valueData)){ + editRecord.setValueData(valueData); + } + if (StringUtils.isNotEmpty(nickName)){ + editRecord.setNickName(nickName); + } + if (KeyMsgValueType.fromValue(typeData) != null){ + editRecord.setTypeData(typeData); + }else { + editRecord.setTypeData(KeyMsgValueType.TEXT.toValue()); + } + if (enable != null){ + editRecord.setEnable(enable); + } + if (toGroup != null){ + editRecord.setToGroup(toGroup); + } + + if (id != null){ + editRecord.setId(id); + boolean update = editRecord.update(); + if (update){ + setMsg("淇敼鎴愬姛"); + }else{ + setOperateErr("淇敼澶辫触"); + } + }else{ + // 鏍¢獙 + editRecord.setUniqueKey(uniqueKey); + editRecord.setCreateTime(new Date()); + editRecord.setEnable(true); + if (vldParamNull(editRecord.getUniqueKey(),"鍞竴鐮佷笉鑳戒负绌�")){ + return; + } + if (vldParamNull(editRecord.getKeyData(),"鍏抽敭瀛椾笉鑳戒负绌�")){ + return; + } + if (vldParamNull(editRecord.getValueData(),"鍐呭涓嶈兘涓虹┖")){ + return; + } + if (vldParamNull(editRecord.getTypeData(),"鍐呭绫诲瀷涓嶈兘涓虹┖")){ + return; + } + if (vldParamNull(editRecord.getNickName(),"鏄电О涓嶈兘涓虹┖")){ + return; + } + if (vldParamNull(editRecord.getToGroup(),"缇よ亰濂藉弸鏈�夋嫨")){ + return; + } + boolean save = editRecord.save(); + if (save){ + setMsg("鏂板鎴愬姛"); + }else{ + setOperateErr("鏂板澶辫触"); + } + } + renderJson(); + } + + /** + * 鍒犻櫎鍏抽敭瀛� + */ + public void delKeyWord(){ + + String kid = getPara("kid"); + boolean delete = WxRobKeyword.dao.deleteById(kid); + if (delete){ + setMsg("鍒犻櫎鎴愬姛"); + }else{ + setOperateErr("鍒犻櫎澶辫触"); + } + renderJson(); + } + + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/RelateController.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/RelateController.java new file mode 100644 index 0000000..139d272 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/RelateController.java @@ -0,0 +1,179 @@ +package org.ruoyi.common.wechat.web.controller; + +import com.alibaba.fastjson.JSONObject; +import com.jfinal.plugin.activerecord.Page; +import com.jfinal.render.JsonRender; +import org.apache.commons.lang3.StringUtils; +import org.ruoyi.common.wechat.itchat4j.api.WechatTools; +import org.ruoyi.common.wechat.web.model.WxRobRelation; +import org.ruoyi.common.wechat.web.utils.UUIDShortUtil; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * TODO 鍏宠仈閰嶇疆 + * @author WesleyOne + * @create 2018/12/16 + */ +public class RelateController extends _BaseController { + + public void index(){ + String outKey = getPara("ok"); + if (StringUtils.isNotEmpty(outKey)){ + setAttr("search_ok",outKey); + } + String searchUk = getPara("uk"); + if (StringUtils.isNotEmpty(searchUk)){ + setAttr("search_uk",searchUk); + } + renderTemplate("index.html"); + } + + public void list(){ + int rows = getParaToInt("limit", 10); + int pageNum = getPageNum(getParaToInt("offset", 1), rows); + String outKey = getPara("outKey"); + String uniqueKey = getPara("uniqueKey"); + String nickName = getPara("nickName"); + Boolean enable = getParaToBoolean("enable"); + Boolean togrp = getParaToBoolean("togrp"); + + String where = " where 1=1 "; + if (StringUtils.isNotEmpty(outKey)) { + where += " and out_key = '" + outKey + "' "; + } + if (StringUtils.isNotEmpty(uniqueKey)){ + where += " and unique_key = '"+uniqueKey + "' "; + } + if (StringUtils.isNotEmpty(nickName)) { + where += " and nick_name LIKE '" + nickName + "%' "; + } + if (enable != null){ + where += " and enable = " + (enable?1:0); + } + if (togrp != null){ + where += " and to_group = " + (togrp?1:0); + } + + Page<WxRobRelation> page = WxRobRelation.dao.paginate(pageNum, rows, "select * ", + " from wx_rob_relation "+where); + + setAttrs(buildPagination(page.getList(), page.getTotalRow())); + render(new JsonRender().forIE()); + } + + public void editIndex(){ + Integer kid = getParaToInt("kid"); + WxRobRelation wxRobRelation; + boolean isEdit = true; + List<String> groupNickNames = new ArrayList<>(); + if (kid != null){ + wxRobRelation = WxRobRelation.dao.findById(kid); + }else{ + isEdit = false; + wxRobRelation = new WxRobRelation(); + String uniqueKey = getPara("uk"); + String nickName = getPara("nk"); + Boolean toGroup = getParaToBoolean("tgb"); + if (StringUtils.isNotEmpty(uniqueKey)){ + wxRobRelation.setUniqueKey(uniqueKey); + groupNickNames.addAll(WechatTools.getGroupNickNameList(uniqueKey)); + } + if (StringUtils.isNotEmpty(nickName)){ + wxRobRelation.setNickName(nickName); + } + if (toGroup != null){ + wxRobRelation.setToGroup(toGroup); + }else{ + wxRobRelation.setToGroup(true); + } + } + setAttr("isEdit",isEdit); + setAttr("form",wxRobRelation); + setAttr("groupNickNames",groupNickNames); + renderTemplate("editIndex.html"); + } + + /** + * 缂栬緫澶栭儴id鍏宠仈 + */ + public void editRelate(){ + JSONObject postParam = getPostParam(); + Long id = postParam.getLong("kid"); + String uniqueKey = postParam.getString("uniqueKey"); + String nickName = postParam.getString("nickName"); + String whiteList = postParam.getString("whiteList"); + Boolean enable = postParam.getBoolean("enable"); + Boolean toGroup = postParam.getBoolean("toGroup"); + + WxRobRelation editRecord = new WxRobRelation(); + + if (StringUtils.isNotEmpty(nickName)){ + editRecord.setNickName(nickName); + } + if (enable != null){ + editRecord.setEnable(enable); + } + if (toGroup != null){ + editRecord.setToGroup(toGroup); + } + if (StringUtils.isNotEmpty(whiteList)){ + editRecord.setWhiteList(whiteList); + } + + if (id != null){ + editRecord.setId(id); + boolean update = editRecord.update(); + if (update){ + setMsg("淇敼鎴愬姛"); + }else{ + setOperateErr("淇敼澶辫触"); + } + }else{ + // 鏍¢獙 + editRecord.setUniqueKey(uniqueKey); + editRecord.setCreateTime(new Date()); + editRecord.setEnable(true); + if (vldParamNull(editRecord.getUniqueKey(),"鍞竴鐮佷笉鑳戒负绌�")){ + return; + } + if (vldParamNull(editRecord.getNickName(),"鏄电О涓嶈兘涓虹┖")){ + return; + } + if (vldParamNull(editRecord.getToGroup(),"缇よ亰濂藉弸鏈�夋嫨")){ + return; + } + + boolean isSuccess = false; + int maxTime = 5; + while (!isSuccess && maxTime >0){ + String outKey = UUIDShortUtil.generateShortUuid(); + editRecord.setOutKey(outKey); + isSuccess = editRecord.save(); + maxTime--; + } + if (isSuccess){ + setMsg("鏂板鎴愬姛"); + }else{ + setOperateErr("鏂板澶辫触"); + } + } + renderJson(); + } + + /** + * 鍒犻櫎澶栭儴id鍏宠仈 + */ + public void delRelate(){ + String kid = getPara("kid"); + boolean delete = WxRobRelation.dao.deleteById(kid); + if (delete){ + setMsg("鍒犻櫎鎴愬姛"); + }else{ + setOperateErr("鍒犻櫎澶辫触"); + } + renderJson(); + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/RobotController.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/RobotController.java new file mode 100644 index 0000000..56e122b --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/RobotController.java @@ -0,0 +1,223 @@ +package org.ruoyi.common.wechat.web.controller; + +import cn.hutool.core.collection.CollectionUtil; +import com.alibaba.fastjson.JSONObject; +import com.jfinal.plugin.activerecord.Db; +import com.jfinal.plugin.activerecord.Page; +import com.jfinal.plugin.activerecord.Record; +import com.jfinal.render.JsonRender; +import org.apache.commons.lang3.StringUtils; +import org.ruoyi.common.wechat.itchat4j.core.Core; +import org.ruoyi.common.wechat.itchat4j.core.CoreManage; +import org.ruoyi.common.wechat.web.base.BaseException; +import org.ruoyi.common.wechat.web.model.WxRobConfig; +import org.ruoyi.common.wechat.web.utils.UUIDShortUtil; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * 鏈哄櫒浜虹浉鍏崇鐞嗘帴鍙� + * @author WesleyOne + * @create 2018/12/16 + */ +public class RobotController extends _BaseController { + + /** + * 鏈哄櫒浜洪〉闈� + */ + public void index(){ + renderTemplate("index.html"); + } + + /** + * 鏈哄櫒浜哄垪琛� + * 鍒嗛〉锛屾悳绱㈡潯浠� + */ + public void list(){ + int rows = getParaToInt("limit", 10); + int pageNum = getPageNum(getParaToInt("offset", 1), rows); + String searchUniqueKey = getPara("uniqueKey"); + String remark = getPara("remark"); + Boolean enable = getParaToBoolean("enable"); + String where = " where 1=1 "; + if (StringUtils.isNotEmpty(searchUniqueKey)){ + where += " and unique_key = '"+searchUniqueKey + "' "; + } + if (StringUtils.isNotEmpty(remark)) { + where += " and remark like '" + remark + "%' "; + } + if (enable != null){ + where += " and enable = " + (enable?1:0); + } + + Page<WxRobConfig> page = WxRobConfig.dao.paginate(pageNum, rows, "select * ", + " from wx_rob_config "+where); + //鍏朵粬澶勭悊 + List<WxRobConfig> dataList = page.getList(); + if (CollectionUtil.isNotEmpty(dataList)){ + for (WxRobConfig conf: dataList){ + // 鑾峰彇鏈哄櫒浜虹姸鎬� + String uniqueKey = conf.getUniqueKey(); + conf.setActive(CoreManage.isActive(uniqueKey)); + } + } + + setAttrs(buildPagination(dataList, page.getTotalRow())); + render(new JsonRender().forIE()); + } + + /** + * 鏈哄櫒浜洪〉闈� + */ + public void addIndex(){ + renderTemplate("addIndex.html"); + } + + /** + * 娣诲姞鏈哄櫒浜� + */ + public void addRob(){ + JSONObject postParam = getPostParam(); + String remark = postParam.getString("remark"); + + if (vldParamNull(remark,"寰俊鍙蜂笉鑳戒负绌�")){ + return; + } + + Record remarkRecord = Db.findFirst("SELECT remark FROM wx_rob_config WHERE remark = ? LIMIT 1", remark); + if (vldParamNull(remarkRecord != null,"澶囨敞宸插瓨鍦�")){ + return; + } + WxRobConfig bean = new WxRobConfig(); + bean.setRemark(remark) + .setCreateTime(new Date()) + .setUpdateTime(new Date()) + .setToFriend(false) + .setToGroup(true) + .setFromOut(false) + .setDefaultFriend(false) + .setDefaultGroup(false); + + boolean isSuccess = false; + int maxTime = 5; + while (!isSuccess && maxTime >0){ + String uniKey = UUIDShortUtil.generateShortUuid(); + bean.setUniqueKey(uniKey); + isSuccess = bean.save(); + maxTime--; + } + + if (!isSuccess){ + setOperateErr(); + }else{ + setData(bean); + } + renderJson(); + } + + /** + * 鏈哄櫒浜哄惎鍔ㄧ姝㈠紑鍏筹紝鍙戦�佺兢鑱婂紑鍏筹紝鍙戦�佸ソ鍙嬪紑鍏�,瀵瑰鎺ュ彛娑堟伅寮�鍏� + */ + public void change(){ + JSONObject postParam = getPostParam(); + Long id = postParam.getLong("rid"); + String type = postParam.getString("type"); + Boolean state = postParam.getBoolean("state"); + + if (id == null || StringUtils.isEmpty(type) || state == null){ + setOperateErr(); + renderJson(); + return; + } + + WxRobConfig config = new WxRobConfig(); + config.setId(id); + if ("enable".equals(type)){ + config.setEnable(state); + }else if ("tofrd".equals(type)){ + config.setToFriend(state); + }else if ("togrp".equals(type)){ + config.setToGroup(state); + }else if ("fromout".equals(type)) { + config.setFromOut(state); + }else if ("default_group".equals(type)){ + config.setDefaultGroup(state); + }else if ("default_friend".equals(type)){ + config.setDefaultFriend(state); + }else { + setOperateErr("闈炴硶鎿嶄綔"); + render(new JsonRender().forIE()); + return; + } + + config.setUpdateTime(new Date()); + boolean update = config.update(); + if (!update){ + setOperateErr(); + }else{ + setData(update); + } + renderJson(); + } + + /** + * 淇敼澶囨敞 + */ + public void changeRemark(){ + JSONObject postParam = getPostParam(); + Long id = postParam.getLong("rid"); + String remark = postParam.getString("remark"); + if (vldParamNull(id,"ID涓嶈兘涓虹┖")){ + return; + } + if (vldParamNull(remark,"澶囨敞涓嶈兘涓虹┖")){ + return; + } + + Record remarkRecord = Db.findFirst("SELECT remark FROM wx_rob_config WHERE remark = ? LIMIT 1", remark); + if (vldParamNull(remarkRecord != null,"澶囨敞宸插瓨鍦�")){ + return; + } + WxRobConfig config = new WxRobConfig(); + config.setId(id); + config.setRemark(remark); + boolean update = config.update(); + if (!update){ + setOperateErr(); + }else{ + setData(update); + } + renderJson(); + } + + /** + * 鍙戦�侀〉闈� + */ + public void sendIndex() throws BaseException { + String uniqueKey = getUniqueKey(); + Core core = CoreManage.getInstance(uniqueKey); + List<JSONObject> sourceSendList = new ArrayList<>(); + sourceSendList.addAll( core.getGroupList()); + sourceSendList.addAll( core.getContactList()); + List<JSONObject> targetList = new ArrayList<>(); + JSONObject filehelper = new JSONObject(); + filehelper.put("UserName","filehelper"); + filehelper.put("NickName","鏂囦欢浼犺緭鍔╂墜"); + targetList.add(filehelper); + for (JSONObject jsonObject : sourceSendList) { + JSONObject newObject = new JSONObject(); + if (StringUtils.isEmpty(jsonObject.getString("NickName"))){ + continue; + } + newObject.put("NickName",jsonObject.getString("NickName")); + newObject.put("UserName",jsonObject.getString("UserName")); + targetList.add(newObject); + } + setAttr("uniqueKey",uniqueKey); + setAttr("targetList",targetList); + renderTemplate("sendIndex.html"); + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/RobotWorkController.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/RobotWorkController.java new file mode 100644 index 0000000..3fdcd5d --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/RobotWorkController.java @@ -0,0 +1,179 @@ +package org.ruoyi.common.wechat.web.controller; + +import com.alibaba.fastjson.JSONObject; +import org.ruoyi.common.wechat.itchat4j.api.WechatTools; +import org.ruoyi.common.wechat.itchat4j.controller.LoginController; +import org.ruoyi.common.wechat.itchat4j.core.CoreManage; +import org.ruoyi.common.wechat.itchat4j.service.impl.LoginServiceImpl; +import org.ruoyi.common.wechat.itchat4j.utils.enums.SendMsgType; +import org.ruoyi.common.wechat.web.base.BaseException; + +import java.io.IOException; +import java.util.List; + +/** + * @author WesleyOne + * @create 2018/12/16 + */ +public class RobotWorkController extends _BaseController { + + /** + * 鑾峰彇鐘舵�� + * @throws BaseException + */ + public void getStatus() throws BaseException { + String uniqueKey = getUniqueKey(); + boolean wechatStatus = WechatTools.getWechatStatus(uniqueKey); + setData(wechatStatus); + renderJson(); + } + + /** + * 鐧诲綍绗竴姝ワ紝鑾峰彇浜岀淮鐮侀摼鎺� + * @throws BaseException + */ + public void getQr() throws BaseException, IOException { + String uniqueKey = getUniqueKey(); + LoginController login = new LoginController(uniqueKey); + String qrSrc = login.login_1(); + setData(qrSrc); + renderJson(); + } + + /** + * 鐧诲綍绗簩姝�,纭鐧诲綍鐘舵�� + * @throws BaseException + */ + public void login() throws BaseException { + String uniqueKey = getUniqueKey(); + LoginController login = new LoginController(uniqueKey); + boolean result = login.login_2(); + if (result){ + + }else{ + setOperateErr(); + } + renderJson(); + } + + /** + * 鐧诲綍绗笁姝ワ紝纭鐧诲綍鍙婂垵濮嬪寲淇℃伅 + * @throws BaseException + */ + public void init() throws BaseException { + String uniqueKey = getUniqueKey(); + LoginController login = new LoginController(uniqueKey); + boolean loginResult = login.login_3(); + if (loginResult){ + setMsg("鐧诲綍鎴愬姛"); + }else{ + setMsg("鐧诲綍澶辫触锛屽叧闂簩缁寸爜鍚庨噸鏂版墦寮�"); + } + renderJson(); + } + + /** + * 閫�鍑� + * @throws BaseException + */ + public void logout() throws BaseException { + String uniqueKey = getUniqueKey(); + WechatTools.logout(uniqueKey); + renderJson(); + } + + /** + * 鑾峰彇缇ゆ樀绉� + */ + public void getGroupNickNames() throws BaseException { + String uniqueKey = getUniqueKey(); + List<String> groupNickNameList = WechatTools.getGroupNickNameList(uniqueKey); + setData(groupNickNameList); + renderJson(); + } + + /** + * 鑾峰彇濂藉弸鏄电О + */ + public void getContactNickNames() throws BaseException { + String uniqueKey = getUniqueKey(); + List<String> contactNickNameList = WechatTools.getContactNickNameList(uniqueKey); + setData(contactNickNameList); + renderJson(); + } + + public void getGroups() throws BaseException { + String uniqueKey = getUniqueKey(); + List<JSONObject> groupList = WechatTools.getGroupList(uniqueKey); + setData(groupList); + renderJson(); + } + + public void getContacts() throws BaseException { + String uniqueKey = getUniqueKey(); + List<JSONObject> contactList = WechatTools.getContactList(uniqueKey); + setData(contactList); + renderJson(); + } + + public void getCore() throws BaseException { + String uniqueKey = getUniqueKey(); + setData(CoreManage.getInstance(uniqueKey)); + renderJson(); + } + + /** + * 寮哄埗鍒锋柊閫氳褰� + */ + public void gct() throws BaseException { + String uniqueKey = getUniqueKey(); + LoginServiceImpl loginService = new LoginServiceImpl(uniqueKey); + loginService.webWxGetContact(); + renderJson(); + } + + /** + * 鍒锋柊閫氳褰曡鎯� + * @throws BaseException + */ + public void ggp() throws BaseException { + String uniqueKey = getUniqueKey(); + LoginServiceImpl loginService = new LoginServiceImpl(uniqueKey); + loginService.WebWxBatchGetContact(); + renderJson(); + } + + /** + * 閲嶅惎 + * @throws BaseException + */ + public void reboot() throws BaseException { + String uniqueKey = getUniqueKey(); + LoginController login = new LoginController(uniqueKey); + boolean loginResult = login.reboot(); + setData(loginResult); + renderJson(); + } + + + /** + * 鎵嬪姩澶囦唤鐑櫥褰曚俊鎭� + */ + public void manualCopy(){ + CoreManage.persistence(); + renderJson(); + } + + public void testSend() throws BaseException { + + JSONObject postParam = getPostParam(); + String uniqueKey = postParam.getString("uniqueKey"); + String data = postParam.getString("valueData"); + String userName = postParam.getString("userName"); + String typeData = postParam.getString("typeData"); + + CoreManage.addSendMsg4UserName(uniqueKey,userName,data, SendMsgType.fromValue(typeData)); + renderJson(); + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/ToolController.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/ToolController.java new file mode 100644 index 0000000..904b378 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/ToolController.java @@ -0,0 +1,14 @@ +package org.ruoyi.common.wechat.web.controller; + +/** + * 閫氱敤宸ュ叿 + * @author WesleyOne + * @create 2018/12/24 + */ +public class ToolController extends _BaseController { + + public void index(){ + renderTemplate("index.html"); + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/UploadController.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/UploadController.java new file mode 100644 index 0000000..c694b75 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/UploadController.java @@ -0,0 +1,47 @@ +package org.ruoyi.common.wechat.web.controller; + +import com.jfinal.upload.UploadFile; +import org.ruoyi.common.wechat.web.constant.UploadConstant; + +import java.io.File; + +/** + * @author WesleyOne + * @create 2018/12/14 + */ +public class UploadController extends _BaseController { + + + public void img2local(){ + UploadFile file = getFile(); + + String fn = getPara("fn", ""); + String originalFileName = file.getOriginalFileName(); + int i = file.getOriginalFileName().lastIndexOf(".")+1; + String fileType = originalFileName.substring(i); + String fileName = fn + "_" + System.currentTimeMillis() + "." + fileType; + String newFilePath = UploadConstant.IMG_PATH+File.separator+fileName; + file.getFile().renameTo(new File(newFilePath)); + + setAttr("name",fileName); + + renderJson(); + } + + public void file2local(){ + UploadFile file = getFile(); + + String fn = getPara("fn", ""); + String originalFileName = file.getOriginalFileName(); + int i = file.getOriginalFileName().lastIndexOf(".")+1; + String fileType = originalFileName.substring(i); + String fileName = fn + "_" + System.currentTimeMillis() + "." + fileType; + String newFilePath = UploadConstant.FILE_PATH+File.separator+fileName; + file.getFile().renameTo(new File(newFilePath)); + + setAttr("name",fileName); + + renderJson(); + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/_BaseController.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/_BaseController.java new file mode 100644 index 0000000..f1c5c21 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/controller/_BaseController.java @@ -0,0 +1,199 @@ +package org.ruoyi.common.wechat.web.controller; + +import com.alibaba.fastjson.JSONObject; +import com.jfinal.core.Controller; +import com.jfinal.core.NotAction; +import com.jfinal.kit.HttpKit; +import com.jfinal.kit.StrKit; +import org.apache.commons.lang3.StringUtils; +import org.ruoyi.common.wechat.web.base.BaseError; +import org.ruoyi.common.wechat.web.base.BaseException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.servlet.http.Cookie; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author WesleyOne + * @create 2018/7/27 + */ +public class _BaseController extends Controller { + + public final Logger LOG = LoggerFactory.getLogger(this.getClass()); + + + /** + * 閫氱敤楠岃瘉 + * @param result true璇存槑楠岃瘉涓嶉�氳繃 + * @param code + * @param errorMsg + */ + @NotAction + public boolean vldParam(boolean result, String code, String errorMsg){ + if (result){ + setAttr("code",code); + setAttr("message",errorMsg); + this.renderJson(); + return true; + } + return false; + } + + @NotAction + public boolean vldParam(boolean result, BaseError baseError){ + if (result){ + return vldParam(true,baseError.getCode(),baseError.getMsg()); + } + return false; + } + + @NotAction + public boolean vldParam(boolean result, String errMsg){ + if (result){ + return vldParam(true,BaseError.NORMAL_ERR.getCode(),errMsg); + } + return false; + } + + /** + * 鍙傛暟闈炵┖鍒ゆ柇 + * @param paramValue + * @param baseError + * @return + */ + @NotAction + public boolean vldParamNull(String paramValue, BaseError baseError){ + if (StrKit.isBlank(paramValue)) { + return vldParam(true,baseError.getCode(),baseError.getMsg()); + } + return false; + } + + @NotAction + public boolean vldParamNull(String paramValue, String errMsg){ + if (StrKit.isBlank(paramValue)) { + return vldParam(true,BaseError.NORMAL_ERR.getCode(),errMsg); + } + return false; + } + + /** + * 鍙傛暟闈炵┖鍒ゆ柇 + * @param paramValue + * @param baseError + * @return + */ + @NotAction + public boolean vldParamNull(Object paramValue, BaseError baseError){ + if (paramValue == null) { + return vldParam(true,baseError.getCode(),baseError.getMsg()); + } + return false; + } + + @NotAction + public boolean vldParamNull(Object paramValue, String errMsg){ + if (paramValue == null) { + return vldParam(true,BaseError.NORMAL_ERR.getCode(),errMsg); + } + return false; + } + + @NotAction + public void setData(Object o){ + this.setAttr("data",o); + } + @NotAction + public void setCount(Object o){ + this.setAttr("_count",o); + } + @NotAction + public void setCode(String code){ + this.setAttr("code",code); + } + @NotAction + public void setMsg(String msg){ + this.setAttr("message",msg); + } + @NotAction + public void setOperateErr(String msg){ + this.setAttr("code",BaseError.OPERATION_ERR.getCode()); + this.setAttr("message",msg); + } + @NotAction + public void setOperateErr(){ + this.setAttr("code",BaseError.OPERATION_ERR.getCode()); + this.setAttr("message",BaseError.OPERATION_ERR.getMsg()); + } + @NotAction + public void setDeleteErr(){ + this.setAttr("code",BaseError.OPERATION_ERR.getCode()); + this.setAttr("message",BaseError.OPERATION_ERR.getMsg()); + } + + @NotAction + public void addCookie(String key,String value,int second) { + Cookie cookie = new Cookie(key,value); + cookie.setMaxAge(second); + cookie.setPath("/"); + setCookie(cookie); + } + + @NotAction + public JSONObject getPostParam(){ + String jsonString= HttpKit.readData(getRequest()); + return JSONObject.parseObject(jsonString); + } + @NotAction + public String getUid(){ + return this.getCookie("uid"); + } + + /** + * 鍒嗛〉澶勭悊 + * @param list + * @param count + * @return + */ + @SuppressWarnings("rawtypes") + @NotAction + protected Map<String, Object> buildPagination(List list, Integer count) { + return buildPagination(list, count, null); + } + + @SuppressWarnings("rawtypes") + @NotAction + protected Map<String, Object> buildPagination(List list, Integer count, + List<Map<String, Object>> footer) { + Map<String, Object> map = new HashMap<String, Object>(4); + map.put("total", count); + map.put("rows", list); + if (footer != null){ + map.put("footer", footer); + } + return map; + } + + @NotAction + protected static int getPageNum(int pageNum,int rows){ + int pageNumber = pageNum / rows + 1; + return pageNumber; + } + + /** + * 鑾峰彇UniqueKey + * @return + */ + @NotAction + public String getUniqueKey() throws BaseException { + String uniqueKey = getPara("_ck", ""); + if (StringUtils.isEmpty(uniqueKey)){ + throw new BaseException("鏈哄櫒鍞竴鐮佷负绌�"); + } + return uniqueKey; + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/enums/KeyMsgValueType.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/enums/KeyMsgValueType.java new file mode 100644 index 0000000..c28609e --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/enums/KeyMsgValueType.java @@ -0,0 +1,45 @@ +package org.ruoyi.common.wechat.web.enums; + +import com.jfinal.plugin.activerecord.Record; + +import java.util.*; +public enum KeyMsgValueType { + + IMG("IMG", "鍥剧墖"), + FILE("FILE", "鏂囦欢"), + TEXT("TEXT", "绾枃鏈�"); + + private String value; + private String name; + + KeyMsgValueType(String value, String name) { + this.value = value; + this.name = name; + } + + private static final Map<String, KeyMsgValueType> lookup = new HashMap<>(); + public static List<Record> LIST_KV = new ArrayList<>(); + + static { + for (KeyMsgValueType s : EnumSet.allOf(KeyMsgValueType.class)) { + lookup.put(s.toValue(), s); + LIST_KV.add(new Record().set("v", s.toValue()).set("n", s.toName())); + } + } + + public String toValue() { + return this.value; + } + + public String toName() { + return this.name; + } + + public static KeyMsgValueType fromValue(String value) { + return lookup.get(value); + } + + public boolean equal(KeyMsgValueType type) { + return type != null && this.toValue().equals(type.toValue()); + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/interceptor/ExceptionInterceptor.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/interceptor/ExceptionInterceptor.java new file mode 100644 index 0000000..bbca0a7 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/interceptor/ExceptionInterceptor.java @@ -0,0 +1,52 @@ +package org.ruoyi.common.wechat.web.interceptor; + +import com.jfinal.aop.Interceptor; +import com.jfinal.aop.Invocation; +import org.ruoyi.common.wechat.web.base.BaseError; +import org.ruoyi.common.wechat.web.base.BaseException; +import org.ruoyi.common.wechat.web.base.BaseResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +/** + * 鍏ㄥ眬寮傚父鎷︽埅 + * @author WesleyOne + * @create 2018/7/28 + */ +public class ExceptionInterceptor implements Interceptor { + + private static final Logger LOG = LoggerFactory.getLogger(ExceptionInterceptor.class); + + @Override + public void intercept(Invocation me) { + try { + me.getController().setAttr("code","00"); + me.getController().setAttr("message","鎿嶄綔鎴愬姛"); + me.invoke(); + } + catch (Exception e) { + LOG.error(e.getMessage(),e); + BaseResponse resp = new BaseResponse(); + Throwable cause = e.getCause(); + String ajax = me.getController().getRequest().getHeader("X-Requested-With"); + //鍒ゆ柇ajax璇锋眰杩樻槸椤甸潰璇锋眰 + if ("XMLHttpRequest".equals(ajax)){ + if (cause instanceof BaseException) { + resp.setCode(((BaseException) cause).getCode()); + resp.setMessage(cause.getMessage()); + } else{ + resp.setCode(BaseError.SYSTEM_ERR.getCode()); + resp.setMessage(BaseError.SYSTEM_ERR.getMsg()); + } + me.getController().renderJson(resp); + return; + }else{ + //榛樿绯荤粺500椤甸潰锛屾坊鍔犵浜屼釜鍙傛暟鍙嚜琛屾坊鍔�500椤甸潰 + me.getController().renderError(500); + return; + } + + } + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/interceptor/VisitLogInterceptor.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/interceptor/VisitLogInterceptor.java new file mode 100644 index 0000000..0b03c8f --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/interceptor/VisitLogInterceptor.java @@ -0,0 +1,79 @@ +package org.ruoyi.common.wechat.web.interceptor; + + +import com.jfinal.aop.Interceptor; +import com.jfinal.aop.Invocation; +import org.ruoyi.common.wechat.web.annotation.UnCheckLogin; +import org.ruoyi.common.wechat.web.cache.UserSession; +import org.ruoyi.common.wechat.web.utils.IpUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; + + +/** + * 绠$悊鍚庡彴鎿嶄綔鏃ュ織 + * @author admin + */ +public class VisitLogInterceptor implements Interceptor { + public static final Logger LOG = LoggerFactory.getLogger(VisitLogInterceptor.class); + + @Override + public void intercept(Invocation inv) { + String requestUrl = inv.getActionKey(); + String uid = inv.getController().getCookie("uid"); + String sid = inv.getController().getCookie("sid"); + String ip = IpUtil.getRealIp(inv.getController().getRequest()); + LOG.info("{} - {} - {} 鎿嶄綔浜� {}",ip,uid,sid,requestUrl); + + inv.getController().setAttr("active",inv.getController().getControllerKey()); + + //鎵惧埌涓嶉渶瑕佺櫥褰曠殑action + Class controllerClass = inv.getController().getClass(); + UnCheckLogin methodOwn = getControllerMethodUnLoginOwn(controllerClass, inv.getMethodName()); + if (methodOwn != null) { + LOG.info("涓嶉渶瑕佺櫥褰�,requestUrl=" + requestUrl); + inv.invoke(); + return; + } + + boolean isLogin = UserSession.checkUserSession(uid,sid); + if (!isLogin){ + //鏈櫥鍏� + inv.getController().redirect("/login",false); + return; + } + + long start = System.currentTimeMillis(); + inv.invoke(); + long l = System.currentTimeMillis() - start; + if (l > 1000*2){ + LOG.warn("璇锋眰 {} ,杩炴帴鏃堕暱 {} ms",requestUrl,l); + } + } + + //--------------浠ヤ笅鏄唴閮ㄦ柟娉�----------- + + private UnCheckLogin getControllerMethodUnLoginOwn(Class controllerClass, String methodName) { + for (Method method : controllerClass.getMethods()) { + if (methodName.equals(method.getName())) { + return getUnLogin(method); + } + } + return null; + } + + private UnCheckLogin getUnLogin(Method method) { + Annotation[] annotations = method.getAnnotations(); + for (Annotation annt : annotations) { + if (annt instanceof UnCheckLogin) { + UnCheckLogin own = (UnCheckLogin) annt; + return own; + } + } + return null; + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/interceptor/VisitLogInterceptor4down.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/interceptor/VisitLogInterceptor4down.java new file mode 100644 index 0000000..61d2ee1 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/interceptor/VisitLogInterceptor4down.java @@ -0,0 +1,26 @@ +package org.ruoyi.common.wechat.web.interceptor; + +import com.jfinal.aop.Interceptor; +import com.jfinal.aop.Invocation; +import org.ruoyi.common.wechat.web.utils.IpUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * 瀵瑰鎺ュ彛璁块棶鏃ュ織 + * @author WesleyOne + * @create 2018/9/25 + */ +public class VisitLogInterceptor4down implements Interceptor { + + public static final Logger LOG = LoggerFactory.getLogger(VisitLogInterceptor4down.class); + + @Override + public void intercept(Invocation inv) { + String ip = IpUtil.getRealIp(inv.getController().getRequest()); + StringBuffer requestURL = inv.getController().getRequest().getRequestURL(); + String queryString = inv.getController().getRequest().getQueryString(); + LOG.info("{} 鎿嶄綔浜� {} {}",ip,requestURL,queryString); + inv.invoke(); + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/WxRobConfig.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/WxRobConfig.java new file mode 100644 index 0000000..280776e --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/WxRobConfig.java @@ -0,0 +1,21 @@ +package org.ruoyi.common.wechat.web.model; + +import org.ruoyi.common.wechat.web.model.base.BaseWxRobConfig; + +/** + * Generated by JFinal. + */ +@SuppressWarnings("serial") +public class WxRobConfig extends BaseWxRobConfig<WxRobConfig> { + public static final WxRobConfig dao = new WxRobConfig().dao(); + + private boolean isActive; + + public boolean isActive() { + return isActive; + } + + public void setActive(boolean active) { + isActive = active; + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/WxRobKeyword.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/WxRobKeyword.java new file mode 100644 index 0000000..aceeac4 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/WxRobKeyword.java @@ -0,0 +1,11 @@ +package org.ruoyi.common.wechat.web.model; + +import org.ruoyi.common.wechat.web.model.base.BaseWxRobKeyword; + +/** + * Generated by JFinal. + */ +@SuppressWarnings("serial") +public class WxRobKeyword extends BaseWxRobKeyword<WxRobKeyword> { + public static final WxRobKeyword dao = new WxRobKeyword().dao(); +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/WxRobRelation.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/WxRobRelation.java new file mode 100644 index 0000000..2f2aff6 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/WxRobRelation.java @@ -0,0 +1,11 @@ +package org.ruoyi.common.wechat.web.model; + +import org.ruoyi.common.wechat.web.model.base.BaseWxRobRelation; + +/** + * Generated by JFinal. + */ +@SuppressWarnings("serial") +public class WxRobRelation extends BaseWxRobRelation<WxRobRelation> { + public static final WxRobRelation dao = new WxRobRelation().dao(); +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/_JFinalDemoGenerator.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/_JFinalDemoGenerator.java new file mode 100644 index 0000000..3502c59 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/_JFinalDemoGenerator.java @@ -0,0 +1,72 @@ +package org.ruoyi.common.wechat.web.model; + +import com.jfinal.kit.PathKit; +import com.jfinal.kit.PropKit; +import com.jfinal.plugin.activerecord.dialect.MysqlDialect; +import com.jfinal.plugin.activerecord.generator.Generator; +import com.jfinal.plugin.druid.DruidPlugin; +import org.ruoyi.common.wechat.web.common.MyConfig; + +import javax.sql.DataSource; + +/** + * 鏈� demo 浠呰〃杈炬渶涓虹矖娴呯殑 jfinal 鐢ㄦ硶锛屾洿涓烘湁浠峰�肩殑瀹炵敤鐨勪紒涓氱骇鐢ㄦ硶 + * 璇﹁ JFinal 淇变箰閮�: http://jfinal.com/club + * + * 鍦ㄦ暟鎹簱琛ㄦ湁浠讳綍鍙樺姩鏃讹紝杩愯涓�涓� main 鏂规硶锛屾瀬閫熷搷搴斿彉鍖栬繘琛屼唬鐮侀噸鏋� + */ +public class _JFinalDemoGenerator { + +// public static DataSource getDataSource() { +//// PropKit.use("appConfig.properties"); +//// DruidPlugin druidPlugin = new DruidPlugin(PropKit.get("jdbcUrl"), PropKit.get("user"), PropKit.get("password").trim(),PropKit.get("jdbcDriverSqlServe")); +//// DruidPlugin druidPlugin = new DruidPlugin("jdbc:mysql://127.0.0.1:3306/wxwobot?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull","root", "root"); +// DruidPlugin druidPlugin = new DruidPlugin("jdbc:mysql://localhost:3306/wxwobot?characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull", +// "root", "root"); +// druidPlugin.start(); +// return druidPlugin.getDataSource(); +// } + public static DataSource getDataSource() { + DruidPlugin druidPlugin = MyConfig.createDruidPlugin(); + druidPlugin.start(); + return druidPlugin.getDataSource(); + } + + public static void main(String[] args) { + PropKit.use("appConfig.properties"); + // base model 鎵�浣跨敤鐨勫寘鍚� + String baseModelPackageName = "org.ruoyi.common.wechat.web.model.base"; + // base model 鏂囦欢淇濆瓨璺緞 + String baseModelOutputDir = PathKit.getWebRootPath() + "/src/main/java/org.ruoyi.common.wechat/web/model/base"; + + // model 鎵�浣跨敤鐨勫寘鍚� (MappingKit 榛樿浣跨敤鐨勫寘鍚�) + String modelPackageName = "org.ruoyi.common.wechat.web.model"; + // model 鏂囦欢淇濆瓨璺緞 (MappingKit 涓� DataDictionary 鏂囦欢榛樿淇濆瓨璺緞) + String modelOutputDir = baseModelOutputDir + "/.."; + + // 鍒涘缓鐢熸垚鍣� + Generator generator = new Generator(getDataSource(), baseModelPackageName, baseModelOutputDir, modelPackageName, modelOutputDir); + // 璁剧疆鏄惁鐢熸垚閾惧紡 setter 鏂规硶 + generator.setGenerateChainSetter(false); + // 娣诲姞涓嶉渶瑕佺敓鎴愮殑琛ㄥ悕 + generator.addExcludedTable(); + // 璁剧疆鏄惁鍦� Model 涓敓鎴� dao 瀵硅薄 + generator.setGenerateDaoInModel(false); + // 璁剧疆鏄惁鐢熸垚閾惧紡 setter 鏂规硶 + generator.setGenerateChainSetter(true); + // 璁剧疆鏄惁鐢熸垚瀛楀吀鏂囦欢 + generator.setGenerateDataDictionary(false); + // 璁剧疆闇�瑕佽绉婚櫎鐨勮〃鍚嶅墠缂�鐢ㄤ簬鐢熸垚modelName銆備緥濡傝〃鍚� "osc_user"锛岀Щ闄ゅ墠缂� "osc_"鍚庣敓鎴愮殑model鍚嶄负 "User"鑰岄潪 OscUser +// generator.setRemovedTableNamePrefixes("t_"); + + generator.setDialect(new MysqlDialect()); + // 鐢熸垚 + generator.generate(); + + } + +} + + + + diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/_MappingKit.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/_MappingKit.java new file mode 100644 index 0000000..9426b06 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/_MappingKit.java @@ -0,0 +1,24 @@ +package org.ruoyi.common.wechat.web.model; + +import com.jfinal.plugin.activerecord.ActiveRecordPlugin; + +/** + * Generated by JFinal, do not modify this file. + * <pre> + * Example: + * public void configPlugin(Plugins me) { + * ActiveRecordPlugin arp = new ActiveRecordPlugin(...); + * _MappingKit.mapping(arp); + * me.add(arp); + * } + * </pre> + */ +public class _MappingKit { + + public static void mapping(ActiveRecordPlugin arp) { + arp.addMapping("wx_rob_config", "id", WxRobConfig.class); + arp.addMapping("wx_rob_keyword", "id", WxRobKeyword.class); + arp.addMapping("wx_rob_relation", "id", WxRobRelation.class); + } +} + diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/base/BaseWxRobConfig.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/base/BaseWxRobConfig.java new file mode 100644 index 0000000..352f051 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/base/BaseWxRobConfig.java @@ -0,0 +1,111 @@ +package org.ruoyi.common.wechat.web.model.base; + +import com.jfinal.plugin.activerecord.IBean; +import com.jfinal.plugin.activerecord.Model; + +/** + * Generated by JFinal, do not modify this file. + */ +@SuppressWarnings({"serial", "unchecked"}) +public abstract class BaseWxRobConfig<M extends BaseWxRobConfig<M>> extends Model<M> implements IBean { + + public M setId(Long id) { + set("id", id); + return (M)this; + } + + public Long getId() { + return getLong("id"); + } + + public M setUniqueKey(String uniqueKey) { + set("unique_key", uniqueKey); + return (M)this; + } + + public String getUniqueKey() { + return getStr("unique_key"); + } + + public M setRemark(String remark) { + set("remark", remark); + return (M)this; + } + + public String getRemark() { + return getStr("remark"); + } + + public M setCreateTime(java.util.Date createTime) { + set("create_time", createTime); + return (M)this; + } + + public java.util.Date getCreateTime() { + return get("create_time"); + } + + public M setUpdateTime(java.util.Date updateTime) { + set("update_time", updateTime); + return (M)this; + } + + public java.util.Date getUpdateTime() { + return get("update_time"); + } + + public M setToFriend(Boolean toFriend) { + set("to_friend", toFriend); + return (M)this; + } + + public Boolean getToFriend() { + return get("to_friend"); + } + + public M setToGroup(Boolean toGroup) { + set("to_group", toGroup); + return (M)this; + } + + public Boolean getToGroup() { + return get("to_group"); + } + + public M setDefaultFriend(Boolean defaultFriend) { + set("default_friend", defaultFriend); + return (M)this; + } + + public Boolean getDefaultFriend() { + return get("default_friend"); + } + + public M setDefaultGroup(Boolean defaultGroup) { + set("default_group", defaultGroup); + return (M)this; + } + + public Boolean getDefaultGroup() { + return get("default_group"); + } + + public M setFromOut(Boolean fromOut) { + set("from_out", fromOut); + return (M)this; + } + + public Boolean getFromOut() { + return get("from_out"); + } + + public M setEnable(Boolean enable) { + set("enable", enable); + return (M)this; + } + + public Boolean getEnable() { + return get("enable"); + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/base/BaseWxRobKeyword.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/base/BaseWxRobKeyword.java new file mode 100644 index 0000000..98e01a1 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/base/BaseWxRobKeyword.java @@ -0,0 +1,93 @@ +package org.ruoyi.common.wechat.web.model.base; + +import com.jfinal.plugin.activerecord.IBean; +import com.jfinal.plugin.activerecord.Model; + +/** + * Generated by JFinal, do not modify this file. + */ +@SuppressWarnings({"serial", "unchecked"}) +public abstract class BaseWxRobKeyword<M extends BaseWxRobKeyword<M>> extends Model<M> implements IBean { + + public M setId(Long id) { + set("id", id); + return (M)this; + } + + public Long getId() { + return getLong("id"); + } + + public M setUniqueKey(String uniqueKey) { + set("unique_key", uniqueKey); + return (M)this; + } + + public String getUniqueKey() { + return getStr("unique_key"); + } + + public M setKeyData(String keyData) { + set("key_data", keyData); + return (M)this; + } + + public String getKeyData() { + return getStr("key_data"); + } + + public M setValueData(String valueData) { + set("value_data", valueData); + return (M)this; + } + + public String getValueData() { + return getStr("value_data"); + } + + public M setTypeData(String typeData) { + set("type_data", typeData); + return (M)this; + } + + public String getTypeData() { + return getStr("type_data"); + } + + public M setNickName(String nickName) { + set("nick_name", nickName); + return (M)this; + } + + public String getNickName() { + return getStr("nick_name"); + } + + public M setToGroup(Boolean toGroup) { + set("to_group", toGroup); + return (M)this; + } + + public Boolean getToGroup() { + return get("to_group"); + } + + public M setEnable(Boolean enable) { + set("enable", enable); + return (M)this; + } + + public Boolean getEnable() { + return get("enable"); + } + + public M setCreateTime(java.util.Date createTime) { + set("create_time", createTime); + return (M)this; + } + + public java.util.Date getCreateTime() { + return get("create_time"); + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/base/BaseWxRobRelation.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/base/BaseWxRobRelation.java new file mode 100644 index 0000000..2c0186b --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/model/base/BaseWxRobRelation.java @@ -0,0 +1,84 @@ +package org.ruoyi.common.wechat.web.model.base; + +import com.jfinal.plugin.activerecord.IBean; +import com.jfinal.plugin.activerecord.Model; + +/** + * Generated by JFinal, do not modify this file. + */ +@SuppressWarnings({"serial", "unchecked"}) +public abstract class BaseWxRobRelation<M extends BaseWxRobRelation<M>> extends Model<M> implements IBean { + + public M setId(Long id) { + set("id", id); + return (M)this; + } + + public Long getId() { + return getLong("id"); + } + + public M setOutKey(String outKey) { + set("out_key", outKey); + return (M)this; + } + + public String getOutKey() { + return getStr("out_key"); + } + + public M setUniqueKey(String uniqueKey) { + set("unique_key", uniqueKey); + return (M)this; + } + + public String getUniqueKey() { + return getStr("unique_key"); + } + + public M setNickName(String nickName) { + set("nick_name", nickName); + return (M)this; + } + + public String getNickName() { + return getStr("nick_name"); + } + + public M setToGroup(Boolean toGroup) { + set("to_group", toGroup); + return (M)this; + } + + public Boolean getToGroup() { + return get("to_group"); + } + + public M setEnable(Boolean enable) { + set("enable", enable); + return (M)this; + } + + public Boolean getEnable() { + return get("enable"); + } + + public M setWhiteList(String whiteList) { + set("white_list", whiteList); + return (M)this; + } + + public String getWhiteList() { + return getStr("white_list"); + } + + public M setCreateTime(java.util.Date createTime) { + set("create_time", createTime); + return (M)this; + } + + public java.util.Date getCreateTime() { + return get("create_time"); + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/Base64Util.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/Base64Util.java new file mode 100644 index 0000000..09dcb9c --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/Base64Util.java @@ -0,0 +1,30 @@ +package org.ruoyi.common.wechat.web.utils; + +import org.apache.commons.codec.binary.Base64; + +/** + * @author WesleyOne + * @create 2018/12/19 + */ +public class Base64Util { + + /** + * 缂栫爜 + * @param source + * @return + */ + public static String encode(String source){ + byte[] result = Base64.encodeBase64(source.getBytes()); + return result.toString(); + } + + /** + * 瑙g爜 + * @param source + * @return + */ + public static String decode(String source){ + byte[] result = Base64.decodeBase64(source); + return result.toString(); + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/IpUtil.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/IpUtil.java new file mode 100644 index 0000000..b9b3073 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/IpUtil.java @@ -0,0 +1,35 @@ +package org.ruoyi.common.wechat.web.utils; + + +import org.apache.commons.lang3.StringUtils; + +import javax.servlet.http.HttpServletRequest; + + +/** + * @author WesleyOne + * @create 2018/11/5 + */ +public class IpUtil { + + /** + * 鑾峰彇鐢ㄦ埛鐪熷疄IP(鍦ㄥ畨闃叉垨澶氬眰浠g悊鍦烘櫙涓�) + * @param request + * @return + */ + public static String getRealIp(HttpServletRequest request) { + String ip = request.getHeader("x-forwarded-for"); + if(StringUtils.isNotEmpty(ip) && !"unKnown".equalsIgnoreCase(ip)){ + //澶氭鍙嶅悜浠g悊鍚庝細鏈夊涓猧p鍊硷紝绗竴涓猧p鎵嶆槸鐪熷疄ip + int index = ip.indexOf(","); + if(index != -1){ + return ip.substring(0,index); + } + } + ip = request.getHeader("X-Real-IP"); + if(StringUtils.isNotEmpty(ip) && !"unKnown".equalsIgnoreCase(ip)){ + return ip; + } + return request.getRemoteAddr(); + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/LRUCache.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/LRUCache.java new file mode 100644 index 0000000..80fc03f --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/LRUCache.java @@ -0,0 +1,26 @@ +package org.ruoyi.common.wechat.web.utils; + +import java.util.LinkedHashMap; + +/** + * @author WesleyOne + * @create 2018/12/12 + */ +public class LRUCache<K,V> extends LinkedHashMap<K,V> { + + private static final long serialVersionUID = 1L; + protected int maxElements; + + public LRUCache(int maxSize) + { + super(maxSize * 4 / 3 , 0.75F, true); + maxElements = maxSize; + } + + @Override + protected boolean removeEldestEntry(java.util.Map.Entry eldest) + { + return size() > maxElements; + } + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/MD5Util.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/MD5Util.java new file mode 100644 index 0000000..1748c30 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/MD5Util.java @@ -0,0 +1,68 @@ +package org.ruoyi.common.wechat.web.utils; + + + +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + +public class MD5Util { + + + private static String byteArrayToHexString(byte b[]) { + StringBuffer resultSb = new StringBuffer(); + for (int i = 0; i < b.length; i++){ + resultSb.append(byteToHexString(b[i])); + } + + return resultSb.toString(); + } + + private static String byteToHexString(byte b) { + int n = b; + if (n < 0){ + n += 256; + } + int d1 = n / 16; + int d2 = n % 16; + return hexDigits[d1] + hexDigits[d2]; + } + + public static String MD5Encode(String origin, String charsetname) { + String resultString = null; + try { + resultString = new String(origin); + MessageDigest md = MessageDigest.getInstance("MD5"); + if (charsetname == null || "".equals(charsetname)){ + resultString = byteArrayToHexString(md.digest(resultString.getBytes())); + } else{ + resultString = byteArrayToHexString(md.digest(resultString.getBytes(charsetname))); + } + } catch (Exception exception) { + } + return resultString; + } + + private static final String hexDigits[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f" }; + + public static String MD5Encrypt(String str) { + String s = str; + if (s == null) { + return null; + } + String value = null; + MessageDigest md5 = null; + try { + md5 = MessageDigest.getInstance("MD5"); + } catch (NoSuchAlgorithmException ex) { + } + //sun.misc.BASE64Encoder baseEncoder = new sun.misc.BASE64Encoder(); + + return value; + } + + public static void main(String[] args) { + System.out.println(MD5Encrypt("wxwobot")); + } + + +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/UUIDShortUtil.java b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/UUIDShortUtil.java new file mode 100644 index 0000000..ae4e476 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/java/org/ruoyi/common/wechat/web/utils/UUIDShortUtil.java @@ -0,0 +1,33 @@ +package org.ruoyi.common.wechat.web.utils; + +import java.util.UUID; + +/** + * + * @author internet + * @create 2018/12/17 + */ +public class UUIDShortUtil { + + private static String[] chars = new String[] { "a", "b", "c", "d", "e", "f", + "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", + "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", + "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", + "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", + "W", "X", "Y", "Z" }; + + /** + * 鐭�8浣� + * @return + */ + public static String generateShortUuid() { + StringBuffer shortBuffer = new StringBuffer(); + String uuid = UUID.randomUUID().toString().replace("-", ""); + for (int i = 0; i < 8; i++) { + String str = uuid.substring(i * 4, i * 4 + 4); + int x = Integer.parseInt(str, 16); + shortBuffer.append(chars[x % 0x3E]); + } + return shortBuffer.toString(); + } +} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/resources/appConfig.properties b/ruoyi-common/ruoyi-common-wechat/src/main/resources/appConfig.properties new file mode 100644 index 0000000..5ccffea --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/resources/appConfig.properties @@ -0,0 +1,7 @@ +jdbcUrl = ${pro.jdbc.agent.url} +user = ${pro.jdbc.agent.username} +password = ${pro.jdbc.agent.password} +devMode = ${pro.devMode} +hotReloadDir = ${pro.hotreload.realpath} +download_path = ${pro.download.path} +log_path = ${log.file.path} diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/resources/passport.properties b/ruoyi-common/ruoyi-common-wechat/src/main/resources/passport.properties new file mode 100644 index 0000000..0e375b7 --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/resources/passport.properties @@ -0,0 +1 @@ +wxwobot = C9ah2BEPliU2EzPV/VAn9Q== \ No newline at end of file diff --git a/ruoyi-common/ruoyi-common-wechat/src/main/resources/undertow.txt b/ruoyi-common/ruoyi-common-wechat/src/main/resources/undertow.txt new file mode 100644 index 0000000..cdcd10b --- /dev/null +++ b/ruoyi-common/ruoyi-common-wechat/src/main/resources/undertow.txt @@ -0,0 +1,51 @@ +# 閰嶇疆 undertow + +undertow.devMode=${pro.undertow.devMode} +undertow.host=${pro.domain.host} +undertow.port=${pro.domain.port} +undertow.contextPath=/ + +undertow.resourcePath=webapp, io.wxwobot.admin/src/main/webapp, src/main/webapp + +# 寮�鍚� gzip 鍘嬬缉 +undertow.gzip.enable=true +# 閰嶇疆鍘嬬缉绾у埆锛岄粯璁ゅ�� -1銆� 鍙厤缃� 1 鍒� 9銆� 1 鎷ユ湁鏈�蹇帇缂╅�熷害锛�9 鎷ユ湁鏈�楂樺帇缂╃巼 +undertow.gzip.level=-1 +# 瑙﹀彂鍘嬬缉鐨勬渶灏忓唴瀹归暱搴� +undertow.gzip.minLength=1024 + +# session 杩囨湡鏃堕棿锛屾敞鎰忓崟浣嶆槸绉� +undertow.session.timeout=1800 +# 鏀寔 session 鐑姞杞斤紝閬垮厤渚濊禆浜� session 鐨勭櫥褰曞瀷椤圭洰鍙嶅鐧诲綍锛岄粯璁ゅ�间负 true銆備粎鐢ㄤ簬 devMode锛岀敓浜х幆澧冩棤褰卞搷 +undertow.session.hotSwap=true + +# 涓嬮潰涓よ鍛戒护鐢熸垚瀵嗛挜搴� +# keytool -genkeypair -validity 3650 -alias club -keyalg RSA -keystore club.jks +# keytool -importkeystore -srckeystore club.jks -destkeystore club.pfx -deststoretype PKCS12 +# 鐢熸垚杩囩▼涓彁绀鸿緭鍏� "鍚嶅瓧涓庡姘�" 鏃惰緭鍏� localhost銆傜敓浜х幆澧冧粠闃块噷浜戜笅杞� tomcat 绫诲瀷鐨勫瘑閽ュ簱 +# +# 鏇磋缁嗙殑 https/ssl 閰嶇疆瑙� jfinal 瀹樻柟鏂囨。 锛歨ttp://www.jfinal.com/doc/1-4 +# +# 鏄惁寮�鍚� ssl +undertow.ssl.enable=false +# ssl 鐩戝惉绔彛鍙凤紝閮ㄧ讲鐜璁剧疆涓� 443 +undertow.ssl.port=443 +# 瀵嗛挜搴撶被鍨嬶紝寤鸿浣跨敤 PKCS12 +undertow.ssl.keyStoreType=PKCS12 +# 瀵嗛挜搴撴枃浠� +undertow.ssl.keyStore=demo.pfx +# 瀵嗛挜搴撳瘑鐮� +undertow.ssl.keyStorePassword=111111 + + +# ssl 寮�鍚椂锛屾槸鍚﹀紑鍚� http2銆傛娴嬭閰嶇疆鏄惁鐢熸晥鍦� chrome 鍦板潃鏍忎腑杈撳叆: chrome://net-internals/#http2 +undertow.http2.enable=true + + +# ssl 寮�鍚椂锛宧ttp 璇锋眰鏄惁閲嶅畾鍚戝埌 https +# undertow.http.toHttps=false +# ssl 寮�鍚椂锛屾槸鍚﹀叧闂� http +# undertow.http.disable=false + + + diff --git a/ruoyi-modules/pom.xml b/ruoyi-modules/pom.xml index 94d0df7..d7696fb 100644 --- a/ruoyi-modules/pom.xml +++ b/ruoyi-modules/pom.xml @@ -20,6 +20,8 @@ <module>ruoyi-demo</module> <module>ruoyi-fusion</module> <module>ruoyi-system</module> + <module>ruoyi-live</module> + <module>ruoyi-knowledge</module> </modules> </project> diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/MailController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/MailController.java deleted file mode 100644 index c6d5fcc..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/MailController.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.xmzs.demo.controller; - -import com.xmzs.common.core.domain.R; -import com.xmzs.common.mail.utils.MailUtils; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.io.File; - - -/** - * 閭欢鍙戦�佹渚� - * - * @author Michelle.Chung - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/demo/mail") -public class MailController { - - /** - * 鍙戦�侀偖浠� - * - * @param to 鎺ユ敹浜� - * @param subject 鏍囬 - * @param text 鍐呭 - */ - @GetMapping("/sendSimpleMessage") - public R<Void> sendSimpleMessage(String to, String subject, String text) { - MailUtils.sendText(to, subject, text); - return R.ok(); - } - - /** - * 鍙戦�侀偖浠讹紙甯﹂檮浠讹級 - * - * @param to 鎺ユ敹浜� - * @param subject 鏍囬 - * @param text 鍐呭 - * @param filePath 闄勪欢璺緞 - */ - @GetMapping("/sendMessageWithAttachment") - public R<Void> sendMessageWithAttachment(String to, String subject, String text, String filePath) { - MailUtils.sendText(to, subject, text, new File(filePath)); - return R.ok(); - } - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/RedisCacheController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/RedisCacheController.java deleted file mode 100644 index ba5caf4..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/RedisCacheController.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.xmzs.demo.controller; - -import com.xmzs.common.core.constant.CacheNames; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.redis.utils.RedisUtils; -import lombok.RequiredArgsConstructor; -import org.springframework.cache.annotation.CacheEvict; -import org.springframework.cache.annotation.CachePut; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.time.Duration; - -/** - * spring-cache 婕旂ず妗堜緥 - * - * @author Lion Li - */ -// 绫荤骇鍒� 缂撳瓨缁熶竴閰嶇疆 -//@CacheConfig(cacheNames = CacheNames.DEMO_CACHE) -@RequiredArgsConstructor -@RestController -@RequestMapping("/demo/cache") -public class RedisCacheController { - - /** - * 娴嬭瘯 @Cacheable - * <p> - * 琛ㄧず杩欎釜鏂规硶鏈変簡缂撳瓨鐨勫姛鑳�,鏂规硶鐨勮繑鍥炲�间細琚紦瀛樹笅鏉� - * 涓嬩竴娆¤皟鐢ㄨ鏂规硶鍓�,浼氬幓妫�鏌ユ槸鍚︾紦瀛樹腑宸茬粡鏈夊�� - * 濡傛灉鏈夊氨鐩存帴杩斿洖,涓嶈皟鐢ㄦ柟娉� - * 濡傛灉娌℃湁,灏辫皟鐢ㄦ柟娉�,鐒跺悗鎶婄粨鏋滅紦瀛樿捣鏉� - * 杩欎釜娉ㄨВ銆屼竴鑸敤鍦ㄦ煡璇㈡柟娉曚笂銆� - * <p> - * 閲嶇偣璇存槑: 缂撳瓨娉ㄨВ涓ヨ皑涓庡叾浠栫瓫閫夋暟鎹姛鑳戒竴璧蜂娇鐢� - * 渚嬪: 鏁版嵁鏉冮檺娉ㄨВ 浼氶�犳垚 缂撳瓨鍑荤┛ 涓� 鏁版嵁涓嶄竴鑷撮棶棰� - * <p> - * cacheNames 鍛藉悕瑙勫垯 鏌ョ湅 {@link CacheNames} 娉ㄩ噴 鏀寔澶氬弬鏁� - */ - @Cacheable(cacheNames = "demo:cache#60s#10m#20", key = "#key", condition = "#key != null") - @GetMapping("/test1") - public R<String> test1(String key, String value) { - return R.ok("鎿嶄綔鎴愬姛", value); - } - - /** - * 娴嬭瘯 @CachePut - * <p> - * 鍔犱簡@CachePut娉ㄨВ鐨勬柟娉�,浼氭妸鏂规硶鐨勮繑鍥炲�紁ut鍒扮紦瀛橀噷闈㈢紦瀛樿捣鏉�,渚涘叾瀹冨湴鏂逛娇鐢� - * 瀹冦�岄�氬父鐢ㄥ湪鏂板鎴栬�呭疄鏃舵洿鏂版柟娉曚笂銆� - * <p> - * cacheNames 鍛藉悕瑙勫垯 鏌ョ湅 {@link CacheNames} 娉ㄩ噴 鏀寔澶氬弬鏁� - */ - @CachePut(cacheNames = CacheNames.DEMO_CACHE, key = "#key", condition = "#key != null") - @GetMapping("/test2") - public R<String> test2(String key, String value) { - return R.ok("鎿嶄綔鎴愬姛", value); - } - - /** - * 娴嬭瘯 @CacheEvict - * <p> - * 浣跨敤浜咰acheEvict娉ㄨВ鐨勬柟娉�,浼氭竻绌烘寚瀹氱紦瀛� - * 銆屼竴鑸敤鍦ㄥ垹闄ょ殑鏂规硶涓娿�� - * <p> - * cacheNames 鍛藉悕瑙勫垯 鏌ョ湅 {@link CacheNames} 娉ㄩ噴 鏀寔澶氬弬鏁� - */ - @CacheEvict(cacheNames = CacheNames.DEMO_CACHE, key = "#key", condition = "#key != null") - @GetMapping("/test3") - public R<String> test3(String key, String value) { - return R.ok("鎿嶄綔鎴愬姛", value); - } - - /** - * 娴嬭瘯璁剧疆杩囨湡鏃堕棿 - * 鎵嬪姩璁剧疆杩囨湡鏃堕棿10绉� - * 11绉掑悗鑾峰彇 鍒ゆ柇鏄惁鐩哥瓑 - */ - @GetMapping("/test6") - public R<Boolean> test6(String key, String value) { - RedisUtils.setCacheObject(key, value); - boolean flag = RedisUtils.expire(key, Duration.ofSeconds(10)); - System.out.println("***********" + flag); - try { - Thread.sleep(11 * 1000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - Object obj = RedisUtils.getCacheObject(key); - return R.ok(value.equals(obj)); - } - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/RedisLockController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/RedisLockController.java deleted file mode 100644 index 2876aa0..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/RedisLockController.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.xmzs.demo.controller; - -import com.baomidou.lock.LockInfo; -import com.baomidou.lock.LockTemplate; -import com.baomidou.lock.annotation.Lock4j; -import com.baomidou.lock.executor.RedissonLockExecutor; -import com.xmzs.common.core.domain.R; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.time.LocalTime; - - -/** - * 娴嬭瘯鍒嗗竷寮忛攣鐨勬牱渚� - * - * @author shenxinquan - */ -@Slf4j -@RestController -@RequestMapping("/demo/redisLock") -public class RedisLockController { - - @Autowired - private LockTemplate lockTemplate; - - /** - * 娴嬭瘯lock4j 娉ㄨВ - */ - @Lock4j(keys = {"#key"}) - @GetMapping("/testLock4j") - public R<String> testLock4j(String key, String value) { - System.out.println("start:" + key + ",time:" + LocalTime.now().toString()); - try { - Thread.sleep(10000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - System.out.println("end :" + key + ",time:" + LocalTime.now().toString()); - return R.ok("鎿嶄綔鎴愬姛", value); - } - - /** - * 娴嬭瘯lock4j 宸ュ叿 - */ - @GetMapping("/testLock4jLockTemplate") - public R<String> testLock4jLockTemplate(String key, String value) { - final LockInfo lockInfo = lockTemplate.lock(key, 30000L, 5000L, RedissonLockExecutor.class); - if (null == lockInfo) { - throw new RuntimeException("涓氬姟澶勭悊涓�,璇风◢鍚庡啀璇�"); - } - // 鑾峰彇閿佹垚鍔燂紝澶勭悊涓氬姟 - try { - try { - Thread.sleep(8000); - } catch (InterruptedException e) { - // - } - System.out.println("鎵ц绠�鍗曟柟娉�1 , 褰撳墠绾跨▼:" + Thread.currentThread().getName()); - } finally { - //閲婃斁閿� - lockTemplate.releaseLock(lockInfo); - } - //缁撴潫 - return R.ok("鎿嶄綔鎴愬姛", value); - } - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/RedisPubSubController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/RedisPubSubController.java deleted file mode 100644 index 29e8801..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/RedisPubSubController.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.xmzs.demo.controller; - -import com.xmzs.common.core.domain.R; -import com.xmzs.common.redis.utils.RedisUtils; -import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * Redis 鍙戝竷璁㈤槄 婕旂ず妗堜緥 - * - * @author Lion Li - */ -@RequiredArgsConstructor -@RestController -@RequestMapping("/demo/redis/pubsub") -public class RedisPubSubController { - - /** - * 鍙戝竷娑堟伅 - * - * @param key 閫氶亾Key - * @param value 鍙戦�佸唴瀹� - */ - @GetMapping("/pub") - public R<Void> pub(String key, String value) { - RedisUtils.publish(key, value, consumer -> { - System.out.println("鍙戝竷閫氶亾 => " + key + ", 鍙戦�佸�� => " + value); - }); - return R.ok("鎿嶄綔鎴愬姛"); - } - - /** - * 璁㈤槄娑堟伅 - * - * @param key 閫氶亾Key - */ - @GetMapping("/sub") - public R<Void> sub(String key) { - RedisUtils.subscribe(key, String.class, msg -> { - System.out.println("璁㈤槄閫氶亾 => " + key + ", 鎺ユ敹鍊� => " + msg); - }); - return R.ok("鎿嶄綔鎴愬姛"); - } - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/RedisRateLimiterController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/RedisRateLimiterController.java deleted file mode 100644 index d5dc3ec..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/RedisRateLimiterController.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.xmzs.demo.controller; - -import com.xmzs.common.core.domain.R; -import com.xmzs.common.ratelimiter.annotation.RateLimiter; -import com.xmzs.common.ratelimiter.enums.LimitType; -import lombok.extern.slf4j.Slf4j; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - - -/** - * 娴嬭瘯鍒嗗竷寮忛檺娴佹牱渚� - * - * @author Lion Li - */ -@Slf4j -@RestController -@RequestMapping("/demo/rateLimiter") -public class RedisRateLimiterController { - - /** - * 娴嬭瘯鍏ㄥ眬闄愭祦 - * 鍏ㄥ眬褰卞搷 - */ - @RateLimiter(count = 2, time = 10) - @GetMapping("/test") - public R<String> test(String value) { - return R.ok("鎿嶄綔鎴愬姛", value); - } - - /** - * 娴嬭瘯璇锋眰IP闄愭祦 - * 鍚屼竴IP璇锋眰鍙楀奖鍝� - */ - @RateLimiter(count = 2, time = 10, limitType = LimitType.IP) - @GetMapping("/testip") - public R<String> testip(String value) { - return R.ok("鎿嶄綔鎴愬姛", value); - } - - /** - * 娴嬭瘯闆嗙兢瀹炰緥闄愭祦 - * 鍚姩涓や釜鍚庣鏈嶅姟浜掍笉褰卞搷 - */ - @RateLimiter(count = 2, time = 10, limitType = LimitType.CLUSTER) - @GetMapping("/testcluster") - public R<String> testcluster(String value) { - return R.ok("鎿嶄綔鎴愬姛", value); - } - - /** - * 娴嬭瘯璇锋眰IP闄愭祦(key鍩轰簬鍙傛暟鑾峰彇) - * 鍚屼竴IP璇锋眰鍙楀奖鍝� - * - * 绠�鍗曞彉閲忚幏鍙� #鍙橀噺 澶嶆潅琛ㄨ揪寮� #{#鍙橀噺 != 1 ? 1 : 0} - */ - @RateLimiter(count = 2, time = 10, limitType = LimitType.IP, key = "#value") - @GetMapping("/testObj") - public R<String> testObj(String value) { - return R.ok("鎿嶄綔鎴愬姛", value); - } - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/SmsController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/SmsController.java deleted file mode 100644 index 311cb79..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/SmsController.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.xmzs.demo.controller; - -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.sms.config.properties.SmsProperties; -import com.xmzs.common.sms.core.SmsTemplate; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.HashMap; -import java.util.Map; - -/** - * 鐭俊婕旂ず妗堜緥 - * 璇峰厛闃呰鏂囨。 鍚﹀垯鏃犳硶浣跨敤 - * - * @author Lion Li - * @version 4.2.0 - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/demo/sms") -public class SmsController { - - private final SmsProperties smsProperties; -// private final SmsTemplate smsTemplate; // 鍙互浣跨敤spring娉ㄥ叆 -// private final AliyunSmsTemplate smsTemplate; // 涔熷彲浠ユ敞鍏ユ煇涓巶瀹剁殑妯℃澘宸ュ叿 - - /** - * 鍙戦�佺煭淇liyun - * - * @param phones 鐢佃瘽鍙� - * @param templateId 妯℃澘ID - */ - @GetMapping("/sendAliyun") - public R<Object> sendAliyun(String phones, String templateId) { - if (!smsProperties.getEnabled()) { - return R.fail("褰撳墠绯荤粺娌℃湁寮�鍚煭淇″姛鑳斤紒"); - } - if (!SpringUtils.containsBean("aliyunSmsTemplate")) { - return R.fail("闃块噷浜戜緷璧栨湭寮曞叆锛�"); - } - SmsTemplate smsTemplate = SpringUtils.getBean(SmsTemplate.class); - Map<String, String> map = new HashMap<>(1); - map.put("code", "1234"); - Object send = smsTemplate.send(phones, templateId, map); - return R.ok(send); - } - - /** - * 鍙戦�佺煭淇encent - * - * @param phones 鐢佃瘽鍙� - * @param templateId 妯℃澘ID - */ - @GetMapping("/sendTencent") - public R<Object> sendTencent(String phones, String templateId) { - if (!smsProperties.getEnabled()) { - return R.fail("褰撳墠绯荤粺娌℃湁寮�鍚煭淇″姛鑳斤紒"); - } - if (!SpringUtils.containsBean("tencentSmsTemplate")) { - return R.fail("鑵捐浜戜緷璧栨湭寮曞叆锛�"); - } - SmsTemplate smsTemplate = SpringUtils.getBean(SmsTemplate.class); - Map<String, String> map = new HashMap<>(1); -// map.put("2", "娴嬭瘯娴嬭瘯"); - map.put("1", "1234"); - Object send = smsTemplate.send(phones, templateId, map); - return R.ok(send); - } - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/Swagger3DemoController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/Swagger3DemoController.java deleted file mode 100644 index 560674b..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/Swagger3DemoController.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.xmzs.demo.controller; - -import com.xmzs.common.core.domain.R; -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.multipart.MultipartFile; - -/** - * swagger3 鐢ㄦ硶绀轰緥 - * - * @author Lion Li - */ -@RestController -@RequestMapping("/swagger/demo") -public class Swagger3DemoController { - - /** - * 涓婁紶璇锋眰 - * 蹇呴』浣跨敤 @RequestPart 娉ㄨВ鏍囨敞涓烘枃浠� - * - * @param file 鏂囦欢 - */ - @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) - public R<String> upload(@RequestPart("file") MultipartFile file) { - return R.ok("鎿嶄綔鎴愬姛", file.getOriginalFilename()); - } - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestBatchController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestBatchController.java deleted file mode 100644 index bdf3733..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestBatchController.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.xmzs.demo.controller; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.demo.domain.TestDemo; -import com.xmzs.demo.mapper.TestDemoMapper; -import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.ArrayList; -import java.util.List; - -/** - * 娴嬭瘯鎵归噺鏂规硶 - * - * @author Lion Li - * @date 2021-05-30 - */ -@RequiredArgsConstructor -@RestController -@RequestMapping("/demo/batch") -public class TestBatchController extends BaseController { - - /** - * 涓轰簡渚夸簬娴嬭瘯 鐩存帴寮曞叆mapper - */ - private final TestDemoMapper testDemoMapper; - - /** - * 鏂板鎵归噺鏂规硶 鍙畬缇庢浛浠� saveBatch 绉掔骇鎻掑叆涓婁竾鏁版嵁 (瀵筸ysql璐熻嵎杈冨ぇ) - * <p> - * 3.5.0 鐗堟湰 澧炲姞 rewriteBatchedStatements=true 鎵瑰鐞嗗弬鏁� 浣� MP 鍘熺敓鎵瑰鐞嗗彲浠ヨ揪鍒板悓鏍风殑閫熷害 - */ - @PostMapping("/add") -// @DS("slave") - public R<Void> add() { - List<TestDemo> list = new ArrayList<>(); - for (int i = 0; i < 1000; i++) { - TestDemo testDemo = new TestDemo(); - testDemo.setOrderNum(-1); - testDemo.setTestKey("鎵归噺鏂板"); - testDemo.setValue("娴嬭瘯鏂板"); - list.add(testDemo); - } - return toAjax(testDemoMapper.insertBatch(list)); - } - - /** - * 鏂板鎴栨洿鏂� 鍙畬缇庢浛浠� saveOrUpdateBatch 楂樻�ц兘 - * <p> - * 3.5.0 鐗堟湰 澧炲姞 rewriteBatchedStatements=true 鎵瑰鐞嗗弬鏁� 浣� MP 鍘熺敓鎵瑰鐞嗗彲浠ヨ揪鍒板悓鏍风殑閫熷害 - */ - @PostMapping("/addOrUpdate") -// @DS("slave") - public R<Void> addOrUpdate() { - List<TestDemo> list = new ArrayList<>(); - for (int i = 0; i < 1000; i++) { - TestDemo testDemo = new TestDemo(); - testDemo.setOrderNum(-1); - testDemo.setTestKey("鎵归噺鏂板"); - testDemo.setValue("娴嬭瘯鏂板"); - list.add(testDemo); - } - testDemoMapper.insertBatch(list); - for (int i = 0; i < list.size(); i++) { - TestDemo testDemo = list.get(i); - testDemo.setTestKey("鎵归噺鏂板鎴栦慨鏀�"); - testDemo.setValue("鎵归噺鏂板鎴栦慨鏀�"); - if (i % 2 == 0) { - testDemo.setId(null); - } - } - return toAjax(testDemoMapper.insertOrUpdateBatch(list)); - } - - /** - * 鍒犻櫎鎵归噺鏂规硶 - */ - @DeleteMapping() -// @DS("slave") - public R<Void> remove() { - return toAjax(testDemoMapper.delete(new LambdaQueryWrapper<TestDemo>() - .eq(TestDemo::getOrderNum, -1L))); - } - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestDemoController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestDemoController.java deleted file mode 100644 index 788afe0..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestDemoController.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.xmzs.demo.controller; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.ValidatorUtils; -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.core.validate.QueryGroup; -import com.xmzs.common.excel.core.ExcelResult; -import com.xmzs.common.excel.utils.ExcelUtil; -import com.xmzs.common.idempotent.annotation.RepeatSubmit; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.demo.domain.TestDemo; -import com.xmzs.demo.domain.bo.TestDemoBo; -import com.xmzs.demo.domain.bo.TestDemoImportVo; -import com.xmzs.demo.domain.vo.TestDemoVo; -import com.xmzs.demo.service.ITestDemoService; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; -import lombok.RequiredArgsConstructor; -import org.springframework.http.MediaType; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import java.util.Arrays; -import java.util.List; -import java.util.concurrent.TimeUnit; - -/** - * 娴嬭瘯鍗曡〃Controller - * - * @author Lion Li - * @date 2021-07-26 - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/demo/demo") -public class TestDemoController extends BaseController { - - private final ITestDemoService testDemoService; - - /** - * 鏌ヨ娴嬭瘯鍗曡〃鍒楄〃 - */ - @SaCheckPermission("demo:demo:list") - @GetMapping("/list") - public TableDataInfo<TestDemoVo> list(@Validated(QueryGroup.class) TestDemoBo bo, PageQuery pageQuery) { - return testDemoService.queryPageList(bo, pageQuery); - } - - /** - * 鑷畾涔夊垎椤垫煡璇� - */ - @SaCheckPermission("demo:demo:list") - @GetMapping("/page") - public TableDataInfo<TestDemoVo> page(@Validated(QueryGroup.class) TestDemoBo bo, PageQuery pageQuery) { - return testDemoService.customPageList(bo, pageQuery); - } - - /** - * 瀵煎叆鏁版嵁 - * - * @param file 瀵煎叆鏂囦欢 - */ - @Log(title = "娴嬭瘯鍗曡〃", businessType = BusinessType.IMPORT) - @SaCheckPermission("demo:demo:import") - @PostMapping(value = "/importData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) - public R<Void> importData(@RequestPart("file") MultipartFile file) throws Exception { - ExcelResult<TestDemoImportVo> excelResult = ExcelUtil.importExcel(file.getInputStream(), TestDemoImportVo.class, true); - List<TestDemo> list = MapstructUtils.convert(excelResult.getList(), TestDemo.class); - testDemoService.saveBatch(list); - return R.ok(excelResult.getAnalysis()); - } - - /** - * 瀵煎嚭娴嬭瘯鍗曡〃鍒楄〃 - */ - @SaCheckPermission("demo:demo:export") - @Log(title = "娴嬭瘯鍗曡〃", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(@Validated TestDemoBo bo, HttpServletResponse response) { - List<TestDemoVo> list = testDemoService.queryList(bo); - // 娴嬭瘯闆姳id瀵煎嚭 -// for (TestDemoVo vo : list) { -// vo.setId(1234567891234567893L); -// } - ExcelUtil.exportExcel(list, "娴嬭瘯鍗曡〃", TestDemoVo.class, response); - } - - /** - * 鑾峰彇娴嬭瘯鍗曡〃璇︾粏淇℃伅 - * - * @param id 娴嬭瘯ID - */ - @SaCheckPermission("demo:demo:query") - @GetMapping("/{id}") - public R<TestDemoVo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable("id") Long id) { - return R.ok(testDemoService.queryById(id)); - } - - /** - * 鏂板娴嬭瘯鍗曡〃 - */ - @SaCheckPermission("demo:demo:add") - @Log(title = "娴嬭瘯鍗曡〃", businessType = BusinessType.INSERT) - @RepeatSubmit(interval = 2, timeUnit = TimeUnit.SECONDS, message = "{repeat.submit.message}") - @PostMapping() - public R<Void> add(@RequestBody TestDemoBo bo) { - // 浣跨敤鏍¢獙宸ュ叿瀵规爣 @Validated(AddGroup.class) 娉ㄨВ - // 鐢ㄤ簬鍦ㄩ潪 Controller 鐨勫湴鏂规牎楠屽璞� - ValidatorUtils.validate(bo, AddGroup.class); - return toAjax(testDemoService.insertByBo(bo)); - } - - /** - * 淇敼娴嬭瘯鍗曡〃 - */ - @SaCheckPermission("demo:demo:edit") - @Log(title = "娴嬭瘯鍗曡〃", businessType = BusinessType.UPDATE) - @RepeatSubmit - @PutMapping() - public R<Void> edit(@Validated(EditGroup.class) @RequestBody TestDemoBo bo) { - return toAjax(testDemoService.updateByBo(bo)); - } - - /** - * 鍒犻櫎娴嬭瘯鍗曡〃 - * - * @param ids 娴嬭瘯ID涓� - */ - @SaCheckPermission("demo:demo:remove") - @Log(title = "娴嬭瘯鍗曡〃", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable Long[] ids) { - return toAjax(testDemoService.deleteWithValidByIds(Arrays.asList(ids), true)); - } -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestEncryptController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestEncryptController.java deleted file mode 100644 index 4f7fd86..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestEncryptController.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.xmzs.demo.controller; - -import com.xmzs.common.core.domain.R; -import com.xmzs.demo.domain.TestDemoEncrypt; -import com.xmzs.demo.mapper.TestDemoEncryptMapper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.HashMap; -import java.util.Map; - - -/** - * 娴嬭瘯鏁版嵁搴撳姞瑙e瘑鍔熻兘 - * - * @author Lion Li - */ -@Validated -@RestController -@RequestMapping("/demo/encrypt") -public class TestEncryptController { - - @Autowired - private TestDemoEncryptMapper mapper; - @Value("${mybatis-encryptor.enable}") - private Boolean encryptEnable; - - /** - * 娴嬭瘯鏁版嵁搴撳姞瑙e瘑 - * - * @param key 娴嬭瘯key - * @param value 娴嬭瘯value - */ - @GetMapping() - public R<Map<String, TestDemoEncrypt>> test(String key, String value) { - if (!encryptEnable) { - throw new RuntimeException("鍔犲瘑鍔熻兘鏈紑鍚�!"); - } - Map<String, TestDemoEncrypt> map = new HashMap<>(2); - TestDemoEncrypt demo = new TestDemoEncrypt(); - demo.setTestKey(key); - demo.setValue(value); - mapper.insert(demo); - map.put("鍔犲瘑", demo); - TestDemoEncrypt testDemo = mapper.selectById(demo.getId()); - map.put("瑙e瘑", testDemo); - return R.ok(map); - } - - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestExcelController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestExcelController.java deleted file mode 100644 index 8209f30..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestExcelController.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.xmzs.demo.controller; - -import cn.hutool.core.collection.CollUtil; -import com.xmzs.common.excel.utils.ExcelUtil; -import jakarta.servlet.http.HttpServletResponse; -import lombok.AllArgsConstructor; -import lombok.Data; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * 娴嬭瘯Excel鍔熻兘 - * - * @author Lion Li - */ -@RestController -@RequestMapping("/demo/excel") -public class TestExcelController { - - /** - * 鍗曞垪琛ㄥ鏁版嵁 - */ - @GetMapping("/exportTemplateOne") - public void exportTemplateOne(HttpServletResponse response) { - Map<String, String> map = new HashMap<>(); - map.put("title", "鍗曞垪琛ㄥ鏁版嵁"); - map.put("test1", "鏁版嵁娴嬭瘯1"); - map.put("test2", "鏁版嵁娴嬭瘯2"); - map.put("test3", "鏁版嵁娴嬭瘯3"); - map.put("test4", "鏁版嵁娴嬭瘯4"); - map.put("testTest", "666"); - List<TestObj> list = new ArrayList<>(); - list.add(new TestObj("鍗曞垪琛ㄦ祴璇�1", "鍒楄〃娴嬭瘯1", "鍒楄〃娴嬭瘯2", "鍒楄〃娴嬭瘯3", "鍒楄〃娴嬭瘯4")); - list.add(new TestObj("鍗曞垪琛ㄦ祴璇�2", "鍒楄〃娴嬭瘯5", "鍒楄〃娴嬭瘯6", "鍒楄〃娴嬭瘯7", "鍒楄〃娴嬭瘯8")); - list.add(new TestObj("鍗曞垪琛ㄦ祴璇�3", "鍒楄〃娴嬭瘯9", "鍒楄〃娴嬭瘯10", "鍒楄〃娴嬭瘯11", "鍒楄〃娴嬭瘯12")); - ExcelUtil.exportTemplate(CollUtil.newArrayList(map, list), "鍗曞垪琛�.xlsx", "excel/鍗曞垪琛�.xlsx", response); - } - - /** - * 澶氬垪琛ㄥ鏁版嵁 - */ - @GetMapping("/exportTemplateMuliti") - public void exportTemplateMuliti(HttpServletResponse response) { - Map<String, String> map = new HashMap<>(); - map.put("title1", "鏍囬1"); - map.put("title2", "鏍囬2"); - map.put("title3", "鏍囬3"); - map.put("title4", "鏍囬4"); - map.put("author", "Lion Li"); - List<TestObj1> list1 = new ArrayList<>(); - list1.add(new TestObj1("list1娴嬭瘯1", "list1娴嬭瘯2", "list1娴嬭瘯3")); - list1.add(new TestObj1("list1娴嬭瘯4", "list1娴嬭瘯5", "list1娴嬭瘯6")); - list1.add(new TestObj1("list1娴嬭瘯7", "list1娴嬭瘯8", "list1娴嬭瘯9")); - List<TestObj1> list2 = new ArrayList<>(); - list2.add(new TestObj1("list2娴嬭瘯1", "list2娴嬭瘯2", "list2娴嬭瘯3")); - list2.add(new TestObj1("list2娴嬭瘯4", "list2娴嬭瘯5", "list2娴嬭瘯6")); - List<TestObj1> list3 = new ArrayList<>(); - list3.add(new TestObj1("list3娴嬭瘯1", "list3娴嬭瘯2", "list3娴嬭瘯3")); - List<TestObj1> list4 = new ArrayList<>(); - list4.add(new TestObj1("list4娴嬭瘯1", "list4娴嬭瘯2", "list4娴嬭瘯3")); - list4.add(new TestObj1("list4娴嬭瘯4", "list4娴嬭瘯5", "list4娴嬭瘯6")); - list4.add(new TestObj1("list4娴嬭瘯7", "list4娴嬭瘯8", "list4娴嬭瘯9")); - list4.add(new TestObj1("list4娴嬭瘯10", "list4娴嬭瘯11", "list4娴嬭瘯12")); - Map<String, Object> multiListMap = new HashMap<>(); - multiListMap.put("map", map); - multiListMap.put("data1", list1); - multiListMap.put("data2", list2); - multiListMap.put("data3", list3); - multiListMap.put("data4", list4); - ExcelUtil.exportTemplateMultiList(multiListMap, "澶氬垪琛�.xlsx", "excel/澶氬垪琛�.xlsx", response); - } - - @Data - @AllArgsConstructor - static class TestObj1 { - private String test1; - private String test2; - private String test3; - } - - @Data - @AllArgsConstructor - static class TestObj { - private String name; - private String list1; - private String list2; - private String list3; - private String list4; - } - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestI18nController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestI18nController.java deleted file mode 100644 index 6cd52aa..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestI18nController.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.xmzs.demo.controller; - -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.utils.MessageUtils; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import org.hibernate.validator.constraints.Range; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - - -/** - * 娴嬭瘯鍥介檯鍖� - * - * @author Lion Li - */ -@Validated -@RestController -@RequestMapping("/demo/i18n") -public class TestI18nController { - - /** - * 閫氳繃code鑾峰彇鍥介檯鍖栧唴瀹� - * code涓� messages.properties 涓殑 key - * <p> - * 娴嬭瘯浣跨敤 user.register.success - * - * @param code 鍥介檯鍖朿ode - */ - @GetMapping() - public R<Void> get(String code) { - return R.ok(MessageUtils.message(code)); - } - - /** - * Validator 鏍¢獙鍥介檯鍖� - * 涓嶄紶鍊� 鍒嗗埆鏌ョ湅寮傚父杩斿洖 - * <p> - * 娴嬭瘯浣跨敤 not.null - */ - @GetMapping("/test1") - public R<Void> test1(@NotBlank(message = "{not.null}") String str) { - return R.ok(str); - } - - /** - * Bean 鏍¢獙鍥介檯鍖� - * 涓嶄紶鍊� 鍒嗗埆鏌ョ湅寮傚父杩斿洖 - * <p> - * 娴嬭瘯浣跨敤 not.null - */ - @GetMapping("/test2") - public R<TestI18nBo> test2(@Validated TestI18nBo bo) { - return R.ok(bo); - } - - @Data - public static class TestI18nBo { - - @NotBlank(message = "{not.null}") - private String name; - - @NotNull(message = "{not.null}") - @Range(min = 0, max = 100, message = "{length.not.valid}") - private Integer age; - } -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestSensitiveController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestSensitiveController.java deleted file mode 100644 index 2c5f1a7..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestSensitiveController.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.xmzs.demo.controller; - -import com.xmzs.common.core.domain.R; -import com.xmzs.common.sensitive.annotation.Sensitive; -import com.xmzs.common.sensitive.core.SensitiveService; -import com.xmzs.common.sensitive.core.SensitiveStrategy; -import com.xmzs.common.web.core.BaseController; -import lombok.Data; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * 娴嬭瘯鏁版嵁鑴辨晱鎺у埗鍣� - * <p> - * 榛樿绠$悊鍛樹笉杩囨护 - * 闇�鑷鏍规嵁涓氬姟閲嶅啓瀹炵幇 - * - * @author Lion Li - * @version 3.6.0 - * @see SensitiveService - */ -@RestController -@RequestMapping("/demo/sensitive") -public class TestSensitiveController extends BaseController { - - /** - * 娴嬭瘯鏁版嵁鑴辨晱 - */ - @GetMapping("/test") - public R<TestSensitive> test() { - TestSensitive testSensitive = new TestSensitive(); - testSensitive.setIdCard("210397198608215431"); - testSensitive.setPhone("17640125371"); - testSensitive.setAddress("鍖椾含甯傛湞闃冲尯鏌愭煇鍥涘悎闄�1203瀹�"); - testSensitive.setEmail("17640125371@163.com"); - testSensitive.setBankCard("6226456952351452853"); - return R.ok(testSensitive); - } - - @Data - static class TestSensitive { - - /** - * 韬唤璇� - */ - @Sensitive(strategy = SensitiveStrategy.ID_CARD) - private String idCard; - - /** - * 鐢佃瘽 - */ - @Sensitive(strategy = SensitiveStrategy.PHONE) - private String phone; - - /** - * 鍦板潃 - */ - @Sensitive(strategy = SensitiveStrategy.ADDRESS) - private String address; - - /** - * 閭 - */ - @Sensitive(strategy = SensitiveStrategy.EMAIL) - private String email; - - /** - * 閾惰鍗� - */ - @Sensitive(strategy = SensitiveStrategy.BANK_CARD) - private String bankCard; - - } - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestTreeController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestTreeController.java deleted file mode 100644 index 2d1873b..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/TestTreeController.java +++ /dev/null @@ -1,107 +0,0 @@ -package com.xmzs.demo.controller; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.core.validate.QueryGroup; -import com.xmzs.common.excel.utils.ExcelUtil; -import com.xmzs.common.idempotent.annotation.RepeatSubmit; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.demo.domain.bo.TestTreeBo; -import com.xmzs.demo.domain.vo.TestTreeVo; -import com.xmzs.demo.service.ITestTreeService; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.Arrays; -import java.util.List; - -/** - * 娴嬭瘯鏍戣〃Controller - * - * @author Lion Li - * @date 2021-07-26 - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/demo/tree") -public class TestTreeController extends BaseController { - - private final ITestTreeService testTreeService; - - /** - * 鏌ヨ娴嬭瘯鏍戣〃鍒楄〃 - */ - @SaCheckPermission("demo:tree:list") - @GetMapping("/list") - public R<List<TestTreeVo>> list(@Validated(QueryGroup.class) TestTreeBo bo) { - List<TestTreeVo> list = testTreeService.queryList(bo); - return R.ok(list); - } - - /** - * 瀵煎嚭娴嬭瘯鏍戣〃鍒楄〃 - */ - @SaCheckPermission("demo:tree:export") - @Log(title = "娴嬭瘯鏍戣〃", businessType = BusinessType.EXPORT) - @GetMapping("/export") - public void export(@Validated TestTreeBo bo, HttpServletResponse response) { - List<TestTreeVo> list = testTreeService.queryList(bo); - ExcelUtil.exportExcel(list, "娴嬭瘯鏍戣〃", TestTreeVo.class, response); - } - - /** - * 鑾峰彇娴嬭瘯鏍戣〃璇︾粏淇℃伅 - * - * @param id 娴嬭瘯鏍慖D - */ - @SaCheckPermission("demo:tree:query") - @GetMapping("/{id}") - public R<TestTreeVo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable("id") Long id) { - return R.ok(testTreeService.queryById(id)); - } - - /** - * 鏂板娴嬭瘯鏍戣〃 - */ - @SaCheckPermission("demo:tree:add") - @Log(title = "娴嬭瘯鏍戣〃", businessType = BusinessType.INSERT) - @RepeatSubmit - @PostMapping() - public R<Void> add(@Validated(AddGroup.class) @RequestBody TestTreeBo bo) { - return toAjax(testTreeService.insertByBo(bo)); - } - - /** - * 淇敼娴嬭瘯鏍戣〃 - */ - @SaCheckPermission("demo:tree:edit") - @Log(title = "娴嬭瘯鏍戣〃", businessType = BusinessType.UPDATE) - @RepeatSubmit - @PutMapping() - public R<Void> edit(@Validated(EditGroup.class) @RequestBody TestTreeBo bo) { - return toAjax(testTreeService.updateByBo(bo)); - } - - /** - * 鍒犻櫎娴嬭瘯鏍戣〃 - * - * @param ids 娴嬭瘯鏍慖D涓� - */ - @SaCheckPermission("demo:tree:remove") - @Log(title = "娴嬭瘯鏍戣〃", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable Long[] ids) { - return toAjax(testTreeService.deleteWithValidByIds(Arrays.asList(ids), true)); - } -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/queue/BoundedQueueController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/queue/BoundedQueueController.java deleted file mode 100644 index 204e61e..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/queue/BoundedQueueController.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.xmzs.demo.controller.queue; - -import com.xmzs.common.core.domain.R; -import com.xmzs.common.redis.utils.QueueUtils; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * 鏈夌晫闃熷垪 婕旂ず妗堜緥 - * <p> - * 杞婚噺绾ч槦鍒� 閲嶉噺绾ф暟鎹噺 璇蜂娇鐢� MQ - * <p> - * 闆嗙兢娴嬭瘯閫氳繃 鍚屼竴涓暟鎹彧浼氳娑堣垂涓�娆� 鍋氬ソ浜嬪姟琛ュ伩 - * 闆嗙兢娴嬭瘯娴佺▼ 鍦ㄥ叾涓竴鍙板彂閫佹暟鎹� 涓ょ鍒嗗埆璋冪敤鑾峰彇鎺ュ彛 涓�娆¤幏鍙栦竴鏉� - * - * @author Lion Li - * @version 3.6.0 - */ -@Slf4j -@RequiredArgsConstructor -@RestController -@RequestMapping("/demo/queue/bounded") -public class BoundedQueueController { - - - /** - * 娣诲姞闃熷垪鏁版嵁 - * - * @param queueName 闃熷垪鍚� - * @param capacity 瀹归噺 - */ - @GetMapping("/add") - public R<Void> add(String queueName, int capacity) { - // 鐢ㄥ畬浜嗕竴瀹氳閿�姣� 鍚﹀垯浼氫竴鐩村瓨鍦� - boolean b = QueueUtils.destroyQueue(queueName); - log.info("閫氶亾: {} , 鍒犻櫎: {}", queueName, b); - // 鍒濆鍖栬缃竴娆″嵆鍙� - if (QueueUtils.trySetBoundedQueueCapacity(queueName, capacity)) { - log.info("閫氶亾: {} , 璁剧疆瀹归噺: {}", queueName, capacity); - } else { - log.info("閫氶亾: {} , 璁剧疆瀹归噺澶辫触", queueName); - return R.fail("鎿嶄綔澶辫触"); - } - for (int i = 0; i < 11; i++) { - String data = "data-" + i; - boolean flag = QueueUtils.addBoundedQueueObject(queueName, data); - if (flag == false) { - log.info("閫氶亾: {} , 鍙戦�佹暟鎹�: {} 澶辫触, 閫氶亾宸叉弧", queueName, data); - } else { - log.info("閫氶亾: {} , 鍙戦�佹暟鎹�: {}", queueName, data); - } - } - return R.ok("鎿嶄綔鎴愬姛"); - } - - /** - * 鍒犻櫎闃熷垪鏁版嵁 - * - * @param queueName 闃熷垪鍚� - */ - @GetMapping("/remove") - public R<Void> remove(String queueName) { - String data = "data-" + 5; - if (QueueUtils.removeQueueObject(queueName, data)) { - log.info("閫氶亾: {} , 鍒犻櫎鏁版嵁: {}", queueName, data); - } else { - return R.fail("鎿嶄綔澶辫触"); - } - return R.ok("鎿嶄綔鎴愬姛"); - } - - /** - * 鑾峰彇闃熷垪鏁版嵁 - * - * @param queueName 闃熷垪鍚� - */ - @GetMapping("/get") - public R<Void> get(String queueName) { - String data; - do { - data = QueueUtils.getQueueObject(queueName); - log.info("閫氶亾: {} , 鑾峰彇鏁版嵁: {}", queueName, data); - } while (data != null); - return R.ok("鎿嶄綔鎴愬姛"); - } - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/queue/DelayedQueueController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/queue/DelayedQueueController.java deleted file mode 100644 index cdfc9c6..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/queue/DelayedQueueController.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.xmzs.demo.controller.queue; - -import com.xmzs.common.core.domain.R; -import com.xmzs.common.redis.utils.QueueUtils; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.concurrent.TimeUnit; - -/** - * 寤惰繜闃熷垪 婕旂ず妗堜緥 - * <p> - * 杞婚噺绾ч槦鍒� 閲嶉噺绾ф暟鎹噺 璇蜂娇鐢� MQ - * 渚嬪: 鍒涘缓璁㈠崟30鍒嗛挓鍚庤繃鏈熷鐞� - * <p> - * 闆嗙兢娴嬭瘯閫氳繃 鍚屼竴涓暟鎹彧浼氳娑堣垂涓�娆� 鍋氬ソ浜嬪姟琛ュ伩 - * 闆嗙兢娴嬭瘯娴佺▼ 涓ゅ彴闆嗙兢鍒嗗埆寮�鍚闃� 鍦ㄥ叾涓竴鍙板彂閫佹暟鎹� 瑙傚療鎺ユ敹娑堟伅鐨勮寰� - * - * @author Lion Li - * @version 3.6.0 - */ -@Slf4j -@RequiredArgsConstructor -@RestController -@RequestMapping("/demo/queue/delayed") -public class DelayedQueueController { - - /** - * 璁㈤槄闃熷垪 - * - * @param queueName 闃熷垪鍚� - */ - @GetMapping("/subscribe") - public R<Void> subscribe(String queueName) { - log.info("閫氶亾: {} 鐩戝惉涓�......", queueName); - // 椤圭洰鍒濆鍖栬缃竴娆″嵆鍙� - QueueUtils.subscribeBlockingQueue(queueName, (String orderNum) -> { - // 瑙傚療鎺ユ敹鏃堕棿 - log.info("閫氶亾: {}, 鏀跺埌鏁版嵁: {}", queueName, orderNum); - }); - return R.ok("鎿嶄綔鎴愬姛"); - } - - /** - * 娣诲姞闃熷垪鏁版嵁 - * - * @param queueName 闃熷垪鍚� - * @param orderNum 璁㈠崟鍙� - * @param time 寤惰繜鏃堕棿(绉�) - */ - @GetMapping("/add") - public R<Void> add(String queueName, String orderNum, Long time) { - QueueUtils.addDelayedQueueObject(queueName, orderNum, time, TimeUnit.SECONDS); - // 瑙傚療鍙戦�佹椂闂� - log.info("閫氶亾: {} , 鍙戦�佹暟鎹�: {}", queueName, orderNum); - return R.ok("鎿嶄綔鎴愬姛"); - } - - /** - * 鍒犻櫎闃熷垪鏁版嵁 - * - * @param queueName 闃熷垪鍚� - * @param orderNum 璁㈠崟鍙� - */ - @GetMapping("/remove") - public R<Void> remove(String queueName, String orderNum) { - if (QueueUtils.removeDelayedQueueObject(queueName, orderNum)) { - log.info("閫氶亾: {} , 鍒犻櫎鏁版嵁: {}", queueName, orderNum); - } else { - return R.fail("鎿嶄綔澶辫触"); - } - return R.ok("鎿嶄綔鎴愬姛"); - } - - /** - * 閿�姣侀槦鍒� - * - * @param queueName 闃熷垪鍚� - */ - @GetMapping("/destroy") - public R<Void> destroy(String queueName) { - // 鐢ㄥ畬浜嗕竴瀹氳閿�姣� 鍚﹀垯浼氫竴鐩村瓨鍦� - QueueUtils.destroyDelayedQueue(queueName); - return R.ok("鎿嶄綔鎴愬姛"); - } - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/queue/PriorityDemo.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/queue/PriorityDemo.java deleted file mode 100644 index 7ba2125..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/queue/PriorityDemo.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.xmzs.demo.controller.queue; - -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * 瀹炰綋绫� 娉ㄦ剰涓嶅厑璁镐娇鐢ㄥ唴閮ㄧ被 鍚﹀垯浼氭壘涓嶅埌绫� - * - * @author Lion Li - * @version 3.6.0 - */ -@Data -@NoArgsConstructor -public class PriorityDemo implements Comparable<PriorityDemo> { - private String name; - private Integer orderNum; - - @Override - public int compareTo(PriorityDemo other) { - return Integer.compare(getOrderNum(), other.getOrderNum()); - } -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/queue/PriorityQueueController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/queue/PriorityQueueController.java deleted file mode 100644 index ba68f24..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/controller/queue/PriorityQueueController.java +++ /dev/null @@ -1,89 +0,0 @@ -package com.xmzs.demo.controller.queue; - -import cn.hutool.core.util.RandomUtil; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.redis.utils.QueueUtils; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * 浼樺厛闃熷垪 婕旂ず妗堜緥 - * <p> - * 杞婚噺绾ч槦鍒� 閲嶉噺绾ф暟鎹噺 璇蜂娇鐢� MQ - * <p> - * 闆嗙兢娴嬭瘯閫氳繃 鍚屼竴涓秷鎭彧浼氳娑堣垂涓�娆� 鍋氬ソ浜嬪姟琛ュ伩 - * 闆嗙兢娴嬭瘯娴佺▼ 鍦ㄥ叾涓竴鍙板彂閫佹暟鎹� 涓ょ鍒嗗埆璋冪敤鑾峰彇鎺ュ彛 涓�娆¤幏鍙栦竴鏉� - * - * @author Lion Li - * @version 3.6.0 - */ -@Slf4j -@RequiredArgsConstructor -@RestController -@RequestMapping("/demo/queue/priority") -public class PriorityQueueController { - - /** - * 娣诲姞闃熷垪鏁版嵁 - * - * @param queueName 闃熷垪鍚� - */ - @GetMapping("/add") - public R<Void> add(String queueName) { - // 鐢ㄥ畬浜嗕竴瀹氳閿�姣� 鍚﹀垯浼氫竴鐩村瓨鍦� - boolean b = QueueUtils.destroyQueue(queueName); - log.info("閫氶亾: {} , 鍒犻櫎: {}", queueName, b); - - for (int i = 0; i < 10; i++) { - int randomNum = RandomUtil.randomInt(10); - PriorityDemo data = new PriorityDemo(); - data.setName("data-" + i); - data.setOrderNum(randomNum); - if (QueueUtils.addPriorityQueueObject(queueName, data)) { - log.info("閫氶亾: {} , 鍙戦�佹暟鎹�: {}", queueName, data); - } else { - log.info("閫氶亾: {} , 鍙戦�佹暟鎹�: {}, 鍙戦�佸け璐�", queueName, data); - } - } - return R.ok("鎿嶄綔鎴愬姛"); - } - - /** - * 鍒犻櫎闃熷垪鏁版嵁 - * - * @param queueName 闃熷垪鍚� - * @param name 瀵硅薄鍚� - * @param orderNum 鎺掑簭鍙� - */ - @GetMapping("/remove") - public R<Void> remove(String queueName, String name, Integer orderNum) { - PriorityDemo data = new PriorityDemo(); - data.setName(name); - data.setOrderNum(orderNum); - if (QueueUtils.removeQueueObject(queueName, data)) { - log.info("閫氶亾: {} , 鍒犻櫎鏁版嵁: {}", queueName, data); - } else { - return R.fail("鎿嶄綔澶辫触"); - } - return R.ok("鎿嶄綔鎴愬姛"); - } - - /** - * 鑾峰彇闃熷垪鏁版嵁 - * - * @param queueName 闃熷垪鍚� - */ - @GetMapping("/get") - public R<Void> get(String queueName) { - PriorityDemo data; - do { - data = QueueUtils.getQueueObject(queueName); - log.info("閫氶亾: {} , 鑾峰彇鏁版嵁: {}", queueName, data); - } while (data != null); - return R.ok("鎿嶄綔鎴愬姛"); - } - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/TestDemo.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/TestDemo.java deleted file mode 100644 index 2774b5e..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/TestDemo.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.xmzs.demo.domain; - -import com.baomidou.mybatisplus.annotation.*; -import com.xmzs.common.tenant.core.TenantEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serial; - -/** - * 娴嬭瘯鍗曡〃瀵硅薄 test_demo - * - * @author Lion Li - * @date 2021-07-26 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("test_demo") -public class TestDemo extends TenantEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 涓婚敭 - */ - @TableId(value = "id") - private Long id; - - /** - * 閮ㄩ棬id - */ - private Long deptId; - - /** - * 鐢ㄦ埛id - */ - private Long userId; - - /** - * 鎺掑簭鍙� - */ - @OrderBy(asc = false, sort = 1) - private Integer orderNum; - - /** - * key閿� - */ - private String testKey; - - /** - * 鍊� - */ - private String value; - - /** - * 鐗堟湰 - */ - @Version - private Long version; - - /** - * 鍒犻櫎鏍囧織 - */ - @TableLogic - private Long delFlag; - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/TestDemoEncrypt.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/TestDemoEncrypt.java deleted file mode 100644 index b8cb213..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/TestDemoEncrypt.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.xmzs.demo.domain; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.encrypt.annotation.EncryptField; -import com.xmzs.common.encrypt.enumd.AlgorithmType; -import lombok.Data; -import lombok.EqualsAndHashCode; - -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("test_demo") -public class TestDemoEncrypt extends TestDemo { - - /** - * key閿� - */ - // @EncryptField(algorithm=AlgorithmType.SM2, privateKey = "MIGTAgEAMBMGByqGSM49AgEGCCqBHM9VAYItBHkwdwIBAQQgZSlOvw8FBiH+aFJWLYZP/VRjg9wjfRarTkGBZd/T3N+gCgYIKoEcz1UBgi2hRANCAAR5DGuQwJqkxnbCsP+iPSDoHWIF4RwcR5EsSvT8QPxO1wRkR2IhCkzvRb32x2CUgJFdvoqVqfApFDPZzShqzBwX", publicKey = "MFkwEwYHKoZIzj0CAQYIKoEcz1UBgi0DQgAEeQxrkMCapMZ2wrD/oj0g6B1iBeEcHEeRLEr0/ED8TtcEZEdiIQpM70W99sdglICRXb6KlanwKRQz2c0oaswcFw==") - @EncryptField(algorithm = AlgorithmType.RSA, privateKey = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBANBBEeueWlXlkkj2+WY5l+IWe42d8b5K28g+G/CFKC/yYAEHtqGlCsBOrb+YBkG9mPzmuYA/n9k0NFIc8E8yY5vZQaroyFBrTTWEzG9RY2f7Y3svVyybs6jpXSUs4xff8abo7wL1Y/wUaeatTViamxYnyTvdTmLm3d+JjRij68rxAgMBAAECgYAB0TnhXraSopwIVRfmboea1b0upl+BUdTJcmci412UjrKr5aE695ZLPkXbFXijVu7HJlyyv94NVUdaMACV7Ku/S2RuNB70M7YJm8rAjHFC3/i2ZeIM60h1Ziy4QKv0XM3pRATlDCDNhC1WUrtQCQSgU8kcp6eUUppruOqDzcY04QJBAPm9+sBP9CwDRgy3e5+V8aZtJkwDstb0lVVV/KY890cydVxiCwvX3fqVnxKMlb+x0YtH0sb9v+71xvK2lGobaRECQQDVePU6r/cCEfpc+nkWF6osAH1f8Mux3rYv2DoBGvaPzV2BGfsLed4neRfCwWNCKvGPCdW+L0xMJg8+RwaoBUPhAkAT5kViqXxFPYWJYd1h2+rDXhMdH3ZSlm6HvDBDdrwlWinr0Iwcx3iSjPV93uHXwm118aUj4fg3LDJMCKxOwBxhAkByrQXfvwOMYygBprRBf/j0plazoWFrbd6lGR0f1uI5IfNnFRPdeFw1DEINZ2Hw+6zEUF44SqRMC+4IYJNc02dBAkBCgy7RvfyV/A7N6kKXxTHauY0v6XwSSvpeKtRJkbIcRWOdIYvaHO9L7cklj3vIEdwjSUp9K4VTBYYlmAz1xh03", publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDQQRHrnlpV5ZJI9vlmOZfiFnuNnfG+StvIPhvwhSgv8mABB7ahpQrATq2/mAZBvZj85rmAP5/ZNDRSHPBPMmOb2UGq6MhQa001hMxvUWNn+2N7L1csm7Oo6V0lLOMX3/Gm6O8C9WP8FGnmrU1YmpsWJ8k73U5i5t3fiY0Yo+vK8QIDAQAB") - private String testKey; - - /** - * 鍊� - */ - // @EncryptField // 浠�涔堜篃涓嶅啓璧伴粯璁ml閰嶇疆 - // @EncryptField(algorithm = AlgorithmType.SM4, password = "10rfylhtccpuyke5") - @EncryptField(algorithm = AlgorithmType.AES, password = "10rfylhtccpuyke5") - private String value; - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/TestTree.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/TestTree.java deleted file mode 100644 index d8bb0c0..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/TestTree.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.xmzs.demo.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableLogic; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.Version; -import com.xmzs.common.tenant.core.TenantEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serial; - -/** - * 娴嬭瘯鏍戣〃瀵硅薄 test_tree - * - * @author Lion Li - * @date 2021-07-26 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("test_tree") -public class TestTree extends TenantEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 涓婚敭 - */ - @TableId(value = "id") - private Long id; - - /** - * 鐖禝D - */ - private Long parentId; - - /** - * 閮ㄩ棬id - */ - private Long deptId; - - /** - * 鐢ㄦ埛id - */ - private Long userId; - - /** - * 鏍戣妭鐐瑰悕 - */ - private String treeName; - - /** - * 鐗堟湰 - */ - @Version - private Long version; - - /** - * 鍒犻櫎鏍囧織 - */ - @TableLogic - private Long delFlag; - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/bo/TestDemoBo.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/bo/TestDemoBo.java deleted file mode 100644 index 716b033..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/bo/TestDemoBo.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.xmzs.demo.domain.bo; - -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.demo.domain.TestDemo; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 娴嬭瘯鍗曡〃涓氬姟瀵硅薄 test_demo - * - * @author Lion Li - * @date 2021-07-26 - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = TestDemo.class, reverseConvertGenerate = false) -public class TestDemoBo extends BaseEntity { - - /** - * 涓婚敭 - */ - @NotNull(message = "涓婚敭涓嶈兘涓虹┖", groups = {EditGroup.class}) - private Long id; - - /** - * 閮ㄩ棬id - */ - @NotNull(message = "閮ㄩ棬id涓嶈兘涓虹┖", groups = {AddGroup.class, EditGroup.class}) - private Long deptId; - - /** - * 鐢ㄦ埛id - */ - @NotNull(message = "鐢ㄦ埛id涓嶈兘涓虹┖", groups = {AddGroup.class, EditGroup.class}) - private Long userId; - - /** - * 鎺掑簭鍙� - */ - @NotNull(message = "鎺掑簭鍙蜂笉鑳戒负绌�", groups = {AddGroup.class, EditGroup.class}) - private Integer orderNum; - - /** - * key閿� - */ - @NotBlank(message = "key閿笉鑳戒负绌�", groups = {AddGroup.class, EditGroup.class}) - private String testKey; - - /** - * 鍊� - */ - @NotBlank(message = "鍊间笉鑳戒负绌�", groups = {AddGroup.class, EditGroup.class}) - private String value; - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/bo/TestDemoImportVo.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/bo/TestDemoImportVo.java deleted file mode 100644 index 695971a..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/bo/TestDemoImportVo.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.xmzs.demo.domain.bo; - -import com.alibaba.excel.annotation.ExcelProperty; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -/** - * 娴嬭瘯鍗曡〃涓氬姟瀵硅薄 test_demo - * - * @author Lion Li - * @date 2021-07-26 - */ -@Data -public class TestDemoImportVo { - - /** - * 閮ㄩ棬id - */ - @NotNull(message = "閮ㄩ棬id涓嶈兘涓虹┖") - @ExcelProperty(value = "閮ㄩ棬id") - private Long deptId; - - /** - * 鐢ㄦ埛id - */ - @NotNull(message = "鐢ㄦ埛id涓嶈兘涓虹┖") - @ExcelProperty(value = "鐢ㄦ埛id") - private Long userId; - - /** - * 鎺掑簭鍙� - */ - @NotNull(message = "鎺掑簭鍙蜂笉鑳戒负绌�") - @ExcelProperty(value = "鎺掑簭鍙�") - private Long orderNum; - - /** - * key閿� - */ - @NotBlank(message = "key閿笉鑳戒负绌�") - @ExcelProperty(value = "key閿�") - private String testKey; - - /** - * 鍊� - */ - @NotBlank(message = "鍊间笉鑳戒负绌�") - @ExcelProperty(value = "鍊�") - private String value; - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/bo/TestTreeBo.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/bo/TestTreeBo.java deleted file mode 100644 index baf5d6d..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/bo/TestTreeBo.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.xmzs.demo.domain.bo; - -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.demo.domain.TestTree; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 娴嬭瘯鏍戣〃涓氬姟瀵硅薄 test_tree - * - * @author Lion Li - * @date 2021-07-26 - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = TestTree.class, reverseConvertGenerate = false) -public class TestTreeBo extends BaseEntity { - - /** - * 涓婚敭 - */ - @NotNull(message = "涓婚敭涓嶈兘涓虹┖", groups = {EditGroup.class}) - private Long id; - - /** - * 鐖禝D - */ - private Long parentId; - - /** - * 閮ㄩ棬id - */ - @NotNull(message = "閮ㄩ棬id涓嶈兘涓虹┖", groups = {AddGroup.class, EditGroup.class}) - private Long deptId; - - /** - * 鐢ㄦ埛id - */ - @NotNull(message = "鐢ㄦ埛id涓嶈兘涓虹┖", groups = {AddGroup.class, EditGroup.class}) - private Long userId; - - /** - * 鏍戣妭鐐瑰悕 - */ - @NotBlank(message = "鏍戣妭鐐瑰悕涓嶈兘涓虹┖", groups = {AddGroup.class, EditGroup.class}) - private String treeName; - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/package-info.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/package-info.java deleted file mode 100644 index 3ceb1f9..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.xmzs.demo.domain; diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/vo/TestDemoVo.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/vo/TestDemoVo.java deleted file mode 100644 index ff340fa..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/vo/TestDemoVo.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.xmzs.demo.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.common.translation.annotation.Translation; -import com.xmzs.common.translation.constant.TransConstant; -import com.xmzs.demo.domain.TestDemo; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - - -/** - * 娴嬭瘯鍗曡〃瑙嗗浘瀵硅薄 test_demo - * - * @author Lion Li - * @date 2021-07-26 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = TestDemo.class) -public class TestDemoVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 涓婚敭 - */ - @ExcelProperty(value = "涓婚敭") - private Long id; - - /** - * 閮ㄩ棬id - */ - @ExcelProperty(value = "閮ㄩ棬id") - private Long deptId; - - /** - * 鐢ㄦ埛id - */ - @ExcelProperty(value = "鐢ㄦ埛id") - private Long userId; - - /** - * 鎺掑簭鍙� - */ - @ExcelProperty(value = "鎺掑簭鍙�") - private Integer orderNum; - - /** - * key閿� - */ - @ExcelProperty(value = "key閿�") - private String testKey; - - /** - * 鍊� - */ - @ExcelProperty(value = "鍊�") - private String value; - - /** - * 鍒涘缓鏃堕棿 - */ - @ExcelProperty(value = "鍒涘缓鏃堕棿") - private Date createTime; - - /** - * 鍒涘缓浜� - */ - @ExcelProperty(value = "鍒涘缓浜�") - private Long createBy; - - /** - * 鍒涘缓浜鸿处鍙� - */ - @Translation(type = TransConstant.USER_ID_TO_NAME, mapper = "createBy") - @ExcelProperty(value = "鍒涘缓浜鸿处鍙�") - private String createByName; - - /** - * 鏇存柊鏃堕棿 - */ - @ExcelProperty(value = "鏇存柊鏃堕棿") - private Date updateTime; - - /** - * 鏇存柊浜� - */ - @ExcelProperty(value = "鏇存柊浜�") - private Long updateBy; - - /** - * 鏇存柊浜鸿处鍙� - */ - @Translation(type = TransConstant.USER_ID_TO_NAME, mapper = "updateBy") - @ExcelProperty(value = "鏇存柊浜鸿处鍙�") - private String updateByName; - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/vo/TestTreeVo.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/vo/TestTreeVo.java deleted file mode 100644 index 3f1cf8a..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/domain/vo/TestTreeVo.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.xmzs.demo.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.demo.domain.TestTree; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - - -/** - * 娴嬭瘯鏍戣〃瑙嗗浘瀵硅薄 test_tree - * - * @author Lion Li - * @date 2021-07-26 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = TestTree.class) -public class TestTreeVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 涓婚敭 - */ - private Long id; - - /** - * 鐖秈d - */ - @ExcelProperty(value = "鐖秈d") - private Long parentId; - - /** - * 閮ㄩ棬id - */ - @ExcelProperty(value = "閮ㄩ棬id") - private Long deptId; - - /** - * 鐢ㄦ埛id - */ - @ExcelProperty(value = "鐢ㄦ埛id") - private Long userId; - - /** - * 鏍戣妭鐐瑰悕 - */ - @ExcelProperty(value = "鏍戣妭鐐瑰悕") - private String treeName; - - /** - * 鍒涘缓鏃堕棿 - */ - @ExcelProperty(value = "鍒涘缓鏃堕棿") - private Date createTime; - - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/mapper/TestDemoEncryptMapper.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/mapper/TestDemoEncryptMapper.java deleted file mode 100644 index da01845..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/mapper/TestDemoEncryptMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.xmzs.demo.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.demo.domain.TestDemoEncrypt; - -/** - * 娴嬭瘯鍔犲瘑鍔熻兘 - * - * @author Lion Li - */ -public interface TestDemoEncryptMapper extends BaseMapperPlus<TestDemoEncrypt, TestDemoEncrypt> { - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/mapper/TestDemoMapper.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/mapper/TestDemoMapper.java deleted file mode 100644 index 50cd21b..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/mapper/TestDemoMapper.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.xmzs.demo.mapper; - -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.mybatis.annotation.DataColumn; -import com.xmzs.common.mybatis.annotation.DataPermission; -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.demo.domain.TestDemo; -import com.xmzs.demo.domain.vo.TestDemoVo; -import org.apache.ibatis.annotations.Param; - -import java.util.Collection; -import java.util.List; - -/** - * 娴嬭瘯鍗曡〃Mapper鎺ュ彛 - * - * @author Lion Li - * @date 2021-07-26 - */ -public interface TestDemoMapper extends BaseMapperPlus<TestDemo, TestDemoVo> { - - @DataPermission({ - @DataColumn(key = "deptName", value = "dept_id"), - @DataColumn(key = "userName", value = "user_id") - }) - Page<TestDemoVo> customPageList(@Param("page") Page<TestDemo> page, @Param("ew") Wrapper<TestDemo> wrapper); - - @Override - @DataPermission({ - @DataColumn(key = "deptName", value = "dept_id"), - @DataColumn(key = "userName", value = "user_id") - }) - <P extends IPage<TestDemo>> P selectPage(P page, @Param(Constants.WRAPPER) Wrapper<TestDemo> queryWrapper); - - @Override - @DataPermission({ - @DataColumn(key = "deptName", value = "dept_id"), - @DataColumn(key = "userName", value = "user_id") - }) - List<TestDemo> selectList(@Param(Constants.WRAPPER) Wrapper<TestDemo> queryWrapper); - - @Override - @DataPermission({ - @DataColumn(key = "deptName", value = "dept_id"), - @DataColumn(key = "userName", value = "user_id") - }) - int updateById(@Param(Constants.ENTITY) TestDemo entity); - - @Override - @DataPermission({ - @DataColumn(key = "deptName", value = "dept_id"), - @DataColumn(key = "userName", value = "user_id") - }) - int deleteBatchIds(@Param(Constants.COLL) Collection<?> idList); -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/mapper/TestTreeMapper.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/mapper/TestTreeMapper.java deleted file mode 100644 index 3c5f7fb..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/mapper/TestTreeMapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.demo.mapper; - -import com.xmzs.common.mybatis.annotation.DataColumn; -import com.xmzs.common.mybatis.annotation.DataPermission; -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.demo.domain.TestTree; -import com.xmzs.demo.domain.vo.TestTreeVo; - -/** - * 娴嬭瘯鏍戣〃Mapper鎺ュ彛 - * - * @author Lion Li - * @date 2021-07-26 - */ -@DataPermission({ - @DataColumn(key = "deptName", value = "dept_id"), - @DataColumn(key = "userName", value = "user_id") -}) -public interface TestTreeMapper extends BaseMapperPlus<TestTree, TestTreeVo> { - -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/mapper/package-info.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/mapper/package-info.java deleted file mode 100644 index 0f77326..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/mapper/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.xmzs.demo.mapper; diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/ITestDemoService.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/ITestDemoService.java deleted file mode 100644 index 21fcf50..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/ITestDemoService.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.xmzs.demo.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.demo.domain.TestDemo; -import com.xmzs.demo.domain.bo.TestDemoBo; -import com.xmzs.demo.domain.vo.TestDemoVo; - -import java.util.Collection; -import java.util.List; - -/** - * 娴嬭瘯鍗曡〃Service鎺ュ彛 - * - * @author Lion Li - * @date 2021-07-26 - */ -public interface ITestDemoService { - - /** - * 鏌ヨ鍗曚釜 - * - * @return - */ - TestDemoVo queryById(Long id); - - /** - * 鏌ヨ鍒楄〃 - */ - TableDataInfo<TestDemoVo> queryPageList(TestDemoBo bo, PageQuery pageQuery); - - /** - * 鑷畾涔夊垎椤垫煡璇� - */ - TableDataInfo<TestDemoVo> customPageList(TestDemoBo bo, PageQuery pageQuery); - - /** - * 鏌ヨ鍒楄〃 - */ - List<TestDemoVo> queryList(TestDemoBo bo); - - /** - * 鏍规嵁鏂板涓氬姟瀵硅薄鎻掑叆娴嬭瘯鍗曡〃 - * - * @param bo 娴嬭瘯鍗曡〃鏂板涓氬姟瀵硅薄 - * @return - */ - Boolean insertByBo(TestDemoBo bo); - - /** - * 鏍规嵁缂栬緫涓氬姟瀵硅薄淇敼娴嬭瘯鍗曡〃 - * - * @param bo 娴嬭瘯鍗曡〃缂栬緫涓氬姟瀵硅薄 - * @return - */ - Boolean updateByBo(TestDemoBo bo); - - /** - * 鏍¢獙骞跺垹闄ゆ暟鎹� - * - * @param ids 涓婚敭闆嗗悎 - * @param isValid 鏄惁鏍¢獙,true-鍒犻櫎鍓嶆牎楠�,false-涓嶆牎楠� - * @return - */ - Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); - - /** - * 鎵归噺淇濆瓨 - */ - Boolean saveBatch(List<TestDemo> list); -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/ITestTreeService.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/ITestTreeService.java deleted file mode 100644 index fe51e7f..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/ITestTreeService.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.xmzs.demo.service; - -import com.xmzs.demo.domain.bo.TestTreeBo; -import com.xmzs.demo.domain.vo.TestTreeVo; - -import java.util.Collection; -import java.util.List; - -/** - * 娴嬭瘯鏍戣〃Service鎺ュ彛 - * - * @author Lion Li - * @date 2021-07-26 - */ -public interface ITestTreeService { - /** - * 鏌ヨ鍗曚釜 - * - * @return - */ - TestTreeVo queryById(Long id); - - /** - * 鏌ヨ鍒楄〃 - */ - List<TestTreeVo> queryList(TestTreeBo bo); - - /** - * 鏍规嵁鏂板涓氬姟瀵硅薄鎻掑叆娴嬭瘯鏍戣〃 - * - * @param bo 娴嬭瘯鏍戣〃鏂板涓氬姟瀵硅薄 - * @return - */ - Boolean insertByBo(TestTreeBo bo); - - /** - * 鏍规嵁缂栬緫涓氬姟瀵硅薄淇敼娴嬭瘯鏍戣〃 - * - * @param bo 娴嬭瘯鏍戣〃缂栬緫涓氬姟瀵硅薄 - * @return - */ - Boolean updateByBo(TestTreeBo bo); - - /** - * 鏍¢獙骞跺垹闄ゆ暟鎹� - * - * @param ids 涓婚敭闆嗗悎 - * @param isValid 鏄惁鏍¢獙,true-鍒犻櫎鍓嶆牎楠�,false-涓嶆牎楠� - * @return - */ - Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/impl/TestDemoServiceImpl.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/impl/TestDemoServiceImpl.java deleted file mode 100644 index 3782d4c..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/impl/TestDemoServiceImpl.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.xmzs.demo.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.demo.domain.TestDemo; -import com.xmzs.demo.domain.bo.TestDemoBo; -import com.xmzs.demo.domain.vo.TestDemoVo; -import com.xmzs.demo.mapper.TestDemoMapper; -import com.xmzs.demo.service.ITestDemoService; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * 娴嬭瘯鍗曡〃Service涓氬姟灞傚鐞� - * - * @author Lion Li - * @date 2021-07-26 - */ -@RequiredArgsConstructor -@Service -public class TestDemoServiceImpl implements ITestDemoService { - - private final TestDemoMapper baseMapper; - - @Override - public TestDemoVo queryById(Long id) { - return baseMapper.selectVoById(id); - } - - @Override - public TableDataInfo<TestDemoVo> queryPageList(TestDemoBo bo, PageQuery pageQuery) { - LambdaQueryWrapper<TestDemo> lqw = buildQueryWrapper(bo); - Page<TestDemoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(result); - } - - /** - * 鑷畾涔夊垎椤垫煡璇� - */ - @Override - public TableDataInfo<TestDemoVo> customPageList(TestDemoBo bo, PageQuery pageQuery) { - LambdaQueryWrapper<TestDemo> lqw = buildQueryWrapper(bo); - Page<TestDemoVo> result = baseMapper.customPageList(pageQuery.build(), lqw); - return TableDataInfo.build(result); - } - - @Override - public List<TestDemoVo> queryList(TestDemoBo bo) { - return baseMapper.selectVoList(buildQueryWrapper(bo)); - } - - private LambdaQueryWrapper<TestDemo> buildQueryWrapper(TestDemoBo bo) { - Map<String, Object> params = bo.getParams(); - LambdaQueryWrapper<TestDemo> lqw = Wrappers.lambdaQuery(); - lqw.like(StringUtils.isNotBlank(bo.getTestKey()), TestDemo::getTestKey, bo.getTestKey()); - lqw.eq(StringUtils.isNotBlank(bo.getValue()), TestDemo::getValue, bo.getValue()); - lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null, - TestDemo::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime")); - return lqw; - } - - @Override - public Boolean insertByBo(TestDemoBo bo) { - TestDemo add = MapstructUtils.convert(bo, TestDemo.class); - validEntityBeforeSave(add); - boolean flag = baseMapper.insert(add) > 0; - if (flag) { - bo.setId(add.getId()); - } - return flag; - } - - @Override - public Boolean updateByBo(TestDemoBo bo) { - TestDemo update = MapstructUtils.convert(bo, TestDemo.class); - validEntityBeforeSave(update); - return baseMapper.updateById(update) > 0; - } - - /** - * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙 - * - * @param entity 瀹炰綋绫绘暟鎹� - */ - private void validEntityBeforeSave(TestDemo entity) { - //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫 - } - - @Override - public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { - if (isValid) { - //TODO 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠� - } - return baseMapper.deleteBatchIds(ids) > 0; - } - - @Override - public Boolean saveBatch(List<TestDemo> list) { - return baseMapper.insertBatch(list); - } -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/impl/TestTreeServiceImpl.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/impl/TestTreeServiceImpl.java deleted file mode 100644 index ecca17f..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/impl/TestTreeServiceImpl.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.xmzs.demo.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.demo.domain.TestTree; -import com.xmzs.demo.domain.bo.TestTreeBo; -import com.xmzs.demo.domain.vo.TestTreeVo; -import com.xmzs.demo.mapper.TestTreeMapper; -import com.xmzs.demo.service.ITestTreeService; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * 娴嬭瘯鏍戣〃Service涓氬姟灞傚鐞� - * - * @author Lion Li - * @date 2021-07-26 - */ -// @DS("slave") // 鍒囨崲浠庡簱鏌ヨ -@RequiredArgsConstructor -@Service -public class TestTreeServiceImpl implements ITestTreeService { - - private final TestTreeMapper baseMapper; - - @Override - public TestTreeVo queryById(Long id) { - return baseMapper.selectVoById(id); - } - - // @DS("slave") // 鍒囨崲浠庡簱鏌ヨ - @Override - public List<TestTreeVo> queryList(TestTreeBo bo) { - LambdaQueryWrapper<TestTree> lqw = buildQueryWrapper(bo); - return baseMapper.selectVoList(lqw); - } - - private LambdaQueryWrapper<TestTree> buildQueryWrapper(TestTreeBo bo) { - Map<String, Object> params = bo.getParams(); - LambdaQueryWrapper<TestTree> lqw = Wrappers.lambdaQuery(); - lqw.like(StringUtils.isNotBlank(bo.getTreeName()), TestTree::getTreeName, bo.getTreeName()); - lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null, - TestTree::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime")); - return lqw; - } - - @Override - public Boolean insertByBo(TestTreeBo bo) { - TestTree add = MapstructUtils.convert(bo, TestTree.class); - validEntityBeforeSave(add); - boolean flag = baseMapper.insert(add) > 0; - if (flag) { - bo.setId(add.getId()); - } - return flag; - } - - @Override - public Boolean updateByBo(TestTreeBo bo) { - TestTree update = MapstructUtils.convert(bo, TestTree.class); - validEntityBeforeSave(update); - return baseMapper.updateById(update) > 0; - } - - /** - * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙 - * - * @param entity 瀹炰綋绫绘暟鎹� - */ - private void validEntityBeforeSave(TestTree entity) { - //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫 - } - - @Override - public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { - if (isValid) { - //TODO 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠� - } - return baseMapper.deleteBatchIds(ids) > 0; - } -} diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/impl/package-info.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/impl/package-info.java deleted file mode 100644 index f73f3f3..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/impl/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.xmzs.demo.service.impl; diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/package-info.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/package-info.java deleted file mode 100644 index badcad4..0000000 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/xmzs/demo/service/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.xmzs.demo.service; diff --git a/ruoyi-modules/ruoyi-fusion/pom.xml b/ruoyi-modules/ruoyi-fusion/pom.xml index a5fd1a9..07439a1 100644 --- a/ruoyi-modules/ruoyi-fusion/pom.xml +++ b/ruoyi-modules/ruoyi-fusion/pom.xml @@ -11,7 +11,7 @@ <artifactId>ruoyi-fusion</artifactId> <description> - AI缁樼敾 + 涓夋柟API鎺ュ叆 </description> <properties> @@ -29,10 +29,7 @@ </properties> <dependencies> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-web</artifactId> - </dependency> + <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> @@ -114,6 +111,10 @@ <groupId>org.ruoyi</groupId> <artifactId>ruoyi-system</artifactId> </dependency> + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>ruoyi-knowledge</artifactId> + </dependency> </dependencies> </project> diff --git a/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/ChatController.java b/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/ChatController.java index 0f717ed..dc5592f 100644 --- a/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/ChatController.java +++ b/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/ChatController.java @@ -17,7 +17,9 @@ import org.ruoyi.common.mybatis.core.page.PageQuery; import org.ruoyi.common.mybatis.core.page.TableDataInfo; import org.ruoyi.common.satoken.utils.LoginHelper; +import org.ruoyi.knowledge.service.EmbeddingService; import org.ruoyi.system.domain.bo.ChatMessageBo; +import org.ruoyi.system.domain.request.translation.TranslationRequest; import org.ruoyi.system.domain.vo.ChatMessageVo; import org.ruoyi.system.service.IChatMessageService; import org.ruoyi.system.service.ISseService; @@ -46,12 +48,16 @@ private final IChatMessageService chatMessageService; + private final EmbeddingService embeddingService; /** * 鑱婂ぉ鎺ュ彛 */ @PostMapping("/send") @ResponseBody public SseEmitter sseChat(@RequestBody @Valid ChatRequest chatRequest, HttpServletRequest request) { + if (chatRequest.getModel().startsWith("ollama")) { + return ISseService.ollamaChat(chatRequest); + } return ISseService.sseChat(chatRequest,request); } @@ -89,6 +95,17 @@ return ISseService.textToSpeed(textToSpeech); } + /** + * 鏂囨湰缈昏瘧 + * + * @param + */ + @PostMapping("/translation") + @ResponseBody + public String translation(@RequestBody TranslationRequest translationRequest) { + return ISseService.translation(translationRequest); + } + @PostMapping("/dall3") @ResponseBody public R<List<Item>> dall3(@RequestBody @Valid Dall3Request request) { diff --git a/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/CoverController.java b/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/CoverController.java new file mode 100644 index 0000000..395156b --- /dev/null +++ b/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/CoverController.java @@ -0,0 +1,58 @@ +package org.ruoyi.fusion.controller; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import org.ruoyi.common.core.domain.R; +import org.ruoyi.common.mybatis.core.page.PageQuery; +import org.ruoyi.common.mybatis.core.page.TableDataInfo; +import org.ruoyi.common.web.core.BaseController; +import org.ruoyi.system.domain.vo.cover.CoverParamVo; +import org.ruoyi.system.domain.vo.cover.CoverVo; +import org.ruoyi.system.domain.vo.cover.CoverCallbackVo; +import org.ruoyi.system.domain.vo.cover.MusicVo; +import org.ruoyi.system.service.ICoverService; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 缁樺0缇庨煶-缈诲敱 + * + * @author NSL + * @since 2024-12-25 + */ +@Api(tags = "姝屾洸缈诲敱") +@RequiredArgsConstructor +@RestController +@RequestMapping("/cover") +public class CoverController extends BaseController { + + private final ICoverService coverService; + + @ApiOperation(value = "鏌ユ壘姝屾洸") + @GetMapping("/searchMusic") + public R<List<MusicVo>> searchMusic(String musicName) { + return R.ok(coverService.searchMusic(musicName)); + } + + @ApiOperation(value = "缈诲敱姝屾洸") + @PostMapping("/saveCoverTask") + public R<Void> saveCoverTask(@RequestBody CoverParamVo coverParamVo) { + coverService.saveCoverTask(coverParamVo); + return R.ok("缈诲敱姝屾洸澶勭悊涓绛夊緟10鍒嗛挓-30鍒嗛挓锛岀炕鍞辩粨鏋滆鍒扮炕鍞辫褰曚腑鏌ヨ锛�"); + } + + @ApiOperation(value = "鏌ヨ缈诲敱璁板綍") + @PostMapping("/searchCoverRecord") + public R<TableDataInfo<CoverVo>> searchCoverRecord(@RequestBody PageQuery pageQuery) { + return R.ok(coverService.searchCoverRecord(pageQuery)); + } + + @ApiOperation(value = "缈诲敱鍥炶皟鎺ュ彛") + @PostMapping("/callback") + public R<Void> callback(@RequestBody CoverCallbackVo coverCallbackVo) { + coverService.callback(coverCallbackVo); + return R.ok(); + } +} diff --git a/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/LumaController.java b/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/LumaController.java index 6e2bf1c..312d67e 100644 --- a/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/LumaController.java +++ b/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/LumaController.java @@ -32,6 +32,7 @@ @PostMapping("/generations/") public String generateVideo(@RequestBody GenerateLuma generateLuma) { OkHttpUtil okHttpUtil = okHttpConfig.getOkHttpUtil("luma"); + chatCostService.taskDeduct("luma", "鏂囩敓瑙嗛", NumberUtils.toDouble(okHttpConfig.getGenerate(), 0.3)); String generateJson = JSONUtil.toJsonStr(generateLuma); String url = "luma/generations"; diff --git a/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/PptController.java b/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/PptController.java new file mode 100644 index 0000000..876999e --- /dev/null +++ b/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/PptController.java @@ -0,0 +1,79 @@ +package org.ruoyi.fusion.controller; + +import com.alibaba.fastjson.JSONObject; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import org.ruoyi.common.core.domain.R; +import org.ruoyi.common.web.core.BaseController; +import org.ruoyi.system.domain.vo.ppt.*; +import org.ruoyi.system.service.IPptService; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; + +/** + * AI_PPT + * + * @author NSL + * @since 2024-12-30 + */ +@Api(tags = "AI-PPT") +@RequiredArgsConstructor +@RestController +@RequestMapping("/ppt") +public class PptController extends BaseController { + + private final IPptService pptService; + + @ApiOperation(value = "鑾峰彇API Token") + @GetMapping("/getApiToken") + public R<String> getApiToken() { + return R.ok(pptService.getApiToken()); + } + + @ApiOperation(value = "鍚屾娴佸紡鐢熸垚 PPT") + @PostMapping("/syncStreamGeneratePpt") + public R<Void> syncStreamGeneratePpt(String title) { + pptService.syncStreamGeneratePpt(title); + return R.ok(); + } + + @ApiOperation(value = "鏌ヨ鎵�鏈塒PT鍒楄〃") + @PostMapping("/selectPptList") + public R<Void> selectPptList(@RequestBody PptAllQueryDto pptQueryVo) { + pptService.selectPptList(pptQueryVo); + return R.ok(); + } + + @ApiOperation(value = "鐢熸垚澶х翰") + @PostMapping(value = "/generateOutline", produces = {MediaType.TEXT_EVENT_STREAM_VALUE}) + public SseEmitter generateOutline(@RequestBody PptGenerateOutlineDto generateOutlineDto) { + return pptService.generateOutline(generateOutlineDto); + } + + @ApiOperation(value = "鐢熸垚澶х翰鍐呭") + @PostMapping(value = "/generateContent", produces = {MediaType.TEXT_EVENT_STREAM_VALUE}) + public SseEmitter generateOutline(@RequestBody PptGenerateContentDto generateContentDto) { + return pptService.generateContent(generateContentDto); + } + + @ApiOperation(value = "鍒嗛〉鏌ヨ PPT 妯℃澘") + @PostMapping("/getTemplates") + public R<JSONObject> getPptTemplates(@RequestBody PptTemplateQueryDto pptQueryVo) { + return R.ok(pptService.getPptTemplates(pptQueryVo)); + } + + @ApiOperation(value = "鐢熸垚 PPT") + @PostMapping("/generatePptx") + public R<JSONObject> generatePptx(@RequestBody PptGeneratePptxDto pptQueryVo) { + return R.ok(pptService.generatePptx(pptQueryVo)); + } + + @ApiOperation(value = "鐢熸垚PPT鎴愬姛鍥炶皟鎺ュ彛") + @PostMapping("/successCallback") + public R<Void> successCallback() { + pptService.successCallback(); + return R.ok(); + } +} diff --git a/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/VoiceController.java b/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/VoiceController.java index 0a6b16c..2909597 100644 --- a/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/VoiceController.java +++ b/ruoyi-modules/ruoyi-fusion/src/main/java/org/ruoyi/fusion/controller/VoiceController.java @@ -1,31 +1,19 @@ package org.ruoyi.fusion.controller; -import cn.dev33.satoken.annotation.SaCheckPermission; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; import lombok.RequiredArgsConstructor; import org.ruoyi.common.core.domain.R; -import org.ruoyi.common.core.validate.EditGroup; -import org.ruoyi.common.log.annotation.Log; -import org.ruoyi.common.log.enums.BusinessType; -import org.ruoyi.common.satoken.utils.LoginHelper; import org.ruoyi.common.web.core.BaseController; -import org.ruoyi.system.domain.bo.VoiceRoleBo; -import org.ruoyi.system.domain.vo.VoiceRoleVo; import org.ruoyi.system.request.RoleListDto; -import org.ruoyi.system.request.RoleRequest; import org.ruoyi.system.request.SimpleGenerateRequest; import org.ruoyi.system.response.SimpleGenerateDataResponse; -import org.ruoyi.system.response.rolelist.RoleListVO; -import org.ruoyi.system.service.IVoiceRoleService; -import org.springframework.validation.annotation.Validated; +import org.ruoyi.system.response.rolelist.ChatAppStoreVO; +import org.ruoyi.system.service.IChatAppStoreService; import org.springframework.web.bind.annotation.*; -import java.util.ArrayList; import java.util.List; /** - * 閰嶉煶瑙掕壊 + * 搴旂敤甯傚満 * * @author Lion Li * @date 2024-03-19 @@ -35,63 +23,7 @@ @RequestMapping("/system/voice") public class VoiceController extends BaseController { - private final IVoiceRoleService voiceRoleService; - - /** - * 鏌ヨ閰嶉煶瑙掕壊鍒楄〃 - */ - @GetMapping("/list") - public List<VoiceRoleVo> list(VoiceRoleBo bo) { - if(LoginHelper.getUserId() == null){ - return new ArrayList<>(); - } - bo.setCreateBy(LoginHelper.getUserId()); - return voiceRoleService.queryList(bo); - } - - /** - * 鑾峰彇閰嶉煶瑙掕壊璇︾粏淇℃伅 - * - * @param id 涓婚敭 - */ - @SaCheckPermission("system:role:query") - @GetMapping("/{id}") - public R<VoiceRoleVo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable Long id) { - return R.ok(voiceRoleService.queryById(id)); - } - - - /** - * 鏂板閰嶉煶瑙掕壊 - */ - @Log(title = "閰嶉煶瑙掕壊", businessType = BusinessType.INSERT) - @PostMapping("/add") - public R<Void> add(@RequestBody RoleRequest roleRequest) { - return toAjax(voiceRoleService.insertByBo(roleRequest)); - } - - /** - * 淇敼閰嶉煶瑙掕壊 - */ - @SaCheckPermission("system:role:edit") - @Log(title = "閰嶉煶瑙掕壊", businessType = BusinessType.UPDATE) - @PutMapping() - public R<Void> edit(@Validated(EditGroup.class) @RequestBody VoiceRoleBo bo) { - return toAjax(voiceRoleService.updateByBo(bo)); - } - - /** - * 鍒犻櫎閰嶉煶瑙掕壊 - * - * @param ids 涓婚敭涓� - */ - @Log(title = "閰嶉煶瑙掕壊", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable Long[] ids) { - return toAjax(voiceRoleService.deleteWithValidByIds(List.of(ids), true)); - } + private final IChatAppStoreService voiceRoleService; /** * 瀹炴椂璇煶鐢熸垚 @@ -105,7 +37,7 @@ * 瑙掕壊甯傚満 */ @GetMapping("/roleList") - public R<List<RoleListVO>> roleList() { + public R<List<ChatAppStoreVO>> roleList() { return R.ok(voiceRoleService.roleList()); } diff --git a/ruoyi-modules/ruoyi-generator/pom.xml b/ruoyi-modules/ruoyi-generator/pom.xml deleted file mode 100644 index 5d7f041..0000000 --- a/ruoyi-modules/ruoyi-generator/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <parent> - <groupId>com.xmzs</groupId> - <artifactId>ruoyi-modules</artifactId> - <version>${revision}</version> - <relativePath>../pom.xml</relativePath> - </parent> - <modelVersion>4.0.0</modelVersion> - - <artifactId>ruoyi-generator</artifactId> - - <description> - generator 浠g爜鐢熸垚 - </description> - - <dependencies> - <!-- 閫氱敤宸ュ叿--> - <dependency> - <groupId>com.xmzs</groupId> - <artifactId>ruoyi-common-core</artifactId> - </dependency> - - <dependency> - <groupId>com.xmzs</groupId> - <artifactId>ruoyi-common-doc</artifactId> - </dependency> - - <dependency> - <groupId>com.xmzs</groupId> - <artifactId>ruoyi-common-mybatis</artifactId> - </dependency> - - <dependency> - <groupId>com.xmzs</groupId> - <artifactId>ruoyi-common-web</artifactId> - </dependency> - - <dependency> - <groupId>com.xmzs</groupId> - <artifactId>ruoyi-common-log</artifactId> - </dependency> - - <!--velocity浠g爜鐢熸垚浣跨敤妯℃澘 --> - <dependency> - <groupId>org.apache.velocity</groupId> - <artifactId>velocity-engine-core</artifactId> - </dependency> - </dependencies> - -</project> diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/config/GenConfig.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/config/GenConfig.java deleted file mode 100644 index 0f9a98b..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/config/GenConfig.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.xmzs.generator.config; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.PropertySource; -import org.springframework.stereotype.Component; - -/** - * 璇诲彇浠g爜鐢熸垚鐩稿叧閰嶇疆 - * - * @author ruoyi - */ -@Component -@ConfigurationProperties(prefix = "gen") -@PropertySource(value = {"classpath:generator.yml"}, encoding = "UTF-8") -public class GenConfig { - - /** - * 浣滆�� - */ - public static String author; - - /** - * 鐢熸垚鍖呰矾寰� - */ - public static String packageName; - - /** - * 鑷姩鍘婚櫎琛ㄥ墠缂�锛岄粯璁ゆ槸false - */ - public static boolean autoRemovePre; - - /** - * 琛ㄥ墠缂�(绫诲悕涓嶄細鍖呭惈琛ㄥ墠缂�) - */ - public static String tablePrefix; - - public static String getAuthor() { - return author; - } - - @Value("${author}") - public void setAuthor(String author) { - GenConfig.author = author; - } - - public static String getPackageName() { - return packageName; - } - - @Value("${packageName}") - public void setPackageName(String packageName) { - GenConfig.packageName = packageName; - } - - public static boolean getAutoRemovePre() { - return autoRemovePre; - } - - @Value("${autoRemovePre}") - public void setAutoRemovePre(boolean autoRemovePre) { - GenConfig.autoRemovePre = autoRemovePre; - } - - public static String getTablePrefix() { - return tablePrefix; - } - - @Value("${tablePrefix}") - public void setTablePrefix(String tablePrefix) { - GenConfig.tablePrefix = tablePrefix; - } -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/constant/GenConstants.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/constant/GenConstants.java deleted file mode 100644 index 3be7f78..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/constant/GenConstants.java +++ /dev/null @@ -1,186 +0,0 @@ -package com.xmzs.generator.constant; - -/** - * 浠g爜鐢熸垚閫氱敤甯搁噺 - * - * @author ruoyi - */ -public interface GenConstants { - /** - * 鍗曡〃锛堝鍒犳敼鏌ワ級 - */ - String TPL_CRUD = "crud"; - - /** - * 鏍戣〃锛堝鍒犳敼鏌ワ級 - */ - String TPL_TREE = "tree"; - - /** - * 鏍戠紪鐮佸瓧娈� - */ - String TREE_CODE = "treeCode"; - - /** - * 鏍戠埗缂栫爜瀛楁 - */ - String TREE_PARENT_CODE = "treeParentCode"; - - /** - * 鏍戝悕绉板瓧娈� - */ - String TREE_NAME = "treeName"; - - /** - * 涓婄骇鑿滃崟ID瀛楁 - */ - String PARENT_MENU_ID = "parentMenuId"; - - /** - * 涓婄骇鑿滃崟鍚嶇О瀛楁 - */ - String PARENT_MENU_NAME = "parentMenuName"; - - /** - * 鏁版嵁搴撳瓧绗︿覆绫诲瀷 - */ - String[] COLUMNTYPE_STR = {"char", "varchar", "enum", "set", "nchar", "nvarchar", "varchar2", "nvarchar2"}; - - /** - * 鏁版嵁搴撴枃鏈被鍨� - */ - String[] COLUMNTYPE_TEXT = {"tinytext", "text", "mediumtext", "longtext", "binary", "varbinary", "blob", - "ntext", "image", "bytea"}; - - /** - * 鏁版嵁搴撴椂闂寸被鍨� - */ - String[] COLUMNTYPE_TIME = {"datetime", "time", "date", "timestamp", "year", "interval", - "smalldatetime", "datetime2", "datetimeoffset"}; - - /** - * 鏁版嵁搴撴暟瀛楃被鍨� - */ - String[] COLUMNTYPE_NUMBER = {"tinyint", "smallint", "mediumint", "int", "number", "integer", - "bit", "bigint", "float", "double", "decimal", "numeric", "real", "double precision", - "smallserial", "serial", "bigserial", "money", "smallmoney"}; - - /** - * BO瀵硅薄 涓嶉渶瑕佹坊鍔犲瓧娈� - */ - String[] COLUMNNAME_NOT_ADD = {"create_dept", "create_by", "create_time", "del_flag", "update_by", - "update_time", "version", "tenant_id"}; - - /** - * BO瀵硅薄 涓嶉渶瑕佺紪杈戝瓧娈� - */ - String[] COLUMNNAME_NOT_EDIT = {"create_dept", "create_by", "create_time", "del_flag", "update_by", - "update_time", "version", "tenant_id"}; - - /** - * VO瀵硅薄 涓嶉渶瑕佽繑鍥炲瓧娈� - */ - String[] COLUMNNAME_NOT_LIST = {"create_dept", "create_by", "create_time", "del_flag", "update_by", - "update_time", "version", "tenant_id"}; - - /** - * BO瀵硅薄 涓嶉渶瑕佹煡璇㈠瓧娈� - */ - String[] COLUMNNAME_NOT_QUERY = {"id", "create_dept", "create_by", "create_time", "del_flag", "update_by", - "update_time", "remark", "version", "tenant_id"}; - - /** - * Entity鍩虹被瀛楁 - */ - String[] BASE_ENTITY = {"createDept", "createBy", "createTime", "updateBy", "updateTime", "tenantId"}; - - /** - * 鏂囨湰妗� - */ - String HTML_INPUT = "input"; - - /** - * 鏂囨湰鍩� - */ - String HTML_TEXTAREA = "textarea"; - - /** - * 涓嬫媺妗� - */ - String HTML_SELECT = "select"; - - /** - * 鍗曢�夋 - */ - String HTML_RADIO = "radio"; - - /** - * 澶嶉�夋 - */ - String HTML_CHECKBOX = "checkbox"; - - /** - * 鏃ユ湡鎺т欢 - */ - String HTML_DATETIME = "datetime"; - - /** - * 鍥剧墖涓婁紶鎺т欢 - */ - String HTML_IMAGE_UPLOAD = "imageUpload"; - - /** - * 鏂囦欢涓婁紶鎺т欢 - */ - String HTML_FILE_UPLOAD = "fileUpload"; - - /** - * 瀵屾枃鏈帶浠� - */ - String HTML_EDITOR = "editor"; - - /** - * 瀛楃涓茬被鍨� - */ - String TYPE_STRING = "String"; - - /** - * 鏁村瀷 - */ - String TYPE_INTEGER = "Integer"; - - /** - * 闀挎暣鍨� - */ - String TYPE_LONG = "Long"; - - /** - * 娴偣鍨� - */ - String TYPE_DOUBLE = "Double"; - - /** - * 楂樼簿搴﹁绠楃被鍨� - */ - String TYPE_BIGDECIMAL = "BigDecimal"; - - /** - * 鏃堕棿绫诲瀷 - */ - String TYPE_DATE = "Date"; - - /** - * 妯$硦鏌ヨ - */ - String QUERY_LIKE = "LIKE"; - - /** - * 鐩哥瓑鏌ヨ - */ - String QUERY_EQ = "EQ"; - - /** - * 闇�瑕� - */ - String REQUIRE = "1"; -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/controller/GenController.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/controller/GenController.java deleted file mode 100644 index 74d37f0..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/controller/GenController.java +++ /dev/null @@ -1,207 +0,0 @@ -package com.xmzs.generator.controller; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import cn.hutool.core.convert.Convert; -import cn.hutool.core.io.IoUtil; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.generator.domain.GenTable; -import com.xmzs.generator.domain.GenTableColumn; -import com.xmzs.generator.service.IGenTableService; -import jakarta.servlet.http.HttpServletResponse; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * 浠g爜鐢熸垚 鎿嶄綔澶勭悊 - * - * @author Lion Li - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/tool/gen") -public class GenController extends BaseController { - - private final IGenTableService genTableService; - - /** - * 鏌ヨ浠g爜鐢熸垚鍒楄〃 - */ - @SaCheckPermission("tool:gen:list") - @GetMapping("/list") - public TableDataInfo<GenTable> genList(GenTable genTable, PageQuery pageQuery) { - return genTableService.selectPageGenTableList(genTable, pageQuery); - } - - /** - * 淇敼浠g爜鐢熸垚涓氬姟 - * - * @param tableId 琛↖D - */ - @SaCheckPermission("tool:gen:query") - @GetMapping(value = "/{tableId}") - public R<Map<String, Object>> getInfo(@PathVariable Long tableId) { - GenTable table = genTableService.selectGenTableById(tableId); - List<GenTable> tables = genTableService.selectGenTableAll(); - List<GenTableColumn> list = genTableService.selectGenTableColumnListByTableId(tableId); - Map<String, Object> map = new HashMap<String, Object>(); - map.put("info", table); - map.put("rows", list); - map.put("tables", tables); - return R.ok(map); - } - - /** - * 鏌ヨ鏁版嵁搴撳垪琛� - */ - @SaCheckPermission("tool:gen:list") - @GetMapping("/db/list") - public TableDataInfo<GenTable> dataList(GenTable genTable, PageQuery pageQuery) { - return genTableService.selectPageDbTableList(genTable, pageQuery); - } - - /** - * 鏌ヨ鏁版嵁琛ㄥ瓧娈靛垪琛� - * - * @param tableId 琛↖D - */ - @SaCheckPermission("tool:gen:list") - @GetMapping(value = "/column/{tableId}") - public TableDataInfo<GenTableColumn> columnList(Long tableId) { - TableDataInfo<GenTableColumn> dataInfo = new TableDataInfo<>(); - List<GenTableColumn> list = genTableService.selectGenTableColumnListByTableId(tableId); - dataInfo.setRows(list); - dataInfo.setTotal(list.size()); - return dataInfo; - } - - /** - * 瀵煎叆琛ㄧ粨鏋勶紙淇濆瓨锛� - * - * @param tables 琛ㄥ悕涓� - */ - @SaCheckPermission("tool:gen:import") - @Log(title = "浠g爜鐢熸垚", businessType = BusinessType.IMPORT) - @PostMapping("/importTable") - public R<Void> importTableSave(String tables) { - String[] tableNames = Convert.toStrArray(tables); - // 鏌ヨ琛ㄤ俊鎭� - List<GenTable> tableList = genTableService.selectDbTableListByNames(tableNames); - genTableService.importGenTable(tableList); - return R.ok(); - } - - /** - * 淇敼淇濆瓨浠g爜鐢熸垚涓氬姟 - */ - @SaCheckPermission("tool:gen:edit") - @Log(title = "浠g爜鐢熸垚", businessType = BusinessType.UPDATE) - @PutMapping - public R<Void> editSave(@Validated @RequestBody GenTable genTable) { - genTableService.validateEdit(genTable); - genTableService.updateGenTable(genTable); - return R.ok(); - } - - /** - * 鍒犻櫎浠g爜鐢熸垚 - * - * @param tableIds 琛↖D涓� - */ - @SaCheckPermission("tool:gen:remove") - @Log(title = "浠g爜鐢熸垚", businessType = BusinessType.DELETE) - @DeleteMapping("/{tableIds}") - public R<Void> remove(@PathVariable Long[] tableIds) { - genTableService.deleteGenTableByIds(tableIds); - return R.ok(); - } - - /** - * 棰勮浠g爜 - * - * @param tableId 琛↖D - */ - @SaCheckPermission("tool:gen:preview") - @GetMapping("/preview/{tableId}") - public R<Map<String, String>> preview(@PathVariable("tableId") Long tableId) throws IOException { - Map<String, String> dataMap = genTableService.previewCode(tableId); - return R.ok(dataMap); - } - - /** - * 鐢熸垚浠g爜锛堜笅杞芥柟寮忥級 - * - * @param tableName 琛ㄥ悕 - */ - @SaCheckPermission("tool:gen:code") - @Log(title = "浠g爜鐢熸垚", businessType = BusinessType.GENCODE) - @GetMapping("/download/{tableName}") - public void download(HttpServletResponse response, @PathVariable("tableName") String tableName) throws IOException { - byte[] data = genTableService.downloadCode(tableName); - genCode(response, data); - } - - /** - * 鐢熸垚浠g爜锛堣嚜瀹氫箟璺緞锛� - * - * @param tableName 琛ㄥ悕 - */ - @SaCheckPermission("tool:gen:code") - @Log(title = "浠g爜鐢熸垚", businessType = BusinessType.GENCODE) - @GetMapping("/genCode/{tableName}") - public R<Void> genCode(@PathVariable("tableName") String tableName) { - genTableService.generatorCode(tableName); - return R.ok(); - } - - /** - * 鍚屾鏁版嵁搴� - * - * @param tableName 琛ㄥ悕 - */ - @SaCheckPermission("tool:gen:edit") - @Log(title = "浠g爜鐢熸垚", businessType = BusinessType.UPDATE) - @GetMapping("/synchDb/{tableName}") - public R<Void> synchDb(@PathVariable("tableName") String tableName) { - genTableService.synchDb(tableName); - return R.ok(); - } - - /** - * 鎵归噺鐢熸垚浠g爜 - * - * @param tables 琛ㄥ悕涓� - */ - @SaCheckPermission("tool:gen:code") - @Log(title = "浠g爜鐢熸垚", businessType = BusinessType.GENCODE) - @GetMapping("/batchGenCode") - public void batchGenCode(HttpServletResponse response, String tables) throws IOException { - String[] tableNames = Convert.toStrArray(tables); - byte[] data = genTableService.downloadCode(tableNames); - genCode(response, data); - } - - /** - * 鐢熸垚zip鏂囦欢 - */ - private void genCode(HttpServletResponse response, byte[] data) throws IOException { - response.reset(); - response.addHeader("Access-Control-Allow-Origin", "*"); - response.addHeader("Access-Control-Expose-Headers", "Content-Disposition"); - response.setHeader("Content-Disposition", "attachment; filename=\"ruoyi.zip\""); - response.addHeader("Content-Length", "" + data.length); - response.setContentType("application/octet-stream; charset=UTF-8"); - IoUtil.write(response.getOutputStream(), false, data); - } -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/domain/GenTable.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/domain/GenTable.java deleted file mode 100644 index 59ab389..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/domain/GenTable.java +++ /dev/null @@ -1,190 +0,0 @@ -package com.xmzs.generator.domain; - -import com.baomidou.mybatisplus.annotation.FieldStrategy; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.generator.constant.GenConstants; -import jakarta.validation.Valid; -import jakarta.validation.constraints.NotBlank; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.List; - -/** - * 涓氬姟琛� gen_table - * - * @author Lion Li - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("gen_table") -public class GenTable extends BaseEntity { - - /** - * 缂栧彿 - */ - @TableId(value = "table_id") - private Long tableId; - - /** - * 琛ㄥ悕绉� - */ - @NotBlank(message = "琛ㄥ悕绉颁笉鑳戒负绌�") - private String tableName; - - /** - * 琛ㄦ弿杩� - */ - @NotBlank(message = "琛ㄦ弿杩颁笉鑳戒负绌�") - private String tableComment; - - /** - * 鍏宠仈鐖惰〃鐨勮〃鍚� - */ - private String subTableName; - - /** - * 鏈〃鍏宠仈鐖惰〃鐨勫閿悕 - */ - private String subTableFkName; - - /** - * 瀹炰綋绫诲悕绉�(棣栧瓧姣嶅ぇ鍐�) - */ - @NotBlank(message = "瀹炰綋绫诲悕绉颁笉鑳戒负绌�") - private String className; - - /** - * 浣跨敤鐨勬ā鏉匡紙crud鍗曡〃鎿嶄綔 tree鏍戣〃鎿嶄綔 sub涓诲瓙琛ㄦ搷浣滐級 - */ - private String tplCategory; - - /** - * 鐢熸垚鍖呰矾寰� - */ - @NotBlank(message = "鐢熸垚鍖呰矾寰勪笉鑳戒负绌�") - private String packageName; - - /** - * 鐢熸垚妯″潡鍚� - */ - @NotBlank(message = "鐢熸垚妯″潡鍚嶄笉鑳戒负绌�") - private String moduleName; - - /** - * 鐢熸垚涓氬姟鍚� - */ - @NotBlank(message = "鐢熸垚涓氬姟鍚嶄笉鑳戒负绌�") - private String businessName; - - /** - * 鐢熸垚鍔熻兘鍚� - */ - @NotBlank(message = "鐢熸垚鍔熻兘鍚嶄笉鑳戒负绌�") - private String functionName; - - /** - * 鐢熸垚浣滆�� - */ - @NotBlank(message = "浣滆�呬笉鑳戒负绌�") - private String functionAuthor; - - /** - * 鐢熸垚浠g爜鏂瑰紡锛�0zip鍘嬬缉鍖� 1鑷畾涔夎矾寰勶級 - */ - private String genType; - - /** - * 鐢熸垚璺緞锛堜笉濉粯璁ら」鐩矾寰勶級 - */ - @TableField(updateStrategy = FieldStrategy.NOT_EMPTY) - private String genPath; - - /** - * 涓婚敭淇℃伅 - */ - @TableField(exist = false) - private GenTableColumn pkColumn; - - /** - * 琛ㄥ垪淇℃伅 - */ - @Valid - @TableField(exist = false) - private List<GenTableColumn> columns; - - /** - * 鍏跺畠鐢熸垚閫夐」 - */ - private String options; - - /** - * 澶囨敞 - */ - private String remark; - - /** - * 鏍戠紪鐮佸瓧娈� - */ - @TableField(exist = false) - private String treeCode; - - /** - * 鏍戠埗缂栫爜瀛楁 - */ - @TableField(exist = false) - private String treeParentCode; - - /** - * 鏍戝悕绉板瓧娈� - */ - @TableField(exist = false) - private String treeName; - - /* - * 鑿滃崟id鍒楄〃 - */ - @TableField(exist = false) - private List<Long> menuIds; - - /** - * 涓婄骇鑿滃崟ID瀛楁 - */ - @TableField(exist = false) - private String parentMenuId; - - /** - * 涓婄骇鑿滃崟鍚嶇О瀛楁 - */ - @TableField(exist = false) - private String parentMenuName; - - public boolean isTree() { - return isTree(this.tplCategory); - } - - public static boolean isTree(String tplCategory) { - return tplCategory != null && StringUtils.equals(GenConstants.TPL_TREE, tplCategory); - } - - public boolean isCrud() { - return isCrud(this.tplCategory); - } - - public static boolean isCrud(String tplCategory) { - return tplCategory != null && StringUtils.equals(GenConstants.TPL_CRUD, tplCategory); - } - - public boolean isSuperColumn(String javaField) { - return isSuperColumn(this.tplCategory, javaField); - } - - public static boolean isSuperColumn(String tplCategory, String javaField) { - return StringUtils.equalsAnyIgnoreCase(javaField, GenConstants.BASE_ENTITY); - } -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/domain/GenTableColumn.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/domain/GenTableColumn.java deleted file mode 100644 index f107b0e..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/domain/GenTableColumn.java +++ /dev/null @@ -1,222 +0,0 @@ -package com.xmzs.generator.domain; - -import com.baomidou.mybatisplus.annotation.FieldStrategy; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import jakarta.validation.constraints.NotBlank; -import lombok.Data; -import lombok.EqualsAndHashCode; -import org.apache.ibatis.type.JdbcType; - -/** - * 浠g爜鐢熸垚涓氬姟瀛楁琛� gen_table_column - * - * @author Lion Li - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("gen_table_column") -public class GenTableColumn extends BaseEntity { - - /** - * 缂栧彿 - */ - @TableId(value = "column_id") - private Long columnId; - - /** - * 褰掑睘琛ㄧ紪鍙� - */ - private Long tableId; - - /** - * 鍒楀悕绉� - */ - private String columnName; - - /** - * 鍒楁弿杩� - */ - @TableField(updateStrategy = FieldStrategy.IGNORED, jdbcType = JdbcType.VARCHAR) - private String columnComment; - - /** - * 鍒楃被鍨� - */ - private String columnType; - - /** - * JAVA绫诲瀷 - */ - private String javaType; - - /** - * JAVA瀛楁鍚� - */ - @NotBlank(message = "Java灞炴�т笉鑳戒负绌�") - private String javaField; - - /** - * 鏄惁涓婚敭锛�1鏄級 - */ - @TableField(updateStrategy = FieldStrategy.IGNORED, jdbcType = JdbcType.VARCHAR) - private String isPk; - - /** - * 鏄惁鑷锛�1鏄級 - */ - @TableField(updateStrategy = FieldStrategy.IGNORED, jdbcType = JdbcType.VARCHAR) - private String isIncrement; - - /** - * 鏄惁蹇呭~锛�1鏄級 - */ - @TableField(updateStrategy = FieldStrategy.IGNORED, jdbcType = JdbcType.VARCHAR) - private String isRequired; - - /** - * 鏄惁涓烘彃鍏ュ瓧娈碉紙1鏄級 - */ - @TableField(updateStrategy = FieldStrategy.IGNORED, jdbcType = JdbcType.VARCHAR) - private String isInsert; - - /** - * 鏄惁缂栬緫瀛楁锛�1鏄級 - */ - @TableField(updateStrategy = FieldStrategy.IGNORED, jdbcType = JdbcType.VARCHAR) - private String isEdit; - - /** - * 鏄惁鍒楄〃瀛楁锛�1鏄級 - */ - @TableField(updateStrategy = FieldStrategy.IGNORED, jdbcType = JdbcType.VARCHAR) - private String isList; - - /** - * 鏄惁鏌ヨ瀛楁锛�1鏄級 - */ - @TableField(updateStrategy = FieldStrategy.IGNORED, jdbcType = JdbcType.VARCHAR) - private String isQuery; - - /** - * 鏌ヨ鏂瑰紡锛圗Q绛変簬銆丯E涓嶇瓑浜庛�丟T澶т簬銆丩T灏忎簬銆丩IKE妯$硦銆丅ETWEEN鑼冨洿锛� - */ - private String queryType; - - /** - * 鏄剧ず绫诲瀷锛坕nput鏂囨湰妗嗐�乼extarea鏂囨湰鍩熴�乻elect涓嬫媺妗嗐�乧heckbox澶嶉�夋銆乺adio鍗曢�夋銆乨atetime鏃ユ湡鎺т欢銆乮mage鍥剧墖涓婁紶鎺т欢銆乽pload鏂囦欢涓婁紶鎺т欢銆乪ditor瀵屾枃鏈帶浠讹級 - */ - private String htmlType; - - /** - * 瀛楀吀绫诲瀷 - */ - private String dictType; - - /** - * 鎺掑簭 - */ - private Integer sort; - - public String getCapJavaField() { - return StringUtils.capitalize(javaField); - } - - public boolean isPk() { - return isPk(this.isPk); - } - - public boolean isPk(String isPk) { - return isPk != null && StringUtils.equals("1", isPk); - } - - public boolean isIncrement() { - return isIncrement(this.isIncrement); - } - - public boolean isIncrement(String isIncrement) { - return isIncrement != null && StringUtils.equals("1", isIncrement); - } - - public boolean isRequired() { - return isRequired(this.isRequired); - } - - public boolean isRequired(String isRequired) { - return isRequired != null && StringUtils.equals("1", isRequired); - } - - public boolean isInsert() { - return isInsert(this.isInsert); - } - - public boolean isInsert(String isInsert) { - return isInsert != null && StringUtils.equals("1", isInsert); - } - - public boolean isEdit() { - return isInsert(this.isEdit); - } - - public boolean isEdit(String isEdit) { - return isEdit != null && StringUtils.equals("1", isEdit); - } - - public boolean isList() { - return isList(this.isList); - } - - public boolean isList(String isList) { - return isList != null && StringUtils.equals("1", isList); - } - - public boolean isQuery() { - return isQuery(this.isQuery); - } - - public boolean isQuery(String isQuery) { - return isQuery != null && StringUtils.equals("1", isQuery); - } - - public boolean isSuperColumn() { - return isSuperColumn(this.javaField); - } - - public static boolean isSuperColumn(String javaField) { - return StringUtils.equalsAnyIgnoreCase(javaField, - // BaseEntity - "createBy", "createTime", "updateBy", "updateTime", - // TreeEntity - "parentName", "parentId"); - } - - public boolean isUsableColumn() { - return isUsableColumn(javaField); - } - - public static boolean isUsableColumn(String javaField) { - // isSuperColumn()涓殑鍚嶅崟鐢ㄤ簬閬垮厤鐢熸垚澶氫綑Domain灞炴�э紝鑻ユ煇浜涘睘鎬у湪鐢熸垚椤甸潰鏃堕渶瑕佺敤鍒颁笉鑳藉拷鐣ワ紝鍒欐斁鍦ㄦ澶勭櫧鍚嶅崟 - return StringUtils.equalsAnyIgnoreCase(javaField, "parentId", "orderNum", "remark"); - } - - public String readConverterExp() { - String remarks = StringUtils.substringBetween(this.columnComment, "锛�", "锛�"); - StringBuffer sb = new StringBuffer(); - if (StringUtils.isNotEmpty(remarks)) { - for (String value : remarks.split(" ")) { - if (StringUtils.isNotEmpty(value)) { - Object startStr = value.subSequence(0, 1); - String endStr = value.substring(1); - sb.append(StringUtils.EMPTY).append(startStr).append("=").append(endStr).append(StringUtils.SEPARATOR); - } - } - return sb.deleteCharAt(sb.length() - 1).toString(); - } else { - return this.columnComment; - } - } -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/mapper/GenTableColumnMapper.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/mapper/GenTableColumnMapper.java deleted file mode 100644 index 286fc18..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/mapper/GenTableColumnMapper.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.xmzs.generator.mapper; - -import com.baomidou.mybatisplus.annotation.InterceptorIgnore; -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.generator.domain.GenTableColumn; - -import java.util.List; - -/** - * 涓氬姟瀛楁 鏁版嵁灞� - * - * @author Lion Li - */ -@InterceptorIgnore(dataPermission = "true", tenantLine = "true") -public interface GenTableColumnMapper extends BaseMapperPlus<GenTableColumn, GenTableColumn> { - /** - * 鏍规嵁琛ㄥ悕绉版煡璇㈠垪淇℃伅 - * - * @param tableName 琛ㄥ悕绉� - * @return 鍒椾俊鎭� - */ - List<GenTableColumn> selectDbTableColumnsByName(String tableName); - -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/mapper/GenTableMapper.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/mapper/GenTableMapper.java deleted file mode 100644 index e43567c..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/mapper/GenTableMapper.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.xmzs.generator.mapper; - -import com.baomidou.mybatisplus.annotation.InterceptorIgnore; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.generator.domain.GenTable; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 涓氬姟 鏁版嵁灞� - * - * @author Lion Li - */ -@InterceptorIgnore(dataPermission = "true", tenantLine = "true") -public interface GenTableMapper extends BaseMapperPlus<GenTable, GenTable> { - - /** - * 鏌ヨ鎹簱鍒楄〃 - * - * @param genTable 鏌ヨ鏉′欢 - * @return 鏁版嵁搴撹〃闆嗗悎 - */ - Page<GenTable> selectPageDbTableList(@Param("page") Page<GenTable> page, @Param("genTable") GenTable genTable); - - /** - * 鏌ヨ鎹簱鍒楄〃 - * - * @param tableNames 琛ㄥ悕绉扮粍 - * @return 鏁版嵁搴撹〃闆嗗悎 - */ - List<GenTable> selectDbTableListByNames(String[] tableNames); - - /** - * 鏌ヨ鎵�鏈夎〃淇℃伅 - * - * @return 琛ㄤ俊鎭泦鍚� - */ - List<GenTable> selectGenTableAll(); - - /** - * 鏌ヨ琛↖D涓氬姟淇℃伅 - * - * @param id 涓氬姟ID - * @return 涓氬姟淇℃伅 - */ - GenTable selectGenTableById(Long id); - - /** - * 鏌ヨ琛ㄥ悕绉颁笟鍔′俊鎭� - * - * @param tableName 琛ㄥ悕绉� - * @return 涓氬姟淇℃伅 - */ - GenTable selectGenTableByName(String tableName); - -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/service/GenTableServiceImpl.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/service/GenTableServiceImpl.java deleted file mode 100644 index f2c6c64..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/service/GenTableServiceImpl.java +++ /dev/null @@ -1,459 +0,0 @@ -package com.xmzs.generator.service; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.io.IoUtil; -import cn.hutool.core.lang.Dict; -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.dynamic.datasource.annotation.DS; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.constant.Constants; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.utils.StreamUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.core.utils.file.FileUtils; -import com.xmzs.common.json.utils.JsonUtils; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.generator.constant.GenConstants; -import com.xmzs.generator.domain.GenTable; -import com.xmzs.generator.domain.GenTableColumn; -import com.xmzs.generator.mapper.GenTableColumnMapper; -import com.xmzs.generator.mapper.GenTableMapper; -import com.xmzs.generator.util.GenUtils; -import com.xmzs.generator.util.VelocityInitializer; -import com.xmzs.generator.util.VelocityUtils; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.apache.velocity.Template; -import org.apache.velocity.VelocityContext; -import org.apache.velocity.app.Velocity; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.io.StringWriter; -import java.nio.charset.StandardCharsets; -import java.util.*; -import java.util.zip.ZipEntry; -import java.util.zip.ZipOutputStream; - -/** - * 涓氬姟 鏈嶅姟灞傚疄鐜� - * - * @author Lion Li - */ -@DS("#header.datasource") -@Slf4j -@RequiredArgsConstructor -@Service -public class GenTableServiceImpl implements IGenTableService { - - private final GenTableMapper baseMapper; - private final GenTableColumnMapper genTableColumnMapper; - private final IdentifierGenerator identifierGenerator; - - /** - * 鏌ヨ涓氬姟瀛楁鍒楄〃 - * - * @param tableId 涓氬姟瀛楁缂栧彿 - * @return 涓氬姟瀛楁闆嗗悎 - */ - @Override - public List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId) { - return genTableColumnMapper.selectList(new LambdaQueryWrapper<GenTableColumn>() - .eq(GenTableColumn::getTableId, tableId) - .orderByAsc(GenTableColumn::getSort)); - } - - /** - * 鏌ヨ涓氬姟淇℃伅 - * - * @param id 涓氬姟ID - * @return 涓氬姟淇℃伅 - */ - @Override - public GenTable selectGenTableById(Long id) { - GenTable genTable = baseMapper.selectGenTableById(id); - setTableFromOptions(genTable); - return genTable; - } - - @Override - public TableDataInfo<GenTable> selectPageGenTableList(GenTable genTable, PageQuery pageQuery) { - Page<GenTable> page = baseMapper.selectPage(pageQuery.build(), this.buildGenTableQueryWrapper(genTable)); - return TableDataInfo.build(page); - } - - private QueryWrapper<GenTable> buildGenTableQueryWrapper(GenTable genTable) { - Map<String, Object> params = genTable.getParams(); - QueryWrapper<GenTable> wrapper = Wrappers.query(); - wrapper.like(StringUtils.isNotBlank(genTable.getTableName()), "lower(table_name)", StringUtils.lowerCase(genTable.getTableName())) - .like(StringUtils.isNotBlank(genTable.getTableComment()), "lower(table_comment)", StringUtils.lowerCase(genTable.getTableComment())) - .between(params.get("beginTime") != null && params.get("endTime") != null, - "create_time", params.get("beginTime"), params.get("endTime")); - return wrapper; - } - - - @Override - public TableDataInfo<GenTable> selectPageDbTableList(GenTable genTable, PageQuery pageQuery) { - Page<GenTable> page = baseMapper.selectPageDbTableList(pageQuery.build(), genTable); - return TableDataInfo.build(page); - } - - /** - * 鏌ヨ鎹簱鍒楄〃 - * - * @param tableNames 琛ㄥ悕绉扮粍 - * @return 鏁版嵁搴撹〃闆嗗悎 - */ - @Override - public List<GenTable> selectDbTableListByNames(String[] tableNames) { - return baseMapper.selectDbTableListByNames(tableNames); - } - - /** - * 鏌ヨ鎵�鏈夎〃淇℃伅 - * - * @return 琛ㄤ俊鎭泦鍚� - */ - @Override - public List<GenTable> selectGenTableAll() { - return baseMapper.selectGenTableAll(); - } - - /** - * 淇敼涓氬姟 - * - * @param genTable 涓氬姟淇℃伅 - * @return 缁撴灉 - */ - @Transactional(rollbackFor = Exception.class) - @Override - public void updateGenTable(GenTable genTable) { - String options = JsonUtils.toJsonString(genTable.getParams()); - genTable.setOptions(options); - int row = baseMapper.updateById(genTable); - if (row > 0) { - for (GenTableColumn cenTableColumn : genTable.getColumns()) { - genTableColumnMapper.updateById(cenTableColumn); - } - } - } - - /** - * 鍒犻櫎涓氬姟瀵硅薄 - * - * @param tableIds 闇�瑕佸垹闄ょ殑鏁版嵁ID - * @return 缁撴灉 - */ - @Transactional(rollbackFor = Exception.class) - @Override - public void deleteGenTableByIds(Long[] tableIds) { - List<Long> ids = Arrays.asList(tableIds); - baseMapper.deleteBatchIds(ids); - genTableColumnMapper.delete(new LambdaQueryWrapper<GenTableColumn>().in(GenTableColumn::getTableId, ids)); - } - - /** - * 瀵煎叆琛ㄧ粨鏋� - * - * @param tableList 瀵煎叆琛ㄥ垪琛� - */ - @Transactional(rollbackFor = Exception.class) - @Override - public void importGenTable(List<GenTable> tableList) { - String operName = LoginHelper.getUsername(); - try { - for (GenTable table : tableList) { - String tableName = table.getTableName(); - GenUtils.initTable(table, operName); - int row = baseMapper.insert(table); - if (row > 0) { - // 淇濆瓨鍒椾俊鎭� - List<GenTableColumn> genTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName); - List<GenTableColumn> saveColumns = new ArrayList<>(); - for (GenTableColumn column : genTableColumns) { - GenUtils.initColumnField(column, table); - saveColumns.add(column); - } - if (CollUtil.isNotEmpty(saveColumns)) { - genTableColumnMapper.insertBatch(saveColumns); - } - } - } - } catch (Exception e) { - throw new ServiceException("瀵煎叆澶辫触锛�" + e.getMessage()); - } - } - - /** - * 棰勮浠g爜 - * - * @param tableId 琛ㄧ紪鍙� - * @return 棰勮鏁版嵁鍒楄〃 - */ - @Override - public Map<String, String> previewCode(Long tableId) { - Map<String, String> dataMap = new LinkedHashMap<>(); - // 鏌ヨ琛ㄤ俊鎭� - GenTable table = baseMapper.selectGenTableById(tableId); - List<Long> menuIds = new ArrayList<>(); - for (int i = 0; i < 6; i++) { - menuIds.add(identifierGenerator.nextId(null).longValue()); - } - table.setMenuIds(menuIds); - // 璁剧疆涓婚敭鍒椾俊鎭� - setPkColumn(table); - VelocityInitializer.initVelocity(); - - VelocityContext context = VelocityUtils.prepareContext(table); - - // 鑾峰彇妯℃澘鍒楄〃 - List<String> templates = VelocityUtils.getTemplateList(table.getTplCategory()); - for (String template : templates) { - // 娓叉煋妯℃澘 - StringWriter sw = new StringWriter(); - Template tpl = Velocity.getTemplate(template, Constants.UTF8); - tpl.merge(context, sw); - dataMap.put(template, sw.toString()); - } - return dataMap; - } - - /** - * 鐢熸垚浠g爜锛堜笅杞芥柟寮忥級 - * - * @param tableName 琛ㄥ悕绉� - * @return 鏁版嵁 - */ - @Override - public byte[] downloadCode(String tableName) { - ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - ZipOutputStream zip = new ZipOutputStream(outputStream); - generatorCode(tableName, zip); - IoUtil.close(zip); - return outputStream.toByteArray(); - } - - /** - * 鐢熸垚浠g爜锛堣嚜瀹氫箟璺緞锛� - * - * @param tableName 琛ㄥ悕绉� - */ - @Override - public void generatorCode(String tableName) { - // 鏌ヨ琛ㄤ俊鎭� - GenTable table = baseMapper.selectGenTableByName(tableName); - // 璁剧疆涓婚敭鍒椾俊鎭� - setPkColumn(table); - - VelocityInitializer.initVelocity(); - - VelocityContext context = VelocityUtils.prepareContext(table); - - // 鑾峰彇妯℃澘鍒楄〃 - List<String> templates = VelocityUtils.getTemplateList(table.getTplCategory()); - for (String template : templates) { - if (!StringUtils.containsAny(template, "sql.vm", "api.ts.vm", "types.ts.vm", "index.vue.vm", "index-tree.vue.vm")) { - // 娓叉煋妯℃澘 - StringWriter sw = new StringWriter(); - Template tpl = Velocity.getTemplate(template, Constants.UTF8); - tpl.merge(context, sw); - try { - String path = getGenPath(table, template); - FileUtils.writeUtf8String(sw.toString(), path); - } catch (Exception e) { - throw new ServiceException("娓叉煋妯℃澘澶辫触锛岃〃鍚嶏細" + table.getTableName()); - } - } - } - } - - /** - * 鍚屾鏁版嵁搴� - * - * @param tableName 琛ㄥ悕绉� - */ - @Transactional(rollbackFor = Exception.class) - @Override - public void synchDb(String tableName) { - GenTable table = baseMapper.selectGenTableByName(tableName); - List<GenTableColumn> tableColumns = table.getColumns(); - Map<String, GenTableColumn> tableColumnMap = StreamUtils.toIdentityMap(tableColumns, GenTableColumn::getColumnName); - - List<GenTableColumn> dbTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName); - if (CollUtil.isEmpty(dbTableColumns)) { - throw new ServiceException("鍚屾鏁版嵁澶辫触锛屽師琛ㄧ粨鏋勪笉瀛樺湪"); - } - List<String> dbTableColumnNames = StreamUtils.toList(dbTableColumns, GenTableColumn::getColumnName); - - List<GenTableColumn> saveColumns = new ArrayList<>(); - dbTableColumns.forEach(column -> { - GenUtils.initColumnField(column, table); - if (tableColumnMap.containsKey(column.getColumnName())) { - GenTableColumn prevColumn = tableColumnMap.get(column.getColumnName()); - column.setColumnId(prevColumn.getColumnId()); - if (column.isList()) { - // 濡傛灉鏄垪琛紝缁х画淇濈暀鏌ヨ鏂瑰紡/瀛楀吀绫诲瀷閫夐」 - column.setDictType(prevColumn.getDictType()); - column.setQueryType(prevColumn.getQueryType()); - } - if (StringUtils.isNotEmpty(prevColumn.getIsRequired()) && !column.isPk() - && (column.isInsert() || column.isEdit()) - && ((column.isUsableColumn()) || (!column.isSuperColumn()))) { - // 濡傛灉鏄�(鏂板/淇敼&闈炰富閿�/闈炲拷鐣ュ強鐖跺睘鎬�)锛岀户缁繚鐣欏繀濉�/鏄剧ず绫诲瀷閫夐」 - column.setIsRequired(prevColumn.getIsRequired()); - column.setHtmlType(prevColumn.getHtmlType()); - } - } - saveColumns.add(column); - }); - if (CollUtil.isNotEmpty(saveColumns)) { - genTableColumnMapper.insertOrUpdateBatch(saveColumns); - } - List<GenTableColumn> delColumns = StreamUtils.filter(tableColumns, column -> !dbTableColumnNames.contains(column.getColumnName())); - if (CollUtil.isNotEmpty(delColumns)) { - List<Long> ids = StreamUtils.toList(delColumns, GenTableColumn::getColumnId); - genTableColumnMapper.deleteBatchIds(ids); - } - } - - /** - * 鎵归噺鐢熸垚浠g爜锛堜笅杞芥柟寮忥級 - * - * @param tableNames 琛ㄦ暟缁� - * @return 鏁版嵁 - */ - @Override - public byte[] downloadCode(String[] tableNames) { - ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - ZipOutputStream zip = new ZipOutputStream(outputStream); - for (String tableName : tableNames) { - generatorCode(tableName, zip); - } - IoUtil.close(zip); - return outputStream.toByteArray(); - } - - /** - * 鏌ヨ琛ㄤ俊鎭苟鐢熸垚浠g爜 - */ - private void generatorCode(String tableName, ZipOutputStream zip) { - // 鏌ヨ琛ㄤ俊鎭� - GenTable table = baseMapper.selectGenTableByName(tableName); - List<Long> menuIds = new ArrayList<>(); - for (int i = 0; i < 6; i++) { - menuIds.add(identifierGenerator.nextId(null).longValue()); - } - table.setMenuIds(menuIds); - // 璁剧疆涓婚敭鍒椾俊鎭� - setPkColumn(table); - - VelocityInitializer.initVelocity(); - - VelocityContext context = VelocityUtils.prepareContext(table); - - // 鑾峰彇妯℃澘鍒楄〃 - List<String> templates = VelocityUtils.getTemplateList(table.getTplCategory()); - for (String template : templates) { - // 娓叉煋妯℃澘 - StringWriter sw = new StringWriter(); - Template tpl = Velocity.getTemplate(template, Constants.UTF8); - tpl.merge(context, sw); - try { - // 娣诲姞鍒皕ip - zip.putNextEntry(new ZipEntry(VelocityUtils.getFileName(template, table))); - IoUtil.write(zip, StandardCharsets.UTF_8, false, sw.toString()); - IoUtil.close(sw); - zip.flush(); - zip.closeEntry(); - } catch (IOException e) { - log.error("娓叉煋妯℃澘澶辫触锛岃〃鍚嶏細" + table.getTableName(), e); - } - } - } - - /** - * 淇敼淇濆瓨鍙傛暟鏍¢獙 - * - * @param genTable 涓氬姟淇℃伅 - */ - @Override - public void validateEdit(GenTable genTable) { - if (GenConstants.TPL_TREE.equals(genTable.getTplCategory())) { - String options = JsonUtils.toJsonString(genTable.getParams()); - Dict paramsObj = JsonUtils.parseMap(options); - if (StringUtils.isEmpty(paramsObj.getStr(GenConstants.TREE_CODE))) { - throw new ServiceException("鏍戠紪鐮佸瓧娈典笉鑳戒负绌�"); - } else if (StringUtils.isEmpty(paramsObj.getStr(GenConstants.TREE_PARENT_CODE))) { - throw new ServiceException("鏍戠埗缂栫爜瀛楁涓嶈兘涓虹┖"); - } else if (StringUtils.isEmpty(paramsObj.getStr(GenConstants.TREE_NAME))) { - throw new ServiceException("鏍戝悕绉板瓧娈典笉鑳戒负绌�"); - } - } - } - - /** - * 璁剧疆涓婚敭鍒椾俊鎭� - * - * @param table 涓氬姟琛ㄤ俊鎭� - */ - public void setPkColumn(GenTable table) { - for (GenTableColumn column : table.getColumns()) { - if (column.isPk()) { - table.setPkColumn(column); - break; - } - } - if (ObjectUtil.isNull(table.getPkColumn())) { - table.setPkColumn(table.getColumns().get(0)); - } - - } - - /** - * 璁剧疆浠g爜鐢熸垚鍏朵粬閫夐」鍊� - * - * @param genTable 璁剧疆鍚庣殑鐢熸垚瀵硅薄 - */ - public void setTableFromOptions(GenTable genTable) { - Dict paramsObj = JsonUtils.parseMap(genTable.getOptions()); - if (ObjectUtil.isNotNull(paramsObj)) { - String treeCode = paramsObj.getStr(GenConstants.TREE_CODE); - String treeParentCode = paramsObj.getStr(GenConstants.TREE_PARENT_CODE); - String treeName = paramsObj.getStr(GenConstants.TREE_NAME); - String parentMenuId = paramsObj.getStr(GenConstants.PARENT_MENU_ID); - String parentMenuName = paramsObj.getStr(GenConstants.PARENT_MENU_NAME); - - genTable.setTreeCode(treeCode); - genTable.setTreeParentCode(treeParentCode); - genTable.setTreeName(treeName); - genTable.setParentMenuId(parentMenuId); - genTable.setParentMenuName(parentMenuName); - } - } - - /** - * 鑾峰彇浠g爜鐢熸垚鍦板潃 - * - * @param table 涓氬姟琛ㄤ俊鎭� - * @param template 妯℃澘鏂囦欢璺緞 - * @return 鐢熸垚鍦板潃 - */ - public static String getGenPath(GenTable table, String template) { - String genPath = table.getGenPath(); - if (StringUtils.equals(genPath, "/")) { - return System.getProperty("user.dir") + File.separator + "src" + File.separator + VelocityUtils.getFileName(template, table); - } - return genPath + File.separator + VelocityUtils.getFileName(template, table); - } -} - diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/service/IGenTableService.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/service/IGenTableService.java deleted file mode 100644 index 0df97e7..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/service/IGenTableService.java +++ /dev/null @@ -1,133 +0,0 @@ -package com.xmzs.generator.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.generator.domain.GenTable; -import com.xmzs.generator.domain.GenTableColumn; - -import java.util.List; -import java.util.Map; - -/** - * 涓氬姟 鏈嶅姟灞� - * - * @author Lion Li - */ -public interface IGenTableService { - - /** - * 鏌ヨ涓氬姟瀛楁鍒楄〃 - * - * @param tableId 涓氬姟瀛楁缂栧彿 - * @return 涓氬姟瀛楁闆嗗悎 - */ - List<GenTableColumn> selectGenTableColumnListByTableId(Long tableId); - - /** - * 鏌ヨ涓氬姟鍒楄〃 - * - * @param genTable 涓氬姟淇℃伅 - * @return 涓氬姟闆嗗悎 - */ - TableDataInfo<GenTable> selectPageGenTableList(GenTable genTable, PageQuery pageQuery); - - /** - * 鏌ヨ鎹簱鍒楄〃 - * - * @param genTable 涓氬姟淇℃伅 - * @return 鏁版嵁搴撹〃闆嗗悎 - */ - TableDataInfo<GenTable> selectPageDbTableList(GenTable genTable, PageQuery pageQuery); - - /** - * 鏌ヨ鎹簱鍒楄〃 - * - * @param tableNames 琛ㄥ悕绉扮粍 - * @return 鏁版嵁搴撹〃闆嗗悎 - */ - List<GenTable> selectDbTableListByNames(String[] tableNames); - - /** - * 鏌ヨ鎵�鏈夎〃淇℃伅 - * - * @return 琛ㄤ俊鎭泦鍚� - */ - List<GenTable> selectGenTableAll(); - - /** - * 鏌ヨ涓氬姟淇℃伅 - * - * @param id 涓氬姟ID - * @return 涓氬姟淇℃伅 - */ - GenTable selectGenTableById(Long id); - - /** - * 淇敼涓氬姟 - * - * @param genTable 涓氬姟淇℃伅 - * @return 缁撴灉 - */ - void updateGenTable(GenTable genTable); - - /** - * 鍒犻櫎涓氬姟淇℃伅 - * - * @param tableIds 闇�瑕佸垹闄ょ殑琛ㄦ暟鎹甀D - * @return 缁撴灉 - */ - void deleteGenTableByIds(Long[] tableIds); - - /** - * 瀵煎叆琛ㄧ粨鏋� - * - * @param tableList 瀵煎叆琛ㄥ垪琛� - */ - void importGenTable(List<GenTable> tableList); - - /** - * 棰勮浠g爜 - * - * @param tableId 琛ㄧ紪鍙� - * @return 棰勮鏁版嵁鍒楄〃 - */ - Map<String, String> previewCode(Long tableId); - - /** - * 鐢熸垚浠g爜锛堜笅杞芥柟寮忥級 - * - * @param tableName 琛ㄥ悕绉� - * @return 鏁版嵁 - */ - byte[] downloadCode(String tableName); - - /** - * 鐢熸垚浠g爜锛堣嚜瀹氫箟璺緞锛� - * - * @param tableName 琛ㄥ悕绉� - * @return 鏁版嵁 - */ - void generatorCode(String tableName); - - /** - * 鍚屾鏁版嵁搴� - * - * @param tableName 琛ㄥ悕绉� - */ - void synchDb(String tableName); - - /** - * 鎵归噺鐢熸垚浠g爜锛堜笅杞芥柟寮忥級 - * - * @param tableNames 琛ㄦ暟缁� - * @return 鏁版嵁 - */ - byte[] downloadCode(String[] tableNames); - - /** - * 淇敼淇濆瓨鍙傛暟鏍¢獙 - * - * @param genTable 涓氬姟淇℃伅 - */ - void validateEdit(GenTable genTable); -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/util/GenUtils.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/util/GenUtils.java deleted file mode 100644 index 46da784..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/util/GenUtils.java +++ /dev/null @@ -1,233 +0,0 @@ -package com.xmzs.generator.util; - -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.generator.config.GenConfig; -import com.xmzs.generator.constant.GenConstants; -import com.xmzs.generator.domain.GenTable; -import com.xmzs.generator.domain.GenTableColumn; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import org.apache.commons.lang3.RegExUtils; - -import java.util.Arrays; - -/** - * 浠g爜鐢熸垚鍣� 宸ュ叿绫� - * - * @author ruoyi - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class GenUtils { - - /** - * 鍒濆鍖栬〃淇℃伅 - */ - public static void initTable(GenTable genTable, String operName) { - genTable.setClassName(convertClassName(genTable.getTableName())); - genTable.setPackageName(GenConfig.getPackageName()); - genTable.setModuleName(getModuleName(GenConfig.getPackageName())); - genTable.setBusinessName(getBusinessName(genTable.getTableName())); - genTable.setFunctionName(replaceText(genTable.getTableComment())); - genTable.setFunctionAuthor(GenConfig.getAuthor()); - genTable.setCreateBy(LoginHelper.getUserId()); - } - - /** - * 鍒濆鍖栧垪灞炴�у瓧娈� - */ - public static void initColumnField(GenTableColumn column, GenTable table) { - String dataType = getDbType(column.getColumnType()); - String columnName = column.getColumnName(); - column.setTableId(table.getTableId()); - column.setCreateBy(table.getCreateBy()); - // 璁剧疆java瀛楁鍚� - column.setJavaField(StringUtils.toCamelCase(columnName)); - // 璁剧疆榛樿绫诲瀷 - column.setJavaType(GenConstants.TYPE_STRING); - column.setQueryType(GenConstants.QUERY_EQ); - - if (arraysContains(GenConstants.COLUMNTYPE_STR, dataType) || arraysContains(GenConstants.COLUMNTYPE_TEXT, dataType)) { - // 瀛楃涓查暱搴﹁秴杩�500璁剧疆涓烘枃鏈煙 - Integer columnLength = getColumnLength(column.getColumnType()); - String htmlType = columnLength >= 500 || arraysContains(GenConstants.COLUMNTYPE_TEXT, dataType) ? GenConstants.HTML_TEXTAREA : GenConstants.HTML_INPUT; - column.setHtmlType(htmlType); - } else if (arraysContains(GenConstants.COLUMNTYPE_TIME, dataType)) { - column.setJavaType(GenConstants.TYPE_DATE); - column.setHtmlType(GenConstants.HTML_DATETIME); - } else if (arraysContains(GenConstants.COLUMNTYPE_NUMBER, dataType)) { - column.setHtmlType(GenConstants.HTML_INPUT); - - // 濡傛灉鏄诞鐐瑰瀷 缁熶竴鐢˙igDecimal - String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), StringUtils.SEPARATOR); - if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0) { - column.setJavaType(GenConstants.TYPE_BIGDECIMAL); - } - // 濡傛灉鏄暣褰� - else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10) { - column.setJavaType(GenConstants.TYPE_INTEGER); - } - // 闀挎暣褰� - else { - column.setJavaType(GenConstants.TYPE_LONG); - } - } - - // BO瀵硅薄 榛樿鎻掑叆鍕鹃�� - if (!arraysContains(GenConstants.COLUMNNAME_NOT_ADD, columnName) && !column.isPk()) { - column.setIsInsert(GenConstants.REQUIRE); - } - // BO瀵硅薄 榛樿缂栬緫鍕鹃�� - if (!arraysContains(GenConstants.COLUMNNAME_NOT_EDIT, columnName)) { - column.setIsEdit(GenConstants.REQUIRE); - } - // BO瀵硅薄 榛樿鏄惁蹇呭~鍕鹃�� - if (!arraysContains(GenConstants.COLUMNNAME_NOT_EDIT, columnName)) { - column.setIsRequired(GenConstants.REQUIRE); - } - // VO瀵硅薄 榛樿杩斿洖鍕鹃�� - if (!arraysContains(GenConstants.COLUMNNAME_NOT_LIST, columnName)) { - column.setIsList(GenConstants.REQUIRE); - } - // BO瀵硅薄 榛樿鏌ヨ鍕鹃�� - if (!arraysContains(GenConstants.COLUMNNAME_NOT_QUERY, columnName) && !column.isPk()) { - column.setIsQuery(GenConstants.REQUIRE); - } - - // 鏌ヨ瀛楁绫诲瀷 - if (StringUtils.endsWithIgnoreCase(columnName, "name")) { - column.setQueryType(GenConstants.QUERY_LIKE); - } - // 鐘舵�佸瓧娈佃缃崟閫夋 - if (StringUtils.endsWithIgnoreCase(columnName, "status")) { - column.setHtmlType(GenConstants.HTML_RADIO); - } - // 绫诲瀷&鎬у埆瀛楁璁剧疆涓嬫媺妗� - else if (StringUtils.endsWithIgnoreCase(columnName, "type") - || StringUtils.endsWithIgnoreCase(columnName, "sex")) { - column.setHtmlType(GenConstants.HTML_SELECT); - } - // 鍥剧墖瀛楁璁剧疆鍥剧墖涓婁紶鎺т欢 - else if (StringUtils.endsWithIgnoreCase(columnName, "image")) { - column.setHtmlType(GenConstants.HTML_IMAGE_UPLOAD); - } - // 鏂囦欢瀛楁璁剧疆鏂囦欢涓婁紶鎺т欢 - else if (StringUtils.endsWithIgnoreCase(columnName, "file")) { - column.setHtmlType(GenConstants.HTML_FILE_UPLOAD); - } - // 鍐呭瀛楁璁剧疆瀵屾枃鏈帶浠� - else if (StringUtils.endsWithIgnoreCase(columnName, "content")) { - column.setHtmlType(GenConstants.HTML_EDITOR); - } - } - - /** - * 鏍¢獙鏁扮粍鏄惁鍖呭惈鎸囧畾鍊� - * - * @param arr 鏁扮粍 - * @param targetValue 鍊� - * @return 鏄惁鍖呭惈 - */ - public static boolean arraysContains(String[] arr, String targetValue) { - return Arrays.asList(arr).contains(targetValue); - } - - /** - * 鑾峰彇妯″潡鍚� - * - * @param packageName 鍖呭悕 - * @return 妯″潡鍚� - */ - public static String getModuleName(String packageName) { - int lastIndex = packageName.lastIndexOf("."); - int nameLength = packageName.length(); - return StringUtils.substring(packageName, lastIndex + 1, nameLength); - } - - /** - * 鑾峰彇涓氬姟鍚� - * - * @param tableName 琛ㄥ悕 - * @return 涓氬姟鍚� - */ - public static String getBusinessName(String tableName) { - int firstIndex = tableName.indexOf("_"); - int nameLength = tableName.length(); - String businessName = StringUtils.substring(tableName, firstIndex + 1, nameLength); - businessName = StringUtils.toCamelCase(businessName); - return businessName; - } - - /** - * 琛ㄥ悕杞崲鎴怞ava绫诲悕 - * - * @param tableName 琛ㄥ悕绉� - * @return 绫诲悕 - */ - public static String convertClassName(String tableName) { - boolean autoRemovePre = GenConfig.getAutoRemovePre(); - String tablePrefix = GenConfig.getTablePrefix(); - if (autoRemovePre && StringUtils.isNotEmpty(tablePrefix)) { - String[] searchList = StringUtils.split(tablePrefix, StringUtils.SEPARATOR); - tableName = replaceFirst(tableName, searchList); - } - return StringUtils.convertToCamelCase(tableName); - } - - /** - * 鎵归噺鏇挎崲鍓嶇紑 - * - * @param replacementm 鏇挎崲鍊� - * @param searchList 鏇挎崲鍒楄〃 - * @return - */ - public static String replaceFirst(String replacementm, String[] searchList) { - String text = replacementm; - for (String searchString : searchList) { - if (replacementm.startsWith(searchString)) { - text = replacementm.replaceFirst(searchString, ""); - break; - } - } - return text; - } - - /** - * 鍏抽敭瀛楁浛鎹� - * - * @param text 闇�瑕佽鏇挎崲鐨勫悕瀛� - * @return 鏇挎崲鍚庣殑鍚嶅瓧 - */ - public static String replaceText(String text) { - return RegExUtils.replaceAll(text, "(?:琛▅鑻ヤ緷)", ""); - } - - /** - * 鑾峰彇鏁版嵁搴撶被鍨嬪瓧娈� - * - * @param columnType 鍒楃被鍨� - * @return 鎴彇鍚庣殑鍒楃被鍨� - */ - public static String getDbType(String columnType) { - if (StringUtils.indexOf(columnType, '(') > 0) { - return StringUtils.substringBefore(columnType, "("); - } else { - return columnType; - } - } - - /** - * 鑾峰彇瀛楁闀垮害 - * - * @param columnType 鍒楃被鍨� - * @return 鎴彇鍚庣殑鍒楃被鍨� - */ - public static Integer getColumnLength(String columnType) { - if (StringUtils.indexOf(columnType, '(') > 0) { - String length = StringUtils.substringBetween(columnType, "(", ")"); - return Integer.valueOf(length); - } else { - return 0; - } - } -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/util/VelocityInitializer.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/util/VelocityInitializer.java deleted file mode 100644 index 8485ff3..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/util/VelocityInitializer.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.xmzs.generator.util; - -import com.xmzs.common.core.constant.Constants; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import org.apache.velocity.app.Velocity; - -import java.util.Properties; - -/** - * VelocityEngine宸ュ巶 - * - * @author ruoyi - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class VelocityInitializer { - - /** - * 鍒濆鍖杤m鏂规硶 - */ - public static void initVelocity() { - Properties p = new Properties(); - try { - // 鍔犺浇classpath鐩綍涓嬬殑vm鏂囦欢 - p.setProperty("resource.loader.file.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); - // 瀹氫箟瀛楃闆� - p.setProperty(Velocity.INPUT_ENCODING, Constants.UTF8); - // 鍒濆鍖朧elocity寮曟搸锛屾寚瀹氶厤缃甈roperties - Velocity.init(p); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/util/VelocityUtils.java b/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/util/VelocityUtils.java deleted file mode 100644 index 47ca184..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/java/com/xmzs/generator/util/VelocityUtils.java +++ /dev/null @@ -1,338 +0,0 @@ -package com.xmzs.generator.util; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.convert.Convert; -import cn.hutool.core.lang.Dict; -import com.xmzs.common.core.utils.DateUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.json.utils.JsonUtils; -import com.xmzs.common.mybatis.helper.DataBaseHelper; -import com.xmzs.generator.constant.GenConstants; -import com.xmzs.generator.domain.GenTable; -import com.xmzs.generator.domain.GenTableColumn; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import org.apache.velocity.VelocityContext; - -import java.util.*; - -/** - * 妯℃澘澶勭悊宸ュ叿绫� - * - * @author ruoyi - */ -@NoArgsConstructor(access = AccessLevel.PRIVATE) -public class VelocityUtils { - - /** - * 椤圭洰绌洪棿璺緞 - */ - private static final String PROJECT_PATH = "main/java"; - - /** - * mybatis绌洪棿璺緞 - */ - private static final String MYBATIS_PATH = "main/resources/mapper"; - - /** - * 榛樿涓婄骇鑿滃崟锛岀郴缁熷伐鍏� - */ - private static final String DEFAULT_PARENT_MENU_ID = "3"; - - /** - * 璁剧疆妯℃澘鍙橀噺淇℃伅 - * - * @return 妯℃澘鍒楄〃 - */ - public static VelocityContext prepareContext(GenTable genTable) { - String moduleName = genTable.getModuleName(); - String businessName = genTable.getBusinessName(); - String packageName = genTable.getPackageName(); - String tplCategory = genTable.getTplCategory(); - String functionName = genTable.getFunctionName(); - - VelocityContext velocityContext = new VelocityContext(); - velocityContext.put("tplCategory", genTable.getTplCategory()); - velocityContext.put("tableName", genTable.getTableName()); - velocityContext.put("functionName", StringUtils.isNotEmpty(functionName) ? functionName : "銆愯濉啓鍔熻兘鍚嶇О銆�"); - velocityContext.put("ClassName", genTable.getClassName()); - velocityContext.put("className", StringUtils.uncapitalize(genTable.getClassName())); - velocityContext.put("moduleName", genTable.getModuleName()); - velocityContext.put("BusinessName", StringUtils.capitalize(genTable.getBusinessName())); - velocityContext.put("businessName", genTable.getBusinessName()); - velocityContext.put("basePackage", getPackagePrefix(packageName)); - velocityContext.put("packageName", packageName); - velocityContext.put("author", genTable.getFunctionAuthor()); - velocityContext.put("datetime", DateUtils.getDate()); - velocityContext.put("pkColumn", genTable.getPkColumn()); - velocityContext.put("importList", getImportList(genTable)); - velocityContext.put("permissionPrefix", getPermissionPrefix(moduleName, businessName)); - velocityContext.put("columns", genTable.getColumns()); - velocityContext.put("table", genTable); - velocityContext.put("dicts", getDicts(genTable)); - setMenuVelocityContext(velocityContext, genTable); - if (GenConstants.TPL_TREE.equals(tplCategory)) { - setTreeVelocityContext(velocityContext, genTable); - } - return velocityContext; - } - - public static void setMenuVelocityContext(VelocityContext context, GenTable genTable) { - String options = genTable.getOptions(); - Dict paramsObj = JsonUtils.parseMap(options); - String parentMenuId = getParentMenuId(paramsObj); - context.put("parentMenuId", parentMenuId); - } - - public static void setTreeVelocityContext(VelocityContext context, GenTable genTable) { - String options = genTable.getOptions(); - Dict paramsObj = JsonUtils.parseMap(options); - String treeCode = getTreecode(paramsObj); - String treeParentCode = getTreeParentCode(paramsObj); - String treeName = getTreeName(paramsObj); - - context.put("treeCode", treeCode); - context.put("treeParentCode", treeParentCode); - context.put("treeName", treeName); - context.put("expandColumn", getExpandColumn(genTable)); - if (paramsObj.containsKey(GenConstants.TREE_PARENT_CODE)) { - context.put("tree_parent_code", paramsObj.get(GenConstants.TREE_PARENT_CODE)); - } - if (paramsObj.containsKey(GenConstants.TREE_NAME)) { - context.put("tree_name", paramsObj.get(GenConstants.TREE_NAME)); - } - } - - /** - * 鑾峰彇妯℃澘淇℃伅 - * - * @return 妯℃澘鍒楄〃 - */ - public static List<String> getTemplateList(String tplCategory) { - List<String> templates = new ArrayList<String>(); - templates.add("vm/java/domain.java.vm"); - templates.add("vm/java/vo.java.vm"); - templates.add("vm/java/bo.java.vm"); - templates.add("vm/java/mapper.java.vm"); - templates.add("vm/java/service.java.vm"); - templates.add("vm/java/serviceImpl.java.vm"); - templates.add("vm/java/controller.java.vm"); - templates.add("vm/xml/mapper.xml.vm"); - if (DataBaseHelper.isOracle()) { - templates.add("vm/sql/oracle/sql.vm"); - } else if (DataBaseHelper.isPostgerSql()) { - templates.add("vm/sql/postgres/sql.vm"); - } else if (DataBaseHelper.isSqlServer()) { - templates.add("vm/sql/sqlserver/sql.vm"); - } else { - templates.add("vm/sql/sql.vm"); - } - templates.add("vm/ts/api.ts.vm"); - templates.add("vm/ts/types.ts.vm"); - if (GenConstants.TPL_CRUD.equals(tplCategory)) { - templates.add("vm/vue/index.vue.vm"); - } else if (GenConstants.TPL_TREE.equals(tplCategory)) { - templates.add("vm/vue/index-tree.vue.vm"); - } - return templates; - } - - /** - * 鑾峰彇鏂囦欢鍚� - */ - public static String getFileName(String template, GenTable genTable) { - // 鏂囦欢鍚嶇О - String fileName = ""; - // 鍖呰矾寰� - String packageName = genTable.getPackageName(); - // 妯″潡鍚� - String moduleName = genTable.getModuleName(); - // 澶у啓绫诲悕 - String className = genTable.getClassName(); - // 涓氬姟鍚嶇О - String businessName = genTable.getBusinessName(); - - String javaPath = PROJECT_PATH + "/" + StringUtils.replace(packageName, ".", "/"); - String mybatisPath = MYBATIS_PATH + "/" + moduleName; - String vuePath = "vue"; - - if (template.contains("domain.java.vm")) { - fileName = StringUtils.format("{}/domain/{}.java", javaPath, className); - } - if (template.contains("vo.java.vm")) { - fileName = StringUtils.format("{}/domain/vo/{}Vo.java", javaPath, className); - } - if (template.contains("bo.java.vm")) { - fileName = StringUtils.format("{}/domain/bo/{}Bo.java", javaPath, className); - } - if (template.contains("mapper.java.vm")) { - fileName = StringUtils.format("{}/mapper/{}Mapper.java", javaPath, className); - } else if (template.contains("service.java.vm")) { - fileName = StringUtils.format("{}/service/I{}Service.java", javaPath, className); - } else if (template.contains("serviceImpl.java.vm")) { - fileName = StringUtils.format("{}/service/impl/{}ServiceImpl.java", javaPath, className); - } else if (template.contains("controller.java.vm")) { - fileName = StringUtils.format("{}/controller/{}Controller.java", javaPath, className); - } else if (template.contains("mapper.xml.vm")) { - fileName = StringUtils.format("{}/{}Mapper.xml", mybatisPath, className); - } else if (template.contains("sql.vm")) { - fileName = businessName + "Menu.sql"; - } else if (template.contains("api.ts.vm")) { - fileName = StringUtils.format("{}/api/{}/{}/index.ts", vuePath, moduleName, businessName); - } else if (template.contains("types.ts.vm")) { - fileName = StringUtils.format("{}/api/{}/{}/types.ts", vuePath, moduleName, businessName); - } else if (template.contains("index.vue.vm")) { - fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName); - } else if (template.contains("index-tree.vue.vm")) { - fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName); - } - return fileName; - } - - /** - * 鑾峰彇鍖呭墠缂� - * - * @param packageName 鍖呭悕绉� - * @return 鍖呭墠缂�鍚嶇О - */ - public static String getPackagePrefix(String packageName) { - int lastIndex = packageName.lastIndexOf("."); - return StringUtils.substring(packageName, 0, lastIndex); - } - - /** - * 鏍规嵁鍒楃被鍨嬭幏鍙栧鍏ュ寘 - * - * @param genTable 涓氬姟琛ㄥ璞� - * @return 杩斿洖闇�瑕佸鍏ョ殑鍖呭垪琛� - */ - public static HashSet<String> getImportList(GenTable genTable) { - List<GenTableColumn> columns = genTable.getColumns(); - HashSet<String> importList = new HashSet<String>(); - for (GenTableColumn column : columns) { - if (!column.isSuperColumn() && GenConstants.TYPE_DATE.equals(column.getJavaType())) { - importList.add("java.util.Date"); - importList.add("com.fasterxml.jackson.annotation.JsonFormat"); - } else if (!column.isSuperColumn() && GenConstants.TYPE_BIGDECIMAL.equals(column.getJavaType())) { - importList.add("java.math.BigDecimal"); - } - } - return importList; - } - - /** - * 鏍规嵁鍒楃被鍨嬭幏鍙栧瓧鍏哥粍 - * - * @param genTable 涓氬姟琛ㄥ璞� - * @return 杩斿洖瀛楀吀缁� - */ - public static String getDicts(GenTable genTable) { - List<GenTableColumn> columns = genTable.getColumns(); - Set<String> dicts = new HashSet<>(); - addDicts(dicts, columns); - return StringUtils.join(dicts, ", "); - } - - /** - * 娣诲姞瀛楀吀鍒楄〃 - * - * @param dicts 瀛楀吀鍒楄〃 - * @param columns 鍒楅泦鍚� - */ - public static void addDicts(Set<String> dicts, List<GenTableColumn> columns) { - for (GenTableColumn column : columns) { - if (!column.isSuperColumn() && StringUtils.isNotEmpty(column.getDictType()) && StringUtils.equalsAny( - column.getHtmlType(), - new String[] { GenConstants.HTML_SELECT, GenConstants.HTML_RADIO, GenConstants.HTML_CHECKBOX })) { - dicts.add("'" + column.getDictType() + "'"); - } - } - } - - /** - * 鑾峰彇鏉冮檺鍓嶇紑 - * - * @param moduleName 妯″潡鍚嶇О - * @param businessName 涓氬姟鍚嶇О - * @return 杩斿洖鏉冮檺鍓嶇紑 - */ - public static String getPermissionPrefix(String moduleName, String businessName) { - return StringUtils.format("{}:{}", moduleName, businessName); - } - - /** - * 鑾峰彇涓婄骇鑿滃崟ID瀛楁 - * - * @param paramsObj 鐢熸垚鍏朵粬閫夐」 - * @return 涓婄骇鑿滃崟ID瀛楁 - */ - public static String getParentMenuId(Dict paramsObj) { - if (CollUtil.isNotEmpty(paramsObj) && paramsObj.containsKey(GenConstants.PARENT_MENU_ID) - && StringUtils.isNotEmpty(paramsObj.getStr(GenConstants.PARENT_MENU_ID))) { - return paramsObj.getStr(GenConstants.PARENT_MENU_ID); - } - return DEFAULT_PARENT_MENU_ID; - } - - /** - * 鑾峰彇鏍戠紪鐮� - * - * @param paramsObj 鐢熸垚鍏朵粬閫夐」 - * @return 鏍戠紪鐮� - */ - public static String getTreecode(Map<String, Object> paramsObj) { - if (CollUtil.isNotEmpty(paramsObj) && paramsObj.containsKey(GenConstants.TREE_CODE)) { - return StringUtils.toCamelCase(Convert.toStr(paramsObj.get(GenConstants.TREE_CODE))); - } - return StringUtils.EMPTY; - } - - /** - * 鑾峰彇鏍戠埗缂栫爜 - * - * @param paramsObj 鐢熸垚鍏朵粬閫夐」 - * @return 鏍戠埗缂栫爜 - */ - public static String getTreeParentCode(Dict paramsObj) { - if (CollUtil.isNotEmpty(paramsObj) && paramsObj.containsKey(GenConstants.TREE_PARENT_CODE)) { - return StringUtils.toCamelCase(paramsObj.getStr(GenConstants.TREE_PARENT_CODE)); - } - return StringUtils.EMPTY; - } - - /** - * 鑾峰彇鏍戝悕绉� - * - * @param paramsObj 鐢熸垚鍏朵粬閫夐」 - * @return 鏍戝悕绉� - */ - public static String getTreeName(Dict paramsObj) { - if (CollUtil.isNotEmpty(paramsObj) && paramsObj.containsKey(GenConstants.TREE_NAME)) { - return StringUtils.toCamelCase(paramsObj.getStr(GenConstants.TREE_NAME)); - } - return StringUtils.EMPTY; - } - - /** - * 鑾峰彇闇�瑕佸湪鍝竴鍒椾笂闈㈡樉绀哄睍寮�鎸夐挳 - * - * @param genTable 涓氬姟琛ㄥ璞� - * @return 灞曞紑鎸夐挳鍒楀簭鍙� - */ - public static int getExpandColumn(GenTable genTable) { - String options = genTable.getOptions(); - Dict paramsObj = JsonUtils.parseMap(options); - String treeName = paramsObj.getStr(GenConstants.TREE_NAME); - int num = 0; - for (GenTableColumn column : genTable.getColumns()) { - if (column.isList()) { - num++; - String columnName = column.getColumnName(); - if (columnName.equals(treeName)) { - break; - } - } - } - return num; - } -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/generator.yml b/ruoyi-modules/ruoyi-generator/src/main/resources/generator.yml deleted file mode 100644 index 5dc7a19..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/generator.yml +++ /dev/null @@ -1,10 +0,0 @@ -# 浠g爜鐢熸垚 -gen: - # 浣滆�� - author: Lion Li - # 榛樿鐢熸垚鍖呰矾寰� system 闇�鏀规垚鑷繁鐨勬ā鍧楀悕绉� 濡� system monitor tool - packageName: com.xmzs.system - # 鑷姩鍘婚櫎琛ㄥ墠缂�锛岄粯璁ゆ槸false - autoRemovePre: false - # 琛ㄥ墠缂�锛堢敓鎴愮被鍚嶄笉浼氬寘鍚〃鍓嶇紑锛屽涓敤閫楀彿鍒嗛殧锛� - tablePrefix: sys_ diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml b/ruoyi-modules/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml deleted file mode 100644 index 5749189..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml +++ /dev/null @@ -1,93 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE mapper -PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="com.xmzs.generator.mapper.GenTableColumnMapper"> - - <resultMap type="com.xmzs.generator.domain.GenTableColumn" id="GenTableColumnResult"> - </resultMap> - - <select id="selectDbTableColumnsByName" parameterType="String" resultMap="GenTableColumnResult"> - <if test="@com.xmzs.common.mybatis.helper.DataBaseHelper@isMySql()"> - select column_name, - (case when (is_nullable = 'no' <![CDATA[ && ]]> column_key != 'PRI') then '1' else null end) as is_required, - (case when column_key = 'PRI' then '1' else '0' end) as is_pk, - ordinal_position as sort, - column_comment, - (case when extra = 'auto_increment' then '1' else '0' end) as is_increment, - column_type - from information_schema.columns where table_schema = (select database()) and table_name = (#{tableName}) - order by ordinal_position - </if> - <if test="@com.xmzs.common.mybatis.helper.DataBaseHelper@isOracle()"> - select lower(temp.column_name) as column_name, - (case when (temp.nullable = 'N' and temp.constraint_type != 'P') then '1' else null end) as is_required, - (case when temp.constraint_type = 'P' then '1' else '0' end) as is_pk, - temp.column_id as sort, - temp.comments as column_comment, - (case when temp.constraint_type = 'P' then '1' else '0' end) as is_increment, - lower(temp.data_type) as column_type - from ( - select col.column_id, col.column_name,col.nullable, col.data_type, colc.comments, uc.constraint_type, row_number() - over (partition by col.column_name order by uc.constraint_type desc) as row_flg - from user_tab_columns col - left join user_col_comments colc on colc.table_name = col.table_name and colc.column_name = col.column_name - left join user_cons_columns ucc on ucc.table_name = col.table_name and ucc.column_name = col.column_name - left join user_constraints uc on uc.constraint_name = ucc.constraint_name - where col.table_name = upper(#{tableName}) - ) temp - WHERE temp.row_flg = 1 - ORDER BY temp.column_id - </if> - <if test="@com.xmzs.common.mybatis.helper.DataBaseHelper@isPostgerSql()"> - SELECT column_name, is_required, is_pk, sort, column_comment, is_increment, column_type - FROM ( - SELECT c.relname AS table_name, - a.attname AS column_name, - d.description AS column_comment, - CASE WHEN a.attnotnull AND con.conname IS NULL THEN 1 ELSE 0 - END AS is_required, - CASE WHEN con.conname IS NOT NULL THEN 1 ELSE 0 - END AS is_pk, - a.attnum AS sort, - CASE WHEN "position"(pg_get_expr(ad.adbin, ad.adrelid), - ((c.relname::text || '_'::text) || a.attname::text) || '_seq'::text) > 0 THEN 1 ELSE 0 - END AS is_increment, - btrim( - CASE WHEN t.typelem <![CDATA[ <> ]]> 0::oid AND t.typlen = '-1'::integer THEN 'ARRAY'::text ELSE - CASE WHEN t.typtype = 'd'::"char" THEN format_type(t.typbasetype, NULL::integer) - ELSE format_type(a.atttypid, NULL::integer) END - END, '"'::text - ) AS column_type - FROM pg_attribute a - JOIN (pg_class c JOIN pg_namespace n ON c.relnamespace = n.oid) ON a.attrelid = c.oid - LEFT JOIN pg_description d ON d.objoid = c.oid AND a.attnum = d.objsubid - LEFT JOIN pg_constraint con ON con.conrelid = c.oid AND (a.attnum = ANY (con.conkey)) - LEFT JOIN pg_attrdef ad ON a.attrelid = ad.adrelid AND a.attnum = ad.adnum - LEFT JOIN pg_type t ON a.atttypid = t.oid - WHERE (c.relkind = ANY (ARRAY ['r'::"char", 'p'::"char"])) - AND a.attnum > 0 - AND n.nspname = 'public'::name - ORDER BY c.relname, a.attnum - ) temp - WHERE table_name = (#{tableName}) - AND column_type <![CDATA[ <> ]]> '-' - </if> - <if test="@com.xmzs.common.mybatis.helper.DataBaseHelper@isSqlServer()"> - SELECT - cast(A.NAME as nvarchar) as column_name, - cast(B.NAME as nvarchar) + (case when B.NAME = 'numeric' then '(' + cast(A.prec as nvarchar) + ',' + cast(A.scale as nvarchar) + ')' else '' end) as column_type, - cast(G.[VALUE] as nvarchar) as column_comment, - (SELECT 1 FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE Z WHERE TABLE_NAME = D.NAME and A.NAME = Z.column_name ) as is_pk, - colorder as sort - FROM SYSCOLUMNS A - LEFT JOIN SYSTYPES B ON A.XTYPE = B.XUSERTYPE - INNER JOIN SYSOBJECTS D ON A.ID = D.ID AND D.XTYPE='U' AND D.NAME != 'DTPROPERTIES' - LEFT JOIN SYS.EXTENDED_PROPERTIES G ON A.ID = G.MAJOR_ID AND A.COLID = G.MINOR_ID - LEFT JOIN SYS.EXTENDED_PROPERTIES F ON D.ID = F.MAJOR_ID AND F.MINOR_ID = 0 - WHERE D.NAME = #{tableName} - ORDER BY A.COLORDER - </if> - </select> - -</mapper> diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml b/ruoyi-modules/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml deleted file mode 100644 index 6684c9e..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml +++ /dev/null @@ -1,220 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE mapper -PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="com.xmzs.generator.mapper.GenTableMapper"> - - <!-- 澶氱粨鏋勫祵濂楄嚜鍔ㄦ槧灏勯渶甯︿笂姣忎釜瀹炰綋鐨勪富閿甶d 鍚﹀垯鏄犲皠浼氬け璐� --> - <resultMap type="com.xmzs.generator.domain.GenTable" id="GenTableResult"> - <id property="tableId" column="table_id" /> - <collection property="columns" javaType="java.util.List" resultMap="GenTableColumnResult" /> - </resultMap> - - <resultMap type="com.xmzs.generator.domain.GenTableColumn" id="GenTableColumnResult"> - <id property="columnId" column="column_id"/> - </resultMap> - - <select id="selectPageDbTableList" resultMap="GenTableResult"> - <if test="@com.xmzs.common.mybatis.helper.DataBaseHelper@isMySql()"> - select table_name, table_comment, create_time, update_time - from information_schema.tables - where table_schema = (select database()) - AND table_name NOT LIKE 'xxl_job_%' AND table_name NOT LIKE 'gen_%' - AND table_name NOT IN (select table_name from gen_table) - <if test="genTable.tableName != null and genTable.tableName != ''"> - AND lower(table_name) like lower(concat('%', #{genTable.tableName}, '%')) - </if> - <if test="genTable.tableComment != null and genTable.tableComment != ''"> - AND lower(table_comment) like lower(concat('%', #{genTable.tableComment}, '%')) - </if> - order by create_time desc - </if> - <if test="@com.xmzs.common.mybatis.helper.DataBaseHelper@isOracle()"> - select lower(dt.table_name) as table_name, dtc.comments as table_comment, uo.created as create_time, uo.last_ddl_time as update_time - from user_tables dt, user_tab_comments dtc, user_objects uo - where dt.table_name = dtc.table_name - and dt.table_name = uo.object_name - and uo.object_type = 'TABLE' - AND dt.table_name NOT LIKE 'XXL_JOB_%' AND dt.table_name NOT LIKE 'GEN_%' - AND lower(dt.table_name) NOT IN (select table_name from gen_table) - <if test="genTable.tableName != null and genTable.tableName != ''"> - AND lower(dt.table_name) like lower(concat(concat('%', #{genTable.tableName}), '%')) - </if> - <if test="genTable.tableComment != null and genTable.tableComment != ''"> - AND lower(dtc.comments) like lower(concat(concat('%', #{genTable.tableComment}), '%')) - </if> - order by create_time desc - </if> - <if test="@com.xmzs.common.mybatis.helper.DataBaseHelper@isPostgerSql()"> - select table_name, table_comment, create_time, update_time - from ( - SELECT c.relname AS table_name, - obj_description(c.oid) AS table_comment, - CURRENT_TIMESTAMP AS create_time, - CURRENT_TIMESTAMP AS update_time - FROM pg_class c - LEFT JOIN pg_namespace n ON n.oid = c.relnamespace - WHERE (c.relkind = ANY (ARRAY ['r'::"char", 'p'::"char"])) - AND c.relname != 'spatial_%'::text - AND n.nspname = 'public'::name - AND n.nspname <![CDATA[ <> ]]> ''::name - ) list_table - where table_name NOT LIKE 'xxl_job_%' AND table_name NOT LIKE 'gen_%' - AND table_name NOT IN (select table_name from gen_table) - <if test="genTable.tableName != null and genTable.tableName != ''"> - AND lower(table_name) like lower(concat('%', #{genTable.tableName}, '%')) - </if> - <if test="genTable.tableComment != null and genTable.tableComment != ''"> - AND lower(table_comment) like lower(concat('%', #{genTable.tableComment}, '%')) - </if> - order by create_time desc - </if> - <if test="@com.xmzs.common.mybatis.helper.DataBaseHelper@isSqlServer()"> - SELECT cast(D.NAME as nvarchar) as table_name, - cast(F.VALUE as nvarchar) as table_comment, - crdate as create_time, - refdate as update_time - FROM SYSOBJECTS D - INNER JOIN SYS.EXTENDED_PROPERTIES F ON D.ID = F.MAJOR_ID - AND F.MINOR_ID = 0 AND D.XTYPE = 'U' AND D.NAME != 'DTPROPERTIES' - AND D.NAME NOT LIKE 'xxl_job_%' AND D.NAME NOT LIKE 'gen_%' - AND D.NAME NOT IN (select table_name from gen_table) - <if test="genTable.tableName != null and genTable.tableName != ''"> - AND lower(D.NAME) like lower(concat(N'%', N'${genTable.tableName}', N'%')) - </if> - <if test="genTable.tableComment != null and genTable.tableComment != ''"> - AND lower(CAST(F.VALUE AS nvarchar)) like lower(concat(N'%', N'${genTable.tableComment}', N'%')) - </if> - order by crdate desc - </if> - </select> - - <select id="selectDbTableListByNames" resultMap="GenTableResult"> - <if test="@com.xmzs.common.mybatis.helper.DataBaseHelper@isMySql()"> - select table_name, table_comment, create_time, update_time from information_schema.tables - where table_name NOT LIKE 'xxl_job_%' and table_name NOT LIKE 'gen_%' and table_schema = (select database()) - and table_name in - <foreach collection="array" item="name" open="(" separator="," close=")"> - #{name} - </foreach> - </if> - <if test="@com.xmzs.common.mybatis.helper.DataBaseHelper@isOracle()"> - select lower(dt.table_name) as table_name, dtc.comments as table_comment, uo.created as create_time, uo.last_ddl_time as update_time - from user_tables dt, user_tab_comments dtc, user_objects uo - where dt.table_name = dtc.table_name - and dt.table_name = uo.object_name - and uo.object_type = 'TABLE' - AND dt.table_name NOT LIKE 'XXL_JOB_%' AND dt.table_name NOT LIKE 'GEN_%' - AND dt.table_name NOT IN (select table_name from gen_table) - and lower(dt.table_name) in - <foreach collection="array" item="name" open="(" separator="," close=")"> - #{name} - </foreach> - </if> - <if test="@com.xmzs.common.mybatis.helper.DataBaseHelper@isPostgerSql()"> - select table_name, table_comment, create_time, update_time - from ( - SELECT c.relname AS table_name, - obj_description(c.oid) AS table_comment, - CURRENT_TIMESTAMP AS create_time, - CURRENT_TIMESTAMP AS update_time - FROM pg_class c - LEFT JOIN pg_namespace n ON n.oid = c.relnamespace - WHERE (c.relkind = ANY (ARRAY ['r'::"char", 'p'::"char"])) - AND c.relname != 'spatial_%'::text - AND n.nspname = 'public'::name - AND n.nspname <![CDATA[ <> ]]> ''::name - ) list_table - where table_name NOT LIKE 'xxl_job_%' and table_name NOT LIKE 'gen_%' - and table_name in - <foreach collection="array" item="name" open="(" separator="," close=")"> - #{name} - </foreach> - </if> - <if test="@com.xmzs.common.mybatis.helper.DataBaseHelper@isSqlServer()"> - SELECT cast(D.NAME as nvarchar) as table_name, - cast(F.VALUE as nvarchar) as table_comment, - crdate as create_time, - refdate as update_time - FROM SYSOBJECTS D - INNER JOIN SYS.EXTENDED_PROPERTIES F ON D.ID = F.MAJOR_ID - AND F.MINOR_ID = 0 AND D.XTYPE = 'U' AND D.NAME != 'DTPROPERTIES' - AND D.NAME NOT LIKE 'xxl_job_%' AND D.NAME NOT LIKE 'gen_%' - AND D.NAME in - <foreach collection="array" item="name" open="(" separator="," close=")"> - #{name} - </foreach> - </if> - </select> - - <select id="selectTableByName" parameterType="String" resultMap="GenTableResult"> - <if test="@com.xmzs.common.mybatis.helper.DataBaseHelper@isMySql()"> - select table_name, table_comment, create_time, update_time from information_schema.tables - where table_name NOT LIKE 'xxl_job_%' and table_name NOT LIKE 'gen_%' and table_schema = (select database()) - and table_name = #{tableName} - </if> - <if test="@com.xmzs.common.mybatis.helper.DataBaseHelper@isOracle()"> - select lower(dt.table_name) as table_name, dtc.comments as table_comment, uo.created as create_time, uo.last_ddl_time as update_time - from user_tables dt, user_tab_comments dtc, user_objects uo - where dt.table_name = dtc.table_name - and dt.table_name = uo.object_name - and uo.object_type = 'TABLE' - AND dt.table_name NOT LIKE 'XXL_JOB_%' AND dt.table_name NOT LIKE 'GEN_%' - AND dt.table_name NOT IN (select table_name from gen_table) - and lower(dt.table_name) = #{tableName} - </if> - <if test="@com.xmzs.common.mybatis.helper.DataBaseHelper@isPostgerSql()"> - select table_name, table_comment, create_time, update_time - from ( - SELECT c.relname AS table_name, - obj_description(c.oid) AS table_comment, - CURRENT_TIMESTAMP AS create_time, - CURRENT_TIMESTAMP AS update_time - FROM pg_class c - LEFT JOIN pg_namespace n ON n.oid = c.relnamespace - WHERE (c.relkind = ANY (ARRAY ['r'::"char", 'p'::"char"])) - AND c.relname != 'spatial_%'::text - AND n.nspname = 'public'::name - AND n.nspname <![CDATA[ <> ]]> ''::name - ) list_table - where table_name NOT LIKE 'xxl_job_%' and table_name NOT LIKE 'gen_%' - and table_name = #{tableName} - </if> - <if test="@com.xmzs.common.mybatis.helper.DataBaseHelper@isSqlServer()"> - SELECT cast(D.NAME as nvarchar) as table_name, - cast(F.VALUE as nvarchar) as table_comment, - crdate as create_time, - refdate as update_time - FROM SYSOBJECTS D - INNER JOIN SYS.EXTENDED_PROPERTIES F ON D.ID = F.MAJOR_ID - AND F.MINOR_ID = 0 AND D.XTYPE = 'U' AND D.NAME != 'DTPROPERTIES' - AND D.NAME NOT LIKE 'xxl_job_%' AND D.NAME NOT LIKE 'gen_%' - AND D.NAME = #{tableName} - </if> - </select> - - <select id="selectGenTableById" parameterType="Long" resultMap="GenTableResult"> - SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark, - c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort - FROM gen_table t - LEFT JOIN gen_table_column c ON t.table_id = c.table_id - where t.table_id = #{tableId} order by c.sort - </select> - - <select id="selectGenTableByName" parameterType="String" resultMap="GenTableResult"> - SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark, - c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort - FROM gen_table t - LEFT JOIN gen_table_column c ON t.table_id = c.table_id - where t.table_name = #{tableName} order by c.sort - </select> - - <select id="selectGenTableAll" parameterType="String" resultMap="GenTableResult"> - SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.options, t.remark, - c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort - FROM gen_table t - LEFT JOIN gen_table_column c ON t.table_id = c.table_id - order by c.sort - </select> - -</mapper> diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/mapper/package-info.md b/ruoyi-modules/ruoyi-generator/src/main/resources/mapper/package-info.md deleted file mode 100644 index c938b1e..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/mapper/package-info.md +++ /dev/null @@ -1,3 +0,0 @@ -java鍖呬娇鐢� `.` 鍒嗗壊 resource 鐩綍浣跨敤 `/` 鍒嗗壊 -<br> -姝ゆ枃浠剁洰鐨� 闃叉鏂囦欢澶圭矘杩炴壘涓嶅埌 `xml` 鏂囦欢 \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/bo.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/bo.java.vm deleted file mode 100644 index a838fff..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/bo.java.vm +++ /dev/null @@ -1,48 +0,0 @@ -package ${packageName}.domain.bo; - -import ${packageName}.domain.${ClassName}; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import lombok.EqualsAndHashCode; -import jakarta.validation.constraints.*; -#foreach ($import in $importList) -import ${import}; -#end - -/** - * ${functionName}涓氬姟瀵硅薄 ${tableName} - * - * @author ${author} - * @date ${datetime} - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = ${ClassName}.class, reverseConvertGenerate = false) -public class ${ClassName}Bo extends BaseEntity { - -#foreach ($column in $columns) -#if(!$table.isSuperColumn($column.javaField) && ($column.query || $column.insert || $column.edit)) - /** - * $column.columnComment - */ -#if($column.insert && $column.edit) -#set($Group="AddGroup.class, EditGroup.class") -#elseif($column.insert) -#set($Group="AddGroup.class") -#elseif($column.edit) -#set($Group="EditGroup.class") -#end -#if($column.required) -#if($column.javaType == 'String') - @NotBlank(message = "$column.columnComment涓嶈兘涓虹┖", groups = { $Group }) -#else - @NotNull(message = "$column.columnComment涓嶈兘涓虹┖", groups = { $Group }) -#end -#end - private $column.javaType $column.javaField; - -#end -#end - -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/controller.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/controller.java.vm deleted file mode 100644 index 48eb6b8..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/controller.java.vm +++ /dev/null @@ -1,115 +0,0 @@ -package ${packageName}.controller; - -import java.util.List; - -import lombok.RequiredArgsConstructor; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.constraints.*; -import cn.dev33.satoken.annotation.SaCheckPermission; -import org.springframework.web.bind.annotation.*; -import org.springframework.validation.annotation.Validated; -import annotation.idempotent.common.com.xmzs.RepeatSubmit; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.log.enums.BusinessType; -import utils.excel.common.com.xmzs.ExcelUtil; -import ${packageName}.domain.vo.${ClassName}Vo; -import ${packageName}.domain.bo.${ClassName}Bo; -import ${packageName}.service.I${ClassName}Service; -#if($table.crud || $table.sub) -import com.xmzs.common.mybatis.core.page.TableDataInfo; -#elseif($table.tree) -#end - -/** - * ${functionName} - * - * @author ${author} - * @date ${datetime} - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/${moduleName}/${businessName}") -public class ${ClassName}Controller extends BaseController { - - private final I${ClassName}Service ${className}Service; - - /** - * 鏌ヨ${functionName}鍒楄〃 - */ - @SaCheckPermission("${permissionPrefix}:list") - @GetMapping("/list") -#if($table.crud || $table.sub) - public TableDataInfo<${ClassName}Vo> list(${ClassName}Bo bo, PageQuery pageQuery) { - return ${className}Service.queryPageList(bo, pageQuery); - } -#elseif($table.tree) - public R<List<${ClassName}Vo>> list(${ClassName}Bo bo) { - List<${ClassName}Vo> list = ${className}Service.queryList(bo); - return R.ok(list); - } -#end - - /** - * 瀵煎嚭${functionName}鍒楄〃 - */ - @SaCheckPermission("${permissionPrefix}:export") - @Log(title = "${functionName}", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(${ClassName}Bo bo, HttpServletResponse response) { - List<${ClassName}Vo> list = ${className}Service.queryList(bo); - ExcelUtil.exportExcel(list, "${functionName}", ${ClassName}Vo.class, response); - } - - /** - * 鑾峰彇${functionName}璇︾粏淇℃伅 - * - * @param ${pkColumn.javaField} 涓婚敭 - */ - @SaCheckPermission("${permissionPrefix}:query") - @GetMapping("/{${pkColumn.javaField}}") - public R<${ClassName}Vo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable ${pkColumn.javaType} ${pkColumn.javaField}) { - return R.ok(${className}Service.queryById(${pkColumn.javaField})); - } - - /** - * 鏂板${functionName} - */ - @SaCheckPermission("${permissionPrefix}:add") - @Log(title = "${functionName}", businessType = BusinessType.INSERT) - @RepeatSubmit() - @PostMapping() - public R<Void> add(@Validated(AddGroup.class) @RequestBody ${ClassName}Bo bo) { - return toAjax(${className}Service.insertByBo(bo)); - } - - /** - * 淇敼${functionName} - */ - @SaCheckPermission("${permissionPrefix}:edit") - @Log(title = "${functionName}", businessType = BusinessType.UPDATE) - @RepeatSubmit() - @PutMapping() - public R<Void> edit(@Validated(EditGroup.class) @RequestBody ${ClassName}Bo bo) { - return toAjax(${className}Service.updateByBo(bo)); - } - - /** - * 鍒犻櫎${functionName} - * - * @param ${pkColumn.javaField}s 涓婚敭涓� - */ - @SaCheckPermission("${permissionPrefix}:remove") - @Log(title = "${functionName}", businessType = BusinessType.DELETE) - @DeleteMapping("/{${pkColumn.javaField}s}") - public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s) { - return toAjax(${className}Service.deleteWithValidByIds(List.of(${pkColumn.javaField}s), true)); - } -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm deleted file mode 100644 index f78f35c..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm +++ /dev/null @@ -1,59 +0,0 @@ -package ${packageName}.domain; - -#foreach ($column in $columns) -#if($column.javaField=='tenantId') -#set($IsTenant=1) -#end -#end -#if($IsTenant==1) -import core.tenant.common.com.xmzs.TenantEntity; -#else -#end -import com.baomidou.mybatisplus.annotation.*; -import lombok.Data; -import lombok.EqualsAndHashCode; -#foreach ($import in $importList) -import ${import}; -#end - -import java.io.Serial; - -/** - * ${functionName}瀵硅薄 ${tableName} - * - * @author ${author} - * @date ${datetime} - */ -#if($IsTenant==1) -#set($Entity="TenantEntity") -#else -#set($Entity="BaseEntity") -#end -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("${tableName}") -public class ${ClassName} extends ${Entity} { - - @Serial - private static final long serialVersionUID = 1L; - -#foreach ($column in $columns) -#if(!$table.isSuperColumn($column.javaField)) - /** - * $column.columnComment - */ -#if($column.javaField=='delFlag') - @TableLogic -#end -#if($column.javaField=='version') - @Version -#end -#if($column.isPk==1) - @TableId(value = "$column.columnName") -#end - private $column.javaType $column.javaField; - -#end -#end - -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm deleted file mode 100644 index d809595..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm +++ /dev/null @@ -1,15 +0,0 @@ -package ${packageName}.mapper; - -import ${packageName}.domain.${ClassName}; -import ${packageName}.domain.vo.${ClassName}Vo; -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; - -/** - * ${functionName}Mapper鎺ュ彛 - * - * @author ${author} - * @date ${datetime} - */ -public interface ${ClassName}Mapper extends BaseMapperPlus<${ClassName}, ${ClassName}Vo> { - -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/service.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/service.java.vm deleted file mode 100644 index c53469a..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/service.java.vm +++ /dev/null @@ -1,53 +0,0 @@ -package ${packageName}.service; - -import ${packageName}.domain.${ClassName}; -import ${packageName}.domain.vo.${ClassName}Vo; -import ${packageName}.domain.bo.${ClassName}Bo; -#if($table.crud || $table.sub) -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.mybatis.core.page.PageQuery; -#end - -import java.util.Collection; -import java.util.List; - -/** - * ${functionName}Service鎺ュ彛 - * - * @author ${author} - * @date ${datetime} - */ -public interface I${ClassName}Service { - - /** - * 鏌ヨ${functionName} - */ - ${ClassName}Vo queryById(${pkColumn.javaType} ${pkColumn.javaField}); - -#if($table.crud || $table.sub) - /** - * 鏌ヨ${functionName}鍒楄〃 - */ - TableDataInfo<${ClassName}Vo> queryPageList(${ClassName}Bo bo, PageQuery pageQuery); -#end - - /** - * 鏌ヨ${functionName}鍒楄〃 - */ - List<${ClassName}Vo> queryList(${ClassName}Bo bo); - - /** - * 鏂板${functionName} - */ - Boolean insertByBo(${ClassName}Bo bo); - - /** - * 淇敼${functionName} - */ - Boolean updateByBo(${ClassName}Bo bo); - - /** - * 鏍¢獙骞舵壒閲忓垹闄�${functionName}淇℃伅 - */ - Boolean deleteWithValidByIds(Collection<${pkColumn.javaType}> ids, Boolean isValid); -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm deleted file mode 100644 index c9ca78e..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm +++ /dev/null @@ -1,133 +0,0 @@ -package ${packageName}.service.impl; - -import com.xmzs.common.core.utils.MapstructUtils; - #if($table.crud || $table.sub) -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -#end -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; -import ${packageName}.domain.bo.${ClassName}Bo; -import ${packageName}.domain.vo.${ClassName}Vo; -import ${packageName}.domain.${ClassName}; -import ${packageName}.mapper.${ClassName}Mapper; -import ${packageName}.service.I${ClassName}Service; - -import java.util.List; -import java.util.Map; -import java.util.Collection; - -/** - * ${functionName}Service涓氬姟灞傚鐞� - * - * @author ${author} - * @date ${datetime} - */ -@RequiredArgsConstructor -@Service -public class ${ClassName}ServiceImpl implements I${ClassName}Service { - - private final ${ClassName}Mapper baseMapper; - - /** - * 鏌ヨ${functionName} - */ - @Override - public ${ClassName}Vo queryById(${pkColumn.javaType} ${pkColumn.javaField}){ - return baseMapper.selectVoById(${pkColumn.javaField}); - } - -#if($table.crud || $table.sub) - /** - * 鏌ヨ${functionName}鍒楄〃 - */ - @Override - public TableDataInfo<${ClassName}Vo> queryPageList(${ClassName}Bo bo, PageQuery pageQuery) { - LambdaQueryWrapper<${ClassName}> lqw = buildQueryWrapper(bo); - Page<${ClassName}Vo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(result); - } -#end - - /** - * 鏌ヨ${functionName}鍒楄〃 - */ - @Override - public List<${ClassName}Vo> queryList(${ClassName}Bo bo) { - LambdaQueryWrapper<${ClassName}> lqw = buildQueryWrapper(bo); - return baseMapper.selectVoList(lqw); - } - - private LambdaQueryWrapper<${ClassName}> buildQueryWrapper(${ClassName}Bo bo) { - Map<String, Object> params = bo.getParams(); - LambdaQueryWrapper<${ClassName}> lqw = Wrappers.lambdaQuery(); -#foreach($column in $columns) -#if($column.query) -#set($queryType=$column.queryType) -#set($javaField=$column.javaField) -#set($javaType=$column.javaType) -#set($columnName=$column.columnName) -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) -#set($mpMethod=$column.queryType.toLowerCase()) -#if($queryType != 'BETWEEN') -#if($javaType == 'String') -#set($condition='StringUtils.isNotBlank(bo.get'+$AttrName+'())') -#else -#set($condition='bo.get'+$AttrName+'() != null') -#end - lqw.$mpMethod($condition, ${ClassName}::get$AttrName, bo.get$AttrName()); -#else - lqw.between(params.get("begin$AttrName") != null && params.get("end$AttrName") != null, - ${ClassName}::get$AttrName ,params.get("begin$AttrName"), params.get("end$AttrName")); -#end -#end -#end - return lqw; - } - - /** - * 鏂板${functionName} - */ - @Override - public Boolean insertByBo(${ClassName}Bo bo) { - ${ClassName} add = MapstructUtils.convert(bo, ${ClassName}.class); - validEntityBeforeSave(add); - boolean flag = baseMapper.insert(add) > 0; -#set($pk=$pkColumn.javaField.substring(0,1).toUpperCase() + ${pkColumn.javaField.substring(1)}) - if (flag) { - bo.set$pk(add.get$pk()); - } - return flag; - } - - /** - * 淇敼${functionName} - */ - @Override - public Boolean updateByBo(${ClassName}Bo bo) { - ${ClassName} update = MapstructUtils.convert(bo, ${ClassName}.class); - validEntityBeforeSave(update); - return baseMapper.updateById(update) > 0; - } - - /** - * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙 - */ - private void validEntityBeforeSave(${ClassName} entity){ - //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫 - } - - /** - * 鎵归噺鍒犻櫎${functionName} - */ - @Override - public Boolean deleteWithValidByIds(Collection<${pkColumn.javaType}> ids, Boolean isValid) { - if(isValid){ - //TODO 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠� - } - return baseMapper.deleteBatchIds(ids) > 0; - } -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/vo.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/vo.java.vm deleted file mode 100644 index 97800e1..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/vo.java.vm +++ /dev/null @@ -1,59 +0,0 @@ -package ${packageName}.domain.vo; - -#foreach ($import in $importList) -import ${import}; -#end -import ${packageName}.domain.${ClassName}; -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import annotation.excel.common.com.xmzs.ExcelDictFormat; -import convert.excel.common.com.xmzs.ExcelDictConvert; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - - - -/** - * ${functionName}瑙嗗浘瀵硅薄 ${tableName} - * - * @author ${author} - * @date ${datetime} - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = ${ClassName}.class) -public class ${ClassName}Vo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - -#foreach ($column in $columns) -#if($column.list) - /** - * $column.columnComment - */ -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#if(${column.dictType} && ${column.dictType} != '') - @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "${column.dictType}") -#elseif($parentheseIndex != -1) - @ExcelProperty(value = "${comment}", converter = ExcelDictConvert.class) - @ExcelDictFormat(readConverterExp = "$column.readConverterExp()") -#else - @ExcelProperty(value = "${comment}") -#end - private $column.javaType $column.javaField; - -#end -#end - -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/js/api.js.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/js/api.js.vm deleted file mode 100644 index 9295524..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/js/api.js.vm +++ /dev/null @@ -1,44 +0,0 @@ -import request from '@/utils/request' - -// 鏌ヨ${functionName}鍒楄〃 -export function list${BusinessName}(query) { - return request({ - url: '/${moduleName}/${businessName}/list', - method: 'get', - params: query - }) -} - -// 鏌ヨ${functionName}璇︾粏 -export function get${BusinessName}(${pkColumn.javaField}) { - return request({ - url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField}, - method: 'get' - }) -} - -// 鏂板${functionName} -export function add${BusinessName}(data) { - return request({ - url: '/${moduleName}/${businessName}', - method: 'post', - data: data - }) -} - -// 淇敼${functionName} -export function update${BusinessName}(data) { - return request({ - url: '/${moduleName}/${businessName}', - method: 'put', - data: data - }) -} - -// 鍒犻櫎${functionName} -export function del${BusinessName}(${pkColumn.javaField}) { - return request({ - url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField}, - method: 'delete' - }) -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/oracle/sql.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/oracle/sql.vm deleted file mode 100644 index f6638be..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/oracle/sql.vm +++ /dev/null @@ -1,19 +0,0 @@ --- 鑿滃崟 SQL -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[0]}, '${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 103, 1, sysdate, null, null, '${functionName}鑿滃崟'); - --- 鎸夐挳 SQL -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[1]}, '${functionName}鏌ヨ', ${table.menuIds[0]}, '1', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:query', '#', 103, 1, sysdate, null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[2]}, '${functionName}鏂板', ${table.menuIds[0]}, '2', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:add', '#', 103, 1, sysdate, null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[3]}, '${functionName}淇敼', ${table.menuIds[0]}, '3', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:edit', '#', 103, 1, sysdate, null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[4]}, '${functionName}鍒犻櫎', ${table.menuIds[0]}, '4', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:remove', '#', 103, 1, sysdate, null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[5]}, '${functionName}瀵煎嚭', ${table.menuIds[0]}, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 103, 1, sysdate, null, null, ''); diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/postgres/sql.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/postgres/sql.vm deleted file mode 100644 index 0923392..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/postgres/sql.vm +++ /dev/null @@ -1,20 +0,0 @@ --- 鑿滃崟 SQL -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[0]}, '${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 103, 1, now(), null, null, '${functionName}鑿滃崟'); - --- 鎸夐挳 SQL -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[1]}, '${functionName}鏌ヨ', ${table.menuIds[0]}, '1', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:query', '#', 103, 1, now(), null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[2]}, '${functionName}鏂板', ${table.menuIds[0]}, '2', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:add', '#', 103, 1, now(), null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[3]}, '${functionName}淇敼', ${table.menuIds[0]}, '3', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:edit', '#', 103, 1, now(), null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[4]}, '${functionName}鍒犻櫎', ${table.menuIds[0]}, '4', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:remove', '#', 103, 1, now(), null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[5]}, '${functionName}瀵煎嚭', ${table.menuIds[0]}, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 103, 1, now(), null, null, ''); - diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/sql.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/sql.vm deleted file mode 100644 index 01824c2..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/sql.vm +++ /dev/null @@ -1,19 +0,0 @@ --- 鑿滃崟 SQL -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[0]}, '${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 103, 1, sysdate(), null, null, '${functionName}鑿滃崟'); - --- 鎸夐挳 SQL -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[1]}, '${functionName}鏌ヨ', ${table.menuIds[0]}, '1', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:query', '#', 103, 1, sysdate(), null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[2]}, '${functionName}鏂板', ${table.menuIds[0]}, '2', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:add', '#', 103, 1, sysdate(), null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[3]}, '${functionName}淇敼', ${table.menuIds[0]}, '3', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:edit', '#', 103, 1, sysdate(), null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[4]}, '${functionName}鍒犻櫎', ${table.menuIds[0]}, '4', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:remove', '#', 103, 1, sysdate(), null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[5]}, '${functionName}瀵煎嚭', ${table.menuIds[0]}, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 103, 1, sysdate(), null, null, ''); diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/sqlserver/sql.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/sqlserver/sql.vm deleted file mode 100644 index bdf166e..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/sql/sqlserver/sql.vm +++ /dev/null @@ -1,19 +0,0 @@ --- 鑿滃崟 SQL -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[0]}, '${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 103, 1, getdate(), null, null, '${functionName}鑿滃崟'); - --- 鎸夐挳 SQL -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[1]}, '${functionName}鏌ヨ', ${table.menuIds[0]}, '1', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:query', '#', 103, 1, getdate(), null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[2]}, '${functionName}鏂板', ${table.menuIds[0]}, '2', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:add', '#', 103, 1, getdate(), null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[3]}, '${functionName}淇敼', ${table.menuIds[0]}, '3', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:edit', '#', 103, 1, getdate(), null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[4]}, '${functionName}鍒犻櫎', ${table.menuIds[0]}, '4', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:remove', '#', 103, 1, getdate(), null, null, ''); - -insert into sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) -values(${table.menuIds[5]}, '${functionName}瀵煎嚭', ${table.menuIds[0]}, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 103, 1, getdate(), null, null, ''); diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/ts/api.ts.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/ts/api.ts.vm deleted file mode 100644 index 9ef9ff4..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/ts/api.ts.vm +++ /dev/null @@ -1,63 +0,0 @@ -import request from '@/utils/request'; -import {AxiosPromise} from 'axios'; -import {${BusinessName}Form, ${BusinessName}Query, ${BusinessName}VO} from '@/api/'; - -/** - * 鏌ヨ${functionName}鍒楄〃 - * @param query - * @returns {*} - */ - -export const list${BusinessName} = (query?: ${BusinessName}Query): AxiosPromise<${BusinessName}VO[]> => { - return request({ - url: '/${moduleName}/${businessName}/list', - method: 'get', - params: query - }); -}; - -/** - * 鏌ヨ${functionName}璇︾粏 - * @param ${pkColumn.javaField} - */ -export const get${BusinessName} = (${pkColumn.javaField}: string | number): AxiosPromise<${BusinessName}VO> => { - return request({ - url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField}, - method: 'get' - }); -}; - -/** - * 鏂板${functionName} - * @param data - */ -export const add${BusinessName} = (data: ${BusinessName}Form) => { - return request({ - url: '/${moduleName}/${businessName}', - method: 'post', - data: data - }); -}; - -/** - * 淇敼${functionName} - * @param data - */ -export const update${BusinessName} = (data: ${BusinessName}Form) => { - return request({ - url: '/${moduleName}/${businessName}', - method: 'put', - data: data - }); -}; - -/** - * 鍒犻櫎${functionName} - * @param ${pkColumn.javaField} - */ -export const del${BusinessName} = (${pkColumn.javaField}: string | number | Array<string | number>) => { - return request({ - url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField}, - method: 'delete' - }); -}; diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/ts/types.ts.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/ts/types.ts.vm deleted file mode 100644 index 99359e0..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/ts/types.ts.vm +++ /dev/null @@ -1,44 +0,0 @@ -export interface ${BusinessName}VO { -#foreach ($column in $columns) -#if($column.insert || $column.edit) - /** - * $column.columnComment - */ - $column.javaField:#if($column.javaField.indexOf("id") != -1 || $column.javaField.indexOf("Id") != -1) string | number; - #elseif($column.javaType == 'Long' || $column.javaType == 'Integer' || $column.javaType == 'Double' || $column.javaType == 'Float' || $column.javaType == 'BigDecimal') number; - #elseif($column.javaType == 'Boolean') boolean; - #else string; - #end -#end -#end -} - -export interface ${BusinessName}Form extends BaseEntity { -#foreach ($column in $columns) -#if($column.insert || $column.edit) - /** - * $column.columnComment - */ - $column.javaField?:#if($column.javaField.indexOf("id") != -1 || $column.javaField.indexOf("Id") != -1) string | number; - #elseif($column.javaType == 'Long' || $column.javaType == 'Integer' || $column.javaType == 'Double' || $column.javaType == 'Float' || $column.javaType == 'BigDecimal') number; - #elseif($column.javaType == 'Boolean') boolean; - #else string; - #end -#end -#end -} - -export interface ${BusinessName}Query #if(!${treeCode})extends PageQuery #end{ -#foreach ($column in $columns) -#if($column.query) - /** - * $column.columnComment - */ - $column.javaField?:#if($column.javaField.indexOf("id") != -1 || $column.javaField.indexOf("Id") != -1) string | number; - #elseif($column.javaType == 'Long' || $column.javaType == 'Integer' || $column.javaType == 'Double' || $column.javaType == 'Float' || $column.javaType == 'BigDecimal') number; - #elseif($column.javaType == 'Boolean') boolean; - #else string; - #end -#end -#end -} diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm deleted file mode 100644 index dda1b46..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm +++ /dev/null @@ -1,502 +0,0 @@ -<template> - <div class="p-2"> - <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> - <div class="search" v-show="showSearch"> - <el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px"> -#foreach($column in $columns) -#if($column.query) -#set($dictType=$column.dictType) -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#if($column.htmlType == "input" || $column.htmlType == "textarea") - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-input v-model="queryParams.${column.javaField}" placeholder="璇疯緭鍏�${comment}" clearable @keyup.enter="handleQuery" /> - </el-form-item> -#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType) - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-select v-model="queryParams.${column.javaField}" placeholder="璇烽�夋嫨${comment}" clearable> - <el-option - v-for="dict in ${dictType}" - :key="dict.value" - :label="dict.label" - :value="dict.value" - /> - </el-select> - </el-form-item> -#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType) - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-select v-model="queryParams.${column.javaField}" placeholder="璇烽�夋嫨${comment}" clearable> - <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" /> - </el-select> - </el-form-item> -#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN") - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-date-picker clearable - v-model="queryParams.${column.javaField}" - type="date" - value-format="YYYY-MM-DD" - placeholder="閫夋嫨${comment}" - /> - </el-form-item> -#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN") - <el-form-item label="${comment}" style="width: 308px"> - <el-date-picker - v-model="daterange${AttrName}" - value-format="YYYY-MM-DD HH:mm:ss" - type="daterange" - range-separator="-" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - :default-time="[new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 23, 59, 59)]" - /> - </el-form-item> -#end -#end -#end - <el-form-item> - <el-button type="primary" icon="Search" @click="handleQuery">鎼滅储</el-button> - <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - </div> - </transition> - - <el-card shadow="never"> - <template #header> - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button type="primary" plain icon="Plus" @click="handleAdd()" v-hasPermi="['${moduleName}:${businessName}:add']">鏂板</el-button> - </el-col> - <el-col :span="1.5"> - <el-button type="info" plain icon="Sort" @click="handleToggleExpandAll">灞曞紑/鎶樺彔</el-button> - </el-col> - <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> - </el-row> - </template> - <el-table - v-loading="loading" - :data="${businessName}List" - row-key="${treeCode}" - :default-expand-all="isExpandAll" - :tree-props="{children: 'children', hasChildren: 'hasChildren'}" - ref="${businessName}TableRef" - > -#foreach($column in $columns) -#set($javaField=$column.javaField) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#if($column.pk) -#elseif($column.list && $column.htmlType == "datetime") - <el-table-column label="${comment}" align="center" prop="${javaField}" width="180"> - <template #default="scope"> - <span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span> - </template> - </el-table-column> -#elseif($column.list && $column.htmlType == "imageUpload") - <el-table-column label="${comment}" align="center" prop="${javaField}" width="100"> - <template #default="scope"> - <image-preview :src="scope.row.${javaField}" :width="50" :height="50"/> - </template> - </el-table-column> -#elseif($column.list && $column.dictType && "" != $column.dictType) - <el-table-column label="${comment}" align="center" prop="${javaField}"> - <template #default="scope"> -#if($column.htmlType == "checkbox") - <dict-tag :options="${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/> -#else - <dict-tag :options="${column.dictType}" :value="scope.row.${javaField}"/> -#end - </template> - </el-table-column> -#elseif($column.list && "" != $javaField) -#if(${foreach.index} == 1) - <el-table-column label="${comment}" prop="${javaField}" /> -#else - <el-table-column label="${comment}" align="center" prop="${javaField}" /> -#end -#end -#end - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template #default="scope"> - <el-tooltip content="淇敼" placement="top"> - <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']" /> - </el-tooltip> - <el-tooltip content="鏂板" placement="top"> - <el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${moduleName}:${businessName}:add']" /> - </el-tooltip> - <el-tooltip content="鍒犻櫎" placement="top"> - <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']" /> - </el-tooltip> - </template> - </el-table-column> - </el-table> - </el-card> - <!-- 娣诲姞鎴栦慨鏀�${functionName}瀵硅瘽妗� --> - <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body> - <el-form ref="${businessName}FormRef" :model="form" :rules="rules" label-width="80px"> -#foreach($column in $columns) -#set($field=$column.javaField) -#if($column.insert && !$column.pk) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#set($dictType=$column.dictType) -#if("" != $treeParentCode && $column.javaField == $treeParentCode) - <el-form-item label="${comment}" prop="${treeParentCode}"> - <el-tree-select - v-model="form.${treeParentCode}" - :data="${businessName}Options" - :props="{ value: '${treeCode}', label: '${treeName}', children: 'children' }" - value-key="${treeCode}" - placeholder="璇烽�夋嫨${comment}" - check-strictly - /> - </el-form-item> -#elseif($column.htmlType == "input") - <el-form-item label="${comment}" prop="${field}"> - <el-input v-model="form.${field}" placeholder="璇疯緭鍏�${comment}" /> - </el-form-item> -#elseif($column.htmlType == "imageUpload") - <el-form-item label="${comment}" prop="${field}"> - <image-upload v-model="form.${field}"/> - </el-form-item> -#elseif($column.htmlType == "fileUpload") - <el-form-item label="${comment}" prop="${field}"> - <file-upload v-model="form.${field}"/> - </el-form-item> -#elseif($column.htmlType == "editor") - <el-form-item label="${comment}"> - <editor v-model="form.${field}" :min-height="192"/> - </el-form-item> -#elseif($column.htmlType == "select" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-select v-model="form.${field}" placeholder="璇烽�夋嫨${comment}"> - <el-option - v-for="dict in ${dictType}" - :key="dict.value" - :label="dict.label" -#if($column.javaType == "Integer" || $column.javaType == "Long") - :value="parseInt(dict.value)" -#else - :value="dict.value" -#end - ></el-option> - </el-select> - </el-form-item> -#elseif($column.htmlType == "select" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-select v-model="form.${field}" placeholder="璇烽�夋嫨${comment}"> - <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" /> - </el-select> - </el-form-item> -#elseif($column.htmlType == "checkbox" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-checkbox-group v-model="form.${field}"> - <el-checkbox - v-for="dict in ${dictType}" - :key="dict.value" - :label="dict.value"> - {{dict.label}} - </el-checkbox> - </el-checkbox-group> - </el-form-item> -#elseif($column.htmlType == "checkbox" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-checkbox-group v-model="form.${field}"> - <el-checkbox>璇烽�夋嫨瀛楀吀鐢熸垚</el-checkbox> - </el-checkbox-group> - </el-form-item> -#elseif($column.htmlType == "radio" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-radio-group v-model="form.${field}"> - <el-radio - v-for="dict in ${dictType}" - :key="dict.value" -#if($column.javaType == "Integer" || $column.javaType == "Long") - :label="parseInt(dict.value)" -#else - :label="dict.value" -#end - >{{dict.label}}</el-radio> - </el-radio-group> - </el-form-item> -#elseif($column.htmlType == "radio" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-radio-group v-model="form.${field}"> - <el-radio label="1">璇烽�夋嫨瀛楀吀鐢熸垚</el-radio> - </el-radio-group> - </el-form-item> -#elseif($column.htmlType == "datetime") - <el-form-item label="${comment}" prop="${field}"> - <el-date-picker clearable - v-model="form.${field}" - type="datetime" - value-format="YYYY-MM-DD HH:mm:ss" - placeholder="閫夋嫨${comment}" - /> - </el-form-item> -#elseif($column.htmlType == "textarea") - <el-form-item label="${comment}" prop="${field}"> - <el-input v-model="form.${field}" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" /> - </el-form-item> -#end -#end -#end - </el-form> - <template #footer> - <div class="dialog-footer"> - <el-button :loading="buttonLoading" type="primary" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </div> - </template> - </el-dialog> - </div> -</template> - -<script setup name="${BusinessName}" lang="ts"> -import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"; -import { ${BusinessName}VO, ${BusinessName}Query, ${BusinessName}Form } from '@/api/${moduleName}/${businessName}/types'; -import { ComponentInternalInstance } from 'vue'; -import { ElForm, ElTable } from 'element-plus'; - - -type ${BusinessName}Option = { - ${treeCode}: number; - ${treeName}: string; - children?: ${BusinessName}Option[]; -} - -const { proxy } = getCurrentInstance() as ComponentInternalInstance;; - -#if(${dicts} != '') -#set($dictsNoSymbol=$dicts.replace("'", "")) -const { ${dictsNoSymbol} } = toRefs<any>(proxy?.useDict(${dicts})); -#end - -const ${businessName}List = ref<${BusinessName}VO[]>([]); -const ${businessName}Options = ref<${BusinessName}Option[]>([]); -const buttonLoading = ref(false); -const showSearch = ref(true); -const isExpandAll = ref(true); -const loading = ref(false); - -const queryFormRef = ref(ElForm); -const ${businessName}FormRef = ref(ElForm); -const ${businessName}TableRef = ref(ElTable) - -const dialog = reactive<DialogOption>({ - visible: false, - title: '' -}); - -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) -const daterange${AttrName} = ref([]); -#end -#end - -const initFormData: ${BusinessName}Form = { -#foreach ($column in $columns) -#if($column.insert || $column.edit) -#if($column.htmlType == "checkbox") - $column.javaField: []#if($foreach.count != $columns.size()),#end -#else - $column.javaField: undefined#if($foreach.count != $columns.size()),#end -#end -#end -#end -} - -const data = reactive<PageData<${BusinessName}Form, ${BusinessName}Query>>({ - form: {...initFormData}, - queryParams: { -#foreach ($column in $columns) -#if($column.query) - $column.javaField: undefined#if($foreach.count != $columns.size()),#end -#end -#end - }, - rules: { -#foreach ($column in $columns) -#if($column.insert || $column.edit) -#if($column.required) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end - $column.javaField: [ - { required: true, message: "$comment涓嶈兘涓虹┖", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end } - ]#if($foreach.count != $columns.size()),#end -#end -#end -#end - } -}); - -const { queryParams, form, rules } = toRefs(data); - -/** 鏌ヨ${functionName}鍒楄〃 */ -const getList = async () => { - loading.value = true; -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") - queryParams.value.params = {}; -#break -#end -#end -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - if (null != daterange${AttrName} && '' != daterange${AttrName}) { - queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0]; - queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1]; - } -#end -#end - const res = await list${BusinessName}(queryParams.value); - const data = proxy?.handleTree<${BusinessName}VO>(res.data, "${treeCode}", "${treeParentCode}"); - if (data) { - ${businessName}List.value = data; - loading.value = false; - } -} - -/** 鏌ヨ${functionName}涓嬫媺鏍戠粨鏋� */ -const getTreeselect = async () => { - const res = await list${BusinessName}(); - ${businessName}Options.value = []; - const data: ${BusinessName}Option = { ${treeCode}: 0, ${treeName}: '椤剁骇鑺傜偣', children: [] }; - data.children = proxy?.handleTree<${BusinessName}Option>(res.data, "${treeCode}", "${treeParentCode}"); - ${businessName}Options.value.push(data); -} - -// 鍙栨秷鎸夐挳 -const cancel = () => { - reset(); - dialog.visible = false; -} - -// 琛ㄥ崟閲嶇疆 -const reset = () => { - form.value = {...initFormData} - ${businessName}FormRef.value.resetFields(); -} - -/** 鎼滅储鎸夐挳鎿嶄綔 */ -const handleQuery = () => { - getList(); -} - -/** 閲嶇疆鎸夐挳鎿嶄綔 */ -const resetQuery = () => { -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - daterange${AttrName}.value = []; -#end -#end - queryFormRef.value.resetFields(); - handleQuery(); -} - -/** 鏂板鎸夐挳鎿嶄綔 */ -const handleAdd = (row?: ${BusinessName}VO) => { - dialog.visible = true; - dialog.title = "娣诲姞${functionName}"; - nextTick(() => { - reset(); - getTreeselect(); - if (row != null && row.${treeCode}) { - form.value.${treeParentCode} = row.${treeCode}; - } else { - form.value.${treeParentCode} = 0; - } - }); -} - -/** 灞曞紑/鎶樺彔鎿嶄綔 */ -const handleToggleExpandAll = () => { - isExpandAll.value = !isExpandAll.value; - toggleExpandAll(${businessName}List.value, isExpandAll.value) -} - -/** 灞曞紑/鎶樺彔鎿嶄綔 */ -const toggleExpandAll = (data: ${BusinessName}VO[], status: boolean) => { - data.forEach((item) => { - ${businessName}TableRef.value.toggleRowExpansion(item, status) - if (item.children && item.children.length > 0) toggleExpandAll(item.children, status) - }) -} - -/** 淇敼鎸夐挳鎿嶄綔 */ -const handleUpdate = (row: ${BusinessName}VO) => { - loading.value = true; - dialog.visible = true; - dialog.title = "淇敼${functionName}"; - nextTick(async () => { - reset(); - await getTreeselect(); - if (row != null) { - form.value.${treeParentCode} = row.${treeCode}; - } - const res = await get${BusinessName}(row.${treeCode}); - loading.value = false; - Object.assign(form.value, res.data); -#foreach ($column in $columns) -#if($column.htmlType == "checkbox") - form.value.$column.javaField = form.value.${column.javaField}.split(","); -#end -#end - }); -} - -/** 鎻愪氦鎸夐挳 */ -const submitForm = () => { - ${businessName}FormRef.value.validate((valid: boolean) => { - if (valid) { - buttonLoading.value = true; -#foreach ($column in $columns) -#if($column.htmlType == "checkbox") - form.value.$column.javaField = form.value.${column.javaField}.join(","); -#end -#end - if (form.value.${pkColumn.javaField}) { - update${BusinessName}(form.value).finally(() => buttonLoading.value = false); - } else { - add${BusinessName}(form.value).finally(() => buttonLoading.value = false); - } - proxy?.#[[$modal]]#.msgSuccess("鎿嶄綔鎴愬姛"); - dialog.visible = false; - getList(); - } - }); -} - -/** 鍒犻櫎鎸夐挳鎿嶄綔 */ -const handleDelete = async (row: ${BusinessName}VO) => { - await proxy?.#[[$modal]]#.confirm('鏄惁纭鍒犻櫎${functionName}缂栧彿涓�"' + row.${pkColumn.javaField} + '"鐨勬暟鎹」锛�'); - loading.value = true; - await del${BusinessName}(row.${pkColumn.javaField}).finally(() => loading.value = false); - await getList(); - proxy?.#[[$modal]]#.msgSuccess("鍒犻櫎鎴愬姛"); -} - -onMounted(() => { - getList(); -}); -</script> diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm deleted file mode 100644 index 6847f3b..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm +++ /dev/null @@ -1,475 +0,0 @@ -<template> - <div class="p-2"> - <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave"> - <div class="search" v-show="showSearch"> - <el-form :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px"> -#foreach($column in $columns) -#if($column.query) -#set($dictType=$column.dictType) -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#if($column.htmlType == "input" || $column.htmlType == "textarea") - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-input v-model="queryParams.${column.javaField}" placeholder="璇疯緭鍏�${comment}" clearable @keyup.enter="handleQuery" /> - </el-form-item> -#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType) - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-select v-model="queryParams.${column.javaField}" placeholder="璇烽�夋嫨${comment}" clearable> - <el-option - v-for="dict in ${dictType}" - :key="dict.value" - :label="dict.label" - :value="dict.value" - /> - </el-select> - </el-form-item> -#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType) - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-select v-model="queryParams.${column.javaField}" placeholder="璇烽�夋嫨${comment}" clearable> - <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" /> - </el-select> - </el-form-item> -#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN") - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-date-picker clearable - v-model="queryParams.${column.javaField}" - type="date" - value-format="YYYY-MM-DD" - placeholder="璇烽�夋嫨${comment}" - /> - </el-form-item> -#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN") - <el-form-item label="${comment}" style="width: 308px"> - <el-date-picker - v-model="daterange${AttrName}" - value-format="YYYY-MM-DD HH:mm:ss" - type="daterange" - range-separator="-" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - :default-time="[new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 23, 59, 59)]" - /> - </el-form-item> -#end -#end -#end - <el-form-item> - <el-button type="primary" icon="Search" @click="handleQuery">鎼滅储</el-button> - <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - </div> - </transition> - - <el-card shadow="never"> - <template #header> - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['${moduleName}:${businessName}:add']">鏂板</el-button> - </el-col> - <el-col :span="1.5"> - <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['${moduleName}:${businessName}:edit']">淇敼</el-button> - </el-col> - <el-col :span="1.5"> - <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['${moduleName}:${businessName}:remove']">鍒犻櫎</el-button> - </el-col> - <el-col :span="1.5"> - <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['${moduleName}:${businessName}:export']">瀵煎嚭</el-button> - </el-col> - <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> - </el-row> - </template> - - <el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center" /> -#foreach($column in $columns) -#set($javaField=$column.javaField) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#if($column.pk) - <el-table-column label="${comment}" align="center" prop="${javaField}" v-if="${column.list}" /> -#elseif($column.list && $column.htmlType == "datetime") - <el-table-column label="${comment}" align="center" prop="${javaField}" width="180"> - <template #default="scope"> - <span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span> - </template> - </el-table-column> -#elseif($column.list && $column.htmlType == "imageUpload") - <el-table-column label="${comment}" align="center" prop="${javaField}" width="100"> - <template #default="scope"> - <image-preview :src="scope.row.${javaField}" :width="50" :height="50"/> - </template> - </el-table-column> -#elseif($column.list && $column.dictType && "" != $column.dictType) - <el-table-column label="${comment}" align="center" prop="${javaField}"> - <template #default="scope"> -#if($column.htmlType == "checkbox") - <dict-tag :options="${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/> -#else - <dict-tag :options="${column.dictType}" :value="scope.row.${javaField}"/> -#end - </template> - </el-table-column> -#elseif($column.list && "" != $javaField) - <el-table-column label="${comment}" align="center" prop="${javaField}" /> -#end -#end - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template #default="scope"> - <el-tooltip content="淇敼" placement="top"> - <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']"></el-button> - </el-tooltip> - <el-tooltip content="鍒犻櫎" placement="top"> - <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']"></el-button> - </el-tooltip> - </template> - </el-table-column> - </el-table> - - <pagination - v-show="total>0" - :total="total" - v-model:page="queryParams.pageNum" - v-model:limit="queryParams.pageSize" - @pagination="getList" - /> - </el-card> - <!-- 娣诲姞鎴栦慨鏀�${functionName}瀵硅瘽妗� --> - <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body> - <el-form ref="${businessName}FormRef" :model="form" :rules="rules" label-width="80px"> -#foreach($column in $columns) -#set($field=$column.javaField) -#if($column.insert && !$column.pk) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#set($dictType=$column.dictType) -#if($column.htmlType == "input") - <el-form-item label="${comment}" prop="${field}"> - <el-input v-model="form.${field}" placeholder="璇疯緭鍏�${comment}" /> - </el-form-item> -#elseif($column.htmlType == "imageUpload") - <el-form-item label="${comment}" prop="${field}"> - <image-upload v-model="form.${field}"/> - </el-form-item> -#elseif($column.htmlType == "fileUpload") - <el-form-item label="${comment}" prop="${field}"> - <file-upload v-model="form.${field}"/> - </el-form-item> -#elseif($column.htmlType == "editor") - <el-form-item label="${comment}"> - <editor v-model="form.${field}" :min-height="192"/> - </el-form-item> -#elseif($column.htmlType == "select" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-select v-model="form.${field}" placeholder="璇烽�夋嫨${comment}"> - <el-option - v-for="dict in ${dictType}" - :key="dict.value" - :label="dict.label" -#if($column.javaType == "Integer" || $column.javaType == "Long") - :value="parseInt(dict.value)" -#else - :value="dict.value" -#end - ></el-option> - </el-select> - </el-form-item> -#elseif($column.htmlType == "select" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-select v-model="form.${field}" placeholder="璇烽�夋嫨${comment}"> - <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" /> - </el-select> - </el-form-item> -#elseif($column.htmlType == "checkbox" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-checkbox-group v-model="form.${field}"> - <el-checkbox - v-for="dict in ${dictType}" - :key="dict.value" - :label="dict.value"> - {{dict.label}} - </el-checkbox> - </el-checkbox-group> - </el-form-item> -#elseif($column.htmlType == "checkbox" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-checkbox-group v-model="form.${field}"> - <el-checkbox>璇烽�夋嫨瀛楀吀鐢熸垚</el-checkbox> - </el-checkbox-group> - </el-form-item> -#elseif($column.htmlType == "radio" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-radio-group v-model="form.${field}"> - <el-radio - v-for="dict in ${dictType}" - :key="dict.value" -#if($column.javaType == "Integer" || $column.javaType == "Long") - :label="parseInt(dict.value)" -#else - :label="dict.value" -#end - >{{dict.label}}</el-radio> - </el-radio-group> - </el-form-item> -#elseif($column.htmlType == "radio" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-radio-group v-model="form.${field}"> - <el-radio label="1">璇烽�夋嫨瀛楀吀鐢熸垚</el-radio> - </el-radio-group> - </el-form-item> -#elseif($column.htmlType == "datetime") - <el-form-item label="${comment}" prop="${field}"> - <el-date-picker clearable - v-model="form.${field}" - type="datetime" - value-format="YYYY-MM-DD HH:mm:ss" - placeholder="璇烽�夋嫨${comment}"> - </el-date-picker> - </el-form-item> -#elseif($column.htmlType == "textarea") - <el-form-item label="${comment}" prop="${field}"> - <el-input v-model="form.${field}" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" /> - </el-form-item> -#end -#end -#end - </el-form> - <template #footer> - <div class="dialog-footer"> - <el-button :loading="buttonLoading" type="primary" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </div> - </template> - </el-dialog> - </div> -</template> - -<script setup name="${BusinessName}" lang="ts"> - import { - add${BusinessName}, - ${BusinessName}Form, - get${BusinessName}, - list${BusinessName}, - ${BusinessName}Query, - update${BusinessName}, - ${BusinessName}VO - } from '@/api/'; - import {ComponentInternalInstance} from 'vue'; - import {ElForm} from 'element-plus'; - - const { proxy } = getCurrentInstance() as ComponentInternalInstance; -#if(${dicts} != '') -#set($dictsNoSymbol=$dicts.replace("'", "")) -const { ${dictsNoSymbol} } = toRefs<any>(proxy?.useDict(${dicts})); -#end - -const ${businessName}List = ref<${BusinessName}VO[]>([]); -const buttonLoading = ref(false); -const loading = ref(true); -const showSearch = ref(true); -const ids = ref<Array<string | number>>([]); -const single = ref(true); -const multiple = ref(true); -const total = ref(0); -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) -const daterange${AttrName} = ref([]); -#end -#end - -const queryFormRef = ref(ElForm); -const ${businessName}FormRef = ref(ElForm); - -const dialog = reactive<DialogOption>({ - visible: false, - title: '' -}); - -const initFormData: ${BusinessName}Form = { -#foreach ($column in $columns) -#if($column.insert || $column.edit) -#if($column.htmlType == "checkbox") - $column.javaField: []#if($foreach.count != $columns.size()),#end -#else - $column.javaField: undefined#if($foreach.count != $columns.size()),#end -#end -#end -#end -} -const data = reactive<PageData<${BusinessName}Form, ${BusinessName}Query>>({ - form: {...initFormData}, - queryParams: { - pageNum: 1, - pageSize: 10, -#foreach ($column in $columns) -#if($column.query) - $column.javaField: undefined#if($foreach.count != $columns.size()),#end -#end -#end - }, - rules: { -#foreach ($column in $columns) -#if($column.insert || $column.edit) -#if($column.required) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end - $column.javaField: [ - { required: true, message: "$comment涓嶈兘涓虹┖", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end } - ]#if($foreach.count != $columns.size()),#end -#end -#end -#end - } -}); - -const { queryParams, form, rules } = toRefs(data); - -/** 鏌ヨ${functionName}鍒楄〃 */ -const getList = async () => { - loading.value = true; -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") - queryParams.value.params = {}; -#break -#end -#end -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - if (null != daterange${AttrName} && '' != daterange${AttrName}) { - queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0]; - queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1]; - } -#end -#end - const res = await list${BusinessName}(queryParams.value); - ${businessName}List.value = res.rows; - total.value = res.total; - loading.value = false; -} - -/** 鍙栨秷鎸夐挳 */ -const cancel = () => { - reset(); - dialog.visible = false; -} - -/** 琛ㄥ崟閲嶇疆 */ -const reset = () => { - form.value = {...initFormData}; - ${businessName}FormRef.value.resetFields(); -} - -/** 鎼滅储鎸夐挳鎿嶄綔 */ -const handleQuery = () => { - queryParams.value.pageNum = 1; - getList(); -} - -/** 閲嶇疆鎸夐挳鎿嶄綔 */ -const resetQuery = () => { -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - daterange${AttrName}.value = []; -#end -#end - queryFormRef.value.resetFields(); - handleQuery(); -} - -/** 澶氶�夋閫変腑鏁版嵁 */ -const handleSelectionChange = (selection: ${BusinessName}VO[]) => { - ids.value = selection.map(item => item.${pkColumn.javaField}); - single.value = selection.length != 1; - multiple.value = !selection.length; -} - -/** 鏂板鎸夐挳鎿嶄綔 */ -const handleAdd = () => { - dialog.visible = true; - dialog.title = "娣诲姞${functionName}"; - nextTick(() => { - reset(); - }); -} - -/** 淇敼鎸夐挳鎿嶄綔 */ -const handleUpdate = (row?: ${BusinessName}VO) => { - loading.value = true - dialog.visible = true; - dialog.title = "淇敼${functionName}"; - nextTick(async () => { - reset(); - const _${pkColumn.javaField} = row?.${pkColumn.javaField} || ids.value[0] - const res = await get${BusinessName}(_${pkColumn.javaField}); - loading.value = false; - Object.assign(form.value, res.data); -#foreach ($column in $columns) -#if($column.htmlType == "checkbox") - form.value.$column.javaField = form.value.${column.javaField}.split(","); -#end -#end - }); -} - -/** 鎻愪氦鎸夐挳 */ -const submitForm = () => { - ${businessName}FormRef.value.validate(async (valid: boolean) => { - if (valid) { - buttonLoading.value = true; - #foreach ($column in $columns) - #if($column.htmlType == "checkbox") - form.value.$column.javaField = form.value.${column.javaField}.join(","); - #end - #end - if (form.value.${pkColumn.javaField}) { - await update${BusinessName}(form.value).finally(() => buttonLoading.value = false); - } else { - await add${BusinessName}(form.value).finally(() => buttonLoading.value = false); - } - proxy?.#[[$modal]]#.msgSuccess("淇敼鎴愬姛"); - dialog.visible = false; - await getList(); - } - }); -} - -/** 鍒犻櫎鎸夐挳鎿嶄綔 */ -const handleDelete = async (row?: ${BusinessName}VO) => { - const _${pkColumn.javaField}s = row?.${pkColumn.javaField} || ids.value; - await proxy?.#[[$modal]]#.confirm('鏄惁纭鍒犻櫎${functionName}缂栧彿涓�"' + _${pkColumn.javaField}s + '"鐨勬暟鎹」锛�').finally(() => loading.value = false); - await del${BusinessName}(_${pkColumn.javaField}s); - proxy?.#[[$modal]]#.msgSuccess("鍒犻櫎鎴愬姛"); - await getList(); -} - -/** 瀵煎嚭鎸夐挳鎿嶄綔 */ -const handleExport = () => { - proxy?.download('${moduleName}/${businessName}/export', { - ...queryParams.value - }, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`) -} - -onMounted(() => { - getList(); -}); -</script> diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm deleted file mode 100644 index 9fb48d9..0000000 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE mapper -PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="${packageName}.mapper.${ClassName}Mapper"> - -</mapper> diff --git a/ruoyi-modules/ruoyi-job/pom.xml b/ruoyi-modules/ruoyi-job/pom.xml deleted file mode 100644 index 7dafc39..0000000 --- a/ruoyi-modules/ruoyi-job/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <parent> - <groupId>com.xmzs</groupId> - <artifactId>ruoyi-modules</artifactId> - <version>${revision}</version> - <relativePath>../pom.xml</relativePath> - </parent> - <modelVersion>4.0.0</modelVersion> - <packaging>jar</packaging> - <artifactId>ruoyi-job</artifactId> - - <description> - 浠诲姟璋冨害 - </description> - - <dependencies> - - <!-- 閫氱敤宸ュ叿--> - <dependency> - <groupId>com.xmzs</groupId> - <artifactId>ruoyi-common-core</artifactId> - </dependency> - - <!-- 璋冨害妯″潡 --> - <dependency> - <groupId>com.xmzs</groupId> - <artifactId>ruoyi-common-job</artifactId> - </dependency> - - </dependencies> - -</project> - diff --git a/ruoyi-modules/ruoyi-job/src/main/java/com/xmzs/job/service/SampleService.java b/ruoyi-modules/ruoyi-job/src/main/java/com/xmzs/job/service/SampleService.java deleted file mode 100644 index 857a209..0000000 --- a/ruoyi-modules/ruoyi-job/src/main/java/com/xmzs/job/service/SampleService.java +++ /dev/null @@ -1,252 +0,0 @@ -package com.xmzs.job.service; - -import com.xxl.job.core.context.XxlJobHelper; -import com.xxl.job.core.handler.annotation.XxlJob; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; - -import java.io.BufferedInputStream; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.util.Arrays; - -/** - * XxlJob寮�鍙戠ず渚嬶紙Bean妯″紡锛� - * <p> - * 寮�鍙戞楠わ細 - * 1銆佷换鍔″紑鍙戯細鍦⊿pring Bean瀹炰緥涓紝寮�鍙慗ob鏂规硶锛� - * 2銆佹敞瑙i厤缃細涓篔ob鏂规硶娣诲姞娉ㄨВ "@XxlJob(value="鑷畾涔塲obhandler鍚嶇О", init = "JobHandler鍒濆鍖栨柟娉�", destroy = "JobHandler閿�姣佹柟娉�")"锛屾敞瑙alue鍊煎搴旂殑鏄皟搴︿腑蹇冩柊寤轰换鍔$殑JobHandler灞炴�х殑鍊笺�� - * 3銆佹墽琛屾棩蹇楋細闇�瑕侀�氳繃 "XxlJobHelper.log" 鎵撳嵃鎵ц鏃ュ織锛� - * 4銆佷换鍔$粨鏋滐細榛樿浠诲姟缁撴灉涓� "鎴愬姛" 鐘舵�侊紝涓嶉渶瑕佷富鍔ㄨ缃紱濡傛湁璇夋眰锛屾瘮濡傝缃换鍔$粨鏋滀负澶辫触锛屽彲浠ラ�氳繃 "XxlJobHelper.handleFail/handleSuccess" 鑷富璁剧疆浠诲姟缁撴灉锛� - * - * @author xuxueli 2019-12-11 21:52:51 - */ -@Slf4j -@Service -public class SampleService { - - - /** - * 1銆佺畝鍗曚换鍔$ず渚嬶紙Bean妯″紡锛� - */ - @XxlJob("demoJobHandler") - public void demoJobHandler() throws Exception { - XxlJobHelper.log("XXL-JOB, Hello World."); - - for (int i = 0; i < 5; i++) { - XxlJobHelper.log("beat at:" + i); - } - // default success - } - - - /** - * 2銆佸垎鐗囧箍鎾换鍔� - */ - @XxlJob("shardingJobHandler") - public void shardingJobHandler() throws Exception { - - // 鍒嗙墖鍙傛暟 - int shardIndex = XxlJobHelper.getShardIndex(); - int shardTotal = XxlJobHelper.getShardTotal(); - - XxlJobHelper.log("鍒嗙墖鍙傛暟锛氬綋鍓嶅垎鐗囧簭鍙� = {}, 鎬诲垎鐗囨暟 = {}", shardIndex, shardTotal); - - // 涓氬姟閫昏緫 - for (int i = 0; i < shardTotal; i++) { - if (i == shardIndex) { - XxlJobHelper.log("绗� {} 鐗�, 鍛戒腑鍒嗙墖寮�濮嬪鐞�", i); - } else { - XxlJobHelper.log("绗� {} 鐗�, 蹇界暐", i); - } - } - - } - - - /** - * 3銆佸懡浠よ浠诲姟 - */ - @XxlJob("commandJobHandler") - public void commandJobHandler() throws Exception { - String command = XxlJobHelper.getJobParam(); - int exitValue = -1; - - BufferedReader bufferedReader = null; - try { - // command process - ProcessBuilder processBuilder = new ProcessBuilder(); - processBuilder.command(command); - processBuilder.redirectErrorStream(true); - - Process process = processBuilder.start(); - //Process process = Runtime.getRuntime().exec(command); - - BufferedInputStream bufferedInputStream = new BufferedInputStream(process.getInputStream()); - bufferedReader = new BufferedReader(new InputStreamReader(bufferedInputStream)); - - // command log - String line; - while ((line = bufferedReader.readLine()) != null) { - XxlJobHelper.log(line); - } - - // command exit - process.waitFor(); - exitValue = process.exitValue(); - } catch (Exception e) { - XxlJobHelper.log(e); - } finally { - if (bufferedReader != null) { - bufferedReader.close(); - } - } - - if (exitValue == 0) { - // default success - } else { - XxlJobHelper.handleFail("command exit value(" + exitValue + ") is failed"); - } - - } - - - /** - * 4銆佽法骞冲彴Http浠诲姟 - * 鍙傛暟绀轰緥锛� - * "url: http://www.baidu.com\n" + - * "method: get\n" + - * "data: content\n"; - */ - @XxlJob("httpJobHandler") - public void httpJobHandler() throws Exception { - - // param parse - String param = XxlJobHelper.getJobParam(); - if (param == null || param.trim().length() == 0) { - XxlJobHelper.log("param[" + param + "] invalid."); - - XxlJobHelper.handleFail(); - return; - } - - String[] httpParams = param.split("\n"); - String url = null; - String method = null; - String data = null; - for (String httpParam : httpParams) { - if (httpParam.startsWith("url:")) { - url = httpParam.substring(httpParam.indexOf("url:") + 4).trim(); - } - if (httpParam.startsWith("method:")) { - method = httpParam.substring(httpParam.indexOf("method:") + 7).trim().toUpperCase(); - } - if (httpParam.startsWith("data:")) { - data = httpParam.substring(httpParam.indexOf("data:") + 5).trim(); - } - } - - // param valid - if (url == null || url.trim().length() == 0) { - XxlJobHelper.log("url[" + url + "] invalid."); - - XxlJobHelper.handleFail(); - return; - } - if (method == null || !Arrays.asList("GET", "POST").contains(method)) { - XxlJobHelper.log("method[" + method + "] invalid."); - - XxlJobHelper.handleFail(); - return; - } - boolean isPostMethod = method.equals("POST"); - - // request - HttpURLConnection connection = null; - BufferedReader bufferedReader = null; - try { - // connection - URL realUrl = new URL(url); - connection = (HttpURLConnection) realUrl.openConnection(); - - // connection setting - connection.setRequestMethod(method); - connection.setDoOutput(isPostMethod); - connection.setDoInput(true); - connection.setUseCaches(false); - connection.setReadTimeout(5 * 1000); - connection.setConnectTimeout(3 * 1000); - connection.setRequestProperty("connection", "Keep-Alive"); - connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8"); - connection.setRequestProperty("Accept-Charset", "application/json;charset=UTF-8"); - - // do connection - connection.connect(); - - // data - if (isPostMethod && data != null && data.trim().length() > 0) { - DataOutputStream dataOutputStream = new DataOutputStream(connection.getOutputStream()); - dataOutputStream.write(data.getBytes("UTF-8")); - dataOutputStream.flush(); - dataOutputStream.close(); - } - - // valid StatusCode - int statusCode = connection.getResponseCode(); - if (statusCode != 200) { - throw new RuntimeException("Http Request StatusCode(" + statusCode + ") Invalid."); - } - - // result - bufferedReader = new BufferedReader(new InputStreamReader(connection.getInputStream(), "UTF-8")); - StringBuilder result = new StringBuilder(); - String line; - while ((line = bufferedReader.readLine()) != null) { - result.append(line); - } - String responseMsg = result.toString(); - - XxlJobHelper.log(responseMsg); - - return; - } catch (Exception e) { - XxlJobHelper.log(e); - - XxlJobHelper.handleFail(); - return; - } finally { - try { - if (bufferedReader != null) { - bufferedReader.close(); - } - if (connection != null) { - connection.disconnect(); - } - } catch (Exception e2) { - XxlJobHelper.log(e2); - } - } - - } - - /** - * 5銆佺敓鍛藉懆鏈熶换鍔$ず渚嬶細浠诲姟鍒濆鍖栦笌閿�姣佹椂锛屾敮鎸佽嚜瀹氫箟鐩稿叧閫昏緫锛� - */ - @XxlJob(value = "demoJobHandler2", init = "init", destroy = "destroy") - public void demoJobHandler2() throws Exception { - XxlJobHelper.log("XXL-JOB, Hello World."); - } - - public void init() { - log.info("init"); - } - - public void destroy() { - log.info("destory"); - } - - -} diff --git a/ruoyi-modules/ruoyi-knowledge/pom.xml b/ruoyi-modules/ruoyi-knowledge/pom.xml new file mode 100644 index 0000000..dcba199 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/pom.xml @@ -0,0 +1,200 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.ruoyi</groupId> + <artifactId>ruoyi-modules</artifactId> + <version>${revision}</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>ruoyi-knowledge</artifactId> + + <properties> + <maven.compiler.source>17</maven.compiler.source> + <maven.compiler.target>17</maven.compiler.target> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-redis</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-freemarker</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-validation</artifactId> + </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-aop</artifactId> + </dependency> + + <dependency> + <groupId>org.webjars</groupId> + <artifactId>webjars-locator-core</artifactId> + </dependency> + <dependency> + <groupId>org.webjars</groupId> + <artifactId>sockjs-client</artifactId> + <version>1.0.2</version> + </dependency> + + <dependency> + <groupId>org.webjars</groupId> + <artifactId>bootstrap</artifactId> + <version>3.3.7</version> + </dependency> + <dependency> + <groupId>org.webjars</groupId> + <artifactId>jquery</artifactId> + <version>3.1.1-1</version> + </dependency> + <dependency> + <groupId>org.mybatis.spring.boot</groupId> + <artifactId>mybatis-spring-boot-starter</artifactId> + <version>3.0.2</version> + </dependency> + <dependency> + <groupId>com.baomidou</groupId> + <artifactId>mybatis-plus-boot-starter</artifactId> + <version>3.5.3</version> + </dependency> + <dependency> + <groupId>cn.hutool</groupId> + <artifactId>hutool-all</artifactId> + <version>5.8.10</version> + </dependency> + <dependency> + <groupId>com.github.xiaoymin</groupId> + <artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId> + <version>4.0.0</version> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-devtools</artifactId> + <scope>runtime</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>com.mysql</groupId> + <artifactId>mysql-connector-j</artifactId> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>io.projectreactor.netty</groupId> + <artifactId>reactor-netty-core</artifactId> + <version>1.1.16</version> + </dependency> + <dependency> + <groupId>io.projectreactor.netty</groupId> + <artifactId>reactor-netty-http</artifactId> + <version>1.1.16</version> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-configuration-processor</artifactId> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <optional>true</optional> + </dependency> + + <dependency> + <groupId>com.theokanning.openai-gpt3-java</groupId> + <artifactId>api</artifactId> + <version>0.18.0</version> + </dependency> + <dependency> + <groupId>com.theokanning.openai-gpt3-java</groupId> + <artifactId>client</artifactId> + <version>0.18.0</version> + </dependency> + <dependency> + <groupId>com.theokanning.openai-gpt3-java</groupId> + <artifactId>service</artifactId> + <version>0.18.0</version> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + + <!-- 闃块噷JSON瑙f瀽鍣� --> + <dependency> + <groupId>com.alibaba.fastjson2</groupId> + <artifactId>fastjson2</artifactId> + <version>2.0.24</version> + </dependency> + <dependency> + <groupId>com.knuddels</groupId> + <artifactId>jtokkit</artifactId> + <version>0.5.0</version> + </dependency> + <dependency> + <groupId>io.weaviate</groupId> + <artifactId>client</artifactId> + <version>4.0.0</version> <!-- Check latest version --> + </dependency> + <dependency> + <groupId>org.apache.poi</groupId> + <artifactId>poi</artifactId> + <version>3.8</version> + </dependency> + <dependency> + <groupId>org.apache.poi</groupId> + <artifactId>poi-ooxml</artifactId> + <version>3.8</version> + </dependency> + <dependency> + <groupId>org.apache.poi</groupId> + <artifactId>poi-ooxml-schemas</artifactId> + <version>3.8</version> + </dependency> + <dependency> + <groupId>org.apache.pdfbox</groupId> + <artifactId>pdfbox</artifactId> + <version>2.0.27</version> + </dependency> + <dependency> + <groupId>com.squareup.retrofit2</groupId> + <artifactId>converter-jackson</artifactId> + <version>2.9.0</version> + </dependency> + <dependency> + <groupId>io.milvus</groupId> + <artifactId>milvus-sdk-java</artifactId> + <version>2.3.2</version> + </dependency> + <dependency> + <groupId>com.github.pagehelper</groupId> + <artifactId>pagehelper-spring-boot-starter</artifactId> + <version>1.4.6</version> + </dependency> + <dependency> + <groupId>com.belerweb</groupId> + <artifactId>pinyin4j</artifactId> + <version>2.5.1</version> + </dependency> + + + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>ruoyi-system</artifactId> + </dependency> + + + </dependencies> + + +</project> diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/CodeFileLoader.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/CodeFileLoader.java new file mode 100644 index 0000000..0ca7ea6 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/CodeFileLoader.java @@ -0,0 +1,37 @@ +package org.ruoyi.knowledge.chain.loader; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.ruoyi.knowledge.chain.split.TextSplitter; +import org.springframework.stereotype.Component; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.List; + +@Component +@AllArgsConstructor +@Slf4j +public class CodeFileLoader implements ResourceLoader{ + private final TextSplitter textSplitter; + @Override + public String getContent(InputStream inputStream) { + StringBuffer stringBuffer = new StringBuffer(); + try (InputStreamReader reader = new InputStreamReader(inputStream); + BufferedReader bufferedReader = new BufferedReader(reader)){ + String line; + while ((line = bufferedReader.readLine()) != null) { + stringBuffer.append(line).append("\n"); + } + } catch (IOException e) { + e.printStackTrace(); + } + return stringBuffer.toString(); + } + @Override + public List<String> getChunkList(String content){ + return textSplitter.split(content); + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/CsvFileLoader.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/CsvFileLoader.java new file mode 100644 index 0000000..5bedf5b --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/CsvFileLoader.java @@ -0,0 +1,16 @@ +package org.ruoyi.knowledge.chain.loader; + +import java.io.InputStream; +import java.util.List; + +public class CsvFileLoader implements ResourceLoader{ + @Override + public String getContent(InputStream inputStream) { + return null; + } + + @Override + public List<String> getChunkList(String content) { + return null; + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/FolderLoader.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/FolderLoader.java new file mode 100644 index 0000000..4682fee --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/FolderLoader.java @@ -0,0 +1,16 @@ +package org.ruoyi.knowledge.chain.loader; + +import java.io.InputStream; +import java.util.List; + +public class FolderLoader implements ResourceLoader{ + @Override + public String getContent(InputStream inputStream) { + return null; + } + + @Override + public List<String> getChunkList(String content) { + return null; + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/GithubLoader.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/GithubLoader.java new file mode 100644 index 0000000..ae86ac4 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/GithubLoader.java @@ -0,0 +1,16 @@ +package org.ruoyi.knowledge.chain.loader; + +import java.io.InputStream; +import java.util.List; + +public class GithubLoader implements ResourceLoader{ + @Override + public String getContent(InputStream inputStream) { + return null; + } + + @Override + public List<String> getChunkList(String content) { + return null; + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/JsonFileLoader.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/JsonFileLoader.java new file mode 100644 index 0000000..5cd1d6e --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/JsonFileLoader.java @@ -0,0 +1,16 @@ +package org.ruoyi.knowledge.chain.loader; + +import java.io.InputStream; +import java.util.List; + +public class JsonFileLoader implements ResourceLoader{ + @Override + public String getContent(InputStream inputStream) { + return null; + } + + @Override + public List<String> getChunkList(String content) { + return null; + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/MarkDownFileLoader.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/MarkDownFileLoader.java new file mode 100644 index 0000000..cecdf05 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/MarkDownFileLoader.java @@ -0,0 +1,37 @@ +package org.ruoyi.knowledge.chain.loader; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.ruoyi.knowledge.chain.split.TextSplitter; +import org.springframework.stereotype.Component; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.List; + +@Component +@AllArgsConstructor +@Slf4j +public class MarkDownFileLoader implements ResourceLoader{ + private final TextSplitter textSplitter; + @Override + public String getContent(InputStream inputStream) { + StringBuffer stringBuffer = new StringBuffer(); + try (InputStreamReader reader = new InputStreamReader(inputStream); + BufferedReader bufferedReader = new BufferedReader(reader)){ + String line; + while ((line = bufferedReader.readLine()) != null) { + stringBuffer.append(line).append("\n"); + } + } catch (IOException e) { + e.printStackTrace(); + } + return stringBuffer.toString(); + } + @Override + public List<String> getChunkList(String content){ + return textSplitter.split(content); + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/PdfFileLoader.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/PdfFileLoader.java new file mode 100644 index 0000000..83566de --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/PdfFileLoader.java @@ -0,0 +1,34 @@ +package org.ruoyi.knowledge.chain.loader; + +import lombok.AllArgsConstructor; +import org.apache.pdfbox.pdmodel.PDDocument; +import org.apache.pdfbox.text.PDFTextStripper; +import org.ruoyi.knowledge.chain.split.TextSplitter; +import org.springframework.stereotype.Component; + +import java.io.IOException; +import java.io.InputStream; +import java.util.List; + +@Component +@AllArgsConstructor +public class PdfFileLoader implements ResourceLoader{ + private final TextSplitter characterTextSplitter; + @Override + public String getContent(InputStream inputStream) { + PDDocument document = null; + try { + document = PDDocument.load(inputStream); + PDFTextStripper textStripper = new PDFTextStripper(); + String content = textStripper.getText(document); + return content; + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public List<String> getChunkList(String content) { + return characterTextSplitter.split(content); + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/ResourceLoader.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/ResourceLoader.java new file mode 100644 index 0000000..32f4130 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/ResourceLoader.java @@ -0,0 +1,12 @@ +package org.ruoyi.knowledge.chain.loader; + +import java.io.InputStream; +import java.util.List; + +/** + * 璧勬簮杞藉叆 + */ +public interface ResourceLoader { + String getContent(InputStream inputStream); + List<String> getChunkList(String content); +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/ResourceLoaderFactory.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/ResourceLoaderFactory.java new file mode 100644 index 0000000..6a29b25 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/ResourceLoaderFactory.java @@ -0,0 +1,33 @@ +package org.ruoyi.knowledge.chain.loader; + +import lombok.AllArgsConstructor; +import org.ruoyi.knowledge.chain.split.CharacterTextSplitter; +import org.ruoyi.knowledge.chain.split.CodeTextSplitter; +import org.ruoyi.knowledge.chain.split.MarkdownTextSplitter; +import org.ruoyi.knowledge.chain.split.TokenTextSplitter; +import org.ruoyi.knowledge.constant.FileType; +import org.springframework.stereotype.Component; + +@AllArgsConstructor +@Component +public class ResourceLoaderFactory { + private final CharacterTextSplitter characterTextSplitter; + private final CodeTextSplitter codeTextSplitter; + private final MarkdownTextSplitter markdownTextSplitter; + private final TokenTextSplitter tokenTextSplitter; + public ResourceLoader getLoaderByFileType(String fileType){ + if (FileType.isTextFile(fileType)){ + return new TextFileLoader(characterTextSplitter); + } else if (FileType.isWord(fileType)) { + return new WordLoader(characterTextSplitter); + } else if (FileType.isPdf(fileType)) { + return new PdfFileLoader(characterTextSplitter); + } else if (FileType.isMdFile(fileType)) { + return new MarkDownFileLoader(markdownTextSplitter); + }else if (FileType.isCodeFile(fileType)) { + return new CodeFileLoader(codeTextSplitter); + }else { + return new TextFileLoader(characterTextSplitter); + } + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/TextFileLoader.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/TextFileLoader.java new file mode 100644 index 0000000..a2e74fa --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/TextFileLoader.java @@ -0,0 +1,37 @@ +package org.ruoyi.knowledge.chain.loader; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.ruoyi.knowledge.chain.split.TextSplitter; +import org.springframework.stereotype.Component; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.List; + +@Component +@AllArgsConstructor +@Slf4j +public class TextFileLoader implements ResourceLoader{ + private final TextSplitter textSplitter; + @Override + public String getContent(InputStream inputStream) { + StringBuffer stringBuffer = new StringBuffer(); + try (InputStreamReader reader = new InputStreamReader(inputStream, "UTF-8"); + BufferedReader bufferedReader = new BufferedReader(reader)){ + String line; + while ((line = bufferedReader.readLine()) != null) { + stringBuffer.append(line).append("\n"); + } + } catch (IOException e) { + e.printStackTrace(); + } + return stringBuffer.toString(); + } + @Override + public List<String> getChunkList(String content){ + return textSplitter.split(content); + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/WordLoader.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/WordLoader.java new file mode 100644 index 0000000..7b9d920 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/loader/WordLoader.java @@ -0,0 +1,37 @@ +package org.ruoyi.knowledge.chain.loader; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.xwpf.extractor.XWPFWordExtractor; +import org.apache.poi.xwpf.usermodel.XWPFDocument; +import org.ruoyi.knowledge.chain.split.TextSplitter; +import org.springframework.stereotype.Component; + +import java.io.IOException; +import java.io.InputStream; +import java.util.List; + +@Component +@AllArgsConstructor +@Slf4j +public class WordLoader implements ResourceLoader{ + private final TextSplitter textSplitter; + @Override + public String getContent(InputStream inputStream) { + XWPFDocument document = null; + try { + document = new XWPFDocument(inputStream); + XWPFWordExtractor extractor = new XWPFWordExtractor(document); + String content = extractor.getText(); + return content; + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + @Override + public List<String> getChunkList(String content) { + return textSplitter.split(content); + } + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/retrieve/PromptRetrieverProperties.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/retrieve/PromptRetrieverProperties.java new file mode 100644 index 0000000..3b62c6b --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/retrieve/PromptRetrieverProperties.java @@ -0,0 +1,16 @@ +package org.ruoyi.knowledge.chain.retrieve; + +import lombok.Data; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +@Data +@Component +public class PromptRetrieverProperties { + /** + * 浠庣煡璇嗗簱涓绱㈢殑鏉℃暟锛宭imits 搴斿ぇ浜� num + */ + @Value("${chain.limits}") + private int limits; + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/CharacterTextSplitter.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/CharacterTextSplitter.java new file mode 100644 index 0000000..12db513 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/CharacterTextSplitter.java @@ -0,0 +1,51 @@ +package org.ruoyi.knowledge.chain.split; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.context.annotation.Primary; +import org.springframework.stereotype.Component; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +@Component +@AllArgsConstructor +@Slf4j +@Primary +public class CharacterTextSplitter implements TextSplitter{ + private final SplitterProperties splitterProperties; + @Override + public List<String> split(String content) { + List<String> chunkList = new ArrayList<>(); + if (content.contains(splitterProperties.getEndspliter())){ + // 鎸夎嚜瀹氫箟鍒嗛殧绗﹀垏鍒� + String[] chunks = content.split(splitterProperties.getEndspliter()); + chunkList.addAll(Arrays.asList(chunks)); + }else { + int indexMin = 0; + int len = content.length(); + int i = 0; + int right = 0; + while (true) { + if (len > right ){ + int begin = i*splitterProperties.getSize() - splitterProperties.getOverlay(); + if (begin < indexMin){ + begin = indexMin; + } + int end = splitterProperties.getSize()*(i+1) + splitterProperties.getOverlay(); + if (end > len){ + end = len; + } + String chunk = content.substring(begin,end); + chunkList.add(chunk); + i++; + right = right + splitterProperties.getSize(); + }else { + break; + } + } + } + return chunkList; + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/CodeTextSplitter.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/CodeTextSplitter.java new file mode 100644 index 0000000..e68d61c --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/CodeTextSplitter.java @@ -0,0 +1,17 @@ +package org.ruoyi.knowledge.chain.split; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@AllArgsConstructor +@Slf4j +public class CodeTextSplitter implements TextSplitter{ + @Override + public List<String> split(String content) { + return null; + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/MarkdownTextSplitter.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/MarkdownTextSplitter.java new file mode 100644 index 0000000..5c44781 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/MarkdownTextSplitter.java @@ -0,0 +1,17 @@ +package org.ruoyi.knowledge.chain.split; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@AllArgsConstructor +@Slf4j +public class MarkdownTextSplitter implements TextSplitter{ + @Override + public List<String> split(String content) { + return null; + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/SplitterProperties.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/SplitterProperties.java new file mode 100644 index 0000000..d0d9f5f --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/SplitterProperties.java @@ -0,0 +1,30 @@ +package org.ruoyi.knowledge.chain.split; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +@Data +@Component +@ConfigurationProperties(prefix = "chain.split.chunk") +public class SplitterProperties { + /** + * 鍒嗘鏍囪瘑绗� + */ + private String endspliter; + + /** + * 鎻愰棶鍒嗘鏍囪瘑绗� + */ + private String qaspliter; + + /** + * 鍒嗗潡鏂囨湰澶у皬 + */ + private int size; + + /** + * 鐩搁偦鍧椾箣闂撮噸鍙犵殑瀛楃鏁�(閬垮厤杈圭晫淇℃伅涓㈠け) + */ + private int overlay; +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/TextSplitter.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/TextSplitter.java new file mode 100644 index 0000000..5d3d71b --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/TextSplitter.java @@ -0,0 +1,11 @@ +package org.ruoyi.knowledge.chain.split; + +import java.util.List; + +/** + * 鏂囨湰鍒囧垎 + */ +public interface TextSplitter { + + List<String> split(String content); +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/TokenTextSplitter.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/TokenTextSplitter.java new file mode 100644 index 0000000..dedc631 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/split/TokenTextSplitter.java @@ -0,0 +1,17 @@ +package org.ruoyi.knowledge.chain.split; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@AllArgsConstructor +@Slf4j +public class TokenTextSplitter implements TextSplitter{ + @Override + public List<String> split(String content) { + return null; + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorizer/OpenAiVectorization.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorizer/OpenAiVectorization.java new file mode 100644 index 0000000..2ac0143 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorizer/OpenAiVectorization.java @@ -0,0 +1,60 @@ +package org.ruoyi.knowledge.chain.vectorizer; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.ruoyi.common.chat.config.ChatConfig; +import org.ruoyi.common.chat.entity.embeddings.Embedding; + +import org.ruoyi.common.chat.entity.embeddings.EmbeddingResponse; +import org.ruoyi.common.chat.openai.OpenAiStreamClient; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +@Component +@Slf4j +@RequiredArgsConstructor +public class OpenAiVectorization implements Vectorization { + + @Value("${chain.vector.model}") + private String embeddingModel; + + @Getter + private OpenAiStreamClient openAiStreamClient; + + private final ChatConfig chatConfig; + + @Override + public List<List<Double>> batchVectorization(List<String> chunkList) { + openAiStreamClient = chatConfig.getOpenAiStreamClient(); + + Embedding embedding = Embedding.builder() + .input(chunkList) + .model(embeddingModel) + .build(); + EmbeddingResponse embeddings = openAiStreamClient.embeddings(embedding); + List<List<Double>> vectorList = new ArrayList<>(); + embeddings.getData().forEach(data -> { + List<BigDecimal> vector = data.getEmbedding(); + List<Double> doubleVector = new ArrayList<>(); + for (BigDecimal bd : vector) { + doubleVector.add(bd.doubleValue()); + } + vectorList.add(doubleVector); + }); + return vectorList; + } + + @Override + public List<Double> singleVectorization(String chunk) { + List<String> chunkList = new ArrayList<>(); + chunkList.add(chunk); + List<List<Double>> vectorList = batchVectorization(chunkList); + return vectorList.get(0); + } + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorizer/Vectorization.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorizer/Vectorization.java new file mode 100644 index 0000000..c770a16 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorizer/Vectorization.java @@ -0,0 +1,11 @@ +package org.ruoyi.knowledge.chain.vectorizer; + +import java.util.List; + +/** + * 鍚戦噺鍖� + */ +public interface Vectorization { + List<List<Double>> batchVectorization(List<String> chunkList); + List<Double> singleVectorization(String chunk); +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorizer/VectorizationFactory.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorizer/VectorizationFactory.java new file mode 100644 index 0000000..05993ac --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorizer/VectorizationFactory.java @@ -0,0 +1,23 @@ +package org.ruoyi.knowledge.chain.vectorizer; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +/** + * 鏂囨湰鍚戦噺鍖� + * @author huangkh + */ +@Component +@Slf4j +public class VectorizationFactory { + + private final OpenAiVectorization openAiVectorization; + + public VectorizationFactory(OpenAiVectorization openAiVectorization) { + this.openAiVectorization = openAiVectorization; + } + + public Vectorization getEmbedding(){ + return openAiVectorization; + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorizer/VectorizationWrapper.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorizer/VectorizationWrapper.java new file mode 100644 index 0000000..1522148 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorizer/VectorizationWrapper.java @@ -0,0 +1,28 @@ +package org.ruoyi.knowledge.chain.vectorizer; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.context.annotation.Primary; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +@Slf4j +@Primary +@AllArgsConstructor +public class VectorizationWrapper implements Vectorization{ + + private final VectorizationFactory vectorizationFactory; + @Override + public List<List<Double>> batchVectorization(List<String> chunkList) { + Vectorization embedding = vectorizationFactory.getEmbedding(); + return embedding.batchVectorization(chunkList); + } + + @Override + public List<Double> singleVectorization(String chunk) { + Vectorization embedding = vectorizationFactory.getEmbedding(); + return embedding.singleVectorization(chunk); + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/MilvusVectorStore.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/MilvusVectorStore.java new file mode 100644 index 0000000..74bef6f --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/MilvusVectorStore.java @@ -0,0 +1,244 @@ +package org.ruoyi.knowledge.chain.vectorstore; + +import io.milvus.client.MilvusServiceClient; +import io.milvus.grpc.DataType; +import io.milvus.grpc.SearchResults; +import io.milvus.param.ConnectParam; +import io.milvus.param.IndexType; +import io.milvus.param.MetricType; +import io.milvus.param.R; +import io.milvus.param.collection.CreateCollectionParam; +import io.milvus.param.collection.DropCollectionParam; +import io.milvus.param.collection.FieldType; +import io.milvus.param.collection.LoadCollectionParam; +import io.milvus.param.dml.DeleteParam; +import io.milvus.param.dml.InsertParam; +import io.milvus.param.dml.SearchParam; +import io.milvus.param.index.CreateIndexParam; +import io.milvus.param.partition.CreatePartitionParam; +import io.milvus.response.QueryResultsWrapper; +import io.milvus.response.SearchResultsWrapper; +import jakarta.annotation.PostConstruct; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +@Service +@Slf4j +public class MilvusVectorStore implements VectorStore{ + + + @Value("${chain.vector.store.milvus.host}") + private String milvusHost; + @Value("${chain.vector.store.milvus.port}") + private Integer milvausPort; + + @Value("${chain.vector.store.milvus.dimension}") + private Integer dimension; + + @Value("${chain.vector.store.milvus.collection}") + private String collectionName; + + private MilvusServiceClient milvusServiceClient; + + @PostConstruct + public void init(){ + milvusServiceClient = new MilvusServiceClient( + ConnectParam.newBuilder() + .withHost(milvusHost) + .withPort(milvausPort) + .withDatabaseName("default") + .build() + ); + } + + private void createSchema(String kid) { + FieldType primaryField = FieldType.newBuilder() + .withName("row_id") + .withDataType(DataType.Int64) + .withPrimaryKey(true) + .withAutoID(true) + .build(); + FieldType contentField = FieldType.newBuilder() + .withName("content") + .withDataType(DataType.VarChar) + .withMaxLength(1000) + .build(); + FieldType kidField = FieldType.newBuilder() + .withName("kid") + .withDataType(DataType.VarChar) + .withMaxLength(20) + .build(); + FieldType docIdField = FieldType.newBuilder() + .withName("docId") + .withDataType(DataType.VarChar) + .withMaxLength(20) + .build(); + FieldType fidField = FieldType.newBuilder() + .withName("fid") + .withDataType(DataType.VarChar) + .withMaxLength(20) + .build(); + FieldType vectorField = FieldType.newBuilder() + .withName("fv") + .withDataType(DataType.FloatVector) + .withDimension(dimension) + .build(); + CreateCollectionParam createCollectionReq = CreateCollectionParam.newBuilder() + .withCollectionName(collectionName + kid) + .withDescription("local knowledge") + .addFieldType(primaryField) + .addFieldType(contentField) + .addFieldType(kidField) + .addFieldType(docIdField) + .addFieldType(fidField) + .addFieldType(vectorField) + .build(); + milvusServiceClient.createCollection(createCollectionReq); + + // 鍒涘缓鍚戦噺鐨勭储寮� + IndexType INDEX_TYPE = IndexType.IVF_FLAT; + String INDEX_PARAM = "{\"nlist\":1024}"; + milvusServiceClient.createIndex( + CreateIndexParam.newBuilder() + .withCollectionName(collectionName + kid) + .withFieldName("fv") + .withIndexType(INDEX_TYPE) + .withMetricType(MetricType.IP) + .withExtraParam(INDEX_PARAM) + .withSyncMode(Boolean.FALSE) + .build() + ); + + } + + @Override + public void newSchema(String kid) { + createSchema(kid); + } + + @Override + public void removeByKidAndFid(String kid, String fid) { + milvusServiceClient.delete( + DeleteParam.newBuilder() + .withCollectionName(collectionName + kid) + .withExpr("fid == " + fid) + .build() + ); + } + + @Override + public void storeEmbeddings(List<String> chunkList, List<List<Double>> vectorList, String kid, String docId, List<String> fidList) { + + if (StringUtils.isNotBlank(docId)){ + milvusServiceClient.createPartition( + CreatePartitionParam.newBuilder() + .withCollectionName(collectionName + kid) + .withPartitionName(docId) + .build() + ); + } + + List<List<Float>> vectorFloatList = new ArrayList<>(); + List<String> kidList = new ArrayList<>(); + List<String> docIdList = new ArrayList<>(); + for (int i = 0; i < chunkList.size(); i++) { + List<Double> vector = vectorList.get(i); + List<Float> vfList = new ArrayList<>(); + for (int j = 0; j < vector.size(); j++) { + Double value = vector.get(j); + vfList.add(value.floatValue()); + } + vectorFloatList.add(vfList); + kidList.add(kid); + docIdList.add(docId); + } + List<InsertParam.Field> fields = new ArrayList<>(); + fields.add(new InsertParam.Field("content", chunkList)); + fields.add(new InsertParam.Field("kid", kidList)); + fields.add(new InsertParam.Field("docId", docIdList)); + fields.add(new InsertParam.Field("fid", fidList)); + fields.add(new InsertParam.Field("fv", vectorFloatList)); + + InsertParam insertParam = InsertParam.newBuilder() + .withCollectionName(collectionName + kid) + .withPartitionName(docId) + .withFields(fields) + .build(); + milvusServiceClient.insert(insertParam); + // milvus鍦ㄥ皢鏁版嵁瑁呰浇鍒板唴瀛樺悗鎵嶈兘杩涜鍚戦噺璁$畻 + milvusServiceClient.loadCollection(LoadCollectionParam.newBuilder().withCollectionName(collectionName + kid).build()); + } + + + + @Override + public void removeByDocId(String kid, String docId) { + milvusServiceClient.delete( + DeleteParam.newBuilder() + .withCollectionName(collectionName + kid) + .withExpr("1 == 1") + .withPartitionName(docId) + .build() + ); + } + + @Override + public void removeByKid(String kid) { + milvusServiceClient.dropCollection( + DropCollectionParam.newBuilder() + .withCollectionName(collectionName + kid) + .build() + ); + } + + @Override + public List<String> nearest(List<Double> queryVector, String kid) { + List<String> search_output_fields = Arrays.asList("content","fv"); + List<Float> fv = new ArrayList<>(); + for (int i = 0; i < queryVector.size(); i++) { + fv.add(queryVector.get(i).floatValue()); + } + List<List<Float>> vectors = new ArrayList<>(); + vectors.add(fv); + String search_param = "{\"nprobe\":10, \"offset\":0}"; + SearchParam searchParam = SearchParam.newBuilder() + .withCollectionName(collectionName + kid) + .withMetricType(MetricType.IP) + .withOutFields(search_output_fields) + .withTopK(10) + .withVectors(vectors) + .withVectorFieldName("fv") + .withParams(search_param) + .build(); + R<SearchResults> respSearch = milvusServiceClient.search(searchParam); + SearchResultsWrapper wrapperSearch = new SearchResultsWrapper(respSearch.getData().getResults()); + List<QueryResultsWrapper.RowRecord> rowRecords = wrapperSearch.getRowRecords(); + + List<String> resultList = new ArrayList<>(); + if (resultList!=null && resultList.size() > 0){ + for (int i = 0; i < rowRecords.size(); i++) { + String content = rowRecords.get(i).get("content").toString(); + resultList.add(content); + } + } + return resultList; + } + + /** + * milvus 涓嶆敮鎸侀�氳繃鏂囨湰妫�绱㈢浉浼兼�� + * @param query + * @param kid + * @return + */ + @Override + public List<String> nearest(String query, String kid) { + return null; + } + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/VectorStore.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/VectorStore.java new file mode 100644 index 0000000..6852cfd --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/VectorStore.java @@ -0,0 +1,18 @@ +package org.ruoyi.knowledge.chain.vectorstore; + +import java.util.List; + +/** + * 鍚戦噺瀛樺偍 + */ +public interface VectorStore { + void storeEmbeddings(List<String> chunkList,List<List<Double>> vectorList, String kid, String docId,List<String> fidList); + void removeByDocId(String kid,String docId); + void removeByKid(String kid); + List<String> nearest(List<Double> queryVector,String kid); + List<String> nearest(String query,String kid); + + void newSchema(String kid); + + void removeByKidAndFid(String kid, String fid); +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/VectorStoreFactory.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/VectorStoreFactory.java new file mode 100644 index 0000000..3478229 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/VectorStoreFactory.java @@ -0,0 +1,31 @@ +package org.ruoyi.knowledge.chain.vectorstore; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +@Component +@Slf4j +public class VectorStoreFactory { + + @Value("${chain.vector.store.type}") + private String type; + + private final WeaviateVectorStore weaviateVectorStore; + + private final MilvusVectorStore milvusVectorStore; + + public VectorStoreFactory(WeaviateVectorStore weaviateVectorStore, MilvusVectorStore milvusVectorStore) { + this.weaviateVectorStore = weaviateVectorStore; + this.milvusVectorStore = milvusVectorStore; + } + + public VectorStore getVectorStore(){ + if ("weaviate".equals(type)){ + return weaviateVectorStore; + }else if ("milvus".equals(type)){ + return milvusVectorStore; + } + return null; + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/VectorStoreWrapper.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/VectorStoreWrapper.java new file mode 100644 index 0000000..2c0a732 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/VectorStoreWrapper.java @@ -0,0 +1,58 @@ +package org.ruoyi.knowledge.chain.vectorstore; + +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.context.annotation.Primary; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +@Slf4j +@Primary +@AllArgsConstructor +public class VectorStoreWrapper implements VectorStore{ + + private final VectorStoreFactory vectorStoreFactory; + @Override + public void storeEmbeddings(List<String> chunkList, List<List<Double>> vectorList, String kid, String docId, List<String> fidList) { + VectorStore vectorStore = vectorStoreFactory.getVectorStore(); + vectorStore.storeEmbeddings(chunkList, vectorList, kid, docId, fidList); + } + + @Override + public void removeByDocId(String kid, String docId) { + VectorStore vectorStore = vectorStoreFactory.getVectorStore(); + vectorStore.removeByDocId(kid,docId); + } + + @Override + public void removeByKid(String kid) { + VectorStore vectorStore = vectorStoreFactory.getVectorStore(); + vectorStore.removeByKid(kid); + } + + @Override + public List<String> nearest(List<Double> queryVector, String kid) { + VectorStore vectorStore = vectorStoreFactory.getVectorStore(); + return vectorStore.nearest(queryVector,kid); + } + + @Override + public List<String> nearest(String query, String kid) { + VectorStore vectorStore = vectorStoreFactory.getVectorStore(); + return vectorStore.nearest(query, kid); + } + + @Override + public void newSchema(String kid) { + VectorStore vectorStore = vectorStoreFactory.getVectorStore(); + vectorStore.newSchema(kid); + } + + @Override + public void removeByKidAndFid(String kid, String fid) { + VectorStore vectorStore = vectorStoreFactory.getVectorStore(); + vectorStore.removeByKidAndFid(kid, fid); + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/WeaviateVectorStore.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/WeaviateVectorStore.java new file mode 100644 index 0000000..335e4ed --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/chain/vectorstore/WeaviateVectorStore.java @@ -0,0 +1,372 @@ +package org.ruoyi.knowledge.chain.vectorstore; + +import cn.hutool.core.lang.UUID; +import com.alibaba.fastjson2.JSONObject; +import com.google.gson.internal.LinkedTreeMap; +import io.weaviate.client.Config; +import io.weaviate.client.WeaviateClient; +import io.weaviate.client.base.Result; +import io.weaviate.client.v1.data.model.WeaviateObject; +import io.weaviate.client.v1.data.replication.model.ConsistencyLevel; +import io.weaviate.client.v1.filters.Operator; +import io.weaviate.client.v1.filters.WhereFilter; +import io.weaviate.client.v1.graphql.model.GraphQLResponse; +import io.weaviate.client.v1.graphql.query.argument.NearTextArgument; +import io.weaviate.client.v1.graphql.query.argument.NearVectorArgument; +import io.weaviate.client.v1.graphql.query.fields.Field; +import io.weaviate.client.v1.misc.model.Meta; +import io.weaviate.client.v1.misc.model.ReplicationConfig; +import io.weaviate.client.v1.misc.model.ShardingConfig; +import io.weaviate.client.v1.misc.model.VectorIndexConfig; +import io.weaviate.client.v1.schema.model.DataType; +import io.weaviate.client.v1.schema.model.Property; +import io.weaviate.client.v1.schema.model.Schema; +import io.weaviate.client.v1.schema.model.WeaviateClass; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.ruoyi.knowledge.chain.retrieve.PromptRetrieverProperties; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service +@Slf4j +public class WeaviateVectorStore implements VectorStore{ + + @Value("${chain.vector.store.weaviate.protocol}") + private String protocol; + @Value("${chain.vector.store.weaviate.host}") + private String host; + + @Value("${chain.vector.store.weaviate.classname}") + private String className; + + private final PromptRetrieverProperties promptRetrieverProperties; + + public WeaviateVectorStore(PromptRetrieverProperties promptRetrieverProperties) { + this.promptRetrieverProperties = promptRetrieverProperties; + } + + public WeaviateClient getClient(){ + Config config = new Config(protocol, host); + WeaviateClient client = new WeaviateClient(config); + return client; + } + + public Result<Meta> getMeta(){ + WeaviateClient client = getClient(); + Result<Meta> meta = client.misc().metaGetter().run(); + if (meta.getError() == null) { + System.out.printf("meta.hostname: %s\n", meta.getResult().getHostname()); + System.out.printf("meta.version: %s\n", meta.getResult().getVersion()); + System.out.printf("meta.modules: %s\n", meta.getResult().getModules()); + } else { + System.out.printf("Error: %s\n", meta.getError().getMessages()); + } + return meta; + } + + public Result<Schema> getSchemas(){ + WeaviateClient client = getClient(); + Result<Schema> result = client.schema().getter().run(); + if (result.hasErrors()) { + System.out.println(result.getError()); + }else { + System.out.println(result.getResult()); + } + return result; + } + + + public Result<Boolean> createSchema(String kid){ + WeaviateClient client = getClient(); + + VectorIndexConfig vectorIndexConfig = VectorIndexConfig.builder() + .distance("cosine") + .cleanupIntervalSeconds(300) + .efConstruction(128) + .maxConnections(64) + .vectorCacheMaxObjects(500000L) + .ef(-1) + .skip(false) + .dynamicEfFactor(8) + .dynamicEfMax(500) + .dynamicEfMin(100) + .flatSearchCutoff(40000) + .build(); + + ShardingConfig shardingConfig = ShardingConfig.builder() + .desiredCount(3) + .desiredVirtualCount(128) + .function("murmur3") + .key("_id") + .strategy("hash") + .virtualPerPhysical(128) + .build(); + + ReplicationConfig replicationConfig = ReplicationConfig.builder() + .factor(1) + .build(); + + JSONObject classModuleConfigValue = new JSONObject(); + classModuleConfigValue.put("vectorizeClassName",false); + JSONObject classModuleConfig = new JSONObject(); + classModuleConfig.put("text2vec-transformers",classModuleConfigValue); + + JSONObject propertyModuleConfigValueSkipTrue = new JSONObject(); + propertyModuleConfigValueSkipTrue.put("vectorizePropertyName",false); + propertyModuleConfigValueSkipTrue.put("skip",true); + JSONObject propertyModuleConfigSkipTrue = new JSONObject(); + propertyModuleConfigSkipTrue.put("text2vec-transformers",propertyModuleConfigValueSkipTrue); + + JSONObject propertyModuleConfigValueSkipFalse = new JSONObject(); + propertyModuleConfigValueSkipFalse.put("vectorizePropertyName",false); + propertyModuleConfigValueSkipFalse.put("skip",false); + JSONObject propertyModuleConfigSkipFalse = new JSONObject(); + propertyModuleConfigSkipFalse.put("text2vec-transformers",propertyModuleConfigValueSkipFalse); + + WeaviateClass clazz = WeaviateClass.builder() + .className(className + kid) + .description("local knowledge") + .vectorIndexType("hnsw") + .vectorizer("text2vec-transformers") + .shardingConfig(shardingConfig) + .vectorIndexConfig(vectorIndexConfig) + .replicationConfig(replicationConfig) + .moduleConfig(classModuleConfig) + .properties(new ArrayList() {{ + add(Property.builder() + .dataType(new ArrayList(){ { add(DataType.TEXT); } }) + .name("content") + .description("The content of the local knowledge,for search") + .moduleConfig(propertyModuleConfigSkipFalse) + .build()); + add(Property.builder() + .dataType(new ArrayList(){ { add(DataType.TEXT); } }) + .name("kid") + .description("The knowledge id of the local knowledge,for search") + .moduleConfig(propertyModuleConfigSkipTrue) + .build()); + add(Property.builder() + .dataType(new ArrayList(){ { add(DataType.TEXT); } }) + .name("docId") + .description("The doc id of the local knowledge,for search") + .moduleConfig(propertyModuleConfigSkipTrue) + .build()); + add(Property.builder() + .dataType(new ArrayList(){ { add(DataType.TEXT); } }) + .name("fid") + .description("The fragment id of the local knowledge,for search") + .moduleConfig(propertyModuleConfigSkipTrue) + .build()); + add(Property.builder() + .dataType(new ArrayList(){ { add(DataType.TEXT); } }) + .name("uuid") + .description("The uuid id of the local knowledge fragment(same with id properties),for search") + .moduleConfig(propertyModuleConfigSkipTrue) + .build()); + } }) + .build(); + + Result<Boolean> result = client.schema().classCreator().withClass(clazz).run(); + if (result.hasErrors()) { + System.out.println(result.getError()); + } + System.out.println(result.getResult()); + return result; + } + + @Override + public void newSchema(String kid) { + createSchema(kid); + } + + @Override + public void removeByKidAndFid(String kid, String fid) { + List<String> resultList = new ArrayList<>(); + WeaviateClient client = getClient(); + Field fieldId = Field.builder().name("uuid").build(); + WhereFilter where = WhereFilter.builder() + .path(new String[]{ "fid" }) + .operator(Operator.Equal) + .valueString(fid) + .build(); + Result<GraphQLResponse> result = client.graphQL().get() + .withClassName(className + kid) + .withFields(fieldId) + .withWhere(where) + .run(); + LinkedTreeMap<String,Object> t = (LinkedTreeMap<String, Object>) result.getResult().getData(); + LinkedTreeMap<String,ArrayList<LinkedTreeMap>> l = (LinkedTreeMap<String, ArrayList<LinkedTreeMap>>) t.get("Get"); + ArrayList<LinkedTreeMap> m = l.get(className + kid); + for (LinkedTreeMap linkedTreeMap : m){ + String uuid = linkedTreeMap.get("uuid").toString(); + resultList.add(uuid); + } + for (String uuid : resultList) { + Result<Boolean> deleteResult = client.data().deleter() + .withID(uuid) + .withClassName(className + kid) + .withConsistencyLevel(ConsistencyLevel.ALL) // default QUORUM + .run(); + } + } + + @Override + public void storeEmbeddings(List<String> chunkList, List<List<Double>> vectorList,String kid, String docId,List<String> fidList) { + WeaviateClient client = getClient(); + for (int i = 0; i < chunkList.size(); i++) { + if (vectorList != null) { + List<Double> vector = vectorList.get(i); + Float[] vf = new Float[vector.size()]; + for (int j = 0; j < vector.size(); j++) { + Double value = vector.get(j); + vf[j] = value.floatValue(); + } + Map<String, Object> dataSchema = new HashMap<>(); + dataSchema.put("content", chunkList.get(i)); + dataSchema.put("kid", kid); + dataSchema.put("docId", docId); + dataSchema.put("fid", fidList.get(i)); + String uuid = UUID.randomUUID(true).toString(); + dataSchema.put("uuid", uuid); + Result<WeaviateObject> result = client.data().creator() + .withClassName(className + kid) + .withID(uuid) + .withVector(vf) + .withProperties(dataSchema) + .run(); + } + } + } + + @Override + public void removeByDocId(String kid,String docId) { + List<String> resultList = new ArrayList<>(); + WeaviateClient client = getClient(); + Field fieldId = Field.builder().name("uuid").build(); + WhereFilter where = WhereFilter.builder() + .path(new String[]{ "docId" }) + .operator(Operator.Equal) + .valueString(docId) + .build(); + Result<GraphQLResponse> result = client.graphQL().get() + .withClassName(className + kid) + .withFields(fieldId) + .withWhere(where) + .run(); + LinkedTreeMap<String,Object> t = (LinkedTreeMap<String, Object>) result.getResult().getData(); + LinkedTreeMap<String,ArrayList<LinkedTreeMap>> l = (LinkedTreeMap<String, ArrayList<LinkedTreeMap>>) t.get("Get"); + ArrayList<LinkedTreeMap> m = l.get(className + kid); + for (LinkedTreeMap linkedTreeMap : m){ + String uuid = linkedTreeMap.get("uuid").toString(); + resultList.add(uuid); + } + for (String uuid : resultList) { + Result<Boolean> deleteResult = client.data().deleter() + .withID(uuid) + .withClassName(className + kid) + .withConsistencyLevel(ConsistencyLevel.ALL) // default QUORUM + .run(); + } + } + + @Override + public void removeByKid(String kid) { + WeaviateClient client = getClient(); + Result<Boolean> result = client.schema().classDeleter().withClassName(className + kid).run(); + if (result.hasErrors()) { + System.out.println("鍒犻櫎schema澶辫触" + result.getError()); + }else { + System.out.println("鍒犻櫎schema鎴愬姛" + result.getResult()); + } + log.info("drop schema by kid, result = {}",result); + } + + @Override + public List<String> nearest(List<Double> queryVector,String kid) { + if (StringUtils.isBlank(kid)){ + return new ArrayList<String>(); + } + List<String> resultList = new ArrayList<>(); + Float[] vf = new Float[queryVector.size()]; + for (int j = 0; j < queryVector.size(); j++) { + Double value = queryVector.get(j); + vf[j] = value.floatValue(); + } + WeaviateClient client = getClient(); + Field contentField = Field.builder().name("content").build(); + Field _additional = Field.builder() + .name("_additional") + .fields(new Field[]{ + Field.builder().name("distance").build() + }).build(); + NearVectorArgument nearVector = NearVectorArgument.builder() + .vector(vf) + .distance(1.6f) // certainty = 1f - distance /2f + .build(); + Result<GraphQLResponse> result = client.graphQL().get() + .withClassName(className + kid) + .withFields(contentField,_additional) + .withNearVector(nearVector) + .withLimit(promptRetrieverProperties.getLimits()) + .run(); + LinkedTreeMap<String,Object> t = (LinkedTreeMap<String, Object>) result.getResult().getData(); + LinkedTreeMap<String,ArrayList<LinkedTreeMap>> l = (LinkedTreeMap<String, ArrayList<LinkedTreeMap>>) t.get("Get"); + ArrayList<LinkedTreeMap> m = l.get(className + kid); + for (LinkedTreeMap linkedTreeMap : m){ + String content = linkedTreeMap.get("content").toString(); + resultList.add(content); + } + return resultList; + } + + @Override + public List<String> nearest(String query,String kid) { + if (StringUtils.isBlank(kid)){ + return new ArrayList<String>(); + } + List<String> resultList = new ArrayList<>(); + WeaviateClient client = getClient(); + Field contentField = Field.builder().name("content").build(); + Field _additional = Field.builder() + .name("_additional") + .fields(new Field[]{ + Field.builder().name("distance").build() + }).build(); + NearTextArgument nearText = client.graphQL().arguments().nearTextArgBuilder() + .concepts(new String[]{ query }) + .distance(1.6f) // certainty = 1f - distance /2f + .build(); + + Result<GraphQLResponse> result = client.graphQL().get() + .withClassName(className + kid) + .withFields(contentField,_additional) + .withNearText(nearText) + .withLimit(promptRetrieverProperties.getLimits()) + .run(); + LinkedTreeMap<String,Object> t = (LinkedTreeMap<String, Object>) result.getResult().getData(); + LinkedTreeMap<String,ArrayList<LinkedTreeMap>> l = (LinkedTreeMap<String, ArrayList<LinkedTreeMap>>) t.get("Get"); + ArrayList<LinkedTreeMap> m = l.get(className + kid); + for (LinkedTreeMap linkedTreeMap : m){ + String content = linkedTreeMap.get("content").toString(); + resultList.add(content); + } + return resultList; + } + + public Result<Boolean> deleteSchema(String kid) { + WeaviateClient client = getClient(); + Result<Boolean> result = client.schema().classDeleter().withClassName(className+ kid).run(); + if (result.hasErrors()) { + System.out.println(result.getError()); + }else { + System.out.println(result.getResult()); + } + return result; + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/constant/FileType.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/constant/FileType.java new file mode 100644 index 0000000..6a9451a --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/constant/FileType.java @@ -0,0 +1,91 @@ +package org.ruoyi.knowledge.constant; + +public class FileType { + public static final String TXT = "txt"; + public static final String CSV = "csv"; + public static final String MD = "md"; + public static final String DOC = "doc"; + public static final String DOCX = "docx"; + public static final String PDF = "pdf"; + + public static final String LOG = "log"; + public static final String XML = "xml"; + + public static final String JAVA = "java"; + public static final String HTML = "html"; + public static final String HTM = "htm"; + public static final String CSS = "css"; + public static final String JS = "js"; + public static final String PY = "py"; + public static final String CPP = "cpp"; + public static final String SQL = "sql"; + public static final String PHP = "php"; + public static final String RUBY = "ruby"; + public static final String C = "c"; + public static final String H = "h"; + public static final String HPP = "hpp"; + public static final String SWIFT = "swift"; + public static final String TS = "ts"; + public static final String RUST = "rs"; + public static final String PERL = "perl"; + public static final String SHELL = "shell"; + public static final String BAT = "bat"; + public static final String CMD = "cmd"; + + public static final String PROPERTIES = "properties"; + public static final String INI = "ini"; + public static final String YAML = "yaml"; + public static final String YML = "yml"; + + public static boolean isTextFile(String type){ + if (type.equalsIgnoreCase(TXT) || type.equalsIgnoreCase(CSV) || type.equalsIgnoreCase(PROPERTIES) + || type.equalsIgnoreCase(INI) || type.equalsIgnoreCase(YAML) || type.equalsIgnoreCase(YML) + || type.equalsIgnoreCase(LOG) || type.equalsIgnoreCase(XML)){ + return true; + } + else { + return false; + } + } + + public static boolean isCodeFile(String type){ + if (type.equalsIgnoreCase(JAVA) || type.equalsIgnoreCase(HTML) || type.equalsIgnoreCase(HTM) || type.equalsIgnoreCase(JS) || type.equalsIgnoreCase(PY) + || type.equalsIgnoreCase(CPP) || type.equalsIgnoreCase(SQL) || type.equalsIgnoreCase(PHP) || type.equalsIgnoreCase(RUBY) + || type.equalsIgnoreCase(C) || type.equalsIgnoreCase(H) || type.equalsIgnoreCase(HPP) || type.equalsIgnoreCase(SWIFT) + || type.equalsIgnoreCase(TS) || type.equalsIgnoreCase(RUST) || type.equalsIgnoreCase(PERL) || type.equalsIgnoreCase(SHELL) + || type.equalsIgnoreCase(BAT) || type.equalsIgnoreCase(CMD) || type.equalsIgnoreCase(CSS)){ + return true; + } + else { + return false; + } + } + + public static boolean isMdFile(String type){ + if (type.equalsIgnoreCase(MD)){ + return true; + } + else { + return false; + } + } + + public static boolean isWord(String type){ + if (type.equalsIgnoreCase(DOC) || type.equalsIgnoreCase(DOCX)){ + return true; + } + else { + return false; + } + } + + public static boolean isPdf(String type){ + if (type.equalsIgnoreCase(PDF)){ + return true; + } + else { + return false; + } + } + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/KnowledgeAttach.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/KnowledgeAttach.java new file mode 100644 index 0000000..059a5cb --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/KnowledgeAttach.java @@ -0,0 +1,60 @@ +package org.ruoyi.knowledge.domain; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 鐭ヨ瘑搴撻檮浠跺璞� knowledge_attach + * + * @author Lion Li + * @date 2024-10-21 + */ +@Data + +@TableName("knowledge_attach") +public class KnowledgeAttach implements Serializable { + + + @TableId(value = "id") + private Long id; + + /** + * 鐭ヨ瘑搴揑D + */ + private String kid; + + /** + * 鏂囨。ID + */ + private String docId; + + /** + * 鏂囨。鍚嶇О + */ + private String docName; + + /** + * 鏂囨。绫诲瀷 + */ + private String docType; + + /** + * 鏂囨。鍐呭 + */ + private String content; + + /** + * 鍒涘缓鑰� + */ + private String createBy; + + /** + * 鍒涘缓鏃堕棿 + */ + private Date createTime; + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/KnowledgeFragment.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/KnowledgeFragment.java new file mode 100644 index 0000000..1ef3208 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/KnowledgeFragment.java @@ -0,0 +1,62 @@ +package org.ruoyi.knowledge.domain; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + +/** + * 鐭ヨ瘑鐗囨瀵硅薄 knowledge_fragment + * + * @author Lion Li + * @date 2024-10-21 + */ +@Data +@TableName("knowledge_fragment") +public class KnowledgeFragment implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + @TableId(value = "id") + private Long id; + + /** + * 鐭ヨ瘑搴揑D + */ + private String kid; + + /** + * 鏂囨。ID + */ + private String docId; + + /** + * 鐭ヨ瘑鐗囨ID + */ + private String fid; + + /** + * 鐗囨绱㈠紩涓嬫爣 + */ + private Integer idx; + + /** + * 鏂囨。鍐呭 + */ + private String content; + + /** + * 鍒涘缓鑰� + */ + private String createBy; + + /** + * 鍒涘缓鏃堕棿 + */ + private Date createTime; + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/KnowledgeInfo.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/KnowledgeInfo.java new file mode 100644 index 0000000..0d9b51e --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/KnowledgeInfo.java @@ -0,0 +1,63 @@ +package org.ruoyi.knowledge.domain; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; +import java.util.Date; + + +/** + * 鐭ヨ瘑搴撳璞� knowledge_info + * + * @author Lion Li + * @date 2024-10-21 + */ +@Data +@TableName("knowledge_info") +public class KnowledgeInfo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @TableId(value = "id") + private Long id; + + /** + * 鐭ヨ瘑搴揑D + */ + private String kid; + + /** + * 鐢ㄦ埛ID + */ + private Long uid; + + /** + * 鐭ヨ瘑搴撳悕绉� + */ + private String kname; + + /** + * 鎻忚堪 + */ + private String description; + + + /** + * 鍒涘缓鑰� + */ + private String createBy; + + /** + * 鍒涘缓鏃堕棿 + */ + private Date createTime; + + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/bo/KnowledgeAttachBo.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/bo/KnowledgeAttachBo.java new file mode 100644 index 0000000..497e717 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/bo/KnowledgeAttachBo.java @@ -0,0 +1,56 @@ +package org.ruoyi.knowledge.domain.bo; + +import io.github.linpeilie.annotations.AutoMapper; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.ruoyi.common.mybatis.core.domain.BaseEntity; +import org.ruoyi.knowledge.domain.KnowledgeAttach; + +/** + * 鐭ヨ瘑搴撻檮浠朵笟鍔″璞� knowledge_attach + * + * @author Lion Li + * @date 2024-10-21 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = KnowledgeAttach.class, reverseConvertGenerate = false) +public class KnowledgeAttachBo extends BaseEntity { + + @NotNull(message = "涓嶈兘涓虹┖") + private Long id; + + /** + * 鐭ヨ瘑搴揑D + */ + @NotBlank(message = "鐭ヨ瘑搴揑D涓嶈兘涓虹┖") + private String kid; + + /** + * 鏂囨。ID + */ + @NotBlank(message = "鏂囨。ID涓嶈兘涓虹┖") + private String docId; + + /** + * 鏂囨。鍚嶇О + */ + @NotBlank(message = "鏂囨。鍚嶇О涓嶈兘涓虹┖") + private String docName; + + /** + * 鏂囨。绫诲瀷 + */ + @NotBlank(message = "鏂囨。绫诲瀷涓嶈兘涓虹┖") + private String docType; + + /** + * 鏂囨。鍐呭 + */ + @NotBlank(message = "鏂囨。鍐呭涓嶈兘涓虹┖") + private String content; + + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/bo/KnowledgeFragmentBo.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/bo/KnowledgeFragmentBo.java new file mode 100644 index 0000000..be6bca1 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/bo/KnowledgeFragmentBo.java @@ -0,0 +1,59 @@ +package org.ruoyi.knowledge.domain.bo; + +import io.github.linpeilie.annotations.AutoMapper; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.ruoyi.common.mybatis.core.domain.BaseEntity; +import org.ruoyi.knowledge.domain.KnowledgeFragment; + +/** + * 鐭ヨ瘑鐗囨涓氬姟瀵硅薄 knowledge_fragment + * + * @author Lion Li + * @date 2024-10-21 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = KnowledgeFragment.class, reverseConvertGenerate = false) +public class KnowledgeFragmentBo extends BaseEntity { + + /** + * + */ + @NotNull(message = "涓嶈兘涓虹┖") + private Long id; + + /** + * 鐭ヨ瘑搴揑D + */ + @NotBlank(message = "鐭ヨ瘑搴揑D涓嶈兘涓虹┖") + private String kid; + + /** + * 鏂囨。ID + */ + @NotBlank(message = "鏂囨。ID涓嶈兘涓虹┖") + private String docId; + + /** + * 鐭ヨ瘑鐗囨ID + */ + @NotBlank(message = "鐭ヨ瘑鐗囨ID涓嶈兘涓虹┖") + private String fid; + + /** + * 鐗囨绱㈠紩涓嬫爣 + */ + @NotNull(message = "鐗囨绱㈠紩涓嬫爣涓嶈兘涓虹┖") + private Long idx; + + /** + * 鏂囨。鍐呭 + */ + @NotBlank(message = "鏂囨。鍐呭涓嶈兘涓虹┖") + private String content; + + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/bo/KnowledgeInfoBo.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/bo/KnowledgeInfoBo.java new file mode 100644 index 0000000..bea7b25 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/bo/KnowledgeInfoBo.java @@ -0,0 +1,53 @@ +package org.ruoyi.knowledge.domain.bo; + +import io.github.linpeilie.annotations.AutoMapper; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.ruoyi.common.mybatis.core.domain.BaseEntity; +import org.ruoyi.knowledge.domain.KnowledgeInfo; + +/** + * 鐭ヨ瘑搴撲笟鍔″璞� knowledge_info + * + * @author Lion Li + * @date 2024-10-21 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = KnowledgeInfo.class, reverseConvertGenerate = false) +public class KnowledgeInfoBo extends BaseEntity { + + /** + * + */ + @NotNull(message = "涓嶈兘涓虹┖") + private Long id; + + /** + * 鐭ヨ瘑搴揑D + */ + @NotBlank(message = "鐭ヨ瘑搴揑D涓嶈兘涓虹┖") + private String kid; + + /** + * 鐢ㄦ埛ID + */ + @NotNull(message = "鐢ㄦ埛ID涓嶈兘涓虹┖") + private Long uid; + + /** + * 鐭ヨ瘑搴撳悕绉� + */ + @NotBlank(message = "鐭ヨ瘑搴撳悕绉颁笉鑳戒负绌�") + private String kname; + + /** + * 鎻忚堪 + */ + @NotBlank(message = "鎻忚堪涓嶈兘涓虹┖") + private String description; + + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/req/KnowledgeInfoUploadRequest.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/req/KnowledgeInfoUploadRequest.java new file mode 100644 index 0000000..866119d --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/req/KnowledgeInfoUploadRequest.java @@ -0,0 +1,13 @@ +package org.ruoyi.knowledge.domain.req; + +import lombok.Data; +import org.springframework.web.multipart.MultipartFile; + +@Data +public class KnowledgeInfoUploadRequest { + + private String kid; + + private MultipartFile file; + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/request.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/request.java new file mode 100644 index 0000000..9a84995 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/request.java @@ -0,0 +1,4 @@ +package org.ruoyi.knowledge.domain; + +public class request { +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/vo/KnowledgeAttachVo.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/vo/KnowledgeAttachVo.java new file mode 100644 index 0000000..bd0b141 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/vo/KnowledgeAttachVo.java @@ -0,0 +1,63 @@ +package org.ruoyi.knowledge.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.ruoyi.knowledge.domain.KnowledgeAttach; + +import java.io.Serial; +import java.io.Serializable; + +/** + * 鐭ヨ瘑搴撻檮浠惰鍥惧璞� knowledge_attach + * + * @author Lion Li + * @date 2024-10-21 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = KnowledgeAttach.class) +public class KnowledgeAttachVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + private Long id; + + /** + * 鐭ヨ瘑搴揑D + */ + @ExcelProperty(value = "鐭ヨ瘑搴揑D") + private String kid; + + /** + * 鏂囨。ID + */ + @ExcelProperty(value = "鏂囨。ID") + private String docId; + + /** + * 鏂囨。鍚嶇О + */ + @ExcelProperty(value = "鏂囨。鍚嶇О") + private String docName; + + /** + * 鏂囨。绫诲瀷 + */ + @ExcelProperty(value = "鏂囨。绫诲瀷") + private String docType; + + /** + * 鏂囨。鍐呭 + */ + @ExcelProperty(value = "鏂囨。鍐呭") + private String content; + + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/vo/KnowledgeFragmentVo.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/vo/KnowledgeFragmentVo.java new file mode 100644 index 0000000..630bbe0 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/vo/KnowledgeFragmentVo.java @@ -0,0 +1,62 @@ +package org.ruoyi.knowledge.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.ruoyi.knowledge.domain.KnowledgeFragment; + +import java.io.Serial; +import java.io.Serializable; + +/** + * 鐭ヨ瘑鐗囨瑙嗗浘瀵硅薄 knowledge_fragment + * + * @author Lion Li + * @date 2024-10-21 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = KnowledgeFragment.class) +public class KnowledgeFragmentVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + private Long id; + + /** + * 鐭ヨ瘑搴揑D + */ + @ExcelProperty(value = "鐭ヨ瘑搴揑D") + private String kid; + + /** + * 鏂囨。ID + */ + @ExcelProperty(value = "鏂囨。ID") + private String docId; + + /** + * 鐭ヨ瘑鐗囨ID + */ + @ExcelProperty(value = "鐭ヨ瘑鐗囨ID") + private String fid; + + /** + * 鐗囨绱㈠紩涓嬫爣 + */ + @ExcelProperty(value = "鐗囨绱㈠紩涓嬫爣") + private Long idx; + + /** + * 鏂囨。鍐呭 + */ + @ExcelProperty(value = "鏂囨。鍐呭") + private String content; + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/vo/KnowledgeInfoVo.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/vo/KnowledgeInfoVo.java new file mode 100644 index 0000000..c541a82 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/domain/vo/KnowledgeInfoVo.java @@ -0,0 +1,57 @@ +package org.ruoyi.knowledge.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.ruoyi.knowledge.domain.KnowledgeInfo; + +import java.io.Serial; +import java.io.Serializable; + +/** + * 鐭ヨ瘑搴撹鍥惧璞� knowledge_info + * + * @author Lion Li + * @date 2024-10-21 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = KnowledgeInfo.class) +public class KnowledgeInfoVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * + */ + @ExcelProperty(value = "") + private Long id; + + /** + * 鐭ヨ瘑搴揑D + */ + @ExcelProperty(value = "鐭ヨ瘑搴揑D") + private String kid; + + /** + * 鐢ㄦ埛ID + */ + @ExcelProperty(value = "鐢ㄦ埛ID") + private Long uid; + + /** + * 鐭ヨ瘑搴撳悕绉� + */ + @ExcelProperty(value = "鐭ヨ瘑搴撳悕绉�") + private String kname; + + /** + * 鎻忚堪 + */ + @ExcelProperty(value = "鎻忚堪") + private String description; + + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/mapper/KnowledgeAttachMapper.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/mapper/KnowledgeAttachMapper.java new file mode 100644 index 0000000..ec7d264 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/mapper/KnowledgeAttachMapper.java @@ -0,0 +1,15 @@ +package org.ruoyi.knowledge.mapper; + +import org.ruoyi.common.mybatis.core.mapper.BaseMapperPlus; +import org.ruoyi.knowledge.domain.KnowledgeAttach; +import org.ruoyi.knowledge.domain.vo.KnowledgeAttachVo; + +/** + * 鐭ヨ瘑搴撻檮浠禡apper鎺ュ彛 + * + * @author Lion Li + * @date 2024-10-21 + */ +public interface KnowledgeAttachMapper extends BaseMapperPlus<KnowledgeAttach, KnowledgeAttachVo> { + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/mapper/KnowledgeFragmentMapper.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/mapper/KnowledgeFragmentMapper.java new file mode 100644 index 0000000..92d9ccb --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/mapper/KnowledgeFragmentMapper.java @@ -0,0 +1,15 @@ +package org.ruoyi.knowledge.mapper; + +import org.ruoyi.common.mybatis.core.mapper.BaseMapperPlus; +import org.ruoyi.knowledge.domain.KnowledgeFragment; +import org.ruoyi.knowledge.domain.vo.KnowledgeFragmentVo; + +/** + * 鐭ヨ瘑鐗囨Mapper鎺ュ彛 + * + * @author Lion Li + * @date 2024-10-21 + */ +public interface KnowledgeFragmentMapper extends BaseMapperPlus<KnowledgeFragment, KnowledgeFragmentVo> { + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/mapper/KnowledgeInfoMapper.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/mapper/KnowledgeInfoMapper.java new file mode 100644 index 0000000..1984e0a --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/mapper/KnowledgeInfoMapper.java @@ -0,0 +1,15 @@ +package org.ruoyi.knowledge.mapper; + +import org.ruoyi.common.mybatis.core.mapper.BaseMapperPlus; +import org.ruoyi.knowledge.domain.KnowledgeInfo; +import org.ruoyi.knowledge.domain.vo.KnowledgeInfoVo; + +/** + * 鐭ヨ瘑搴揗apper鎺ュ彛 + * + * @author Lion Li + * @date 2024-10-21 + */ +public interface KnowledgeInfoMapper extends BaseMapperPlus<KnowledgeInfo, KnowledgeInfoVo> { + +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/EmbeddingService.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/EmbeddingService.java new file mode 100644 index 0000000..739c7e6 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/EmbeddingService.java @@ -0,0 +1,20 @@ +package org.ruoyi.knowledge.service; + +import java.util.List; + +public interface EmbeddingService { + + void storeEmbeddings(List<String> chunkList, String kid, String docId,List<String> fidList); + + void removeByDocId(String kid,String docId); + + void removeByKid(String kid); + + List<Double> getQueryVector(String query); + + void createSchema(String kid); + + void removeByKidAndFid(String kid, String fid); + + void saveFragment(String kid, String docId, String fid, String content); +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/IKnowledgeAttachService.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/IKnowledgeAttachService.java new file mode 100644 index 0000000..0469888 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/IKnowledgeAttachService.java @@ -0,0 +1,56 @@ +package org.ruoyi.knowledge.service; + +import org.ruoyi.common.mybatis.core.page.PageQuery; +import org.ruoyi.common.mybatis.core.page.TableDataInfo; +import org.ruoyi.knowledge.domain.bo.KnowledgeAttachBo; +import org.ruoyi.knowledge.domain.vo.KnowledgeAttachVo; + +import java.util.Collection; +import java.util.List; + +/** + * 鐭ヨ瘑搴撻檮浠禨ervice鎺ュ彛 + * + * @author Lion Li + * @date 2024-10-21 + */ +public interface IKnowledgeAttachService { + + /** + * 鏌ヨ鐭ヨ瘑搴撻檮浠� + */ + KnowledgeAttachVo queryById(Long id); + + /** + * 鏌ヨ鐭ヨ瘑搴撻檮浠跺垪琛� + */ + TableDataInfo<KnowledgeAttachVo> queryPageList(KnowledgeAttachBo bo, PageQuery pageQuery); + + /** + * 鏌ヨ鐭ヨ瘑搴撻檮浠跺垪琛� + */ + List<KnowledgeAttachVo> queryList(KnowledgeAttachBo bo); + + /** + * 鏂板鐭ヨ瘑搴撻檮浠� + */ + Boolean insertByBo(KnowledgeAttachBo bo); + + /** + * 淇敼鐭ヨ瘑搴撻檮浠� + */ + Boolean updateByBo(KnowledgeAttachBo bo); + + /** + * 鏍¢獙骞舵壒閲忓垹闄ょ煡璇嗗簱闄勪欢淇℃伅 + */ + Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); + + + /** + * 鍒犻櫎鐭ヨ瘑闄勪欢 + * + * @return + */ + void removeKnowledgeAttach(String kid); +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/IKnowledgeFragmentService.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/IKnowledgeFragmentService.java new file mode 100644 index 0000000..7546a1d --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/IKnowledgeFragmentService.java @@ -0,0 +1,48 @@ +package org.ruoyi.knowledge.service; + +import org.ruoyi.common.mybatis.core.page.PageQuery; +import org.ruoyi.common.mybatis.core.page.TableDataInfo; +import org.ruoyi.knowledge.domain.bo.KnowledgeFragmentBo; +import org.ruoyi.knowledge.domain.vo.KnowledgeFragmentVo; + +import java.util.Collection; +import java.util.List; + +/** + * 鐭ヨ瘑鐗囨Service鎺ュ彛 + * + * @author Lion Li + * @date 2024-10-21 + */ +public interface IKnowledgeFragmentService { + + /** + * 鏌ヨ鐭ヨ瘑鐗囨 + */ + KnowledgeFragmentVo queryById(Long id); + + /** + * 鏌ヨ鐭ヨ瘑鐗囨鍒楄〃 + */ + TableDataInfo<KnowledgeFragmentVo> queryPageList(KnowledgeFragmentBo bo, PageQuery pageQuery); + + /** + * 鏌ヨ鐭ヨ瘑鐗囨鍒楄〃 + */ + List<KnowledgeFragmentVo> queryList(KnowledgeFragmentBo bo); + + /** + * 鏂板鐭ヨ瘑鐗囨 + */ + Boolean insertByBo(KnowledgeFragmentBo bo); + + /** + * 淇敼鐭ヨ瘑鐗囨 + */ + Boolean updateByBo(KnowledgeFragmentBo bo); + + /** + * 鏍¢獙骞舵壒閲忓垹闄ょ煡璇嗙墖娈典俊鎭� + */ + Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/IKnowledgeInfoService.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/IKnowledgeInfoService.java new file mode 100644 index 0000000..0c1b090 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/IKnowledgeInfoService.java @@ -0,0 +1,58 @@ +package org.ruoyi.knowledge.service; + +import org.ruoyi.common.mybatis.core.page.PageQuery; +import org.ruoyi.common.mybatis.core.page.TableDataInfo; +import org.ruoyi.knowledge.domain.KnowledgeAttach; +import org.ruoyi.knowledge.domain.bo.KnowledgeAttachBo; +import org.ruoyi.knowledge.domain.bo.KnowledgeInfoBo; +import org.ruoyi.knowledge.domain.req.KnowledgeInfoUploadRequest; +import org.ruoyi.knowledge.domain.vo.KnowledgeInfoVo; + +import java.util.Collection; +import java.util.List; + +/** + * 鐭ヨ瘑搴揝ervice鎺ュ彛 + * + * @author Lion Li + * @date 2024-10-21 + */ +public interface IKnowledgeInfoService { + + /** + * 鏌ヨ鐭ヨ瘑搴� + */ + KnowledgeInfoVo queryById(Long id); + + /** + * 鏌ヨ鐭ヨ瘑搴撳垪琛� + */ + TableDataInfo<KnowledgeInfoVo> queryPageList(KnowledgeInfoBo bo, PageQuery pageQuery); + + /** + * 鏌ヨ鐭ヨ瘑搴撳垪琛� + */ + List<KnowledgeInfoVo> queryList(KnowledgeInfoBo bo); + + + /** + * 淇敼鐭ヨ瘑搴� + */ + Boolean updateByBo(KnowledgeInfoBo bo); + + + /** + * 鏂板鐭ヨ瘑搴� + */ + void saveOne(KnowledgeInfoBo bo); + + /** + * 涓婁紶闄勪欢 + */ + void upload(KnowledgeInfoUploadRequest request); + + /** + * 鍒犻櫎鐭ヨ瘑搴� + */ + void removeKnowledge(String id); +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/impl/EmbeddingServiceImpl.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/impl/EmbeddingServiceImpl.java new file mode 100644 index 0000000..8850311 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/impl/EmbeddingServiceImpl.java @@ -0,0 +1,65 @@ +package org.ruoyi.knowledge.service.impl; + +import lombok.AllArgsConstructor; +import org.ruoyi.knowledge.chain.vectorizer.Vectorization; +import org.ruoyi.knowledge.chain.vectorstore.VectorStore; +import org.ruoyi.knowledge.service.EmbeddingService; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +@Service +@AllArgsConstructor +public class EmbeddingServiceImpl implements EmbeddingService { + + private final VectorStore vectorStore; + private final Vectorization vectorization; + + /** + * 淇濆瓨鍚戦噺鏁版嵁搴� + * @param chunkList 鏂囨。鎸夎鍒囧垎鐨勭墖娈� + * @param kid 鐭ヨ瘑搴揑D + * @param docId 鏂囨。ID + */ + @Override + public void storeEmbeddings(List<String> chunkList, String kid, String docId,List<String> fidList) { + List<List<Double>> vectorList = vectorization.batchVectorization(chunkList); + vectorStore.storeEmbeddings(chunkList,vectorList,kid,docId,fidList); + } + + @Override + public void removeByDocId(String kid,String docId) { + vectorStore.removeByDocId(kid,docId); + } + + @Override + public void removeByKid(String kid) { + vectorStore.removeByKid(kid); + } + + @Override + public List<Double> getQueryVector(String query) { + List<Double> queryVector = vectorization.singleVectorization(query); + return queryVector; + } + + @Override + public void createSchema(String kid) { + vectorStore.newSchema(kid); + } + + @Override + public void removeByKidAndFid(String kid, String fid) { + vectorStore.removeByKidAndFid(kid,fid); + } + + @Override + public void saveFragment(String kid, String docId, String fid, String content) { + List<String> chunkList = new ArrayList<>(); + List<String> fidList = new ArrayList<>(); + chunkList.add(content); + fidList.add(fid); + storeEmbeddings(chunkList,kid,docId,fidList); + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/impl/KnowledgeAttachServiceImpl.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/impl/KnowledgeAttachServiceImpl.java new file mode 100644 index 0000000..07812d4 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/impl/KnowledgeAttachServiceImpl.java @@ -0,0 +1,125 @@ +package org.ruoyi.knowledge.service.impl; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.ruoyi.common.core.utils.MapstructUtils; +import org.ruoyi.common.core.utils.StringUtils; +import org.ruoyi.common.mybatis.core.page.PageQuery; +import org.ruoyi.common.mybatis.core.page.TableDataInfo; +import org.ruoyi.knowledge.domain.KnowledgeAttach; +import org.ruoyi.knowledge.domain.bo.KnowledgeAttachBo; +import org.ruoyi.knowledge.domain.vo.KnowledgeAttachVo; +import org.ruoyi.knowledge.mapper.KnowledgeAttachMapper; +import org.ruoyi.knowledge.mapper.KnowledgeFragmentMapper; +import org.ruoyi.knowledge.service.IKnowledgeAttachService; +import org.springframework.stereotype.Service; + +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 鐭ヨ瘑搴撻檮浠禨ervice涓氬姟灞傚鐞� + * + * @author Lion Li + * @date 2024-10-21 + */ +@RequiredArgsConstructor +@Service +public class KnowledgeAttachServiceImpl implements IKnowledgeAttachService { + + private final KnowledgeAttachMapper baseMapper; + + private final KnowledgeFragmentMapper fragmentMapper; + + /** + * 鏌ヨ鐭ヨ瘑搴撻檮浠� + */ + @Override + public KnowledgeAttachVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 鏌ヨ鐭ヨ瘑搴撻檮浠跺垪琛� + */ + @Override + public TableDataInfo<KnowledgeAttachVo> queryPageList(KnowledgeAttachBo bo, PageQuery pageQuery) { + LambdaQueryWrapper<KnowledgeAttach> lqw = buildQueryWrapper(bo); + Page<KnowledgeAttachVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 鏌ヨ鐭ヨ瘑搴撻檮浠跺垪琛� + */ + @Override + public List<KnowledgeAttachVo> queryList(KnowledgeAttachBo bo) { + LambdaQueryWrapper<KnowledgeAttach> lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper<KnowledgeAttach> buildQueryWrapper(KnowledgeAttachBo bo) { + Map<String, Object> params = bo.getParams(); + LambdaQueryWrapper<KnowledgeAttach> lqw = Wrappers.lambdaQuery(); + lqw.eq(StringUtils.isNotBlank(bo.getKid()), KnowledgeAttach::getKid, bo.getKid()); + lqw.eq(StringUtils.isNotBlank(bo.getDocId()), KnowledgeAttach::getDocId, bo.getDocId()); + lqw.like(StringUtils.isNotBlank(bo.getDocName()), KnowledgeAttach::getDocName, bo.getDocName()); + lqw.eq(StringUtils.isNotBlank(bo.getDocType()), KnowledgeAttach::getDocType, bo.getDocType()); + lqw.eq(StringUtils.isNotBlank(bo.getContent()), KnowledgeAttach::getContent, bo.getContent()); + return lqw; + } + + /** + * 鏂板鐭ヨ瘑搴撻檮浠� + */ + @Override + public Boolean insertByBo(KnowledgeAttachBo bo) { + KnowledgeAttach add = MapstructUtils.convert(bo, KnowledgeAttach.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 淇敼鐭ヨ瘑搴撻檮浠� + */ + @Override + public Boolean updateByBo(KnowledgeAttachBo bo) { + KnowledgeAttach update = MapstructUtils.convert(bo, KnowledgeAttach.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙 + */ + private void validEntityBeforeSave(KnowledgeAttach entity){ + //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫 + } + + /** + * 鎵归噺鍒犻櫎鐭ヨ瘑搴撻檮浠� + */ + @Override + public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { + if(isValid){ + //TODO 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠� + } + return baseMapper.deleteBatchIds(ids) > 0; + } + + @Override + public void removeKnowledgeAttach(String kid) { + HashMap<String, Object> map = new HashMap<>(); + map.put("kid", kid); + baseMapper.deleteByMap(map); + fragmentMapper.deleteByMap(map); + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/impl/KnowledgeFragmentServiceImpl.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/impl/KnowledgeFragmentServiceImpl.java new file mode 100644 index 0000000..ff6efcc --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/impl/KnowledgeFragmentServiceImpl.java @@ -0,0 +1,113 @@ +package org.ruoyi.knowledge.service.impl; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.RequiredArgsConstructor; +import org.ruoyi.common.core.utils.MapstructUtils; +import org.ruoyi.common.core.utils.StringUtils; +import org.ruoyi.common.mybatis.core.page.PageQuery; +import org.ruoyi.common.mybatis.core.page.TableDataInfo; +import org.ruoyi.knowledge.domain.KnowledgeFragment; +import org.ruoyi.knowledge.domain.bo.KnowledgeFragmentBo; +import org.ruoyi.knowledge.domain.vo.KnowledgeFragmentVo; +import org.ruoyi.knowledge.mapper.KnowledgeFragmentMapper; +import org.ruoyi.knowledge.service.IKnowledgeFragmentService; +import org.springframework.stereotype.Service; + +import java.util.Collection; +import java.util.List; +import java.util.Map; +/** + * 鐭ヨ瘑鐗囨Service涓氬姟灞傚鐞� + * + * @author Lion Li + * @date 2024-10-21 + */ +@RequiredArgsConstructor +@Service +public class KnowledgeFragmentServiceImpl implements IKnowledgeFragmentService { + + private final KnowledgeFragmentMapper baseMapper; + + /** + * 鏌ヨ鐭ヨ瘑鐗囨 + */ + @Override + public KnowledgeFragmentVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 鏌ヨ鐭ヨ瘑鐗囨鍒楄〃 + */ + @Override + public TableDataInfo<KnowledgeFragmentVo> queryPageList(KnowledgeFragmentBo bo, PageQuery pageQuery) { + LambdaQueryWrapper<KnowledgeFragment> lqw = buildQueryWrapper(bo); + lqw.eq(KnowledgeFragment::getDocId, bo.getDocId()); + Page<KnowledgeFragmentVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 鏌ヨ鐭ヨ瘑鐗囨鍒楄〃 + */ + @Override + public List<KnowledgeFragmentVo> queryList(KnowledgeFragmentBo bo) { + LambdaQueryWrapper<KnowledgeFragment> lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper<KnowledgeFragment> buildQueryWrapper(KnowledgeFragmentBo bo) { + Map<String, Object> params = bo.getParams(); + LambdaQueryWrapper<KnowledgeFragment> lqw = Wrappers.lambdaQuery(); + lqw.eq(StringUtils.isNotBlank(bo.getKid()), KnowledgeFragment::getKid, bo.getKid()); + lqw.eq(StringUtils.isNotBlank(bo.getDocId()), KnowledgeFragment::getDocId, bo.getDocId()); + lqw.eq(StringUtils.isNotBlank(bo.getFid()), KnowledgeFragment::getFid, bo.getFid()); + lqw.eq(bo.getIdx() != null, KnowledgeFragment::getIdx, bo.getIdx()); + lqw.eq(StringUtils.isNotBlank(bo.getContent()), KnowledgeFragment::getContent, bo.getContent()); + return lqw; + } + + /** + * 鏂板鐭ヨ瘑鐗囨 + */ + @Override + public Boolean insertByBo(KnowledgeFragmentBo bo) { + KnowledgeFragment add = MapstructUtils.convert(bo, KnowledgeFragment.class); + validEntityBeforeSave(add); + boolean flag = baseMapper.insert(add) > 0; + if (flag) { + bo.setId(add.getId()); + } + return flag; + } + + /** + * 淇敼鐭ヨ瘑鐗囨 + */ + @Override + public Boolean updateByBo(KnowledgeFragmentBo bo) { + KnowledgeFragment update = MapstructUtils.convert(bo, KnowledgeFragment.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙 + */ + private void validEntityBeforeSave(KnowledgeFragment entity){ + //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫 + } + + /** + * 鎵归噺鍒犻櫎鐭ヨ瘑鐗囨 + */ + @Override + public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { + if(isValid){ + //TODO 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠� + } + return baseMapper.deleteBatchIds(ids) > 0; + } +} diff --git a/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/impl/KnowledgeInfoServiceImpl.java b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/impl/KnowledgeInfoServiceImpl.java new file mode 100644 index 0000000..0f2b842 --- /dev/null +++ b/ruoyi-modules/ruoyi-knowledge/src/main/java/org/ruoyi/knowledge/service/impl/KnowledgeInfoServiceImpl.java @@ -0,0 +1,218 @@ +package org.ruoyi.knowledge.service.impl; + +import cn.hutool.core.util.RandomUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import io.github.ollama4j.OllamaAPI; +import io.github.ollama4j.exceptions.OllamaBaseException; +import io.github.ollama4j.models.chat.OllamaChatMessageRole; +import io.github.ollama4j.models.chat.OllamaChatRequestBuilder; +import io.github.ollama4j.models.chat.OllamaChatRequestModel; +import io.github.ollama4j.models.chat.OllamaChatResult; +import lombok.RequiredArgsConstructor; +import org.ruoyi.common.core.utils.MapstructUtils; +import org.ruoyi.common.core.utils.StringUtils; +import org.ruoyi.common.mybatis.core.page.PageQuery; +import org.ruoyi.common.mybatis.core.page.TableDataInfo; +import org.ruoyi.common.satoken.utils.LoginHelper; +import org.ruoyi.knowledge.chain.loader.ResourceLoader; +import org.ruoyi.knowledge.chain.loader.ResourceLoaderFactory; +import org.ruoyi.knowledge.domain.KnowledgeAttach; +import org.ruoyi.knowledge.domain.KnowledgeFragment; +import org.ruoyi.knowledge.domain.KnowledgeInfo; +import org.ruoyi.knowledge.domain.bo.KnowledgeAttachBo; +import org.ruoyi.knowledge.domain.bo.KnowledgeFragmentBo; +import org.ruoyi.knowledge.domain.bo.KnowledgeInfoBo; +import org.ruoyi.knowledge.domain.req.KnowledgeInfoUploadRequest; +import org.ruoyi.knowledge.domain.vo.KnowledgeInfoVo; +import org.ruoyi.knowledge.mapper.KnowledgeAttachMapper; +import org.ruoyi.knowledge.mapper.KnowledgeFragmentMapper; +import org.ruoyi.knowledge.mapper.KnowledgeInfoMapper; +import org.ruoyi.knowledge.service.EmbeddingService; +import org.ruoyi.knowledge.service.IKnowledgeAttachService; +import org.ruoyi.knowledge.service.IKnowledgeFragmentService; +import org.ruoyi.knowledge.service.IKnowledgeInfoService; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; +import java.time.LocalDateTime; +import java.util.*; + +/** + * 鐭ヨ瘑搴揝ervice涓氬姟灞傚鐞� + * + * @author Lion Li + * @date 2024-10-21 + */ +@RequiredArgsConstructor +@Service +public class KnowledgeInfoServiceImpl implements IKnowledgeInfoService { + + private final KnowledgeInfoMapper baseMapper; + + private final EmbeddingService embeddingService; + + private final ResourceLoaderFactory resourceLoaderFactory; + + private final KnowledgeFragmentMapper fragmentMapper; + + private final KnowledgeAttachMapper attachMapper; + + /** + * 鏌ヨ鐭ヨ瘑搴� + */ + @Override + public KnowledgeInfoVo queryById(Long id){ + return baseMapper.selectVoById(id); + } + + /** + * 鏌ヨ鐭ヨ瘑搴撳垪琛� + */ + @Override + public TableDataInfo<KnowledgeInfoVo> queryPageList(KnowledgeInfoBo bo, PageQuery pageQuery) { + LambdaQueryWrapper<KnowledgeInfo> lqw = buildQueryWrapper(bo); + Page<KnowledgeInfoVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 鏌ヨ鐭ヨ瘑搴撳垪琛� + */ + @Override + public List<KnowledgeInfoVo> queryList(KnowledgeInfoBo bo) { + LambdaQueryWrapper<KnowledgeInfo> lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper<KnowledgeInfo> buildQueryWrapper(KnowledgeInfoBo bo) { + Map<String, Object> params = bo.getParams(); + LambdaQueryWrapper<KnowledgeInfo> lqw = Wrappers.lambdaQuery(); + lqw.eq(StringUtils.isNotBlank(bo.getKid()), KnowledgeInfo::getKid, bo.getKid()); + lqw.eq(bo.getUid() != null, KnowledgeInfo::getUid, bo.getUid()); + lqw.like(StringUtils.isNotBlank(bo.getKname()), KnowledgeInfo::getKname, bo.getKname()); + lqw.eq(StringUtils.isNotBlank(bo.getDescription()), KnowledgeInfo::getDescription, bo.getDescription()); + return lqw; + } + + /** + * 淇敼鐭ヨ瘑搴� + */ + @Override + public Boolean updateByBo(KnowledgeInfoBo bo) { + KnowledgeInfo update = MapstructUtils.convert(bo, KnowledgeInfo.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙 + */ + private void validEntityBeforeSave(KnowledgeInfo entity){ + //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫 + } + + + + @Override + public void saveOne(KnowledgeInfoBo bo) { + KnowledgeInfo knowledgeInfo = MapstructUtils.convert(bo, KnowledgeInfo.class); + if (StringUtils.isBlank(bo.getKid())){ + String kid = RandomUtil.randomString(10); + if (knowledgeInfo != null) { + knowledgeInfo.setKid(kid); + knowledgeInfo.setUid(LoginHelper.getLoginUser().getUserId()); + } + baseMapper.insert(knowledgeInfo); + embeddingService.createSchema(kid); + }else { + baseMapper.updateById(knowledgeInfo); + } + } + + @Override + public void upload(KnowledgeInfoUploadRequest request) { + storeContent(request.getFile(), request.getKid()); + } + + public void storeContent(MultipartFile file, String kid) { + String fileName = file.getOriginalFilename(); + List<String> chunkList = new ArrayList<>(); + KnowledgeAttach knowledgeAttach = new KnowledgeAttach(); + knowledgeAttach.setKid(kid); + String docId = RandomUtil.randomString(10); + knowledgeAttach.setDocId(docId); + knowledgeAttach.setDocName(fileName); + knowledgeAttach.setDocType(fileName.substring(fileName.lastIndexOf(".")+1)); + String content = ""; + ResourceLoader resourceLoader = resourceLoaderFactory.getLoaderByFileType(knowledgeAttach.getDocType()); + List<String> fids = new ArrayList<>(); + try { + content = resourceLoader.getContent(file.getInputStream()); + chunkList = resourceLoader.getChunkList(content); + for (int i = 0; i < chunkList.size(); i++) { + String fid = RandomUtil.randomString(16); + fids.add(fid); + KnowledgeFragment knowledgeFragment = new KnowledgeFragment(); + knowledgeFragment.setKid(kid); + knowledgeFragment.setDocId(docId); + knowledgeFragment.setFid(fid); + knowledgeFragment.setIdx(i); + // String text = convertTextBlockToPretrainData(chunkList.get(i)); + knowledgeFragment.setContent(chunkList.get(i)); + knowledgeFragment.setCreateTime(new Date()); + fragmentMapper.insert(knowledgeFragment); + } + } catch (IOException e) { + e.printStackTrace(); + } + knowledgeAttach.setContent(content); + knowledgeAttach.setCreateTime(new Date()); + attachMapper.insert(knowledgeAttach); + embeddingService.storeEmbeddings(chunkList,kid,docId,fids); + } + + @Override + public void removeKnowledge(String id) { + + Map<String,Object> map = new HashMap<>(); + map.put("kid",id); + // 鍒犻櫎鐭ヨ瘑搴� + baseMapper.deleteByMap(map); + // 鍒犻櫎闄勪欢鍜岀煡璇嗙墖娈� + fragmentMapper.deleteByMap(map); + attachMapper.deleteByMap(map); + // 鍒犻櫎鍚戦噺搴撲俊鎭� + embeddingService.removeByKid(id); + } + + /** + * 灏嗘枃鏈潡杞崲涓洪璁粌鏁版嵁 + * @param chunk 瑙f瀽鏂囨湰鍧� + */ + public String convertTextBlockToPretrainData(String chunk){ + String host = "http://localhost:11434/"; + OllamaAPI ollama = new OllamaAPI(host); + OllamaChatRequestBuilder builder = OllamaChatRequestBuilder.getInstance("qwen2.5:7b"); + // 璁剧疆瓒呮椂鏃堕棿 + ollama.setRequestTimeoutSeconds(100); + // create first user question + String json = "instruction:鐢ㄦ埛鎸囦护,鏍规嵁璇箟鎻愬彇涓�涓叧閿瘝;input:鐢ㄦ埛杈撳叆,鏍规嵁璇箟鎻愬彇澶氫釜鍏抽敭璇�;output:杈撳嚭鏂囨湰鍐呭"; + + OllamaChatRequestModel requestModel = builder.withMessage + (OllamaChatMessageRole.USER, "鏂囨湰锛�"+chunk+"鐞嗚В鏂囨湰鍐呭锛屽苟涓斿皢鏂囨湰鍐呭杞崲涓�:"+json+",杈撳嚭JSON鏍煎紡锛屼笉瑕佸寘鍚叾浠栨棤鍏冲唴瀹�,鍐呴儴浣跨敤鏃犻渶鑴辨晱") + .build(); + + // start conversation with model + OllamaChatResult chatResult = null; + try { + chatResult = ollama.chat(requestModel); + } catch (Exception e) { + System.out.println("瑙f瀽澶辫触!"); + } + return chatResult.getResponse(); + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/pom.xml b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/pom.xml new file mode 100644 index 0000000..76af345 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/pom.xml @@ -0,0 +1,49 @@ +<!-- + ~ MIT License + ~ + ~ Copyright (c) 2023 OrdinaryRoad + ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy + ~ of this software and associated documentation files (the "Software"), to deal + ~ in the Software without restriction, including without limitation the rights + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + ~ copies of the Software, and to permit persons to whom the Software is + ~ furnished to do so, subject to the following conditions: + ~ + ~ The above copyright notice and this permission notice shall be included in all + ~ copies or substantial portions of the Software. + ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + ~ SOFTWARE. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-commons</artifactId> + <version>${revision}</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>live-chat-client-commons-base</artifactId> + <name>ordinaryroad-live-chat-client-commons-base</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + </dependency> + </dependencies> +</project> diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/constant/Constants.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/constant/Constants.java new file mode 100644 index 0000000..faf4a69 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/constant/Constants.java @@ -0,0 +1,32 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.constant; + +/** + * @author mjz + * @date 2023/8/26 + */ +public class Constants { +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/exception/BaseException.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/exception/BaseException.java new file mode 100644 index 0000000..71248e7 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/exception/BaseException.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.exception; + +/** + * @author mjz + * @date 2023/9/5 + */ +public class BaseException extends RuntimeException { + + public BaseException() { + } + + public BaseException(String message) { + super(message); + } + + public BaseException(String message, Throwable cause) { + super(message, cause); + } + + public BaseException(Throwable cause) { + super(cause); + } + + public BaseException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { + super(message, cause, enableSuppression, writableStackTrace); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IBaseConnectionListener.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IBaseConnectionListener.java new file mode 100644 index 0000000..4398cf9 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IBaseConnectionListener.java @@ -0,0 +1,60 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.listener; + + +/** + * 杩炴帴鍥炶皟 + * + * @author mjz + * @date 2023/8/26 + */ +public interface IBaseConnectionListener<T> { + + /** + * 杩炴帴寤虹珛鎴愬姛 + */ + default void onConnected(T t) { + // ignore + } + + /** + * 杩炴帴寤虹珛澶辫触 + * + * @param t + */ + default void onConnectFailed(T t) { + // ignore + } + + /** + * 杩炴帴鏂紑 + * + * @param t + */ + default void onDisconnected(T t) { + // ignore + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IBaseMsgListener.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IBaseMsgListener.java new file mode 100644 index 0000000..7230d9d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IBaseMsgListener.java @@ -0,0 +1,149 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.listener; + + +import tech.ordinaryroad.live.chat.client.commons.base.msg.BaseCmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.BaseMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +/** + * Base娑堟伅鍥炶皟 + * + * @author mjz + * @date 2023/8/26 + */ +public interface IBaseMsgListener<T, CmdEnum extends Enum<CmdEnum>> { + + /** + * 鏀跺埌娑堟伅锛堟墍鏈夋秷鎭級 + * + * @param msg IMsg + */ + default void onMsg(T t, IMsg msg) { + this.onMsg(msg); + } + + default void onMsg(IMsg msg) { + // ignore + } + + /** + * 鏀跺埌cmd娑堟伅锛堟墍鏈塩md锛� + * + * @param cmd CmdEnum + * @param cmdMsg BaseCmdMsg + */ + default void onCmdMsg(T t, CmdEnum cmd, ICmdMsg<CmdEnum> cmdMsg) { + this.onCmdMsg(cmd, cmdMsg); + } + + default void onCmdMsg(CmdEnum cmd, ICmdMsg<CmdEnum> cmdMsg) { + // ignore + } + + /** + * 鏀跺埌鍏朵粬cmd娑堟伅锛堝瓨鍦‥num锛屼絾Listener娌℃湁瀵瑰簲鐨勫洖璋冿級 + * + * @param cmd CmdEnum + * @param cmdMsg BaseCmdMsg + */ + default void onOtherCmdMsg(T t, CmdEnum cmd, ICmdMsg<CmdEnum> cmdMsg) { + this.onOtherCmdMsg(cmd, cmdMsg); + } + + default void onOtherCmdMsg(CmdEnum cmd, ICmdMsg<CmdEnum> cmdMsg) { + // ignore + } + + /** + * 鏀跺埌鏈煡cmd娑堟伅 + * + * @param cmdString 瀹為檯鏀跺埌鐨刢md瀛楃涓� + * @param msg BaseMsg + */ + default void onUnknownCmd(T t, String cmdString, IMsg msg) { + this.onUnknownCmd(cmdString, msg); + } + + default void onUnknownCmd(String cmdString, IMsg msg) { + // ignore + } + + /** + * 鏀跺埌cmd娑堟伅锛堟墍鏈塩md锛� + * + * @param cmd CmdEnum + * @param cmdMsg BaseCmdMsg + * @deprecated use {@link #onCmdMsg(T, Enum, ICmdMsg)} + */ + default void onCmdMsg(T t, CmdEnum cmd, BaseCmdMsg<CmdEnum> cmdMsg) { + this.onCmdMsg(cmd, cmdMsg); + } + + /** + * @deprecated use {@link #onCmdMsg(Enum, ICmdMsg)} + */ + default void onCmdMsg(CmdEnum cmd, BaseCmdMsg<CmdEnum> cmdMsg) { + // ignore + } + + /** + * 鏀跺埌鍏朵粬cmd娑堟伅锛堝瓨鍦‥num锛屼絾Listener娌℃湁瀵瑰簲鐨勫洖璋冿級 + * + * @param cmd CmdEnum + * @param cmdMsg BaseCmdMsg + * @deprecated use {@link #onOtherCmdMsg(T, Enum, ICmdMsg)} + */ + default void onOtherCmdMsg(T t, CmdEnum cmd, BaseCmdMsg<CmdEnum> cmdMsg) { + this.onOtherCmdMsg(cmd, cmdMsg); + } + + /** + * @deprecated use {@link #onOtherCmdMsg(Enum, ICmdMsg)} + */ + default void onOtherCmdMsg(CmdEnum cmd, BaseCmdMsg<CmdEnum> cmdMsg) { + // ignore + } + + /** + * 鏀跺埌鏈煡cmd娑堟伅 + * + * @param cmdString 瀹為檯鏀跺埌鐨刢md瀛楃涓� + * @param msg BaseMsg + * @deprecated use {@link #onUnknownCmd(T, String, IMsg)} + */ + default void onUnknownCmd(T t, String cmdString, BaseMsg msg) { + this.onUnknownCmd(cmdString, msg); + } + + /** + * @deprecated use {@link #onUnknownCmd(String, IMsg)} + */ + default void onUnknownCmd(String cmdString, BaseMsg msg) { + // ignore + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IDanmuMsgListener.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IDanmuMsgListener.java new file mode 100644 index 0000000..52b8dac --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IDanmuMsgListener.java @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.listener; + + +/** + * 寮瑰箷娑堟伅鍥炶皟 + * + * @author mjz + * @since 0.0.6 + */ +public interface IDanmuMsgListener<T, DanmuMsg> { + + /** + * 鏀跺埌寮瑰箷 + */ + default void onDanmuMsg(T t, DanmuMsg msg) { + this.onDanmuMsg(msg); + } + + default void onDanmuMsg(DanmuMsg msg) { + // ignore + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IEnterRoomMsgListener.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IEnterRoomMsgListener.java new file mode 100644 index 0000000..931f35f --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IEnterRoomMsgListener.java @@ -0,0 +1,47 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.listener; + + +/** + * 杩涘叆鎴块棿娑堟伅鍥炶皟 + * + * @author mjz + * @date 2023/12/14 + * @since 0.0.16 + */ +public interface IEnterRoomMsgListener<T, EnterRoomMsg> { + + /** + * 鐢ㄦ埛杩涘叆鎴块棿 + */ + default void onEnterRoomMsg(T t, EnterRoomMsg msg) { + this.onEnterRoomMsg(msg); + } + + default void onEnterRoomMsg(EnterRoomMsg msg) { + // ignore + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IGiftMsgListener.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IGiftMsgListener.java new file mode 100644 index 0000000..f486b96 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/IGiftMsgListener.java @@ -0,0 +1,47 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.listener; + + +/** + * 绀肩墿娑堟伅鍥炶皟 + * + * @author mjz + * @since 0.0.8 + */ +public interface IGiftMsgListener<T, GiftMsg> { + + + /** + * 鏀跺埌绀肩墿 + */ + default void onGiftMsg(T t, GiftMsg msg) { + this.onGiftMsg(msg); + } + + default void onGiftMsg(GiftMsg msg) { + // ignore + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ILikeMsgListener.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ILikeMsgListener.java new file mode 100644 index 0000000..42cc886 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ILikeMsgListener.java @@ -0,0 +1,46 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.listener; + + +/** + * 鐐硅禐娑堟伅鍥炶皟 + * + * @author mjz + * @since 0.2.0 + */ +public interface ILikeMsgListener<T, LikeMsg> { + + /** + * 鏀跺埌鐐硅禐 + */ + default void onLikeMsg(T t, LikeMsg msg) { + this.onLikeMsg(msg); + } + + default void onLikeMsg(LikeMsg msg) { + // ignore + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ISuperChatMsgListener.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ISuperChatMsgListener.java new file mode 100644 index 0000000..1a70b60 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/listener/ISuperChatMsgListener.java @@ -0,0 +1,47 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.listener; + + +/** + * 閱掔洰鐣欒█娑堟伅鍥炶皟 + * + * @author mjz + * @date 2023/9/24 + * @since 0.0.11 + */ +public interface ISuperChatMsgListener<T, SuperChatMsg> { + + /** + * 鏀跺埌閱掔洰鐣欒█ + */ + default void onSuperChatMsg(T t, SuperChatMsg msg) { + this.onSuperChatMsg(msg); + } + + default void onSuperChatMsg(SuperChatMsg msg) { + // ignore + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/BaseCmdMsg.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/BaseCmdMsg.java new file mode 100644 index 0000000..734c4b6 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/BaseCmdMsg.java @@ -0,0 +1,33 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +/** + * @author mjz + * @date 2023/8/26 + */ +public abstract class BaseCmdMsg<CmdEnum extends Enum<CmdEnum>> extends BaseMsg + implements ICmdMsg<CmdEnum> { +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/BaseMsg.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/BaseMsg.java new file mode 100644 index 0000000..2135fa4 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/BaseMsg.java @@ -0,0 +1,74 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/8/26 + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +public abstract class BaseMsg implements IMsg { + + public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper() + .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) + .configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + + @Override + public String toString() { + try { + return OBJECT_MAPPER.writeValueAsString(this); + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ICmdMsg.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ICmdMsg.java new file mode 100644 index 0000000..7a0b2cf --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ICmdMsg.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +/** + * @author mjz + * @date 2023/10/2 + */ +public interface ICmdMsg<CmdEnum extends Enum<CmdEnum>> extends IMsg { + + String getCmd(); + + void setCmd(String cmd); + + CmdEnum getCmdEnum(); +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IDanmuMsg.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IDanmuMsg.java new file mode 100644 index 0000000..7a4745c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IDanmuMsg.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +/** + * @author mjz + * @date 2023/9/8 + */ +public interface IDanmuMsg extends IMsg { + + /** + * 绮変笣鐗屽悕绉� + */ + String getBadgeName(); + + /** + * 绮変笣鐗岀瓑绾� + */ + byte getBadgeLevel(); + + /** + * 寮瑰箷鍙戦�佽�卛d + */ + String getUid(); + + /** + * 寮瑰箷鍙戦�佽�呯敤鎴峰悕 + */ + String getUsername(); + + /** + * 寮瑰箷鍙戦�佽�呭ご鍍忓湴鍧� + * + * @since 0.0.11 + */ + default String getUserAvatar() { + return null; + } + + /** + * 寮瑰箷鍐呭 + */ + String getContent(); + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IEnterRoomMsg.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IEnterRoomMsg.java new file mode 100644 index 0000000..a914e63 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IEnterRoomMsg.java @@ -0,0 +1,62 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +/** + * 鍏ユ埧娑堟伅 + * + * @author mjz + * @date 2023/12/26 + * @since 0.0.16 + */ +public interface IEnterRoomMsg extends IMsg { + + /** + * 绮変笣鐗屽悕绉� + */ + String getBadgeName(); + + /** + * 绮変笣鐗岀瓑绾� + */ + byte getBadgeLevel(); + + /** + * 鐢ㄦ埛id + */ + String getUid(); + + /** + * 鐢ㄦ埛鍚� + */ + String getUsername(); + + /** + * 澶村儚鍦板潃 + */ + default String getUserAvatar() { + return null; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IGiftMsg.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IGiftMsg.java new file mode 100644 index 0000000..9b8d35d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IGiftMsg.java @@ -0,0 +1,100 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +/** + * @author mjz + * @date 2023/9/8 + */ +public interface IGiftMsg extends IMsg { + + /** + * 绮変笣鐗屽悕绉� + */ + default String getBadgeName() { + return ""; + } + + /** + * 绮変笣鐗岀瓑绾� + */ + default byte getBadgeLevel() { + return 0; + } + + /** + * 鍙戦�佹柟id + */ + String getUid(); + + /** + * 鍙戦�佹柟鐢ㄦ埛鍚� + */ + String getUsername(); + + /** + * 鍙戦�佹柟澶村儚鍦板潃 + * + * @since 0.0.11 + */ + default String getUserAvatar() { + return null; + } + + /** + * 绀肩墿鍚嶇О + */ + String getGiftName(); + + /** + * 绀肩墿鍥惧儚鍦板潃 + */ + String getGiftImg(); + + /** + * 绀肩墿id + */ + String getGiftId(); + + /** + * 绀肩墿鏁伴噺 + */ + int getGiftCount(); + + /** + * 鍗曚釜绀肩墿浠锋牸 + */ + int getGiftPrice(); + + /** + * 鎺ユ敹鏂筰d + */ + String getReceiveUid(); + + /** + * 鎺ユ敹鏂圭敤鎴峰悕 + */ + String getReceiveUsername(); +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ILikeMsg.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ILikeMsg.java new file mode 100644 index 0000000..c10fe97 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ILikeMsg.java @@ -0,0 +1,71 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +/** + * @author mjz + * @date 2024/1/31 + * @since 0.2.0 + */ +public interface ILikeMsg extends IMsg { + + /** + * 绮変笣鐗屽悕绉� + */ + default String getBadgeName(){ + return ""; + } + + /** + * 绮変笣鐗岀瓑绾� + */ + default byte getBadgeLevel(){ + return 0; + } + + /** + * 鐐硅禐鑰卛d + */ + String getUid(); + + /** + * 鐐硅禐鑰呯敤鎴峰悕 + */ + String getUsername(); + + /** + * 鐐硅禐鑰呭ご鍍忓湴鍧� + */ + default String getUserAvatar() { + return null; + } + + /** + * 鐐硅禐鏁� + */ + default int getClickCount() { + return 1; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IMsg.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IMsg.java new file mode 100644 index 0000000..c02a336 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/IMsg.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +import java.io.Serializable; + +/** + * @author mjz + * @date 2023/8/26 + */ +public interface IMsg extends Serializable { +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ISuperChatMsg.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ISuperChatMsg.java new file mode 100644 index 0000000..58c9491 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-base/src/main/java/tech/ordinaryroad/live/chat/client/commons/base/msg/ISuperChatMsg.java @@ -0,0 +1,49 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.base.msg; + +/** + * 閱掔洰鐣欒█ + * + * @author mjz + * @date 2023/9/22 + */ +public interface ISuperChatMsg extends IDanmuMsg { + + /** + * 閱掔洰鐣欒█鎸佺画鏃堕棿锛屽崟浣嶇 + */ + int getDuration(); + + @Override + default String getBadgeName() { + return ""; + } + + @Override + default byte getBadgeLevel() { + return 0; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/pom.xml b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/pom.xml new file mode 100644 index 0000000..f25c822 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/pom.xml @@ -0,0 +1,55 @@ +<!-- + ~ MIT License + ~ + ~ Copyright (c) 2023 OrdinaryRoad + ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy + ~ of this software and associated documentation files (the "Software"), to deal + ~ in the Software without restriction, including without limitation the rights + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + ~ copies of the Software, and to permit persons to whom the Software is + ~ furnished to do so, subject to the following conditions: + ~ + ~ The above copyright notice and this permission notice shall be included in all + ~ copies or substantial portions of the Software. + ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + ~ SOFTWARE. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-commons</artifactId> + <version>${revision}</version> + <relativePath>../pom.xml</relativePath> + </parent> + <packaging>jar</packaging> + + <artifactId>live-chat-client-commons-client</artifactId> + <name>live-chat-client-commons-client</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-commons-base</artifactId> + </dependency> + + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-commons-util</artifactId> + </dependency> + </dependencies> +</project> diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/BaseLiveChatClient.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/BaseLiveChatClient.java new file mode 100644 index 0000000..f442b9c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/BaseLiveChatClient.java @@ -0,0 +1,200 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.client; + +import lombok.Getter; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseMsgListener; +import tech.ordinaryroad.live.chat.client.commons.client.config.BaseLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; + +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeSupport; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import java.util.function.Consumer; + +/** + * @author mjz + * @date 2023/8/26 + */ +public abstract class BaseLiveChatClient< + Config extends BaseLiveChatClientConfig, + MsgListener extends IBaseMsgListener<?, ?> + > implements IBaseLiveChatClient<MsgListener> { + + private final Config config; + @Getter + private volatile ClientStatusEnums status = ClientStatusEnums.NEW; + protected PropertyChangeSupport statusChangeSupport = new PropertyChangeSupport(status); + protected volatile boolean cancelReconnect = false; + protected final List<MsgListener> msgListeners = Collections.synchronizedList(new ArrayList<>()); + + protected BaseLiveChatClient(Config config) { + this.config = config; + } + + public Config getConfig() { + return config; + } + + @Override + public void connect(Runnable success) { + this.connect(success, null); + } + + @Override + public void connect() { + this.connect(null, null); + } + + @Override + public void disconnect(boolean cancelReconnect) { + this.cancelReconnect = cancelReconnect; + this.disconnect(); + } + + @Override + public void send(Object msg) { + this.send(msg, null, null); + } + + @Override + public void send(Object msg, Runnable success) { + this.send(msg, success, null); + } + + @Override + public void send(Object msg, Consumer<Throwable> failed) { + this.send(msg, null, failed); + } + + @Override + public void sendDanmu(Object danmu) { + this.sendDanmu(danmu, null, null); + } + + @Override + public void sendDanmu(Object danmu, Runnable success) { + this.sendDanmu(danmu, success, null); + } + + @Override + public void sendDanmu(Object danmu, Consumer<Throwable> failed) { + this.sendDanmu(danmu, null, failed); + } + + @Override + public void clickLike(int count) { + this.clickLike(count, null, null); + } + + @Override + public void clickLike(int count, Runnable success) { + this.clickLike(count, success, null); + } + + @Override + public void clickLike(int count, Consumer<Throwable> failed) { + this.clickLike(count, null, failed); + } + + protected abstract void tryReconnect(); + + protected abstract String getWebSocketUriString(); + + /** + * 鍒ゆ柇鏄惁澶勪簬鏌愪釜鐘舵�侊紝鎴栬�呭浜庡悗缁姸鎬� + * + * @param status {@link ClientStatusEnums} + * @return false: 杩樻病鏈夊埌杈捐鐘舵�� + */ + protected boolean checkStatus(ClientStatusEnums status) { + return this.status.getCode() >= Objects.requireNonNull(status).getCode(); + } + + protected void setStatus(ClientStatusEnums status) { + ClientStatusEnums oldStatus = this.status; + if (oldStatus != status) { + this.status = status; + this.statusChangeSupport.firePropertyChange("status", oldStatus, status); + } + } + + public void addStatusChangeListener(PropertyChangeListener listener) { + this.statusChangeSupport.addPropertyChangeListener(listener); + } + + public void removeStatusChangeListener(PropertyChangeListener listener) { + this.statusChangeSupport.removePropertyChangeListener(listener); + } + + @Override + public void destroy() { + for (PropertyChangeListener propertyChangeListener : this.statusChangeSupport.getPropertyChangeListeners()) { + this.statusChangeSupport.removePropertyChangeListener(propertyChangeListener); + } + this.msgListeners.clear(); + } + + @Override + public boolean addMsgListener(MsgListener msgListener) { + if (msgListener == null) { + return false; + } + return this.msgListeners.add(msgListener); + } + + @Override + public boolean addMsgListeners(List<MsgListener> msgListeners) { + if (msgListeners == null || msgListeners.isEmpty()) { + return false; + } + return this.msgListeners.addAll(msgListeners); + } + + @Override + public boolean removeMsgListener(MsgListener msgListener) { + if (msgListener == null) { + return false; + } + return this.msgListeners.remove(msgListener); + } + + @Override + public boolean removeMsgListeners(List<MsgListener> msgListeners) { + if (msgListeners == null || msgListeners.isEmpty()) { + return false; + } + return this.msgListeners.removeAll(msgListeners); + } + + @Override + public void removeAllMsgListeners() { + this.msgListeners.clear(); + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/IBaseLiveChatClient.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/IBaseLiveChatClient.java new file mode 100644 index 0000000..951b4bc --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/IBaseLiveChatClient.java @@ -0,0 +1,135 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.client; + +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseMsgListener; + +import java.util.List; +import java.util.function.Consumer; + +/** + * @author mjz + * @date 2023/9/5 + */ +public interface IBaseLiveChatClient<MsgListener extends IBaseMsgListener<?, ?>> { + + void init(); + + boolean addMsgListener(MsgListener msgListener); + + boolean addMsgListeners(List<MsgListener> msgListeners); + + boolean removeMsgListener(MsgListener msgListener); + + boolean removeMsgListeners(List<MsgListener> msgListeners); + + void removeAllMsgListeners(); + + void connect(Runnable success, Consumer<Throwable> failed); + + void connect(Runnable success); + + void connect(); + + /** + * 鎵嬪姩鏂紑杩炴帴 + * + * @param cancelReconnect 鍙栨秷鏈鐨勮嚜鍔ㄩ噸杩烇紙濡傛灉鍚敤鑷姩閲嶈繛锛� + */ + void disconnect(boolean cancelReconnect); + + void disconnect(); + + void destroy(); + + void send(Object msg); + + void send(Object msg, Runnable success, Consumer<Throwable> failed); + + void send(Object msg, Runnable success); + + void send(Object msg, Consumer<Throwable> failed); + + /** + * 鍙戦�佸脊骞� + * + * @param danmu 寮瑰箷鍐呭 + * @since 0.0.6 + */ + void sendDanmu(Object danmu); + + /** + * 鍙戦�佸脊骞� + * + * @param danmu 寮瑰箷鍐呭 + * @since 0.0.6 + */ + void sendDanmu(Object danmu, Runnable success, Consumer<Throwable> failed); + + /** + * 鍙戦�佸脊骞� + * + * @param danmu 寮瑰箷鍐呭 + * @since 0.0.6 + */ + void sendDanmu(Object danmu, Runnable success); + + /** + * 鍙戦�佸脊骞� + * + * @param danmu 寮瑰箷鍐呭 + * @since 0.0.6 + */ + void sendDanmu(Object danmu, Consumer<Throwable> failed); + + /** + * 涓虹洿鎾棿鐐硅禐 + * + * @since 0.2.0 + */ + void clickLike(int count); + + /** + * 涓虹洿鎾棿鐐硅禐 + * + * @since 0.2.0 + */ + void clickLike(int count, Runnable success, Consumer<Throwable> failed); + + /** + * 涓虹洿鎾棿鐐硅禐 + * + * @since 0.2.0 + */ + void clickLike(int count, Runnable success); + + /** + * 涓虹洿鎾棿鐐硅禐 + * + * @since 0.2.0 + */ + void clickLike(int count, Consumer<Throwable> failed); + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/config/BaseLiveChatClientConfig.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/config/BaseLiveChatClientConfig.java new file mode 100644 index 0000000..1fee0f7 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/config/BaseLiveChatClientConfig.java @@ -0,0 +1,139 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.client.config; + + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; + +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeSupport; + +/** + * 鐩存挱闂村脊骞曞鎴风閰嶇疆 + * + * @author mjz + * @date 2023/8/26 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@SuperBuilder(toBuilder = true) +public abstract class BaseLiveChatClientConfig { + + protected PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this); + public static final long DEFAULT_HEARTBEAT_INITIAL_DELAY = 15; + public static final long DEFAULT_HEARTBEAT_PERIOD = 25; + public static final long DEFAULT_MIN_SEND_DANMU_PERIOD = 3000L; + + private String websocketUri; + + /** + * 娴忚鍣ㄤ腑鐨凜ookie + */ + private String cookie; + + /** + * 鐩存挱闂磇d + */ + private Object roomId; + + /** + * 鏄惁鍚敤鑷姩閲嶈繛 + */ + @Builder.Default + private boolean autoReconnect = Boolean.TRUE; + + /** + * 閲嶈瘯寤惰繜鏃堕棿锛堢锛夛紝榛樿5s鍚庨噸璇� + */ + @Builder.Default + private int reconnectDelay = 5; + + /** + * 棣栨鍙戦�佸績璺冲寘鐨勫欢杩熸椂闂达紙绉掞級 + */ + @Builder.Default + private long heartbeatInitialDelay = DEFAULT_HEARTBEAT_INITIAL_DELAY; + + /** + * 蹇冭烦鍖呭彂閫佸懆鏈燂紙绉掞級 + */ + @Builder.Default + private long heartbeatPeriod = DEFAULT_HEARTBEAT_PERIOD; + + /** + * 鏈�灏忓彂閫佸脊骞曟椂闂撮棿闅旓紙姣锛� + */ + @Builder.Default + private long minSendDanmuPeriod = DEFAULT_MIN_SEND_DANMU_PERIOD; + + public void setCookie(String cookie) { + String oldValue = this.cookie; + this.cookie = cookie; + this.propertyChangeSupport.firePropertyChange("cookie", oldValue, cookie); + } + + public void setRoomId(Object roomId) { + if (!(roomId instanceof Number || roomId instanceof String)) { + throw new BaseException("鎴块棿ID浠呮敮鎸佹暟瀛楁垨瀛楃涓诧紝鎵�浼犲弬鏁扮被鍨嬶細" + roomId.getClass() + "鍊硷細" + roomId); + } + Object oldValue = this.roomId; + this.roomId = roomId; + this.propertyChangeSupport.firePropertyChange("roomId", oldValue, roomId); + } + + public void setWebsocketUri(String websocketUri) { + String oldValue = this.websocketUri; + this.websocketUri = websocketUri; + this.propertyChangeSupport.firePropertyChange("websocketUri", oldValue, websocketUri); + } + + public void setMinSendDanmuPeriod(long minSendDanmuPeriod) { + long oldValue = this.minSendDanmuPeriod; + this.minSendDanmuPeriod = minSendDanmuPeriod; + this.propertyChangeSupport.firePropertyChange("minSendDanmuPeriod", oldValue, minSendDanmuPeriod); + } + + public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) { + this.propertyChangeSupport.addPropertyChangeListener(propertyName, listener); + } + + public void addPropertyChangeListener(PropertyChangeListener listener) { + this.propertyChangeSupport.addPropertyChangeListener(listener); + } + + public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) { + this.propertyChangeSupport.removePropertyChangeListener(propertyName, listener); + } + + public void removePropertyChangeListener(PropertyChangeListener listener) { + this.propertyChangeSupport.removePropertyChangeListener(listener); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/enums/ClientStatusEnums.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/enums/ClientStatusEnums.java new file mode 100644 index 0000000..29d2c75 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-client/src/main/java/tech/ordinaryroad/live/chat/client/commons/client/enums/ClientStatusEnums.java @@ -0,0 +1,83 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.client.enums; + +/** + * @author mjz + * @date 2023/8/26 + */ +public enum ClientStatusEnums { + /** + * 鏂板垱寤� + */ + NEW(0), + + /** + * 宸插垵濮嬪寲 + */ + INITIALIZED(1), + + /** + * 杩炴帴涓� + */ + CONNECTING(100), + + /** + * 閲嶆柊杩炴帴涓� + */ + RECONNECTING(101), + + /** + * 宸茶繛鎺� + */ + CONNECTED(200), + + /** + * 杩炴帴澶辫触 + */ + CONNECT_FAILED(401), + + /** + * 宸叉柇寮�杩炴帴 + */ + DISCONNECTED(400), + + /** + * 宸查攢姣� + */ + DESTROYED(-1), + ; + + public int getCode() { + return code; + } + + ClientStatusEnums(int order) { + this.code = order; + } + + private final int code; + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/pom.xml b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/pom.xml new file mode 100644 index 0000000..190ca51 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/pom.xml @@ -0,0 +1,25 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-commons</artifactId> + <version>${revision}</version> + <relativePath>../pom.xml</relativePath> + </parent> + <packaging>jar</packaging> + + <artifactId>live-chat-client-commons-util</artifactId> + <name>live-chat-client-commons-util</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>cn.hutool</groupId> + <artifactId>hutool-all</artifactId> + </dependency> + </dependencies> +</project> diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatCookieUtil.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatCookieUtil.java new file mode 100644 index 0000000..9ec118f --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatCookieUtil.java @@ -0,0 +1,80 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.util; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.map.MapUtil; +import cn.hutool.core.util.StrUtil; + +import java.net.HttpCookie; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +/** + * @author mjz + * @date 2023/8/27 + */ +public class OrLiveChatCookieUtil { + + public static String toString(List<HttpCookie> cookies) { + if (CollUtil.isEmpty(cookies)) { + return StrUtil.EMPTY; + } + + return cookies.stream().map(httpCookie -> { + httpCookie.setVersion(0); + return httpCookie.toString(); + }).collect(Collectors.joining("; ")); + } + + public static Map<String, String> parseCookieString(String cookies) { + Map<String, String> map = new HashMap<>(); + if (StrUtil.isNotBlank(cookies) && !StrUtil.isNullOrUndefined(cookies)) { + try { + String[] split = cookies.split("; "); + for (String s : split) { + String[] split1 = s.split("="); + map.put(split1[0], split1[1]); + } + } catch (Exception e) { + throw new RuntimeException("cookie瑙f瀽澶辫触 " + cookies, e); + } + } + return map; + } + + public static String getCookieByName(Map<String, String> cookieMap, String name, Supplier<String> supplier) { + String str = MapUtil.getStr(cookieMap, name); + return str == null ? supplier.get() : str; + } + + public static String getCookieByName(String cookie, String name, Supplier<String> supplier) { + String str = MapUtil.getStr(parseCookieString(cookie), name); + return str == null ? supplier.get() : str; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatNumberUtil.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatNumberUtil.java new file mode 100644 index 0000000..969cf00 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatNumberUtil.java @@ -0,0 +1,40 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.util; + +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.StrUtil; + +/** + * @author mjz + * @date 2023/12/2 + */ +public class OrLiveChatNumberUtil extends NumberUtil { + + public static long parseLong(Object object){ + return NumberUtil.parseLong(StrUtil.toStringOrNull(object)); + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatReflectUtil.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatReflectUtil.java new file mode 100644 index 0000000..a4d8a5d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLiveChatReflectUtil.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.util; + +import cn.hutool.core.util.ReflectUtil; + +import java.lang.reflect.Method; + +/** + * @author mjz + * @date 2023/8/28 + */ +public class OrLiveChatReflectUtil extends ReflectUtil { + + public static Method getGetterMethod(Class<?> objectClass, String key) { + Method method; + if (key.startsWith("is")) { + method = ReflectUtil.getMethodByNameIgnoreCase(objectClass, key); + if (method == null) { + ReflectUtil.getMethodByNameIgnoreCase(objectClass, "get" + key); + } + } else { + method = ReflectUtil.getMethodByNameIgnoreCase(objectClass, "get" + key); + } + return method; + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLocalDateTimeUtil.java b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLocalDateTimeUtil.java new file mode 100644 index 0000000..b09cded --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/live-chat-client-commons-util/src/main/java/tech/ordinaryroad/live/chat/client/commons/util/OrLocalDateTimeUtil.java @@ -0,0 +1,54 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.commons.util; + +import cn.hutool.core.date.LocalDateTimeUtil; + +import java.time.ZoneId; +import java.time.ZonedDateTime; + +/** + * @author mjz + * @date 2023/9/7 + */ +public class OrLocalDateTimeUtil extends LocalDateTimeUtil { + + public static ZoneId ZONE_ID_CTT = ZoneId.of(ZoneId.SHORT_IDS.get("CTT")); + + /** + * 鑾峰彇涓浗鏍囧噯鏃堕棿鐨勫綋鍓嶆椂闂存埑锛堟绉掞級 + */ + public static long zonedCurrentTimeMillis() { + ZonedDateTime now = ZonedDateTime.now(ZONE_ID_CTT); + return now.toEpochSecond() * 1000 + now.getNano() / 1_000_000; + } + + /** + * 鑾峰彇涓浗鏍囧噯鏃堕棿鐨勫綋鍓嶆椂闂存埑锛堢锛� + */ + public static long zonedCurrentTimeSecs() { + return ZonedDateTime.now(ZONE_ID_CTT).toEpochSecond(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-commons/pom.xml b/ruoyi-modules/ruoyi-live/live-chat-client-commons/pom.xml new file mode 100644 index 0000000..3324cb8 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-commons/pom.xml @@ -0,0 +1,44 @@ +<!-- + ~ MIT License + ~ + ~ Copyright (c) 2023 OrdinaryRoad + ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy + ~ of this software and associated documentation files (the "Software"), to deal + ~ in the Software without restriction, including without limitation the rights + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + ~ copies of the Software, and to permit persons to whom the Software is + ~ furnished to do so, subject to the following conditions: + ~ + ~ The above copyright notice and this permission notice shall be included in all + ~ copies or substantial portions of the Software. + ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + ~ SOFTWARE. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.ruoyi</groupId> + <artifactId>ruoyi-live</artifactId> + <version>${revision}</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <packaging>pom</packaging> + + <artifactId>live-chat-client-commons</artifactId> + + <modules> + <module>live-chat-client-commons-base</module> + <module>live-chat-client-commons-util</module> + <module>live-chat-client-commons-client</module> + </modules> +</project> diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/pom.xml b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/pom.xml new file mode 100644 index 0000000..9ea335d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/pom.xml @@ -0,0 +1,55 @@ +<!-- + ~ MIT License + ~ + ~ Copyright (c) 2023 OrdinaryRoad + ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy + ~ of this software and associated documentation files (the "Software"), to deal + ~ in the Software without restriction, including without limitation the rights + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + ~ copies of the Software, and to permit persons to whom the Software is + ~ furnished to do so, subject to the following conditions: + ~ + ~ The above copyright notice and this permission notice shall be included in all + ~ copies or substantial portions of the Software. + ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + ~ SOFTWARE. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-servers</artifactId> + <version>${revision}</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <packaging>jar</packaging> + + <artifactId>live-chat-client-servers-netty-client</artifactId> + <name>live-chat-client-servers-netty</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-commons-client</artifactId> + </dependency> + + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-servers-netty</artifactId> + </dependency> + </dependencies> +</project> diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/base/BaseNettyClient.java b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/base/BaseNettyClient.java new file mode 100644 index 0000000..c342b5b --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/base/BaseNettyClient.java @@ -0,0 +1,349 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.client.base; + +import io.netty.bootstrap.Bootstrap; +import io.netty.channel.*; +import io.netty.channel.socket.SocketChannel; +import io.netty.channel.socket.nio.NioSocketChannel; +import io.netty.handler.codec.http.HttpClientCodec; +import io.netty.handler.codec.http.HttpObjectAggregator; +import io.netty.handler.ssl.SslContext; +import io.netty.handler.ssl.SslContextBuilder; +import io.netty.handler.stream.ChunkedWriteHandler; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.commons.client.BaseLiveChatClient; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; +import tech.ordinaryroad.live.chat.client.servers.netty.client.config.BaseNettyClientConfig; +import tech.ordinaryroad.live.chat.client.servers.netty.handler.base.BaseBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.servers.netty.handler.base.BaseConnectionHandler; + +import javax.net.ssl.SSLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.concurrent.TimeUnit; +import java.util.function.Consumer; + +/** + * @author mjz + * @date 2023/8/26 + */ +@Slf4j +public abstract class BaseNettyClient + <Config extends BaseNettyClientConfig, + CmdEnum extends Enum<CmdEnum>, + Msg extends IMsg, + MsgListener extends IBaseMsgListener<BinaryFrameHandler, CmdEnum>, + ConnectionHandler extends BaseConnectionHandler<ConnectionHandler>, + BinaryFrameHandler extends BaseBinaryFrameHandler<BinaryFrameHandler, CmdEnum, Msg, MsgListener> + > + extends BaseLiveChatClient<Config, MsgListener> { + + @Getter + private final EventLoopGroup workerGroup; + @Getter + private final Bootstrap bootstrap = new Bootstrap(); + private BinaryFrameHandler binaryFrameHandler; + private ConnectionHandler connectionHandler; + private IBaseConnectionListener<ConnectionHandler> connectionListener; + private Channel channel; + @Getter + private URI websocketUri; + protected IBaseConnectionListener<ConnectionHandler> clientConnectionListener; + /** + * 鎺у埗寮瑰箷鍙戦�侀鐜� + */ + private volatile long lastSendDanmuTimeInMillis; + + public abstract ConnectionHandler initConnectionHandler(IBaseConnectionListener<ConnectionHandler> clientConnectionListener); + + public abstract BinaryFrameHandler initBinaryFrameHandler(); + + protected BaseNettyClient(Config config, EventLoopGroup workerGroup, IBaseConnectionListener<ConnectionHandler> connectionListener) { + super(config); + this.workerGroup = workerGroup; + this.connectionListener = connectionListener; + } + + public void onConnected(ConnectionHandler connectionHandler) { + this.setStatus(ClientStatusEnums.CONNECTED); + if (this.connectionListener != null) { + this.connectionListener.onConnected(connectionHandler); + } + } + + public void onConnectFailed(ConnectionHandler connectionHandler) { + this.setStatus(ClientStatusEnums.CONNECT_FAILED); + tryReconnect(); + if (this.connectionListener != null) { + this.connectionListener.onConnectFailed(connectionHandler); + } + } + + public void onDisconnected(ConnectionHandler connectionHandler) { + this.setStatus(ClientStatusEnums.DISCONNECTED); + tryReconnect(); + if (this.connectionListener != null) { + this.connectionListener.onDisconnected(connectionHandler); + } + } + + @Override + public void init() { + if (checkStatus(ClientStatusEnums.INITIALIZED)) { + return; + } + try { + this.websocketUri = new URI(getWebSocketUriString()); + SslContext sslCtx = SslContextBuilder.forClient().build(); + + this.clientConnectionListener = new IBaseConnectionListener<ConnectionHandler>() { + @Override + public void onConnected(ConnectionHandler connectionHandler) { + BaseNettyClient.this.onConnected(connectionHandler); + } + + @Override + public void onConnectFailed(ConnectionHandler connectionHandler) { + BaseNettyClient.this.onConnectFailed(connectionHandler); + } + + @Override + public void onDisconnected(ConnectionHandler connectionHandler) { + BaseNettyClient.this.onDisconnected(connectionHandler); + } + }; + this.binaryFrameHandler = this.initBinaryFrameHandler(); + this.connectionHandler = this.initConnectionHandler(this.clientConnectionListener); + + this.bootstrap.group(this.workerGroup) + // 鍒涘缓Channel + .channel(NioSocketChannel.class) + .remoteAddress(this.websocketUri.getHost(), getInetPort()) + .option(ChannelOption.TCP_NODELAY, true) + .option(ChannelOption.SO_KEEPALIVE, true) + // Channel閰嶇疆 + .handler(new ChannelInitializer<SocketChannel>() { + @Override + protected void initChannel(SocketChannel ch) { + // 璐d换閾� + ChannelPipeline pipeline = ch.pipeline(); + + // 鏀惧埌绗竴浣� addFirst 鏀寔wss閾炬帴鏈嶅姟绔� + pipeline.addFirst(sslCtx.newHandler(ch.alloc(), BaseNettyClient.this.websocketUri.getHost(), getInetPort())); + + // 娣诲姞涓�涓猦ttp鐨勭紪瑙g爜鍣� + pipeline.addLast(new HttpClientCodec()); + // 娣诲姞涓�涓敤浜庢敮鎸佸ぇ鏁版嵁娴佺殑鏀寔 + pipeline.addLast(new ChunkedWriteHandler()); + // 娣诲姞涓�涓仛鍚堝櫒锛岃繖涓仛鍚堝櫒涓昏鏄皢HttpMessage鑱氬悎鎴怓ullHttpRequest/Response + pipeline.addLast(new HttpObjectAggregator(BaseNettyClient.this.getConfig().getAggregatorMaxContentLength())); + + // 杩炴帴澶勭悊鍣� + pipeline.addLast(BaseNettyClient.this.connectionHandler); + // 寮瑰箷澶勭悊鍣� + pipeline.addLast(BaseNettyClient.this.binaryFrameHandler); + } + }); + this.setStatus(ClientStatusEnums.INITIALIZED); + } catch (URISyntaxException e) { + throw new BaseException(e); + } catch (SSLException e) { + throw new BaseException(e); + } + } + + private int getInetPort() { + int port = this.websocketUri.getPort(); + return port == -1 ? "wss".equalsIgnoreCase(websocketUri.getScheme()) ? 443 : 80 : port; + } + + @Override + public void connect(Runnable success, Consumer<Throwable> failed) { + if (this.cancelReconnect) { + this.cancelReconnect = false; + } + if (!checkStatus(ClientStatusEnums.INITIALIZED)) { + return; + } + if (getStatus() == ClientStatusEnums.CONNECTED) { + return; + } + if (getStatus() != ClientStatusEnums.RECONNECTING) { + this.setStatus(ClientStatusEnums.CONNECTING); + } + this.bootstrap.connect().addListener((ChannelFutureListener) connectFuture -> { + if (connectFuture.isSuccess()) { + if (log.isDebugEnabled()) { + log.debug("杩炴帴寤虹珛鎴愬姛锛�"); + } + this.channel = connectFuture.channel(); + // 鐩戝惉鏄惁鎻℃墜鎴愬姛 + this.connectionHandler.getHandshakeFuture().addListener((ChannelFutureListener) handshakeFuture -> { + try { + connectionHandler.sendAuthRequest(channel); + if (success != null) { + success.run(); + } + } catch (Exception e) { + log.error("璁よ瘉鍖呭彂閫佸け璐ワ紝鏂紑杩炴帴", e); + this.disconnect(); + } + }); + } else { + log.error("杩炴帴寤虹珛澶辫触", connectFuture.cause()); + this.onConnectFailed(this.connectionHandler); + if (failed != null) { + failed.accept(connectFuture.cause()); + } + } + }); + } + + @Override + public void disconnect() { + if (this.channel == null) { + return; + } + this.channel.close(); + } + + @Override + protected void tryReconnect() { + if (this.cancelReconnect) { + this.cancelReconnect = false; + return; + } + if (!getConfig().isAutoReconnect()) { + return; + } + if (log.isWarnEnabled()) { + log.warn("{}s鍚庡皢閲嶆柊杩炴帴 {}", getConfig().getReconnectDelay(), getConfig().getRoomId()); + } + workerGroup.schedule(() -> { + this.setStatus(ClientStatusEnums.RECONNECTING); + this.connect(); + }, getConfig().getReconnectDelay(), TimeUnit.SECONDS); + } + + @Override + public void send(Object msg, Runnable success, Consumer<Throwable> failed) { + ChannelFuture future = this.channel.writeAndFlush(msg); + if (success != null || failed != null) { + future.addListener((ChannelFutureListener) channelFuture -> { + if (channelFuture.isSuccess()) { + if (success != null) { + success.run(); + } + } else { + if (failed != null) { + failed.accept(channelFuture.cause()); + } + } + }); + } + } + + @Override + public void destroy() { + super.destroy(); + + // 閿�姣佹椂涓嶉渶瑕侀噸杩� + this.cancelReconnect = true; + workerGroup.shutdownGracefully().addListener(future -> { + if (future.isSuccess()) { + this.setStatus(ClientStatusEnums.DESTROYED); + } else { + throw new BaseException("client閿�姣佸け璐�", future.cause()); + } + }); + } + + @Override + protected String getWebSocketUriString() { + return getConfig().getWebsocketUri(); + } + + @Override + protected void setStatus(ClientStatusEnums status) { + if (log.isDebugEnabled()) { + if (getStatus() != status) { + log.debug("{} 鐘舵�佸彉鍖� {} => {}\n", getClass().getSimpleName(), getStatus(), status); + } + } + super.setStatus(status); + } + + @Override + public void sendDanmu(Object danmu, Runnable success, Consumer<Throwable> failed) { + throw new BaseException("鏆傛湭鏀寔璇ュ姛鑳�"); + } + + @Override + public void clickLike(int count, Runnable success, Consumer<Throwable> failed) { + throw new BaseException("鏆傛湭鏀寔璇ュ姛鑳�"); + } + + /** + * 鍙戦�佸脊骞曞墠鍒ゆ柇鏄惁鍙互鍙戦�� + * + * @param checkConnected 鏄惁妫�鏌lient杩炴帴鐘舵�� + */ + protected boolean checkCanSendDanmu(boolean checkConnected) { + if (checkConnected && getStatus() != ClientStatusEnums.CONNECTED) { + throw new BaseException("杩炴帴鏈缓绔嬶紝鏃犳硶鍙戦�佸脊骞�"); + } + if (System.currentTimeMillis() - this.lastSendDanmuTimeInMillis <= getConfig().getMinSendDanmuPeriod()) { + if (log.isWarnEnabled()) { + log.warn("鍙戦�佸脊骞曢鐜囪繃蹇紝蹇界暐璇ユ鍙戦��"); + } + return false; + } + return true; + } + + protected boolean checkCanSendDanmu() { + return checkCanSendDanmu(true); + } + + /** + * 鍙戦�佸脊骞曞悗璋冪敤璇ユ柟娉� + */ + protected void finishSendDanmu() { + this.lastSendDanmuTimeInMillis = System.currentTimeMillis(); + if (log.isDebugEnabled()) { + log.debug("寮瑰箷鍙戦�佸畬鎴�"); + } + } + + public void iteratorMsgListeners(Consumer<MsgListener> consumer) { + binaryFrameHandler.iteratorMsgListeners(consumer); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/config/BaseNettyClientConfig.java b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/config/BaseNettyClientConfig.java new file mode 100644 index 0000000..c0ebf52 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/config/BaseNettyClientConfig.java @@ -0,0 +1,65 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.client.config; + +import io.netty.handler.codec.http.HttpHeaders; +import io.netty.handler.codec.http.HttpObjectAggregator; +import io.netty.handler.codec.http.websocketx.WebSocketClientHandshakerFactory; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import tech.ordinaryroad.live.chat.client.commons.client.config.BaseLiveChatClientConfig; + +import java.net.URI; + +/** + * @author mjz + * @date 2023/8/26 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@SuperBuilder(toBuilder = true) +public abstract class BaseNettyClientConfig extends BaseLiveChatClientConfig { + + /** + * 鑱氬悎鍣ㄥ厑璁哥殑鏈�澶ф秷鎭綋闀垮害锛岄粯璁� 64*1024 byte + * + * @see HttpObjectAggregator#HttpObjectAggregator(int) + */ + @Builder.Default + private int aggregatorMaxContentLength = 64 * 1024; + + /** + * WebSocketClientHandshaker鏈�澶ф秷鎭綋闀垮害锛岄粯璁� 64*1024 byte + * + * @see WebSocketClientHandshakerFactory#newHandshaker(URI, WebSocketVersion, String, boolean, HttpHeaders, int) + */ + @Builder.Default + private int maxFramePayloadLength = 64 * 1024; +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientBinaryFrameHandler.java b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientBinaryFrameHandler.java new file mode 100644 index 0000000..278ce3f --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientBinaryFrameHandler.java @@ -0,0 +1,66 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.client.handler; + +import lombok.Getter; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; +import tech.ordinaryroad.live.chat.client.servers.netty.handler.base.BaseBinaryFrameHandler; + +import java.util.List; + +/** + * BaseClientBinaryFrameHandler + * + * @author mjz + * @date 2023/8/30 + */ +public abstract class BaseNettyClientBinaryFrameHandler< + Client extends BaseNettyClient<?, ?, ?, ?, ?, ?>, + BinaryFrameHandler extends BaseBinaryFrameHandler<BinaryFrameHandler, CmdEnum, Msg, MsgListener>, + CmdEnum extends Enum<CmdEnum>, + Msg extends IMsg, + MsgListener extends IBaseMsgListener<BinaryFrameHandler, CmdEnum>> + extends BaseBinaryFrameHandler<BinaryFrameHandler, CmdEnum, Msg, MsgListener> { + + @Getter + protected final Client client; + + public BaseNettyClientBinaryFrameHandler(List<MsgListener> msgListeners, Client client, long roomId) { + super(msgListeners, roomId); + this.client = client; + } + + public BaseNettyClientBinaryFrameHandler(List<MsgListener> msgListeners, Client client) { + super(msgListeners, client.getConfig().getRoomId()); + this.client = client; + } + + public BaseNettyClientBinaryFrameHandler(List<MsgListener> msgListeners, long roomId) { + super(msgListeners, roomId); + this.client = null; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientConnectionHandler.java b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientConnectionHandler.java new file mode 100644 index 0000000..a9903f1 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty-client/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/client/handler/BaseNettyClientConnectionHandler.java @@ -0,0 +1,65 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.client.handler; + +import io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker; +import lombok.Getter; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; +import tech.ordinaryroad.live.chat.client.servers.netty.handler.base.BaseConnectionHandler; + +/** + * BaseClientConnectionHandler + * + * @author mjz + * @date 2023/8/27 + */ +public abstract class BaseNettyClientConnectionHandler< + Client extends BaseNettyClient<?, ?, ?, ?, ?, ?>, + ConnectionHandler extends BaseConnectionHandler<ConnectionHandler>> + extends BaseConnectionHandler<ConnectionHandler> { + + @Getter + protected final Client client; + + public BaseNettyClientConnectionHandler(WebSocketClientHandshaker handshaker, Client client, IBaseConnectionListener<ConnectionHandler> listener) { + super(handshaker, listener); + this.client = client; + } + + public BaseNettyClientConnectionHandler(WebSocketClientHandshaker handshaker, Client client) { + this(handshaker, client, null); + } + + public BaseNettyClientConnectionHandler(WebSocketClientHandshaker handshaker, IBaseConnectionListener<ConnectionHandler> listener) { + super(handshaker, listener); + this.client = null; + } + + public BaseNettyClientConnectionHandler(WebSocketClientHandshaker handshaker, long roomId) { + super(handshaker, null); + this.client = null; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty/pom.xml b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty/pom.xml new file mode 100644 index 0000000..1e4259a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty/pom.xml @@ -0,0 +1,59 @@ +<!-- + ~ MIT License + ~ + ~ Copyright (c) 2023 OrdinaryRoad + ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy + ~ of this software and associated documentation files (the "Software"), to deal + ~ in the Software without restriction, including without limitation the rights + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + ~ copies of the Software, and to permit persons to whom the Software is + ~ furnished to do so, subject to the following conditions: + ~ + ~ The above copyright notice and this permission notice shall be included in all + ~ copies or substantial portions of the Software. + ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + ~ SOFTWARE. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-servers</artifactId> + <version>${revision}</version> + <relativePath>../pom.xml</relativePath> + </parent> + <packaging>jar</packaging> + + <artifactId>live-chat-client-servers-netty</artifactId> + <name>live-chat-client-servers-netty</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-commons-base</artifactId> + </dependency> + + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-all</artifactId> + </dependency> + + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + </dependency> + </dependencies> +</project> diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/frame/base/BaseBinaryWebSocketFrame.java b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/frame/base/BaseBinaryWebSocketFrame.java new file mode 100644 index 0000000..984960a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/frame/base/BaseBinaryWebSocketFrame.java @@ -0,0 +1,39 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.frame.base; + +import io.netty.buffer.ByteBuf; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; + +/** + * @author mjz + * @date 2023/1/5 + */ +public abstract class BaseBinaryWebSocketFrame extends BinaryWebSocketFrame { + + public BaseBinaryWebSocketFrame(ByteBuf byteBuf) { + super(byteBuf); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/BaseBinaryFrameHandler.java b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/BaseBinaryFrameHandler.java new file mode 100644 index 0000000..c7a683f --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/BaseBinaryFrameHandler.java @@ -0,0 +1,184 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.handler.base; + +import com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException; +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.SimpleChannelInboundHandler; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.msg.BaseCmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.BaseMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +import java.util.List; +import java.util.function.Consumer; + + +/** + * 娑堟伅澶勭悊鍣� + * + * @author mjz + * @date 2023/1/4 + */ +@Slf4j +public abstract class BaseBinaryFrameHandler< + T extends BaseBinaryFrameHandler<?, ?, ?, ?>, + CmdEnum extends Enum<CmdEnum>, + Msg extends IMsg, + MsgListener extends IBaseMsgListener<T, CmdEnum> + > extends SimpleChannelInboundHandler<BinaryWebSocketFrame> + implements IBaseMsgListener<T, CmdEnum> { + + @Getter + private final Object roomId; + protected final List<MsgListener> msgListeners; + + public BaseBinaryFrameHandler(List<MsgListener> msgListeners, Object roomId) { + this.msgListeners = msgListeners; + this.roomId = roomId; + if (this.msgListeners == null || this.msgListeners.isEmpty()) { + if (log.isDebugEnabled()) { + log.debug("listener not set"); + } + } + } + + /** + * 瑙g爜鏀跺埌鐨勪簩杩涘埗娴� + * + * @param byteBuf ByteBuf + * @return List<Msg> + */ + protected abstract List<Msg> decode(ByteBuf byteBuf); + + @SuppressWarnings("unchecked") + protected void channelRead0(ChannelHandlerContext ctx, BinaryWebSocketFrame message) { + ByteBuf byteBuf = message.content(); + List<Msg> msgList = this.decode(byteBuf); + if (msgList == null || msgList.isEmpty()) { + if (log.isDebugEnabled()) { + log.debug("msgList is empty"); + } + return; + } + for (Msg msg : msgList) { + this.onMsg((T) BaseBinaryFrameHandler.this, msg); + if (msg instanceof ICmdMsg<?>) { + ICmdMsg<?> cmdMsg = (ICmdMsg<?>) msg; + Enum<?> cmdEnum = cmdMsg.getCmdEnum(); + if (cmdEnum == null) { + this.onUnknownCmd((T) BaseBinaryFrameHandler.this, cmdMsg.getCmd(), cmdMsg); + } else { + this.onCmdMsg((T) BaseBinaryFrameHandler.this, (CmdEnum) cmdEnum, (ICmdMsg<CmdEnum>) cmdMsg); + } + } + if (msg instanceof BaseCmdMsg<?>) { + BaseCmdMsg<?> cmdMsg = (BaseCmdMsg<?>) msg; + Enum<?> cmdEnum = cmdMsg.getCmdEnum(); + if (cmdEnum == null) { + this.onUnknownCmd((T) BaseBinaryFrameHandler.this, cmdMsg.getCmd(), cmdMsg); + } else { + this.onCmdMsg((T) BaseBinaryFrameHandler.this, (CmdEnum) cmdEnum, (BaseCmdMsg<CmdEnum>) cmdMsg); + } + } + } + } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { + if (cause.getCause() instanceof UnrecognizedPropertyException) { + log.error("缂哄皯瀛楁锛歿}", cause.getMessage()); + } else { + super.exceptionCaught(ctx, cause); + } + } + + @Override + public void onMsg(T t, IMsg msg) { + IBaseMsgListener.super.onMsg(t, msg); + iteratorMsgListeners(msgListener -> msgListener.onMsg(t, msg)); + } + + /** + * 閲嶅啓璇ユ柟娉曪紝鍒ゆ柇CMD锛屾垨鑰呰皟鐢▄@link IBaseMsgListener#onOtherCmdMsg(Object, Enum, ICmdMsg)} + * + * @param t BaseBinaryFrameHandler + * @param cmd CmdEnum + * @param cmdMsg BaseMsg + */ + @Override + public void onCmdMsg(T t, CmdEnum cmd, ICmdMsg<CmdEnum> cmdMsg) { + IBaseMsgListener.super.onCmdMsg(t, cmd, cmdMsg); + iteratorMsgListeners(msgListener -> msgListener.onCmdMsg(t, cmd, cmdMsg)); + } + + @Override + public void onUnknownCmd(T t, String cmdString, IMsg msg) { + IBaseMsgListener.super.onUnknownCmd(t, cmdString, msg); + iteratorMsgListeners(msgListener -> msgListener.onUnknownCmd(t, cmdString, msg)); + } + + @SuppressWarnings("ForLoopReplaceableByForEach") + public void iteratorMsgListeners(Consumer<MsgListener> consumer) { + if (msgListeners.isEmpty()) { + return; + } + for (int i = 0; i < msgListeners.size(); i++) { + consumer.accept(msgListeners.get(i)); + } + } + + @Override + public void onCmdMsg(T t, CmdEnum cmd, BaseCmdMsg<CmdEnum> cmdMsg) { + IBaseMsgListener.super.onCmdMsg(t, cmd, cmdMsg); + iteratorMsgListeners(msgListener -> msgListener.onCmdMsg(t, cmd, cmdMsg)); + } + + @Override + public void onUnknownCmd(T t, String cmdString, BaseMsg msg) { + IBaseMsgListener.super.onUnknownCmd(t, cmdString, msg); + iteratorMsgListeners(msgListener -> msgListener.onUnknownCmd(t, cmdString, msg)); + } + + public String getRoomIdAsString() { + if (this.roomId == null) { + return ""; + } + return this.roomId.toString(); + } + + public long getRoomIdAsLong() { + String roomIdAsString = this.getRoomIdAsString(); + if (roomIdAsString.trim().isEmpty()) { + return 0L; + } + return Long.parseLong(roomIdAsString); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/BaseConnectionHandler.java b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/BaseConnectionHandler.java new file mode 100644 index 0000000..724dca4 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-servers/live-chat-client-servers-netty/src/main/java/tech/ordinaryroad/live/chat/client/servers/netty/handler/base/BaseConnectionHandler.java @@ -0,0 +1,168 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.servers.netty.handler.base; + +import io.netty.channel.Channel; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelPromise; +import io.netty.channel.SimpleChannelInboundHandler; +import io.netty.handler.codec.http.FullHttpResponse; +import io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker; +import io.netty.handler.codec.http.websocketx.WebSocketHandshakeException; +import io.netty.handler.ssl.SslCloseCompletionEvent; +import io.netty.handler.ssl.SslHandshakeCompletionEvent; +import io.netty.util.concurrent.ScheduledFuture; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; + +import java.util.concurrent.TimeUnit; + + +/** + * 杩炴帴澶勭悊鍣� + * + * @author mjz + * @date 2023/8/21 + */ +@Slf4j +public abstract class BaseConnectionHandler<ConnectionHandler extends BaseConnectionHandler<?>> extends SimpleChannelInboundHandler<FullHttpResponse> { + + private final WebSocketClientHandshaker handshaker; + @Getter + private ChannelPromise handshakeFuture; + private final IBaseConnectionListener<ConnectionHandler> listener; + /** + * 瀹㈡埛绔彂閫佸績璺冲寘 + */ + private ScheduledFuture<?> scheduledFuture = null; + + public BaseConnectionHandler(WebSocketClientHandshaker handshaker, IBaseConnectionListener<ConnectionHandler> listener) { + this.handshaker = handshaker; + this.listener = listener; + } + + public BaseConnectionHandler(WebSocketClientHandshaker handshaker) { + this(handshaker, null); + } + + + @Override + public void handlerAdded(ChannelHandlerContext ctx) { + this.handshakeFuture = ctx.newPromise(); + } + + @Override + public void channelActive(ChannelHandlerContext ctx) { + this.handshaker.handshake(ctx.channel()); + } + + protected void channelRead0(ChannelHandlerContext ctx, FullHttpResponse msg) throws Exception { + // 鍒ゆ柇鏄惁姝g‘鎻℃墜 + if (this.handshaker.isHandshakeComplete()) { + handshakeSuccessfully(ctx, msg); + } else { + try { + handshakeSuccessfully(ctx, msg); + } catch (WebSocketHandshakeException e) { + handshakeFailed(msg, e); + } + } + } + + @Override + public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { + if (log.isDebugEnabled()) { + log.debug("userEventTriggered {}", evt.getClass()); + } + if (evt instanceof SslHandshakeCompletionEvent) { + heartbeatCancel(); + heartbeatStart(ctx); + if (this.listener != null) { + listener.onConnected((ConnectionHandler) BaseConnectionHandler.this); + } + } else if (evt instanceof SslCloseCompletionEvent) { + heartbeatCancel(); + if (this.listener != null) { + listener.onDisconnected((ConnectionHandler) BaseConnectionHandler.this); + } + } else { + log.error("寰呭鐞� {}", evt.getClass()); + } + super.userEventTriggered(ctx, evt); + } + + /** + * 寮�濮嬪彂閫佸績璺冲寘 + */ + private void heartbeatStart(ChannelHandlerContext ctx) { + scheduledFuture = ctx.executor().scheduleAtFixedRate(() -> { + sendHeartbeat(ctx); + }, getHeartbeatInitialDelay(), getHeartbeatPeriod(), TimeUnit.SECONDS); + } + + /** + * 鍙栨秷鍙戦�佸績璺冲寘 + */ + private void heartbeatCancel() { + if (null != scheduledFuture && !scheduledFuture.isCancelled()) { + scheduledFuture.cancel(true); + scheduledFuture = null; + } + } + + protected abstract void sendHeartbeat(ChannelHandlerContext ctx); + + public abstract void sendAuthRequest(Channel channel); + + protected abstract long getHeartbeatPeriod(); + + protected abstract long getHeartbeatInitialDelay(); + + private void handshakeSuccessfully(ChannelHandlerContext ctx, FullHttpResponse msg) { + if (log.isDebugEnabled()) { + log.debug("鎻℃墜瀹屾垚!"); + } + this.handshaker.finishHandshake(ctx.channel(), msg); + this.handshakeFuture.setSuccess(); + } + + private void handshakeFailed(FullHttpResponse msg, WebSocketHandshakeException e) { + log.error("鎻℃墜澶辫触锛乻tatus:" + msg.status(), e); + this.handshakeFuture.setFailure(e); + if (listener != null) { + this.listener.onConnectFailed((ConnectionHandler) this); + } + } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { + log.error("exceptionCaught", cause); + if (!this.handshakeFuture.isDone()) { + this.handshakeFuture.setFailure(cause); + } + ctx.close(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-client-servers/pom.xml b/ruoyi-modules/ruoyi-live/live-chat-client-servers/pom.xml new file mode 100644 index 0000000..eb12c8a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-client-servers/pom.xml @@ -0,0 +1,47 @@ +<!-- + ~ MIT License + ~ + ~ Copyright (c) 2023 OrdinaryRoad + ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy + ~ of this software and associated documentation files (the "Software"), to deal + ~ in the Software without restriction, including without limitation the rights + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + ~ copies of the Software, and to permit persons to whom the Software is + ~ furnished to do so, subject to the following conditions: + ~ + ~ The above copyright notice and this permission notice shall be included in all + ~ copies or substantial portions of the Software. + ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + ~ SOFTWARE. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.ruoyi</groupId> + <artifactId>ruoyi-live</artifactId> + <version>${revision}</version> + <relativePath>../pom.xml</relativePath> + </parent> + <packaging>pom</packaging> + + <artifactId>live-chat-client-servers</artifactId> + <name>live-chat-client-servers</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <modules> + <module>live-chat-client-servers-netty</module> + <module>live-chat-client-servers-netty-client</module> + </modules> +</project> diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/pom.xml b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/pom.xml new file mode 100644 index 0000000..dcd4706 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/pom.xml @@ -0,0 +1,71 @@ +<!-- + ~ MIT License + ~ + ~ Copyright (c) 2023 OrdinaryRoad + ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy + ~ of this software and associated documentation files (the "Software"), to deal + ~ in the Software without restriction, including without limitation the rights + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + ~ copies of the Software, and to permit persons to whom the Software is + ~ furnished to do so, subject to the following conditions: + ~ + ~ The above copyright notice and this permission notice shall be included in all + ~ copies or substantial portions of the Software. + ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + ~ SOFTWARE. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-clients</artifactId> + <version>${revision}</version> + <relativePath>../pom.xml</relativePath> + </parent> + <packaging>jar</packaging> + + <artifactId>live-chat-client-bilibili</artifactId> + <name>live-chat-client-bilibili</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-servers-netty-client</artifactId> + </dependency> + + <dependency> + <groupId>com.aayushatharva.brotli4j</groupId> + <artifactId>brotli4j</artifactId> + </dependency> + + <dependency> + <groupId>com.google.protobuf</groupId> + <artifactId>protobuf-java-util</artifactId> + </dependency> + + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + </dependency> + + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter</artifactId> + <version>${junit-jupiter.version}</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/api/BilibiliApis.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/api/BilibiliApis.java new file mode 100644 index 0000000..5fd081e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/api/BilibiliApis.java @@ -0,0 +1,247 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.api; + +import cn.hutool.cache.impl.TimedCache; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.thread.ThreadUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpRequest; +import cn.hutool.http.HttpResponse; +import cn.hutool.http.HttpUtil; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.*; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.bilibili.api.request.BilibiliLikeReportV3Request; +import tech.ordinaryroad.live.chat.client.bilibili.api.request.BilibiliSendMsgRequest; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatCookieUtil; + +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +import static tech.ordinaryroad.live.chat.client.commons.base.msg.BaseMsg.OBJECT_MAPPER; + +/** + * B绔橝PI绠�鏄撶増 + * + * @author mjz + * @date 2023/5/5 + */ +@Slf4j +public class BilibiliApis { + + public static final TimedCache<Long, String> GIFT_IMG_CACHE = new TimedCache<>(TimeUnit.DAYS.toMillis(1)); + public static final String KEY_COOKIE_CSRF = "bili_jct"; + public static final String KEY_UID = "DedeUserID"; + + @SneakyThrows + public static RoomInitResult roomInit(long roomId, String cookie) { + @Cleanup + HttpResponse response = createGetRequest("https://api.live.bilibili.com/room/v1/Room/room_init?id=" + roomId, cookie).execute(); + JsonNode dataJsonNode = responseInterceptor(response.body()); + return OBJECT_MAPPER.readValue(dataJsonNode.toString(), RoomInitResult.class); + } + + public static JsonNode roomGiftConfig(long roomId, String cookie) { + @Cleanup + HttpResponse response = createGetRequest("https://api.live.bilibili.com/xlive/web-room/v1/giftPanel/roomGiftConfig?platform=pc&source=live&build=0&global_version=0&room_id=" + roomId, cookie).execute(); + return responseInterceptor(response.body()); + } + + /** + * @param roomId + * @param type 鐩存挱闂寸敤0 + * @return <pre>{@code + * { + * "group": "live", + * "business_id": 0, + * "refresh_row_factor": 0.125, + * "refresh_rate": 100, + * "max_delay": 5000, + * "token": "-wm5-Qo4BBAztd1qp5ZJpgyTMRBhCc7yikz5d9rAd63PV46G9BMwl0R10kMM8Ilb-UieZGjLtipPrz4Cvi0DdhGFwOi8PJpFN9K-LoXh6Z_4yjEIwgRerDiMIstHzJ80J3B7wnRisAYkWA==", + * "host_list": [{ + * "host": "ali-bj-live-comet-09.chat.bilibili.com", + * "port": 2243, + * "wss_port": 443, + * "ws_port": 2244 + * }, { + * "host": "ali-gz-live-comet-02.chat.bilibili.com", + * "port": 2243, + * "wss_port": 443, + * "ws_port": 2244 + * }, { + * "host": "broadcastlv.chat.bilibili.com", + * "port": 2243, + * "wss_port": 443, + * "ws_port": 2244 + * }] + * } + * }</pre> + */ + public static JsonNode getDanmuInfo(long roomId, int type, String cookie) { + @Cleanup + HttpResponse response = createGetRequest("https://api.live.bilibili.com/xlive/web-room/v1/index/getDanmuInfo?id=" + roomId + "&type=" + type, cookie).execute(); + return responseInterceptor(response.body()); + } + + public static String getGiftImgById(long giftId, long roomId) { + if (!GIFT_IMG_CACHE.containsKey(giftId)) { + ThreadUtil.execAsync(() -> { + updateGiftImgCache(roomId, null); + }); + } + + return GIFT_IMG_CACHE.get(giftId); + } + + /** + * 鏇存柊绀肩墿鍥剧墖缂撳瓨 + */ + public static void updateGiftImgCache(long roomId, String cookie) { + JsonNode jsonNode = roomGiftConfig(roomId, cookie); + for (JsonNode node : jsonNode.get("global_gift").get("list")) { + long giftId = node.get("id").asLong(); + String giftImgUrl = node.get("webp").asText(); + GIFT_IMG_CACHE.put(giftId, giftImgUrl); + } + } + + /** + * 鍙戦�佸脊骞� + * + * @param request {@link BilibiliSendMsgRequest} + * @param cookie Cookie + */ + public static void sendMsg(BilibiliSendMsgRequest request, String cookie) { + if (StrUtil.isBlank(cookie)) { + throw new BaseException("鍙戦�佸脊骞曟帴鍙ookie涓嶈兘涓虹┖"); + } + Map<String, Object> stringObjectMap = BeanUtil.beanToMap(request); + @Cleanup HttpResponse execute = HttpUtil.createPost("https://api.live.bilibili.com/msg/send") + .cookie(cookie) + .form(stringObjectMap) + .execute(); + responseInterceptor(execute.body()); + } + + /** + * 鍙戦�佸脊骞� + * + * @param msg 鍐呭 + * @param realRoomId 鐪熷疄鎴块棿id + * @param cookie Cookie + */ + public static void sendMsg(String msg, long realRoomId, String cookie) { + String biliJct = OrLiveChatCookieUtil.getCookieByName(cookie, KEY_COOKIE_CSRF, () -> { + throw new BaseException("cookie涓己灏戝弬鏁�" + KEY_COOKIE_CSRF); + }); + BilibiliSendMsgRequest request = new BilibiliSendMsgRequest(msg, StrUtil.toString(ZonedDateTime.now(ZoneId.of("Asia/Shanghai")).toEpochSecond()), realRoomId, biliJct, biliJct); + sendMsg(request, cookie); + } + + /** + * 涓轰富鎾偣璧� + * + * @param request {@link BilibiliLikeReportV3Request} + * @param cookie Cookie + */ + public static void likeReportV3(BilibiliLikeReportV3Request request, String cookie) { + if (StrUtil.isBlank(cookie)) { + throw new BaseException("涓轰富鎾偣璧炴帴鍙ookie涓嶈兘涓虹┖"); + } + Map<String, Object> stringObjectMap = BeanUtil.beanToMap(request); + @Cleanup HttpResponse execute = HttpUtil.createPost("https://api.live.bilibili.com/xlive/app-ucenter/v1/like_info_v3/like/likeReportV3") + .cookie(cookie) + .form(stringObjectMap) + .execute(); + responseInterceptor(execute.body()); + } + + /** + * 涓轰富鎾偣璧� + * + * @param anchor_id 涓绘挱Uid {@link RoomInitResult#uid} + * @param realRoomId 鐪熷疄鎴块棿Id {@link RoomInitResult#room_id} + * @param cookie Cookie + */ + public static void likeReportV3(long anchor_id, long realRoomId, String cookie) { + String uid = OrLiveChatCookieUtil.getCookieByName(cookie, KEY_UID, () -> { + throw new BaseException("cookie涓己灏戝弬鏁�" + KEY_UID); + }); + String biliJct = OrLiveChatCookieUtil.getCookieByName(cookie, KEY_COOKIE_CSRF, () -> { + throw new BaseException("cookie涓己灏戝弬鏁�" + KEY_COOKIE_CSRF); + }); + BilibiliLikeReportV3Request request = new BilibiliLikeReportV3Request(realRoomId, uid, anchor_id, biliJct, biliJct); + likeReportV3(request, cookie); + } + + public static HttpRequest createGetRequest(String url, String cookies) { + return HttpUtil.createGet(url) + .cookie(cookies); + } + + private static JsonNode responseInterceptor(String responseString) { + try { + JsonNode jsonNode = OBJECT_MAPPER.readTree(responseString); + int code = jsonNode.get("code").asInt(); + if (code == 0) { + // 鎴愬姛 + return jsonNode.get("data"); + } else { + throw new BaseException(jsonNode.get("message").asText()); + } + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } + + @Data + @AllArgsConstructor + @NoArgsConstructor + @Builder + public static class RoomInitResult { + private long room_id; + private int short_id; + private long uid; + private int need_p2p; + private boolean is_hidden; + private boolean is_locked; + private boolean is_portrait; + private int live_status; + private int hidden_till; + private int lock_till; + private boolean encrypted; + private boolean pwd_verified; + private long live_time; + private int room_shield; + private int is_sp; + private int special_type; + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/api/request/BilibiliLikeReportV3Request.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/api/request/BilibiliLikeReportV3Request.java new file mode 100644 index 0000000..5979d89 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/api/request/BilibiliLikeReportV3Request.java @@ -0,0 +1,74 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.api.request; + +import cn.hutool.core.util.StrUtil; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author mjz + * @date 2024/1/31 + */ +@Data +@NoArgsConstructor +public class BilibiliLikeReportV3Request { + /** + * 鏈鐐硅禐娆℃暟 + */ + private int click_time = 1; + /** + * 鎴块棿鐪熷疄ID + */ + private long room_id; + /** + * Cookie涓殑DedeUserID + */ + private String uid; + /** + * RoomInitResult涓殑uid + */ + private long anchor_id; + /** + * Cookie涓殑bili_jct + */ + private String csrf; + /** + * Cookie涓殑bili_jct + */ + private String csrf_token; + /** + * 鏆傛椂鐣欑┖ + */ + private String visit_id = StrUtil.EMPTY; + + public BilibiliLikeReportV3Request(long room_id, String uid, long anchor_id, String csrf, String csrf_token) { + this.room_id = room_id; + this.uid = uid; + this.anchor_id = anchor_id; + this.csrf = csrf; + this.csrf_token = csrf_token; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/api/request/BilibiliSendMsgRequest.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/api/request/BilibiliSendMsgRequest.java new file mode 100644 index 0000000..eca8d7b --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/api/request/BilibiliSendMsgRequest.java @@ -0,0 +1,77 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.api.request; + +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author mjz + * @date 2023/9/7 + */ +@Data +@NoArgsConstructor +public class BilibiliSendMsgRequest { + private String bubble = "0"; + /** + * 寮瑰箷鍐呭 + */ + private String msg; + /** + * 寮瑰箷棰滆壊 + */ + private String color = "16777215"; + private String mode = "1"; + private String room_type = "0"; + private String jumpfrom = "0"; + /** + * 瀛椾綋澶у皬 + */ + private String fontsize = "25"; + /** + * 鏃堕棿鎴筹紙绉掞級 + */ + private String rnd; + /** + * 鎴块棿鐪熷疄ID + */ + private long roomid; + /** + * Cookie涓殑bili_jct + */ + private String csrf; + /** + * Cookie涓殑bili_jct + */ + private String csrf_token; + + public BilibiliSendMsgRequest(String msg, String rnd, long roomid, String csrf, String csrf_token) { + this.msg = msg; + this.rnd = rnd; + this.roomid = roomid; + this.csrf = csrf; + this.csrf_token = csrf_token; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/client/BilibiliLiveChatClient.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/client/BilibiliLiveChatClient.java new file mode 100644 index 0000000..6bca387 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/client/BilibiliLiveChatClient.java @@ -0,0 +1,184 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.client; + +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.handler.codec.http.DefaultHttpHeaders; +import io.netty.handler.codec.http.websocketx.WebSocketClientHandshakerFactory; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.bilibili.api.BilibiliApis; +import tech.ordinaryroad.live.chat.client.bilibili.config.BilibiliLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.bilibili.constant.BilibiliCmdEnum; +import tech.ordinaryroad.live.chat.client.bilibili.listener.IBilibiliConnectionListener; +import tech.ordinaryroad.live.chat.client.bilibili.listener.IBilibiliMsgListener; +import tech.ordinaryroad.live.chat.client.bilibili.msg.base.IBilibiliMsg; +import tech.ordinaryroad.live.chat.client.bilibili.netty.handler.BilibiliBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.bilibili.netty.handler.BilibiliConnectionHandler; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; + +import java.util.List; +import java.util.function.Consumer; + +/** + * B绔欑洿鎾棿寮瑰箷瀹㈡埛绔� + * + * @author mjz + * @date 2023/8/20 + */ +@Slf4j +public class BilibiliLiveChatClient extends BaseNettyClient< + BilibiliLiveChatClientConfig, + BilibiliCmdEnum, + IBilibiliMsg, + IBilibiliMsgListener, + BilibiliConnectionHandler, + BilibiliBinaryFrameHandler + > { + + private BilibiliApis.RoomInitResult roomInitResult = new BilibiliApis.RoomInitResult(); + + public BilibiliLiveChatClient(BilibiliLiveChatClientConfig config, List<IBilibiliMsgListener> msgListeners, IBilibiliConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListeners(msgListeners); + + // 鍒濆鍖� + this.init(); + } + + public BilibiliLiveChatClient(BilibiliLiveChatClientConfig config, IBilibiliMsgListener msgListener, IBilibiliConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListener(msgListener); + + // 鍒濆鍖� + this.init(); + } + + public BilibiliLiveChatClient(BilibiliLiveChatClientConfig config, IBilibiliMsgListener msgListener, IBilibiliConnectionListener connectionListener) { + this(config, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public BilibiliLiveChatClient(BilibiliLiveChatClientConfig config, IBilibiliMsgListener msgListener) { + this(config, msgListener, null, new NioEventLoopGroup()); + } + + public BilibiliLiveChatClient(BilibiliLiveChatClientConfig config) { + this(config, null); + } + + @Override + public void init() { + roomInitResult = BilibiliApis.roomInit(getConfig().getRoomId(), getConfig().getCookie()); + super.init(); + } + + @Override + public BilibiliConnectionHandler initConnectionHandler(IBaseConnectionListener<BilibiliConnectionHandler> clientConnectionListener) { + return new BilibiliConnectionHandler( + WebSocketClientHandshakerFactory.newHandshaker(getWebsocketUri(), WebSocketVersion.V13, null, true, new DefaultHttpHeaders(), getConfig().getMaxFramePayloadLength()), + BilibiliLiveChatClient.this, clientConnectionListener + ); + } + + @Override + public BilibiliBinaryFrameHandler initBinaryFrameHandler() { + return new BilibiliBinaryFrameHandler(super.msgListeners, BilibiliLiveChatClient.this); + } + + @Override + public void sendDanmu(Object danmu, Runnable success, Consumer<Throwable> failed) { + if (!checkCanSendDanmu(false)) { + return; + } + if (danmu instanceof String) { + String msg = (String) danmu; + try { + if (log.isDebugEnabled()) { + log.debug("{} bilibili鍙戦�佸脊骞� {}", getConfig().getRoomId(), danmu); + } + + boolean sendSuccess = false; + try { + BilibiliApis.sendMsg(msg, roomInitResult.getRoom_id(), getConfig().getCookie()); + sendSuccess = true; + } catch (Exception e) { + log.error("bilibili寮瑰箷鍙戦�佸け璐�", e); + if (failed != null) { + failed.accept(e); + } + } + if (!sendSuccess) { + return; + } + + if (log.isDebugEnabled()) { + log.debug("bilibili寮瑰箷鍙戦�佹垚鍔� {}", danmu); + } + if (success != null) { + success.run(); + } + finishSendDanmu(); + } catch (Exception e) { + log.error("bilibili寮瑰箷鍙戦�佸け璐�", e); + if (failed != null) { + failed.accept(e); + } + } + } else { + super.sendDanmu(danmu, success, failed); + } + } + + @Override + public void clickLike(int count, Runnable success, Consumer<Throwable> failed) { + if (count <= 0) { + throw new BaseException("鐐硅禐娆℃暟蹇呴』澶т簬0"); + } + + boolean successfullyClicked = false; + try { + BilibiliApis.likeReportV3(roomInitResult.getUid(), roomInitResult.getRoom_id(), getConfig().getCookie()); + successfullyClicked = true; + } catch (Exception e) { + log.error("Bilibili涓虹洿鎾棿鐐硅禐澶辫触", e); + if (failed != null) { + failed.accept(e); + } + } + if (!successfullyClicked) { + return; + } + + if (log.isDebugEnabled()) { + log.debug("Bilibili涓虹洿鎾棿鐐硅禐鎴愬姛"); + } + if (success != null) { + success.run(); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/config/BilibiliLiveChatClientConfig.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/config/BilibiliLiveChatClientConfig.java new file mode 100644 index 0000000..0f0b3b9 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/config/BilibiliLiveChatClientConfig.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.config; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import tech.ordinaryroad.live.chat.client.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatNumberUtil; +import tech.ordinaryroad.live.chat.client.servers.netty.client.config.BaseNettyClientConfig; + +/** + * B绔欑洿鎾棿寮瑰箷瀹㈡埛绔厤缃� + * + * @author mjz + * @date 2023/8/21 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@SuperBuilder(toBuilder = true) +public class BilibiliLiveChatClientConfig extends BaseNettyClientConfig { + + /** + * @see ProtoverEnum + */ + @Builder.Default + private ProtoverEnum protover = ProtoverEnum.NORMAL_ZLIB; + + @Builder.Default + private String websocketUri = "wss://broadcastlv.chat.bilibili.com:443/sub"; + + @Override + public Long getRoomId() { + return OrLiveChatNumberUtil.parseLong(super.getRoomId()); + } + + public void setProtover(ProtoverEnum protover) { + ProtoverEnum oldValue = this.protover; + this.protover = protover; + super.propertyChangeSupport.firePropertyChange("protover", oldValue, protover); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/constant/BilibiliCmdEnum.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/constant/BilibiliCmdEnum.java new file mode 100644 index 0000000..1b6edbc --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/constant/BilibiliCmdEnum.java @@ -0,0 +1,143 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@RequiredArgsConstructor +public enum BilibiliCmdEnum { + /** + * 娓稿鐘舵�佷笅锛�5鍒嗛挓鍚庝細鍑虹幇鐧诲綍鎻愮ず锛屽脊骞曚腑鐨勭敤鎴峰悕銆佺敤鎴穒d绛変俊鎭皢涓嶅啀鍙 + */ + LOG_IN_NOTICE, + /** + * 鏀跺埌寮瑰箷 + */ + DANMU_MSG, + /** + * 鏀跺埌绀肩墿 + */ + SEND_GIFT, + /** + * 鏈変汉涓婅埌 + */ + GUARD_BUY, + /** + * 娆㈣繋鑸伴暱 + */ + WELCOME_GUARD, + WELCOME, + /** + * 绀肩墿杩炲嚮 + */ + COMBO_SEND, + /** + * 娆㈣繋楂樿兘鐢ㄦ埛銆�(鑸伴暱?寰呴獙璇�)鐗规畩娑堟伅 + */ + ENTRY_EFFECT, + HOT_RANK_CHANGED, + HOT_RANK_CHANGED_V2, + INTERACT_WORD, + /** + * 寮�濮嬬洿鎾� + */ + LIVE, + LIVE_INTERACTIVE_GAME, + NOTICE_MSG, + /** + * 楂樿兘姒滄暟閲忔洿鏂� + */ + ONLINE_RANK_COUNT, + ONLINE_RANK_TOP3, + ONLINE_RANK_V2, + PK_BATTLE_END, + PK_BATTLE_FINAL_PROCESS, + PK_BATTLE_PROCESS, + PK_BATTLE_PROCESS_NEW, + PK_BATTLE_SETTLE, + PK_BATTLE_SETTLE_USER, + PK_BATTLE_SETTLE_V2, + /** + * 涓绘挱鍑嗗涓� + */ + PREPARING, + ROOM_REAL_TIME_MESSAGE_UPDATE, + /** + * 鍋滄鐩存挱鐨勬埧闂碔D鍒楄〃 + */ + STOP_LIVE_ROOM_LIST, + /** + * 閱掔洰鐣欒█ + */ + SUPER_CHAT_MESSAGE, + SUPER_CHAT_MESSAGE_JPN, + /** + * 鍒犻櫎閱掔洰鐣欒█ + */ + SUPER_CHAT_MESSAGE_DELETE, + WIDGET_BANNER, + /** + * 鐐硅禐鏁版洿鏂� + */ + LIKE_INFO_V3_UPDATE, + /** + * 涓轰富鎾偣璧� + */ + LIKE_INFO_V3_CLICK, + HOT_ROOM_NOTIFY, + /** + * 瑙傜湅浜烘暟鍙樺寲 + */ + WATCHED_CHANGE, + POPULAR_RANK_CHANGED, + COMMON_NOTICE_DANMAKU, + LIVE_MULTI_VIEW_CHANGE, + RECOMMEND_CARD, + PK_BATTLE_START_NEW, + PK_BATTLE_ENTRANCE, + AREA_RANK_CHANGED, + ROOM_BLOCK_MSG, + USER_TOAST_MSG, + PK_BATTLE_PRE_NEW, + PK_BATTLE_RANK_CHANGE, + PK_BATTLE_START, + PK_BATTLE_PRE, + PLAY_TAG, + ; + + public static BilibiliCmdEnum getByString(String cmd) { + try { + return BilibiliCmdEnum.valueOf(cmd); + } catch (Exception e) { + return null; + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/constant/OperationEnum.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/constant/OperationEnum.java new file mode 100644 index 0000000..296abc3 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/constant/OperationEnum.java @@ -0,0 +1,86 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/1/5 + */ +@Getter +@RequiredArgsConstructor +public enum OperationEnum { + HANDSHAKE(0), + HANDSHAKE_REPLY(1), + /** + * 蹇冭烦鍖� + */ + HEARTBEAT(2), + /** + * 蹇冭烦鍖呭洖澶嶏紙浜烘皵鍊硷級 + */ + HEARTBEAT_REPLY(3), + SEND_MSG(4), + + /** + * 鏅�氬寘锛堝懡浠わ級 + */ + SEND_SMS_REPLY(5), + DISCONNECT_REPLY(6), + + /** + * 璁よ瘉鍖� + */ + AUTH(7), + + /** + * 璁よ瘉鍖呭洖澶� + */ + AUTH_REPLY(8), + RAW(9), + PROTO_READY(10), + PROTO_FINISH(11), + CHANGE_ROOM(12), + CHANGE_ROOM_REPLY(13), + REGISTER(14), + REGISTER_REPLY(15), + UNREGISTER(16), + UNREGISTER_REPLY(17), + ; + + private final int code; + + public static OperationEnum getByCode(int code) { + for (OperationEnum value : OperationEnum.values()) { + if (value.code == code) { + return value; + } + } + return null; + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/constant/ProtoverEnum.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/constant/ProtoverEnum.java new file mode 100644 index 0000000..bee3f2a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/constant/ProtoverEnum.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/1/5 + */ +@Getter +@RequiredArgsConstructor +public enum ProtoverEnum { + /** + * 鏅�氬寘姝f枃涓嶄娇鐢ㄥ帇缂� + */ + NORMAL_NO_COMPRESSION(0), + /** + * 蹇冭烦鍙婅璇佸寘姝f枃涓嶄娇鐢ㄥ帇缂� + */ + HEARTBEAT_AUTH_NO_COMPRESSION(1), + /** + * 鏅�氬寘姝f枃浣跨敤zlib鍘嬬缉 + */ + NORMAL_ZLIB(2), + /** + * 鏅�氬寘姝f枃浣跨敤brotli鍘嬬缉,瑙e帇涓轰竴涓甫澶撮儴鐨勫崗璁�0鏅�氬寘 + */ + NORMAL_BROTLI(3), + ; + + private final int code; + + + public static ProtoverEnum getByCode(int code) { + for (ProtoverEnum value : ProtoverEnum.values()) { + if (value.code == code) { + return value; + } + } + return null; + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/IBilibiliConnectionListener.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/IBilibiliConnectionListener.java new file mode 100644 index 0000000..74248b1 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/IBilibiliConnectionListener.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.listener; + + +import tech.ordinaryroad.live.chat.client.bilibili.netty.handler.BilibiliConnectionHandler; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; + +/** + * 杩炴帴鍥炶皟 + * + * @author mjz + * @date 2023/8/21 + */ +public interface IBilibiliConnectionListener extends IBaseConnectionListener<BilibiliConnectionHandler> { +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/IBilibiliMsgListener.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/IBilibiliMsgListener.java new file mode 100644 index 0000000..bb62956 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/listener/IBilibiliMsgListener.java @@ -0,0 +1,138 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.listener; + +import tech.ordinaryroad.live.chat.client.bilibili.constant.BilibiliCmdEnum; +import tech.ordinaryroad.live.chat.client.bilibili.msg.*; +import tech.ordinaryroad.live.chat.client.bilibili.netty.handler.BilibiliBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.commons.base.listener.*; + +/** + * @author mjz + * @date 2023/1/7 + */ +public interface IBilibiliMsgListener extends IBaseMsgListener<BilibiliBinaryFrameHandler, BilibiliCmdEnum>, + IDanmuMsgListener<BilibiliBinaryFrameHandler, DanmuMsgMsg>, + IGiftMsgListener<BilibiliBinaryFrameHandler, SendGiftMsg>, + ISuperChatMsgListener<BilibiliBinaryFrameHandler, SuperChatMessageMsg>, + IEnterRoomMsgListener<BilibiliBinaryFrameHandler, InteractWordMsg>, + ILikeMsgListener<BilibiliBinaryFrameHandler, LikeInfoV3ClickMsg> { + + /** + * 鏀跺埌绀肩墿 + * + * @param binaryFrameHandler BilibiliBinaryFrameHandler + * @param msg SendSmsReplyMsg + * @deprecated use {@link IGiftMsgListener#onGiftMsg(Object, Object)} + */ + default void onSendGift(BilibiliBinaryFrameHandler binaryFrameHandler, SendSmsReplyMsg msg) { + this.onSendGift(msg); + } + + /** + * @deprecated use {@link IGiftMsgListener#onGiftMsg(Object)} + */ + default void onSendGift(SendSmsReplyMsg msg) { + // ignore + } + + /** + * 鏅�氱敤鎴疯繘鍏ョ洿鎾棿 + * + * @param binaryFrameHandler BilibiliBinaryFrameHandler + * @param msg SendSmsReplyMsg + * @deprecated use {@link IEnterRoomMsgListener#onEnterRoomMsg} + */ + default void onEnterRoom(BilibiliBinaryFrameHandler binaryFrameHandler, SendSmsReplyMsg msg) { + this.onEnterRoom(msg); + } + + /** + * @deprecated use {@link IEnterRoomMsgListener#onEnterRoomMsg} + */ + default void onEnterRoom(SendSmsReplyMsg msg) { + // ignore + } + + /** + * 鍏ュ満鏁堟灉锛堥珮鑳界敤鎴凤級 + * + * @param binaryFrameHandler BilibiliBinaryFrameHandler + * @param sendSmsReplyMsg SendSmsReplyMsg + */ + default void onEntryEffect(BilibiliBinaryFrameHandler binaryFrameHandler, SendSmsReplyMsg sendSmsReplyMsg) { + this.onEntryEffect(sendSmsReplyMsg); + } + + default void onEntryEffect(SendSmsReplyMsg sendSmsReplyMsg) { + // ignore + } + + /** + * 瑙傜湅浜烘暟鍙樺寲 + * + * @param binaryFrameHandler BilibiliBinaryFrameHandler + * @param msg SendSmsReplyMsg + */ + default void onWatchedChange(BilibiliBinaryFrameHandler binaryFrameHandler, SendSmsReplyMsg msg) { + this.onWatchedChange(msg); + } + + default void onWatchedChange(SendSmsReplyMsg msg) { + // ignore + } + + /** + * 涓轰富鎾偣璧� + * + * @param binaryFrameHandler BilibiliBinaryFrameHandler + * @param msg SendSmsReplyMsg + * @deprecated use {@link ILikeMsgListener#onLikeMsg} + */ + default void onClickLike(BilibiliBinaryFrameHandler binaryFrameHandler, SendSmsReplyMsg msg) { + this.onClickLike(msg); + } + + /** + * @deprecated use {@link ILikeMsgListener#onLikeMsg} + */ + default void onClickLike(SendSmsReplyMsg msg) { + // ignore + } + + /** + * 鐐硅禐鏁版洿鏂� + * + * @param binaryFrameHandler BilibiliBinaryFrameHandler + * @param msg SendSmsReplyMsg + */ + default void onClickUpdate(BilibiliBinaryFrameHandler binaryFrameHandler, SendSmsReplyMsg msg) { + this.onClickUpdate(msg); + } + + default void onClickUpdate(SendSmsReplyMsg msg) { + // ignore + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/AuthMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/AuthMsg.java new file mode 100644 index 0000000..6a30d3b --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/AuthMsg.java @@ -0,0 +1,92 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.msg; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.bilibili.msg.base.BaseBilibiliMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@RequiredArgsConstructor +public class AuthMsg extends BaseBilibiliMsg { + + /** + * 鐢ㄦ埛uid锛�0浠h〃娓稿 + */ + private long uid; + + /** + * 鎴块棿id room_id锛屼笉鏄煭id short_id + * 鍙互閫氳繃灏唘rl鍙傛暟id鏀逛负鐩存挱鍦板潃涓殑鏁板瓧鏉ユ煡璇㈡埧闂寸湡瀹瀒d + * example: <a href="https://api.live.bilibili.com/room/v1/Room/room_init?id=6">https://api.live.bilibili.com/room/v1/Room/room_init?id=6</a> + */ + private final long roomid; + + /** + * 鍗忚鐗堟湰 + * + * @see ProtoverEnum#getCode() + */ + private final int protover; + + /** + * 骞冲彴鏍囪瘑 + */ + private String platform = "web"; + private int type = 2; + + /** + * 蹇呴』瀛楁 + * + * @since 2023-08-19 + */ + private final String buvid; + + /** + * 璁よ瘉绉橀挜锛堝繀椤诲瓧娈碉級 + * + * @since @since 2023-08-19 + */ + private final String key; + + @Override + public ProtoverEnum getProtoverEnum() { + return ProtoverEnum.getByCode(this.protover); + } + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.AUTH; + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/AuthReplyMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/AuthReplyMsg.java new file mode 100644 index 0000000..5bb76ea --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/AuthReplyMsg.java @@ -0,0 +1,63 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.msg; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.bilibili.msg.base.BaseBilibiliMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class AuthReplyMsg extends BaseBilibiliMsg { + + /** + * 0: OK,-101: TOKEN_ERROR + */ + private int code; + + @JsonIgnore + private int protover; + + @Override + public ProtoverEnum getProtoverEnum() { + return ProtoverEnum.getByCode(protover); + } + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.AUTH_REPLY; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/DanmuMsgMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/DanmuMsgMsg.java new file mode 100644 index 0000000..8bf093c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/DanmuMsgMsg.java @@ -0,0 +1,102 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.msg; + +import cn.hutool.core.codec.Base64; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.bilibili.msg.base.BaseBilibiliMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IDanmuMsg; + +/** + * @author mjz + * @date 2023/9/8 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DanmuMsgMsg extends BaseBilibiliMsg implements IDanmuMsg { + + private JsonNode info; + private String dm_v2; + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.SEND_SMS_REPLY; + } + + @Override + public String getBadgeName() { + JsonNode jsonNode3 = info.get(3); + if (jsonNode3.isEmpty()) { + return ""; + } + return jsonNode3.get(1).asText(); + } + + @Override + public byte getBadgeLevel() { + JsonNode jsonNode3 = info.get(3); + if (jsonNode3.isEmpty()) { + return 0; + } + return (byte) jsonNode3.get(0).asInt(); + } + + @Override + public String getUid() { + JsonNode jsonNode2 = info.get(2); + return jsonNode2.get(0).asText(); + } + + @Override + public String getUsername() { + JsonNode jsonNode2 = info.get(2); + return jsonNode2.get(1).asText(); + } + + @Override + public String getUserAvatar() { + String avatar = null; + try { + tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2 dmV2 = tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2.parseFrom(Base64.decode(dm_v2)); + avatar = dmV2.getDmV220().getAvatar(); + } catch (Exception e) { + // ignore + } + return avatar; + } + + @Override + public String getContent() { + JsonNode jsonNode1 = info.get(1); + return jsonNode1.asText(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/HeartbeatMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/HeartbeatMsg.java new file mode 100644 index 0000000..dff52fc --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/HeartbeatMsg.java @@ -0,0 +1,58 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.msg; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.bilibili.msg.base.BaseBilibiliMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class HeartbeatMsg extends BaseBilibiliMsg { + + @JsonIgnore + private int protover; + + @Override + public ProtoverEnum getProtoverEnum() { + return ProtoverEnum.getByCode(protover); + } + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.HEARTBEAT; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/HeartbeatReplyMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/HeartbeatReplyMsg.java new file mode 100644 index 0000000..535aadd --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/HeartbeatReplyMsg.java @@ -0,0 +1,60 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.msg; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.bilibili.msg.base.BaseBilibiliMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class HeartbeatReplyMsg extends BaseBilibiliMsg { + + private int popularity; + + @JsonIgnore + private int protover; + + @Override + public ProtoverEnum getProtoverEnum() { + return ProtoverEnum.getByCode(protover); + } + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.HEARTBEAT_REPLY; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/InteractWordMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/InteractWordMsg.java new file mode 100644 index 0000000..8ef298a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/InteractWordMsg.java @@ -0,0 +1,396 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.msg; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.bilibili.msg.base.BaseBilibiliMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IEnterRoomMsg; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author mjz + * @date 2023/12/26 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class InteractWordMsg extends BaseBilibiliMsg implements IEnterRoomMsg { + + private Data data; + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.SEND_SMS_REPLY; + } + + @Override + public String getBadgeName() { + if (data == null || data.fans_medal == null) { + return null; + } + return data.fans_medal.medal_name; + } + + @Override + public byte getBadgeLevel() { + if (data == null || data.fans_medal == null) { + return 0; + } + return data.fans_medal.medal_level; + } + + @Override + public String getUid() { + if (data == null) { + return null; + } + return Long.toString(data.uid); + } + + @Override + public String getUsername() { + if (data == null) { + return null; + } + return data.uname; + } + + @Override + public String getUserAvatar() { + if (data == null || data.uinfo == null || data.uinfo.base == null) { + return null; + } + return data.uinfo.base.face; + } + + @lombok.Data + public static class Data { + + private Contribution contribution; + private Contribution_v2 contribution_v2; + private int core_user_type; + private int dmscore; + private Fans_medal fans_medal; + private String group_medal; + private List<Integer> identities; + private boolean is_mystery; + private int is_spread; + private int msg_type; + private int privilege_type; + private long roomid; + private long score; + private String spread_desc; + private String spread_info; + private int tail_icon; + private String tail_text; + private long timestamp; + private long trigger_time; + private long uid; + private Uinfo uinfo; + private String uname; + private String uname_color; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Contribution { + + private int grade; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Contribution_v2 { + + private int grade; + private String rank_type; + private String text; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Fans_medal { + + private long anchor_roomid; + private int guard_level; + private int icon_id; + private int is_lighted; + private long medal_color; + private long medal_color_border; + private long medal_color_end; + private long medal_color_start; + private byte medal_level; + private String medal_name; + private long score; + private String special; + private long target_id; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Origin_info { + + private String face; + private String name; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Risk_ctrl_info { + + private String face; + private String name; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Official_info { + + private int role; + private String title; + private String desc; + private int type; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Base { + + private String face; + private boolean is_mystery; + private String name; + private int name_color; + private Origin_info origin_info; + private Risk_ctrl_info risk_ctrl_info; + private Official_info official_info; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Medal { + + private String name; + private int level; + private long color_start; + private long color_end; + private long color_border; + private long color; + private int id; + private int typ; + private int is_light; + private long ruid; + private int guard_level; + private int score; + private String guard_icon; + private String honor_icon; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Guard { + + private int level; + private String expired_str; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + + @lombok.Data + public static class Uinfo { + + private long uid; + private Base base; + private Medal medal; + private String wealth; + private String title; + private Guard guard; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/LikeInfoV3ClickMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/LikeInfoV3ClickMsg.java new file mode 100644 index 0000000..191aab2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/LikeInfoV3ClickMsg.java @@ -0,0 +1,158 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.msg; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.bilibili.msg.base.BaseBilibiliMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ILikeMsg; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author mjz + * @date 2024/1/31 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class LikeInfoV3ClickMsg extends BaseBilibiliMsg implements ILikeMsg { + + private Data data; + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.SEND_SMS_REPLY; + } + + @Override + public String getBadgeName() { + if (this.data == null || this.data.getFans_medal() == null) { + return null; + } + + return this.data.getFans_medal().getMedal_name(); + } + + @Override + public byte getBadgeLevel() { + if (this.data == null || this.data.getFans_medal() == null) { + return 0; + } + + return this.data.getFans_medal().getMedal_level(); + } + + @Override + public String getUid() { + if (this.data == null) { + return null; + } + + return Long.toString(this.data.getUid()); + } + + @Override + public String getUsername() { + if (this.data == null) { + return ""; + } + + return this.data.getUname(); + } + + @Override + public String getUserAvatar() { + if (this.data == null || this.data.getUinfo() == null || this.data.getUinfo().getBase() == null) { + return ""; + } + + return this.data.getUinfo().getBase().getFace(); + } + + @lombok.Data + public static class Data { + + private int show_area; + private int msg_type; + private String like_icon; + private long uid; + private String like_text; + private String uname; + private String uname_color; + private List<Integer> identities; + private InteractWordMsg.Fans_medal fans_medal; + private Contribution_info contribution_info; + private int dmscore; + private String group_medal; + private boolean is_mystery; + private InteractWordMsg.Uinfo uinfo; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Contribution_info { + + private int grade; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/SendGiftMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/SendGiftMsg.java new file mode 100644 index 0000000..8879c8c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/SendGiftMsg.java @@ -0,0 +1,351 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.msg; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.bilibili.api.BilibiliApis; +import tech.ordinaryroad.live.chat.client.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.bilibili.msg.base.BaseBilibiliMsg; +import tech.ordinaryroad.live.chat.client.bilibili.msg.dto.MedalInfo; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IGiftMsg; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/9/8 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SendGiftMsg extends BaseBilibiliMsg implements IGiftMsg { + + private Data data; + + /** + * 棰濆灞炴�э紝鑾峰彇绀肩墿鍥剧墖鏃跺彲鑳戒細鐢ㄥ埌 + */ + private long roomId; + + @Override + public String getBadgeName() { + if (data == null || data.medal_info == null) { + return IGiftMsg.super.getBadgeName(); + } + + return data.medal_info.getMedal_name(); + } + + @Override + public byte getBadgeLevel() { + if (data == null || data.medal_info == null) { + return IGiftMsg.super.getBadgeLevel(); + } + + return data.medal_info.getMedal_level(); + } + + @Override + public String getUid() { + if (this.data == null) { + return null; + } + + return Long.toString(this.data.getUid()); + } + + @Override + public String getUsername() { + if (this.data == null) { + return ""; + } + + return this.data.getUname(); + } + + @Override + public String getUserAvatar() { + if (this.data == null) { + return ""; + } + + return this.data.getFace(); + } + + @Override + public String getGiftName() { + if (this.data == null) { + return "鏈煡绀肩墿"; + } + + return this.data.getGiftName(); + } + + @Override + public String getGiftImg() { + return BilibiliApis.getGiftImgById(this.data.giftId, this.roomId); + } + + @Override + public String getGiftId() { + if (this.data == null) { + return null; + } + + return Long.toString(data.getGiftId()); + } + + @Override + public int getGiftCount() { + if (this.data == null) { + return 0; + } + + return data.getNum(); + } + + @Override + public int getGiftPrice() { + if (this.data == null) { + return -1; + } + + return data.getPrice(); + } + + @Override + public String getReceiveUid() { + if (this.data == null || this.data.getReceive_user_info() == null) { + return null; + } + + return Long.toString(data.getReceive_user_info().getUid()); + } + + @Override + public String getReceiveUsername() { + if (this.data == null || this.data.getReceive_user_info() == null) { + return ""; + } + + return data.getReceive_user_info().getUname(); + } + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.SEND_SMS_REPLY; + } + + @lombok.Data + public static class Data { + + private int draw; + private int gold; + private int silver; + private int num; + private int total_coin; + private int effect; + private int broadcast_id; + private int crit_prob; + private int guard_level; + private long rcost; + private long uid; + private long timestamp; + private int giftId; + private int giftType; + @JsonProperty("super") + private int _super; + private int super_gift_num; + private int super_batch_gift_num; + private int remain; + private int discount_price; + private int price; + private String beatId; + private String biz_source; + private String action; + private String coin_type; + private String uname; + private String face; + private String batch_combo_id; + private String rnd; + private String giftName; + private String original_gift_name; + private Combo_send combo_send; + private Batch_combo_send batch_combo_send; + private String tag_image; + private String top_list; + private String send_master; + private boolean is_first; + private int demarcation; + private int combo_stay_time; + private int combo_total_coin; + private String tid; + private int effect_block; + private int is_special_batch; + private int combo_resources_id; + private int magnification; + private String name_color; + private MedalInfo medal_info; + private int svga_block; + private JsonNode blind_gift; + private int float_sc_resource_id; + @JsonProperty("switch") + private boolean _switch; + private int face_effect_type; + private int face_effect_id; + private boolean is_naming; + private Receive_user_info receive_user_info; + private boolean is_join_receiver; + private Bag_gift bag_gift; + private int wealth_level; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Combo_send { + + private long uid; + private int gift_num; + private int combo_num; + private int gift_id; + private String combo_id; + private String gift_name; + private String action; + private String uname; + private String send_master; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Receive_user_info { + + private String uname; + private long uid; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Batch_combo_send { + + private long uid; + private int gift_num; + private int batch_combo_num; + private int gift_id; + private String batch_combo_id; + private String gift_name; + private String action; + private String uname; + private String send_master; + private JsonNode blind_gift; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Bag_gift { + + private int show_price; + private int price_for_show; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/SendSmsReplyMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/SendSmsReplyMsg.java new file mode 100644 index 0000000..ae2c52d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/SendSmsReplyMsg.java @@ -0,0 +1,81 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.msg; + +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.bilibili.msg.base.BaseBilibiliCmdMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SendSmsReplyMsg extends BaseBilibiliCmdMsg { + + private Long id; + + private String name; + + private JsonNode full; + + private JsonNode half; + + private JsonNode side; + + private JsonNode data; + + private JsonNode info; + + private JsonNode msg_common; + + private JsonNode msg_self; + + private JsonNode link_url; + + private JsonNode msg_type; + + private JsonNode shield_uid; + + private JsonNode business_id; + + private JsonNode scatter; + + private long roomid; + + private long real_roomid; + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.SEND_SMS_REPLY; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/SuperChatMessageMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/SuperChatMessageMsg.java new file mode 100644 index 0000000..1842b78 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/SuperChatMessageMsg.java @@ -0,0 +1,202 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package tech.ordinaryroad.live.chat.client.bilibili.msg; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.bilibili.msg.base.BaseBilibiliMsg; +import tech.ordinaryroad.live.chat.client.bilibili.msg.dto.MedalInfo; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ISuperChatMsg; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/9/24 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SuperChatMessageMsg extends BaseBilibiliMsg implements ISuperChatMsg { + + private long roomid; + private Data data; + + @Override + public OperationEnum getOperationEnum() { + return OperationEnum.SEND_SMS_REPLY; + } + + @Override + public String getUid() { + if (this.data == null) { + return null; + } + + return Long.toString(this.data.uid); + } + + @Override + public String getUsername() { + if (this.data == null || this.data.getUser_info() == null) { + return ""; + } + + return this.data.user_info.uname; + } + + @Override + public String getUserAvatar() { + if (this.data == null || this.data.getUser_info() == null) { + return ""; + } + + return this.data.user_info.face; + } + + @Override + public String getContent() { + if (this.data == null) { + return ""; + } + + return this.data.message; + } + + @Override + public int getDuration() { + if (this.data == null) { + return 0; + } + + return this.data.time; + } + + @lombok.Data + public static class Data { + private String background_bottom_color; + private String background_color; + private String background_color_end; + private String background_color_start; + private String background_icon; + private String background_image; + private String background_price_color; + private double color_point; + private int dmscore; + private long end_time; + private Gift gift; + private long id; + private int is_ranked; + private int is_send_audit; + private MedalInfo medal_info; + private String message; + private String message_font_color; + private String message_trans; + private int price; + private int rate; + private long start_time; + private int time; + private String token; + private int trans_mark; + private long ts; + private long uid; + private User_info user_info; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class Gift { + private int gift_id; + private String gift_name; + private int num; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @lombok.Data + public static class User_info { + private String face; + private String face_frame; + private int guard_level; + private int is_main_vip; + private int is_svip; + private int is_vip; + private String level_color; + private int manager; + private String name_color; + private String title; + private String uname; + private int user_level; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/base/BaseBilibiliCmdMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/base/BaseBilibiliCmdMsg.java new file mode 100644 index 0000000..5dd624f --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/base/BaseBilibiliCmdMsg.java @@ -0,0 +1,68 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.msg.base; + + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.bilibili.constant.BilibiliCmdEnum; +import tech.ordinaryroad.live.chat.client.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.commons.base.msg.BaseCmdMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public abstract class BaseBilibiliCmdMsg extends BaseCmdMsg<BilibiliCmdEnum> implements IBilibiliMsg { + + private int protover; + private String cmd; + + @Override + public String getCmd() { + return this.cmd; + } + + @Override + public void setCmd(String cmd) { + this.cmd = cmd; + } + + @Override + public BilibiliCmdEnum getCmdEnum() { + return BilibiliCmdEnum.getByString(getCmd()); + } + + @Override + public ProtoverEnum getProtoverEnum() { + return ProtoverEnum.getByCode(this.protover); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/base/BaseBilibiliMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/base/BaseBilibiliMsg.java new file mode 100644 index 0000000..16ca652 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/base/BaseBilibiliMsg.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.msg.base; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.commons.base.msg.BaseMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public abstract class BaseBilibiliMsg extends BaseMsg implements IBilibiliMsg { + + private int protover; + + @Override + public ProtoverEnum getProtoverEnum() { + return ProtoverEnum.getByCode(protover); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/base/IBilibiliMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/base/IBilibiliMsg.java new file mode 100644 index 0000000..ff12eed --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/base/IBilibiliMsg.java @@ -0,0 +1,44 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.msg.base; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import tech.ordinaryroad.live.chat.client.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +/** + * @author mjz + * @date 2023/8/26 + */ +public interface IBilibiliMsg extends IMsg { + + @JsonIgnore + ProtoverEnum getProtoverEnum(); + + @JsonIgnore + OperationEnum getOperationEnum(); + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/dto/MedalInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/dto/MedalInfo.java new file mode 100644 index 0000000..15cd17a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/msg/dto/MedalInfo.java @@ -0,0 +1,66 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.msg.dto; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.Data; + +import java.util.HashMap; +import java.util.Map; + +@Data +public class MedalInfo { + + private long target_id; + private String special; + private int icon_id; + private String anchor_uname; + private int anchor_roomid; + private byte medal_level; + private String medal_name; + private String medal_color; + private long medal_color_start; + private long medal_color_end; + private long medal_color_border; + private int is_lighted; + private int guard_level; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/frame/AuthWebSocketFrame.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/frame/AuthWebSocketFrame.java new file mode 100644 index 0000000..c6436e2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/frame/AuthWebSocketFrame.java @@ -0,0 +1,40 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.netty.frame; + +import io.netty.buffer.ByteBuf; +import tech.ordinaryroad.live.chat.client.bilibili.netty.frame.base.BaseBilibiliWebSocketFrame; + +/** + * @author mjz + * @date 2023/1/5 + */ +public class AuthWebSocketFrame extends BaseBilibiliWebSocketFrame { + + public AuthWebSocketFrame(ByteBuf byteBuf) { + super(byteBuf); + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/frame/HeartbeatWebSocketFrame.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/frame/HeartbeatWebSocketFrame.java new file mode 100644 index 0000000..f2abecf --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/frame/HeartbeatWebSocketFrame.java @@ -0,0 +1,40 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.netty.frame; + +import io.netty.buffer.ByteBuf; +import tech.ordinaryroad.live.chat.client.bilibili.netty.frame.base.BaseBilibiliWebSocketFrame; + +/** + * @author mjz + * @date 2023/1/5 + */ +public class HeartbeatWebSocketFrame extends BaseBilibiliWebSocketFrame { + + public HeartbeatWebSocketFrame(ByteBuf byteBuf) { + super(byteBuf); + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/frame/base/BaseBilibiliWebSocketFrame.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/frame/base/BaseBilibiliWebSocketFrame.java new file mode 100644 index 0000000..a3556f6 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/frame/base/BaseBilibiliWebSocketFrame.java @@ -0,0 +1,54 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.netty.frame.base; + +import io.netty.buffer.ByteBuf; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import tech.ordinaryroad.live.chat.client.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.bilibili.constant.ProtoverEnum; + +/** + * 瀹炵幇Bilibili鍗忚鐨凚inaryWebSocketFrame + * <a href="https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/live/message_stream.md#鏁版嵁鍖呮牸寮�">鏁版嵁鍖呮牸寮�</a> + * + * @author mjz + * @date 2023/1/5 + */ +public abstract class BaseBilibiliWebSocketFrame extends BinaryWebSocketFrame { + + public static int sequence = 0; + + public ProtoverEnum getProtoverEnum() { + return ProtoverEnum.getByCode(super.content().getShort(6)); + } + + public OperationEnum getOperationEnum() { + return OperationEnum.getByCode(super.content().getInt(8)); + } + + public BaseBilibiliWebSocketFrame(ByteBuf byteBuf) { + super(byteBuf); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/frame/factory/BilibiliWebSocketFrameFactory.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/frame/factory/BilibiliWebSocketFrameFactory.java new file mode 100644 index 0000000..63e62d7 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/frame/factory/BilibiliWebSocketFrameFactory.java @@ -0,0 +1,113 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.netty.frame.factory; + +import cn.hutool.core.lang.UUID; +import cn.hutool.core.util.NumberUtil; +import com.fasterxml.jackson.databind.JsonNode; +import tech.ordinaryroad.live.chat.client.bilibili.api.BilibiliApis; +import tech.ordinaryroad.live.chat.client.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.bilibili.msg.AuthMsg; +import tech.ordinaryroad.live.chat.client.bilibili.msg.HeartbeatMsg; +import tech.ordinaryroad.live.chat.client.bilibili.netty.frame.AuthWebSocketFrame; +import tech.ordinaryroad.live.chat.client.bilibili.netty.frame.HeartbeatWebSocketFrame; +import tech.ordinaryroad.live.chat.client.bilibili.util.BilibiliCodecUtil; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatCookieUtil; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * @author mjz + * @date 2023/1/5 + */ +public class BilibiliWebSocketFrameFactory { + + private static final ConcurrentHashMap<Long, BilibiliWebSocketFrameFactory> CACHE = new ConcurrentHashMap<>(); + + /** + * 娴忚鍣ㄥ湴鍧�涓殑鎴块棿id锛屾敮鎸佺煭id + */ + private final long roomId; + private volatile static HeartbeatMsg heartbeatMsg; + + public BilibiliWebSocketFrameFactory(long roomId) { + this.roomId = roomId; + } + + public synchronized static BilibiliWebSocketFrameFactory getInstance(long roomId) { + return CACHE.computeIfAbsent(roomId, aLong -> new BilibiliWebSocketFrameFactory(roomId)); + } + + /** + * 鍒涘缓璁よ瘉鍖� + * + * @param protover {@link ProtoverEnum} + * @param cookie 娴忚鍣╟ookie锛屼粎鐢ㄦ潵缁存寔鐧诲綍鐘舵�� + * @return AuthWebSocketFrame + */ + public AuthWebSocketFrame createAuth(ProtoverEnum protover, String cookie) { + try { + Map<String, String> cookieMap = OrLiveChatCookieUtil.parseCookieString(cookie); + String buvid3 = OrLiveChatCookieUtil.getCookieByName(cookieMap, "buvid3", () -> UUID.randomUUID().toString()); + String uid = OrLiveChatCookieUtil.getCookieByName(cookieMap, "DedeUserID", () -> "0"); + BilibiliApis.RoomInitResult data = BilibiliApis.roomInit(roomId, cookie); + JsonNode danmuInfo = BilibiliApis.getDanmuInfo(roomId, 0, cookie); + long realRoomId = data.getRoom_id(); + AuthMsg authMsg = new AuthMsg(realRoomId, protover.getCode(), buvid3, danmuInfo.get("token").asText()); + authMsg.setUid(NumberUtil.parseLong(uid)); + return new AuthWebSocketFrame(BilibiliCodecUtil.encode(authMsg)); + } catch (Exception e) { + throw new BaseException(String.format("璁よ瘉鍖呭垱寤哄け璐ワ紝璇锋鏌ユ埧闂村彿鏄惁姝g‘銆俽oomId: %d, msg: %s", roomId, e.getMessage())); + } + } + + public AuthWebSocketFrame createAuth(ProtoverEnum protover) { + return this.createAuth(protover, null); + } + + public HeartbeatWebSocketFrame createHeartbeat(ProtoverEnum protover) { + return new HeartbeatWebSocketFrame(BilibiliCodecUtil.encode(this.getHeartbeatMsg(protover))); + } + + /** + * 蹇冭烦鍖呭崟渚嬫ā寮� + * + * @param protover {@link ProtoverEnum} + * @return HeartbeatWebSocketFrame + */ + public HeartbeatMsg getHeartbeatMsg(ProtoverEnum protover) { + if (heartbeatMsg == null) { + synchronized (BilibiliWebSocketFrameFactory.this) { + if (heartbeatMsg == null) { + heartbeatMsg = new HeartbeatMsg(protover.getCode()); + } + } + } + return heartbeatMsg; + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliBinaryFrameHandler.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliBinaryFrameHandler.java new file mode 100644 index 0000000..d79efd0 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliBinaryFrameHandler.java @@ -0,0 +1,153 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.netty.handler; + +import cn.hutool.core.util.StrUtil; +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandler; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.bilibili.client.BilibiliLiveChatClient; +import tech.ordinaryroad.live.chat.client.bilibili.constant.BilibiliCmdEnum; +import tech.ordinaryroad.live.chat.client.bilibili.listener.IBilibiliMsgListener; +import tech.ordinaryroad.live.chat.client.bilibili.msg.*; +import tech.ordinaryroad.live.chat.client.bilibili.msg.base.BaseBilibiliMsg; +import tech.ordinaryroad.live.chat.client.bilibili.msg.base.IBilibiliMsg; +import tech.ordinaryroad.live.chat.client.bilibili.util.BilibiliCodecUtil; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientBinaryFrameHandler; + +import java.util.List; + + +/** + * 娑堟伅澶勭悊鍣� + * + * @author mjz + * @date 2023/1/4 + */ +@Slf4j +@ChannelHandler.Sharable +public class BilibiliBinaryFrameHandler extends BaseNettyClientBinaryFrameHandler<BilibiliLiveChatClient, BilibiliBinaryFrameHandler, BilibiliCmdEnum, IBilibiliMsg, IBilibiliMsgListener> { + + public BilibiliBinaryFrameHandler(List<IBilibiliMsgListener> msgListeners, BilibiliLiveChatClient client) { + super(msgListeners, client); + } + + public BilibiliBinaryFrameHandler(List<IBilibiliMsgListener> msgListeners, long roomId) { + super(msgListeners, roomId); + } + + @SneakyThrows + @Override + public void onCmdMsg(BilibiliCmdEnum cmd, ICmdMsg<BilibiliCmdEnum> cmdMsg) { + if (super.msgListeners.isEmpty()) { + return; + } + + SendSmsReplyMsg sendSmsReplyMsg = (SendSmsReplyMsg) cmdMsg; + switch (cmd) { + case DANMU_MSG: { + DanmuMsgMsg danmuMsgMsg = new DanmuMsgMsg(); + danmuMsgMsg.setProtover(sendSmsReplyMsg.getProtover()); + danmuMsgMsg.setInfo(sendSmsReplyMsg.getInfo()); + danmuMsgMsg.setDm_v2(StrUtil.toStringOrNull(sendSmsReplyMsg.getUnknownProperties().get("dm_v2"))); + iteratorMsgListeners(msgListener -> msgListener.onDanmuMsg(BilibiliBinaryFrameHandler.this, danmuMsgMsg)); + break; + } + + case SEND_GIFT: { + SendGiftMsg sendGiftMsg = new SendGiftMsg(); + sendGiftMsg.setRoomId(getRoomIdAsLong()); + sendGiftMsg.setProtover(sendSmsReplyMsg.getProtover()); + SendGiftMsg.Data data = BaseBilibiliMsg.OBJECT_MAPPER.treeToValue(sendSmsReplyMsg.getData(), SendGiftMsg.Data.class); + sendGiftMsg.setData(data); + iteratorMsgListeners(msgListener -> { + msgListener.onGiftMsg(BilibiliBinaryFrameHandler.this, sendGiftMsg); + msgListener.onSendGift(BilibiliBinaryFrameHandler.this, sendSmsReplyMsg); + }); + break; + } + + case SUPER_CHAT_MESSAGE: { + SuperChatMessageMsg superChatMessageMsg = new SuperChatMessageMsg(); + superChatMessageMsg.setProtover(sendSmsReplyMsg.getProtover()); + superChatMessageMsg.setRoomid(sendSmsReplyMsg.getRoomid()); + SuperChatMessageMsg.Data data = BaseBilibiliMsg.OBJECT_MAPPER.treeToValue(sendSmsReplyMsg.getData(), SuperChatMessageMsg.Data.class); + superChatMessageMsg.setData(data); + iteratorMsgListeners(msgListener -> msgListener.onSuperChatMsg(BilibiliBinaryFrameHandler.this, superChatMessageMsg)); + break; + } + + case INTERACT_WORD: { + InteractWordMsg interactWordMsg = new InteractWordMsg(); + interactWordMsg.setProtover(sendSmsReplyMsg.getProtover()); + InteractWordMsg.Data data = BaseBilibiliMsg.OBJECT_MAPPER.treeToValue(sendSmsReplyMsg.getData(), InteractWordMsg.Data.class); + interactWordMsg.setData(data); + iteratorMsgListeners(msgListener -> { + msgListener.onEnterRoomMsg(BilibiliBinaryFrameHandler.this, interactWordMsg); + msgListener.onEnterRoom(BilibiliBinaryFrameHandler.this, sendSmsReplyMsg); + }); + break; + } + + case ENTRY_EFFECT: { + iteratorMsgListeners(msgListener -> msgListener.onEntryEffect(BilibiliBinaryFrameHandler.this, sendSmsReplyMsg)); + break; + } + + case WATCHED_CHANGE: { + iteratorMsgListeners(msgListener -> msgListener.onWatchedChange(BilibiliBinaryFrameHandler.this, sendSmsReplyMsg)); + break; + } + + case LIKE_INFO_V3_CLICK: { + LikeInfoV3ClickMsg likeInfoV3ClickMsg = new LikeInfoV3ClickMsg(); + likeInfoV3ClickMsg.setProtover(sendSmsReplyMsg.getProtover()); + LikeInfoV3ClickMsg.Data data = BaseBilibiliMsg.OBJECT_MAPPER.treeToValue(sendSmsReplyMsg.getData(), LikeInfoV3ClickMsg.Data.class); + likeInfoV3ClickMsg.setData(data); + iteratorMsgListeners(msgListener -> { + msgListener.onLikeMsg(BilibiliBinaryFrameHandler.this, likeInfoV3ClickMsg); + msgListener.onClickLike(BilibiliBinaryFrameHandler.this, sendSmsReplyMsg); + }); + break; + } + + case LIKE_INFO_V3_UPDATE: { + iteratorMsgListeners(msgListener -> msgListener.onClickUpdate(BilibiliBinaryFrameHandler.this, sendSmsReplyMsg)); + break; + } + + default: { + iteratorMsgListeners(msgListener -> msgListener.onOtherCmdMsg(BilibiliBinaryFrameHandler.this, cmd, cmdMsg)); + } + } + } + + @Override + protected List<IBilibiliMsg> decode(ByteBuf byteBuf) { + return BilibiliCodecUtil.decode(byteBuf); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliConnectionHandler.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliConnectionHandler.java new file mode 100644 index 0000000..8bd886e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/netty/handler/BilibiliConnectionHandler.java @@ -0,0 +1,154 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.netty.handler; + +import io.netty.channel.Channel; +import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.bilibili.client.BilibiliLiveChatClient; +import tech.ordinaryroad.live.chat.client.bilibili.config.BilibiliLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.bilibili.netty.frame.factory.BilibiliWebSocketFrameFactory; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientConnectionHandler; + + +/** + * 杩炴帴澶勭悊鍣� + * + * @author mjz + * @date 2023/8/21 + */ +@Slf4j +@ChannelHandler.Sharable +public class BilibiliConnectionHandler extends BaseNettyClientConnectionHandler<BilibiliLiveChatClient, BilibiliConnectionHandler> { + + /** + * 浠lientConfig涓轰富 + */ + private final long roomId; + /** + * 浠lientConfig涓轰富 + */ + private final ProtoverEnum protover; + /** + * 浠lientConfig涓轰富 + */ + private String cookie; + + public BilibiliConnectionHandler(WebSocketClientHandshaker handshaker, BilibiliLiveChatClient client, IBaseConnectionListener<BilibiliConnectionHandler> listener) { + super(handshaker, client, listener); + this.roomId = client.getConfig().getRoomId(); + this.protover = client.getConfig().getProtover(); + this.cookie = client.getConfig().getCookie(); + } + + public BilibiliConnectionHandler(WebSocketClientHandshaker handshaker, BilibiliLiveChatClient client) { + this(handshaker, client, null); + } + + public BilibiliConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, ProtoverEnum protover, IBaseConnectionListener<BilibiliConnectionHandler> listener, String cookie) { + super(handshaker, listener); + this.roomId = roomId; + this.protover = protover; + this.cookie = cookie; + } + + public BilibiliConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, ProtoverEnum protover, IBaseConnectionListener<BilibiliConnectionHandler> listener) { + this(handshaker, roomId, protover, listener, null); + } + + public BilibiliConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, ProtoverEnum protover, String cookie) { + this(handshaker, roomId, protover, null, cookie); + } + + public BilibiliConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, ProtoverEnum protover) { + this(handshaker, roomId, protover, null, null); + } + + @Override + protected void sendHeartbeat(ChannelHandlerContext ctx) { + if (log.isDebugEnabled()) { + log.debug("鍙戦�佸績璺冲寘"); + } + ctx.writeAndFlush( + getWebSocketFrameFactory(getRoomId()).createHeartbeat(getProtover()) + ).addListener((ChannelFutureListener) future -> { + if (future.isSuccess()) { + if (log.isDebugEnabled()) { + log.debug("蹇冭烦鍖呭彂閫佸畬鎴�"); + } + } else { + log.error("蹇冭烦鍖呭彂閫佸け璐�", future.cause()); + } + }); + } + + private static BilibiliWebSocketFrameFactory getWebSocketFrameFactory(long roomId) { + return BilibiliWebSocketFrameFactory.getInstance(roomId); + } + + @Override + public void sendAuthRequest(Channel channel) { + // 5s鍐呰璇� + if (log.isDebugEnabled()) { + log.debug("鍙戦�佽璇佸寘"); + } + channel.writeAndFlush(getWebSocketFrameFactory(getRoomId()).createAuth(getProtover(), getCookie())); + } + + public long getRoomId() { + return client != null ? client.getConfig().getRoomId() : roomId; + } + + private ProtoverEnum getProtover() { + return client != null ? client.getConfig().getProtover() : protover; + } + + private String getCookie() { + return client != null ? client.getConfig().getCookie() : cookie; + } + + @Override + protected long getHeartbeatPeriod() { + if (client == null) { + return BilibiliLiveChatClientConfig.DEFAULT_HEARTBEAT_PERIOD; + } else { + return client.getConfig().getHeartbeatPeriod(); + } + } + + @Override + protected long getHeartbeatInitialDelay() { + if (client == null) { + return BilibiliLiveChatClientConfig.DEFAULT_HEARTBEAT_INITIAL_DELAY; + } else { + return client.getConfig().getHeartbeatInitialDelay(); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/Dm_v2Proto.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/Dm_v2Proto.java new file mode 100644 index 0000000..5666f45 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/Dm_v2Proto.java @@ -0,0 +1,78 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: dm_v2.proto + +package tech.ordinaryroad.live.chat.client.bilibili.protobuf; + +public final class Dm_v2Proto { + private Dm_v2Proto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\013dm_v2.proto\0224tech.ordinaryroad.live.ch" + + "at.client.bilibili.protobuf\032\016dm_v2_20.pr" + + "oto\"Y\n\005dm_v2\022P\n\010dm_v2_20\030\024 \001(\0132>.tech.or" + + "dinaryroad.live.chat.client.bilibili.pro" + + "tobuf.dm_v2_20BJ\n4tech.ordinaryroad.live" + + ".chat.client.bilibili.protobufB\nDm_v2Pro" + + "toP\001\242\002\003GPBb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + Dm_v2_20Proto.getDescriptor(), + }); + internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_descriptor, + new String[] { "DmV220", }); + Dm_v2_20Proto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/Dm_v2_20Proto.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/Dm_v2_20Proto.java new file mode 100644 index 0000000..fab53e0 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/Dm_v2_20Proto.java @@ -0,0 +1,74 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: dm_v2_20.proto + +package tech.ordinaryroad.live.chat.client.bilibili.protobuf; + +public final class Dm_v2_20Proto { + private Dm_v2_20Proto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_20_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_20_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + String[] descriptorData = { + "\n\016dm_v2_20.proto\0224tech.ordinaryroad.live" + + ".chat.client.bilibili.protobuf\"\032\n\010dm_v2_" + + "20\022\016\n\006avatar\030\004 \001(\tBM\n4tech.ordinaryroad." + + "live.chat.client.bilibili.protobufB\rDm_v" + + "2_20ProtoP\001\242\002\003GPBb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_20_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_20_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_20_descriptor, + new String[] { "Avatar", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/dm_v2.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/dm_v2.java new file mode 100644 index 0000000..9729277 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/dm_v2.java @@ -0,0 +1,610 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: dm_v2.proto + +package tech.ordinaryroad.live.chat.client.bilibili.protobuf; + +/** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2} + */ +public final class dm_v2 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2) + dm_v2OrBuilder { +private static final long serialVersionUID = 0L; + // Use dm_v2.newBuilder() to construct. + private dm_v2(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private dm_v2() { + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new dm_v2(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Dm_v2Proto.internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Dm_v2Proto.internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + dm_v2.class, Builder.class); + } + + public static final int DM_V2_20_FIELD_NUMBER = 20; + private dm_v2_20 dmV220_; + /** + * <code>.tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20 dm_v2_20 = 20;</code> + * @return Whether the dmV220 field is set. + */ + @Override + public boolean hasDmV220() { + return dmV220_ != null; + } + /** + * <code>.tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20 dm_v2_20 = 20;</code> + * @return The dmV220. + */ + @Override + public dm_v2_20 getDmV220() { + return dmV220_ == null ? dm_v2_20.getDefaultInstance() : dmV220_; + } + /** + * <code>.tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20 dm_v2_20 = 20;</code> + */ + @Override + public dm_v2_20OrBuilder getDmV220OrBuilder() { + return dmV220_ == null ? dm_v2_20.getDefaultInstance() : dmV220_; + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (dmV220_ != null) { + output.writeMessage(20, getDmV220()); + } + getUnknownFields().writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dmV220_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, getDmV220()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof dm_v2)) { + return super.equals(obj); + } + dm_v2 other = (dm_v2) obj; + + if (hasDmV220() != other.hasDmV220()) return false; + if (hasDmV220()) { + if (!getDmV220() + .equals(other.getDmV220())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDmV220()) { + hash = (37 * hash) + DM_V2_20_FIELD_NUMBER; + hash = (53 * hash) + getDmV220().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static dm_v2 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static dm_v2 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static dm_v2 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static dm_v2 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static dm_v2 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static dm_v2 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static dm_v2 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static dm_v2 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static dm_v2 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static dm_v2 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static dm_v2 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static dm_v2 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(dm_v2 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2) + dm_v2OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Dm_v2Proto.internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Dm_v2Proto.internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_fieldAccessorTable + .ensureFieldAccessorsInitialized( + dm_v2.class, Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2.newBuilder() + private Builder() { + + } + + private Builder( + BuilderParent parent) { + super(parent); + + } + @Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dmV220_ = null; + if (dmV220Builder_ != null) { + dmV220Builder_.dispose(); + dmV220Builder_ = null; + } + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Dm_v2Proto.internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_descriptor; + } + + @Override + public dm_v2 getDefaultInstanceForType() { + return dm_v2.getDefaultInstance(); + } + + @Override + public dm_v2 build() { + dm_v2 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public dm_v2 buildPartial() { + dm_v2 result = new dm_v2(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(dm_v2 result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dmV220_ = dmV220Builder_ == null + ? dmV220_ + : dmV220Builder_.build(); + } + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof dm_v2) { + return mergeFrom((dm_v2)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(dm_v2 other) { + if (other == dm_v2.getDefaultInstance()) return this; + if (other.hasDmV220()) { + mergeDmV220(other.getDmV220()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 162: { + input.readMessage( + getDmV220FieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 162 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private dm_v2_20 dmV220_; + private com.google.protobuf.SingleFieldBuilderV3< + dm_v2_20, dm_v2_20.Builder, dm_v2_20OrBuilder> dmV220Builder_; + /** + * <code>.tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20 dm_v2_20 = 20;</code> + * @return Whether the dmV220 field is set. + */ + public boolean hasDmV220() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20 dm_v2_20 = 20;</code> + * @return The dmV220. + */ + public dm_v2_20 getDmV220() { + if (dmV220Builder_ == null) { + return dmV220_ == null ? dm_v2_20.getDefaultInstance() : dmV220_; + } else { + return dmV220Builder_.getMessage(); + } + } + /** + * <code>.tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20 dm_v2_20 = 20;</code> + */ + public Builder setDmV220(dm_v2_20 value) { + if (dmV220Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dmV220_ = value; + } else { + dmV220Builder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20 dm_v2_20 = 20;</code> + */ + public Builder setDmV220( + dm_v2_20.Builder builderForValue) { + if (dmV220Builder_ == null) { + dmV220_ = builderForValue.build(); + } else { + dmV220Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20 dm_v2_20 = 20;</code> + */ + public Builder mergeDmV220(dm_v2_20 value) { + if (dmV220Builder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + dmV220_ != null && + dmV220_ != dm_v2_20.getDefaultInstance()) { + getDmV220Builder().mergeFrom(value); + } else { + dmV220_ = value; + } + } else { + dmV220Builder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20 dm_v2_20 = 20;</code> + */ + public Builder clearDmV220() { + bitField0_ = (bitField0_ & ~0x00000001); + dmV220_ = null; + if (dmV220Builder_ != null) { + dmV220Builder_.dispose(); + dmV220Builder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20 dm_v2_20 = 20;</code> + */ + public dm_v2_20.Builder getDmV220Builder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDmV220FieldBuilder().getBuilder(); + } + /** + * <code>.tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20 dm_v2_20 = 20;</code> + */ + public dm_v2_20OrBuilder getDmV220OrBuilder() { + if (dmV220Builder_ != null) { + return dmV220Builder_.getMessageOrBuilder(); + } else { + return dmV220_ == null ? + dm_v2_20.getDefaultInstance() : dmV220_; + } + } + /** + * <code>.tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20 dm_v2_20 = 20;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + dm_v2_20, dm_v2_20.Builder, dm_v2_20OrBuilder> + getDmV220FieldBuilder() { + if (dmV220Builder_ == null) { + dmV220Builder_ = new com.google.protobuf.SingleFieldBuilderV3< + dm_v2_20, dm_v2_20.Builder, dm_v2_20OrBuilder>( + getDmV220(), + getParentForChildren(), + isClean()); + dmV220_ = null; + } + return dmV220Builder_; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2) + private static final dm_v2 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new dm_v2(); + } + + public static dm_v2 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<dm_v2> + PARSER = new com.google.protobuf.AbstractParser<dm_v2>() { + @Override + public dm_v2 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<dm_v2> parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser<dm_v2> getParserForType() { + return PARSER; + } + + @Override + public dm_v2 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/dm_v2OrBuilder.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/dm_v2OrBuilder.java new file mode 100644 index 0000000..f219e9e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/dm_v2OrBuilder.java @@ -0,0 +1,48 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: dm_v2.proto + +package tech.ordinaryroad.live.chat.client.bilibili.protobuf; + +public interface dm_v2OrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20 dm_v2_20 = 20;</code> + * @return Whether the dmV220 field is set. + */ + boolean hasDmV220(); + /** + * <code>.tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20 dm_v2_20 = 20;</code> + * @return The dmV220. + */ + dm_v2_20 getDmV220(); + /** + * <code>.tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20 dm_v2_20 = 20;</code> + */ + dm_v2_20OrBuilder getDmV220OrBuilder(); +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/dm_v2_20.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/dm_v2_20.java new file mode 100644 index 0000000..a10e7d3 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/dm_v2_20.java @@ -0,0 +1,565 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: dm_v2_20.proto + +package tech.ordinaryroad.live.chat.client.bilibili.protobuf; + +/** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20} + */ +public final class dm_v2_20 extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20) + dm_v2_20OrBuilder { +private static final long serialVersionUID = 0L; + // Use dm_v2_20.newBuilder() to construct. + private dm_v2_20(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private dm_v2_20() { + avatar_ = ""; + } + + @Override + @SuppressWarnings({"unused"}) + protected Object newInstance( + UnusedPrivateParameter unused) { + return new dm_v2_20(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Dm_v2_20Proto.internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_20_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Dm_v2_20Proto.internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_20_fieldAccessorTable + .ensureFieldAccessorsInitialized( + dm_v2_20.class, Builder.class); + } + + public static final int AVATAR_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile Object avatar_ = ""; + /** + * <code>string avatar = 4;</code> + * @return The avatar. + */ + @Override + public String getAvatar() { + Object ref = avatar_; + if (ref instanceof String) { + return (String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + avatar_ = s; + return s; + } + } + /** + * <code>string avatar = 4;</code> + * @return The bytes for avatar. + */ + @Override + public com.google.protobuf.ByteString + getAvatarBytes() { + Object ref = avatar_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + avatar_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatar_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, avatar_); + } + getUnknownFields().writeTo(output); + } + + @Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatar_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, avatar_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @Override + public boolean equals(final Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof dm_v2_20)) { + return super.equals(obj); + } + dm_v2_20 other = (dm_v2_20) obj; + + if (!getAvatar() + .equals(other.getAvatar())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AVATAR_FIELD_NUMBER; + hash = (53 * hash) + getAvatar().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static dm_v2_20 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static dm_v2_20 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static dm_v2_20 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static dm_v2_20 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static dm_v2_20 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static dm_v2_20 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static dm_v2_20 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static dm_v2_20 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static dm_v2_20 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static dm_v2_20 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static dm_v2_20 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static dm_v2_20 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(dm_v2_20 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @Override + protected Builder newBuilderForType( + BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20) + dm_v2_20OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return Dm_v2_20Proto.internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_20_descriptor; + } + + @Override + protected FieldAccessorTable + internalGetFieldAccessorTable() { + return Dm_v2_20Proto.internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_20_fieldAccessorTable + .ensureFieldAccessorsInitialized( + dm_v2_20.class, Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20.newBuilder() + private Builder() { + + } + + private Builder( + BuilderParent parent) { + super(parent); + + } + @Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + avatar_ = ""; + return this; + } + + @Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return Dm_v2_20Proto.internal_static_tech_ordinaryroad_live_chat_client_bilibili_protobuf_dm_v2_20_descriptor; + } + + @Override + public dm_v2_20 getDefaultInstanceForType() { + return dm_v2_20.getDefaultInstance(); + } + + @Override + public dm_v2_20 build() { + dm_v2_20 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @Override + public dm_v2_20 buildPartial() { + dm_v2_20 result = new dm_v2_20(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(dm_v2_20 result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.avatar_ = avatar_; + } + } + + @Override + public Builder clone() { + return super.clone(); + } + @Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.setField(field, value); + } + @Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, Object value) { + return super.setRepeatedField(field, index, value); + } + @Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return super.addRepeatedField(field, value); + } + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof dm_v2_20) { + return mergeFrom((dm_v2_20)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(dm_v2_20 other) { + if (other == dm_v2_20.getDefaultInstance()) return this; + if (!other.getAvatar().isEmpty()) { + avatar_ = other.avatar_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @Override + public final boolean isInitialized() { + return true; + } + + @Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 34: { + avatar_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private Object avatar_ = ""; + /** + * <code>string avatar = 4;</code> + * @return The avatar. + */ + public String getAvatar() { + Object ref = avatar_; + if (!(ref instanceof String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + String s = bs.toStringUtf8(); + avatar_ = s; + return s; + } else { + return (String) ref; + } + } + /** + * <code>string avatar = 4;</code> + * @return The bytes for avatar. + */ + public com.google.protobuf.ByteString + getAvatarBytes() { + Object ref = avatar_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (String) ref); + avatar_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string avatar = 4;</code> + * @param value The avatar to set. + * @return This builder for chaining. + */ + public Builder setAvatar( + String value) { + if (value == null) { throw new NullPointerException(); } + avatar_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string avatar = 4;</code> + * @return This builder for chaining. + */ + public Builder clearAvatar() { + avatar_ = getDefaultInstance().getAvatar(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string avatar = 4;</code> + * @param value The bytes for avatar to set. + * @return This builder for chaining. + */ + public Builder setAvatarBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + avatar_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20) + private static final dm_v2_20 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new dm_v2_20(); + } + + public static dm_v2_20 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<dm_v2_20> + PARSER = new com.google.protobuf.AbstractParser<dm_v2_20>() { + @Override + public dm_v2_20 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<dm_v2_20> parser() { + return PARSER; + } + + @Override + public com.google.protobuf.Parser<dm_v2_20> getParserForType() { + return PARSER; + } + + @Override + public dm_v2_20 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/dm_v2_20OrBuilder.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/dm_v2_20OrBuilder.java new file mode 100644 index 0000000..d634567 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/protobuf/dm_v2_20OrBuilder.java @@ -0,0 +1,45 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: dm_v2_20.proto + +package tech.ordinaryroad.live.chat.client.bilibili.protobuf; + +public interface dm_v2_20OrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.bilibili.protobuf.dm_v2_20) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string avatar = 4;</code> + * @return The avatar. + */ + String getAvatar(); + /** + * <code>string avatar = 4;</code> + * @return The bytes for avatar. + */ + com.google.protobuf.ByteString + getAvatarBytes(); +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/util/BilibiliCodecUtil.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/util/BilibiliCodecUtil.java new file mode 100644 index 0000000..9841cae --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/java/tech/ordinaryroad/live/chat/client/bilibili/util/BilibiliCodecUtil.java @@ -0,0 +1,259 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.util; + +import cn.hutool.core.util.StrUtil; +import com.aayushatharva.brotli4j.Brotli4jLoader; +import com.aayushatharva.brotli4j.decoder.BrotliInputStream; +import com.fasterxml.jackson.core.JsonProcessingException; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.bilibili.constant.OperationEnum; +import tech.ordinaryroad.live.chat.client.bilibili.constant.ProtoverEnum; +import tech.ordinaryroad.live.chat.client.bilibili.msg.AuthReplyMsg; +import tech.ordinaryroad.live.chat.client.bilibili.msg.HeartbeatMsg; +import tech.ordinaryroad.live.chat.client.bilibili.msg.HeartbeatReplyMsg; +import tech.ordinaryroad.live.chat.client.bilibili.msg.SendSmsReplyMsg; +import tech.ordinaryroad.live.chat.client.bilibili.msg.base.BaseBilibiliMsg; +import tech.ordinaryroad.live.chat.client.bilibili.msg.base.IBilibiliMsg; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.math.BigInteger; +import java.nio.charset.StandardCharsets; +import java.util.*; +import java.util.zip.DataFormatException; +import java.util.zip.Inflater; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Slf4j +public class BilibiliCodecUtil { + + public static int sequence = 0; + + public static final short FRAME_HEADER_LENGTH = 16; + + public static ByteBuf encode(BaseBilibiliMsg msg) { + ByteBuf out = Unpooled.buffer(FRAME_HEADER_LENGTH); + String bodyJsonString = StrUtil.EMPTY; + // HeartbeatMsg涓嶉渶瑕佹鏂囷紝濡傛灉搴忓垪鍖栧悗寰楀埌`{}`锛屽垯鏇挎崲涓虹┖瀛楃涓� + if (!(msg instanceof HeartbeatMsg)) { + bodyJsonString = msg.toString(); + if (StrUtil.EMPTY_JSON.equals(bodyJsonString)) { + bodyJsonString = StrUtil.EMPTY; + } + } + byte[] bodyBytes = bodyJsonString.getBytes(StandardCharsets.UTF_8); + int length = bodyBytes.length + FRAME_HEADER_LENGTH; + out.writeInt(length); + out.writeShort(FRAME_HEADER_LENGTH); + out.writeShort(msg.getProtoverEnum().getCode()); + out.writeInt(msg.getOperationEnum().getCode()); + out.writeInt(sequence++); + out.writeBytes(bodyBytes); + return out; + } + + public static List<IBilibiliMsg> decode(ByteBuf in) { + List<IBilibiliMsg> msgList = new ArrayList<>(); + Queue<ByteBuf> pendingByteBuf = new LinkedList<>(); + + do { + Optional<IBilibiliMsg> msg = doDecode(in, pendingByteBuf); + msg.ifPresent(msgList::add); + in = pendingByteBuf.poll(); + } while (in != null); + + return msgList; + } + + /** + * 鎵ц瑙g爜鎿嶄綔锛屾湁鍘嬬缉鍒欏厛瑙e帇锛岃В鍘嬪悗鍙兘寰楀埌澶氭潯娑堟伅 + * + * @param in handler鏀跺埌鐨勪竴鏉℃秷鎭� + * @param pendingByteBuf 鐢ㄤ簬瀛樻斁鏈鍙栧畬鐨凚yteBuf + * @return Optional<IBilibiliMsg> 浣曟椂涓虹┖鍊硷細涓嶆敮鎸佺殑{@link OperationEnum}锛屼笉鏀寔鐨剓@link ProtoverEnum}锛寋@link #parse(OperationEnum, String)}鍙嶅簭鍒楀寲澶辫触 + * @see OperationEnum + * @see ProtoverEnum + */ + private static Optional<IBilibiliMsg> doDecode(ByteBuf in, Queue<ByteBuf> pendingByteBuf) { + int length = in.readInt(); + short frameHeaderLength = in.readShort(); + short protoverCode = in.readShort(); + int operationCode = in.readInt(); + int sequence = in.readInt(); + int contentLength = length - frameHeaderLength; + byte[] inputBytes = new byte[contentLength]; + in.readBytes(inputBytes); + if (in.readableBytes() != 0) { + // log.error("in.readableBytes() {}", in.readableBytes()); + pendingByteBuf.offer(in); + } + + OperationEnum operationEnum = OperationEnum.getByCode(operationCode); + if (operationEnum == null) { + throw new BaseException(String.format("鏈煡operation: %d", operationCode)); + } + if (protoverCode == ProtoverEnum.NORMAL_ZLIB.getCode()) { + switch (operationEnum) { + case SEND_SMS_REPLY: { + // Decompress the bytes + Inflater inflater = new Inflater(); + inflater.reset(); + inflater.setInput(inputBytes); + ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(contentLength); + try { + byte[] bytes = new byte[1024]; + while (!inflater.finished()) { + int count = inflater.inflate(bytes); + byteArrayOutputStream.write(bytes, 0, count); + } + } catch (DataFormatException e) { + throw new BaseException(e); + } + inflater.end(); + + return doDecode(Unpooled.wrappedBuffer(byteArrayOutputStream.toByteArray()), pendingByteBuf); + } + case HEARTBEAT_REPLY: { + BigInteger bigInteger = new BigInteger(inputBytes); + return parse(operationEnum, String.format("{\"popularity\":%d}", bigInteger)); + } + default: { + String s = new String(inputBytes, StandardCharsets.UTF_8); + return parse(operationEnum, s); + } + } + } else if (protoverCode == ProtoverEnum.NORMAL_NO_COMPRESSION.getCode()) { + switch (operationEnum) { + case HEARTBEAT_REPLY: { + BigInteger bigInteger = new BigInteger(inputBytes); + return parse(operationEnum, String.format("{\"popularity\":%d}", bigInteger)); + } + default: { + String s = new String(inputBytes, StandardCharsets.UTF_8); + return parse(operationEnum, s); + } + } + } else if (protoverCode == ProtoverEnum.HEARTBEAT_AUTH_NO_COMPRESSION.getCode()) { + switch (operationEnum) { + case HEARTBEAT_REPLY: { + BigInteger bigInteger = new BigInteger(inputBytes); + return parse(operationEnum, String.format("{\"popularity\":%d}", bigInteger)); + } + default: { + String s = new String(inputBytes, StandardCharsets.UTF_8); + return parse(operationEnum, s); + } + } + } else if (protoverCode == ProtoverEnum.NORMAL_BROTLI.getCode()) { + switch (operationEnum) { + case SEND_SMS_REPLY: { + // Load the native library + Brotli4jLoader.ensureAvailability(); + + ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(inputBytes); + ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(contentLength); + byte[] bytes = new byte[1024]; + BrotliInputStream brotliInputStream = null; + ByteBuf wrappedBuffer = null; + try { + brotliInputStream = new BrotliInputStream(byteArrayInputStream); + int count; + while ((count = brotliInputStream.read(bytes)) > -1) { + byteArrayOutputStream.write(bytes, 0, count); + } + wrappedBuffer = Unpooled.wrappedBuffer(byteArrayOutputStream.toByteArray()); + } catch (IOException e) { + throw new BaseException(e); + } finally { + try { + // Close the BrotliInputStream. This also closes the InputStream. + if (brotliInputStream != null) { + brotliInputStream.close(); + } + byteArrayOutputStream.close(); + } catch (IOException e) { + log.error("瑙e帇澶辫触", e); + } + } + return doDecode(wrappedBuffer, pendingByteBuf); + } + case HEARTBEAT_REPLY: { + BigInteger bigInteger = new BigInteger(inputBytes); + return parse(operationEnum, String.format("{\"popularity\":%d}", bigInteger)); + } + default: { + String s = new String(inputBytes, StandardCharsets.UTF_8); + return parse(operationEnum, s); + } + } + } else { + if (log.isWarnEnabled()) { + log.warn("鏆備笉鏀寔鐨勭増鏈細{}", protoverCode); + } + return Optional.empty(); + } + } + + public static Optional<IBilibiliMsg> parse(OperationEnum operation, String jsonString) { + switch (operation) { + case SEND_SMS_REPLY: { + try { + return Optional.ofNullable(BaseBilibiliMsg.OBJECT_MAPPER.readValue(jsonString, SendSmsReplyMsg.class)); + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } + case AUTH_REPLY: { + try { + return Optional.ofNullable(BaseBilibiliMsg.OBJECT_MAPPER.readValue(jsonString, AuthReplyMsg.class)); + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } + case HEARTBEAT_REPLY: { + try { + return Optional.ofNullable(BaseBilibiliMsg.OBJECT_MAPPER.readValue(jsonString, HeartbeatReplyMsg.class)); + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } + default: { + if (log.isWarnEnabled()) { + log.warn("鏆備笉鏀寔 {}", operation); + } + return Optional.empty(); + } + } + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/resources/proto/dm_v2.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/resources/proto/dm_v2.proto new file mode 100644 index 0000000..53bf69c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/resources/proto/dm_v2.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +package tech.ordinaryroad.live.chat.client.bilibili.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.bilibili.protobuf"; +option java_outer_classname = "Dm_v2Proto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +import "dm_v2_20.proto"; + +message dm_v2 { + dm_v2_20 dm_v2_20 = 20; +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/resources/proto/dm_v2_20.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/resources/proto/dm_v2_20.proto new file mode 100644 index 0000000..3cb8779 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/main/resources/proto/dm_v2_20.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package tech.ordinaryroad.live.chat.client.bilibili.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.bilibili.protobuf"; +option java_outer_classname = "Dm_v2_20Proto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +message dm_v2_20 { + string avatar = 4; +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/test/java/tech/ordinaryroad/live/chat/client/bilibili/api/BilibiliApisTest.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/test/java/tech/ordinaryroad/live/chat/client/bilibili/api/BilibiliApisTest.java new file mode 100644 index 0000000..f602e36 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/test/java/tech/ordinaryroad/live/chat/client/bilibili/api/BilibiliApisTest.java @@ -0,0 +1,16 @@ +package tech.ordinaryroad.live.chat.client.bilibili.api; + +import org.junit.jupiter.api.Test; + +/** + * @author mjz + * @date 2023/9/7 + */ +class BilibiliApisTest { + + @Test + void sendMsg() { + String cookie = System.getenv("cookie"); + BilibiliApis.sendMsg("666", 545068, cookie); + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/test/java/tech/ordinaryroad/live/chat/client/bilibili/client/BilibiliLiveChatClientTest.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/test/java/tech/ordinaryroad/live/chat/client/bilibili/client/BilibiliLiveChatClientTest.java new file mode 100644 index 0000000..1d3f6ca --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-bilibili/src/test/java/tech/ordinaryroad/live/chat/client/bilibili/client/BilibiliLiveChatClientTest.java @@ -0,0 +1,176 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.bilibili.client; + +import cn.hutool.core.thread.ThreadUtil; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.bilibili.config.BilibiliLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.bilibili.constant.BilibiliCmdEnum; +import tech.ordinaryroad.live.chat.client.bilibili.listener.IBilibiliMsgListener; +import tech.ordinaryroad.live.chat.client.bilibili.msg.*; +import tech.ordinaryroad.live.chat.client.bilibili.netty.handler.BilibiliBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; + +/** + * @author mjz + * @date 2023/8/26 + */ +@Slf4j +class BilibiliLiveChatClientTest { + + static Object lock = new Object(); + BilibiliLiveChatClient client; + + @Test + void example() throws InterruptedException { + String cookie = System.getenv("cookie"); + log.error("cookie: {}", cookie); + BilibiliLiveChatClientConfig config = BilibiliLiveChatClientConfig.builder() + // TODO 娴忚鍣–ookie + .cookie(cookie) + .roomId(7777) + .roomId(697) + .build(); + + client = new BilibiliLiveChatClient(config, new IBilibiliMsgListener() { + @Override + public void onDanmuMsg(BilibiliBinaryFrameHandler binaryFrameHandler, DanmuMsgMsg msg) { + IBilibiliMsgListener.super.onDanmuMsg(binaryFrameHandler, msg); + log.info("{} 鏀跺埌寮瑰箷 {} {}({})锛歿}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onGiftMsg(BilibiliBinaryFrameHandler binaryFrameHandler, SendGiftMsg msg) { + IBilibiliMsgListener.super.onGiftMsg(binaryFrameHandler, msg); + log.info("{} 鏀跺埌绀肩墿 {} {}({}) {} {}({})x{}({})", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getData().getAction(), msg.getGiftName(), msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice()); + } + + @Override + public void onSuperChatMsg(BilibiliBinaryFrameHandler binaryFrameHandler, SuperChatMessageMsg msg) { + IBilibiliMsgListener.super.onSuperChatMsg(binaryFrameHandler, msg); + log.info("{} 鏀跺埌閱掔洰鐣欒█ {}({})锛歿}", binaryFrameHandler.getRoomId(), msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onEnterRoomMsg(InteractWordMsg msg) { + log.info("{} {}({}) 杩涘叆鐩存挱闂�", msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + + @Override + public void onLikeMsg(BilibiliBinaryFrameHandler binaryFrameHandler, LikeInfoV3ClickMsg msg) { + IBilibiliMsgListener.super.onLikeMsg(binaryFrameHandler, msg); + log.info("{} 鏀跺埌鐐硅禐 {} {}({})", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + + @Override + public void onEntryEffect(SendSmsReplyMsg msg) { + JsonNode data = msg.getData(); + String copyWriting = data.get("copy_writing").asText(); + log.info("鍏ュ満鏁堟灉 {}", copyWriting); + } + + @Override + public void onWatchedChange(SendSmsReplyMsg msg) { + JsonNode data = msg.getData(); + int num = data.get("num").asInt(); + String textSmall = data.get("text_small").asText(); + String textLarge = data.get("text_large").asText(); + log.debug("瑙傜湅浜烘暟鍙樺寲 {} {} {}", num, textSmall, textLarge); + } + + @Override + public void onClickLike(SendSmsReplyMsg msg) { + JsonNode data = msg.getData(); + String uname = data.get("uname").asText(); + String likeText = data.get("like_text").asText(); + log.debug("涓轰富鎾偣璧� {} {}", uname, likeText); + } + + @Override + public void onClickUpdate(SendSmsReplyMsg msg) { + JsonNode data = msg.getData(); + int clickCount = data.get("click_count").asInt(); + log.debug("鐐硅禐鏁版洿鏂� {}", clickCount); + } + + @Override + public void onMsg(IMsg msg) { + log.debug("鏀跺埌{}娑堟伅 {}", msg.getClass(), msg); + } + + @Override + public void onCmdMsg(BilibiliCmdEnum cmd, ICmdMsg<BilibiliCmdEnum> cmdMsg) { + log.debug("鏀跺埌CMD娑堟伅{} {}", cmd, cmdMsg); + } + + @Override + public void onOtherCmdMsg(BilibiliCmdEnum cmd, ICmdMsg<BilibiliCmdEnum> cmdMsg) { +// log.debug("鏀跺埌鍏朵粬CMD娑堟伅 {}", cmd); + switch (cmd) { + case GUARD_BUY: { + // 鏈変汉涓婅埌 + SendSmsReplyMsg sendSmsReplyMsg = (SendSmsReplyMsg) cmdMsg; + break; + } + case SUPER_CHAT_MESSAGE_DELETE: { + // 鍒犻櫎閱掔洰鐣欒█ + SendSmsReplyMsg sendSmsReplyMsg = (SendSmsReplyMsg) cmdMsg; + break; + } + } + } + + @Override + public void onUnknownCmd(String cmdString, IMsg msg) { + log.debug("鏀跺埌鏈煡CMD娑堟伅 {}", cmdString); + } + }); + client.connect(); + + client.addStatusChangeListener(evt -> { + ClientStatusEnums newValue = (ClientStatusEnums) evt.getNewValue(); + if (newValue == ClientStatusEnums.CONNECTED) { + ThreadUtil.execAsync(() -> { + ThreadUtil.sleep(5000); + client.clickLike(5, () -> { + log.warn("涓轰富鎾偣璧炴垚鍔�"); + }); + }); + } + }); + + // 闃叉娴嬭瘯鏃剁洿鎺ラ��鍑� + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/pom.xml b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/pom.xml new file mode 100644 index 0000000..a3690f8 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/pom.xml @@ -0,0 +1,42 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-clients</artifactId> + <version>${revision}</version> + <relativePath>../pom.xml</relativePath> + </parent> + <packaging>jar</packaging> + + <artifactId>live-chat-client-douyin</artifactId> + <name>live-chat-client-douyin</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-servers-netty-client</artifactId> + </dependency> + + <dependency> + <groupId>com.google.protobuf</groupId> + <artifactId>protobuf-java-util</artifactId> + </dependency> + + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + </dependency> + + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter</artifactId> + <version>${junit-jupiter.version}</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/ClientModeExample.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/ClientModeExample.java new file mode 100644 index 0000000..c2c8678 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/ClientModeExample.java @@ -0,0 +1,81 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin; + +import cn.hutool.core.util.RandomUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; +import tech.ordinaryroad.live.chat.client.douyin.client.DouyinLiveChatClient; +import tech.ordinaryroad.live.chat.client.douyin.config.DouyinLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyin.listener.IDouyinMsgListener; +import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinDanmuMsg; +import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinBinaryFrameHandler; + +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; + +public class ClientModeExample { + static Logger log = LoggerFactory.getLogger(ClientModeExample.class); + + public static void main(String[] args) { + // 1. 鍒涘缓閰嶇疆 + DouyinLiveChatClientConfig config = DouyinLiveChatClientConfig.builder() + // TODO 娴忚鍣–ookie + .cookie("did=web_6c4ac2a8ef8855d35df4d564baeaa8e8; kuaishou.live.bfb1s=7206d814e5c089a58c910ed8bf52ace5; clientid=3; did=web_6c4ac2a8ef8855d35df4d564baeaa8e8; client_key=65890b29; kpn=GAME_ZONE; userId=3941614875; kuaishou.live.web_st=ChRrdWFpc2hvdS5saXZlLndlYi5zdBKgAbRhgemDxM_Z_lBn7EZ_-5unvtslsh7ci5VY_eg80qqjxy5yb7oBFrdcWSPlz6jMIBz9h_yoLzATE3ngj2WawpxvbJhmq0EnRYIHv308kTBmg4KN2JQf7w2mfrsp1vusFbZ3NkfsEO4PrGQfX0L6mJRbgXeBqyz4tUM5O0q2Jte_NzWkaOnezvIGRAG8Y6yA1dxGUmiA9syTrPrdnSOzZvAaEoJNhwQ4OUDtgURWN6k9Xgm8PSIgAfV-ZvahtgaYhopZno6OuS2pkaFZjrz4ymoEZ1DSnj0oBTAB; kuaishou.live.web_ph=a287be6ab01dce264c0554eed94c2d6ac991; userId=3941614875") + // TODO 鐩存挱闂磇d锛堟敮鎸佺煭id锛� + .roomId("Jiazi-9931") + .build(); + + // 2. 鍒涘缓Client骞朵紶鍏ラ厤缃�佹坊鍔犳秷鎭洖璋� + DouyinLiveChatClient client = new DouyinLiveChatClient(config, new IDouyinMsgListener() { +// @Override +// public void onMsg(IMsg msg) { +// log.debug("鏀跺埌{}娑堟伅 {}", msg.getClass(), msg); +// } +// @Override +// public void onUnknownCmd(String cmdString, IMsg msg) { +// log.debug("鏀跺埌鏈煡CMD娑堟伅 {}", cmdString); +// } + + @Override + public void onDanmuMsg(DouyinBinaryFrameHandler douyinBinaryFrameHandler, DouyinDanmuMsg msg) { + log.info("{} 鏀跺埌寮瑰箷 [{}] {}({})锛歿}", douyinBinaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); + } + + }); + // 3. 寮�濮嬬洃鍚洿鎾棿 + client.connect(); + + // 瀹㈡埛绔繛鎺ョ姸鎬佸洖璋� +// client.addStatusChangeListener(evt -> { +// if (evt.getNewValue().equals(ClientStatusEnums.CONNECTED)) { +// // TODO 瑕佸彂閫佺殑寮瑰箷鍐呭锛岃娉ㄦ剰鎺у埗鍙戦�侀鐜囷紱妗嗘灦鍐呯疆鏀寔璁剧疆鍙戦�佸脊骞曠殑鏈�灏戞椂闂撮棿闅旓紝灏忎簬鏃跺皢蹇界暐璇ユ鍙戦�� +// client.sendDanmu("666666" + RandomUtil.randomNumbers(1)); +// } +// }); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/api/DouyinApis.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/api/DouyinApis.java new file mode 100644 index 0000000..d361e3a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/api/DouyinApis.java @@ -0,0 +1,108 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.api; + +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.RandomUtil; +import cn.hutool.core.util.ReUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpResponse; +import cn.hutool.http.HttpStatus; +import cn.hutool.http.HttpUtil; +import lombok.*; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatCookieUtil; + +import java.util.Map; + +/** + * @author mjz + * @date 2024/1/3 + */ +@Slf4j +public class DouyinApis { + + public static final String KEY_COOKIE_TTWID = "ttwid"; + public static final String KEY_COOKIE_MS_TOKEN = "msToken"; + public static final String KEY_COOKIE_AC_NONCE = "__ac_nonce"; + public static final String MS_TOKEN_BASE_STRING = RandomUtil.BASE_CHAR_NUMBER_LOWER + "=_"; + public static final int MS_TOKEN_LENGTH = 107; + public static final int AC_NONCE_LENGTH = 21; + public static final String PATTERN_USER_UNIQUE_ID = "\\\\\"user_unique_id\\\\\":\\\\\"(\\d+)\\\\\""; + public static final String PATTERN_ROOM_ID = "\\\\\"roomId\\\\\":\\\\\"(\\d+)\\\\\""; + + public static RoomInitResult roomInit(Object roomId, String cookie) { + Map<String, String> cookieMap = OrLiveChatCookieUtil.parseCookieString(cookie); + + @Cleanup + HttpResponse response1 = HttpUtil.createGet("https://live.douyin.com/").cookie(cookie).execute(); + String ttwid = OrLiveChatCookieUtil.getCookieByName(cookieMap, KEY_COOKIE_TTWID, () -> response1.getCookie(KEY_COOKIE_TTWID).getValue()); + String msToken = OrLiveChatCookieUtil.getCookieByName(cookieMap, KEY_COOKIE_MS_TOKEN, () -> RandomUtil.randomString(MS_TOKEN_BASE_STRING, MS_TOKEN_LENGTH)); + String __ac_nonce = OrLiveChatCookieUtil.getCookieByName(cookieMap, KEY_COOKIE_AC_NONCE, () -> RandomUtil.randomString(AC_NONCE_LENGTH)); + + @Cleanup + HttpResponse response2 = HttpUtil.createGet("https://live.douyin.com/" + roomId) + .cookie(StrUtil.emptyToDefault(cookie, KEY_COOKIE_TTWID + "=" + ttwid + "; " + KEY_COOKIE_MS_TOKEN + "=" + msToken + "; " + KEY_COOKIE_AC_NONCE + "=" + __ac_nonce)) + .execute(); + if (response2.getStatus() != HttpStatus.HTTP_OK) { + throw new BaseException("鑾峰彇" + roomId + "鐪熷疄鎴块棿ID澶辫触"); + } + String user_unique_id = StrUtil.emptyToDefault(ReUtil.getGroup1(PATTERN_USER_UNIQUE_ID, response2.body()), RandomUtil.randomNumbers(19)); + long realRoomId; + String realRoomIdString = ReUtil.getGroup1(PATTERN_ROOM_ID, response2.body()); + try { + realRoomId = NumberUtil.parseLong(realRoomIdString); + } catch (Exception e) { + throw new BaseException("鑾峰彇" + roomId + "鐪熷疄鎴块棿ID澶辫触"); + } + + + return RoomInitResult.builder() + .ttwid(ttwid) + .msToken(msToken) + .acNonce(__ac_nonce) + .realRoomId(realRoomId) + .userUniqueId(user_unique_id) + .build(); + } + + public static RoomInitResult roomInit(Object roomId) { + return roomInit(roomId, null); + } + + @Getter + @Setter + @AllArgsConstructor + @NoArgsConstructor + @Builder + public static class RoomInitResult { + private String ttwid; + private String msToken; + private String acNonce; + private long realRoomId; + private String userUniqueId; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/client/DouyinLiveChatClient.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/client/DouyinLiveChatClient.java new file mode 100644 index 0000000..47767a1 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/client/DouyinLiveChatClient.java @@ -0,0 +1,174 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.client; + +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.RandomUtil; +import cn.hutool.http.GlobalHeaders; +import cn.hutool.http.Header; +import cn.hutool.http.HttpUtil; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.handler.codec.http.DefaultHttpHeaders; +import io.netty.handler.codec.http.websocketx.WebSocketClientHandshakerFactory; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.douyin.api.DouyinApis; +import tech.ordinaryroad.live.chat.client.douyin.config.DouyinLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyin.constant.DouyinCmdEnum; +import tech.ordinaryroad.live.chat.client.douyin.listener.IDouyinConnectionListener; +import tech.ordinaryroad.live.chat.client.douyin.listener.IDouyinMsgListener; +import tech.ordinaryroad.live.chat.client.douyin.msg.base.IDouyinMsg; +import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinConnectionHandler; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; + +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Consumer; + +/** + * @author mjz + * @date 2024/1/2 + */ +@Slf4j +public class DouyinLiveChatClient extends BaseNettyClient< + DouyinLiveChatClientConfig, + DouyinCmdEnum, + IDouyinMsg, + IDouyinMsgListener, + DouyinConnectionHandler, + DouyinBinaryFrameHandler> { + + private DouyinApis.RoomInitResult roomInitResult = new DouyinApis.RoomInitResult(); + + public DouyinLiveChatClient(DouyinLiveChatClientConfig config, List<IDouyinMsgListener> msgListeners, IDouyinConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListeners(msgListeners); + + // 鍒濆鍖� + this.init(); + } + + public DouyinLiveChatClient(DouyinLiveChatClientConfig config, IDouyinMsgListener msgListener, IDouyinConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListener(msgListener); + + // 鍒濆鍖� + this.init(); + } + + public DouyinLiveChatClient(DouyinLiveChatClientConfig config, IDouyinMsgListener msgListener, IDouyinConnectionListener connectionListener) { + this(config, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public DouyinLiveChatClient(DouyinLiveChatClientConfig config, IDouyinMsgListener msgListener) { + this(config, msgListener, null, new NioEventLoopGroup()); + } + + public DouyinLiveChatClient(DouyinLiveChatClientConfig config) { + this(config, null); + } + + @Override + public void init() { + roomInitResult = DouyinApis.roomInit(getConfig().getRoomId(), getConfig().getCookie()); + super.init(); + } + + @Override + public DouyinConnectionHandler initConnectionHandler(IBaseConnectionListener<DouyinConnectionHandler> clientConnectionListener) { + DefaultHttpHeaders headers = new DefaultHttpHeaders(); + headers.add(Header.COOKIE.name(), DouyinApis.KEY_COOKIE_TTWID + "=" + roomInitResult.getTtwid()); + headers.add(Header.USER_AGENT.name(), GlobalHeaders.INSTANCE.header(Header.USER_AGENT)); + return new DouyinConnectionHandler( + WebSocketClientHandshakerFactory.newHandshaker(getWebsocketUri(), WebSocketVersion.V13, null, true, headers, getConfig().getMaxFramePayloadLength()), + DouyinLiveChatClient.this, clientConnectionListener + ); + } + + @Override + public DouyinBinaryFrameHandler initBinaryFrameHandler() { + return new DouyinBinaryFrameHandler(super.msgListeners, DouyinLiveChatClient.this); + } + + @Override + protected String getWebSocketUriString() { + long realRoomId = roomInitResult.getRealRoomId(); + String userUniqueId = roomInitResult.getUserUniqueId(); + + String webSocketUriString = super.getWebSocketUriString(); + Map<String, String> queryParams = new HashMap<>(); + queryParams.put("app_name", "douyin_web"); + queryParams.put("version_code", getConfig().getVersionCode()); + queryParams.put("webcast_sdk_version", getConfig().getWebcastSdkVersion()); + queryParams.put("update_version_code", getConfig().getUpdateVersionCode()); + queryParams.put("compress", "gzip"); + queryParams.put("device_platform", "web"); + queryParams.put("cookie_enabled", "true"); + queryParams.put("screen_width", "800"); + queryParams.put("screen_height", "1280"); + queryParams.put("browser_language", "zh-CN"); + queryParams.put("browser_platform", "MacIntel"); + queryParams.put("browser_name", "Mozilla"); + queryParams.put("browser_version", "5.0%20(Macintosh;%20Intel%20Mac%20OS%20X%2010_15_7)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/116.0.0.0%20Safari/537.36"); + queryParams.put("browser_online", "true"); + queryParams.put("tz_name", "Asia/Shanghai"); + queryParams.put("host", "https://live.douyin.com"); + queryParams.put("im_path", "/webcast/im/fetch/"); + queryParams.put("endpoint", "live_pc"); + queryParams.put("identity", "audience"); + + queryParams.put("support_wrds", "1"); + queryParams.put("heartbeatDuration ", "0"); + queryParams.put("live_id", "1"); + queryParams.put("did_rule", "3"); + queryParams.put("aid", "6383"); + + queryParams.put("room_id", Long.toString(realRoomId)); + queryParams.put("user_unique_id", userUniqueId); + // TODO 鐢熸垚signature + queryParams.put("signature", "00000000"); + queryParams.put("cursor", "t-" + System.currentTimeMillis() + "_r-1_d-1_u-1_h-1"); + queryParams.put("internal_ext", "internal_src:dim|" + + "wss_push_room_id:" + realRoomId + "|" + + "wss_push_did:" + userUniqueId + "|" + + "dim_log_id:" + DateUtil.format(new Date(), "yyyy-MM-dd") + RandomUtil.randomNumbers(6) + RandomUtil.randomString("0123456789ABCDEF", 20) + "|" + + "first_req_ms:" + System.currentTimeMillis() + "|" + + "fetch_time:" + System.currentTimeMillis() + "|" + + "seq:1|" + + "wss_info:0-" + System.currentTimeMillis() + "-0-0|" + + "wrds_kvs:WebcastRoomStatsMessage-" + System.nanoTime() + "_WebcastRoomRankMessage-" + System.nanoTime() + "_LotteryInfoSyncData-" + System.nanoTime() + "_WebcastActivityEmojiGroupsMessage-" + System.nanoTime()); + return webSocketUriString + "?" + HttpUtil.toParams(queryParams); + } + + public void sendDanmu(Object danmu, Runnable success, Consumer<Throwable> failed) { + super.sendDanmu(danmu, success, failed); + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/config/DouyinLiveChatClientConfig.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/config/DouyinLiveChatClientConfig.java new file mode 100644 index 0000000..6958bb0 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/config/DouyinLiveChatClientConfig.java @@ -0,0 +1,93 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.config; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import tech.ordinaryroad.live.chat.client.servers.netty.client.config.BaseNettyClientConfig; + +/** + * @author mjz + * @date 2024/1/2 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@SuperBuilder(toBuilder = true) +public class DouyinLiveChatClientConfig extends BaseNettyClientConfig { + + @Builder.Default + private int aggregatorMaxContentLength = 64 * 1024 * 1024; + + @Builder.Default + private int maxFramePayloadLength = 64 * 1024 * 1024; + + private String versionCode = "180800"; + + private String webcastSdkVersion = "1.0.12"; + + private String updateVersionCode = "1.0.12"; + + /** + * 绀轰緥 + * wss://webcast5-ws-web-lf.douyin.com/webcast/im/push/v2/ + * ?app_name=douyin_web + * &version_code=180800 + * &webcast_sdk_version=1.0.12 + * &update_version_code=1.0.12 + * &compress=gzip + * &device_platform=web + * &cookie_enabled=true + * &screen_width=1512 + * &screen_height=982 + * &browser_language=zh-CN + * &browser_platform=MacIntel + * &browser_name=Mozilla + * &browser_version=5.0%20(Macintosh;%20Intel%20Mac%20OS%20X%2010_15_7)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/118.0.0.0%20Safari/537.36 + * &browser_online=true + * &tz_name=Asia/Shanghai + * &cursor=u-1_h-1_t-1704202376885_r-1_d-1 + * &internal_ext=internal_src:dim|wss_push_room_id:7319486720022301449|wss_push_did:7319492411867170356|dim_log_id:20240102213256AAA5B735ADBE992BEF6A|first_req_ms:1704202376757|fetch_time:1704202376885|seq:1|wss_info:0-1704202376885-0-0|wrds_kvs:WebcastActivityEmojiGroupsMessage-1704200830782138545_WebcastRoomRankMessage-1704202270876589607_WebcastRoomStatsMessage-1704202372842388781 + * &host=https://live.douyin.com + * &aid=6383 + * &live_id=1 + * &did_rule=3 + * &endpoint=live_pc + * &support_wrds=1 + * &user_unique_id=7319492411867170356 + * &im_path=/webcast/im/fetch/ + * &identity=audience + * &need_persist_msg_count=15 + * &room_id=7319486720022301449 + * &heartbeatDuration=0 + * &signature=Wk407jV1/WbnoIGk + */ + @Builder.Default + private String websocketUri = "wss://webcast5-ws-web-lf.douyin.com:443/webcast/im/push/v2/"; + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/constant/DouyinCmdEnum.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/constant/DouyinCmdEnum.java new file mode 100644 index 0000000..d7335cd --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/constant/DouyinCmdEnum.java @@ -0,0 +1,73 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.constant; + +import cn.hutool.core.util.StrUtil; +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2024/1/2 + */ +@Getter +@RequiredArgsConstructor +public enum DouyinCmdEnum { + + /** + * 寮瑰箷 + */ + WebcastChatMessage, + /** + * 绀肩墿 + */ + WebcastGiftMessage, + /** + * 鐐硅禐 + */ + WebcastLikeMessage, + /** + * 鍏ユ埧 + */ + WebcastMemberMessage, + WebcastSocialMessage, + WebcastRoomUserSeqMessage, + WebcastFansclubMessage, + WebcastControlMessage, + ; + + public static DouyinCmdEnum getByName(String name) { + if (StrUtil.isBlank(name)) { + return null; + } + + for (DouyinCmdEnum value : values()) { + if (value.name().equals(name)) { + return value; + } + } + return null; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/IDouyinConnectionListener.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/IDouyinConnectionListener.java new file mode 100644 index 0000000..9be4cea --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/IDouyinConnectionListener.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.listener; + +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinConnectionHandler; + +/** + * @author mjz + * @date 2024/1/2 + */ +public interface IDouyinConnectionListener extends IBaseConnectionListener<DouyinConnectionHandler> { +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/IDouyinMsgListener.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/IDouyinMsgListener.java new file mode 100644 index 0000000..8f1c86f --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/listener/IDouyinMsgListener.java @@ -0,0 +1,44 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.listener; + +import tech.ordinaryroad.live.chat.client.commons.base.listener.*; +import tech.ordinaryroad.live.chat.client.douyin.constant.DouyinCmdEnum; +import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinDanmuMsg; +import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinEnterRoomMsg; +import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinGiftMsg; +import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinLikeMsg; +import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinBinaryFrameHandler; + +/** + * @author mjz + * @date 2024/1/2 + */ +public interface IDouyinMsgListener extends IBaseMsgListener<DouyinBinaryFrameHandler, DouyinCmdEnum>, + IDanmuMsgListener<DouyinBinaryFrameHandler, DouyinDanmuMsg>, + IGiftMsgListener<DouyinBinaryFrameHandler, DouyinGiftMsg>, + IEnterRoomMsgListener<DouyinBinaryFrameHandler, DouyinEnterRoomMsg>, + ILikeMsgListener<DouyinBinaryFrameHandler, DouyinLikeMsg> { +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/DouyinDanmuMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/DouyinDanmuMsg.java new file mode 100644 index 0000000..32bb530 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/DouyinDanmuMsg.java @@ -0,0 +1,77 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.msg; + +import cn.hutool.core.collection.CollUtil; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IDanmuMsg; +import tech.ordinaryroad.live.chat.client.douyin.msg.base.IDouyinMsg; +import tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg; + +/** + * @author mjz + * @date 2024/1/9 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DouyinDanmuMsg implements IDouyinMsg, IDanmuMsg { + + private douyin_webcast_chat_message_msg msg; + + @Override + public String getBadgeName() { + return msg.getUser().getFansClub().getData().getClubName(); + } + + @Override + public byte getBadgeLevel() { + return (byte) msg.getUser().getFansClub().getData().getLevel(); + } + + @Override + public String getUid() { + return Long.toString(msg.getUser().getId()); + } + + @Override + public String getUsername() { + return msg.getUser().getNickname(); + } + + @Override + public String getUserAvatar() { + return CollUtil.getFirst(msg.getUser().getAvatarThumb().getUrlListListList()); + } + + @Override + public String getContent() { + return msg.getContent(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/DouyinEnterRoomMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/DouyinEnterRoomMsg.java new file mode 100644 index 0000000..6c394f5 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/DouyinEnterRoomMsg.java @@ -0,0 +1,72 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.msg; + +import cn.hutool.core.collection.CollUtil; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IEnterRoomMsg; +import tech.ordinaryroad.live.chat.client.douyin.msg.base.IDouyinMsg; +import tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg; + +/** + * @author mjz + * @date 2024/1/9 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DouyinEnterRoomMsg implements IDouyinMsg, IEnterRoomMsg { + + private douyin_webcast_member_message_msg msg; + + @Override + public String getBadgeName() { + return msg.getUser().getFansClub().getData().getClubName(); + } + + @Override + public byte getBadgeLevel() { + return (byte) msg.getUser().getFansClub().getData().getLevel(); + } + + @Override + public String getUid() { + return Long.toString(msg.getUser().getId()); + } + + @Override + public String getUsername() { + return msg.getUser().getNickname(); + } + + @Override + public String getUserAvatar() { + return CollUtil.getFirst(msg.getUser().getAvatarThumb().getUrlListListList()); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/DouyinGiftMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/DouyinGiftMsg.java new file mode 100644 index 0000000..0bd3535 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/DouyinGiftMsg.java @@ -0,0 +1,107 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.msg; + +import cn.hutool.core.collection.CollUtil; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IGiftMsg; +import tech.ordinaryroad.live.chat.client.douyin.msg.base.IDouyinMsg; +import tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg; + +/** + * @author mjz + * @date 2024/1/9 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DouyinGiftMsg implements IDouyinMsg, IGiftMsg { + + private douyin_webcast_gift_message_msg msg; + + @Override + public String getBadgeName() { + return msg.getUser().getFansClub().getData().getClubName(); + } + + @Override + public byte getBadgeLevel() { + return (byte) msg.getUser().getFansClub().getData().getLevel(); + } + + @Override + public String getUid() { + return Long.toString(msg.getUser().getId()); + } + + @Override + public String getUsername() { + return msg.getUser().getNickname(); + } + + @Override + public String getUserAvatar() { + return CollUtil.getFirst(msg.getUser().getAvatarThumb().getUrlListListList()); + } + + @Override + public String getGiftName() { + return msg.getGift().getName(); + } + + @Override + public String getGiftImg() { + return CollUtil.getFirst(msg.getGift().getImage().getUrlListListList()); + } + + @Override + public String getGiftId() { + return Long.toString(msg.getLongGiftId()); + } + + @Override + public int getGiftCount() { + return (int) msg.getTotalCount(); + } + + @Override + public int getGiftPrice() { + return msg.getGift().getDiamondCount(); + } + + @Override + public String getReceiveUid() { + return Long.toString(msg.getToUser().getId()); + } + + @Override + public String getReceiveUsername() { + return msg.getToUser().getNickname(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/DouyinLikeMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/DouyinLikeMsg.java new file mode 100644 index 0000000..ce02997 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/DouyinLikeMsg.java @@ -0,0 +1,77 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.msg; + +import cn.hutool.core.collection.CollUtil; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ILikeMsg; +import tech.ordinaryroad.live.chat.client.douyin.msg.base.IDouyinMsg; +import tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg; + +/** + * @author mjz + * @date 2024/1/31 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DouyinLikeMsg implements IDouyinMsg, ILikeMsg { + + private douyin_webcast_like_message_msg msg; + + @Override + public String getBadgeName() { + return msg.getUser().getFansClub().getData().getClubName(); + } + + @Override + public byte getBadgeLevel() { + return (byte) msg.getUser().getFansClub().getData().getLevel(); + } + + @Override + public String getUid() { + return Long.toString(msg.getUser().getId()); + } + + @Override + public String getUsername() { + return msg.getUser().getNickname(); + } + + @Override + public String getUserAvatar() { + return CollUtil.getFirst(msg.getUser().getAvatarThumb().getUrlListListList()); + } + + @Override + public int getClickCount() { + return (int) msg.getCount(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/base/IDouyinCmdMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/base/IDouyinCmdMsg.java new file mode 100644 index 0000000..aa264a1 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/base/IDouyinCmdMsg.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.msg.base; + +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.douyin.constant.DouyinCmdEnum; + +/** + * @author mjz + * @date 2024/1/2 + */ +public interface IDouyinCmdMsg extends IDouyinMsg, ICmdMsg<DouyinCmdEnum> { +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/base/IDouyinMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/base/IDouyinMsg.java new file mode 100644 index 0000000..6dc1095 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/msg/base/IDouyinMsg.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.msg.base; + +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +/** + * @author mjz + * @date 2024/1/2 + */ +public interface IDouyinMsg extends IMsg { +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinBinaryFrameHandler.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinBinaryFrameHandler.java new file mode 100644 index 0000000..bddf8de --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinBinaryFrameHandler.java @@ -0,0 +1,156 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.netty.handler; + +import cn.hutool.core.util.ZipUtil; +import com.google.protobuf.ByteString; +import com.google.protobuf.InvalidProtocolBufferException; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.douyin.client.DouyinLiveChatClient; +import tech.ordinaryroad.live.chat.client.douyin.constant.DouyinCmdEnum; +import tech.ordinaryroad.live.chat.client.douyin.listener.IDouyinMsgListener; +import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinDanmuMsg; +import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinEnterRoomMsg; +import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinGiftMsg; +import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinLikeMsg; +import tech.ordinaryroad.live.chat.client.douyin.msg.base.IDouyinMsg; +import tech.ordinaryroad.live.chat.client.douyin.protobuf.*; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientBinaryFrameHandler; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * @author mjz + * @date 2024/1/2 + */ +@Slf4j +@ChannelHandler.Sharable +public class DouyinBinaryFrameHandler extends BaseNettyClientBinaryFrameHandler<DouyinLiveChatClient, DouyinBinaryFrameHandler, DouyinCmdEnum, IDouyinMsg, IDouyinMsgListener> { + + private ChannelHandlerContext channelHandlerContext; + + public DouyinBinaryFrameHandler(List<IDouyinMsgListener> iDouyinMsgListeners, DouyinLiveChatClient client) { + super(iDouyinMsgListeners, client); + } + + public DouyinBinaryFrameHandler(List<IDouyinMsgListener> iDouyinMsgListeners, long roomId) { + super(iDouyinMsgListeners, roomId); + } + + @Override + public void handlerAdded(ChannelHandlerContext ctx) throws Exception { + super.handlerAdded(ctx); + channelHandlerContext = ctx; + } + + @Override + public void handlerRemoved(ChannelHandlerContext ctx) throws Exception { + super.handlerRemoved(ctx); + channelHandlerContext = null; + } + + @Override + public void onCmdMsg(DouyinCmdEnum cmd, ICmdMsg<DouyinCmdEnum> cmdMsg) { + if (super.msgListeners.isEmpty()) { + return; + } + + ByteString payload = ((douyin_cmd_msg) cmdMsg).getPayload(); + switch (cmd) { + case WebcastChatMessage: { + try { + douyin_webcast_chat_message_msg douyinWebcastChatMessageMsg = douyin_webcast_chat_message_msg.parseFrom(payload); + iteratorMsgListeners(msgListener -> msgListener.onDanmuMsg(DouyinBinaryFrameHandler.this, new DouyinDanmuMsg(douyinWebcastChatMessageMsg))); + } catch (IOException e) { + throw new BaseException(e); + } + break; + } + case WebcastGiftMessage: { + try { + douyin_webcast_gift_message_msg douyinWebcastGiftMessageMsg = douyin_webcast_gift_message_msg.parseFrom(payload); + iteratorMsgListeners(msgListener -> msgListener.onGiftMsg(DouyinBinaryFrameHandler.this, new DouyinGiftMsg(douyinWebcastGiftMessageMsg))); + } catch (InvalidProtocolBufferException e) { + throw new BaseException(e); + } + break; + } + case WebcastMemberMessage: { + try { + douyin_webcast_member_message_msg douyinWebcastMemberMessageMsg = douyin_webcast_member_message_msg.parseFrom(payload); + iteratorMsgListeners(msgListener -> msgListener.onEnterRoomMsg(DouyinBinaryFrameHandler.this, new DouyinEnterRoomMsg(douyinWebcastMemberMessageMsg))); + } catch (InvalidProtocolBufferException e) { + throw new BaseException(e); + } + break; + } + case WebcastLikeMessage: { + try { + douyin_webcast_like_message_msg douyinWebcastLikeMessageMsg = douyin_webcast_like_message_msg.parseFrom(payload); + iteratorMsgListeners(msgListener -> msgListener.onLikeMsg(DouyinBinaryFrameHandler.this, new DouyinLikeMsg(douyinWebcastLikeMessageMsg))); + } catch (InvalidProtocolBufferException e) { + throw new BaseException(e); + } + break; + } + default: { + iteratorMsgListeners(msgListener -> msgListener.onOtherCmdMsg(DouyinBinaryFrameHandler.this, cmd, cmdMsg)); + } + } + } + + @Override + protected List<IDouyinMsg> decode(ByteBuf byteBuf) { + try { + douyin_websocket_frame douyinWebsocketFrame = douyin_websocket_frame.parseFrom(byteBuf.nioBuffer()); + ByteString payload = douyinWebsocketFrame.getPayload(); + byte[] bytes = ZipUtil.unGzip(payload.newInput()); + douyin_websocket_frame_msg douyinWebsocketFrameMsg = douyin_websocket_frame_msg.parseFrom(bytes); + + // 鎶栭煶涓嶆槸浣跨敤蹇冭烦锛岃�屾槸ACK + if (douyinWebsocketFrameMsg.getNeedAck()) { + douyin_websocket_frame ack = douyin_websocket_frame.newBuilder() + .setLogId(douyinWebsocketFrame.getLogId()) + .setPayloadType("ack") + .setPayload(douyinWebsocketFrameMsg.getInternalExtBytes()) + .build(); + channelHandlerContext.writeAndFlush(new BinaryWebSocketFrame(Unpooled.wrappedBuffer(ack.toByteArray()))); + } + + return new ArrayList<>(douyinWebsocketFrameMsg.getMessagesListList()); + } catch (InvalidProtocolBufferException e) { + throw new BaseException(e); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinConnectionHandler.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinConnectionHandler.java new file mode 100644 index 0000000..1b9c6f8 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/netty/handler/DouyinConnectionHandler.java @@ -0,0 +1,117 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyin.netty.handler; + +import io.netty.channel.Channel; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.douyin.client.DouyinLiveChatClient; +import tech.ordinaryroad.live.chat.client.douyin.config.DouyinLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientConnectionHandler; + +/** + * @author mjz + * @date 2024/1/2 + */ +@Slf4j +@ChannelHandler.Sharable +public class DouyinConnectionHandler extends BaseNettyClientConnectionHandler<DouyinLiveChatClient, DouyinConnectionHandler> { + + /** + * 浠lientConfig涓轰富 + */ + private final Object roomId; + /** + * 浠lientConfig涓轰富 + */ + private String cookie; + + public DouyinConnectionHandler(WebSocketClientHandshaker handshaker, DouyinLiveChatClient client, IBaseConnectionListener<DouyinConnectionHandler> listener) { + super(handshaker, client, listener); + this.roomId = client.getConfig().getRoomId(); + this.cookie = client.getConfig().getCookie(); + } + + public DouyinConnectionHandler(WebSocketClientHandshaker handshaker, DouyinLiveChatClient client) { + this(handshaker, client, null); + } + + public DouyinConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, IBaseConnectionListener<DouyinConnectionHandler> listener, String cookie) { + super(handshaker, listener); + this.roomId = roomId; + this.cookie = cookie; + } + + public DouyinConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, IBaseConnectionListener<DouyinConnectionHandler> listener) { + this(handshaker, roomId, listener, null); + } + + public DouyinConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, String cookie) { + this(handshaker, roomId, null, cookie); + } + + public DouyinConnectionHandler(WebSocketClientHandshaker handshaker, long roomId) { + this(handshaker, roomId, null, null); + } + + @Override + protected void sendHeartbeat(ChannelHandlerContext ctx) { + // ignore + } + + @Override + public void sendAuthRequest(Channel channel) { + // ignore + } + + @Override + protected long getHeartbeatPeriod() { + if (client == null) { + return DouyinLiveChatClientConfig.DEFAULT_HEARTBEAT_PERIOD; + } else { + return client.getConfig().getHeartbeatPeriod(); + } + } + + @Override + protected long getHeartbeatInitialDelay() { + if (client == null) { + return DouyinLiveChatClientConfig.DEFAULT_HEARTBEAT_INITIAL_DELAY; + } else { + return client.getConfig().getHeartbeatInitialDelay(); + } + } + + public Object getRoomId() { + return client != null ? client.getConfig().getRoomId() : roomId; + } + + private String getCookie() { + return client != null ? client.getConfig().getCookie() : cookie; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_cmd_msgProto.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_cmd_msgProto.java new file mode 100644 index 0000000..f5ed4b4 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_cmd_msgProto.java @@ -0,0 +1,78 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_cmd_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +public final class Douyin_cmd_msgProto { + private Douyin_cmd_msgProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_cmd_msg_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_cmd_msg_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024douyin_cmd_msg.proto\0222tech.ordinaryroa" + + "d.live.chat.client.douyin.protobuf\"\250\001\n\016d" + + "ouyin_cmd_msg\022\016\n\006method\030\001 \001(\t\022\017\n\007payload" + + "\030\002 \001(\014\022\016\n\006msg_id\030\003 \001(\003\022\020\n\010msg_type\030\004 \001(\005" + + "\022\016\n\006offset\030\005 \001(\003\022\027\n\017need_wrds_store\030\006 \001(" + + "\010\022\024\n\014wrds_version\030\007 \001(\003\022\024\n\014wrds_sub_key\030" + + "\010 \001(\tBQ\n2tech.ordinaryroad.live.chat.cli" + + "ent.douyin.protobufB\023Douyin_cmd_msgProto" + + "P\001\242\002\003GPBb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_cmd_msg_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_cmd_msg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_cmd_msg_descriptor, + new java.lang.String[] { "Method", "Payload", "MsgId", "MsgType", "Offset", "NeedWrdsStore", "WrdsVersion", "WrdsSubKey", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_webcast_chat_message_msgProto.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_webcast_chat_message_msgProto.java new file mode 100644 index 0000000..4e5a46d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_webcast_chat_message_msgProto.java @@ -0,0 +1,93 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_webcast_chat_message_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +public final class Douyin_webcast_chat_message_msgProto { + private Douyin_webcast_chat_message_msgProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_chat_message_msg_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_chat_message_msg_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n%douyin_webcast_chat_message_msg.proto\022" + + "2tech.ordinaryroad.live.chat.client.douy" + + "in.protobuf\032\014Common.proto\032\nUser.proto\032\013I" + + "mage.proto\"\300\003\n\037douyin_webcast_chat_messa" + + "ge_msg\022\027\n\006common\030\001 \001(\0132\007.Common\022\023\n\004user\030" + + "\002 \001(\0132\005.User\022\017\n\007content\030\003 \001(\t\022\031\n\021visible" + + "_to_sender\030\004 \001(\010\022 \n\020background_image\030\005 \001" + + "(\0132\006.Image\022\036\n\026full_screen_text_color\030\006 \001" + + "(\t\022#\n\023background_image_v2\030\007 \001(\0132\006.Image\022" + + "\032\n\ngift_image\030\n \001(\0132\006.Image\022\024\n\014agree_msg" + + "_id\030\013 \001(\004\022\026\n\016priority_level\030\014 \001(\r\022\022\n\neve" + + "nt_time\030\017 \001(\004\022\023\n\013send_review\030\020 \001(\010\022\025\n\rfr" + + "om_intercom\030\021 \001(\010\022\037\n\027intercom_hide_user_" + + "card\030\022 \001(\010\022\017\n\007chat_by\030\024 \001(\t\022 \n\030individua" + + "l_chat_priority\030\025 \001(\rBb\n2tech.ordinaryro" + + "ad.live.chat.client.douyin.protobufB$Dou" + + "yin_webcast_chat_message_msgProtoP\001\242\002\003GP" + + "Bb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor(), + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_chat_message_msg_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_chat_message_msg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_chat_message_msg_descriptor, + new java.lang.String[] { "Common", "User", "Content", "VisibleToSender", "BackgroundImage", "FullScreenTextColor", "BackgroundImageV2", "GiftImage", "AgreeMsgId", "PriorityLevel", "EventTime", "SendReview", "FromIntercom", "IntercomHideUserCard", "ChatBy", "IndividualChatPriority", }); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_webcast_gift_message_msgProto.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_webcast_gift_message_msgProto.java new file mode 100644 index 0000000..69ed4f9 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_webcast_gift_message_msgProto.java @@ -0,0 +1,112 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_webcast_gift_message_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +public final class Douyin_webcast_gift_message_msgProto { + private Douyin_webcast_gift_message_msgProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_gift_message_msg_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_gift_message_msg_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n%douyin_webcast_gift_message_msg.proto\022" + + "2tech.ordinaryroad.live.chat.client.douy" + + "in.protobuf\032\014Common.proto\032\nUser.proto\032\020T" + + "extEffect.proto\032\nText.proto\032\024GiftIMPrior" + + "ity.proto\032\020GiftStruct.proto\032\026PublicAreaC" + + "ommon.proto\"\277\006\n\037douyin_webcast_gift_mess" + + "age_msg\022\027\n\006common\030\001 \001(\0132\007.Common\022\024\n\014long" + + "_gift_id\030\002 \001(\004\022\030\n\020fan_ticket_count\030\003 \001(\004" + + "\022\023\n\013group_count\030\004 \001(\004\022\024\n\014repeat_count\030\005 " + + "\001(\004\022\023\n\013combo_count\030\006 \001(\004\022\023\n\004user\030\007 \001(\0132\005" + + ".User\022\026\n\007to_user\030\010 \001(\0132\005.User\022\022\n\nrepeat_" + + "end\030\t \001(\r\022 \n\013text_effect\030\n \001(\0132\013.TextEff" + + "ect\022\020\n\010group_id\030\013 \001(\004\022\030\n\020income_taskgift" + + "s\030\014 \001(\004\022\035\n\025room_fan_ticket_count\030\r \001(\004\022!" + + "\n\010priority\030\016 \001(\0132\017.GiftIMPriority\022\031\n\004gif" + + "t\030\017 \001(\0132\013.GiftStruct\022\016\n\006log_id\030\020 \001(\t\022\021\n\t" + + "send_type\030\021 \001(\004\022-\n\022public_area_common\030\022 " + + "\001(\0132\021.PublicAreaCommon\022 \n\021tray_display_t" + + "ext\030\023 \001(\0132\005.Text\022\036\n\026banned_display_effec" + + "ts\030\024 \001(\004\022\030\n\020display_for_self\030\031 \001(\010\022\032\n\022in" + + "teract_gift_info\030\032 \001(\t\022\025\n\rdiy_item_info\030" + + "\033 \001(\t\022\032\n\022min_asset_set_list\030\034 \003(\004\022\023\n\013tot" + + "al_count\030\035 \001(\004\022\032\n\022client_gift_source\030\036 \001" + + "(\r\022\030\n\020to_user_ids_list\030 \003(\004\022\022\n\nsend_tim" + + "et\030! \001(\004\022\036\n\026force_display_effectst\030\" \001(\004" + + "\022\020\n\010trace_id\030# \001(\t\022\031\n\021effect_display_ts\030" + + "$ \001(\004Bb\n2tech.ordinaryroad.live.chat.cli" + + "ent.douyin.protobufB$Douyin_webcast_gift" + + "_message_msgProtoP\001\242\002\003GPBb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.getDescriptor(), + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_gift_message_msg_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_gift_message_msg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_gift_message_msg_descriptor, + new java.lang.String[] { "Common", "LongGiftId", "FanTicketCount", "GroupCount", "RepeatCount", "ComboCount", "User", "ToUser", "RepeatEnd", "TextEffect", "GroupId", "IncomeTaskgifts", "RoomFanTicketCount", "Priority", "Gift", "LogId", "SendType", "PublicAreaCommon", "TrayDisplayText", "BannedDisplayEffects", "DisplayForSelf", "InteractGiftInfo", "DiyItemInfo", "MinAssetSetList", "TotalCount", "ClientGiftSource", "ToUserIdsList", "SendTimet", "ForceDisplayEffectst", "TraceId", "EffectDisplayTs", }); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_webcast_member_message_msgProto.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_webcast_member_message_msgProto.java new file mode 100644 index 0000000..ccdb008 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_webcast_member_message_msgProto.java @@ -0,0 +1,111 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_webcast_member_message_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +public final class Douyin_webcast_member_message_msgProto { + private Douyin_webcast_member_message_msgProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_BuriedPointMapEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_BuriedPointMapEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\'douyin_webcast_member_message_msg.prot" + + "o\0222tech.ordinaryroad.live.chat.client.do" + + "uyin.protobuf\032\014Common.proto\032\nUser.proto\032" + + "\013Image.proto\032\nText.proto\"\203\005\n!douyin_webc" + + "ast_member_message_msg\022\027\n\006common\030\001 \001(\0132\007" + + ".Common\022\023\n\004user\030\002 \001(\0132\005.User\022\023\n\013memberCo" + + "unt\030\003 \001(\004\022\027\n\010operator\030\004 \001(\0132\005.User\022\024\n\014is" + + "SetToAdmin\030\005 \001(\010\022\021\n\tisTopUser\030\006 \001(\010\022\021\n\tr" + + "ankScore\030\007 \001(\003\022\021\n\ttopUserNo\030\010 \001(\003\022\021\n\tent" + + "erType\030\t \001(\003\022\016\n\006action\030\n \001(\003\022\031\n\021actionDe" + + "scription\030\013 \001(\t\022\016\n\006userId\030\014 \001(\003\022\016\n\006popSt" + + "r\030\016 \001(\t\022\037\n\017backgroundImage\030\020 \001(\0132\006.Image" + + "\022!\n\021backgroundImageV2\030\021 \001(\0132\006.Image\022 \n\021a" + + "nchorDisplayText\030\022 \001(\0132\005.Text\022\030\n\020userEnt" + + "erTipType\030\024 \001(\003\022\032\n\022anchorEnterTipType\030\025 " + + "\001(\003\022\201\001\n\016buriedPointMap\030\026 \003(\0132i.tech.ordi" + + "naryroad.live.chat.client.douyin.protobu" + + "f.douyin_webcast_member_message_msg.Buri" + + "edPointMapEntry\0325\n\023BuriedPointMapEntry\022\013" + + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001Bd\n2tech.o" + + "rdinaryroad.live.chat.client.douyin.prot" + + "obufB&Douyin_webcast_member_message_msgP" + + "rotoP\001\242\002\003GPBb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.getDescriptor(), + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_descriptor, + new java.lang.String[] { "Common", "User", "MemberCount", "Operator", "IsSetToAdmin", "IsTopUser", "RankScore", "TopUserNo", "EnterType", "Action", "ActionDescription", "UserId", "PopStr", "BackgroundImage", "BackgroundImageV2", "AnchorDisplayText", "UserEnterTipType", "AnchorEnterTipType", "BuriedPointMap", }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_BuriedPointMapEntry_descriptor = + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_descriptor.getNestedTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_BuriedPointMapEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_BuriedPointMapEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_websocket_frameProto.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_websocket_frameProto.java new file mode 100644 index 0000000..620d99e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/Douyin_websocket_frameProto.java @@ -0,0 +1,93 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_websocket_frame.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +public final class Douyin_websocket_frameProto { + private Douyin_websocket_frameProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_HeadersListEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_HeadersListEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034douyin_websocket_frame.proto\0222tech.ord" + + "inaryroad.live.chat.client.douyin.protob" + + "uf\"\301\002\n\026douyin_websocket_frame\022\016\n\006seq_id\030" + + "\001 \001(\004\022\016\n\006log_id\030\002 \001(\004\022\017\n\007service\030\003 \001(\004\022\016" + + "\n\006method\030\004 \001(\004\022q\n\014headers_list\030\005 \003(\0132[.t" + + "ech.ordinaryroad.live.chat.client.douyin" + + ".protobuf.douyin_websocket_frame.Headers" + + "ListEntry\022\030\n\020payload_encoding\030\006 \001(\t\022\024\n\014p" + + "ayload_type\030\007 \001(\t\022\017\n\007payload\030\010 \001(\014\0322\n\020He" + + "adersListEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001" + + "(\t:\0028\001BY\n2tech.ordinaryroad.live.chat.cl" + + "ient.douyin.protobufB\033Douyin_websocket_f" + + "rameProtoP\001\242\002\003GPBb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_descriptor, + new java.lang.String[] { "SeqId", "LogId", "Service", "Method", "HeadersList", "PayloadEncoding", "PayloadType", "Payload", }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_HeadersListEntry_descriptor = + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_descriptor.getNestedTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_HeadersListEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_HeadersListEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_cmd_msg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_cmd_msg.java new file mode 100644 index 0000000..44f8e78 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_cmd_msg.java @@ -0,0 +1,1122 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_cmd_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +import tech.ordinaryroad.live.chat.client.douyin.constant.DouyinCmdEnum; +import tech.ordinaryroad.live.chat.client.douyin.msg.base.IDouyinCmdMsg; + +/** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg} + */ +public final class douyin_cmd_msg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg) + douyin_cmd_msgOrBuilder, IDouyinCmdMsg { + + @Override + public String getCmd() { + return getMethod(); + } + + @Override + public void setCmd(String cmd) { + // ignore + // method_ = cmd; + } + + @Override + public DouyinCmdEnum getCmdEnum() { + return DouyinCmdEnum.getByName(getMethod()); + } + +private static final long serialVersionUID = 0L; + // Use douyin_cmd_msg.newBuilder() to construct. + private douyin_cmd_msg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private douyin_cmd_msg() { + method_ = ""; + payload_ = com.google.protobuf.ByteString.EMPTY; + wrdsSubKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new douyin_cmd_msg(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_cmd_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_cmd_msg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_cmd_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_cmd_msg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.Builder.class); + } + + public static final int METHOD_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object method_ = ""; + /** + * <code>string method = 1;</code> + * @return The method. + */ + @java.lang.Override + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } + } + /** + * <code>string method = 1;</code> + * @return The bytes for method. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAYLOAD_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * <code>bytes payload = 2;</code> + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + public static final int MSG_ID_FIELD_NUMBER = 3; + private long msgId_ = 0L; + /** + * <code>int64 msg_id = 3;</code> + * @return The msgId. + */ + @java.lang.Override + public long getMsgId() { + return msgId_; + } + + public static final int MSG_TYPE_FIELD_NUMBER = 4; + private int msgType_ = 0; + /** + * <code>int32 msg_type = 4;</code> + * @return The msgType. + */ + @java.lang.Override + public int getMsgType() { + return msgType_; + } + + public static final int OFFSET_FIELD_NUMBER = 5; + private long offset_ = 0L; + /** + * <code>int64 offset = 5;</code> + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + + public static final int NEED_WRDS_STORE_FIELD_NUMBER = 6; + private boolean needWrdsStore_ = false; + /** + * <code>bool need_wrds_store = 6;</code> + * @return The needWrdsStore. + */ + @java.lang.Override + public boolean getNeedWrdsStore() { + return needWrdsStore_; + } + + public static final int WRDS_VERSION_FIELD_NUMBER = 7; + private long wrdsVersion_ = 0L; + /** + * <code>int64 wrds_version = 7;</code> + * @return The wrdsVersion. + */ + @java.lang.Override + public long getWrdsVersion() { + return wrdsVersion_; + } + + public static final int WRDS_SUB_KEY_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object wrdsSubKey_ = ""; + /** + * <code>string wrds_sub_key = 8;</code> + * @return The wrdsSubKey. + */ + @java.lang.Override + public java.lang.String getWrdsSubKey() { + java.lang.Object ref = wrdsSubKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + wrdsSubKey_ = s; + return s; + } + } + /** + * <code>string wrds_sub_key = 8;</code> + * @return The bytes for wrdsSubKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWrdsSubKeyBytes() { + java.lang.Object ref = wrdsSubKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + wrdsSubKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(method_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, method_); + } + if (!payload_.isEmpty()) { + output.writeBytes(2, payload_); + } + if (msgId_ != 0L) { + output.writeInt64(3, msgId_); + } + if (msgType_ != 0) { + output.writeInt32(4, msgType_); + } + if (offset_ != 0L) { + output.writeInt64(5, offset_); + } + if (needWrdsStore_ != false) { + output.writeBool(6, needWrdsStore_); + } + if (wrdsVersion_ != 0L) { + output.writeInt64(7, wrdsVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(wrdsSubKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, wrdsSubKey_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(method_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, method_); + } + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, payload_); + } + if (msgId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, msgId_); + } + if (msgType_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, msgType_); + } + if (offset_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, offset_); + } + if (needWrdsStore_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, needWrdsStore_); + } + if (wrdsVersion_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, wrdsVersion_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(wrdsSubKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, wrdsSubKey_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg) obj; + + if (!getMethod() + .equals(other.getMethod())) return false; + if (!getPayload() + .equals(other.getPayload())) return false; + if (getMsgId() + != other.getMsgId()) return false; + if (getMsgType() + != other.getMsgType()) return false; + if (getOffset() + != other.getOffset()) return false; + if (getNeedWrdsStore() + != other.getNeedWrdsStore()) return false; + if (getWrdsVersion() + != other.getWrdsVersion()) return false; + if (!getWrdsSubKey() + .equals(other.getWrdsSubKey())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + METHOD_FIELD_NUMBER; + hash = (53 * hash) + getMethod().hashCode(); + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (37 * hash) + MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMsgId()); + hash = (37 * hash) + MSG_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMsgType(); + hash = (37 * hash) + OFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOffset()); + hash = (37 * hash) + NEED_WRDS_STORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getNeedWrdsStore()); + hash = (37 * hash) + WRDS_VERSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getWrdsVersion()); + hash = (37 * hash) + WRDS_SUB_KEY_FIELD_NUMBER; + hash = (53 * hash) + getWrdsSubKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg) + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_cmd_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_cmd_msg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_cmd_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_cmd_msg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + method_ = ""; + payload_ = com.google.protobuf.ByteString.EMPTY; + msgId_ = 0L; + msgType_ = 0; + offset_ = 0L; + needWrdsStore_ = false; + wrdsVersion_ = 0L; + wrdsSubKey_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_cmd_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_cmd_msg_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.method_ = method_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.payload_ = payload_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.msgId_ = msgId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.msgType_ = msgType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.offset_ = offset_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.needWrdsStore_ = needWrdsStore_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.wrdsVersion_ = wrdsVersion_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.wrdsSubKey_ = wrdsSubKey_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.getDefaultInstance()) return this; + if (!other.getMethod().isEmpty()) { + method_ = other.method_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { + setPayload(other.getPayload()); + } + if (other.getMsgId() != 0L) { + setMsgId(other.getMsgId()); + } + if (other.getMsgType() != 0) { + setMsgType(other.getMsgType()); + } + if (other.getOffset() != 0L) { + setOffset(other.getOffset()); + } + if (other.getNeedWrdsStore() != false) { + setNeedWrdsStore(other.getNeedWrdsStore()); + } + if (other.getWrdsVersion() != 0L) { + setWrdsVersion(other.getWrdsVersion()); + } + if (!other.getWrdsSubKey().isEmpty()) { + wrdsSubKey_ = other.wrdsSubKey_; + bitField0_ |= 0x00000080; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + method_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + payload_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + msgId_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + msgType_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + offset_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + needWrdsStore_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + wrdsVersion_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: { + wrdsSubKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object method_ = ""; + /** + * <code>string method = 1;</code> + * @return The method. + */ + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string method = 1;</code> + * @return The bytes for method. + */ + public com.google.protobuf.ByteString + getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string method = 1;</code> + * @param value The method to set. + * @return This builder for chaining. + */ + public Builder setMethod( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + method_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string method = 1;</code> + * @return This builder for chaining. + */ + public Builder clearMethod() { + method_ = getDefaultInstance().getMethod(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string method = 1;</code> + * @param value The bytes for method to set. + * @return This builder for chaining. + */ + public Builder setMethodBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + method_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * <code>bytes payload = 2;</code> + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + /** + * <code>bytes payload = 2;</code> + * @param value The payload to set. + * @return This builder for chaining. + */ + public Builder setPayload(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + payload_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>bytes payload = 2;</code> + * @return This builder for chaining. + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000002); + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + + private long msgId_ ; + /** + * <code>int64 msg_id = 3;</code> + * @return The msgId. + */ + @java.lang.Override + public long getMsgId() { + return msgId_; + } + /** + * <code>int64 msg_id = 3;</code> + * @param value The msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgId(long value) { + + msgId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>int64 msg_id = 3;</code> + * @return This builder for chaining. + */ + public Builder clearMsgId() { + bitField0_ = (bitField0_ & ~0x00000004); + msgId_ = 0L; + onChanged(); + return this; + } + + private int msgType_ ; + /** + * <code>int32 msg_type = 4;</code> + * @return The msgType. + */ + @java.lang.Override + public int getMsgType() { + return msgType_; + } + /** + * <code>int32 msg_type = 4;</code> + * @param value The msgType to set. + * @return This builder for chaining. + */ + public Builder setMsgType(int value) { + + msgType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>int32 msg_type = 4;</code> + * @return This builder for chaining. + */ + public Builder clearMsgType() { + bitField0_ = (bitField0_ & ~0x00000008); + msgType_ = 0; + onChanged(); + return this; + } + + private long offset_ ; + /** + * <code>int64 offset = 5;</code> + * @return The offset. + */ + @java.lang.Override + public long getOffset() { + return offset_; + } + /** + * <code>int64 offset = 5;</code> + * @param value The offset to set. + * @return This builder for chaining. + */ + public Builder setOffset(long value) { + + offset_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>int64 offset = 5;</code> + * @return This builder for chaining. + */ + public Builder clearOffset() { + bitField0_ = (bitField0_ & ~0x00000010); + offset_ = 0L; + onChanged(); + return this; + } + + private boolean needWrdsStore_ ; + /** + * <code>bool need_wrds_store = 6;</code> + * @return The needWrdsStore. + */ + @java.lang.Override + public boolean getNeedWrdsStore() { + return needWrdsStore_; + } + /** + * <code>bool need_wrds_store = 6;</code> + * @param value The needWrdsStore to set. + * @return This builder for chaining. + */ + public Builder setNeedWrdsStore(boolean value) { + + needWrdsStore_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>bool need_wrds_store = 6;</code> + * @return This builder for chaining. + */ + public Builder clearNeedWrdsStore() { + bitField0_ = (bitField0_ & ~0x00000020); + needWrdsStore_ = false; + onChanged(); + return this; + } + + private long wrdsVersion_ ; + /** + * <code>int64 wrds_version = 7;</code> + * @return The wrdsVersion. + */ + @java.lang.Override + public long getWrdsVersion() { + return wrdsVersion_; + } + /** + * <code>int64 wrds_version = 7;</code> + * @param value The wrdsVersion to set. + * @return This builder for chaining. + */ + public Builder setWrdsVersion(long value) { + + wrdsVersion_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>int64 wrds_version = 7;</code> + * @return This builder for chaining. + */ + public Builder clearWrdsVersion() { + bitField0_ = (bitField0_ & ~0x00000040); + wrdsVersion_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object wrdsSubKey_ = ""; + /** + * <code>string wrds_sub_key = 8;</code> + * @return The wrdsSubKey. + */ + public java.lang.String getWrdsSubKey() { + java.lang.Object ref = wrdsSubKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + wrdsSubKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string wrds_sub_key = 8;</code> + * @return The bytes for wrdsSubKey. + */ + public com.google.protobuf.ByteString + getWrdsSubKeyBytes() { + java.lang.Object ref = wrdsSubKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + wrdsSubKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string wrds_sub_key = 8;</code> + * @param value The wrdsSubKey to set. + * @return This builder for chaining. + */ + public Builder setWrdsSubKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + wrdsSubKey_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>string wrds_sub_key = 8;</code> + * @return This builder for chaining. + */ + public Builder clearWrdsSubKey() { + wrdsSubKey_ = getDefaultInstance().getWrdsSubKey(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * <code>string wrds_sub_key = 8;</code> + * @param value The bytes for wrdsSubKey to set. + * @return This builder for chaining. + */ + public Builder setWrdsSubKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + wrdsSubKey_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<douyin_cmd_msg> + PARSER = new com.google.protobuf.AbstractParser<douyin_cmd_msg>() { + @java.lang.Override + public douyin_cmd_msg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<douyin_cmd_msg> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<douyin_cmd_msg> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_cmd_msgOrBuilder.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_cmd_msgOrBuilder.java new file mode 100644 index 0000000..ed0175d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_cmd_msgOrBuilder.java @@ -0,0 +1,93 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_cmd_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +public interface douyin_cmd_msgOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string method = 1;</code> + * @return The method. + */ + java.lang.String getMethod(); + /** + * <code>string method = 1;</code> + * @return The bytes for method. + */ + com.google.protobuf.ByteString + getMethodBytes(); + + /** + * <code>bytes payload = 2;</code> + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); + + /** + * <code>int64 msg_id = 3;</code> + * @return The msgId. + */ + long getMsgId(); + + /** + * <code>int32 msg_type = 4;</code> + * @return The msgType. + */ + int getMsgType(); + + /** + * <code>int64 offset = 5;</code> + * @return The offset. + */ + long getOffset(); + + /** + * <code>bool need_wrds_store = 6;</code> + * @return The needWrdsStore. + */ + boolean getNeedWrdsStore(); + + /** + * <code>int64 wrds_version = 7;</code> + * @return The wrdsVersion. + */ + long getWrdsVersion(); + + /** + * <code>string wrds_sub_key = 8;</code> + * @return The wrdsSubKey. + */ + java.lang.String getWrdsSubKey(); + /** + * <code>string wrds_sub_key = 8;</code> + * @return The bytes for wrdsSubKey. + */ + com.google.protobuf.ByteString + getWrdsSubKeyBytes(); +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_chat_message_msg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_chat_message_msg.java new file mode 100644 index 0000000..ae1a4d4 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_chat_message_msg.java @@ -0,0 +1,2384 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_webcast_chat_message_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +/** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg} + */ +public final class douyin_webcast_chat_message_msg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg) + douyin_webcast_chat_message_msgOrBuilder { + private static final long serialVersionUID = 0L; + // Use douyin_webcast_chat_message_msg.newBuilder() to construct. + private douyin_webcast_chat_message_msg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private douyin_webcast_chat_message_msg() { + content_ = ""; + fullScreenTextColor_ = ""; + chatBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new douyin_webcast_chat_message_msg(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_webcast_chat_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_chat_message_msg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_webcast_chat_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_chat_message_msg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg.Builder.class); + } + + public static final int COMMON_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common common_; + /** + * <code>.Common common = 1;</code> + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return common_ != null; + } + /** + * <code>.Common common = 1;</code> + * @return The common. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + return common_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + /** + * <code>.Common common = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + return common_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + + public static final int USER_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User user_; + /** + * <code>.User user = 2;</code> + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return user_ != null; + } + /** + * <code>.User user = 2;</code> + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + /** + * <code>.User user = 2;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + + public static final int CONTENT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * <code>string content = 3;</code> + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + /** + * <code>string content = 3;</code> + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VISIBLE_TO_SENDER_FIELD_NUMBER = 4; + private boolean visibleToSender_ = false; + /** + * <code>bool visible_to_sender = 4;</code> + * @return The visibleToSender. + */ + @java.lang.Override + public boolean getVisibleToSender() { + return visibleToSender_; + } + + public static final int BACKGROUND_IMAGE_FIELD_NUMBER = 5; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image backgroundImage_; + /** + * <code>.Image background_image = 5;</code> + * @return Whether the backgroundImage field is set. + */ + @java.lang.Override + public boolean hasBackgroundImage() { + return backgroundImage_ != null; + } + /** + * <code>.Image background_image = 5;</code> + * @return The backgroundImage. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImage() { + return backgroundImage_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImage_; + } + /** + * <code>.Image background_image = 5;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageOrBuilder() { + return backgroundImage_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImage_; + } + + public static final int FULL_SCREEN_TEXT_COLOR_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object fullScreenTextColor_ = ""; + /** + * <code>string full_screen_text_color = 6;</code> + * @return The fullScreenTextColor. + */ + @java.lang.Override + public java.lang.String getFullScreenTextColor() { + java.lang.Object ref = fullScreenTextColor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullScreenTextColor_ = s; + return s; + } + } + /** + * <code>string full_screen_text_color = 6;</code> + * @return The bytes for fullScreenTextColor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFullScreenTextColorBytes() { + java.lang.Object ref = fullScreenTextColor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullScreenTextColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKGROUND_IMAGE_V2_FIELD_NUMBER = 7; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image backgroundImageV2_; + /** + * <code>.Image background_image_v2 = 7;</code> + * @return Whether the backgroundImageV2 field is set. + */ + @java.lang.Override + public boolean hasBackgroundImageV2() { + return backgroundImageV2_ != null; + } + /** + * <code>.Image background_image_v2 = 7;</code> + * @return The backgroundImageV2. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImageV2() { + return backgroundImageV2_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImageV2_; + } + /** + * <code>.Image background_image_v2 = 7;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageV2OrBuilder() { + return backgroundImageV2_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImageV2_; + } + + public static final int GIFT_IMAGE_FIELD_NUMBER = 10; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image giftImage_; + /** + * <pre> + * PublicAreaCommon public_area_common = 9; + * </pre> + * + * <code>.Image gift_image = 10;</code> + * @return Whether the giftImage field is set. + */ + @java.lang.Override + public boolean hasGiftImage() { + return giftImage_ != null; + } + /** + * <pre> + * PublicAreaCommon public_area_common = 9; + * </pre> + * + * <code>.Image gift_image = 10;</code> + * @return The giftImage. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getGiftImage() { + return giftImage_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : giftImage_; + } + /** + * <pre> + * PublicAreaCommon public_area_common = 9; + * </pre> + * + * <code>.Image gift_image = 10;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getGiftImageOrBuilder() { + return giftImage_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : giftImage_; + } + + public static final int AGREE_MSG_ID_FIELD_NUMBER = 11; + private long agreeMsgId_ = 0L; + /** + * <code>uint64 agree_msg_id = 11;</code> + * @return The agreeMsgId. + */ + @java.lang.Override + public long getAgreeMsgId() { + return agreeMsgId_; + } + + public static final int PRIORITY_LEVEL_FIELD_NUMBER = 12; + private int priorityLevel_ = 0; + /** + * <code>uint32 priority_level = 12;</code> + * @return The priorityLevel. + */ + @java.lang.Override + public int getPriorityLevel() { + return priorityLevel_; + } + + public static final int EVENT_TIME_FIELD_NUMBER = 15; + private long eventTime_ = 0L; + /** + * <pre> + * LandscapeAreaCommon landscape_area_common = 13; + * </pre> + * + * <code>uint64 event_time = 15;</code> + * @return The eventTime. + */ + @java.lang.Override + public long getEventTime() { + return eventTime_; + } + + public static final int SEND_REVIEW_FIELD_NUMBER = 16; + private boolean sendReview_ = false; + /** + * <code>bool send_review = 16;</code> + * @return The sendReview. + */ + @java.lang.Override + public boolean getSendReview() { + return sendReview_; + } + + public static final int FROM_INTERCOM_FIELD_NUMBER = 17; + private boolean fromIntercom_ = false; + /** + * <code>bool from_intercom = 17;</code> + * @return The fromIntercom. + */ + @java.lang.Override + public boolean getFromIntercom() { + return fromIntercom_; + } + + public static final int INTERCOM_HIDE_USER_CARD_FIELD_NUMBER = 18; + private boolean intercomHideUserCard_ = false; + /** + * <code>bool intercom_hide_user_card = 18;</code> + * @return The intercomHideUserCard. + */ + @java.lang.Override + public boolean getIntercomHideUserCard() { + return intercomHideUserCard_; + } + + public static final int CHAT_BY_FIELD_NUMBER = 20; + @SuppressWarnings("serial") + private volatile java.lang.Object chatBy_ = ""; + /** + * <pre> + * repeated string chatTagsList = 19; + * </pre> + * + * <code>string chat_by = 20;</code> + * @return The chatBy. + */ + @java.lang.Override + public java.lang.String getChatBy() { + java.lang.Object ref = chatBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + chatBy_ = s; + return s; + } + } + /** + * <pre> + * repeated string chatTagsList = 19; + * </pre> + * + * <code>string chat_by = 20;</code> + * @return The bytes for chatBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChatByBytes() { + java.lang.Object ref = chatBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + chatBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INDIVIDUAL_CHAT_PRIORITY_FIELD_NUMBER = 21; + private int individualChatPriority_ = 0; + /** + * <pre> + * Text rtf_content = 22 ; + * </pre> + * + * <code>uint32 individual_chat_priority = 21;</code> + * @return The individualChatPriority. + */ + @java.lang.Override + public int getIndividualChatPriority() { + return individualChatPriority_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (common_ != null) { + output.writeMessage(1, getCommon()); + } + if (user_ != null) { + output.writeMessage(2, getUser()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, content_); + } + if (visibleToSender_ != false) { + output.writeBool(4, visibleToSender_); + } + if (backgroundImage_ != null) { + output.writeMessage(5, getBackgroundImage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullScreenTextColor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, fullScreenTextColor_); + } + if (backgroundImageV2_ != null) { + output.writeMessage(7, getBackgroundImageV2()); + } + if (giftImage_ != null) { + output.writeMessage(10, getGiftImage()); + } + if (agreeMsgId_ != 0L) { + output.writeUInt64(11, agreeMsgId_); + } + if (priorityLevel_ != 0) { + output.writeUInt32(12, priorityLevel_); + } + if (eventTime_ != 0L) { + output.writeUInt64(15, eventTime_); + } + if (sendReview_ != false) { + output.writeBool(16, sendReview_); + } + if (fromIntercom_ != false) { + output.writeBool(17, fromIntercom_); + } + if (intercomHideUserCard_ != false) { + output.writeBool(18, intercomHideUserCard_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(chatBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 20, chatBy_); + } + if (individualChatPriority_ != 0) { + output.writeUInt32(21, individualChatPriority_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (common_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCommon()); + } + if (user_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, content_); + } + if (visibleToSender_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, visibleToSender_); + } + if (backgroundImage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getBackgroundImage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fullScreenTextColor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, fullScreenTextColor_); + } + if (backgroundImageV2_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getBackgroundImageV2()); + } + if (giftImage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getGiftImage()); + } + if (agreeMsgId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(11, agreeMsgId_); + } + if (priorityLevel_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(12, priorityLevel_); + } + if (eventTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(15, eventTime_); + } + if (sendReview_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(16, sendReview_); + } + if (fromIntercom_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(17, fromIntercom_); + } + if (intercomHideUserCard_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(18, intercomHideUserCard_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(chatBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, chatBy_); + } + if (individualChatPriority_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(21, individualChatPriority_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon() + .equals(other.getCommon())) return false; + } + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (!getContent() + .equals(other.getContent())) return false; + if (getVisibleToSender() + != other.getVisibleToSender()) return false; + if (hasBackgroundImage() != other.hasBackgroundImage()) return false; + if (hasBackgroundImage()) { + if (!getBackgroundImage() + .equals(other.getBackgroundImage())) return false; + } + if (!getFullScreenTextColor() + .equals(other.getFullScreenTextColor())) return false; + if (hasBackgroundImageV2() != other.hasBackgroundImageV2()) return false; + if (hasBackgroundImageV2()) { + if (!getBackgroundImageV2() + .equals(other.getBackgroundImageV2())) return false; + } + if (hasGiftImage() != other.hasGiftImage()) return false; + if (hasGiftImage()) { + if (!getGiftImage() + .equals(other.getGiftImage())) return false; + } + if (getAgreeMsgId() + != other.getAgreeMsgId()) return false; + if (getPriorityLevel() + != other.getPriorityLevel()) return false; + if (getEventTime() + != other.getEventTime()) return false; + if (getSendReview() + != other.getSendReview()) return false; + if (getFromIntercom() + != other.getFromIntercom()) return false; + if (getIntercomHideUserCard() + != other.getIntercomHideUserCard()) return false; + if (!getChatBy() + .equals(other.getChatBy())) return false; + if (getIndividualChatPriority() + != other.getIndividualChatPriority()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + VISIBLE_TO_SENDER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getVisibleToSender()); + if (hasBackgroundImage()) { + hash = (37 * hash) + BACKGROUND_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getBackgroundImage().hashCode(); + } + hash = (37 * hash) + FULL_SCREEN_TEXT_COLOR_FIELD_NUMBER; + hash = (53 * hash) + getFullScreenTextColor().hashCode(); + if (hasBackgroundImageV2()) { + hash = (37 * hash) + BACKGROUND_IMAGE_V2_FIELD_NUMBER; + hash = (53 * hash) + getBackgroundImageV2().hashCode(); + } + if (hasGiftImage()) { + hash = (37 * hash) + GIFT_IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getGiftImage().hashCode(); + } + hash = (37 * hash) + AGREE_MSG_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAgreeMsgId()); + hash = (37 * hash) + PRIORITY_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getPriorityLevel(); + hash = (37 * hash) + EVENT_TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEventTime()); + hash = (37 * hash) + SEND_REVIEW_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSendReview()); + hash = (37 * hash) + FROM_INTERCOM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFromIntercom()); + hash = (37 * hash) + INTERCOM_HIDE_USER_CARD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIntercomHideUserCard()); + hash = (37 * hash) + CHAT_BY_FIELD_NUMBER; + hash = (53 * hash) + getChatBy().hashCode(); + hash = (37 * hash) + INDIVIDUAL_CHAT_PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getIndividualChatPriority(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg) + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_webcast_chat_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_chat_message_msg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_webcast_chat_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_chat_message_msg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + content_ = ""; + visibleToSender_ = false; + backgroundImage_ = null; + if (backgroundImageBuilder_ != null) { + backgroundImageBuilder_.dispose(); + backgroundImageBuilder_ = null; + } + fullScreenTextColor_ = ""; + backgroundImageV2_ = null; + if (backgroundImageV2Builder_ != null) { + backgroundImageV2Builder_.dispose(); + backgroundImageV2Builder_ = null; + } + giftImage_ = null; + if (giftImageBuilder_ != null) { + giftImageBuilder_.dispose(); + giftImageBuilder_ = null; + } + agreeMsgId_ = 0L; + priorityLevel_ = 0; + eventTime_ = 0L; + sendReview_ = false; + fromIntercom_ = false; + intercomHideUserCard_ = false; + chatBy_ = ""; + individualChatPriority_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_webcast_chat_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_chat_message_msg_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null + ? common_ + : commonBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.content_ = content_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.visibleToSender_ = visibleToSender_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.backgroundImage_ = backgroundImageBuilder_ == null + ? backgroundImage_ + : backgroundImageBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.fullScreenTextColor_ = fullScreenTextColor_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.backgroundImageV2_ = backgroundImageV2Builder_ == null + ? backgroundImageV2_ + : backgroundImageV2Builder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.giftImage_ = giftImageBuilder_ == null + ? giftImage_ + : giftImageBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.agreeMsgId_ = agreeMsgId_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.priorityLevel_ = priorityLevel_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.eventTime_ = eventTime_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.sendReview_ = sendReview_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.fromIntercom_ = fromIntercom_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.intercomHideUserCard_ = intercomHideUserCard_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.chatBy_ = chatBy_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.individualChatPriority_ = individualChatPriority_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getVisibleToSender() != false) { + setVisibleToSender(other.getVisibleToSender()); + } + if (other.hasBackgroundImage()) { + mergeBackgroundImage(other.getBackgroundImage()); + } + if (!other.getFullScreenTextColor().isEmpty()) { + fullScreenTextColor_ = other.fullScreenTextColor_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasBackgroundImageV2()) { + mergeBackgroundImageV2(other.getBackgroundImageV2()); + } + if (other.hasGiftImage()) { + mergeGiftImage(other.getGiftImage()); + } + if (other.getAgreeMsgId() != 0L) { + setAgreeMsgId(other.getAgreeMsgId()); + } + if (other.getPriorityLevel() != 0) { + setPriorityLevel(other.getPriorityLevel()); + } + if (other.getEventTime() != 0L) { + setEventTime(other.getEventTime()); + } + if (other.getSendReview() != false) { + setSendReview(other.getSendReview()); + } + if (other.getFromIntercom() != false) { + setFromIntercom(other.getFromIntercom()); + } + if (other.getIntercomHideUserCard() != false) { + setIntercomHideUserCard(other.getIntercomHideUserCard()); + } + if (!other.getChatBy().isEmpty()) { + chatBy_ = other.chatBy_; + bitField0_ |= 0x00004000; + onChanged(); + } + if (other.getIndividualChatPriority() != 0) { + setIndividualChatPriority(other.getIndividualChatPriority()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCommonFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + visibleToSender_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + input.readMessage( + getBackgroundImageFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + fullScreenTextColor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getBackgroundImageV2FieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 82: { + input.readMessage( + getGiftImageFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 82 + case 88: { + agreeMsgId_ = input.readUInt64(); + bitField0_ |= 0x00000100; + break; + } // case 88 + case 96: { + priorityLevel_ = input.readUInt32(); + bitField0_ |= 0x00000200; + break; + } // case 96 + case 120: { + eventTime_ = input.readUInt64(); + bitField0_ |= 0x00000400; + break; + } // case 120 + case 128: { + sendReview_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 128 + case 136: { + fromIntercom_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 136 + case 144: { + intercomHideUserCard_ = input.readBool(); + bitField0_ |= 0x00002000; + break; + } // case 144 + case 162: { + chatBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 162 + case 168: { + individualChatPriority_ = input.readUInt32(); + bitField0_ |= 0x00008000; + break; + } // case 168 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common common_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> commonBuilder_; + /** + * <code>.Common common = 1;</code> + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.Common common = 1;</code> + * @return The common. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + if (commonBuilder_ == null) { + return common_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * <code>.Common common = 1;</code> + */ + public Builder setCommon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Common common = 1;</code> + */ + public Builder setCommon( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Common common = 1;</code> + */ + public Builder mergeCommon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + common_ != null && + common_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Common common = 1;</code> + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Common common = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * <code>.Common common = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + } + /** + * <code>.Common common = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder>( + getCommon(), + getParentForChildren(), + isClean()); + common_ = null; + } + return commonBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> userBuilder_; + /** + * <code>.User user = 2;</code> + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * <code>.User user = 2;</code> + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * <code>.User user = 2;</code> + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.User user = 2;</code> + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.User user = 2;</code> + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.User user = 2;</code> + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User user = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * <code>.User user = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + } + /** + * <code>.User user = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private java.lang.Object content_ = ""; + /** + * <code>string content = 3;</code> + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string content = 3;</code> + * @return The bytes for content. + */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string content = 3;</code> + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>string content = 3;</code> + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * <code>string content = 3;</code> + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private boolean visibleToSender_ ; + /** + * <code>bool visible_to_sender = 4;</code> + * @return The visibleToSender. + */ + @java.lang.Override + public boolean getVisibleToSender() { + return visibleToSender_; + } + /** + * <code>bool visible_to_sender = 4;</code> + * @param value The visibleToSender to set. + * @return This builder for chaining. + */ + public Builder setVisibleToSender(boolean value) { + + visibleToSender_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>bool visible_to_sender = 4;</code> + * @return This builder for chaining. + */ + public Builder clearVisibleToSender() { + bitField0_ = (bitField0_ & ~0x00000008); + visibleToSender_ = false; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image backgroundImage_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> backgroundImageBuilder_; + /** + * <code>.Image background_image = 5;</code> + * @return Whether the backgroundImage field is set. + */ + public boolean hasBackgroundImage() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * <code>.Image background_image = 5;</code> + * @return The backgroundImage. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImage() { + if (backgroundImageBuilder_ == null) { + return backgroundImage_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImage_; + } else { + return backgroundImageBuilder_.getMessage(); + } + } + /** + * <code>.Image background_image = 5;</code> + */ + public Builder setBackgroundImage(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backgroundImage_ = value; + } else { + backgroundImageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>.Image background_image = 5;</code> + */ + public Builder setBackgroundImage( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (backgroundImageBuilder_ == null) { + backgroundImage_ = builderForValue.build(); + } else { + backgroundImageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>.Image background_image = 5;</code> + */ + public Builder mergeBackgroundImage(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundImageBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + backgroundImage_ != null && + backgroundImage_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBackgroundImageBuilder().mergeFrom(value); + } else { + backgroundImage_ = value; + } + } else { + backgroundImageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>.Image background_image = 5;</code> + */ + public Builder clearBackgroundImage() { + bitField0_ = (bitField0_ & ~0x00000010); + backgroundImage_ = null; + if (backgroundImageBuilder_ != null) { + backgroundImageBuilder_.dispose(); + backgroundImageBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image background_image = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBackgroundImageBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getBackgroundImageFieldBuilder().getBuilder(); + } + /** + * <code>.Image background_image = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageOrBuilder() { + if (backgroundImageBuilder_ != null) { + return backgroundImageBuilder_.getMessageOrBuilder(); + } else { + return backgroundImage_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImage_; + } + } + /** + * <code>.Image background_image = 5;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBackgroundImageFieldBuilder() { + if (backgroundImageBuilder_ == null) { + backgroundImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBackgroundImage(), + getParentForChildren(), + isClean()); + backgroundImage_ = null; + } + return backgroundImageBuilder_; + } + + private java.lang.Object fullScreenTextColor_ = ""; + /** + * <code>string full_screen_text_color = 6;</code> + * @return The fullScreenTextColor. + */ + public java.lang.String getFullScreenTextColor() { + java.lang.Object ref = fullScreenTextColor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullScreenTextColor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string full_screen_text_color = 6;</code> + * @return The bytes for fullScreenTextColor. + */ + public com.google.protobuf.ByteString + getFullScreenTextColorBytes() { + java.lang.Object ref = fullScreenTextColor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fullScreenTextColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string full_screen_text_color = 6;</code> + * @param value The fullScreenTextColor to set. + * @return This builder for chaining. + */ + public Builder setFullScreenTextColor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fullScreenTextColor_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>string full_screen_text_color = 6;</code> + * @return This builder for chaining. + */ + public Builder clearFullScreenTextColor() { + fullScreenTextColor_ = getDefaultInstance().getFullScreenTextColor(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * <code>string full_screen_text_color = 6;</code> + * @param value The bytes for fullScreenTextColor to set. + * @return This builder for chaining. + */ + public Builder setFullScreenTextColorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fullScreenTextColor_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image backgroundImageV2_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> backgroundImageV2Builder_; + /** + * <code>.Image background_image_v2 = 7;</code> + * @return Whether the backgroundImageV2 field is set. + */ + public boolean hasBackgroundImageV2() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * <code>.Image background_image_v2 = 7;</code> + * @return The backgroundImageV2. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImageV2() { + if (backgroundImageV2Builder_ == null) { + return backgroundImageV2_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImageV2_; + } else { + return backgroundImageV2Builder_.getMessage(); + } + } + /** + * <code>.Image background_image_v2 = 7;</code> + */ + public Builder setBackgroundImageV2(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundImageV2Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backgroundImageV2_ = value; + } else { + backgroundImageV2Builder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.Image background_image_v2 = 7;</code> + */ + public Builder setBackgroundImageV2( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (backgroundImageV2Builder_ == null) { + backgroundImageV2_ = builderForValue.build(); + } else { + backgroundImageV2Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.Image background_image_v2 = 7;</code> + */ + public Builder mergeBackgroundImageV2(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundImageV2Builder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + backgroundImageV2_ != null && + backgroundImageV2_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBackgroundImageV2Builder().mergeFrom(value); + } else { + backgroundImageV2_ = value; + } + } else { + backgroundImageV2Builder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.Image background_image_v2 = 7;</code> + */ + public Builder clearBackgroundImageV2() { + bitField0_ = (bitField0_ & ~0x00000040); + backgroundImageV2_ = null; + if (backgroundImageV2Builder_ != null) { + backgroundImageV2Builder_.dispose(); + backgroundImageV2Builder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image background_image_v2 = 7;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBackgroundImageV2Builder() { + bitField0_ |= 0x00000040; + onChanged(); + return getBackgroundImageV2FieldBuilder().getBuilder(); + } + /** + * <code>.Image background_image_v2 = 7;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageV2OrBuilder() { + if (backgroundImageV2Builder_ != null) { + return backgroundImageV2Builder_.getMessageOrBuilder(); + } else { + return backgroundImageV2_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImageV2_; + } + } + /** + * <code>.Image background_image_v2 = 7;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBackgroundImageV2FieldBuilder() { + if (backgroundImageV2Builder_ == null) { + backgroundImageV2Builder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBackgroundImageV2(), + getParentForChildren(), + isClean()); + backgroundImageV2_ = null; + } + return backgroundImageV2Builder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image giftImage_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> giftImageBuilder_; + /** + * <pre> + * PublicAreaCommon public_area_common = 9; + * </pre> + * + * <code>.Image gift_image = 10;</code> + * @return Whether the giftImage field is set. + */ + public boolean hasGiftImage() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * <pre> + * PublicAreaCommon public_area_common = 9; + * </pre> + * + * <code>.Image gift_image = 10;</code> + * @return The giftImage. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getGiftImage() { + if (giftImageBuilder_ == null) { + return giftImage_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : giftImage_; + } else { + return giftImageBuilder_.getMessage(); + } + } + /** + * <pre> + * PublicAreaCommon public_area_common = 9; + * </pre> + * + * <code>.Image gift_image = 10;</code> + */ + public Builder setGiftImage(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (giftImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + giftImage_ = value; + } else { + giftImageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <pre> + * PublicAreaCommon public_area_common = 9; + * </pre> + * + * <code>.Image gift_image = 10;</code> + */ + public Builder setGiftImage( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (giftImageBuilder_ == null) { + giftImage_ = builderForValue.build(); + } else { + giftImageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <pre> + * PublicAreaCommon public_area_common = 9; + * </pre> + * + * <code>.Image gift_image = 10;</code> + */ + public Builder mergeGiftImage(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (giftImageBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + giftImage_ != null && + giftImage_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getGiftImageBuilder().mergeFrom(value); + } else { + giftImage_ = value; + } + } else { + giftImageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <pre> + * PublicAreaCommon public_area_common = 9; + * </pre> + * + * <code>.Image gift_image = 10;</code> + */ + public Builder clearGiftImage() { + bitField0_ = (bitField0_ & ~0x00000080); + giftImage_ = null; + if (giftImageBuilder_ != null) { + giftImageBuilder_.dispose(); + giftImageBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <pre> + * PublicAreaCommon public_area_common = 9; + * </pre> + * + * <code>.Image gift_image = 10;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getGiftImageBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getGiftImageFieldBuilder().getBuilder(); + } + /** + * <pre> + * PublicAreaCommon public_area_common = 9; + * </pre> + * + * <code>.Image gift_image = 10;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getGiftImageOrBuilder() { + if (giftImageBuilder_ != null) { + return giftImageBuilder_.getMessageOrBuilder(); + } else { + return giftImage_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : giftImage_; + } + } + /** + * <pre> + * PublicAreaCommon public_area_common = 9; + * </pre> + * + * <code>.Image gift_image = 10;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getGiftImageFieldBuilder() { + if (giftImageBuilder_ == null) { + giftImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getGiftImage(), + getParentForChildren(), + isClean()); + giftImage_ = null; + } + return giftImageBuilder_; + } + + private long agreeMsgId_ ; + /** + * <code>uint64 agree_msg_id = 11;</code> + * @return The agreeMsgId. + */ + @java.lang.Override + public long getAgreeMsgId() { + return agreeMsgId_; + } + /** + * <code>uint64 agree_msg_id = 11;</code> + * @param value The agreeMsgId to set. + * @return This builder for chaining. + */ + public Builder setAgreeMsgId(long value) { + + agreeMsgId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>uint64 agree_msg_id = 11;</code> + * @return This builder for chaining. + */ + public Builder clearAgreeMsgId() { + bitField0_ = (bitField0_ & ~0x00000100); + agreeMsgId_ = 0L; + onChanged(); + return this; + } + + private int priorityLevel_ ; + /** + * <code>uint32 priority_level = 12;</code> + * @return The priorityLevel. + */ + @java.lang.Override + public int getPriorityLevel() { + return priorityLevel_; + } + /** + * <code>uint32 priority_level = 12;</code> + * @param value The priorityLevel to set. + * @return This builder for chaining. + */ + public Builder setPriorityLevel(int value) { + + priorityLevel_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>uint32 priority_level = 12;</code> + * @return This builder for chaining. + */ + public Builder clearPriorityLevel() { + bitField0_ = (bitField0_ & ~0x00000200); + priorityLevel_ = 0; + onChanged(); + return this; + } + + private long eventTime_ ; + /** + * <pre> + * LandscapeAreaCommon landscape_area_common = 13; + * </pre> + * + * <code>uint64 event_time = 15;</code> + * @return The eventTime. + */ + @java.lang.Override + public long getEventTime() { + return eventTime_; + } + /** + * <pre> + * LandscapeAreaCommon landscape_area_common = 13; + * </pre> + * + * <code>uint64 event_time = 15;</code> + * @param value The eventTime to set. + * @return This builder for chaining. + */ + public Builder setEventTime(long value) { + + eventTime_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * <pre> + * LandscapeAreaCommon landscape_area_common = 13; + * </pre> + * + * <code>uint64 event_time = 15;</code> + * @return This builder for chaining. + */ + public Builder clearEventTime() { + bitField0_ = (bitField0_ & ~0x00000400); + eventTime_ = 0L; + onChanged(); + return this; + } + + private boolean sendReview_ ; + /** + * <code>bool send_review = 16;</code> + * @return The sendReview. + */ + @java.lang.Override + public boolean getSendReview() { + return sendReview_; + } + /** + * <code>bool send_review = 16;</code> + * @param value The sendReview to set. + * @return This builder for chaining. + */ + public Builder setSendReview(boolean value) { + + sendReview_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * <code>bool send_review = 16;</code> + * @return This builder for chaining. + */ + public Builder clearSendReview() { + bitField0_ = (bitField0_ & ~0x00000800); + sendReview_ = false; + onChanged(); + return this; + } + + private boolean fromIntercom_ ; + /** + * <code>bool from_intercom = 17;</code> + * @return The fromIntercom. + */ + @java.lang.Override + public boolean getFromIntercom() { + return fromIntercom_; + } + /** + * <code>bool from_intercom = 17;</code> + * @param value The fromIntercom to set. + * @return This builder for chaining. + */ + public Builder setFromIntercom(boolean value) { + + fromIntercom_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * <code>bool from_intercom = 17;</code> + * @return This builder for chaining. + */ + public Builder clearFromIntercom() { + bitField0_ = (bitField0_ & ~0x00001000); + fromIntercom_ = false; + onChanged(); + return this; + } + + private boolean intercomHideUserCard_ ; + /** + * <code>bool intercom_hide_user_card = 18;</code> + * @return The intercomHideUserCard. + */ + @java.lang.Override + public boolean getIntercomHideUserCard() { + return intercomHideUserCard_; + } + /** + * <code>bool intercom_hide_user_card = 18;</code> + * @param value The intercomHideUserCard to set. + * @return This builder for chaining. + */ + public Builder setIntercomHideUserCard(boolean value) { + + intercomHideUserCard_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>bool intercom_hide_user_card = 18;</code> + * @return This builder for chaining. + */ + public Builder clearIntercomHideUserCard() { + bitField0_ = (bitField0_ & ~0x00002000); + intercomHideUserCard_ = false; + onChanged(); + return this; + } + + private java.lang.Object chatBy_ = ""; + /** + * <pre> + * repeated string chatTagsList = 19; + * </pre> + * + * <code>string chat_by = 20;</code> + * @return The chatBy. + */ + public java.lang.String getChatBy() { + java.lang.Object ref = chatBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + chatBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <pre> + * repeated string chatTagsList = 19; + * </pre> + * + * <code>string chat_by = 20;</code> + * @return The bytes for chatBy. + */ + public com.google.protobuf.ByteString + getChatByBytes() { + java.lang.Object ref = chatBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + chatBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <pre> + * repeated string chatTagsList = 19; + * </pre> + * + * <code>string chat_by = 20;</code> + * @param value The chatBy to set. + * @return This builder for chaining. + */ + public Builder setChatBy( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + chatBy_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <pre> + * repeated string chatTagsList = 19; + * </pre> + * + * <code>string chat_by = 20;</code> + * @return This builder for chaining. + */ + public Builder clearChatBy() { + chatBy_ = getDefaultInstance().getChatBy(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + return this; + } + /** + * <pre> + * repeated string chatTagsList = 19; + * </pre> + * + * <code>string chat_by = 20;</code> + * @param value The bytes for chatBy to set. + * @return This builder for chaining. + */ + public Builder setChatByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + chatBy_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + private int individualChatPriority_ ; + /** + * <pre> + * Text rtf_content = 22 ; + * </pre> + * + * <code>uint32 individual_chat_priority = 21;</code> + * @return The individualChatPriority. + */ + @java.lang.Override + public int getIndividualChatPriority() { + return individualChatPriority_; + } + /** + * <pre> + * Text rtf_content = 22 ; + * </pre> + * + * <code>uint32 individual_chat_priority = 21;</code> + * @param value The individualChatPriority to set. + * @return This builder for chaining. + */ + public Builder setIndividualChatPriority(int value) { + + individualChatPriority_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <pre> + * Text rtf_content = 22 ; + * </pre> + * + * <code>uint32 individual_chat_priority = 21;</code> + * @return This builder for chaining. + */ + public Builder clearIndividualChatPriority() { + bitField0_ = (bitField0_ & ~0x00008000); + individualChatPriority_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<douyin_webcast_chat_message_msg> + PARSER = new com.google.protobuf.AbstractParser<douyin_webcast_chat_message_msg>() { + @java.lang.Override + public douyin_webcast_chat_message_msg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<douyin_webcast_chat_message_msg> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<douyin_webcast_chat_message_msg> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_chat_message_msgOrBuilder.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_chat_message_msgOrBuilder.java new file mode 100644 index 0000000..961938e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_chat_message_msgOrBuilder.java @@ -0,0 +1,220 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_webcast_chat_message_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +public interface douyin_webcast_chat_message_msgOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_chat_message_msg) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.Common common = 1;</code> + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * <code>.Common common = 1;</code> + * @return The common. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getCommon(); + /** + * <code>.Common common = 1;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder(); + + /** + * <code>.User user = 2;</code> + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * <code>.User user = 2;</code> + * @return The user. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser(); + /** + * <code>.User user = 2;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder(); + + /** + * <code>string content = 3;</code> + * @return The content. + */ + java.lang.String getContent(); + /** + * <code>string content = 3;</code> + * @return The bytes for content. + */ + com.google.protobuf.ByteString + getContentBytes(); + + /** + * <code>bool visible_to_sender = 4;</code> + * @return The visibleToSender. + */ + boolean getVisibleToSender(); + + /** + * <code>.Image background_image = 5;</code> + * @return Whether the backgroundImage field is set. + */ + boolean hasBackgroundImage(); + /** + * <code>.Image background_image = 5;</code> + * @return The backgroundImage. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImage(); + /** + * <code>.Image background_image = 5;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageOrBuilder(); + + /** + * <code>string full_screen_text_color = 6;</code> + * @return The fullScreenTextColor. + */ + java.lang.String getFullScreenTextColor(); + /** + * <code>string full_screen_text_color = 6;</code> + * @return The bytes for fullScreenTextColor. + */ + com.google.protobuf.ByteString + getFullScreenTextColorBytes(); + + /** + * <code>.Image background_image_v2 = 7;</code> + * @return Whether the backgroundImageV2 field is set. + */ + boolean hasBackgroundImageV2(); + /** + * <code>.Image background_image_v2 = 7;</code> + * @return The backgroundImageV2. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImageV2(); + /** + * <code>.Image background_image_v2 = 7;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageV2OrBuilder(); + + /** + * <pre> + * PublicAreaCommon public_area_common = 9; + * </pre> + * + * <code>.Image gift_image = 10;</code> + * @return Whether the giftImage field is set. + */ + boolean hasGiftImage(); + /** + * <pre> + * PublicAreaCommon public_area_common = 9; + * </pre> + * + * <code>.Image gift_image = 10;</code> + * @return The giftImage. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getGiftImage(); + /** + * <pre> + * PublicAreaCommon public_area_common = 9; + * </pre> + * + * <code>.Image gift_image = 10;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getGiftImageOrBuilder(); + + /** + * <code>uint64 agree_msg_id = 11;</code> + * @return The agreeMsgId. + */ + long getAgreeMsgId(); + + /** + * <code>uint32 priority_level = 12;</code> + * @return The priorityLevel. + */ + int getPriorityLevel(); + + /** + * <pre> + * LandscapeAreaCommon landscape_area_common = 13; + * </pre> + * + * <code>uint64 event_time = 15;</code> + * @return The eventTime. + */ + long getEventTime(); + + /** + * <code>bool send_review = 16;</code> + * @return The sendReview. + */ + boolean getSendReview(); + + /** + * <code>bool from_intercom = 17;</code> + * @return The fromIntercom. + */ + boolean getFromIntercom(); + + /** + * <code>bool intercom_hide_user_card = 18;</code> + * @return The intercomHideUserCard. + */ + boolean getIntercomHideUserCard(); + + /** + * <pre> + * repeated string chatTagsList = 19; + * </pre> + * + * <code>string chat_by = 20;</code> + * @return The chatBy. + */ + java.lang.String getChatBy(); + /** + * <pre> + * repeated string chatTagsList = 19; + * </pre> + * + * <code>string chat_by = 20;</code> + * @return The bytes for chatBy. + */ + com.google.protobuf.ByteString + getChatByBytes(); + + /** + * <pre> + * Text rtf_content = 22 ; + * </pre> + * + * <code>uint32 individual_chat_priority = 21;</code> + * @return The individualChatPriority. + */ + int getIndividualChatPriority(); +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_gift_message_msg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_gift_message_msg.java new file mode 100644 index 0000000..d4098dd --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_gift_message_msg.java @@ -0,0 +1,3963 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_webcast_gift_message_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +/** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg} + */ +public final class douyin_webcast_gift_message_msg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg) + douyin_webcast_gift_message_msgOrBuilder { + private static final long serialVersionUID = 0L; + // Use douyin_webcast_gift_message_msg.newBuilder() to construct. + private douyin_webcast_gift_message_msg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private douyin_webcast_gift_message_msg() { + logId_ = ""; + interactGiftInfo_ = ""; + diyItemInfo_ = ""; + minAssetSetList_ = emptyLongList(); + toUserIdsList_ = emptyLongList(); + traceId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new douyin_webcast_gift_message_msg(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_webcast_gift_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_gift_message_msg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_webcast_gift_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_gift_message_msg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg.Builder.class); + } + + public static final int COMMON_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common common_; + /** + * <code>.Common common = 1;</code> + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return common_ != null; + } + /** + * <code>.Common common = 1;</code> + * @return The common. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + return common_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + /** + * <code>.Common common = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + return common_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + + public static final int LONG_GIFT_ID_FIELD_NUMBER = 2; + private long longGiftId_ = 0L; + /** + * <code>uint64 long_gift_id = 2;</code> + * @return The longGiftId. + */ + @java.lang.Override + public long getLongGiftId() { + return longGiftId_; + } + + public static final int FAN_TICKET_COUNT_FIELD_NUMBER = 3; + private long fanTicketCount_ = 0L; + /** + * <code>uint64 fan_ticket_count = 3;</code> + * @return The fanTicketCount. + */ + @java.lang.Override + public long getFanTicketCount() { + return fanTicketCount_; + } + + public static final int GROUP_COUNT_FIELD_NUMBER = 4; + private long groupCount_ = 0L; + /** + * <code>uint64 group_count = 4;</code> + * @return The groupCount. + */ + @java.lang.Override + public long getGroupCount() { + return groupCount_; + } + + public static final int REPEAT_COUNT_FIELD_NUMBER = 5; + private long repeatCount_ = 0L; + /** + * <code>uint64 repeat_count = 5;</code> + * @return The repeatCount. + */ + @java.lang.Override + public long getRepeatCount() { + return repeatCount_; + } + + public static final int COMBO_COUNT_FIELD_NUMBER = 6; + private long comboCount_ = 0L; + /** + * <code>uint64 combo_count = 6;</code> + * @return The comboCount. + */ + @java.lang.Override + public long getComboCount() { + return comboCount_; + } + + public static final int USER_FIELD_NUMBER = 7; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User user_; + /** + * <code>.User user = 7;</code> + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return user_ != null; + } + /** + * <code>.User user = 7;</code> + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + /** + * <code>.User user = 7;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + + public static final int TO_USER_FIELD_NUMBER = 8; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User toUser_; + /** + * <code>.User to_user = 8;</code> + * @return Whether the toUser field is set. + */ + @java.lang.Override + public boolean hasToUser() { + return toUser_ != null; + } + /** + * <code>.User to_user = 8;</code> + * @return The toUser. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getToUser() { + return toUser_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : toUser_; + } + /** + * <code>.User to_user = 8;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getToUserOrBuilder() { + return toUser_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : toUser_; + } + + public static final int REPEAT_END_FIELD_NUMBER = 9; + private int repeatEnd_ = 0; + /** + * <code>uint32 repeat_end = 9;</code> + * @return The repeatEnd. + */ + @java.lang.Override + public int getRepeatEnd() { + return repeatEnd_; + } + + public static final int TEXT_EFFECT_FIELD_NUMBER = 10; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect textEffect_; + /** + * <code>.TextEffect text_effect = 10;</code> + * @return Whether the textEffect field is set. + */ + @java.lang.Override + public boolean hasTextEffect() { + return textEffect_ != null; + } + /** + * <code>.TextEffect text_effect = 10;</code> + * @return The textEffect. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect getTextEffect() { + return textEffect_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.getDefaultInstance() : textEffect_; + } + /** + * <code>.TextEffect text_effect = 10;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffectOrBuilder getTextEffectOrBuilder() { + return textEffect_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.getDefaultInstance() : textEffect_; + } + + public static final int GROUP_ID_FIELD_NUMBER = 11; + private long groupId_ = 0L; + /** + * <code>uint64 group_id = 11;</code> + * @return The groupId. + */ + @java.lang.Override + public long getGroupId() { + return groupId_; + } + + public static final int INCOME_TASKGIFTS_FIELD_NUMBER = 12; + private long incomeTaskgifts_ = 0L; + /** + * <code>uint64 income_taskgifts = 12;</code> + * @return The incomeTaskgifts. + */ + @java.lang.Override + public long getIncomeTaskgifts() { + return incomeTaskgifts_; + } + + public static final int ROOM_FAN_TICKET_COUNT_FIELD_NUMBER = 13; + private long roomFanTicketCount_ = 0L; + /** + * <code>uint64 room_fan_ticket_count = 13;</code> + * @return The roomFanTicketCount. + */ + @java.lang.Override + public long getRoomFanTicketCount() { + return roomFanTicketCount_; + } + + public static final int PRIORITY_FIELD_NUMBER = 14; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority priority_; + /** + * <code>.GiftIMPriority priority = 14;</code> + * @return Whether the priority field is set. + */ + @java.lang.Override + public boolean hasPriority() { + return priority_ != null; + } + /** + * <code>.GiftIMPriority priority = 14;</code> + * @return The priority. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority getPriority() { + return priority_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.getDefaultInstance() : priority_; + } + /** + * <code>.GiftIMPriority priority = 14;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriorityOrBuilder getPriorityOrBuilder() { + return priority_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.getDefaultInstance() : priority_; + } + + public static final int GIFT_FIELD_NUMBER = 15; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct gift_; + /** + * <code>.GiftStruct gift = 15;</code> + * @return Whether the gift field is set. + */ + @java.lang.Override + public boolean hasGift() { + return gift_ != null; + } + /** + * <code>.GiftStruct gift = 15;</code> + * @return The gift. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct getGift() { + return gift_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.getDefaultInstance() : gift_; + } + /** + * <code>.GiftStruct gift = 15;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStructOrBuilder getGiftOrBuilder() { + return gift_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.getDefaultInstance() : gift_; + } + + public static final int LOG_ID_FIELD_NUMBER = 16; + @SuppressWarnings("serial") + private volatile java.lang.Object logId_ = ""; + /** + * <code>string log_id = 16;</code> + * @return The logId. + */ + @java.lang.Override + public java.lang.String getLogId() { + java.lang.Object ref = logId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logId_ = s; + return s; + } + } + /** + * <code>string log_id = 16;</code> + * @return The bytes for logId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLogIdBytes() { + java.lang.Object ref = logId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEND_TYPE_FIELD_NUMBER = 17; + private long sendType_ = 0L; + /** + * <code>uint64 send_type = 17;</code> + * @return The sendType. + */ + @java.lang.Override + public long getSendType() { + return sendType_; + } + + public static final int PUBLIC_AREA_COMMON_FIELD_NUMBER = 18; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon publicAreaCommon_; + /** + * <code>.PublicAreaCommon public_area_common = 18;</code> + * @return Whether the publicAreaCommon field is set. + */ + @java.lang.Override + public boolean hasPublicAreaCommon() { + return publicAreaCommon_ != null; + } + /** + * <code>.PublicAreaCommon public_area_common = 18;</code> + * @return The publicAreaCommon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon getPublicAreaCommon() { + return publicAreaCommon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance() : publicAreaCommon_; + } + /** + * <code>.PublicAreaCommon public_area_common = 18;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder getPublicAreaCommonOrBuilder() { + return publicAreaCommon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance() : publicAreaCommon_; + } + + public static final int TRAY_DISPLAY_TEXT_FIELD_NUMBER = 19; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text trayDisplayText_; + /** + * <code>.Text tray_display_text = 19;</code> + * @return Whether the trayDisplayText field is set. + */ + @java.lang.Override + public boolean hasTrayDisplayText() { + return trayDisplayText_ != null; + } + /** + * <code>.Text tray_display_text = 19;</code> + * @return The trayDisplayText. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text getTrayDisplayText() { + return trayDisplayText_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : trayDisplayText_; + } + /** + * <code>.Text tray_display_text = 19;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getTrayDisplayTextOrBuilder() { + return trayDisplayText_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : trayDisplayText_; + } + + public static final int BANNED_DISPLAY_EFFECTS_FIELD_NUMBER = 20; + private long bannedDisplayEffects_ = 0L; + /** + * <code>uint64 banned_display_effects = 20;</code> + * @return The bannedDisplayEffects. + */ + @java.lang.Override + public long getBannedDisplayEffects() { + return bannedDisplayEffects_; + } + + public static final int DISPLAY_FOR_SELF_FIELD_NUMBER = 25; + private boolean displayForSelf_ = false; + /** + * <pre> + * GiftTrayInfo trayInfo = 21; + * AssetEffectMixInfo assetEffectMixInfo = 22; + * </pre> + * + * <code>bool display_for_self = 25;</code> + * @return The displayForSelf. + */ + @java.lang.Override + public boolean getDisplayForSelf() { + return displayForSelf_; + } + + public static final int INTERACT_GIFT_INFO_FIELD_NUMBER = 26; + @SuppressWarnings("serial") + private volatile java.lang.Object interactGiftInfo_ = ""; + /** + * <code>string interact_gift_info = 26;</code> + * @return The interactGiftInfo. + */ + @java.lang.Override + public java.lang.String getInteractGiftInfo() { + java.lang.Object ref = interactGiftInfo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interactGiftInfo_ = s; + return s; + } + } + /** + * <code>string interact_gift_info = 26;</code> + * @return The bytes for interactGiftInfo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInteractGiftInfoBytes() { + java.lang.Object ref = interactGiftInfo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + interactGiftInfo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DIY_ITEM_INFO_FIELD_NUMBER = 27; + @SuppressWarnings("serial") + private volatile java.lang.Object diyItemInfo_ = ""; + /** + * <code>string diy_item_info = 27;</code> + * @return The diyItemInfo. + */ + @java.lang.Override + public java.lang.String getDiyItemInfo() { + java.lang.Object ref = diyItemInfo_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + diyItemInfo_ = s; + return s; + } + } + /** + * <code>string diy_item_info = 27;</code> + * @return The bytes for diyItemInfo. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDiyItemInfoBytes() { + java.lang.Object ref = diyItemInfo_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + diyItemInfo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MIN_ASSET_SET_LIST_FIELD_NUMBER = 28; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList minAssetSetList_; + /** + * <code>repeated uint64 min_asset_set_list = 28;</code> + * @return A list containing the minAssetSetList. + */ + @java.lang.Override + public java.util.List<java.lang.Long> + getMinAssetSetListList() { + return minAssetSetList_; + } + /** + * <code>repeated uint64 min_asset_set_list = 28;</code> + * @return The count of minAssetSetList. + */ + public int getMinAssetSetListCount() { + return minAssetSetList_.size(); + } + /** + * <code>repeated uint64 min_asset_set_list = 28;</code> + * @param index The index of the element to return. + * @return The minAssetSetList at the given index. + */ + public long getMinAssetSetList(int index) { + return minAssetSetList_.getLong(index); + } + private int minAssetSetListMemoizedSerializedSize = -1; + + public static final int TOTAL_COUNT_FIELD_NUMBER = 29; + private long totalCount_ = 0L; + /** + * <code>uint64 total_count = 29;</code> + * @return The totalCount. + */ + @java.lang.Override + public long getTotalCount() { + return totalCount_; + } + + public static final int CLIENT_GIFT_SOURCE_FIELD_NUMBER = 30; + private int clientGiftSource_ = 0; + /** + * <code>uint32 client_gift_source = 30;</code> + * @return The clientGiftSource. + */ + @java.lang.Override + public int getClientGiftSource() { + return clientGiftSource_; + } + + public static final int TO_USER_IDS_LIST_FIELD_NUMBER = 32; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList toUserIdsList_; + /** + * <pre> + * AnchorGiftData anchorGift = 31; + * </pre> + * + * <code>repeated uint64 to_user_ids_list = 32;</code> + * @return A list containing the toUserIdsList. + */ + @java.lang.Override + public java.util.List<java.lang.Long> + getToUserIdsListList() { + return toUserIdsList_; + } + /** + * <pre> + * AnchorGiftData anchorGift = 31; + * </pre> + * + * <code>repeated uint64 to_user_ids_list = 32;</code> + * @return The count of toUserIdsList. + */ + public int getToUserIdsListCount() { + return toUserIdsList_.size(); + } + /** + * <pre> + * AnchorGiftData anchorGift = 31; + * </pre> + * + * <code>repeated uint64 to_user_ids_list = 32;</code> + * @param index The index of the element to return. + * @return The toUserIdsList at the given index. + */ + public long getToUserIdsList(int index) { + return toUserIdsList_.getLong(index); + } + private int toUserIdsListMemoizedSerializedSize = -1; + + public static final int SEND_TIMET_FIELD_NUMBER = 33; + private long sendTimet_ = 0L; + /** + * <code>uint64 send_timet = 33;</code> + * @return The sendTimet. + */ + @java.lang.Override + public long getSendTimet() { + return sendTimet_; + } + + public static final int FORCE_DISPLAY_EFFECTST_FIELD_NUMBER = 34; + private long forceDisplayEffectst_ = 0L; + /** + * <code>uint64 force_display_effectst = 34;</code> + * @return The forceDisplayEffectst. + */ + @java.lang.Override + public long getForceDisplayEffectst() { + return forceDisplayEffectst_; + } + + public static final int TRACE_ID_FIELD_NUMBER = 35; + @SuppressWarnings("serial") + private volatile java.lang.Object traceId_ = ""; + /** + * <code>string trace_id = 35;</code> + * @return The traceId. + */ + @java.lang.Override + public java.lang.String getTraceId() { + java.lang.Object ref = traceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + traceId_ = s; + return s; + } + } + /** + * <code>string trace_id = 35;</code> + * @return The bytes for traceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTraceIdBytes() { + java.lang.Object ref = traceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + traceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EFFECT_DISPLAY_TS_FIELD_NUMBER = 36; + private long effectDisplayTs_ = 0L; + /** + * <code>uint64 effect_display_ts = 36;</code> + * @return The effectDisplayTs. + */ + @java.lang.Override + public long getEffectDisplayTs() { + return effectDisplayTs_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (common_ != null) { + output.writeMessage(1, getCommon()); + } + if (longGiftId_ != 0L) { + output.writeUInt64(2, longGiftId_); + } + if (fanTicketCount_ != 0L) { + output.writeUInt64(3, fanTicketCount_); + } + if (groupCount_ != 0L) { + output.writeUInt64(4, groupCount_); + } + if (repeatCount_ != 0L) { + output.writeUInt64(5, repeatCount_); + } + if (comboCount_ != 0L) { + output.writeUInt64(6, comboCount_); + } + if (user_ != null) { + output.writeMessage(7, getUser()); + } + if (toUser_ != null) { + output.writeMessage(8, getToUser()); + } + if (repeatEnd_ != 0) { + output.writeUInt32(9, repeatEnd_); + } + if (textEffect_ != null) { + output.writeMessage(10, getTextEffect()); + } + if (groupId_ != 0L) { + output.writeUInt64(11, groupId_); + } + if (incomeTaskgifts_ != 0L) { + output.writeUInt64(12, incomeTaskgifts_); + } + if (roomFanTicketCount_ != 0L) { + output.writeUInt64(13, roomFanTicketCount_); + } + if (priority_ != null) { + output.writeMessage(14, getPriority()); + } + if (gift_ != null) { + output.writeMessage(15, getGift()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, logId_); + } + if (sendType_ != 0L) { + output.writeUInt64(17, sendType_); + } + if (publicAreaCommon_ != null) { + output.writeMessage(18, getPublicAreaCommon()); + } + if (trayDisplayText_ != null) { + output.writeMessage(19, getTrayDisplayText()); + } + if (bannedDisplayEffects_ != 0L) { + output.writeUInt64(20, bannedDisplayEffects_); + } + if (displayForSelf_ != false) { + output.writeBool(25, displayForSelf_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interactGiftInfo_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 26, interactGiftInfo_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diyItemInfo_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 27, diyItemInfo_); + } + if (getMinAssetSetListList().size() > 0) { + output.writeUInt32NoTag(226); + output.writeUInt32NoTag(minAssetSetListMemoizedSerializedSize); + } + for (int i = 0; i < minAssetSetList_.size(); i++) { + output.writeUInt64NoTag(minAssetSetList_.getLong(i)); + } + if (totalCount_ != 0L) { + output.writeUInt64(29, totalCount_); + } + if (clientGiftSource_ != 0) { + output.writeUInt32(30, clientGiftSource_); + } + if (getToUserIdsListList().size() > 0) { + output.writeUInt32NoTag(258); + output.writeUInt32NoTag(toUserIdsListMemoizedSerializedSize); + } + for (int i = 0; i < toUserIdsList_.size(); i++) { + output.writeUInt64NoTag(toUserIdsList_.getLong(i)); + } + if (sendTimet_ != 0L) { + output.writeUInt64(33, sendTimet_); + } + if (forceDisplayEffectst_ != 0L) { + output.writeUInt64(34, forceDisplayEffectst_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(traceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 35, traceId_); + } + if (effectDisplayTs_ != 0L) { + output.writeUInt64(36, effectDisplayTs_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (common_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCommon()); + } + if (longGiftId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, longGiftId_); + } + if (fanTicketCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, fanTicketCount_); + } + if (groupCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, groupCount_); + } + if (repeatCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(5, repeatCount_); + } + if (comboCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(6, comboCount_); + } + if (user_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getUser()); + } + if (toUser_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getToUser()); + } + if (repeatEnd_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(9, repeatEnd_); + } + if (textEffect_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getTextEffect()); + } + if (groupId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(11, groupId_); + } + if (incomeTaskgifts_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(12, incomeTaskgifts_); + } + if (roomFanTicketCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(13, roomFanTicketCount_); + } + if (priority_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getPriority()); + } + if (gift_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getGift()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, logId_); + } + if (sendType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(17, sendType_); + } + if (publicAreaCommon_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getPublicAreaCommon()); + } + if (trayDisplayText_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, getTrayDisplayText()); + } + if (bannedDisplayEffects_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(20, bannedDisplayEffects_); + } + if (displayForSelf_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(25, displayForSelf_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interactGiftInfo_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(26, interactGiftInfo_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diyItemInfo_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(27, diyItemInfo_); + } + { + int dataSize = 0; + for (int i = 0; i < minAssetSetList_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt64SizeNoTag(minAssetSetList_.getLong(i)); + } + size += dataSize; + if (!getMinAssetSetListList().isEmpty()) { + size += 2; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + minAssetSetListMemoizedSerializedSize = dataSize; + } + if (totalCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(29, totalCount_); + } + if (clientGiftSource_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(30, clientGiftSource_); + } + { + int dataSize = 0; + for (int i = 0; i < toUserIdsList_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt64SizeNoTag(toUserIdsList_.getLong(i)); + } + size += dataSize; + if (!getToUserIdsListList().isEmpty()) { + size += 2; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + toUserIdsListMemoizedSerializedSize = dataSize; + } + if (sendTimet_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(33, sendTimet_); + } + if (forceDisplayEffectst_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(34, forceDisplayEffectst_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(traceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(35, traceId_); + } + if (effectDisplayTs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(36, effectDisplayTs_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon() + .equals(other.getCommon())) return false; + } + if (getLongGiftId() + != other.getLongGiftId()) return false; + if (getFanTicketCount() + != other.getFanTicketCount()) return false; + if (getGroupCount() + != other.getGroupCount()) return false; + if (getRepeatCount() + != other.getRepeatCount()) return false; + if (getComboCount() + != other.getComboCount()) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (hasToUser() != other.hasToUser()) return false; + if (hasToUser()) { + if (!getToUser() + .equals(other.getToUser())) return false; + } + if (getRepeatEnd() + != other.getRepeatEnd()) return false; + if (hasTextEffect() != other.hasTextEffect()) return false; + if (hasTextEffect()) { + if (!getTextEffect() + .equals(other.getTextEffect())) return false; + } + if (getGroupId() + != other.getGroupId()) return false; + if (getIncomeTaskgifts() + != other.getIncomeTaskgifts()) return false; + if (getRoomFanTicketCount() + != other.getRoomFanTicketCount()) return false; + if (hasPriority() != other.hasPriority()) return false; + if (hasPriority()) { + if (!getPriority() + .equals(other.getPriority())) return false; + } + if (hasGift() != other.hasGift()) return false; + if (hasGift()) { + if (!getGift() + .equals(other.getGift())) return false; + } + if (!getLogId() + .equals(other.getLogId())) return false; + if (getSendType() + != other.getSendType()) return false; + if (hasPublicAreaCommon() != other.hasPublicAreaCommon()) return false; + if (hasPublicAreaCommon()) { + if (!getPublicAreaCommon() + .equals(other.getPublicAreaCommon())) return false; + } + if (hasTrayDisplayText() != other.hasTrayDisplayText()) return false; + if (hasTrayDisplayText()) { + if (!getTrayDisplayText() + .equals(other.getTrayDisplayText())) return false; + } + if (getBannedDisplayEffects() + != other.getBannedDisplayEffects()) return false; + if (getDisplayForSelf() + != other.getDisplayForSelf()) return false; + if (!getInteractGiftInfo() + .equals(other.getInteractGiftInfo())) return false; + if (!getDiyItemInfo() + .equals(other.getDiyItemInfo())) return false; + if (!getMinAssetSetListList() + .equals(other.getMinAssetSetListList())) return false; + if (getTotalCount() + != other.getTotalCount()) return false; + if (getClientGiftSource() + != other.getClientGiftSource()) return false; + if (!getToUserIdsListList() + .equals(other.getToUserIdsListList())) return false; + if (getSendTimet() + != other.getSendTimet()) return false; + if (getForceDisplayEffectst() + != other.getForceDisplayEffectst()) return false; + if (!getTraceId() + .equals(other.getTraceId())) return false; + if (getEffectDisplayTs() + != other.getEffectDisplayTs()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + hash = (37 * hash) + LONG_GIFT_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLongGiftId()); + hash = (37 * hash) + FAN_TICKET_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFanTicketCount()); + hash = (37 * hash) + GROUP_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGroupCount()); + hash = (37 * hash) + REPEAT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRepeatCount()); + hash = (37 * hash) + COMBO_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getComboCount()); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + if (hasToUser()) { + hash = (37 * hash) + TO_USER_FIELD_NUMBER; + hash = (53 * hash) + getToUser().hashCode(); + } + hash = (37 * hash) + REPEAT_END_FIELD_NUMBER; + hash = (53 * hash) + getRepeatEnd(); + if (hasTextEffect()) { + hash = (37 * hash) + TEXT_EFFECT_FIELD_NUMBER; + hash = (53 * hash) + getTextEffect().hashCode(); + } + hash = (37 * hash) + GROUP_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGroupId()); + hash = (37 * hash) + INCOME_TASKGIFTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getIncomeTaskgifts()); + hash = (37 * hash) + ROOM_FAN_TICKET_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRoomFanTicketCount()); + if (hasPriority()) { + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + getPriority().hashCode(); + } + if (hasGift()) { + hash = (37 * hash) + GIFT_FIELD_NUMBER; + hash = (53 * hash) + getGift().hashCode(); + } + hash = (37 * hash) + LOG_ID_FIELD_NUMBER; + hash = (53 * hash) + getLogId().hashCode(); + hash = (37 * hash) + SEND_TYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSendType()); + if (hasPublicAreaCommon()) { + hash = (37 * hash) + PUBLIC_AREA_COMMON_FIELD_NUMBER; + hash = (53 * hash) + getPublicAreaCommon().hashCode(); + } + if (hasTrayDisplayText()) { + hash = (37 * hash) + TRAY_DISPLAY_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getTrayDisplayText().hashCode(); + } + hash = (37 * hash) + BANNED_DISPLAY_EFFECTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBannedDisplayEffects()); + hash = (37 * hash) + DISPLAY_FOR_SELF_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDisplayForSelf()); + hash = (37 * hash) + INTERACT_GIFT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getInteractGiftInfo().hashCode(); + hash = (37 * hash) + DIY_ITEM_INFO_FIELD_NUMBER; + hash = (53 * hash) + getDiyItemInfo().hashCode(); + if (getMinAssetSetListCount() > 0) { + hash = (37 * hash) + MIN_ASSET_SET_LIST_FIELD_NUMBER; + hash = (53 * hash) + getMinAssetSetListList().hashCode(); + } + hash = (37 * hash) + TOTAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalCount()); + hash = (37 * hash) + CLIENT_GIFT_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getClientGiftSource(); + if (getToUserIdsListCount() > 0) { + hash = (37 * hash) + TO_USER_IDS_LIST_FIELD_NUMBER; + hash = (53 * hash) + getToUserIdsListList().hashCode(); + } + hash = (37 * hash) + SEND_TIMET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSendTimet()); + hash = (37 * hash) + FORCE_DISPLAY_EFFECTST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getForceDisplayEffectst()); + hash = (37 * hash) + TRACE_ID_FIELD_NUMBER; + hash = (53 * hash) + getTraceId().hashCode(); + hash = (37 * hash) + EFFECT_DISPLAY_TS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEffectDisplayTs()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg) + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_webcast_gift_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_gift_message_msg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_webcast_gift_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_gift_message_msg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + longGiftId_ = 0L; + fanTicketCount_ = 0L; + groupCount_ = 0L; + repeatCount_ = 0L; + comboCount_ = 0L; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + toUser_ = null; + if (toUserBuilder_ != null) { + toUserBuilder_.dispose(); + toUserBuilder_ = null; + } + repeatEnd_ = 0; + textEffect_ = null; + if (textEffectBuilder_ != null) { + textEffectBuilder_.dispose(); + textEffectBuilder_ = null; + } + groupId_ = 0L; + incomeTaskgifts_ = 0L; + roomFanTicketCount_ = 0L; + priority_ = null; + if (priorityBuilder_ != null) { + priorityBuilder_.dispose(); + priorityBuilder_ = null; + } + gift_ = null; + if (giftBuilder_ != null) { + giftBuilder_.dispose(); + giftBuilder_ = null; + } + logId_ = ""; + sendType_ = 0L; + publicAreaCommon_ = null; + if (publicAreaCommonBuilder_ != null) { + publicAreaCommonBuilder_.dispose(); + publicAreaCommonBuilder_ = null; + } + trayDisplayText_ = null; + if (trayDisplayTextBuilder_ != null) { + trayDisplayTextBuilder_.dispose(); + trayDisplayTextBuilder_ = null; + } + bannedDisplayEffects_ = 0L; + displayForSelf_ = false; + interactGiftInfo_ = ""; + diyItemInfo_ = ""; + minAssetSetList_ = emptyLongList(); + totalCount_ = 0L; + clientGiftSource_ = 0; + toUserIdsList_ = emptyLongList(); + sendTimet_ = 0L; + forceDisplayEffectst_ = 0L; + traceId_ = ""; + effectDisplayTs_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_webcast_gift_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_gift_message_msg_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg result) { + if (((bitField0_ & 0x00800000) != 0)) { + minAssetSetList_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00800000); + } + result.minAssetSetList_ = minAssetSetList_; + if (((bitField0_ & 0x04000000) != 0)) { + toUserIdsList_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x04000000); + } + result.toUserIdsList_ = toUserIdsList_; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null + ? common_ + : commonBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.longGiftId_ = longGiftId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.fanTicketCount_ = fanTicketCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.groupCount_ = groupCount_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.repeatCount_ = repeatCount_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.comboCount_ = comboCount_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.toUser_ = toUserBuilder_ == null + ? toUser_ + : toUserBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.repeatEnd_ = repeatEnd_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.textEffect_ = textEffectBuilder_ == null + ? textEffect_ + : textEffectBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.groupId_ = groupId_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.incomeTaskgifts_ = incomeTaskgifts_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.roomFanTicketCount_ = roomFanTicketCount_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.priority_ = priorityBuilder_ == null + ? priority_ + : priorityBuilder_.build(); + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.gift_ = giftBuilder_ == null + ? gift_ + : giftBuilder_.build(); + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.logId_ = logId_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.sendType_ = sendType_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.publicAreaCommon_ = publicAreaCommonBuilder_ == null + ? publicAreaCommon_ + : publicAreaCommonBuilder_.build(); + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.trayDisplayText_ = trayDisplayTextBuilder_ == null + ? trayDisplayText_ + : trayDisplayTextBuilder_.build(); + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.bannedDisplayEffects_ = bannedDisplayEffects_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.displayForSelf_ = displayForSelf_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.interactGiftInfo_ = interactGiftInfo_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.diyItemInfo_ = diyItemInfo_; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.totalCount_ = totalCount_; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.clientGiftSource_ = clientGiftSource_; + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.sendTimet_ = sendTimet_; + } + if (((from_bitField0_ & 0x10000000) != 0)) { + result.forceDisplayEffectst_ = forceDisplayEffectst_; + } + if (((from_bitField0_ & 0x20000000) != 0)) { + result.traceId_ = traceId_; + } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.effectDisplayTs_ = effectDisplayTs_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + if (other.getLongGiftId() != 0L) { + setLongGiftId(other.getLongGiftId()); + } + if (other.getFanTicketCount() != 0L) { + setFanTicketCount(other.getFanTicketCount()); + } + if (other.getGroupCount() != 0L) { + setGroupCount(other.getGroupCount()); + } + if (other.getRepeatCount() != 0L) { + setRepeatCount(other.getRepeatCount()); + } + if (other.getComboCount() != 0L) { + setComboCount(other.getComboCount()); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.hasToUser()) { + mergeToUser(other.getToUser()); + } + if (other.getRepeatEnd() != 0) { + setRepeatEnd(other.getRepeatEnd()); + } + if (other.hasTextEffect()) { + mergeTextEffect(other.getTextEffect()); + } + if (other.getGroupId() != 0L) { + setGroupId(other.getGroupId()); + } + if (other.getIncomeTaskgifts() != 0L) { + setIncomeTaskgifts(other.getIncomeTaskgifts()); + } + if (other.getRoomFanTicketCount() != 0L) { + setRoomFanTicketCount(other.getRoomFanTicketCount()); + } + if (other.hasPriority()) { + mergePriority(other.getPriority()); + } + if (other.hasGift()) { + mergeGift(other.getGift()); + } + if (!other.getLogId().isEmpty()) { + logId_ = other.logId_; + bitField0_ |= 0x00008000; + onChanged(); + } + if (other.getSendType() != 0L) { + setSendType(other.getSendType()); + } + if (other.hasPublicAreaCommon()) { + mergePublicAreaCommon(other.getPublicAreaCommon()); + } + if (other.hasTrayDisplayText()) { + mergeTrayDisplayText(other.getTrayDisplayText()); + } + if (other.getBannedDisplayEffects() != 0L) { + setBannedDisplayEffects(other.getBannedDisplayEffects()); + } + if (other.getDisplayForSelf() != false) { + setDisplayForSelf(other.getDisplayForSelf()); + } + if (!other.getInteractGiftInfo().isEmpty()) { + interactGiftInfo_ = other.interactGiftInfo_; + bitField0_ |= 0x00200000; + onChanged(); + } + if (!other.getDiyItemInfo().isEmpty()) { + diyItemInfo_ = other.diyItemInfo_; + bitField0_ |= 0x00400000; + onChanged(); + } + if (!other.minAssetSetList_.isEmpty()) { + if (minAssetSetList_.isEmpty()) { + minAssetSetList_ = other.minAssetSetList_; + bitField0_ = (bitField0_ & ~0x00800000); + } else { + ensureMinAssetSetListIsMutable(); + minAssetSetList_.addAll(other.minAssetSetList_); + } + onChanged(); + } + if (other.getTotalCount() != 0L) { + setTotalCount(other.getTotalCount()); + } + if (other.getClientGiftSource() != 0) { + setClientGiftSource(other.getClientGiftSource()); + } + if (!other.toUserIdsList_.isEmpty()) { + if (toUserIdsList_.isEmpty()) { + toUserIdsList_ = other.toUserIdsList_; + bitField0_ = (bitField0_ & ~0x04000000); + } else { + ensureToUserIdsListIsMutable(); + toUserIdsList_.addAll(other.toUserIdsList_); + } + onChanged(); + } + if (other.getSendTimet() != 0L) { + setSendTimet(other.getSendTimet()); + } + if (other.getForceDisplayEffectst() != 0L) { + setForceDisplayEffectst(other.getForceDisplayEffectst()); + } + if (!other.getTraceId().isEmpty()) { + traceId_ = other.traceId_; + bitField0_ |= 0x20000000; + onChanged(); + } + if (other.getEffectDisplayTs() != 0L) { + setEffectDisplayTs(other.getEffectDisplayTs()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCommonFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + longGiftId_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + fanTicketCount_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + groupCount_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + repeatCount_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + comboCount_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getToUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: { + repeatEnd_ = input.readUInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: { + input.readMessage( + getTextEffectFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 88: { + groupId_ = input.readUInt64(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: { + incomeTaskgifts_ = input.readUInt64(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 104: { + roomFanTicketCount_ = input.readUInt64(); + bitField0_ |= 0x00001000; + break; + } // case 104 + case 114: { + input.readMessage( + getPriorityFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 122: { + input.readMessage( + getGiftFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 122 + case 130: { + logId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 136: { + sendType_ = input.readUInt64(); + bitField0_ |= 0x00010000; + break; + } // case 136 + case 146: { + input.readMessage( + getPublicAreaCommonFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 146 + case 154: { + input.readMessage( + getTrayDisplayTextFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 154 + case 160: { + bannedDisplayEffects_ = input.readUInt64(); + bitField0_ |= 0x00080000; + break; + } // case 160 + case 200: { + displayForSelf_ = input.readBool(); + bitField0_ |= 0x00100000; + break; + } // case 200 + case 210: { + interactGiftInfo_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00200000; + break; + } // case 210 + case 218: { + diyItemInfo_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00400000; + break; + } // case 218 + case 224: { + long v = input.readUInt64(); + ensureMinAssetSetListIsMutable(); + minAssetSetList_.addLong(v); + break; + } // case 224 + case 226: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureMinAssetSetListIsMutable(); + while (input.getBytesUntilLimit() > 0) { + minAssetSetList_.addLong(input.readUInt64()); + } + input.popLimit(limit); + break; + } // case 226 + case 232: { + totalCount_ = input.readUInt64(); + bitField0_ |= 0x01000000; + break; + } // case 232 + case 240: { + clientGiftSource_ = input.readUInt32(); + bitField0_ |= 0x02000000; + break; + } // case 240 + case 256: { + long v = input.readUInt64(); + ensureToUserIdsListIsMutable(); + toUserIdsList_.addLong(v); + break; + } // case 256 + case 258: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureToUserIdsListIsMutable(); + while (input.getBytesUntilLimit() > 0) { + toUserIdsList_.addLong(input.readUInt64()); + } + input.popLimit(limit); + break; + } // case 258 + case 264: { + sendTimet_ = input.readUInt64(); + bitField0_ |= 0x08000000; + break; + } // case 264 + case 272: { + forceDisplayEffectst_ = input.readUInt64(); + bitField0_ |= 0x10000000; + break; + } // case 272 + case 282: { + traceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x20000000; + break; + } // case 282 + case 288: { + effectDisplayTs_ = input.readUInt64(); + bitField0_ |= 0x40000000; + break; + } // case 288 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common common_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> commonBuilder_; + /** + * <code>.Common common = 1;</code> + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.Common common = 1;</code> + * @return The common. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + if (commonBuilder_ == null) { + return common_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * <code>.Common common = 1;</code> + */ + public Builder setCommon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Common common = 1;</code> + */ + public Builder setCommon( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Common common = 1;</code> + */ + public Builder mergeCommon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + common_ != null && + common_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Common common = 1;</code> + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Common common = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * <code>.Common common = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + } + /** + * <code>.Common common = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder>( + getCommon(), + getParentForChildren(), + isClean()); + common_ = null; + } + return commonBuilder_; + } + + private long longGiftId_ ; + /** + * <code>uint64 long_gift_id = 2;</code> + * @return The longGiftId. + */ + @java.lang.Override + public long getLongGiftId() { + return longGiftId_; + } + /** + * <code>uint64 long_gift_id = 2;</code> + * @param value The longGiftId to set. + * @return This builder for chaining. + */ + public Builder setLongGiftId(long value) { + + longGiftId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>uint64 long_gift_id = 2;</code> + * @return This builder for chaining. + */ + public Builder clearLongGiftId() { + bitField0_ = (bitField0_ & ~0x00000002); + longGiftId_ = 0L; + onChanged(); + return this; + } + + private long fanTicketCount_ ; + /** + * <code>uint64 fan_ticket_count = 3;</code> + * @return The fanTicketCount. + */ + @java.lang.Override + public long getFanTicketCount() { + return fanTicketCount_; + } + /** + * <code>uint64 fan_ticket_count = 3;</code> + * @param value The fanTicketCount to set. + * @return This builder for chaining. + */ + public Builder setFanTicketCount(long value) { + + fanTicketCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 fan_ticket_count = 3;</code> + * @return This builder for chaining. + */ + public Builder clearFanTicketCount() { + bitField0_ = (bitField0_ & ~0x00000004); + fanTicketCount_ = 0L; + onChanged(); + return this; + } + + private long groupCount_ ; + /** + * <code>uint64 group_count = 4;</code> + * @return The groupCount. + */ + @java.lang.Override + public long getGroupCount() { + return groupCount_; + } + /** + * <code>uint64 group_count = 4;</code> + * @param value The groupCount to set. + * @return This builder for chaining. + */ + public Builder setGroupCount(long value) { + + groupCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint64 group_count = 4;</code> + * @return This builder for chaining. + */ + public Builder clearGroupCount() { + bitField0_ = (bitField0_ & ~0x00000008); + groupCount_ = 0L; + onChanged(); + return this; + } + + private long repeatCount_ ; + /** + * <code>uint64 repeat_count = 5;</code> + * @return The repeatCount. + */ + @java.lang.Override + public long getRepeatCount() { + return repeatCount_; + } + /** + * <code>uint64 repeat_count = 5;</code> + * @param value The repeatCount to set. + * @return This builder for chaining. + */ + public Builder setRepeatCount(long value) { + + repeatCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>uint64 repeat_count = 5;</code> + * @return This builder for chaining. + */ + public Builder clearRepeatCount() { + bitField0_ = (bitField0_ & ~0x00000010); + repeatCount_ = 0L; + onChanged(); + return this; + } + + private long comboCount_ ; + /** + * <code>uint64 combo_count = 6;</code> + * @return The comboCount. + */ + @java.lang.Override + public long getComboCount() { + return comboCount_; + } + /** + * <code>uint64 combo_count = 6;</code> + * @param value The comboCount to set. + * @return This builder for chaining. + */ + public Builder setComboCount(long value) { + + comboCount_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>uint64 combo_count = 6;</code> + * @return This builder for chaining. + */ + public Builder clearComboCount() { + bitField0_ = (bitField0_ & ~0x00000020); + comboCount_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> userBuilder_; + /** + * <code>.User user = 7;</code> + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * <code>.User user = 7;</code> + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * <code>.User user = 7;</code> + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.User user = 7;</code> + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.User user = 7;</code> + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.User user = 7;</code> + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000040); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User user = 7;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder getUserBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * <code>.User user = 7;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + } + /** + * <code>.User user = 7;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User toUser_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> toUserBuilder_; + /** + * <code>.User to_user = 8;</code> + * @return Whether the toUser field is set. + */ + public boolean hasToUser() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * <code>.User to_user = 8;</code> + * @return The toUser. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getToUser() { + if (toUserBuilder_ == null) { + return toUser_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : toUser_; + } else { + return toUserBuilder_.getMessage(); + } + } + /** + * <code>.User to_user = 8;</code> + */ + public Builder setToUser(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (toUserBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + toUser_ = value; + } else { + toUserBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>.User to_user = 8;</code> + */ + public Builder setToUser( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (toUserBuilder_ == null) { + toUser_ = builderForValue.build(); + } else { + toUserBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>.User to_user = 8;</code> + */ + public Builder mergeToUser(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (toUserBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + toUser_ != null && + toUser_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getToUserBuilder().mergeFrom(value); + } else { + toUser_ = value; + } + } else { + toUserBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>.User to_user = 8;</code> + */ + public Builder clearToUser() { + bitField0_ = (bitField0_ & ~0x00000080); + toUser_ = null; + if (toUserBuilder_ != null) { + toUserBuilder_.dispose(); + toUserBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User to_user = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder getToUserBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getToUserFieldBuilder().getBuilder(); + } + /** + * <code>.User to_user = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getToUserOrBuilder() { + if (toUserBuilder_ != null) { + return toUserBuilder_.getMessageOrBuilder(); + } else { + return toUser_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : toUser_; + } + } + /** + * <code>.User to_user = 8;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getToUserFieldBuilder() { + if (toUserBuilder_ == null) { + toUserBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getToUser(), + getParentForChildren(), + isClean()); + toUser_ = null; + } + return toUserBuilder_; + } + + private int repeatEnd_ ; + /** + * <code>uint32 repeat_end = 9;</code> + * @return The repeatEnd. + */ + @java.lang.Override + public int getRepeatEnd() { + return repeatEnd_; + } + /** + * <code>uint32 repeat_end = 9;</code> + * @param value The repeatEnd to set. + * @return This builder for chaining. + */ + public Builder setRepeatEnd(int value) { + + repeatEnd_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>uint32 repeat_end = 9;</code> + * @return This builder for chaining. + */ + public Builder clearRepeatEnd() { + bitField0_ = (bitField0_ & ~0x00000100); + repeatEnd_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect textEffect_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffectOrBuilder> textEffectBuilder_; + /** + * <code>.TextEffect text_effect = 10;</code> + * @return Whether the textEffect field is set. + */ + public boolean hasTextEffect() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * <code>.TextEffect text_effect = 10;</code> + * @return The textEffect. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect getTextEffect() { + if (textEffectBuilder_ == null) { + return textEffect_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.getDefaultInstance() : textEffect_; + } else { + return textEffectBuilder_.getMessage(); + } + } + /** + * <code>.TextEffect text_effect = 10;</code> + */ + public Builder setTextEffect(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect value) { + if (textEffectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + textEffect_ = value; + } else { + textEffectBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>.TextEffect text_effect = 10;</code> + */ + public Builder setTextEffect( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.Builder builderForValue) { + if (textEffectBuilder_ == null) { + textEffect_ = builderForValue.build(); + } else { + textEffectBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>.TextEffect text_effect = 10;</code> + */ + public Builder mergeTextEffect(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect value) { + if (textEffectBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) && + textEffect_ != null && + textEffect_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.getDefaultInstance()) { + getTextEffectBuilder().mergeFrom(value); + } else { + textEffect_ = value; + } + } else { + textEffectBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>.TextEffect text_effect = 10;</code> + */ + public Builder clearTextEffect() { + bitField0_ = (bitField0_ & ~0x00000200); + textEffect_ = null; + if (textEffectBuilder_ != null) { + textEffectBuilder_.dispose(); + textEffectBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.TextEffect text_effect = 10;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.Builder getTextEffectBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getTextEffectFieldBuilder().getBuilder(); + } + /** + * <code>.TextEffect text_effect = 10;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffectOrBuilder getTextEffectOrBuilder() { + if (textEffectBuilder_ != null) { + return textEffectBuilder_.getMessageOrBuilder(); + } else { + return textEffect_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.getDefaultInstance() : textEffect_; + } + } + /** + * <code>.TextEffect text_effect = 10;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffectOrBuilder> + getTextEffectFieldBuilder() { + if (textEffectBuilder_ == null) { + textEffectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffectOrBuilder>( + getTextEffect(), + getParentForChildren(), + isClean()); + textEffect_ = null; + } + return textEffectBuilder_; + } + + private long groupId_ ; + /** + * <code>uint64 group_id = 11;</code> + * @return The groupId. + */ + @java.lang.Override + public long getGroupId() { + return groupId_; + } + /** + * <code>uint64 group_id = 11;</code> + * @param value The groupId to set. + * @return This builder for chaining. + */ + public Builder setGroupId(long value) { + + groupId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * <code>uint64 group_id = 11;</code> + * @return This builder for chaining. + */ + public Builder clearGroupId() { + bitField0_ = (bitField0_ & ~0x00000400); + groupId_ = 0L; + onChanged(); + return this; + } + + private long incomeTaskgifts_ ; + /** + * <code>uint64 income_taskgifts = 12;</code> + * @return The incomeTaskgifts. + */ + @java.lang.Override + public long getIncomeTaskgifts() { + return incomeTaskgifts_; + } + /** + * <code>uint64 income_taskgifts = 12;</code> + * @param value The incomeTaskgifts to set. + * @return This builder for chaining. + */ + public Builder setIncomeTaskgifts(long value) { + + incomeTaskgifts_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * <code>uint64 income_taskgifts = 12;</code> + * @return This builder for chaining. + */ + public Builder clearIncomeTaskgifts() { + bitField0_ = (bitField0_ & ~0x00000800); + incomeTaskgifts_ = 0L; + onChanged(); + return this; + } + + private long roomFanTicketCount_ ; + /** + * <code>uint64 room_fan_ticket_count = 13;</code> + * @return The roomFanTicketCount. + */ + @java.lang.Override + public long getRoomFanTicketCount() { + return roomFanTicketCount_; + } + /** + * <code>uint64 room_fan_ticket_count = 13;</code> + * @param value The roomFanTicketCount to set. + * @return This builder for chaining. + */ + public Builder setRoomFanTicketCount(long value) { + + roomFanTicketCount_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * <code>uint64 room_fan_ticket_count = 13;</code> + * @return This builder for chaining. + */ + public Builder clearRoomFanTicketCount() { + bitField0_ = (bitField0_ & ~0x00001000); + roomFanTicketCount_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority priority_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriorityOrBuilder> priorityBuilder_; + /** + * <code>.GiftIMPriority priority = 14;</code> + * @return Whether the priority field is set. + */ + public boolean hasPriority() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * <code>.GiftIMPriority priority = 14;</code> + * @return The priority. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority getPriority() { + if (priorityBuilder_ == null) { + return priority_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.getDefaultInstance() : priority_; + } else { + return priorityBuilder_.getMessage(); + } + } + /** + * <code>.GiftIMPriority priority = 14;</code> + */ + public Builder setPriority(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority value) { + if (priorityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + priority_ = value; + } else { + priorityBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>.GiftIMPriority priority = 14;</code> + */ + public Builder setPriority( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.Builder builderForValue) { + if (priorityBuilder_ == null) { + priority_ = builderForValue.build(); + } else { + priorityBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>.GiftIMPriority priority = 14;</code> + */ + public Builder mergePriority(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority value) { + if (priorityBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) && + priority_ != null && + priority_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.getDefaultInstance()) { + getPriorityBuilder().mergeFrom(value); + } else { + priority_ = value; + } + } else { + priorityBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>.GiftIMPriority priority = 14;</code> + */ + public Builder clearPriority() { + bitField0_ = (bitField0_ & ~0x00002000); + priority_ = null; + if (priorityBuilder_ != null) { + priorityBuilder_.dispose(); + priorityBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.GiftIMPriority priority = 14;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.Builder getPriorityBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getPriorityFieldBuilder().getBuilder(); + } + /** + * <code>.GiftIMPriority priority = 14;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriorityOrBuilder getPriorityOrBuilder() { + if (priorityBuilder_ != null) { + return priorityBuilder_.getMessageOrBuilder(); + } else { + return priority_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.getDefaultInstance() : priority_; + } + } + /** + * <code>.GiftIMPriority priority = 14;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriorityOrBuilder> + getPriorityFieldBuilder() { + if (priorityBuilder_ == null) { + priorityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriorityOrBuilder>( + getPriority(), + getParentForChildren(), + isClean()); + priority_ = null; + } + return priorityBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct gift_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStructOrBuilder> giftBuilder_; + /** + * <code>.GiftStruct gift = 15;</code> + * @return Whether the gift field is set. + */ + public boolean hasGift() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * <code>.GiftStruct gift = 15;</code> + * @return The gift. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct getGift() { + if (giftBuilder_ == null) { + return gift_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.getDefaultInstance() : gift_; + } else { + return giftBuilder_.getMessage(); + } + } + /** + * <code>.GiftStruct gift = 15;</code> + */ + public Builder setGift(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct value) { + if (giftBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gift_ = value; + } else { + giftBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <code>.GiftStruct gift = 15;</code> + */ + public Builder setGift( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.Builder builderForValue) { + if (giftBuilder_ == null) { + gift_ = builderForValue.build(); + } else { + giftBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <code>.GiftStruct gift = 15;</code> + */ + public Builder mergeGift(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct value) { + if (giftBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) && + gift_ != null && + gift_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.getDefaultInstance()) { + getGiftBuilder().mergeFrom(value); + } else { + gift_ = value; + } + } else { + giftBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <code>.GiftStruct gift = 15;</code> + */ + public Builder clearGift() { + bitField0_ = (bitField0_ & ~0x00004000); + gift_ = null; + if (giftBuilder_ != null) { + giftBuilder_.dispose(); + giftBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.GiftStruct gift = 15;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.Builder getGiftBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return getGiftFieldBuilder().getBuilder(); + } + /** + * <code>.GiftStruct gift = 15;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStructOrBuilder getGiftOrBuilder() { + if (giftBuilder_ != null) { + return giftBuilder_.getMessageOrBuilder(); + } else { + return gift_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.getDefaultInstance() : gift_; + } + } + /** + * <code>.GiftStruct gift = 15;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStructOrBuilder> + getGiftFieldBuilder() { + if (giftBuilder_ == null) { + giftBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStructOrBuilder>( + getGift(), + getParentForChildren(), + isClean()); + gift_ = null; + } + return giftBuilder_; + } + + private java.lang.Object logId_ = ""; + /** + * <code>string log_id = 16;</code> + * @return The logId. + */ + public java.lang.String getLogId() { + java.lang.Object ref = logId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string log_id = 16;</code> + * @return The bytes for logId. + */ + public com.google.protobuf.ByteString + getLogIdBytes() { + java.lang.Object ref = logId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string log_id = 16;</code> + * @param value The logId to set. + * @return This builder for chaining. + */ + public Builder setLogId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + logId_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>string log_id = 16;</code> + * @return This builder for chaining. + */ + public Builder clearLogId() { + logId_ = getDefaultInstance().getLogId(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + /** + * <code>string log_id = 16;</code> + * @param value The bytes for logId to set. + * @return This builder for chaining. + */ + public Builder setLogIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + logId_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private long sendType_ ; + /** + * <code>uint64 send_type = 17;</code> + * @return The sendType. + */ + @java.lang.Override + public long getSendType() { + return sendType_; + } + /** + * <code>uint64 send_type = 17;</code> + * @param value The sendType to set. + * @return This builder for chaining. + */ + public Builder setSendType(long value) { + + sendType_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * <code>uint64 send_type = 17;</code> + * @return This builder for chaining. + */ + public Builder clearSendType() { + bitField0_ = (bitField0_ & ~0x00010000); + sendType_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon publicAreaCommon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder> publicAreaCommonBuilder_; + /** + * <code>.PublicAreaCommon public_area_common = 18;</code> + * @return Whether the publicAreaCommon field is set. + */ + public boolean hasPublicAreaCommon() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * <code>.PublicAreaCommon public_area_common = 18;</code> + * @return The publicAreaCommon. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon getPublicAreaCommon() { + if (publicAreaCommonBuilder_ == null) { + return publicAreaCommon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance() : publicAreaCommon_; + } else { + return publicAreaCommonBuilder_.getMessage(); + } + } + /** + * <code>.PublicAreaCommon public_area_common = 18;</code> + */ + public Builder setPublicAreaCommon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon value) { + if (publicAreaCommonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + publicAreaCommon_ = value; + } else { + publicAreaCommonBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * <code>.PublicAreaCommon public_area_common = 18;</code> + */ + public Builder setPublicAreaCommon( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder builderForValue) { + if (publicAreaCommonBuilder_ == null) { + publicAreaCommon_ = builderForValue.build(); + } else { + publicAreaCommonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * <code>.PublicAreaCommon public_area_common = 18;</code> + */ + public Builder mergePublicAreaCommon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon value) { + if (publicAreaCommonBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) && + publicAreaCommon_ != null && + publicAreaCommon_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance()) { + getPublicAreaCommonBuilder().mergeFrom(value); + } else { + publicAreaCommon_ = value; + } + } else { + publicAreaCommonBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * <code>.PublicAreaCommon public_area_common = 18;</code> + */ + public Builder clearPublicAreaCommon() { + bitField0_ = (bitField0_ & ~0x00020000); + publicAreaCommon_ = null; + if (publicAreaCommonBuilder_ != null) { + publicAreaCommonBuilder_.dispose(); + publicAreaCommonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.PublicAreaCommon public_area_common = 18;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder getPublicAreaCommonBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getPublicAreaCommonFieldBuilder().getBuilder(); + } + /** + * <code>.PublicAreaCommon public_area_common = 18;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder getPublicAreaCommonOrBuilder() { + if (publicAreaCommonBuilder_ != null) { + return publicAreaCommonBuilder_.getMessageOrBuilder(); + } else { + return publicAreaCommon_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance() : publicAreaCommon_; + } + } + /** + * <code>.PublicAreaCommon public_area_common = 18;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder> + getPublicAreaCommonFieldBuilder() { + if (publicAreaCommonBuilder_ == null) { + publicAreaCommonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder>( + getPublicAreaCommon(), + getParentForChildren(), + isClean()); + publicAreaCommon_ = null; + } + return publicAreaCommonBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text trayDisplayText_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder> trayDisplayTextBuilder_; + /** + * <code>.Text tray_display_text = 19;</code> + * @return Whether the trayDisplayText field is set. + */ + public boolean hasTrayDisplayText() { + return ((bitField0_ & 0x00040000) != 0); + } + /** + * <code>.Text tray_display_text = 19;</code> + * @return The trayDisplayText. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text getTrayDisplayText() { + if (trayDisplayTextBuilder_ == null) { + return trayDisplayText_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : trayDisplayText_; + } else { + return trayDisplayTextBuilder_.getMessage(); + } + } + /** + * <code>.Text tray_display_text = 19;</code> + */ + public Builder setTrayDisplayText(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text value) { + if (trayDisplayTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trayDisplayText_ = value; + } else { + trayDisplayTextBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * <code>.Text tray_display_text = 19;</code> + */ + public Builder setTrayDisplayText( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder builderForValue) { + if (trayDisplayTextBuilder_ == null) { + trayDisplayText_ = builderForValue.build(); + } else { + trayDisplayTextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * <code>.Text tray_display_text = 19;</code> + */ + public Builder mergeTrayDisplayText(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text value) { + if (trayDisplayTextBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) && + trayDisplayText_ != null && + trayDisplayText_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance()) { + getTrayDisplayTextBuilder().mergeFrom(value); + } else { + trayDisplayText_ = value; + } + } else { + trayDisplayTextBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * <code>.Text tray_display_text = 19;</code> + */ + public Builder clearTrayDisplayText() { + bitField0_ = (bitField0_ & ~0x00040000); + trayDisplayText_ = null; + if (trayDisplayTextBuilder_ != null) { + trayDisplayTextBuilder_.dispose(); + trayDisplayTextBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Text tray_display_text = 19;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder getTrayDisplayTextBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return getTrayDisplayTextFieldBuilder().getBuilder(); + } + /** + * <code>.Text tray_display_text = 19;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getTrayDisplayTextOrBuilder() { + if (trayDisplayTextBuilder_ != null) { + return trayDisplayTextBuilder_.getMessageOrBuilder(); + } else { + return trayDisplayText_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : trayDisplayText_; + } + } + /** + * <code>.Text tray_display_text = 19;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder> + getTrayDisplayTextFieldBuilder() { + if (trayDisplayTextBuilder_ == null) { + trayDisplayTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder>( + getTrayDisplayText(), + getParentForChildren(), + isClean()); + trayDisplayText_ = null; + } + return trayDisplayTextBuilder_; + } + + private long bannedDisplayEffects_ ; + /** + * <code>uint64 banned_display_effects = 20;</code> + * @return The bannedDisplayEffects. + */ + @java.lang.Override + public long getBannedDisplayEffects() { + return bannedDisplayEffects_; + } + /** + * <code>uint64 banned_display_effects = 20;</code> + * @param value The bannedDisplayEffects to set. + * @return This builder for chaining. + */ + public Builder setBannedDisplayEffects(long value) { + + bannedDisplayEffects_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * <code>uint64 banned_display_effects = 20;</code> + * @return This builder for chaining. + */ + public Builder clearBannedDisplayEffects() { + bitField0_ = (bitField0_ & ~0x00080000); + bannedDisplayEffects_ = 0L; + onChanged(); + return this; + } + + private boolean displayForSelf_ ; + /** + * <pre> + * GiftTrayInfo trayInfo = 21; + * AssetEffectMixInfo assetEffectMixInfo = 22; + * </pre> + * + * <code>bool display_for_self = 25;</code> + * @return The displayForSelf. + */ + @java.lang.Override + public boolean getDisplayForSelf() { + return displayForSelf_; + } + /** + * <pre> + * GiftTrayInfo trayInfo = 21; + * AssetEffectMixInfo assetEffectMixInfo = 22; + * </pre> + * + * <code>bool display_for_self = 25;</code> + * @param value The displayForSelf to set. + * @return This builder for chaining. + */ + public Builder setDisplayForSelf(boolean value) { + + displayForSelf_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * <pre> + * GiftTrayInfo trayInfo = 21; + * AssetEffectMixInfo assetEffectMixInfo = 22; + * </pre> + * + * <code>bool display_for_self = 25;</code> + * @return This builder for chaining. + */ + public Builder clearDisplayForSelf() { + bitField0_ = (bitField0_ & ~0x00100000); + displayForSelf_ = false; + onChanged(); + return this; + } + + private java.lang.Object interactGiftInfo_ = ""; + /** + * <code>string interact_gift_info = 26;</code> + * @return The interactGiftInfo. + */ + public java.lang.String getInteractGiftInfo() { + java.lang.Object ref = interactGiftInfo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interactGiftInfo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string interact_gift_info = 26;</code> + * @return The bytes for interactGiftInfo. + */ + public com.google.protobuf.ByteString + getInteractGiftInfoBytes() { + java.lang.Object ref = interactGiftInfo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + interactGiftInfo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string interact_gift_info = 26;</code> + * @param value The interactGiftInfo to set. + * @return This builder for chaining. + */ + public Builder setInteractGiftInfo( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + interactGiftInfo_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * <code>string interact_gift_info = 26;</code> + * @return This builder for chaining. + */ + public Builder clearInteractGiftInfo() { + interactGiftInfo_ = getDefaultInstance().getInteractGiftInfo(); + bitField0_ = (bitField0_ & ~0x00200000); + onChanged(); + return this; + } + /** + * <code>string interact_gift_info = 26;</code> + * @param value The bytes for interactGiftInfo to set. + * @return This builder for chaining. + */ + public Builder setInteractGiftInfoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + interactGiftInfo_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + private java.lang.Object diyItemInfo_ = ""; + /** + * <code>string diy_item_info = 27;</code> + * @return The diyItemInfo. + */ + public java.lang.String getDiyItemInfo() { + java.lang.Object ref = diyItemInfo_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + diyItemInfo_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string diy_item_info = 27;</code> + * @return The bytes for diyItemInfo. + */ + public com.google.protobuf.ByteString + getDiyItemInfoBytes() { + java.lang.Object ref = diyItemInfo_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + diyItemInfo_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string diy_item_info = 27;</code> + * @param value The diyItemInfo to set. + * @return This builder for chaining. + */ + public Builder setDiyItemInfo( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + diyItemInfo_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * <code>string diy_item_info = 27;</code> + * @return This builder for chaining. + */ + public Builder clearDiyItemInfo() { + diyItemInfo_ = getDefaultInstance().getDiyItemInfo(); + bitField0_ = (bitField0_ & ~0x00400000); + onChanged(); + return this; + } + /** + * <code>string diy_item_info = 27;</code> + * @param value The bytes for diyItemInfo to set. + * @return This builder for chaining. + */ + public Builder setDiyItemInfoBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + diyItemInfo_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList minAssetSetList_ = emptyLongList(); + private void ensureMinAssetSetListIsMutable() { + if (!((bitField0_ & 0x00800000) != 0)) { + minAssetSetList_ = mutableCopy(minAssetSetList_); + bitField0_ |= 0x00800000; + } + } + /** + * <code>repeated uint64 min_asset_set_list = 28;</code> + * @return A list containing the minAssetSetList. + */ + public java.util.List<java.lang.Long> + getMinAssetSetListList() { + return ((bitField0_ & 0x00800000) != 0) ? + java.util.Collections.unmodifiableList(minAssetSetList_) : minAssetSetList_; + } + /** + * <code>repeated uint64 min_asset_set_list = 28;</code> + * @return The count of minAssetSetList. + */ + public int getMinAssetSetListCount() { + return minAssetSetList_.size(); + } + /** + * <code>repeated uint64 min_asset_set_list = 28;</code> + * @param index The index of the element to return. + * @return The minAssetSetList at the given index. + */ + public long getMinAssetSetList(int index) { + return minAssetSetList_.getLong(index); + } + /** + * <code>repeated uint64 min_asset_set_list = 28;</code> + * @param index The index to set the value at. + * @param value The minAssetSetList to set. + * @return This builder for chaining. + */ + public Builder setMinAssetSetList( + int index, long value) { + + ensureMinAssetSetListIsMutable(); + minAssetSetList_.setLong(index, value); + onChanged(); + return this; + } + /** + * <code>repeated uint64 min_asset_set_list = 28;</code> + * @param value The minAssetSetList to add. + * @return This builder for chaining. + */ + public Builder addMinAssetSetList(long value) { + + ensureMinAssetSetListIsMutable(); + minAssetSetList_.addLong(value); + onChanged(); + return this; + } + /** + * <code>repeated uint64 min_asset_set_list = 28;</code> + * @param values The minAssetSetList to add. + * @return This builder for chaining. + */ + public Builder addAllMinAssetSetList( + java.lang.Iterable<? extends java.lang.Long> values) { + ensureMinAssetSetListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, minAssetSetList_); + onChanged(); + return this; + } + /** + * <code>repeated uint64 min_asset_set_list = 28;</code> + * @return This builder for chaining. + */ + public Builder clearMinAssetSetList() { + minAssetSetList_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00800000); + onChanged(); + return this; + } + + private long totalCount_ ; + /** + * <code>uint64 total_count = 29;</code> + * @return The totalCount. + */ + @java.lang.Override + public long getTotalCount() { + return totalCount_; + } + /** + * <code>uint64 total_count = 29;</code> + * @param value The totalCount to set. + * @return This builder for chaining. + */ + public Builder setTotalCount(long value) { + + totalCount_ = value; + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * <code>uint64 total_count = 29;</code> + * @return This builder for chaining. + */ + public Builder clearTotalCount() { + bitField0_ = (bitField0_ & ~0x01000000); + totalCount_ = 0L; + onChanged(); + return this; + } + + private int clientGiftSource_ ; + /** + * <code>uint32 client_gift_source = 30;</code> + * @return The clientGiftSource. + */ + @java.lang.Override + public int getClientGiftSource() { + return clientGiftSource_; + } + /** + * <code>uint32 client_gift_source = 30;</code> + * @param value The clientGiftSource to set. + * @return This builder for chaining. + */ + public Builder setClientGiftSource(int value) { + + clientGiftSource_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + /** + * <code>uint32 client_gift_source = 30;</code> + * @return This builder for chaining. + */ + public Builder clearClientGiftSource() { + bitField0_ = (bitField0_ & ~0x02000000); + clientGiftSource_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList toUserIdsList_ = emptyLongList(); + private void ensureToUserIdsListIsMutable() { + if (!((bitField0_ & 0x04000000) != 0)) { + toUserIdsList_ = mutableCopy(toUserIdsList_); + bitField0_ |= 0x04000000; + } + } + /** + * <pre> + * AnchorGiftData anchorGift = 31; + * </pre> + * + * <code>repeated uint64 to_user_ids_list = 32;</code> + * @return A list containing the toUserIdsList. + */ + public java.util.List<java.lang.Long> + getToUserIdsListList() { + return ((bitField0_ & 0x04000000) != 0) ? + java.util.Collections.unmodifiableList(toUserIdsList_) : toUserIdsList_; + } + /** + * <pre> + * AnchorGiftData anchorGift = 31; + * </pre> + * + * <code>repeated uint64 to_user_ids_list = 32;</code> + * @return The count of toUserIdsList. + */ + public int getToUserIdsListCount() { + return toUserIdsList_.size(); + } + /** + * <pre> + * AnchorGiftData anchorGift = 31; + * </pre> + * + * <code>repeated uint64 to_user_ids_list = 32;</code> + * @param index The index of the element to return. + * @return The toUserIdsList at the given index. + */ + public long getToUserIdsList(int index) { + return toUserIdsList_.getLong(index); + } + /** + * <pre> + * AnchorGiftData anchorGift = 31; + * </pre> + * + * <code>repeated uint64 to_user_ids_list = 32;</code> + * @param index The index to set the value at. + * @param value The toUserIdsList to set. + * @return This builder for chaining. + */ + public Builder setToUserIdsList( + int index, long value) { + + ensureToUserIdsListIsMutable(); + toUserIdsList_.setLong(index, value); + onChanged(); + return this; + } + /** + * <pre> + * AnchorGiftData anchorGift = 31; + * </pre> + * + * <code>repeated uint64 to_user_ids_list = 32;</code> + * @param value The toUserIdsList to add. + * @return This builder for chaining. + */ + public Builder addToUserIdsList(long value) { + + ensureToUserIdsListIsMutable(); + toUserIdsList_.addLong(value); + onChanged(); + return this; + } + /** + * <pre> + * AnchorGiftData anchorGift = 31; + * </pre> + * + * <code>repeated uint64 to_user_ids_list = 32;</code> + * @param values The toUserIdsList to add. + * @return This builder for chaining. + */ + public Builder addAllToUserIdsList( + java.lang.Iterable<? extends java.lang.Long> values) { + ensureToUserIdsListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, toUserIdsList_); + onChanged(); + return this; + } + /** + * <pre> + * AnchorGiftData anchorGift = 31; + * </pre> + * + * <code>repeated uint64 to_user_ids_list = 32;</code> + * @return This builder for chaining. + */ + public Builder clearToUserIdsList() { + toUserIdsList_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x04000000); + onChanged(); + return this; + } + + private long sendTimet_ ; + /** + * <code>uint64 send_timet = 33;</code> + * @return The sendTimet. + */ + @java.lang.Override + public long getSendTimet() { + return sendTimet_; + } + /** + * <code>uint64 send_timet = 33;</code> + * @param value The sendTimet to set. + * @return This builder for chaining. + */ + public Builder setSendTimet(long value) { + + sendTimet_ = value; + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * <code>uint64 send_timet = 33;</code> + * @return This builder for chaining. + */ + public Builder clearSendTimet() { + bitField0_ = (bitField0_ & ~0x08000000); + sendTimet_ = 0L; + onChanged(); + return this; + } + + private long forceDisplayEffectst_ ; + /** + * <code>uint64 force_display_effectst = 34;</code> + * @return The forceDisplayEffectst. + */ + @java.lang.Override + public long getForceDisplayEffectst() { + return forceDisplayEffectst_; + } + /** + * <code>uint64 force_display_effectst = 34;</code> + * @param value The forceDisplayEffectst to set. + * @return This builder for chaining. + */ + public Builder setForceDisplayEffectst(long value) { + + forceDisplayEffectst_ = value; + bitField0_ |= 0x10000000; + onChanged(); + return this; + } + /** + * <code>uint64 force_display_effectst = 34;</code> + * @return This builder for chaining. + */ + public Builder clearForceDisplayEffectst() { + bitField0_ = (bitField0_ & ~0x10000000); + forceDisplayEffectst_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object traceId_ = ""; + /** + * <code>string trace_id = 35;</code> + * @return The traceId. + */ + public java.lang.String getTraceId() { + java.lang.Object ref = traceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + traceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string trace_id = 35;</code> + * @return The bytes for traceId. + */ + public com.google.protobuf.ByteString + getTraceIdBytes() { + java.lang.Object ref = traceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + traceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string trace_id = 35;</code> + * @param value The traceId to set. + * @return This builder for chaining. + */ + public Builder setTraceId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + traceId_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + /** + * <code>string trace_id = 35;</code> + * @return This builder for chaining. + */ + public Builder clearTraceId() { + traceId_ = getDefaultInstance().getTraceId(); + bitField0_ = (bitField0_ & ~0x20000000); + onChanged(); + return this; + } + /** + * <code>string trace_id = 35;</code> + * @param value The bytes for traceId to set. + * @return This builder for chaining. + */ + public Builder setTraceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + traceId_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + + private long effectDisplayTs_ ; + /** + * <code>uint64 effect_display_ts = 36;</code> + * @return The effectDisplayTs. + */ + @java.lang.Override + public long getEffectDisplayTs() { + return effectDisplayTs_; + } + /** + * <code>uint64 effect_display_ts = 36;</code> + * @param value The effectDisplayTs to set. + * @return This builder for chaining. + */ + public Builder setEffectDisplayTs(long value) { + + effectDisplayTs_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + /** + * <code>uint64 effect_display_ts = 36;</code> + * @return This builder for chaining. + */ + public Builder clearEffectDisplayTs() { + bitField0_ = (bitField0_ & ~0x40000000); + effectDisplayTs_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<douyin_webcast_gift_message_msg> + PARSER = new com.google.protobuf.AbstractParser<douyin_webcast_gift_message_msg>() { + @java.lang.Override + public douyin_webcast_gift_message_msg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<douyin_webcast_gift_message_msg> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<douyin_webcast_gift_message_msg> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_gift_message_msgOrBuilder.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_gift_message_msgOrBuilder.java new file mode 100644 index 0000000..4830199 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_gift_message_msgOrBuilder.java @@ -0,0 +1,354 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_webcast_gift_message_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +public interface douyin_webcast_gift_message_msgOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_gift_message_msg) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.Common common = 1;</code> + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * <code>.Common common = 1;</code> + * @return The common. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getCommon(); + /** + * <code>.Common common = 1;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder(); + + /** + * <code>uint64 long_gift_id = 2;</code> + * @return The longGiftId. + */ + long getLongGiftId(); + + /** + * <code>uint64 fan_ticket_count = 3;</code> + * @return The fanTicketCount. + */ + long getFanTicketCount(); + + /** + * <code>uint64 group_count = 4;</code> + * @return The groupCount. + */ + long getGroupCount(); + + /** + * <code>uint64 repeat_count = 5;</code> + * @return The repeatCount. + */ + long getRepeatCount(); + + /** + * <code>uint64 combo_count = 6;</code> + * @return The comboCount. + */ + long getComboCount(); + + /** + * <code>.User user = 7;</code> + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * <code>.User user = 7;</code> + * @return The user. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser(); + /** + * <code>.User user = 7;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder(); + + /** + * <code>.User to_user = 8;</code> + * @return Whether the toUser field is set. + */ + boolean hasToUser(); + /** + * <code>.User to_user = 8;</code> + * @return The toUser. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getToUser(); + /** + * <code>.User to_user = 8;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getToUserOrBuilder(); + + /** + * <code>uint32 repeat_end = 9;</code> + * @return The repeatEnd. + */ + int getRepeatEnd(); + + /** + * <code>.TextEffect text_effect = 10;</code> + * @return Whether the textEffect field is set. + */ + boolean hasTextEffect(); + /** + * <code>.TextEffect text_effect = 10;</code> + * @return The textEffect. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect getTextEffect(); + /** + * <code>.TextEffect text_effect = 10;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffectOrBuilder getTextEffectOrBuilder(); + + /** + * <code>uint64 group_id = 11;</code> + * @return The groupId. + */ + long getGroupId(); + + /** + * <code>uint64 income_taskgifts = 12;</code> + * @return The incomeTaskgifts. + */ + long getIncomeTaskgifts(); + + /** + * <code>uint64 room_fan_ticket_count = 13;</code> + * @return The roomFanTicketCount. + */ + long getRoomFanTicketCount(); + + /** + * <code>.GiftIMPriority priority = 14;</code> + * @return Whether the priority field is set. + */ + boolean hasPriority(); + /** + * <code>.GiftIMPriority priority = 14;</code> + * @return The priority. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority getPriority(); + /** + * <code>.GiftIMPriority priority = 14;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriorityOrBuilder getPriorityOrBuilder(); + + /** + * <code>.GiftStruct gift = 15;</code> + * @return Whether the gift field is set. + */ + boolean hasGift(); + /** + * <code>.GiftStruct gift = 15;</code> + * @return The gift. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct getGift(); + /** + * <code>.GiftStruct gift = 15;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStructOrBuilder getGiftOrBuilder(); + + /** + * <code>string log_id = 16;</code> + * @return The logId. + */ + java.lang.String getLogId(); + /** + * <code>string log_id = 16;</code> + * @return The bytes for logId. + */ + com.google.protobuf.ByteString + getLogIdBytes(); + + /** + * <code>uint64 send_type = 17;</code> + * @return The sendType. + */ + long getSendType(); + + /** + * <code>.PublicAreaCommon public_area_common = 18;</code> + * @return Whether the publicAreaCommon field is set. + */ + boolean hasPublicAreaCommon(); + /** + * <code>.PublicAreaCommon public_area_common = 18;</code> + * @return The publicAreaCommon. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon getPublicAreaCommon(); + /** + * <code>.PublicAreaCommon public_area_common = 18;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder getPublicAreaCommonOrBuilder(); + + /** + * <code>.Text tray_display_text = 19;</code> + * @return Whether the trayDisplayText field is set. + */ + boolean hasTrayDisplayText(); + /** + * <code>.Text tray_display_text = 19;</code> + * @return The trayDisplayText. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text getTrayDisplayText(); + /** + * <code>.Text tray_display_text = 19;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getTrayDisplayTextOrBuilder(); + + /** + * <code>uint64 banned_display_effects = 20;</code> + * @return The bannedDisplayEffects. + */ + long getBannedDisplayEffects(); + + /** + * <pre> + * GiftTrayInfo trayInfo = 21; + * AssetEffectMixInfo assetEffectMixInfo = 22; + * </pre> + * + * <code>bool display_for_self = 25;</code> + * @return The displayForSelf. + */ + boolean getDisplayForSelf(); + + /** + * <code>string interact_gift_info = 26;</code> + * @return The interactGiftInfo. + */ + java.lang.String getInteractGiftInfo(); + /** + * <code>string interact_gift_info = 26;</code> + * @return The bytes for interactGiftInfo. + */ + com.google.protobuf.ByteString + getInteractGiftInfoBytes(); + + /** + * <code>string diy_item_info = 27;</code> + * @return The diyItemInfo. + */ + java.lang.String getDiyItemInfo(); + /** + * <code>string diy_item_info = 27;</code> + * @return The bytes for diyItemInfo. + */ + com.google.protobuf.ByteString + getDiyItemInfoBytes(); + + /** + * <code>repeated uint64 min_asset_set_list = 28;</code> + * @return A list containing the minAssetSetList. + */ + java.util.List<java.lang.Long> getMinAssetSetListList(); + /** + * <code>repeated uint64 min_asset_set_list = 28;</code> + * @return The count of minAssetSetList. + */ + int getMinAssetSetListCount(); + /** + * <code>repeated uint64 min_asset_set_list = 28;</code> + * @param index The index of the element to return. + * @return The minAssetSetList at the given index. + */ + long getMinAssetSetList(int index); + + /** + * <code>uint64 total_count = 29;</code> + * @return The totalCount. + */ + long getTotalCount(); + + /** + * <code>uint32 client_gift_source = 30;</code> + * @return The clientGiftSource. + */ + int getClientGiftSource(); + + /** + * <pre> + * AnchorGiftData anchorGift = 31; + * </pre> + * + * <code>repeated uint64 to_user_ids_list = 32;</code> + * @return A list containing the toUserIdsList. + */ + java.util.List<java.lang.Long> getToUserIdsListList(); + /** + * <pre> + * AnchorGiftData anchorGift = 31; + * </pre> + * + * <code>repeated uint64 to_user_ids_list = 32;</code> + * @return The count of toUserIdsList. + */ + int getToUserIdsListCount(); + /** + * <pre> + * AnchorGiftData anchorGift = 31; + * </pre> + * + * <code>repeated uint64 to_user_ids_list = 32;</code> + * @param index The index of the element to return. + * @return The toUserIdsList at the given index. + */ + long getToUserIdsList(int index); + + /** + * <code>uint64 send_timet = 33;</code> + * @return The sendTimet. + */ + long getSendTimet(); + + /** + * <code>uint64 force_display_effectst = 34;</code> + * @return The forceDisplayEffectst. + */ + long getForceDisplayEffectst(); + + /** + * <code>string trace_id = 35;</code> + * @return The traceId. + */ + java.lang.String getTraceId(); + /** + * <code>string trace_id = 35;</code> + * @return The bytes for traceId. + */ + com.google.protobuf.ByteString + getTraceIdBytes(); + + /** + * <code>uint64 effect_display_ts = 36;</code> + * @return The effectDisplayTs. + */ + long getEffectDisplayTs(); +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_like_message_msg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_like_message_msg.java new file mode 100644 index 0000000..8e79778 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_like_message_msg.java @@ -0,0 +1,1563 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_webcast_like_message_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +/** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg} + */ +public final class douyin_webcast_like_message_msg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg) + douyin_webcast_like_message_msgOrBuilder { +private static final long serialVersionUID = 0L; + // Use douyin_webcast_like_message_msg.newBuilder() to construct. + private douyin_webcast_like_message_msg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private douyin_webcast_like_message_msg() { + icon_ = ""; + scene_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new douyin_webcast_like_message_msg(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_like_message_msg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_like_message_msg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg.Builder.class); + } + + public static final int COMMON_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common common_; + /** + * <code>.Common common = 1;</code> + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return common_ != null; + } + /** + * <code>.Common common = 1;</code> + * @return The common. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + return common_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + /** + * <code>.Common common = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + return common_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + + public static final int COUNT_FIELD_NUMBER = 2; + private long count_ = 0L; + /** + * <code>uint64 count = 2;</code> + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + + public static final int TOTAL_FIELD_NUMBER = 3; + private long total_ = 0L; + /** + * <code>uint64 total = 3;</code> + * @return The total. + */ + @java.lang.Override + public long getTotal() { + return total_; + } + + public static final int COLOR_FIELD_NUMBER = 4; + private long color_ = 0L; + /** + * <code>uint64 color = 4;</code> + * @return The color. + */ + @java.lang.Override + public long getColor() { + return color_; + } + + public static final int USER_FIELD_NUMBER = 5; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User user_; + /** + * <code>.User user = 5;</code> + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return user_ != null; + } + /** + * <code>.User user = 5;</code> + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + /** + * <code>.User user = 5;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + + public static final int ICON_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object icon_ = ""; + /** + * <code>string icon = 6;</code> + * @return The icon. + */ + @java.lang.Override + public java.lang.String getIcon() { + java.lang.Object ref = icon_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + icon_ = s; + return s; + } + } + /** + * <code>string icon = 6;</code> + * @return The bytes for icon. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIconBytes() { + java.lang.Object ref = icon_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + icon_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOUBLELIKEDETAIL_FIELD_NUMBER = 7; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail doubleLikeDetail_; + /** + * <code>.DoubleLikeDetail doubleLikeDetail = 7;</code> + * @return Whether the doubleLikeDetail field is set. + */ + @java.lang.Override + public boolean hasDoubleLikeDetail() { + return doubleLikeDetail_ != null; + } + /** + * <code>.DoubleLikeDetail doubleLikeDetail = 7;</code> + * @return The doubleLikeDetail. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail getDoubleLikeDetail() { + return doubleLikeDetail_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.getDefaultInstance() : doubleLikeDetail_; + } + /** + * <code>.DoubleLikeDetail doubleLikeDetail = 7;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetailOrBuilder getDoubleLikeDetailOrBuilder() { + return doubleLikeDetail_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.getDefaultInstance() : doubleLikeDetail_; + } + + public static final int LINKMICGUESTUID_FIELD_NUMBER = 9; + private long linkmicGuestUid_ = 0L; + /** + * <pre> + * DisplayControlInfo displayControlInfo = 8; + * </pre> + * + * <code>uint64 linkmicGuestUid = 9;</code> + * @return The linkmicGuestUid. + */ + @java.lang.Override + public long getLinkmicGuestUid() { + return linkmicGuestUid_; + } + + public static final int SCENE_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private volatile java.lang.Object scene_ = ""; + /** + * <pre> + * PicoDisplayInfo picoDisplayInfo = 11; + * = 12; + * </pre> + * + * <code>string scene = 10;</code> + * @return The scene. + */ + @java.lang.Override + public java.lang.String getScene() { + java.lang.Object ref = scene_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scene_ = s; + return s; + } + } + /** + * <pre> + * PicoDisplayInfo picoDisplayInfo = 11; + * = 12; + * </pre> + * + * <code>string scene = 10;</code> + * @return The bytes for scene. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSceneBytes() { + java.lang.Object ref = scene_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scene_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (common_ != null) { + output.writeMessage(1, getCommon()); + } + if (count_ != 0L) { + output.writeUInt64(2, count_); + } + if (total_ != 0L) { + output.writeUInt64(3, total_); + } + if (color_ != 0L) { + output.writeUInt64(4, color_); + } + if (user_ != null) { + output.writeMessage(5, getUser()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(icon_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, icon_); + } + if (doubleLikeDetail_ != null) { + output.writeMessage(7, getDoubleLikeDetail()); + } + if (linkmicGuestUid_ != 0L) { + output.writeUInt64(9, linkmicGuestUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scene_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, scene_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (common_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCommon()); + } + if (count_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, count_); + } + if (total_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, total_); + } + if (color_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, color_); + } + if (user_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getUser()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(icon_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, icon_); + } + if (doubleLikeDetail_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getDoubleLikeDetail()); + } + if (linkmicGuestUid_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(9, linkmicGuestUid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scene_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, scene_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon() + .equals(other.getCommon())) return false; + } + if (getCount() + != other.getCount()) return false; + if (getTotal() + != other.getTotal()) return false; + if (getColor() + != other.getColor()) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (!getIcon() + .equals(other.getIcon())) return false; + if (hasDoubleLikeDetail() != other.hasDoubleLikeDetail()) return false; + if (hasDoubleLikeDetail()) { + if (!getDoubleLikeDetail() + .equals(other.getDoubleLikeDetail())) return false; + } + if (getLinkmicGuestUid() + != other.getLinkmicGuestUid()) return false; + if (!getScene() + .equals(other.getScene())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + hash = (37 * hash) + COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCount()); + hash = (37 * hash) + TOTAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotal()); + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getColor()); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + ICON_FIELD_NUMBER; + hash = (53 * hash) + getIcon().hashCode(); + if (hasDoubleLikeDetail()) { + hash = (37 * hash) + DOUBLELIKEDETAIL_FIELD_NUMBER; + hash = (53 * hash) + getDoubleLikeDetail().hashCode(); + } + hash = (37 * hash) + LINKMICGUESTUID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLinkmicGuestUid()); + hash = (37 * hash) + SCENE_FIELD_NUMBER; + hash = (53 * hash) + getScene().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg) + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_like_message_msg_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_like_message_msg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + count_ = 0L; + total_ = 0L; + color_ = 0L; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + icon_ = ""; + doubleLikeDetail_ = null; + if (doubleLikeDetailBuilder_ != null) { + doubleLikeDetailBuilder_.dispose(); + doubleLikeDetailBuilder_ = null; + } + linkmicGuestUid_ = 0L; + scene_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_like_message_msg_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null + ? common_ + : commonBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.count_ = count_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.total_ = total_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.color_ = color_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.icon_ = icon_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.doubleLikeDetail_ = doubleLikeDetailBuilder_ == null + ? doubleLikeDetail_ + : doubleLikeDetailBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.linkmicGuestUid_ = linkmicGuestUid_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.scene_ = scene_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + if (other.getCount() != 0L) { + setCount(other.getCount()); + } + if (other.getTotal() != 0L) { + setTotal(other.getTotal()); + } + if (other.getColor() != 0L) { + setColor(other.getColor()); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (!other.getIcon().isEmpty()) { + icon_ = other.icon_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.hasDoubleLikeDetail()) { + mergeDoubleLikeDetail(other.getDoubleLikeDetail()); + } + if (other.getLinkmicGuestUid() != 0L) { + setLinkmicGuestUid(other.getLinkmicGuestUid()); + } + if (!other.getScene().isEmpty()) { + scene_ = other.scene_; + bitField0_ |= 0x00000100; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCommonFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + count_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + total_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + color_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + icon_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getDoubleLikeDetailFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 72: { + linkmicGuestUid_ = input.readUInt64(); + bitField0_ |= 0x00000080; + break; + } // case 72 + case 82: { + scene_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 82 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common common_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> commonBuilder_; + /** + * <code>.Common common = 1;</code> + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.Common common = 1;</code> + * @return The common. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + if (commonBuilder_ == null) { + return common_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * <code>.Common common = 1;</code> + */ + public Builder setCommon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Common common = 1;</code> + */ + public Builder setCommon( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Common common = 1;</code> + */ + public Builder mergeCommon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + common_ != null && + common_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Common common = 1;</code> + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Common common = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * <code>.Common common = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + } + /** + * <code>.Common common = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder>( + getCommon(), + getParentForChildren(), + isClean()); + common_ = null; + } + return commonBuilder_; + } + + private long count_ ; + /** + * <code>uint64 count = 2;</code> + * @return The count. + */ + @java.lang.Override + public long getCount() { + return count_; + } + /** + * <code>uint64 count = 2;</code> + * @param value The count to set. + * @return This builder for chaining. + */ + public Builder setCount(long value) { + + count_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>uint64 count = 2;</code> + * @return This builder for chaining. + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000002); + count_ = 0L; + onChanged(); + return this; + } + + private long total_ ; + /** + * <code>uint64 total = 3;</code> + * @return The total. + */ + @java.lang.Override + public long getTotal() { + return total_; + } + /** + * <code>uint64 total = 3;</code> + * @param value The total to set. + * @return This builder for chaining. + */ + public Builder setTotal(long value) { + + total_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 total = 3;</code> + * @return This builder for chaining. + */ + public Builder clearTotal() { + bitField0_ = (bitField0_ & ~0x00000004); + total_ = 0L; + onChanged(); + return this; + } + + private long color_ ; + /** + * <code>uint64 color = 4;</code> + * @return The color. + */ + @java.lang.Override + public long getColor() { + return color_; + } + /** + * <code>uint64 color = 4;</code> + * @param value The color to set. + * @return This builder for chaining. + */ + public Builder setColor(long value) { + + color_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint64 color = 4;</code> + * @return This builder for chaining. + */ + public Builder clearColor() { + bitField0_ = (bitField0_ & ~0x00000008); + color_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> userBuilder_; + /** + * <code>.User user = 5;</code> + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * <code>.User user = 5;</code> + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * <code>.User user = 5;</code> + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>.User user = 5;</code> + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>.User user = 5;</code> + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>.User user = 5;</code> + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000010); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User user = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder getUserBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * <code>.User user = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + } + /** + * <code>.User user = 5;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private java.lang.Object icon_ = ""; + /** + * <code>string icon = 6;</code> + * @return The icon. + */ + public java.lang.String getIcon() { + java.lang.Object ref = icon_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + icon_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string icon = 6;</code> + * @return The bytes for icon. + */ + public com.google.protobuf.ByteString + getIconBytes() { + java.lang.Object ref = icon_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + icon_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string icon = 6;</code> + * @param value The icon to set. + * @return This builder for chaining. + */ + public Builder setIcon( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + icon_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>string icon = 6;</code> + * @return This builder for chaining. + */ + public Builder clearIcon() { + icon_ = getDefaultInstance().getIcon(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * <code>string icon = 6;</code> + * @param value The bytes for icon to set. + * @return This builder for chaining. + */ + public Builder setIconBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + icon_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail doubleLikeDetail_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetailOrBuilder> doubleLikeDetailBuilder_; + /** + * <code>.DoubleLikeDetail doubleLikeDetail = 7;</code> + * @return Whether the doubleLikeDetail field is set. + */ + public boolean hasDoubleLikeDetail() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * <code>.DoubleLikeDetail doubleLikeDetail = 7;</code> + * @return The doubleLikeDetail. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail getDoubleLikeDetail() { + if (doubleLikeDetailBuilder_ == null) { + return doubleLikeDetail_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.getDefaultInstance() : doubleLikeDetail_; + } else { + return doubleLikeDetailBuilder_.getMessage(); + } + } + /** + * <code>.DoubleLikeDetail doubleLikeDetail = 7;</code> + */ + public Builder setDoubleLikeDetail(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail value) { + if (doubleLikeDetailBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + doubleLikeDetail_ = value; + } else { + doubleLikeDetailBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.DoubleLikeDetail doubleLikeDetail = 7;</code> + */ + public Builder setDoubleLikeDetail( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.Builder builderForValue) { + if (doubleLikeDetailBuilder_ == null) { + doubleLikeDetail_ = builderForValue.build(); + } else { + doubleLikeDetailBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.DoubleLikeDetail doubleLikeDetail = 7;</code> + */ + public Builder mergeDoubleLikeDetail(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail value) { + if (doubleLikeDetailBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + doubleLikeDetail_ != null && + doubleLikeDetail_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.getDefaultInstance()) { + getDoubleLikeDetailBuilder().mergeFrom(value); + } else { + doubleLikeDetail_ = value; + } + } else { + doubleLikeDetailBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.DoubleLikeDetail doubleLikeDetail = 7;</code> + */ + public Builder clearDoubleLikeDetail() { + bitField0_ = (bitField0_ & ~0x00000040); + doubleLikeDetail_ = null; + if (doubleLikeDetailBuilder_ != null) { + doubleLikeDetailBuilder_.dispose(); + doubleLikeDetailBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.DoubleLikeDetail doubleLikeDetail = 7;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.Builder getDoubleLikeDetailBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getDoubleLikeDetailFieldBuilder().getBuilder(); + } + /** + * <code>.DoubleLikeDetail doubleLikeDetail = 7;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetailOrBuilder getDoubleLikeDetailOrBuilder() { + if (doubleLikeDetailBuilder_ != null) { + return doubleLikeDetailBuilder_.getMessageOrBuilder(); + } else { + return doubleLikeDetail_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.getDefaultInstance() : doubleLikeDetail_; + } + } + /** + * <code>.DoubleLikeDetail doubleLikeDetail = 7;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetailOrBuilder> + getDoubleLikeDetailFieldBuilder() { + if (doubleLikeDetailBuilder_ == null) { + doubleLikeDetailBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetailOrBuilder>( + getDoubleLikeDetail(), + getParentForChildren(), + isClean()); + doubleLikeDetail_ = null; + } + return doubleLikeDetailBuilder_; + } + + private long linkmicGuestUid_ ; + /** + * <pre> + * DisplayControlInfo displayControlInfo = 8; + * </pre> + * + * <code>uint64 linkmicGuestUid = 9;</code> + * @return The linkmicGuestUid. + */ + @java.lang.Override + public long getLinkmicGuestUid() { + return linkmicGuestUid_; + } + /** + * <pre> + * DisplayControlInfo displayControlInfo = 8; + * </pre> + * + * <code>uint64 linkmicGuestUid = 9;</code> + * @param value The linkmicGuestUid to set. + * @return This builder for chaining. + */ + public Builder setLinkmicGuestUid(long value) { + + linkmicGuestUid_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <pre> + * DisplayControlInfo displayControlInfo = 8; + * </pre> + * + * <code>uint64 linkmicGuestUid = 9;</code> + * @return This builder for chaining. + */ + public Builder clearLinkmicGuestUid() { + bitField0_ = (bitField0_ & ~0x00000080); + linkmicGuestUid_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object scene_ = ""; + /** + * <pre> + * PicoDisplayInfo picoDisplayInfo = 11; + * = 12; + * </pre> + * + * <code>string scene = 10;</code> + * @return The scene. + */ + public java.lang.String getScene() { + java.lang.Object ref = scene_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scene_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <pre> + * PicoDisplayInfo picoDisplayInfo = 11; + * = 12; + * </pre> + * + * <code>string scene = 10;</code> + * @return The bytes for scene. + */ + public com.google.protobuf.ByteString + getSceneBytes() { + java.lang.Object ref = scene_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scene_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <pre> + * PicoDisplayInfo picoDisplayInfo = 11; + * = 12; + * </pre> + * + * <code>string scene = 10;</code> + * @param value The scene to set. + * @return This builder for chaining. + */ + public Builder setScene( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + scene_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <pre> + * PicoDisplayInfo picoDisplayInfo = 11; + * = 12; + * </pre> + * + * <code>string scene = 10;</code> + * @return This builder for chaining. + */ + public Builder clearScene() { + scene_ = getDefaultInstance().getScene(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * <pre> + * PicoDisplayInfo picoDisplayInfo = 11; + * = 12; + * </pre> + * + * <code>string scene = 10;</code> + * @param value The bytes for scene to set. + * @return This builder for chaining. + */ + public Builder setSceneBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + scene_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<douyin_webcast_like_message_msg> + PARSER = new com.google.protobuf.AbstractParser<douyin_webcast_like_message_msg>() { + @java.lang.Override + public douyin_webcast_like_message_msg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<douyin_webcast_like_message_msg> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<douyin_webcast_like_message_msg> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_like_message_msgOrBuilder.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_like_message_msgOrBuilder.java new file mode 100644 index 0000000..b5b088a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_like_message_msgOrBuilder.java @@ -0,0 +1,140 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_webcast_like_message_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +public interface douyin_webcast_like_message_msgOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_like_message_msg) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.Common common = 1;</code> + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * <code>.Common common = 1;</code> + * @return The common. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getCommon(); + /** + * <code>.Common common = 1;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder(); + + /** + * <code>uint64 count = 2;</code> + * @return The count. + */ + long getCount(); + + /** + * <code>uint64 total = 3;</code> + * @return The total. + */ + long getTotal(); + + /** + * <code>uint64 color = 4;</code> + * @return The color. + */ + long getColor(); + + /** + * <code>.User user = 5;</code> + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * <code>.User user = 5;</code> + * @return The user. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser(); + /** + * <code>.User user = 5;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder(); + + /** + * <code>string icon = 6;</code> + * @return The icon. + */ + java.lang.String getIcon(); + /** + * <code>string icon = 6;</code> + * @return The bytes for icon. + */ + com.google.protobuf.ByteString + getIconBytes(); + + /** + * <code>.DoubleLikeDetail doubleLikeDetail = 7;</code> + * @return Whether the doubleLikeDetail field is set. + */ + boolean hasDoubleLikeDetail(); + /** + * <code>.DoubleLikeDetail doubleLikeDetail = 7;</code> + * @return The doubleLikeDetail. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail getDoubleLikeDetail(); + /** + * <code>.DoubleLikeDetail doubleLikeDetail = 7;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetailOrBuilder getDoubleLikeDetailOrBuilder(); + + /** + * <pre> + * DisplayControlInfo displayControlInfo = 8; + * </pre> + * + * <code>uint64 linkmicGuestUid = 9;</code> + * @return The linkmicGuestUid. + */ + long getLinkmicGuestUid(); + + /** + * <pre> + * PicoDisplayInfo picoDisplayInfo = 11; + * = 12; + * </pre> + * + * <code>string scene = 10;</code> + * @return The scene. + */ + java.lang.String getScene(); + /** + * <pre> + * PicoDisplayInfo picoDisplayInfo = 11; + * = 12; + * </pre> + * + * <code>string scene = 10;</code> + * @return The bytes for scene. + */ + com.google.protobuf.ByteString + getSceneBytes(); +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_like_message_msgProto.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_like_message_msgProto.java new file mode 100644 index 0000000..153557b --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_like_message_msgProto.java @@ -0,0 +1,87 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_webcast_like_message_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +public final class douyin_webcast_like_message_msgProto { + private douyin_webcast_like_message_msgProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_like_message_msg_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_like_message_msg_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n%douyin_webcast_like_message_msg.proto\022" + + "2tech.ordinaryroad.live.chat.client.douy" + + "in.protobuf\032\014Common.proto\032\nUser.proto\032\026D" + + "oubleLikeDetail.proto\"\337\001\n\037douyin_webcast" + + "_like_message_msg\022\027\n\006common\030\001 \001(\0132\007.Comm" + + "on\022\r\n\005count\030\002 \001(\004\022\r\n\005total\030\003 \001(\004\022\r\n\005colo" + + "r\030\004 \001(\004\022\023\n\004user\030\005 \001(\0132\005.User\022\014\n\004icon\030\006 \001" + + "(\t\022+\n\020doubleLikeDetail\030\007 \001(\0132\021.DoubleLik" + + "eDetail\022\027\n\017linkmicGuestUid\030\t \001(\004\022\r\n\005scen" + + "e\030\n \001(\tBb\n2tech.ordinaryroad.live.chat.c" + + "lient.douyin.protobufB$douyin_webcast_li" + + "ke_message_msgProtoP\001\242\002\003GPBb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.getDescriptor(), + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_like_message_msg_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_like_message_msg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_like_message_msg_descriptor, + new java.lang.String[] { "Common", "Count", "Total", "Color", "User", "Icon", "DoubleLikeDetail", "LinkmicGuestUid", "Scene", }); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_member_message_msg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_member_message_msg.java new file mode 100644 index 0000000..63c75d6 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_member_message_msg.java @@ -0,0 +1,2828 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_webcast_member_message_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +/** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg} + */ +public final class douyin_webcast_member_message_msg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg) + douyin_webcast_member_message_msgOrBuilder { + private static final long serialVersionUID = 0L; + // Use douyin_webcast_member_message_msg.newBuilder() to construct. + private douyin_webcast_member_message_msg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private douyin_webcast_member_message_msg() { + actionDescription_ = ""; + popStr_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new douyin_webcast_member_message_msg(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_webcast_member_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 22: + return internalGetBuriedPointMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_webcast_member_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg.Builder.class); + } + + public static final int COMMON_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common common_; + /** + * <code>.Common common = 1;</code> + * @return Whether the common field is set. + */ + @java.lang.Override + public boolean hasCommon() { + return common_ != null; + } + /** + * <code>.Common common = 1;</code> + * @return The common. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + return common_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + /** + * <code>.Common common = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + return common_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + + public static final int USER_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User user_; + /** + * <code>.User user = 2;</code> + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return user_ != null; + } + /** + * <code>.User user = 2;</code> + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + /** + * <code>.User user = 2;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + + public static final int MEMBERCOUNT_FIELD_NUMBER = 3; + private long memberCount_ = 0L; + /** + * <code>uint64 memberCount = 3;</code> + * @return The memberCount. + */ + @java.lang.Override + public long getMemberCount() { + return memberCount_; + } + + public static final int OPERATOR_FIELD_NUMBER = 4; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User operator_; + /** + * <code>.User operator = 4;</code> + * @return Whether the operator field is set. + */ + @java.lang.Override + public boolean hasOperator() { + return operator_ != null; + } + /** + * <code>.User operator = 4;</code> + * @return The operator. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getOperator() { + return operator_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : operator_; + } + /** + * <code>.User operator = 4;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getOperatorOrBuilder() { + return operator_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : operator_; + } + + public static final int ISSETTOADMIN_FIELD_NUMBER = 5; + private boolean isSetToAdmin_ = false; + /** + * <code>bool isSetToAdmin = 5;</code> + * @return The isSetToAdmin. + */ + @java.lang.Override + public boolean getIsSetToAdmin() { + return isSetToAdmin_; + } + + public static final int ISTOPUSER_FIELD_NUMBER = 6; + private boolean isTopUser_ = false; + /** + * <code>bool isTopUser = 6;</code> + * @return The isTopUser. + */ + @java.lang.Override + public boolean getIsTopUser() { + return isTopUser_; + } + + public static final int RANKSCORE_FIELD_NUMBER = 7; + private long rankScore_ = 0L; + /** + * <code>int64 rankScore = 7;</code> + * @return The rankScore. + */ + @java.lang.Override + public long getRankScore() { + return rankScore_; + } + + public static final int TOPUSERNO_FIELD_NUMBER = 8; + private long topUserNo_ = 0L; + /** + * <code>int64 topUserNo = 8;</code> + * @return The topUserNo. + */ + @java.lang.Override + public long getTopUserNo() { + return topUserNo_; + } + + public static final int ENTERTYPE_FIELD_NUMBER = 9; + private long enterType_ = 0L; + /** + * <code>int64 enterType = 9;</code> + * @return The enterType. + */ + @java.lang.Override + public long getEnterType() { + return enterType_; + } + + public static final int ACTION_FIELD_NUMBER = 10; + private long action_ = 0L; + /** + * <code>int64 action = 10;</code> + * @return The action. + */ + @java.lang.Override + public long getAction() { + return action_; + } + + public static final int ACTIONDESCRIPTION_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private volatile java.lang.Object actionDescription_ = ""; + /** + * <code>string actionDescription = 11;</code> + * @return The actionDescription. + */ + @java.lang.Override + public java.lang.String getActionDescription() { + java.lang.Object ref = actionDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + actionDescription_ = s; + return s; + } + } + /** + * <code>string actionDescription = 11;</code> + * @return The bytes for actionDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getActionDescriptionBytes() { + java.lang.Object ref = actionDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + actionDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERID_FIELD_NUMBER = 12; + private long userId_ = 0L; + /** + * <code>int64 userId = 12;</code> + * @return The userId. + */ + @java.lang.Override + public long getUserId() { + return userId_; + } + + public static final int POPSTR_FIELD_NUMBER = 14; + @SuppressWarnings("serial") + private volatile java.lang.Object popStr_ = ""; + /** + * <pre> + * EffectConfig effectConfig = 13; + * </pre> + * + * <code>string popStr = 14;</code> + * @return The popStr. + */ + @java.lang.Override + public java.lang.String getPopStr() { + java.lang.Object ref = popStr_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + popStr_ = s; + return s; + } + } + /** + * <pre> + * EffectConfig effectConfig = 13; + * </pre> + * + * <code>string popStr = 14;</code> + * @return The bytes for popStr. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPopStrBytes() { + java.lang.Object ref = popStr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + popStr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKGROUNDIMAGE_FIELD_NUMBER = 16; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image backgroundImage_; + /** + * <pre> + * EffectConfig enterEffectConfig = 15; + * </pre> + * + * <code>.Image backgroundImage = 16;</code> + * @return Whether the backgroundImage field is set. + */ + @java.lang.Override + public boolean hasBackgroundImage() { + return backgroundImage_ != null; + } + /** + * <pre> + * EffectConfig enterEffectConfig = 15; + * </pre> + * + * <code>.Image backgroundImage = 16;</code> + * @return The backgroundImage. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImage() { + return backgroundImage_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImage_; + } + /** + * <pre> + * EffectConfig enterEffectConfig = 15; + * </pre> + * + * <code>.Image backgroundImage = 16;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageOrBuilder() { + return backgroundImage_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImage_; + } + + public static final int BACKGROUNDIMAGEV2_FIELD_NUMBER = 17; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image backgroundImageV2_; + /** + * <code>.Image backgroundImageV2 = 17;</code> + * @return Whether the backgroundImageV2 field is set. + */ + @java.lang.Override + public boolean hasBackgroundImageV2() { + return backgroundImageV2_ != null; + } + /** + * <code>.Image backgroundImageV2 = 17;</code> + * @return The backgroundImageV2. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImageV2() { + return backgroundImageV2_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImageV2_; + } + /** + * <code>.Image backgroundImageV2 = 17;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageV2OrBuilder() { + return backgroundImageV2_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImageV2_; + } + + public static final int ANCHORDISPLAYTEXT_FIELD_NUMBER = 18; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text anchorDisplayText_; + /** + * <code>.Text anchorDisplayText = 18;</code> + * @return Whether the anchorDisplayText field is set. + */ + @java.lang.Override + public boolean hasAnchorDisplayText() { + return anchorDisplayText_ != null; + } + /** + * <code>.Text anchorDisplayText = 18;</code> + * @return The anchorDisplayText. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text getAnchorDisplayText() { + return anchorDisplayText_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : anchorDisplayText_; + } + /** + * <code>.Text anchorDisplayText = 18;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getAnchorDisplayTextOrBuilder() { + return anchorDisplayText_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : anchorDisplayText_; + } + + public static final int USERENTERTIPTYPE_FIELD_NUMBER = 20; + private long userEnterTipType_ = 0L; + /** + * <pre> + * PublicAreaCommon publicAreaCommon = 19; + * </pre> + * + * <code>int64 userEnterTipType = 20;</code> + * @return The userEnterTipType. + */ + @java.lang.Override + public long getUserEnterTipType() { + return userEnterTipType_; + } + + public static final int ANCHORENTERTIPTYPE_FIELD_NUMBER = 21; + private long anchorEnterTipType_ = 0L; + /** + * <code>int64 anchorEnterTipType = 21;</code> + * @return The anchorEnterTipType. + */ + @java.lang.Override + public long getAnchorEnterTipType() { + return anchorEnterTipType_; + } + + public static final int BURIEDPOINTMAP_FIELD_NUMBER = 22; + private static final class BuriedPointMapDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .<java.lang.String, java.lang.String>newDefaultInstance( + tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_webcast_member_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_BuriedPointMapEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> buriedPointMap_; + private com.google.protobuf.MapField<java.lang.String, java.lang.String> + internalGetBuriedPointMap() { + if (buriedPointMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BuriedPointMapDefaultEntryHolder.defaultEntry); + } + return buriedPointMap_; + } + public int getBuriedPointMapCount() { + return internalGetBuriedPointMap().getMap().size(); + } + /** + * <code>map<string, string> buriedPointMap = 22;</code> + */ + @java.lang.Override + public boolean containsBuriedPointMap( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetBuriedPointMap().getMap().containsKey(key); + } + /** + * Use {@link #getBuriedPointMapMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map<java.lang.String, java.lang.String> getBuriedPointMap() { + return getBuriedPointMapMap(); + } + /** + * <code>map<string, string> buriedPointMap = 22;</code> + */ + @java.lang.Override + public java.util.Map<java.lang.String, java.lang.String> getBuriedPointMapMap() { + return internalGetBuriedPointMap().getMap(); + } + /** + * <code>map<string, string> buriedPointMap = 22;</code> + */ + @java.lang.Override + public /* nullable */ +java.lang.String getBuriedPointMapOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map<java.lang.String, java.lang.String> map = + internalGetBuriedPointMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * <code>map<string, string> buriedPointMap = 22;</code> + */ + @java.lang.Override + public java.lang.String getBuriedPointMapOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map<java.lang.String, java.lang.String> map = + internalGetBuriedPointMap().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (common_ != null) { + output.writeMessage(1, getCommon()); + } + if (user_ != null) { + output.writeMessage(2, getUser()); + } + if (memberCount_ != 0L) { + output.writeUInt64(3, memberCount_); + } + if (operator_ != null) { + output.writeMessage(4, getOperator()); + } + if (isSetToAdmin_ != false) { + output.writeBool(5, isSetToAdmin_); + } + if (isTopUser_ != false) { + output.writeBool(6, isTopUser_); + } + if (rankScore_ != 0L) { + output.writeInt64(7, rankScore_); + } + if (topUserNo_ != 0L) { + output.writeInt64(8, topUserNo_); + } + if (enterType_ != 0L) { + output.writeInt64(9, enterType_); + } + if (action_ != 0L) { + output.writeInt64(10, action_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(actionDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, actionDescription_); + } + if (userId_ != 0L) { + output.writeInt64(12, userId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(popStr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, popStr_); + } + if (backgroundImage_ != null) { + output.writeMessage(16, getBackgroundImage()); + } + if (backgroundImageV2_ != null) { + output.writeMessage(17, getBackgroundImageV2()); + } + if (anchorDisplayText_ != null) { + output.writeMessage(18, getAnchorDisplayText()); + } + if (userEnterTipType_ != 0L) { + output.writeInt64(20, userEnterTipType_); + } + if (anchorEnterTipType_ != 0L) { + output.writeInt64(21, anchorEnterTipType_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetBuriedPointMap(), + BuriedPointMapDefaultEntryHolder.defaultEntry, + 22); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (common_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCommon()); + } + if (user_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + if (memberCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, memberCount_); + } + if (operator_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getOperator()); + } + if (isSetToAdmin_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, isSetToAdmin_); + } + if (isTopUser_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, isTopUser_); + } + if (rankScore_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, rankScore_); + } + if (topUserNo_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(8, topUserNo_); + } + if (enterType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(9, enterType_); + } + if (action_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(10, action_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(actionDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, actionDescription_); + } + if (userId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(12, userId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(popStr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, popStr_); + } + if (backgroundImage_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getBackgroundImage()); + } + if (backgroundImageV2_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getBackgroundImageV2()); + } + if (anchorDisplayText_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getAnchorDisplayText()); + } + if (userEnterTipType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(20, userEnterTipType_); + } + if (anchorEnterTipType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(21, anchorEnterTipType_); + } + for (java.util.Map.Entry<java.lang.String, java.lang.String> entry + : internalGetBuriedPointMap().getMap().entrySet()) { + com.google.protobuf.MapEntry<java.lang.String, java.lang.String> + buriedPointMap__ = BuriedPointMapDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(22, buriedPointMap__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg) obj; + + if (hasCommon() != other.hasCommon()) return false; + if (hasCommon()) { + if (!getCommon() + .equals(other.getCommon())) return false; + } + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getMemberCount() + != other.getMemberCount()) return false; + if (hasOperator() != other.hasOperator()) return false; + if (hasOperator()) { + if (!getOperator() + .equals(other.getOperator())) return false; + } + if (getIsSetToAdmin() + != other.getIsSetToAdmin()) return false; + if (getIsTopUser() + != other.getIsTopUser()) return false; + if (getRankScore() + != other.getRankScore()) return false; + if (getTopUserNo() + != other.getTopUserNo()) return false; + if (getEnterType() + != other.getEnterType()) return false; + if (getAction() + != other.getAction()) return false; + if (!getActionDescription() + .equals(other.getActionDescription())) return false; + if (getUserId() + != other.getUserId()) return false; + if (!getPopStr() + .equals(other.getPopStr())) return false; + if (hasBackgroundImage() != other.hasBackgroundImage()) return false; + if (hasBackgroundImage()) { + if (!getBackgroundImage() + .equals(other.getBackgroundImage())) return false; + } + if (hasBackgroundImageV2() != other.hasBackgroundImageV2()) return false; + if (hasBackgroundImageV2()) { + if (!getBackgroundImageV2() + .equals(other.getBackgroundImageV2())) return false; + } + if (hasAnchorDisplayText() != other.hasAnchorDisplayText()) return false; + if (hasAnchorDisplayText()) { + if (!getAnchorDisplayText() + .equals(other.getAnchorDisplayText())) return false; + } + if (getUserEnterTipType() + != other.getUserEnterTipType()) return false; + if (getAnchorEnterTipType() + != other.getAnchorEnterTipType()) return false; + if (!internalGetBuriedPointMap().equals( + other.internalGetBuriedPointMap())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCommon()) { + hash = (37 * hash) + COMMON_FIELD_NUMBER; + hash = (53 * hash) + getCommon().hashCode(); + } + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + MEMBERCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMemberCount()); + if (hasOperator()) { + hash = (37 * hash) + OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + getOperator().hashCode(); + } + hash = (37 * hash) + ISSETTOADMIN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsSetToAdmin()); + hash = (37 * hash) + ISTOPUSER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsTopUser()); + hash = (37 * hash) + RANKSCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRankScore()); + hash = (37 * hash) + TOPUSERNO_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTopUserNo()); + hash = (37 * hash) + ENTERTYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEnterType()); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAction()); + hash = (37 * hash) + ACTIONDESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getActionDescription().hashCode(); + hash = (37 * hash) + USERID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUserId()); + hash = (37 * hash) + POPSTR_FIELD_NUMBER; + hash = (53 * hash) + getPopStr().hashCode(); + if (hasBackgroundImage()) { + hash = (37 * hash) + BACKGROUNDIMAGE_FIELD_NUMBER; + hash = (53 * hash) + getBackgroundImage().hashCode(); + } + if (hasBackgroundImageV2()) { + hash = (37 * hash) + BACKGROUNDIMAGEV2_FIELD_NUMBER; + hash = (53 * hash) + getBackgroundImageV2().hashCode(); + } + if (hasAnchorDisplayText()) { + hash = (37 * hash) + ANCHORDISPLAYTEXT_FIELD_NUMBER; + hash = (53 * hash) + getAnchorDisplayText().hashCode(); + } + hash = (37 * hash) + USERENTERTIPTYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUserEnterTipType()); + hash = (37 * hash) + ANCHORENTERTIPTYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAnchorEnterTipType()); + if (!internalGetBuriedPointMap().getMap().isEmpty()) { + hash = (37 * hash) + BURIEDPOINTMAP_FIELD_NUMBER; + hash = (53 * hash) + internalGetBuriedPointMap().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg) + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_webcast_member_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 22: + return internalGetBuriedPointMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 22: + return internalGetMutableBuriedPointMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_webcast_member_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + memberCount_ = 0L; + operator_ = null; + if (operatorBuilder_ != null) { + operatorBuilder_.dispose(); + operatorBuilder_ = null; + } + isSetToAdmin_ = false; + isTopUser_ = false; + rankScore_ = 0L; + topUserNo_ = 0L; + enterType_ = 0L; + action_ = 0L; + actionDescription_ = ""; + userId_ = 0L; + popStr_ = ""; + backgroundImage_ = null; + if (backgroundImageBuilder_ != null) { + backgroundImageBuilder_.dispose(); + backgroundImageBuilder_ = null; + } + backgroundImageV2_ = null; + if (backgroundImageV2Builder_ != null) { + backgroundImageV2Builder_.dispose(); + backgroundImageV2Builder_ = null; + } + anchorDisplayText_ = null; + if (anchorDisplayTextBuilder_ != null) { + anchorDisplayTextBuilder_.dispose(); + anchorDisplayTextBuilder_ = null; + } + userEnterTipType_ = 0L; + anchorEnterTipType_ = 0L; + internalGetMutableBuriedPointMap().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_webcast_member_message_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_webcast_member_message_msg_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.common_ = commonBuilder_ == null + ? common_ + : commonBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.memberCount_ = memberCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.operator_ = operatorBuilder_ == null + ? operator_ + : operatorBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.isSetToAdmin_ = isSetToAdmin_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.isTopUser_ = isTopUser_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.rankScore_ = rankScore_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.topUserNo_ = topUserNo_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.enterType_ = enterType_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.action_ = action_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.actionDescription_ = actionDescription_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.userId_ = userId_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.popStr_ = popStr_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.backgroundImage_ = backgroundImageBuilder_ == null + ? backgroundImage_ + : backgroundImageBuilder_.build(); + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.backgroundImageV2_ = backgroundImageV2Builder_ == null + ? backgroundImageV2_ + : backgroundImageV2Builder_.build(); + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.anchorDisplayText_ = anchorDisplayTextBuilder_ == null + ? anchorDisplayText_ + : anchorDisplayTextBuilder_.build(); + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.userEnterTipType_ = userEnterTipType_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.anchorEnterTipType_ = anchorEnterTipType_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.buriedPointMap_ = internalGetBuriedPointMap(); + result.buriedPointMap_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg.getDefaultInstance()) return this; + if (other.hasCommon()) { + mergeCommon(other.getCommon()); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getMemberCount() != 0L) { + setMemberCount(other.getMemberCount()); + } + if (other.hasOperator()) { + mergeOperator(other.getOperator()); + } + if (other.getIsSetToAdmin() != false) { + setIsSetToAdmin(other.getIsSetToAdmin()); + } + if (other.getIsTopUser() != false) { + setIsTopUser(other.getIsTopUser()); + } + if (other.getRankScore() != 0L) { + setRankScore(other.getRankScore()); + } + if (other.getTopUserNo() != 0L) { + setTopUserNo(other.getTopUserNo()); + } + if (other.getEnterType() != 0L) { + setEnterType(other.getEnterType()); + } + if (other.getAction() != 0L) { + setAction(other.getAction()); + } + if (!other.getActionDescription().isEmpty()) { + actionDescription_ = other.actionDescription_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (other.getUserId() != 0L) { + setUserId(other.getUserId()); + } + if (!other.getPopStr().isEmpty()) { + popStr_ = other.popStr_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (other.hasBackgroundImage()) { + mergeBackgroundImage(other.getBackgroundImage()); + } + if (other.hasBackgroundImageV2()) { + mergeBackgroundImageV2(other.getBackgroundImageV2()); + } + if (other.hasAnchorDisplayText()) { + mergeAnchorDisplayText(other.getAnchorDisplayText()); + } + if (other.getUserEnterTipType() != 0L) { + setUserEnterTipType(other.getUserEnterTipType()); + } + if (other.getAnchorEnterTipType() != 0L) { + setAnchorEnterTipType(other.getAnchorEnterTipType()); + } + internalGetMutableBuriedPointMap().mergeFrom( + other.internalGetBuriedPointMap()); + bitField0_ |= 0x00040000; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getCommonFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + memberCount_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + input.readMessage( + getOperatorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + isSetToAdmin_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + isTopUser_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + rankScore_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + topUserNo_ = input.readInt64(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + enterType_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + action_ = input.readInt64(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 90: { + actionDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 96: { + userId_ = input.readInt64(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 114: { + popStr_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 114 + case 130: { + input.readMessage( + getBackgroundImageFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 130 + case 138: { + input.readMessage( + getBackgroundImageV2FieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 138 + case 146: { + input.readMessage( + getAnchorDisplayTextFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 146 + case 160: { + userEnterTipType_ = input.readInt64(); + bitField0_ |= 0x00010000; + break; + } // case 160 + case 168: { + anchorEnterTipType_ = input.readInt64(); + bitField0_ |= 0x00020000; + break; + } // case 168 + case 178: { + com.google.protobuf.MapEntry<java.lang.String, java.lang.String> + buriedPointMap__ = input.readMessage( + BuriedPointMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableBuriedPointMap().getMutableMap().put( + buriedPointMap__.getKey(), buriedPointMap__.getValue()); + bitField0_ |= 0x00040000; + break; + } // case 178 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common common_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> commonBuilder_; + /** + * <code>.Common common = 1;</code> + * @return Whether the common field is set. + */ + public boolean hasCommon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.Common common = 1;</code> + * @return The common. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getCommon() { + if (commonBuilder_ == null) { + return common_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } else { + return commonBuilder_.getMessage(); + } + } + /** + * <code>.Common common = 1;</code> + */ + public Builder setCommon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + common_ = value; + } else { + commonBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Common common = 1;</code> + */ + public Builder setCommon( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder builderForValue) { + if (commonBuilder_ == null) { + common_ = builderForValue.build(); + } else { + commonBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Common common = 1;</code> + */ + public Builder mergeCommon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common value) { + if (commonBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + common_ != null && + common_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance()) { + getCommonBuilder().mergeFrom(value); + } else { + common_ = value; + } + } else { + commonBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Common common = 1;</code> + */ + public Builder clearCommon() { + bitField0_ = (bitField0_ & ~0x00000001); + common_ = null; + if (commonBuilder_ != null) { + commonBuilder_.dispose(); + commonBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Common common = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder getCommonBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonFieldBuilder().getBuilder(); + } + /** + * <code>.Common common = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder() { + if (commonBuilder_ != null) { + return commonBuilder_.getMessageOrBuilder(); + } else { + return common_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance() : common_; + } + } + /** + * <code>.Common common = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder> + getCommonFieldBuilder() { + if (commonBuilder_ == null) { + commonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder>( + getCommon(), + getParentForChildren(), + isClean()); + common_ = null; + } + return commonBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> userBuilder_; + /** + * <code>.User user = 2;</code> + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * <code>.User user = 2;</code> + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * <code>.User user = 2;</code> + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.User user = 2;</code> + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.User user = 2;</code> + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.User user = 2;</code> + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User user = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * <code>.User user = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + } + /** + * <code>.User user = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private long memberCount_ ; + /** + * <code>uint64 memberCount = 3;</code> + * @return The memberCount. + */ + @java.lang.Override + public long getMemberCount() { + return memberCount_; + } + /** + * <code>uint64 memberCount = 3;</code> + * @param value The memberCount to set. + * @return This builder for chaining. + */ + public Builder setMemberCount(long value) { + + memberCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 memberCount = 3;</code> + * @return This builder for chaining. + */ + public Builder clearMemberCount() { + bitField0_ = (bitField0_ & ~0x00000004); + memberCount_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User operator_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> operatorBuilder_; + /** + * <code>.User operator = 4;</code> + * @return Whether the operator field is set. + */ + public boolean hasOperator() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * <code>.User operator = 4;</code> + * @return The operator. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getOperator() { + if (operatorBuilder_ == null) { + return operator_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : operator_; + } else { + return operatorBuilder_.getMessage(); + } + } + /** + * <code>.User operator = 4;</code> + */ + public Builder setOperator(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (operatorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + operator_ = value; + } else { + operatorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.User operator = 4;</code> + */ + public Builder setOperator( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (operatorBuilder_ == null) { + operator_ = builderForValue.build(); + } else { + operatorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.User operator = 4;</code> + */ + public Builder mergeOperator(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (operatorBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + operator_ != null && + operator_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getOperatorBuilder().mergeFrom(value); + } else { + operator_ = value; + } + } else { + operatorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.User operator = 4;</code> + */ + public Builder clearOperator() { + bitField0_ = (bitField0_ & ~0x00000008); + operator_ = null; + if (operatorBuilder_ != null) { + operatorBuilder_.dispose(); + operatorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User operator = 4;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder getOperatorBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getOperatorFieldBuilder().getBuilder(); + } + /** + * <code>.User operator = 4;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getOperatorOrBuilder() { + if (operatorBuilder_ != null) { + return operatorBuilder_.getMessageOrBuilder(); + } else { + return operator_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : operator_; + } + } + /** + * <code>.User operator = 4;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getOperatorFieldBuilder() { + if (operatorBuilder_ == null) { + operatorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getOperator(), + getParentForChildren(), + isClean()); + operator_ = null; + } + return operatorBuilder_; + } + + private boolean isSetToAdmin_ ; + /** + * <code>bool isSetToAdmin = 5;</code> + * @return The isSetToAdmin. + */ + @java.lang.Override + public boolean getIsSetToAdmin() { + return isSetToAdmin_; + } + /** + * <code>bool isSetToAdmin = 5;</code> + * @param value The isSetToAdmin to set. + * @return This builder for chaining. + */ + public Builder setIsSetToAdmin(boolean value) { + + isSetToAdmin_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>bool isSetToAdmin = 5;</code> + * @return This builder for chaining. + */ + public Builder clearIsSetToAdmin() { + bitField0_ = (bitField0_ & ~0x00000010); + isSetToAdmin_ = false; + onChanged(); + return this; + } + + private boolean isTopUser_ ; + /** + * <code>bool isTopUser = 6;</code> + * @return The isTopUser. + */ + @java.lang.Override + public boolean getIsTopUser() { + return isTopUser_; + } + /** + * <code>bool isTopUser = 6;</code> + * @param value The isTopUser to set. + * @return This builder for chaining. + */ + public Builder setIsTopUser(boolean value) { + + isTopUser_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>bool isTopUser = 6;</code> + * @return This builder for chaining. + */ + public Builder clearIsTopUser() { + bitField0_ = (bitField0_ & ~0x00000020); + isTopUser_ = false; + onChanged(); + return this; + } + + private long rankScore_ ; + /** + * <code>int64 rankScore = 7;</code> + * @return The rankScore. + */ + @java.lang.Override + public long getRankScore() { + return rankScore_; + } + /** + * <code>int64 rankScore = 7;</code> + * @param value The rankScore to set. + * @return This builder for chaining. + */ + public Builder setRankScore(long value) { + + rankScore_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>int64 rankScore = 7;</code> + * @return This builder for chaining. + */ + public Builder clearRankScore() { + bitField0_ = (bitField0_ & ~0x00000040); + rankScore_ = 0L; + onChanged(); + return this; + } + + private long topUserNo_ ; + /** + * <code>int64 topUserNo = 8;</code> + * @return The topUserNo. + */ + @java.lang.Override + public long getTopUserNo() { + return topUserNo_; + } + /** + * <code>int64 topUserNo = 8;</code> + * @param value The topUserNo to set. + * @return This builder for chaining. + */ + public Builder setTopUserNo(long value) { + + topUserNo_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>int64 topUserNo = 8;</code> + * @return This builder for chaining. + */ + public Builder clearTopUserNo() { + bitField0_ = (bitField0_ & ~0x00000080); + topUserNo_ = 0L; + onChanged(); + return this; + } + + private long enterType_ ; + /** + * <code>int64 enterType = 9;</code> + * @return The enterType. + */ + @java.lang.Override + public long getEnterType() { + return enterType_; + } + /** + * <code>int64 enterType = 9;</code> + * @param value The enterType to set. + * @return This builder for chaining. + */ + public Builder setEnterType(long value) { + + enterType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>int64 enterType = 9;</code> + * @return This builder for chaining. + */ + public Builder clearEnterType() { + bitField0_ = (bitField0_ & ~0x00000100); + enterType_ = 0L; + onChanged(); + return this; + } + + private long action_ ; + /** + * <code>int64 action = 10;</code> + * @return The action. + */ + @java.lang.Override + public long getAction() { + return action_; + } + /** + * <code>int64 action = 10;</code> + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(long value) { + + action_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>int64 action = 10;</code> + * @return This builder for chaining. + */ + public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000200); + action_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object actionDescription_ = ""; + /** + * <code>string actionDescription = 11;</code> + * @return The actionDescription. + */ + public java.lang.String getActionDescription() { + java.lang.Object ref = actionDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + actionDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string actionDescription = 11;</code> + * @return The bytes for actionDescription. + */ + public com.google.protobuf.ByteString + getActionDescriptionBytes() { + java.lang.Object ref = actionDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + actionDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string actionDescription = 11;</code> + * @param value The actionDescription to set. + * @return This builder for chaining. + */ + public Builder setActionDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + actionDescription_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * <code>string actionDescription = 11;</code> + * @return This builder for chaining. + */ + public Builder clearActionDescription() { + actionDescription_ = getDefaultInstance().getActionDescription(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * <code>string actionDescription = 11;</code> + * @param value The bytes for actionDescription to set. + * @return This builder for chaining. + */ + public Builder setActionDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + actionDescription_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private long userId_ ; + /** + * <code>int64 userId = 12;</code> + * @return The userId. + */ + @java.lang.Override + public long getUserId() { + return userId_; + } + /** + * <code>int64 userId = 12;</code> + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId(long value) { + + userId_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * <code>int64 userId = 12;</code> + * @return This builder for chaining. + */ + public Builder clearUserId() { + bitField0_ = (bitField0_ & ~0x00000800); + userId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object popStr_ = ""; + /** + * <pre> + * EffectConfig effectConfig = 13; + * </pre> + * + * <code>string popStr = 14;</code> + * @return The popStr. + */ + public java.lang.String getPopStr() { + java.lang.Object ref = popStr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + popStr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <pre> + * EffectConfig effectConfig = 13; + * </pre> + * + * <code>string popStr = 14;</code> + * @return The bytes for popStr. + */ + public com.google.protobuf.ByteString + getPopStrBytes() { + java.lang.Object ref = popStr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + popStr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <pre> + * EffectConfig effectConfig = 13; + * </pre> + * + * <code>string popStr = 14;</code> + * @param value The popStr to set. + * @return This builder for chaining. + */ + public Builder setPopStr( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + popStr_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * <pre> + * EffectConfig effectConfig = 13; + * </pre> + * + * <code>string popStr = 14;</code> + * @return This builder for chaining. + */ + public Builder clearPopStr() { + popStr_ = getDefaultInstance().getPopStr(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + * <pre> + * EffectConfig effectConfig = 13; + * </pre> + * + * <code>string popStr = 14;</code> + * @param value The bytes for popStr to set. + * @return This builder for chaining. + */ + public Builder setPopStrBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + popStr_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image backgroundImage_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> backgroundImageBuilder_; + /** + * <pre> + * EffectConfig enterEffectConfig = 15; + * </pre> + * + * <code>.Image backgroundImage = 16;</code> + * @return Whether the backgroundImage field is set. + */ + public boolean hasBackgroundImage() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * <pre> + * EffectConfig enterEffectConfig = 15; + * </pre> + * + * <code>.Image backgroundImage = 16;</code> + * @return The backgroundImage. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImage() { + if (backgroundImageBuilder_ == null) { + return backgroundImage_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImage_; + } else { + return backgroundImageBuilder_.getMessage(); + } + } + /** + * <pre> + * EffectConfig enterEffectConfig = 15; + * </pre> + * + * <code>.Image backgroundImage = 16;</code> + */ + public Builder setBackgroundImage(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundImageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backgroundImage_ = value; + } else { + backgroundImageBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <pre> + * EffectConfig enterEffectConfig = 15; + * </pre> + * + * <code>.Image backgroundImage = 16;</code> + */ + public Builder setBackgroundImage( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (backgroundImageBuilder_ == null) { + backgroundImage_ = builderForValue.build(); + } else { + backgroundImageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <pre> + * EffectConfig enterEffectConfig = 15; + * </pre> + * + * <code>.Image backgroundImage = 16;</code> + */ + public Builder mergeBackgroundImage(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundImageBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) && + backgroundImage_ != null && + backgroundImage_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBackgroundImageBuilder().mergeFrom(value); + } else { + backgroundImage_ = value; + } + } else { + backgroundImageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <pre> + * EffectConfig enterEffectConfig = 15; + * </pre> + * + * <code>.Image backgroundImage = 16;</code> + */ + public Builder clearBackgroundImage() { + bitField0_ = (bitField0_ & ~0x00002000); + backgroundImage_ = null; + if (backgroundImageBuilder_ != null) { + backgroundImageBuilder_.dispose(); + backgroundImageBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <pre> + * EffectConfig enterEffectConfig = 15; + * </pre> + * + * <code>.Image backgroundImage = 16;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBackgroundImageBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getBackgroundImageFieldBuilder().getBuilder(); + } + /** + * <pre> + * EffectConfig enterEffectConfig = 15; + * </pre> + * + * <code>.Image backgroundImage = 16;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageOrBuilder() { + if (backgroundImageBuilder_ != null) { + return backgroundImageBuilder_.getMessageOrBuilder(); + } else { + return backgroundImage_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImage_; + } + } + /** + * <pre> + * EffectConfig enterEffectConfig = 15; + * </pre> + * + * <code>.Image backgroundImage = 16;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBackgroundImageFieldBuilder() { + if (backgroundImageBuilder_ == null) { + backgroundImageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBackgroundImage(), + getParentForChildren(), + isClean()); + backgroundImage_ = null; + } + return backgroundImageBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image backgroundImageV2_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> backgroundImageV2Builder_; + /** + * <code>.Image backgroundImageV2 = 17;</code> + * @return Whether the backgroundImageV2 field is set. + */ + public boolean hasBackgroundImageV2() { + return ((bitField0_ & 0x00004000) != 0); + } + /** + * <code>.Image backgroundImageV2 = 17;</code> + * @return The backgroundImageV2. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImageV2() { + if (backgroundImageV2Builder_ == null) { + return backgroundImageV2_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImageV2_; + } else { + return backgroundImageV2Builder_.getMessage(); + } + } + /** + * <code>.Image backgroundImageV2 = 17;</code> + */ + public Builder setBackgroundImageV2(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundImageV2Builder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backgroundImageV2_ = value; + } else { + backgroundImageV2Builder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <code>.Image backgroundImageV2 = 17;</code> + */ + public Builder setBackgroundImageV2( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (backgroundImageV2Builder_ == null) { + backgroundImageV2_ = builderForValue.build(); + } else { + backgroundImageV2Builder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <code>.Image backgroundImageV2 = 17;</code> + */ + public Builder mergeBackgroundImageV2(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundImageV2Builder_ == null) { + if (((bitField0_ & 0x00004000) != 0) && + backgroundImageV2_ != null && + backgroundImageV2_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBackgroundImageV2Builder().mergeFrom(value); + } else { + backgroundImageV2_ = value; + } + } else { + backgroundImageV2Builder_.mergeFrom(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <code>.Image backgroundImageV2 = 17;</code> + */ + public Builder clearBackgroundImageV2() { + bitField0_ = (bitField0_ & ~0x00004000); + backgroundImageV2_ = null; + if (backgroundImageV2Builder_ != null) { + backgroundImageV2Builder_.dispose(); + backgroundImageV2Builder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image backgroundImageV2 = 17;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBackgroundImageV2Builder() { + bitField0_ |= 0x00004000; + onChanged(); + return getBackgroundImageV2FieldBuilder().getBuilder(); + } + /** + * <code>.Image backgroundImageV2 = 17;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageV2OrBuilder() { + if (backgroundImageV2Builder_ != null) { + return backgroundImageV2Builder_.getMessageOrBuilder(); + } else { + return backgroundImageV2_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundImageV2_; + } + } + /** + * <code>.Image backgroundImageV2 = 17;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBackgroundImageV2FieldBuilder() { + if (backgroundImageV2Builder_ == null) { + backgroundImageV2Builder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBackgroundImageV2(), + getParentForChildren(), + isClean()); + backgroundImageV2_ = null; + } + return backgroundImageV2Builder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text anchorDisplayText_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder> anchorDisplayTextBuilder_; + /** + * <code>.Text anchorDisplayText = 18;</code> + * @return Whether the anchorDisplayText field is set. + */ + public boolean hasAnchorDisplayText() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * <code>.Text anchorDisplayText = 18;</code> + * @return The anchorDisplayText. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text getAnchorDisplayText() { + if (anchorDisplayTextBuilder_ == null) { + return anchorDisplayText_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : anchorDisplayText_; + } else { + return anchorDisplayTextBuilder_.getMessage(); + } + } + /** + * <code>.Text anchorDisplayText = 18;</code> + */ + public Builder setAnchorDisplayText(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text value) { + if (anchorDisplayTextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + anchorDisplayText_ = value; + } else { + anchorDisplayTextBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>.Text anchorDisplayText = 18;</code> + */ + public Builder setAnchorDisplayText( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder builderForValue) { + if (anchorDisplayTextBuilder_ == null) { + anchorDisplayText_ = builderForValue.build(); + } else { + anchorDisplayTextBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>.Text anchorDisplayText = 18;</code> + */ + public Builder mergeAnchorDisplayText(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text value) { + if (anchorDisplayTextBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) && + anchorDisplayText_ != null && + anchorDisplayText_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance()) { + getAnchorDisplayTextBuilder().mergeFrom(value); + } else { + anchorDisplayText_ = value; + } + } else { + anchorDisplayTextBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>.Text anchorDisplayText = 18;</code> + */ + public Builder clearAnchorDisplayText() { + bitField0_ = (bitField0_ & ~0x00008000); + anchorDisplayText_ = null; + if (anchorDisplayTextBuilder_ != null) { + anchorDisplayTextBuilder_.dispose(); + anchorDisplayTextBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Text anchorDisplayText = 18;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder getAnchorDisplayTextBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getAnchorDisplayTextFieldBuilder().getBuilder(); + } + /** + * <code>.Text anchorDisplayText = 18;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getAnchorDisplayTextOrBuilder() { + if (anchorDisplayTextBuilder_ != null) { + return anchorDisplayTextBuilder_.getMessageOrBuilder(); + } else { + return anchorDisplayText_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : anchorDisplayText_; + } + } + /** + * <code>.Text anchorDisplayText = 18;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder> + getAnchorDisplayTextFieldBuilder() { + if (anchorDisplayTextBuilder_ == null) { + anchorDisplayTextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder>( + getAnchorDisplayText(), + getParentForChildren(), + isClean()); + anchorDisplayText_ = null; + } + return anchorDisplayTextBuilder_; + } + + private long userEnterTipType_ ; + /** + * <pre> + * PublicAreaCommon publicAreaCommon = 19; + * </pre> + * + * <code>int64 userEnterTipType = 20;</code> + * @return The userEnterTipType. + */ + @java.lang.Override + public long getUserEnterTipType() { + return userEnterTipType_; + } + /** + * <pre> + * PublicAreaCommon publicAreaCommon = 19; + * </pre> + * + * <code>int64 userEnterTipType = 20;</code> + * @param value The userEnterTipType to set. + * @return This builder for chaining. + */ + public Builder setUserEnterTipType(long value) { + + userEnterTipType_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * <pre> + * PublicAreaCommon publicAreaCommon = 19; + * </pre> + * + * <code>int64 userEnterTipType = 20;</code> + * @return This builder for chaining. + */ + public Builder clearUserEnterTipType() { + bitField0_ = (bitField0_ & ~0x00010000); + userEnterTipType_ = 0L; + onChanged(); + return this; + } + + private long anchorEnterTipType_ ; + /** + * <code>int64 anchorEnterTipType = 21;</code> + * @return The anchorEnterTipType. + */ + @java.lang.Override + public long getAnchorEnterTipType() { + return anchorEnterTipType_; + } + /** + * <code>int64 anchorEnterTipType = 21;</code> + * @param value The anchorEnterTipType to set. + * @return This builder for chaining. + */ + public Builder setAnchorEnterTipType(long value) { + + anchorEnterTipType_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * <code>int64 anchorEnterTipType = 21;</code> + * @return This builder for chaining. + */ + public Builder clearAnchorEnterTipType() { + bitField0_ = (bitField0_ & ~0x00020000); + anchorEnterTipType_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> buriedPointMap_; + private com.google.protobuf.MapField<java.lang.String, java.lang.String> + internalGetBuriedPointMap() { + if (buriedPointMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + BuriedPointMapDefaultEntryHolder.defaultEntry); + } + return buriedPointMap_; + } + private com.google.protobuf.MapField<java.lang.String, java.lang.String> + internalGetMutableBuriedPointMap() { + if (buriedPointMap_ == null) { + buriedPointMap_ = com.google.protobuf.MapField.newMapField( + BuriedPointMapDefaultEntryHolder.defaultEntry); + } + if (!buriedPointMap_.isMutable()) { + buriedPointMap_ = buriedPointMap_.copy(); + } + bitField0_ |= 0x00040000; + onChanged(); + return buriedPointMap_; + } + public int getBuriedPointMapCount() { + return internalGetBuriedPointMap().getMap().size(); + } + /** + * <code>map<string, string> buriedPointMap = 22;</code> + */ + @java.lang.Override + public boolean containsBuriedPointMap( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetBuriedPointMap().getMap().containsKey(key); + } + /** + * Use {@link #getBuriedPointMapMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map<java.lang.String, java.lang.String> getBuriedPointMap() { + return getBuriedPointMapMap(); + } + /** + * <code>map<string, string> buriedPointMap = 22;</code> + */ + @java.lang.Override + public java.util.Map<java.lang.String, java.lang.String> getBuriedPointMapMap() { + return internalGetBuriedPointMap().getMap(); + } + /** + * <code>map<string, string> buriedPointMap = 22;</code> + */ + @java.lang.Override + public /* nullable */ +java.lang.String getBuriedPointMapOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map<java.lang.String, java.lang.String> map = + internalGetBuriedPointMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * <code>map<string, string> buriedPointMap = 22;</code> + */ + @java.lang.Override + public java.lang.String getBuriedPointMapOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map<java.lang.String, java.lang.String> map = + internalGetBuriedPointMap().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearBuriedPointMap() { + bitField0_ = (bitField0_ & ~0x00040000); + internalGetMutableBuriedPointMap().getMutableMap() + .clear(); + return this; + } + /** + * <code>map<string, string> buriedPointMap = 22;</code> + */ + public Builder removeBuriedPointMap( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableBuriedPointMap().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map<java.lang.String, java.lang.String> + getMutableBuriedPointMap() { + bitField0_ |= 0x00040000; + return internalGetMutableBuriedPointMap().getMutableMap(); + } + /** + * <code>map<string, string> buriedPointMap = 22;</code> + */ + public Builder putBuriedPointMap( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableBuriedPointMap().getMutableMap() + .put(key, value); + bitField0_ |= 0x00040000; + return this; + } + /** + * <code>map<string, string> buriedPointMap = 22;</code> + */ + public Builder putAllBuriedPointMap( + java.util.Map<java.lang.String, java.lang.String> values) { + internalGetMutableBuriedPointMap().getMutableMap() + .putAll(values); + bitField0_ |= 0x00040000; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<douyin_webcast_member_message_msg> + PARSER = new com.google.protobuf.AbstractParser<douyin_webcast_member_message_msg>() { + @java.lang.Override + public douyin_webcast_member_message_msg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<douyin_webcast_member_message_msg> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<douyin_webcast_member_message_msg> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_member_message_msgOrBuilder.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_member_message_msgOrBuilder.java new file mode 100644 index 0000000..52d111b --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_webcast_member_message_msgOrBuilder.java @@ -0,0 +1,265 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_webcast_member_message_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +public interface douyin_webcast_member_message_msgOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_webcast_member_message_msg) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.Common common = 1;</code> + * @return Whether the common field is set. + */ + boolean hasCommon(); + /** + * <code>.Common common = 1;</code> + * @return The common. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getCommon(); + /** + * <code>.Common common = 1;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder getCommonOrBuilder(); + + /** + * <code>.User user = 2;</code> + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * <code>.User user = 2;</code> + * @return The user. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser(); + /** + * <code>.User user = 2;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder(); + + /** + * <code>uint64 memberCount = 3;</code> + * @return The memberCount. + */ + long getMemberCount(); + + /** + * <code>.User operator = 4;</code> + * @return Whether the operator field is set. + */ + boolean hasOperator(); + /** + * <code>.User operator = 4;</code> + * @return The operator. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getOperator(); + /** + * <code>.User operator = 4;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getOperatorOrBuilder(); + + /** + * <code>bool isSetToAdmin = 5;</code> + * @return The isSetToAdmin. + */ + boolean getIsSetToAdmin(); + + /** + * <code>bool isTopUser = 6;</code> + * @return The isTopUser. + */ + boolean getIsTopUser(); + + /** + * <code>int64 rankScore = 7;</code> + * @return The rankScore. + */ + long getRankScore(); + + /** + * <code>int64 topUserNo = 8;</code> + * @return The topUserNo. + */ + long getTopUserNo(); + + /** + * <code>int64 enterType = 9;</code> + * @return The enterType. + */ + long getEnterType(); + + /** + * <code>int64 action = 10;</code> + * @return The action. + */ + long getAction(); + + /** + * <code>string actionDescription = 11;</code> + * @return The actionDescription. + */ + java.lang.String getActionDescription(); + /** + * <code>string actionDescription = 11;</code> + * @return The bytes for actionDescription. + */ + com.google.protobuf.ByteString + getActionDescriptionBytes(); + + /** + * <code>int64 userId = 12;</code> + * @return The userId. + */ + long getUserId(); + + /** + * <pre> + * EffectConfig effectConfig = 13; + * </pre> + * + * <code>string popStr = 14;</code> + * @return The popStr. + */ + java.lang.String getPopStr(); + /** + * <pre> + * EffectConfig effectConfig = 13; + * </pre> + * + * <code>string popStr = 14;</code> + * @return The bytes for popStr. + */ + com.google.protobuf.ByteString + getPopStrBytes(); + + /** + * <pre> + * EffectConfig enterEffectConfig = 15; + * </pre> + * + * <code>.Image backgroundImage = 16;</code> + * @return Whether the backgroundImage field is set. + */ + boolean hasBackgroundImage(); + /** + * <pre> + * EffectConfig enterEffectConfig = 15; + * </pre> + * + * <code>.Image backgroundImage = 16;</code> + * @return The backgroundImage. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImage(); + /** + * <pre> + * EffectConfig enterEffectConfig = 15; + * </pre> + * + * <code>.Image backgroundImage = 16;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageOrBuilder(); + + /** + * <code>.Image backgroundImageV2 = 17;</code> + * @return Whether the backgroundImageV2 field is set. + */ + boolean hasBackgroundImageV2(); + /** + * <code>.Image backgroundImageV2 = 17;</code> + * @return The backgroundImageV2. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundImageV2(); + /** + * <code>.Image backgroundImageV2 = 17;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundImageV2OrBuilder(); + + /** + * <code>.Text anchorDisplayText = 18;</code> + * @return Whether the anchorDisplayText field is set. + */ + boolean hasAnchorDisplayText(); + /** + * <code>.Text anchorDisplayText = 18;</code> + * @return The anchorDisplayText. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text getAnchorDisplayText(); + /** + * <code>.Text anchorDisplayText = 18;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getAnchorDisplayTextOrBuilder(); + + /** + * <pre> + * PublicAreaCommon publicAreaCommon = 19; + * </pre> + * + * <code>int64 userEnterTipType = 20;</code> + * @return The userEnterTipType. + */ + long getUserEnterTipType(); + + /** + * <code>int64 anchorEnterTipType = 21;</code> + * @return The anchorEnterTipType. + */ + long getAnchorEnterTipType(); + + /** + * <code>map<string, string> buriedPointMap = 22;</code> + */ + int getBuriedPointMapCount(); + /** + * <code>map<string, string> buriedPointMap = 22;</code> + */ + boolean containsBuriedPointMap( + java.lang.String key); + /** + * Use {@link #getBuriedPointMapMap()} instead. + */ + @java.lang.Deprecated + java.util.Map<java.lang.String, java.lang.String> + getBuriedPointMap(); + /** + * <code>map<string, string> buriedPointMap = 22;</code> + */ + java.util.Map<java.lang.String, java.lang.String> + getBuriedPointMapMap(); + /** + * <code>map<string, string> buriedPointMap = 22;</code> + */ + /* nullable */ +java.lang.String getBuriedPointMapOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * <code>map<string, string> buriedPointMap = 22;</code> + */ + java.lang.String getBuriedPointMapOrThrow( + java.lang.String key); +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frame.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frame.java new file mode 100644 index 0000000..8caffe8 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frame.java @@ -0,0 +1,1315 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_websocket_frame.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +/** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame} + */ +public final class douyin_websocket_frame extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame) + douyin_websocket_frameOrBuilder { +private static final long serialVersionUID = 0L; + // Use douyin_websocket_frame.newBuilder() to construct. + private douyin_websocket_frame(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private douyin_websocket_frame() { + payloadEncoding_ = ""; + payloadType_ = ""; + payload_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new douyin_websocket_frame(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_websocket_frameProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 5: + return internalGetHeadersList(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_websocket_frameProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame.Builder.class); + } + + public static final int SEQ_ID_FIELD_NUMBER = 1; + private long seqId_ = 0L; + /** + * <code>uint64 seq_id = 1;</code> + * @return The seqId. + */ + @java.lang.Override + public long getSeqId() { + return seqId_; + } + + public static final int LOG_ID_FIELD_NUMBER = 2; + private long logId_ = 0L; + /** + * <code>uint64 log_id = 2;</code> + * @return The logId. + */ + @java.lang.Override + public long getLogId() { + return logId_; + } + + public static final int SERVICE_FIELD_NUMBER = 3; + private long service_ = 0L; + /** + * <code>uint64 service = 3;</code> + * @return The service. + */ + @java.lang.Override + public long getService() { + return service_; + } + + public static final int METHOD_FIELD_NUMBER = 4; + private long method_ = 0L; + /** + * <code>uint64 method = 4;</code> + * @return The method. + */ + @java.lang.Override + public long getMethod() { + return method_; + } + + public static final int HEADERS_LIST_FIELD_NUMBER = 5; + private static final class HeadersListDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .<java.lang.String, java.lang.String>newDefaultInstance( + tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_websocket_frameProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_HeadersListEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> headersList_; + private com.google.protobuf.MapField<java.lang.String, java.lang.String> + internalGetHeadersList() { + if (headersList_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeadersListDefaultEntryHolder.defaultEntry); + } + return headersList_; + } + public int getHeadersListCount() { + return internalGetHeadersList().getMap().size(); + } + /** + * <code>map<string, string> headers_list = 5;</code> + */ + @java.lang.Override + public boolean containsHeadersList( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetHeadersList().getMap().containsKey(key); + } + /** + * Use {@link #getHeadersListMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map<java.lang.String, java.lang.String> getHeadersList() { + return getHeadersListMap(); + } + /** + * <code>map<string, string> headers_list = 5;</code> + */ + @java.lang.Override + public java.util.Map<java.lang.String, java.lang.String> getHeadersListMap() { + return internalGetHeadersList().getMap(); + } + /** + * <code>map<string, string> headers_list = 5;</code> + */ + @java.lang.Override + public /* nullable */ +java.lang.String getHeadersListOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map<java.lang.String, java.lang.String> map = + internalGetHeadersList().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * <code>map<string, string> headers_list = 5;</code> + */ + @java.lang.Override + public java.lang.String getHeadersListOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map<java.lang.String, java.lang.String> map = + internalGetHeadersList().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PAYLOAD_ENCODING_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object payloadEncoding_ = ""; + /** + * <code>string payload_encoding = 6;</code> + * @return The payloadEncoding. + */ + @java.lang.Override + public java.lang.String getPayloadEncoding() { + java.lang.Object ref = payloadEncoding_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payloadEncoding_ = s; + return s; + } + } + /** + * <code>string payload_encoding = 6;</code> + * @return The bytes for payloadEncoding. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPayloadEncodingBytes() { + java.lang.Object ref = payloadEncoding_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + payloadEncoding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAYLOAD_TYPE_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object payloadType_ = ""; + /** + * <code>string payload_type = 7;</code> + * @return The payloadType. + */ + @java.lang.Override + public java.lang.String getPayloadType() { + java.lang.Object ref = payloadType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payloadType_ = s; + return s; + } + } + /** + * <code>string payload_type = 7;</code> + * @return The bytes for payloadType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPayloadTypeBytes() { + java.lang.Object ref = payloadType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + payloadType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAYLOAD_FIELD_NUMBER = 8; + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * <code>bytes payload = 8;</code> + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (seqId_ != 0L) { + output.writeUInt64(1, seqId_); + } + if (logId_ != 0L) { + output.writeUInt64(2, logId_); + } + if (service_ != 0L) { + output.writeUInt64(3, service_); + } + if (method_ != 0L) { + output.writeUInt64(4, method_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetHeadersList(), + HeadersListDefaultEntryHolder.defaultEntry, + 5); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadEncoding_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, payloadEncoding_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, payloadType_); + } + if (!payload_.isEmpty()) { + output.writeBytes(8, payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (seqId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, seqId_); + } + if (logId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, logId_); + } + if (service_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, service_); + } + if (method_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, method_); + } + for (java.util.Map.Entry<java.lang.String, java.lang.String> entry + : internalGetHeadersList().getMap().entrySet()) { + com.google.protobuf.MapEntry<java.lang.String, java.lang.String> + headersList__ = HeadersListDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, headersList__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadEncoding_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, payloadEncoding_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadType_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, payloadType_); + } + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(8, payload_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame) obj; + + if (getSeqId() + != other.getSeqId()) return false; + if (getLogId() + != other.getLogId()) return false; + if (getService() + != other.getService()) return false; + if (getMethod() + != other.getMethod()) return false; + if (!internalGetHeadersList().equals( + other.internalGetHeadersList())) return false; + if (!getPayloadEncoding() + .equals(other.getPayloadEncoding())) return false; + if (!getPayloadType() + .equals(other.getPayloadType())) return false; + if (!getPayload() + .equals(other.getPayload())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SEQ_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSeqId()); + hash = (37 * hash) + LOG_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLogId()); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getService()); + hash = (37 * hash) + METHOD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMethod()); + if (!internalGetHeadersList().getMap().isEmpty()) { + hash = (37 * hash) + HEADERS_LIST_FIELD_NUMBER; + hash = (53 * hash) + internalGetHeadersList().hashCode(); + } + hash = (37 * hash) + PAYLOAD_ENCODING_FIELD_NUMBER; + hash = (53 * hash) + getPayloadEncoding().hashCode(); + hash = (37 * hash) + PAYLOAD_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getPayloadType().hashCode(); + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame) + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frameOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_websocket_frameProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 5: + return internalGetHeadersList(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 5: + return internalGetMutableHeadersList(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_websocket_frameProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + seqId_ = 0L; + logId_ = 0L; + service_ = 0L; + method_ = 0L; + internalGetMutableHeadersList().clear(); + payloadEncoding_ = ""; + payloadType_ = ""; + payload_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_websocket_frameProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.seqId_ = seqId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.logId_ = logId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.method_ = method_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.headersList_ = internalGetHeadersList(); + result.headersList_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.payloadEncoding_ = payloadEncoding_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.payloadType_ = payloadType_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.payload_ = payload_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame.getDefaultInstance()) return this; + if (other.getSeqId() != 0L) { + setSeqId(other.getSeqId()); + } + if (other.getLogId() != 0L) { + setLogId(other.getLogId()); + } + if (other.getService() != 0L) { + setService(other.getService()); + } + if (other.getMethod() != 0L) { + setMethod(other.getMethod()); + } + internalGetMutableHeadersList().mergeFrom( + other.internalGetHeadersList()); + bitField0_ |= 0x00000010; + if (!other.getPayloadEncoding().isEmpty()) { + payloadEncoding_ = other.payloadEncoding_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getPayloadType().isEmpty()) { + payloadType_ = other.payloadType_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { + setPayload(other.getPayload()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + seqId_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + logId_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + service_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + method_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + com.google.protobuf.MapEntry<java.lang.String, java.lang.String> + headersList__ = input.readMessage( + HeadersListDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableHeadersList().getMutableMap().put( + headersList__.getKey(), headersList__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + payloadEncoding_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + payloadType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + payload_ = input.readBytes(); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long seqId_ ; + /** + * <code>uint64 seq_id = 1;</code> + * @return The seqId. + */ + @java.lang.Override + public long getSeqId() { + return seqId_; + } + /** + * <code>uint64 seq_id = 1;</code> + * @param value The seqId to set. + * @return This builder for chaining. + */ + public Builder setSeqId(long value) { + + seqId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 seq_id = 1;</code> + * @return This builder for chaining. + */ + public Builder clearSeqId() { + bitField0_ = (bitField0_ & ~0x00000001); + seqId_ = 0L; + onChanged(); + return this; + } + + private long logId_ ; + /** + * <code>uint64 log_id = 2;</code> + * @return The logId. + */ + @java.lang.Override + public long getLogId() { + return logId_; + } + /** + * <code>uint64 log_id = 2;</code> + * @param value The logId to set. + * @return This builder for chaining. + */ + public Builder setLogId(long value) { + + logId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>uint64 log_id = 2;</code> + * @return This builder for chaining. + */ + public Builder clearLogId() { + bitField0_ = (bitField0_ & ~0x00000002); + logId_ = 0L; + onChanged(); + return this; + } + + private long service_ ; + /** + * <code>uint64 service = 3;</code> + * @return The service. + */ + @java.lang.Override + public long getService() { + return service_; + } + /** + * <code>uint64 service = 3;</code> + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService(long value) { + + service_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 service = 3;</code> + * @return This builder for chaining. + */ + public Builder clearService() { + bitField0_ = (bitField0_ & ~0x00000004); + service_ = 0L; + onChanged(); + return this; + } + + private long method_ ; + /** + * <code>uint64 method = 4;</code> + * @return The method. + */ + @java.lang.Override + public long getMethod() { + return method_; + } + /** + * <code>uint64 method = 4;</code> + * @param value The method to set. + * @return This builder for chaining. + */ + public Builder setMethod(long value) { + + method_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint64 method = 4;</code> + * @return This builder for chaining. + */ + public Builder clearMethod() { + bitField0_ = (bitField0_ & ~0x00000008); + method_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> headersList_; + private com.google.protobuf.MapField<java.lang.String, java.lang.String> + internalGetHeadersList() { + if (headersList_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeadersListDefaultEntryHolder.defaultEntry); + } + return headersList_; + } + private com.google.protobuf.MapField<java.lang.String, java.lang.String> + internalGetMutableHeadersList() { + if (headersList_ == null) { + headersList_ = com.google.protobuf.MapField.newMapField( + HeadersListDefaultEntryHolder.defaultEntry); + } + if (!headersList_.isMutable()) { + headersList_ = headersList_.copy(); + } + bitField0_ |= 0x00000010; + onChanged(); + return headersList_; + } + public int getHeadersListCount() { + return internalGetHeadersList().getMap().size(); + } + /** + * <code>map<string, string> headers_list = 5;</code> + */ + @java.lang.Override + public boolean containsHeadersList( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetHeadersList().getMap().containsKey(key); + } + /** + * Use {@link #getHeadersListMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map<java.lang.String, java.lang.String> getHeadersList() { + return getHeadersListMap(); + } + /** + * <code>map<string, string> headers_list = 5;</code> + */ + @java.lang.Override + public java.util.Map<java.lang.String, java.lang.String> getHeadersListMap() { + return internalGetHeadersList().getMap(); + } + /** + * <code>map<string, string> headers_list = 5;</code> + */ + @java.lang.Override + public /* nullable */ +java.lang.String getHeadersListOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map<java.lang.String, java.lang.String> map = + internalGetHeadersList().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * <code>map<string, string> headers_list = 5;</code> + */ + @java.lang.Override + public java.lang.String getHeadersListOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map<java.lang.String, java.lang.String> map = + internalGetHeadersList().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearHeadersList() { + bitField0_ = (bitField0_ & ~0x00000010); + internalGetMutableHeadersList().getMutableMap() + .clear(); + return this; + } + /** + * <code>map<string, string> headers_list = 5;</code> + */ + public Builder removeHeadersList( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableHeadersList().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map<java.lang.String, java.lang.String> + getMutableHeadersList() { + bitField0_ |= 0x00000010; + return internalGetMutableHeadersList().getMutableMap(); + } + /** + * <code>map<string, string> headers_list = 5;</code> + */ + public Builder putHeadersList( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableHeadersList().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000010; + return this; + } + /** + * <code>map<string, string> headers_list = 5;</code> + */ + public Builder putAllHeadersList( + java.util.Map<java.lang.String, java.lang.String> values) { + internalGetMutableHeadersList().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000010; + return this; + } + + private java.lang.Object payloadEncoding_ = ""; + /** + * <code>string payload_encoding = 6;</code> + * @return The payloadEncoding. + */ + public java.lang.String getPayloadEncoding() { + java.lang.Object ref = payloadEncoding_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payloadEncoding_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string payload_encoding = 6;</code> + * @return The bytes for payloadEncoding. + */ + public com.google.protobuf.ByteString + getPayloadEncodingBytes() { + java.lang.Object ref = payloadEncoding_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + payloadEncoding_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string payload_encoding = 6;</code> + * @param value The payloadEncoding to set. + * @return This builder for chaining. + */ + public Builder setPayloadEncoding( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + payloadEncoding_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>string payload_encoding = 6;</code> + * @return This builder for chaining. + */ + public Builder clearPayloadEncoding() { + payloadEncoding_ = getDefaultInstance().getPayloadEncoding(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * <code>string payload_encoding = 6;</code> + * @param value The bytes for payloadEncoding to set. + * @return This builder for chaining. + */ + public Builder setPayloadEncodingBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + payloadEncoding_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object payloadType_ = ""; + /** + * <code>string payload_type = 7;</code> + * @return The payloadType. + */ + public java.lang.String getPayloadType() { + java.lang.Object ref = payloadType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + payloadType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string payload_type = 7;</code> + * @return The bytes for payloadType. + */ + public com.google.protobuf.ByteString + getPayloadTypeBytes() { + java.lang.Object ref = payloadType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + payloadType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string payload_type = 7;</code> + * @param value The payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + payloadType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>string payload_type = 7;</code> + * @return This builder for chaining. + */ + public Builder clearPayloadType() { + payloadType_ = getDefaultInstance().getPayloadType(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * <code>string payload_type = 7;</code> + * @param value The bytes for payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + payloadType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * <code>bytes payload = 8;</code> + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + /** + * <code>bytes payload = 8;</code> + * @param value The payload to set. + * @return This builder for chaining. + */ + public Builder setPayload(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + payload_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>bytes payload = 8;</code> + * @return This builder for chaining. + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000080); + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<douyin_websocket_frame> + PARSER = new com.google.protobuf.AbstractParser<douyin_websocket_frame>() { + @java.lang.Override + public douyin_websocket_frame parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<douyin_websocket_frame> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<douyin_websocket_frame> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frameOrBuilder.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frameOrBuilder.java new file mode 100644 index 0000000..9bf36f7 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frameOrBuilder.java @@ -0,0 +1,121 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_websocket_frame.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +public interface douyin_websocket_frameOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 seq_id = 1;</code> + * @return The seqId. + */ + long getSeqId(); + + /** + * <code>uint64 log_id = 2;</code> + * @return The logId. + */ + long getLogId(); + + /** + * <code>uint64 service = 3;</code> + * @return The service. + */ + long getService(); + + /** + * <code>uint64 method = 4;</code> + * @return The method. + */ + long getMethod(); + + /** + * <code>map<string, string> headers_list = 5;</code> + */ + int getHeadersListCount(); + /** + * <code>map<string, string> headers_list = 5;</code> + */ + boolean containsHeadersList( + java.lang.String key); + /** + * Use {@link #getHeadersListMap()} instead. + */ + @java.lang.Deprecated + java.util.Map<java.lang.String, java.lang.String> + getHeadersList(); + /** + * <code>map<string, string> headers_list = 5;</code> + */ + java.util.Map<java.lang.String, java.lang.String> + getHeadersListMap(); + /** + * <code>map<string, string> headers_list = 5;</code> + */ + /* nullable */ +java.lang.String getHeadersListOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * <code>map<string, string> headers_list = 5;</code> + */ + java.lang.String getHeadersListOrThrow( + java.lang.String key); + + /** + * <code>string payload_encoding = 6;</code> + * @return The payloadEncoding. + */ + java.lang.String getPayloadEncoding(); + /** + * <code>string payload_encoding = 6;</code> + * @return The bytes for payloadEncoding. + */ + com.google.protobuf.ByteString + getPayloadEncodingBytes(); + + /** + * <code>string payload_type = 7;</code> + * @return The payloadType. + */ + java.lang.String getPayloadType(); + /** + * <code>string payload_type = 7;</code> + * @return The bytes for payloadType. + */ + com.google.protobuf.ByteString + getPayloadTypeBytes(); + + /** + * <code>bytes payload = 8;</code> + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frame_msg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frame_msg.java new file mode 100644 index 0000000..5037b9f --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frame_msg.java @@ -0,0 +1,2007 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_websocket_frame_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +/** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg} + */ +public final class douyin_websocket_frame_msg extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg) + douyin_websocket_frame_msgOrBuilder { +private static final long serialVersionUID = 0L; + // Use douyin_websocket_frame_msg.newBuilder() to construct. + private douyin_websocket_frame_msg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private douyin_websocket_frame_msg() { + messagesList_ = java.util.Collections.emptyList(); + cursor_ = ""; + internalExt_ = ""; + pushServer_ = ""; + liveCursor_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new douyin_websocket_frame_msg(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 7: + return internalGetRouteParams(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg.Builder.class); + } + + public static final int MESSAGES_LIST_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg> messagesList_; + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg> getMessagesListList() { + return messagesList_; + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msgOrBuilder> + getMessagesListOrBuilderList() { + return messagesList_; + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + @java.lang.Override + public int getMessagesListCount() { + return messagesList_.size(); + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg getMessagesList(int index) { + return messagesList_.get(index); + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msgOrBuilder getMessagesListOrBuilder( + int index) { + return messagesList_.get(index); + } + + public static final int CURSOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object cursor_ = ""; + /** + * <code>string cursor = 2;</code> + * @return The cursor. + */ + @java.lang.Override + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } + } + /** + * <code>string cursor = 2;</code> + * @return The bytes for cursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FETCH_INTERVAL_FIELD_NUMBER = 3; + private long fetchInterval_ = 0L; + /** + * <code>uint64 fetch_interval = 3;</code> + * @return The fetchInterval. + */ + @java.lang.Override + public long getFetchInterval() { + return fetchInterval_; + } + + public static final int NOW_FIELD_NUMBER = 4; + private long now_ = 0L; + /** + * <code>uint64 now = 4;</code> + * @return The now. + */ + @java.lang.Override + public long getNow() { + return now_; + } + + public static final int INTERNAL_EXT_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object internalExt_ = ""; + /** + * <code>string internal_ext = 5;</code> + * @return The internalExt. + */ + @java.lang.Override + public java.lang.String getInternalExt() { + java.lang.Object ref = internalExt_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internalExt_ = s; + return s; + } + } + /** + * <code>string internal_ext = 5;</code> + * @return The bytes for internalExt. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInternalExtBytes() { + java.lang.Object ref = internalExt_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + internalExt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FETCH_TYPE_FIELD_NUMBER = 6; + private int fetchType_ = 0; + /** + * <code>uint32 fetch_type = 6;</code> + * @return The fetchType. + */ + @java.lang.Override + public int getFetchType() { + return fetchType_; + } + + public static final int ROUTE_PARAMS_FIELD_NUMBER = 7; + private static final class RouteParamsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .<java.lang.String, java.lang.String>newDefaultInstance( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_RouteParamsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> routeParams_; + private com.google.protobuf.MapField<java.lang.String, java.lang.String> + internalGetRouteParams() { + if (routeParams_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RouteParamsDefaultEntryHolder.defaultEntry); + } + return routeParams_; + } + public int getRouteParamsCount() { + return internalGetRouteParams().getMap().size(); + } + /** + * <code>map<string, string> route_params = 7;</code> + */ + @java.lang.Override + public boolean containsRouteParams( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetRouteParams().getMap().containsKey(key); + } + /** + * Use {@link #getRouteParamsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map<java.lang.String, java.lang.String> getRouteParams() { + return getRouteParamsMap(); + } + /** + * <code>map<string, string> route_params = 7;</code> + */ + @java.lang.Override + public java.util.Map<java.lang.String, java.lang.String> getRouteParamsMap() { + return internalGetRouteParams().getMap(); + } + /** + * <code>map<string, string> route_params = 7;</code> + */ + @java.lang.Override + public /* nullable */ +java.lang.String getRouteParamsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map<java.lang.String, java.lang.String> map = + internalGetRouteParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * <code>map<string, string> route_params = 7;</code> + */ + @java.lang.Override + public java.lang.String getRouteParamsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map<java.lang.String, java.lang.String> map = + internalGetRouteParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int HEARTBEAT_DURATION_FIELD_NUMBER = 8; + private long heartbeatDuration_ = 0L; + /** + * <code>uint64 heartbeat_duration = 8;</code> + * @return The heartbeatDuration. + */ + @java.lang.Override + public long getHeartbeatDuration() { + return heartbeatDuration_; + } + + public static final int NEED_ACK_FIELD_NUMBER = 9; + private boolean needAck_ = false; + /** + * <code>bool need_ack = 9;</code> + * @return The needAck. + */ + @java.lang.Override + public boolean getNeedAck() { + return needAck_; + } + + public static final int PUSH_SERVER_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private volatile java.lang.Object pushServer_ = ""; + /** + * <code>string push_server = 10;</code> + * @return The pushServer. + */ + @java.lang.Override + public java.lang.String getPushServer() { + java.lang.Object ref = pushServer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushServer_ = s; + return s; + } + } + /** + * <code>string push_server = 10;</code> + * @return The bytes for pushServer. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPushServerBytes() { + java.lang.Object ref = pushServer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushServer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LIVE_CURSOR_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private volatile java.lang.Object liveCursor_ = ""; + /** + * <code>string live_cursor = 11;</code> + * @return The liveCursor. + */ + @java.lang.Override + public java.lang.String getLiveCursor() { + java.lang.Object ref = liveCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + liveCursor_ = s; + return s; + } + } + /** + * <code>string live_cursor = 11;</code> + * @return The bytes for liveCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLiveCursorBytes() { + java.lang.Object ref = liveCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + liveCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HISTORY_NO_MORE_FIELD_NUMBER = 12; + private boolean historyNoMore_ = false; + /** + * <code>bool history_no_more = 12;</code> + * @return The historyNoMore. + */ + @java.lang.Override + public boolean getHistoryNoMore() { + return historyNoMore_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < messagesList_.size(); i++) { + output.writeMessage(1, messagesList_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cursor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cursor_); + } + if (fetchInterval_ != 0L) { + output.writeUInt64(3, fetchInterval_); + } + if (now_ != 0L) { + output.writeUInt64(4, now_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(internalExt_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, internalExt_); + } + if (fetchType_ != 0) { + output.writeUInt32(6, fetchType_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetRouteParams(), + RouteParamsDefaultEntryHolder.defaultEntry, + 7); + if (heartbeatDuration_ != 0L) { + output.writeUInt64(8, heartbeatDuration_); + } + if (needAck_ != false) { + output.writeBool(9, needAck_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pushServer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, pushServer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(liveCursor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, liveCursor_); + } + if (historyNoMore_ != false) { + output.writeBool(12, historyNoMore_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < messagesList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, messagesList_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cursor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cursor_); + } + if (fetchInterval_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, fetchInterval_); + } + if (now_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, now_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(internalExt_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, internalExt_); + } + if (fetchType_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, fetchType_); + } + for (java.util.Map.Entry<java.lang.String, java.lang.String> entry + : internalGetRouteParams().getMap().entrySet()) { + com.google.protobuf.MapEntry<java.lang.String, java.lang.String> + routeParams__ = RouteParamsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, routeParams__); + } + if (heartbeatDuration_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(8, heartbeatDuration_); + } + if (needAck_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, needAck_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pushServer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, pushServer_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(liveCursor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, liveCursor_); + } + if (historyNoMore_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(12, historyNoMore_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg) obj; + + if (!getMessagesListList() + .equals(other.getMessagesListList())) return false; + if (!getCursor() + .equals(other.getCursor())) return false; + if (getFetchInterval() + != other.getFetchInterval()) return false; + if (getNow() + != other.getNow()) return false; + if (!getInternalExt() + .equals(other.getInternalExt())) return false; + if (getFetchType() + != other.getFetchType()) return false; + if (!internalGetRouteParams().equals( + other.internalGetRouteParams())) return false; + if (getHeartbeatDuration() + != other.getHeartbeatDuration()) return false; + if (getNeedAck() + != other.getNeedAck()) return false; + if (!getPushServer() + .equals(other.getPushServer())) return false; + if (!getLiveCursor() + .equals(other.getLiveCursor())) return false; + if (getHistoryNoMore() + != other.getHistoryNoMore()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getMessagesListCount() > 0) { + hash = (37 * hash) + MESSAGES_LIST_FIELD_NUMBER; + hash = (53 * hash) + getMessagesListList().hashCode(); + } + hash = (37 * hash) + CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCursor().hashCode(); + hash = (37 * hash) + FETCH_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFetchInterval()); + hash = (37 * hash) + NOW_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNow()); + hash = (37 * hash) + INTERNAL_EXT_FIELD_NUMBER; + hash = (53 * hash) + getInternalExt().hashCode(); + hash = (37 * hash) + FETCH_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getFetchType(); + if (!internalGetRouteParams().getMap().isEmpty()) { + hash = (37 * hash) + ROUTE_PARAMS_FIELD_NUMBER; + hash = (53 * hash) + internalGetRouteParams().hashCode(); + } + hash = (37 * hash) + HEARTBEAT_DURATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getHeartbeatDuration()); + hash = (37 * hash) + NEED_ACK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getNeedAck()); + hash = (37 * hash) + PUSH_SERVER_FIELD_NUMBER; + hash = (53 * hash) + getPushServer().hashCode(); + hash = (37 * hash) + LIVE_CURSOR_FIELD_NUMBER; + hash = (53 * hash) + getLiveCursor().hashCode(); + hash = (37 * hash) + HISTORY_NO_MORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getHistoryNoMore()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg) + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msgOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 7: + return internalGetRouteParams(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 7: + return internalGetMutableRouteParams(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (messagesListBuilder_ == null) { + messagesList_ = java.util.Collections.emptyList(); + } else { + messagesList_ = null; + messagesListBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + cursor_ = ""; + fetchInterval_ = 0L; + now_ = 0L; + internalExt_ = ""; + fetchType_ = 0; + internalGetMutableRouteParams().clear(); + heartbeatDuration_ = 0L; + needAck_ = false; + pushServer_ = ""; + liveCursor_ = ""; + historyNoMore_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msgProto.internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg result) { + if (messagesListBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + messagesList_ = java.util.Collections.unmodifiableList(messagesList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.messagesList_ = messagesList_; + } else { + result.messagesList_ = messagesListBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.cursor_ = cursor_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.fetchInterval_ = fetchInterval_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.now_ = now_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.internalExt_ = internalExt_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.fetchType_ = fetchType_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.routeParams_ = internalGetRouteParams(); + result.routeParams_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.heartbeatDuration_ = heartbeatDuration_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.needAck_ = needAck_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.pushServer_ = pushServer_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.liveCursor_ = liveCursor_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.historyNoMore_ = historyNoMore_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg.getDefaultInstance()) return this; + if (messagesListBuilder_ == null) { + if (!other.messagesList_.isEmpty()) { + if (messagesList_.isEmpty()) { + messagesList_ = other.messagesList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureMessagesListIsMutable(); + messagesList_.addAll(other.messagesList_); + } + onChanged(); + } + } else { + if (!other.messagesList_.isEmpty()) { + if (messagesListBuilder_.isEmpty()) { + messagesListBuilder_.dispose(); + messagesListBuilder_ = null; + messagesList_ = other.messagesList_; + bitField0_ = (bitField0_ & ~0x00000001); + messagesListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMessagesListFieldBuilder() : null; + } else { + messagesListBuilder_.addAllMessages(other.messagesList_); + } + } + } + if (!other.getCursor().isEmpty()) { + cursor_ = other.cursor_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getFetchInterval() != 0L) { + setFetchInterval(other.getFetchInterval()); + } + if (other.getNow() != 0L) { + setNow(other.getNow()); + } + if (!other.getInternalExt().isEmpty()) { + internalExt_ = other.internalExt_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getFetchType() != 0) { + setFetchType(other.getFetchType()); + } + internalGetMutableRouteParams().mergeFrom( + other.internalGetRouteParams()); + bitField0_ |= 0x00000040; + if (other.getHeartbeatDuration() != 0L) { + setHeartbeatDuration(other.getHeartbeatDuration()); + } + if (other.getNeedAck() != false) { + setNeedAck(other.getNeedAck()); + } + if (!other.getPushServer().isEmpty()) { + pushServer_ = other.pushServer_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (!other.getLiveCursor().isEmpty()) { + liveCursor_ = other.liveCursor_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (other.getHistoryNoMore() != false) { + setHistoryNoMore(other.getHistoryNoMore()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg m = + input.readMessage( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.parser(), + extensionRegistry); + if (messagesListBuilder_ == null) { + ensureMessagesListIsMutable(); + messagesList_.add(m); + } else { + messagesListBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + cursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + fetchInterval_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + now_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + internalExt_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + fetchType_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + com.google.protobuf.MapEntry<java.lang.String, java.lang.String> + routeParams__ = input.readMessage( + RouteParamsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableRouteParams().getMutableMap().put( + routeParams__.getKey(), routeParams__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: { + heartbeatDuration_ = input.readUInt64(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + needAck_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: { + pushServer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: { + liveCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 96: { + historyNoMore_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 96 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg> messagesList_ = + java.util.Collections.emptyList(); + private void ensureMessagesListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + messagesList_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg>(messagesList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msgOrBuilder> messagesListBuilder_; + + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg> getMessagesListList() { + if (messagesListBuilder_ == null) { + return java.util.Collections.unmodifiableList(messagesList_); + } else { + return messagesListBuilder_.getMessageList(); + } + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public int getMessagesListCount() { + if (messagesListBuilder_ == null) { + return messagesList_.size(); + } else { + return messagesListBuilder_.getCount(); + } + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg getMessagesList(int index) { + if (messagesListBuilder_ == null) { + return messagesList_.get(index); + } else { + return messagesListBuilder_.getMessage(index); + } + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public Builder setMessagesList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg value) { + if (messagesListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesListIsMutable(); + messagesList_.set(index, value); + onChanged(); + } else { + messagesListBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public Builder setMessagesList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.Builder builderForValue) { + if (messagesListBuilder_ == null) { + ensureMessagesListIsMutable(); + messagesList_.set(index, builderForValue.build()); + onChanged(); + } else { + messagesListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public Builder addMessagesList(tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg value) { + if (messagesListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesListIsMutable(); + messagesList_.add(value); + onChanged(); + } else { + messagesListBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public Builder addMessagesList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg value) { + if (messagesListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMessagesListIsMutable(); + messagesList_.add(index, value); + onChanged(); + } else { + messagesListBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public Builder addMessagesList( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.Builder builderForValue) { + if (messagesListBuilder_ == null) { + ensureMessagesListIsMutable(); + messagesList_.add(builderForValue.build()); + onChanged(); + } else { + messagesListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public Builder addMessagesList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.Builder builderForValue) { + if (messagesListBuilder_ == null) { + ensureMessagesListIsMutable(); + messagesList_.add(index, builderForValue.build()); + onChanged(); + } else { + messagesListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public Builder addAllMessagesList( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg> values) { + if (messagesListBuilder_ == null) { + ensureMessagesListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, messagesList_); + onChanged(); + } else { + messagesListBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public Builder clearMessagesList() { + if (messagesListBuilder_ == null) { + messagesList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + messagesListBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public Builder removeMessagesList(int index) { + if (messagesListBuilder_ == null) { + ensureMessagesListIsMutable(); + messagesList_.remove(index); + onChanged(); + } else { + messagesListBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.Builder getMessagesListBuilder( + int index) { + return getMessagesListFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msgOrBuilder getMessagesListOrBuilder( + int index) { + if (messagesListBuilder_ == null) { + return messagesList_.get(index); } else { + return messagesListBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msgOrBuilder> + getMessagesListOrBuilderList() { + if (messagesListBuilder_ != null) { + return messagesListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(messagesList_); + } + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.Builder addMessagesListBuilder() { + return getMessagesListFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.getDefaultInstance()); + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.Builder addMessagesListBuilder( + int index) { + return getMessagesListFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.getDefaultInstance()); + } + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.Builder> + getMessagesListBuilderList() { + return getMessagesListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msgOrBuilder> + getMessagesListFieldBuilder() { + if (messagesListBuilder_ == null) { + messagesListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msgOrBuilder>( + messagesList_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + messagesList_ = null; + } + return messagesListBuilder_; + } + + private java.lang.Object cursor_ = ""; + /** + * <code>string cursor = 2;</code> + * @return The cursor. + */ + public java.lang.String getCursor() { + java.lang.Object ref = cursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string cursor = 2;</code> + * @return The bytes for cursor. + */ + public com.google.protobuf.ByteString + getCursorBytes() { + java.lang.Object ref = cursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string cursor = 2;</code> + * @param value The cursor to set. + * @return This builder for chaining. + */ + public Builder setCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string cursor = 2;</code> + * @return This builder for chaining. + */ + public Builder clearCursor() { + cursor_ = getDefaultInstance().getCursor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string cursor = 2;</code> + * @param value The bytes for cursor to set. + * @return This builder for chaining. + */ + public Builder setCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cursor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long fetchInterval_ ; + /** + * <code>uint64 fetch_interval = 3;</code> + * @return The fetchInterval. + */ + @java.lang.Override + public long getFetchInterval() { + return fetchInterval_; + } + /** + * <code>uint64 fetch_interval = 3;</code> + * @param value The fetchInterval to set. + * @return This builder for chaining. + */ + public Builder setFetchInterval(long value) { + + fetchInterval_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 fetch_interval = 3;</code> + * @return This builder for chaining. + */ + public Builder clearFetchInterval() { + bitField0_ = (bitField0_ & ~0x00000004); + fetchInterval_ = 0L; + onChanged(); + return this; + } + + private long now_ ; + /** + * <code>uint64 now = 4;</code> + * @return The now. + */ + @java.lang.Override + public long getNow() { + return now_; + } + /** + * <code>uint64 now = 4;</code> + * @param value The now to set. + * @return This builder for chaining. + */ + public Builder setNow(long value) { + + now_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint64 now = 4;</code> + * @return This builder for chaining. + */ + public Builder clearNow() { + bitField0_ = (bitField0_ & ~0x00000008); + now_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object internalExt_ = ""; + /** + * <code>string internal_ext = 5;</code> + * @return The internalExt. + */ + public java.lang.String getInternalExt() { + java.lang.Object ref = internalExt_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + internalExt_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string internal_ext = 5;</code> + * @return The bytes for internalExt. + */ + public com.google.protobuf.ByteString + getInternalExtBytes() { + java.lang.Object ref = internalExt_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + internalExt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string internal_ext = 5;</code> + * @param value The internalExt to set. + * @return This builder for chaining. + */ + public Builder setInternalExt( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + internalExt_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>string internal_ext = 5;</code> + * @return This builder for chaining. + */ + public Builder clearInternalExt() { + internalExt_ = getDefaultInstance().getInternalExt(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * <code>string internal_ext = 5;</code> + * @param value The bytes for internalExt to set. + * @return This builder for chaining. + */ + public Builder setInternalExtBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + internalExt_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int fetchType_ ; + /** + * <code>uint32 fetch_type = 6;</code> + * @return The fetchType. + */ + @java.lang.Override + public int getFetchType() { + return fetchType_; + } + /** + * <code>uint32 fetch_type = 6;</code> + * @param value The fetchType to set. + * @return This builder for chaining. + */ + public Builder setFetchType(int value) { + + fetchType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>uint32 fetch_type = 6;</code> + * @return This builder for chaining. + */ + public Builder clearFetchType() { + bitField0_ = (bitField0_ & ~0x00000020); + fetchType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> routeParams_; + private com.google.protobuf.MapField<java.lang.String, java.lang.String> + internalGetRouteParams() { + if (routeParams_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RouteParamsDefaultEntryHolder.defaultEntry); + } + return routeParams_; + } + private com.google.protobuf.MapField<java.lang.String, java.lang.String> + internalGetMutableRouteParams() { + if (routeParams_ == null) { + routeParams_ = com.google.protobuf.MapField.newMapField( + RouteParamsDefaultEntryHolder.defaultEntry); + } + if (!routeParams_.isMutable()) { + routeParams_ = routeParams_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return routeParams_; + } + public int getRouteParamsCount() { + return internalGetRouteParams().getMap().size(); + } + /** + * <code>map<string, string> route_params = 7;</code> + */ + @java.lang.Override + public boolean containsRouteParams( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetRouteParams().getMap().containsKey(key); + } + /** + * Use {@link #getRouteParamsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map<java.lang.String, java.lang.String> getRouteParams() { + return getRouteParamsMap(); + } + /** + * <code>map<string, string> route_params = 7;</code> + */ + @java.lang.Override + public java.util.Map<java.lang.String, java.lang.String> getRouteParamsMap() { + return internalGetRouteParams().getMap(); + } + /** + * <code>map<string, string> route_params = 7;</code> + */ + @java.lang.Override + public /* nullable */ +java.lang.String getRouteParamsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map<java.lang.String, java.lang.String> map = + internalGetRouteParams().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * <code>map<string, string> route_params = 7;</code> + */ + @java.lang.Override + public java.lang.String getRouteParamsOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map<java.lang.String, java.lang.String> map = + internalGetRouteParams().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearRouteParams() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableRouteParams().getMutableMap() + .clear(); + return this; + } + /** + * <code>map<string, string> route_params = 7;</code> + */ + public Builder removeRouteParams( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableRouteParams().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map<java.lang.String, java.lang.String> + getMutableRouteParams() { + bitField0_ |= 0x00000040; + return internalGetMutableRouteParams().getMutableMap(); + } + /** + * <code>map<string, string> route_params = 7;</code> + */ + public Builder putRouteParams( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableRouteParams().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000040; + return this; + } + /** + * <code>map<string, string> route_params = 7;</code> + */ + public Builder putAllRouteParams( + java.util.Map<java.lang.String, java.lang.String> values) { + internalGetMutableRouteParams().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + private long heartbeatDuration_ ; + /** + * <code>uint64 heartbeat_duration = 8;</code> + * @return The heartbeatDuration. + */ + @java.lang.Override + public long getHeartbeatDuration() { + return heartbeatDuration_; + } + /** + * <code>uint64 heartbeat_duration = 8;</code> + * @param value The heartbeatDuration to set. + * @return This builder for chaining. + */ + public Builder setHeartbeatDuration(long value) { + + heartbeatDuration_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>uint64 heartbeat_duration = 8;</code> + * @return This builder for chaining. + */ + public Builder clearHeartbeatDuration() { + bitField0_ = (bitField0_ & ~0x00000080); + heartbeatDuration_ = 0L; + onChanged(); + return this; + } + + private boolean needAck_ ; + /** + * <code>bool need_ack = 9;</code> + * @return The needAck. + */ + @java.lang.Override + public boolean getNeedAck() { + return needAck_; + } + /** + * <code>bool need_ack = 9;</code> + * @param value The needAck to set. + * @return This builder for chaining. + */ + public Builder setNeedAck(boolean value) { + + needAck_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>bool need_ack = 9;</code> + * @return This builder for chaining. + */ + public Builder clearNeedAck() { + bitField0_ = (bitField0_ & ~0x00000100); + needAck_ = false; + onChanged(); + return this; + } + + private java.lang.Object pushServer_ = ""; + /** + * <code>string push_server = 10;</code> + * @return The pushServer. + */ + public java.lang.String getPushServer() { + java.lang.Object ref = pushServer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pushServer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string push_server = 10;</code> + * @return The bytes for pushServer. + */ + public com.google.protobuf.ByteString + getPushServerBytes() { + java.lang.Object ref = pushServer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pushServer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string push_server = 10;</code> + * @param value The pushServer to set. + * @return This builder for chaining. + */ + public Builder setPushServer( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pushServer_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>string push_server = 10;</code> + * @return This builder for chaining. + */ + public Builder clearPushServer() { + pushServer_ = getDefaultInstance().getPushServer(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * <code>string push_server = 10;</code> + * @param value The bytes for pushServer to set. + * @return This builder for chaining. + */ + public Builder setPushServerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pushServer_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.lang.Object liveCursor_ = ""; + /** + * <code>string live_cursor = 11;</code> + * @return The liveCursor. + */ + public java.lang.String getLiveCursor() { + java.lang.Object ref = liveCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + liveCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string live_cursor = 11;</code> + * @return The bytes for liveCursor. + */ + public com.google.protobuf.ByteString + getLiveCursorBytes() { + java.lang.Object ref = liveCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + liveCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string live_cursor = 11;</code> + * @param value The liveCursor to set. + * @return This builder for chaining. + */ + public Builder setLiveCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + liveCursor_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * <code>string live_cursor = 11;</code> + * @return This builder for chaining. + */ + public Builder clearLiveCursor() { + liveCursor_ = getDefaultInstance().getLiveCursor(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * <code>string live_cursor = 11;</code> + * @param value The bytes for liveCursor to set. + * @return This builder for chaining. + */ + public Builder setLiveCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + liveCursor_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private boolean historyNoMore_ ; + /** + * <code>bool history_no_more = 12;</code> + * @return The historyNoMore. + */ + @java.lang.Override + public boolean getHistoryNoMore() { + return historyNoMore_; + } + /** + * <code>bool history_no_more = 12;</code> + * @param value The historyNoMore to set. + * @return This builder for chaining. + */ + public Builder setHistoryNoMore(boolean value) { + + historyNoMore_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * <code>bool history_no_more = 12;</code> + * @return This builder for chaining. + */ + public Builder clearHistoryNoMore() { + bitField0_ = (bitField0_ & ~0x00000800); + historyNoMore_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg) + } + + // @@protoc_insertion_point(class_scope:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<douyin_websocket_frame_msg> + PARSER = new com.google.protobuf.AbstractParser<douyin_websocket_frame_msg>() { + @java.lang.Override + public douyin_websocket_frame_msg parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<douyin_websocket_frame_msg> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<douyin_websocket_frame_msg> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frame_msgOrBuilder.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frame_msgOrBuilder.java new file mode 100644 index 0000000..e90332f --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frame_msgOrBuilder.java @@ -0,0 +1,175 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_websocket_frame_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +public interface douyin_websocket_frame_msgOrBuilder extends + // @@protoc_insertion_point(interface_extends:tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_websocket_frame_msg) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg> + getMessagesListList(); + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg getMessagesList(int index); + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + int getMessagesListCount(); + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msgOrBuilder> + getMessagesListOrBuilderList(); + /** + * <code>repeated .tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msg messages_list = 1;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.douyin_cmd_msgOrBuilder getMessagesListOrBuilder( + int index); + + /** + * <code>string cursor = 2;</code> + * @return The cursor. + */ + java.lang.String getCursor(); + /** + * <code>string cursor = 2;</code> + * @return The bytes for cursor. + */ + com.google.protobuf.ByteString + getCursorBytes(); + + /** + * <code>uint64 fetch_interval = 3;</code> + * @return The fetchInterval. + */ + long getFetchInterval(); + + /** + * <code>uint64 now = 4;</code> + * @return The now. + */ + long getNow(); + + /** + * <code>string internal_ext = 5;</code> + * @return The internalExt. + */ + java.lang.String getInternalExt(); + /** + * <code>string internal_ext = 5;</code> + * @return The bytes for internalExt. + */ + com.google.protobuf.ByteString + getInternalExtBytes(); + + /** + * <code>uint32 fetch_type = 6;</code> + * @return The fetchType. + */ + int getFetchType(); + + /** + * <code>map<string, string> route_params = 7;</code> + */ + int getRouteParamsCount(); + /** + * <code>map<string, string> route_params = 7;</code> + */ + boolean containsRouteParams( + java.lang.String key); + /** + * Use {@link #getRouteParamsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map<java.lang.String, java.lang.String> + getRouteParams(); + /** + * <code>map<string, string> route_params = 7;</code> + */ + java.util.Map<java.lang.String, java.lang.String> + getRouteParamsMap(); + /** + * <code>map<string, string> route_params = 7;</code> + */ + /* nullable */ +java.lang.String getRouteParamsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + * <code>map<string, string> route_params = 7;</code> + */ + java.lang.String getRouteParamsOrThrow( + java.lang.String key); + + /** + * <code>uint64 heartbeat_duration = 8;</code> + * @return The heartbeatDuration. + */ + long getHeartbeatDuration(); + + /** + * <code>bool need_ack = 9;</code> + * @return The needAck. + */ + boolean getNeedAck(); + + /** + * <code>string push_server = 10;</code> + * @return The pushServer. + */ + java.lang.String getPushServer(); + /** + * <code>string push_server = 10;</code> + * @return The bytes for pushServer. + */ + com.google.protobuf.ByteString + getPushServerBytes(); + + /** + * <code>string live_cursor = 11;</code> + * @return The liveCursor. + */ + java.lang.String getLiveCursor(); + /** + * <code>string live_cursor = 11;</code> + * @return The bytes for liveCursor. + */ + com.google.protobuf.ByteString + getLiveCursorBytes(); + + /** + * <code>bool history_no_more = 12;</code> + * @return The historyNoMore. + */ + boolean getHistoryNoMore(); +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frame_msgProto.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frame_msgProto.java new file mode 100644 index 0000000..607d3ed --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/douyin_websocket_frame_msgProto.java @@ -0,0 +1,100 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: douyin_websocket_frame_msg.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +public final class douyin_websocket_frame_msgProto { + private douyin_websocket_frame_msgProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_RouteParamsEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_RouteParamsEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n douyin_websocket_frame_msg.proto\0222tech" + + ".ordinaryroad.live.chat.client.douyin.pr" + + "otobuf\032\024douyin_cmd_msg.proto\"\362\003\n\032douyin_" + + "websocket_frame_msg\022Y\n\rmessages_list\030\001 \003" + + "(\0132B.tech.ordinaryroad.live.chat.client." + + "douyin.protobuf.douyin_cmd_msg\022\016\n\006cursor" + + "\030\002 \001(\t\022\026\n\016fetch_interval\030\003 \001(\004\022\013\n\003now\030\004 " + + "\001(\004\022\024\n\014internal_ext\030\005 \001(\t\022\022\n\nfetch_type\030" + + "\006 \001(\r\022u\n\014route_params\030\007 \003(\0132_.tech.ordin" + + "aryroad.live.chat.client.douyin.protobuf" + + ".douyin_websocket_frame_msg.RouteParamsE" + + "ntry\022\032\n\022heartbeat_duration\030\010 \001(\004\022\020\n\010need" + + "_ack\030\t \001(\010\022\023\n\013push_server\030\n \001(\t\022\023\n\013live_" + + "cursor\030\013 \001(\t\022\027\n\017history_no_more\030\014 \001(\010\0322\n" + + "\020RouteParamsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001B]\n2tech.ordinaryroad.live.chat" + + ".client.douyin.protobufB\037douyin_websocke" + + "t_frame_msgProtoP\001\242\002\003GPBb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_cmd_msgProto.getDescriptor(), + }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_descriptor, + new java.lang.String[] { "MessagesList", "Cursor", "FetchInterval", "Now", "InternalExt", "FetchType", "RouteParams", "HeartbeatDuration", "NeedAck", "PushServer", "LiveCursor", "HistoryNoMore", }); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_RouteParamsEntry_descriptor = + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_descriptor.getNestedTypes().get(0); + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_RouteParamsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_tech_ordinaryroad_live_chat_client_douyin_protobuf_douyin_websocket_frame_msg_RouteParamsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + tech.ordinaryroad.live.chat.client.douyin.protobuf.Douyin_cmd_msgProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/CommonOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/CommonOuterClass.java new file mode 100644 index 0000000..17c17c4 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/CommonOuterClass.java @@ -0,0 +1,2558 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Common.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class CommonOuterClass { + private CommonOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface CommonOrBuilder extends + // @@protoc_insertion_point(interface_extends:Common) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string method = 1;</code> + * @return The method. + */ + java.lang.String getMethod(); + /** + * <code>string method = 1;</code> + * @return The bytes for method. + */ + com.google.protobuf.ByteString + getMethodBytes(); + + /** + * <code>uint64 msgId = 2;</code> + * @return The msgId. + */ + long getMsgId(); + + /** + * <code>uint64 roomId = 3;</code> + * @return The roomId. + */ + long getRoomId(); + + /** + * <code>uint64 createTime = 4;</code> + * @return The createTime. + */ + long getCreateTime(); + + /** + * <code>uint32 monitor = 5;</code> + * @return The monitor. + */ + int getMonitor(); + + /** + * <code>bool isShowMsg = 6;</code> + * @return The isShowMsg. + */ + boolean getIsShowMsg(); + + /** + * <code>string describe = 7;</code> + * @return The describe. + */ + java.lang.String getDescribe(); + /** + * <code>string describe = 7;</code> + * @return The bytes for describe. + */ + com.google.protobuf.ByteString + getDescribeBytes(); + + /** + * <pre> + * DisplayText displayText = 8; + * </pre> + * + * <code>uint64 foldType = 9;</code> + * @return The foldType. + */ + long getFoldType(); + + /** + * <code>uint64 anchorFoldType = 10;</code> + * @return The anchorFoldType. + */ + long getAnchorFoldType(); + + /** + * <code>uint64 priorityScore = 11;</code> + * @return The priorityScore. + */ + long getPriorityScore(); + + /** + * <code>string logId = 12;</code> + * @return The logId. + */ + java.lang.String getLogId(); + /** + * <code>string logId = 12;</code> + * @return The bytes for logId. + */ + com.google.protobuf.ByteString + getLogIdBytes(); + + /** + * <code>string msgProcessFilterK = 13;</code> + * @return The msgProcessFilterK. + */ + java.lang.String getMsgProcessFilterK(); + /** + * <code>string msgProcessFilterK = 13;</code> + * @return The bytes for msgProcessFilterK. + */ + com.google.protobuf.ByteString + getMsgProcessFilterKBytes(); + + /** + * <code>string msgProcessFilterV = 14;</code> + * @return The msgProcessFilterV. + */ + java.lang.String getMsgProcessFilterV(); + /** + * <code>string msgProcessFilterV = 14;</code> + * @return The bytes for msgProcessFilterV. + */ + com.google.protobuf.ByteString + getMsgProcessFilterVBytes(); + + /** + * <code>.User user = 15;</code> + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * <code>.User user = 15;</code> + * @return The user. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser(); + /** + * <code>.User user = 15;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder(); + + /** + * <pre> + * Room room = 16; + * </pre> + * + * <code>uint64 anchorFoldTypeV2 = 17;</code> + * @return The anchorFoldTypeV2. + */ + long getAnchorFoldTypeV2(); + + /** + * <code>uint64 processAtSeiTimeMs = 18;</code> + * @return The processAtSeiTimeMs. + */ + long getProcessAtSeiTimeMs(); + + /** + * <code>uint64 randomDispatchMs = 19;</code> + * @return The randomDispatchMs. + */ + long getRandomDispatchMs(); + + /** + * <code>bool isDispatch = 20;</code> + * @return The isDispatch. + */ + boolean getIsDispatch(); + + /** + * <code>uint32 channelId = 21;</code> + * @return The channelId. + */ + int getChannelId(); + + /** + * <code>uint64 diffSei2absSecond = 22;</code> + * @return The diffSei2absSecond. + */ + long getDiffSei2AbsSecond(); + + /** + * <code>uint64 anchorFoldDuration = 23;</code> + * @return The anchorFoldDuration. + */ + long getAnchorFoldDuration(); + } + /** + * Protobuf type {@code Common} + */ + public static final class Common extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Common) + CommonOrBuilder { + private static final long serialVersionUID = 0L; + // Use Common.newBuilder() to construct. + private Common(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private Common() { + method_ = ""; + describe_ = ""; + logId_ = ""; + msgProcessFilterK_ = ""; + msgProcessFilterV_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Common(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.internal_static_Common_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.internal_static_Common_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder.class); + } + + public static final int METHOD_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object method_ = ""; + /** + * <code>string method = 1;</code> + * @return The method. + */ + @java.lang.Override + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } + } + /** + * <code>string method = 1;</code> + * @return The bytes for method. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MSGID_FIELD_NUMBER = 2; + private long msgId_ = 0L; + /** + * <code>uint64 msgId = 2;</code> + * @return The msgId. + */ + @java.lang.Override + public long getMsgId() { + return msgId_; + } + + public static final int ROOMID_FIELD_NUMBER = 3; + private long roomId_ = 0L; + /** + * <code>uint64 roomId = 3;</code> + * @return The roomId. + */ + @java.lang.Override + public long getRoomId() { + return roomId_; + } + + public static final int CREATETIME_FIELD_NUMBER = 4; + private long createTime_ = 0L; + /** + * <code>uint64 createTime = 4;</code> + * @return The createTime. + */ + @java.lang.Override + public long getCreateTime() { + return createTime_; + } + + public static final int MONITOR_FIELD_NUMBER = 5; + private int monitor_ = 0; + /** + * <code>uint32 monitor = 5;</code> + * @return The monitor. + */ + @java.lang.Override + public int getMonitor() { + return monitor_; + } + + public static final int ISSHOWMSG_FIELD_NUMBER = 6; + private boolean isShowMsg_ = false; + /** + * <code>bool isShowMsg = 6;</code> + * @return The isShowMsg. + */ + @java.lang.Override + public boolean getIsShowMsg() { + return isShowMsg_; + } + + public static final int DESCRIBE_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object describe_ = ""; + /** + * <code>string describe = 7;</code> + * @return The describe. + */ + @java.lang.Override + public java.lang.String getDescribe() { + java.lang.Object ref = describe_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + describe_ = s; + return s; + } + } + /** + * <code>string describe = 7;</code> + * @return The bytes for describe. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescribeBytes() { + java.lang.Object ref = describe_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + describe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FOLDTYPE_FIELD_NUMBER = 9; + private long foldType_ = 0L; + /** + * <pre> + * DisplayText displayText = 8; + * </pre> + * + * <code>uint64 foldType = 9;</code> + * @return The foldType. + */ + @java.lang.Override + public long getFoldType() { + return foldType_; + } + + public static final int ANCHORFOLDTYPE_FIELD_NUMBER = 10; + private long anchorFoldType_ = 0L; + /** + * <code>uint64 anchorFoldType = 10;</code> + * @return The anchorFoldType. + */ + @java.lang.Override + public long getAnchorFoldType() { + return anchorFoldType_; + } + + public static final int PRIORITYSCORE_FIELD_NUMBER = 11; + private long priorityScore_ = 0L; + /** + * <code>uint64 priorityScore = 11;</code> + * @return The priorityScore. + */ + @java.lang.Override + public long getPriorityScore() { + return priorityScore_; + } + + public static final int LOGID_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private volatile java.lang.Object logId_ = ""; + /** + * <code>string logId = 12;</code> + * @return The logId. + */ + @java.lang.Override + public java.lang.String getLogId() { + java.lang.Object ref = logId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logId_ = s; + return s; + } + } + /** + * <code>string logId = 12;</code> + * @return The bytes for logId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLogIdBytes() { + java.lang.Object ref = logId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MSGPROCESSFILTERK_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private volatile java.lang.Object msgProcessFilterK_ = ""; + /** + * <code>string msgProcessFilterK = 13;</code> + * @return The msgProcessFilterK. + */ + @java.lang.Override + public java.lang.String getMsgProcessFilterK() { + java.lang.Object ref = msgProcessFilterK_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgProcessFilterK_ = s; + return s; + } + } + /** + * <code>string msgProcessFilterK = 13;</code> + * @return The bytes for msgProcessFilterK. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgProcessFilterKBytes() { + java.lang.Object ref = msgProcessFilterK_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgProcessFilterK_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MSGPROCESSFILTERV_FIELD_NUMBER = 14; + @SuppressWarnings("serial") + private volatile java.lang.Object msgProcessFilterV_ = ""; + /** + * <code>string msgProcessFilterV = 14;</code> + * @return The msgProcessFilterV. + */ + @java.lang.Override + public java.lang.String getMsgProcessFilterV() { + java.lang.Object ref = msgProcessFilterV_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgProcessFilterV_ = s; + return s; + } + } + /** + * <code>string msgProcessFilterV = 14;</code> + * @return The bytes for msgProcessFilterV. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgProcessFilterVBytes() { + java.lang.Object ref = msgProcessFilterV_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgProcessFilterV_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_FIELD_NUMBER = 15; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User user_; + /** + * <code>.User user = 15;</code> + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return user_ != null; + } + /** + * <code>.User user = 15;</code> + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + /** + * <code>.User user = 15;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + + public static final int ANCHORFOLDTYPEV2_FIELD_NUMBER = 17; + private long anchorFoldTypeV2_ = 0L; + /** + * <pre> + * Room room = 16; + * </pre> + * + * <code>uint64 anchorFoldTypeV2 = 17;</code> + * @return The anchorFoldTypeV2. + */ + @java.lang.Override + public long getAnchorFoldTypeV2() { + return anchorFoldTypeV2_; + } + + public static final int PROCESSATSEITIMEMS_FIELD_NUMBER = 18; + private long processAtSeiTimeMs_ = 0L; + /** + * <code>uint64 processAtSeiTimeMs = 18;</code> + * @return The processAtSeiTimeMs. + */ + @java.lang.Override + public long getProcessAtSeiTimeMs() { + return processAtSeiTimeMs_; + } + + public static final int RANDOMDISPATCHMS_FIELD_NUMBER = 19; + private long randomDispatchMs_ = 0L; + /** + * <code>uint64 randomDispatchMs = 19;</code> + * @return The randomDispatchMs. + */ + @java.lang.Override + public long getRandomDispatchMs() { + return randomDispatchMs_; + } + + public static final int ISDISPATCH_FIELD_NUMBER = 20; + private boolean isDispatch_ = false; + /** + * <code>bool isDispatch = 20;</code> + * @return The isDispatch. + */ + @java.lang.Override + public boolean getIsDispatch() { + return isDispatch_; + } + + public static final int CHANNELID_FIELD_NUMBER = 21; + private int channelId_ = 0; + /** + * <code>uint32 channelId = 21;</code> + * @return The channelId. + */ + @java.lang.Override + public int getChannelId() { + return channelId_; + } + + public static final int DIFFSEI2ABSSECOND_FIELD_NUMBER = 22; + private long diffSei2AbsSecond_ = 0L; + /** + * <code>uint64 diffSei2absSecond = 22;</code> + * @return The diffSei2absSecond. + */ + @java.lang.Override + public long getDiffSei2AbsSecond() { + return diffSei2AbsSecond_; + } + + public static final int ANCHORFOLDDURATION_FIELD_NUMBER = 23; + private long anchorFoldDuration_ = 0L; + /** + * <code>uint64 anchorFoldDuration = 23;</code> + * @return The anchorFoldDuration. + */ + @java.lang.Override + public long getAnchorFoldDuration() { + return anchorFoldDuration_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(method_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, method_); + } + if (msgId_ != 0L) { + output.writeUInt64(2, msgId_); + } + if (roomId_ != 0L) { + output.writeUInt64(3, roomId_); + } + if (createTime_ != 0L) { + output.writeUInt64(4, createTime_); + } + if (monitor_ != 0) { + output.writeUInt32(5, monitor_); + } + if (isShowMsg_ != false) { + output.writeBool(6, isShowMsg_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(describe_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, describe_); + } + if (foldType_ != 0L) { + output.writeUInt64(9, foldType_); + } + if (anchorFoldType_ != 0L) { + output.writeUInt64(10, anchorFoldType_); + } + if (priorityScore_ != 0L) { + output.writeUInt64(11, priorityScore_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, logId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msgProcessFilterK_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, msgProcessFilterK_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msgProcessFilterV_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, msgProcessFilterV_); + } + if (user_ != null) { + output.writeMessage(15, getUser()); + } + if (anchorFoldTypeV2_ != 0L) { + output.writeUInt64(17, anchorFoldTypeV2_); + } + if (processAtSeiTimeMs_ != 0L) { + output.writeUInt64(18, processAtSeiTimeMs_); + } + if (randomDispatchMs_ != 0L) { + output.writeUInt64(19, randomDispatchMs_); + } + if (isDispatch_ != false) { + output.writeBool(20, isDispatch_); + } + if (channelId_ != 0) { + output.writeUInt32(21, channelId_); + } + if (diffSei2AbsSecond_ != 0L) { + output.writeUInt64(22, diffSei2AbsSecond_); + } + if (anchorFoldDuration_ != 0L) { + output.writeUInt64(23, anchorFoldDuration_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(method_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, method_); + } + if (msgId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, msgId_); + } + if (roomId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, roomId_); + } + if (createTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, createTime_); + } + if (monitor_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, monitor_); + } + if (isShowMsg_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, isShowMsg_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(describe_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, describe_); + } + if (foldType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(9, foldType_); + } + if (anchorFoldType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(10, anchorFoldType_); + } + if (priorityScore_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(11, priorityScore_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, logId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msgProcessFilterK_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, msgProcessFilterK_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msgProcessFilterV_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, msgProcessFilterV_); + } + if (user_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getUser()); + } + if (anchorFoldTypeV2_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(17, anchorFoldTypeV2_); + } + if (processAtSeiTimeMs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(18, processAtSeiTimeMs_); + } + if (randomDispatchMs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(19, randomDispatchMs_); + } + if (isDispatch_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(20, isDispatch_); + } + if (channelId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(21, channelId_); + } + if (diffSei2AbsSecond_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(22, diffSei2AbsSecond_); + } + if (anchorFoldDuration_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(23, anchorFoldDuration_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common) obj; + + if (!getMethod() + .equals(other.getMethod())) return false; + if (getMsgId() + != other.getMsgId()) return false; + if (getRoomId() + != other.getRoomId()) return false; + if (getCreateTime() + != other.getCreateTime()) return false; + if (getMonitor() + != other.getMonitor()) return false; + if (getIsShowMsg() + != other.getIsShowMsg()) return false; + if (!getDescribe() + .equals(other.getDescribe())) return false; + if (getFoldType() + != other.getFoldType()) return false; + if (getAnchorFoldType() + != other.getAnchorFoldType()) return false; + if (getPriorityScore() + != other.getPriorityScore()) return false; + if (!getLogId() + .equals(other.getLogId())) return false; + if (!getMsgProcessFilterK() + .equals(other.getMsgProcessFilterK())) return false; + if (!getMsgProcessFilterV() + .equals(other.getMsgProcessFilterV())) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getAnchorFoldTypeV2() + != other.getAnchorFoldTypeV2()) return false; + if (getProcessAtSeiTimeMs() + != other.getProcessAtSeiTimeMs()) return false; + if (getRandomDispatchMs() + != other.getRandomDispatchMs()) return false; + if (getIsDispatch() + != other.getIsDispatch()) return false; + if (getChannelId() + != other.getChannelId()) return false; + if (getDiffSei2AbsSecond() + != other.getDiffSei2AbsSecond()) return false; + if (getAnchorFoldDuration() + != other.getAnchorFoldDuration()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + METHOD_FIELD_NUMBER; + hash = (53 * hash) + getMethod().hashCode(); + hash = (37 * hash) + MSGID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMsgId()); + hash = (37 * hash) + ROOMID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRoomId()); + hash = (37 * hash) + CREATETIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCreateTime()); + hash = (37 * hash) + MONITOR_FIELD_NUMBER; + hash = (53 * hash) + getMonitor(); + hash = (37 * hash) + ISSHOWMSG_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsShowMsg()); + hash = (37 * hash) + DESCRIBE_FIELD_NUMBER; + hash = (53 * hash) + getDescribe().hashCode(); + hash = (37 * hash) + FOLDTYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFoldType()); + hash = (37 * hash) + ANCHORFOLDTYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAnchorFoldType()); + hash = (37 * hash) + PRIORITYSCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPriorityScore()); + hash = (37 * hash) + LOGID_FIELD_NUMBER; + hash = (53 * hash) + getLogId().hashCode(); + hash = (37 * hash) + MSGPROCESSFILTERK_FIELD_NUMBER; + hash = (53 * hash) + getMsgProcessFilterK().hashCode(); + hash = (37 * hash) + MSGPROCESSFILTERV_FIELD_NUMBER; + hash = (53 * hash) + getMsgProcessFilterV().hashCode(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + ANCHORFOLDTYPEV2_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAnchorFoldTypeV2()); + hash = (37 * hash) + PROCESSATSEITIMEMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getProcessAtSeiTimeMs()); + hash = (37 * hash) + RANDOMDISPATCHMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRandomDispatchMs()); + hash = (37 * hash) + ISDISPATCH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsDispatch()); + hash = (37 * hash) + CHANNELID_FIELD_NUMBER; + hash = (53 * hash) + getChannelId(); + hash = (37 * hash) + DIFFSEI2ABSSECOND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDiffSei2AbsSecond()); + hash = (37 * hash) + ANCHORFOLDDURATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAnchorFoldDuration()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Common} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:Common) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.CommonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.internal_static_Common_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.internal_static_Common_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + method_ = ""; + msgId_ = 0L; + roomId_ = 0L; + createTime_ = 0L; + monitor_ = 0; + isShowMsg_ = false; + describe_ = ""; + foldType_ = 0L; + anchorFoldType_ = 0L; + priorityScore_ = 0L; + logId_ = ""; + msgProcessFilterK_ = ""; + msgProcessFilterV_ = ""; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + anchorFoldTypeV2_ = 0L; + processAtSeiTimeMs_ = 0L; + randomDispatchMs_ = 0L; + isDispatch_ = false; + channelId_ = 0; + diffSei2AbsSecond_ = 0L; + anchorFoldDuration_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.internal_static_Common_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.method_ = method_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.msgId_ = msgId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.roomId_ = roomId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.createTime_ = createTime_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.monitor_ = monitor_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.isShowMsg_ = isShowMsg_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.describe_ = describe_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.foldType_ = foldType_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.anchorFoldType_ = anchorFoldType_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.priorityScore_ = priorityScore_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.logId_ = logId_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.msgProcessFilterK_ = msgProcessFilterK_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.msgProcessFilterV_ = msgProcessFilterV_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.anchorFoldTypeV2_ = anchorFoldTypeV2_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.processAtSeiTimeMs_ = processAtSeiTimeMs_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.randomDispatchMs_ = randomDispatchMs_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.isDispatch_ = isDispatch_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.channelId_ = channelId_; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.diffSei2AbsSecond_ = diffSei2AbsSecond_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.anchorFoldDuration_ = anchorFoldDuration_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common.getDefaultInstance()) return this; + if (!other.getMethod().isEmpty()) { + method_ = other.method_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getMsgId() != 0L) { + setMsgId(other.getMsgId()); + } + if (other.getRoomId() != 0L) { + setRoomId(other.getRoomId()); + } + if (other.getCreateTime() != 0L) { + setCreateTime(other.getCreateTime()); + } + if (other.getMonitor() != 0) { + setMonitor(other.getMonitor()); + } + if (other.getIsShowMsg() != false) { + setIsShowMsg(other.getIsShowMsg()); + } + if (!other.getDescribe().isEmpty()) { + describe_ = other.describe_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.getFoldType() != 0L) { + setFoldType(other.getFoldType()); + } + if (other.getAnchorFoldType() != 0L) { + setAnchorFoldType(other.getAnchorFoldType()); + } + if (other.getPriorityScore() != 0L) { + setPriorityScore(other.getPriorityScore()); + } + if (!other.getLogId().isEmpty()) { + logId_ = other.logId_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (!other.getMsgProcessFilterK().isEmpty()) { + msgProcessFilterK_ = other.msgProcessFilterK_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (!other.getMsgProcessFilterV().isEmpty()) { + msgProcessFilterV_ = other.msgProcessFilterV_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getAnchorFoldTypeV2() != 0L) { + setAnchorFoldTypeV2(other.getAnchorFoldTypeV2()); + } + if (other.getProcessAtSeiTimeMs() != 0L) { + setProcessAtSeiTimeMs(other.getProcessAtSeiTimeMs()); + } + if (other.getRandomDispatchMs() != 0L) { + setRandomDispatchMs(other.getRandomDispatchMs()); + } + if (other.getIsDispatch() != false) { + setIsDispatch(other.getIsDispatch()); + } + if (other.getChannelId() != 0) { + setChannelId(other.getChannelId()); + } + if (other.getDiffSei2AbsSecond() != 0L) { + setDiffSei2AbsSecond(other.getDiffSei2AbsSecond()); + } + if (other.getAnchorFoldDuration() != 0L) { + setAnchorFoldDuration(other.getAnchorFoldDuration()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + method_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + msgId_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + roomId_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + createTime_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + monitor_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + isShowMsg_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + describe_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 72: { + foldType_ = input.readUInt64(); + bitField0_ |= 0x00000080; + break; + } // case 72 + case 80: { + anchorFoldType_ = input.readUInt64(); + bitField0_ |= 0x00000100; + break; + } // case 80 + case 88: { + priorityScore_ = input.readUInt64(); + bitField0_ |= 0x00000200; + break; + } // case 88 + case 98: { + logId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 98 + case 106: { + msgProcessFilterK_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 106 + case 114: { + msgProcessFilterV_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 114 + case 122: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 122 + case 136: { + anchorFoldTypeV2_ = input.readUInt64(); + bitField0_ |= 0x00004000; + break; + } // case 136 + case 144: { + processAtSeiTimeMs_ = input.readUInt64(); + bitField0_ |= 0x00008000; + break; + } // case 144 + case 152: { + randomDispatchMs_ = input.readUInt64(); + bitField0_ |= 0x00010000; + break; + } // case 152 + case 160: { + isDispatch_ = input.readBool(); + bitField0_ |= 0x00020000; + break; + } // case 160 + case 168: { + channelId_ = input.readUInt32(); + bitField0_ |= 0x00040000; + break; + } // case 168 + case 176: { + diffSei2AbsSecond_ = input.readUInt64(); + bitField0_ |= 0x00080000; + break; + } // case 176 + case 184: { + anchorFoldDuration_ = input.readUInt64(); + bitField0_ |= 0x00100000; + break; + } // case 184 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object method_ = ""; + /** + * <code>string method = 1;</code> + * @return The method. + */ + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string method = 1;</code> + * @return The bytes for method. + */ + public com.google.protobuf.ByteString + getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string method = 1;</code> + * @param value The method to set. + * @return This builder for chaining. + */ + public Builder setMethod( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + method_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string method = 1;</code> + * @return This builder for chaining. + */ + public Builder clearMethod() { + method_ = getDefaultInstance().getMethod(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string method = 1;</code> + * @param value The bytes for method to set. + * @return This builder for chaining. + */ + public Builder setMethodBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + method_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private long msgId_ ; + /** + * <code>uint64 msgId = 2;</code> + * @return The msgId. + */ + @java.lang.Override + public long getMsgId() { + return msgId_; + } + /** + * <code>uint64 msgId = 2;</code> + * @param value The msgId to set. + * @return This builder for chaining. + */ + public Builder setMsgId(long value) { + + msgId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>uint64 msgId = 2;</code> + * @return This builder for chaining. + */ + public Builder clearMsgId() { + bitField0_ = (bitField0_ & ~0x00000002); + msgId_ = 0L; + onChanged(); + return this; + } + + private long roomId_ ; + /** + * <code>uint64 roomId = 3;</code> + * @return The roomId. + */ + @java.lang.Override + public long getRoomId() { + return roomId_; + } + /** + * <code>uint64 roomId = 3;</code> + * @param value The roomId to set. + * @return This builder for chaining. + */ + public Builder setRoomId(long value) { + + roomId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 roomId = 3;</code> + * @return This builder for chaining. + */ + public Builder clearRoomId() { + bitField0_ = (bitField0_ & ~0x00000004); + roomId_ = 0L; + onChanged(); + return this; + } + + private long createTime_ ; + /** + * <code>uint64 createTime = 4;</code> + * @return The createTime. + */ + @java.lang.Override + public long getCreateTime() { + return createTime_; + } + /** + * <code>uint64 createTime = 4;</code> + * @param value The createTime to set. + * @return This builder for chaining. + */ + public Builder setCreateTime(long value) { + + createTime_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint64 createTime = 4;</code> + * @return This builder for chaining. + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + createTime_ = 0L; + onChanged(); + return this; + } + + private int monitor_ ; + /** + * <code>uint32 monitor = 5;</code> + * @return The monitor. + */ + @java.lang.Override + public int getMonitor() { + return monitor_; + } + /** + * <code>uint32 monitor = 5;</code> + * @param value The monitor to set. + * @return This builder for chaining. + */ + public Builder setMonitor(int value) { + + monitor_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>uint32 monitor = 5;</code> + * @return This builder for chaining. + */ + public Builder clearMonitor() { + bitField0_ = (bitField0_ & ~0x00000010); + monitor_ = 0; + onChanged(); + return this; + } + + private boolean isShowMsg_ ; + /** + * <code>bool isShowMsg = 6;</code> + * @return The isShowMsg. + */ + @java.lang.Override + public boolean getIsShowMsg() { + return isShowMsg_; + } + /** + * <code>bool isShowMsg = 6;</code> + * @param value The isShowMsg to set. + * @return This builder for chaining. + */ + public Builder setIsShowMsg(boolean value) { + + isShowMsg_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>bool isShowMsg = 6;</code> + * @return This builder for chaining. + */ + public Builder clearIsShowMsg() { + bitField0_ = (bitField0_ & ~0x00000020); + isShowMsg_ = false; + onChanged(); + return this; + } + + private java.lang.Object describe_ = ""; + /** + * <code>string describe = 7;</code> + * @return The describe. + */ + public java.lang.String getDescribe() { + java.lang.Object ref = describe_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + describe_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string describe = 7;</code> + * @return The bytes for describe. + */ + public com.google.protobuf.ByteString + getDescribeBytes() { + java.lang.Object ref = describe_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + describe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string describe = 7;</code> + * @param value The describe to set. + * @return This builder for chaining. + */ + public Builder setDescribe( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + describe_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>string describe = 7;</code> + * @return This builder for chaining. + */ + public Builder clearDescribe() { + describe_ = getDefaultInstance().getDescribe(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * <code>string describe = 7;</code> + * @param value The bytes for describe to set. + * @return This builder for chaining. + */ + public Builder setDescribeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + describe_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private long foldType_ ; + /** + * <pre> + * DisplayText displayText = 8; + * </pre> + * + * <code>uint64 foldType = 9;</code> + * @return The foldType. + */ + @java.lang.Override + public long getFoldType() { + return foldType_; + } + /** + * <pre> + * DisplayText displayText = 8; + * </pre> + * + * <code>uint64 foldType = 9;</code> + * @param value The foldType to set. + * @return This builder for chaining. + */ + public Builder setFoldType(long value) { + + foldType_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <pre> + * DisplayText displayText = 8; + * </pre> + * + * <code>uint64 foldType = 9;</code> + * @return This builder for chaining. + */ + public Builder clearFoldType() { + bitField0_ = (bitField0_ & ~0x00000080); + foldType_ = 0L; + onChanged(); + return this; + } + + private long anchorFoldType_ ; + /** + * <code>uint64 anchorFoldType = 10;</code> + * @return The anchorFoldType. + */ + @java.lang.Override + public long getAnchorFoldType() { + return anchorFoldType_; + } + /** + * <code>uint64 anchorFoldType = 10;</code> + * @param value The anchorFoldType to set. + * @return This builder for chaining. + */ + public Builder setAnchorFoldType(long value) { + + anchorFoldType_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>uint64 anchorFoldType = 10;</code> + * @return This builder for chaining. + */ + public Builder clearAnchorFoldType() { + bitField0_ = (bitField0_ & ~0x00000100); + anchorFoldType_ = 0L; + onChanged(); + return this; + } + + private long priorityScore_ ; + /** + * <code>uint64 priorityScore = 11;</code> + * @return The priorityScore. + */ + @java.lang.Override + public long getPriorityScore() { + return priorityScore_; + } + /** + * <code>uint64 priorityScore = 11;</code> + * @param value The priorityScore to set. + * @return This builder for chaining. + */ + public Builder setPriorityScore(long value) { + + priorityScore_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>uint64 priorityScore = 11;</code> + * @return This builder for chaining. + */ + public Builder clearPriorityScore() { + bitField0_ = (bitField0_ & ~0x00000200); + priorityScore_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object logId_ = ""; + /** + * <code>string logId = 12;</code> + * @return The logId. + */ + public java.lang.String getLogId() { + java.lang.Object ref = logId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string logId = 12;</code> + * @return The bytes for logId. + */ + public com.google.protobuf.ByteString + getLogIdBytes() { + java.lang.Object ref = logId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string logId = 12;</code> + * @param value The logId to set. + * @return This builder for chaining. + */ + public Builder setLogId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + logId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * <code>string logId = 12;</code> + * @return This builder for chaining. + */ + public Builder clearLogId() { + logId_ = getDefaultInstance().getLogId(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + /** + * <code>string logId = 12;</code> + * @param value The bytes for logId to set. + * @return This builder for chaining. + */ + public Builder setLogIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + logId_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object msgProcessFilterK_ = ""; + /** + * <code>string msgProcessFilterK = 13;</code> + * @return The msgProcessFilterK. + */ + public java.lang.String getMsgProcessFilterK() { + java.lang.Object ref = msgProcessFilterK_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgProcessFilterK_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string msgProcessFilterK = 13;</code> + * @return The bytes for msgProcessFilterK. + */ + public com.google.protobuf.ByteString + getMsgProcessFilterKBytes() { + java.lang.Object ref = msgProcessFilterK_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgProcessFilterK_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string msgProcessFilterK = 13;</code> + * @param value The msgProcessFilterK to set. + * @return This builder for chaining. + */ + public Builder setMsgProcessFilterK( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msgProcessFilterK_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * <code>string msgProcessFilterK = 13;</code> + * @return This builder for chaining. + */ + public Builder clearMsgProcessFilterK() { + msgProcessFilterK_ = getDefaultInstance().getMsgProcessFilterK(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + * <code>string msgProcessFilterK = 13;</code> + * @param value The bytes for msgProcessFilterK to set. + * @return This builder for chaining. + */ + public Builder setMsgProcessFilterKBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msgProcessFilterK_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private java.lang.Object msgProcessFilterV_ = ""; + /** + * <code>string msgProcessFilterV = 14;</code> + * @return The msgProcessFilterV. + */ + public java.lang.String getMsgProcessFilterV() { + java.lang.Object ref = msgProcessFilterV_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msgProcessFilterV_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string msgProcessFilterV = 14;</code> + * @return The bytes for msgProcessFilterV. + */ + public com.google.protobuf.ByteString + getMsgProcessFilterVBytes() { + java.lang.Object ref = msgProcessFilterV_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msgProcessFilterV_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string msgProcessFilterV = 14;</code> + * @param value The msgProcessFilterV to set. + * @return This builder for chaining. + */ + public Builder setMsgProcessFilterV( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msgProcessFilterV_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * <code>string msgProcessFilterV = 14;</code> + * @return This builder for chaining. + */ + public Builder clearMsgProcessFilterV() { + msgProcessFilterV_ = getDefaultInstance().getMsgProcessFilterV(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + * <code>string msgProcessFilterV = 14;</code> + * @param value The bytes for msgProcessFilterV to set. + * @return This builder for chaining. + */ + public Builder setMsgProcessFilterVBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msgProcessFilterV_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> userBuilder_; + /** + * <code>.User user = 15;</code> + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * <code>.User user = 15;</code> + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * <code>.User user = 15;</code> + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>.User user = 15;</code> + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>.User user = 15;</code> + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>.User user = 15;</code> + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00002000); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User user = 15;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder getUserBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * <code>.User user = 15;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + } + /** + * <code>.User user = 15;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private long anchorFoldTypeV2_ ; + /** + * <pre> + * Room room = 16; + * </pre> + * + * <code>uint64 anchorFoldTypeV2 = 17;</code> + * @return The anchorFoldTypeV2. + */ + @java.lang.Override + public long getAnchorFoldTypeV2() { + return anchorFoldTypeV2_; + } + /** + * <pre> + * Room room = 16; + * </pre> + * + * <code>uint64 anchorFoldTypeV2 = 17;</code> + * @param value The anchorFoldTypeV2 to set. + * @return This builder for chaining. + */ + public Builder setAnchorFoldTypeV2(long value) { + + anchorFoldTypeV2_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <pre> + * Room room = 16; + * </pre> + * + * <code>uint64 anchorFoldTypeV2 = 17;</code> + * @return This builder for chaining. + */ + public Builder clearAnchorFoldTypeV2() { + bitField0_ = (bitField0_ & ~0x00004000); + anchorFoldTypeV2_ = 0L; + onChanged(); + return this; + } + + private long processAtSeiTimeMs_ ; + /** + * <code>uint64 processAtSeiTimeMs = 18;</code> + * @return The processAtSeiTimeMs. + */ + @java.lang.Override + public long getProcessAtSeiTimeMs() { + return processAtSeiTimeMs_; + } + /** + * <code>uint64 processAtSeiTimeMs = 18;</code> + * @param value The processAtSeiTimeMs to set. + * @return This builder for chaining. + */ + public Builder setProcessAtSeiTimeMs(long value) { + + processAtSeiTimeMs_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>uint64 processAtSeiTimeMs = 18;</code> + * @return This builder for chaining. + */ + public Builder clearProcessAtSeiTimeMs() { + bitField0_ = (bitField0_ & ~0x00008000); + processAtSeiTimeMs_ = 0L; + onChanged(); + return this; + } + + private long randomDispatchMs_ ; + /** + * <code>uint64 randomDispatchMs = 19;</code> + * @return The randomDispatchMs. + */ + @java.lang.Override + public long getRandomDispatchMs() { + return randomDispatchMs_; + } + /** + * <code>uint64 randomDispatchMs = 19;</code> + * @param value The randomDispatchMs to set. + * @return This builder for chaining. + */ + public Builder setRandomDispatchMs(long value) { + + randomDispatchMs_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * <code>uint64 randomDispatchMs = 19;</code> + * @return This builder for chaining. + */ + public Builder clearRandomDispatchMs() { + bitField0_ = (bitField0_ & ~0x00010000); + randomDispatchMs_ = 0L; + onChanged(); + return this; + } + + private boolean isDispatch_ ; + /** + * <code>bool isDispatch = 20;</code> + * @return The isDispatch. + */ + @java.lang.Override + public boolean getIsDispatch() { + return isDispatch_; + } + /** + * <code>bool isDispatch = 20;</code> + * @param value The isDispatch to set. + * @return This builder for chaining. + */ + public Builder setIsDispatch(boolean value) { + + isDispatch_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * <code>bool isDispatch = 20;</code> + * @return This builder for chaining. + */ + public Builder clearIsDispatch() { + bitField0_ = (bitField0_ & ~0x00020000); + isDispatch_ = false; + onChanged(); + return this; + } + + private int channelId_ ; + /** + * <code>uint32 channelId = 21;</code> + * @return The channelId. + */ + @java.lang.Override + public int getChannelId() { + return channelId_; + } + /** + * <code>uint32 channelId = 21;</code> + * @param value The channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelId(int value) { + + channelId_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * <code>uint32 channelId = 21;</code> + * @return This builder for chaining. + */ + public Builder clearChannelId() { + bitField0_ = (bitField0_ & ~0x00040000); + channelId_ = 0; + onChanged(); + return this; + } + + private long diffSei2AbsSecond_ ; + /** + * <code>uint64 diffSei2absSecond = 22;</code> + * @return The diffSei2absSecond. + */ + @java.lang.Override + public long getDiffSei2AbsSecond() { + return diffSei2AbsSecond_; + } + /** + * <code>uint64 diffSei2absSecond = 22;</code> + * @param value The diffSei2absSecond to set. + * @return This builder for chaining. + */ + public Builder setDiffSei2AbsSecond(long value) { + + diffSei2AbsSecond_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * <code>uint64 diffSei2absSecond = 22;</code> + * @return This builder for chaining. + */ + public Builder clearDiffSei2AbsSecond() { + bitField0_ = (bitField0_ & ~0x00080000); + diffSei2AbsSecond_ = 0L; + onChanged(); + return this; + } + + private long anchorFoldDuration_ ; + /** + * <code>uint64 anchorFoldDuration = 23;</code> + * @return The anchorFoldDuration. + */ + @java.lang.Override + public long getAnchorFoldDuration() { + return anchorFoldDuration_; + } + /** + * <code>uint64 anchorFoldDuration = 23;</code> + * @param value The anchorFoldDuration to set. + * @return This builder for chaining. + */ + public Builder setAnchorFoldDuration(long value) { + + anchorFoldDuration_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * <code>uint64 anchorFoldDuration = 23;</code> + * @return This builder for chaining. + */ + public Builder clearAnchorFoldDuration() { + bitField0_ = (bitField0_ & ~0x00100000); + anchorFoldDuration_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Common) + } + + // @@protoc_insertion_point(class_scope:Common) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<Common> + PARSER = new com.google.protobuf.AbstractParser<Common>() { + @java.lang.Override + public Common parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<Common> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<Common> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.CommonOuterClass.Common getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Common_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Common_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\014Common.proto\032\nUser.proto\"\312\003\n\006Common\022\016\n" + + "\006method\030\001 \001(\t\022\r\n\005msgId\030\002 \001(\004\022\016\n\006roomId\030\003" + + " \001(\004\022\022\n\ncreateTime\030\004 \001(\004\022\017\n\007monitor\030\005 \001(" + + "\r\022\021\n\tisShowMsg\030\006 \001(\010\022\020\n\010describe\030\007 \001(\t\022\020" + + "\n\010foldType\030\t \001(\004\022\026\n\016anchorFoldType\030\n \001(\004" + + "\022\025\n\rpriorityScore\030\013 \001(\004\022\r\n\005logId\030\014 \001(\t\022\031" + + "\n\021msgProcessFilterK\030\r \001(\t\022\031\n\021msgProcessF" + + "ilterV\030\016 \001(\t\022\023\n\004user\030\017 \001(\0132\005.User\022\030\n\020anc" + + "horFoldTypeV2\030\021 \001(\004\022\032\n\022processAtSeiTimeM" + + "s\030\022 \001(\004\022\030\n\020randomDispatchMs\030\023 \001(\004\022\022\n\nisD" + + "ispatch\030\024 \001(\010\022\021\n\tchannelId\030\025 \001(\r\022\031\n\021diff" + + "Sei2absSecond\030\026 \001(\004\022\032\n\022anchorFoldDuratio" + + "n\030\027 \001(\004B8\n6tech.ordinaryroad.live.chat.c" + + "lient.douyin.protobuf.dtob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor(), + }); + internal_static_Common_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Common_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Common_descriptor, + new java.lang.String[] { "Method", "MsgId", "RoomId", "CreateTime", "Monitor", "IsShowMsg", "Describe", "FoldType", "AnchorFoldType", "PriorityScore", "LogId", "MsgProcessFilterK", "MsgProcessFilterV", "User", "AnchorFoldTypeV2", "ProcessAtSeiTimeMs", "RandomDispatchMs", "IsDispatch", "ChannelId", "DiffSei2AbsSecond", "AnchorFoldDuration", }); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/DoubleLikeDetailOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/DoubleLikeDetailOuterClass.java new file mode 100644 index 0000000..20a7381 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/DoubleLikeDetailOuterClass.java @@ -0,0 +1,767 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: DoubleLikeDetail.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class DoubleLikeDetailOuterClass { + private DoubleLikeDetailOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface DoubleLikeDetailOrBuilder extends + // @@protoc_insertion_point(interface_extends:DoubleLikeDetail) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>bool doubleFlag = 1;</code> + * @return The doubleFlag. + */ + boolean getDoubleFlag(); + + /** + * <code>uint32 seqId = 2;</code> + * @return The seqId. + */ + int getSeqId(); + + /** + * <code>uint32 renewalsNum = 3;</code> + * @return The renewalsNum. + */ + int getRenewalsNum(); + + /** + * <code>uint32 triggersNum = 4;</code> + * @return The triggersNum. + */ + int getTriggersNum(); + } + /** + * Protobuf type {@code DoubleLikeDetail} + */ + public static final class DoubleLikeDetail extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:DoubleLikeDetail) + DoubleLikeDetailOrBuilder { + private static final long serialVersionUID = 0L; + // Use DoubleLikeDetail.newBuilder() to construct. + private DoubleLikeDetail(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private DoubleLikeDetail() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DoubleLikeDetail(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.internal_static_DoubleLikeDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.internal_static_DoubleLikeDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.Builder.class); + } + + public static final int DOUBLEFLAG_FIELD_NUMBER = 1; + private boolean doubleFlag_ = false; + /** + * <code>bool doubleFlag = 1;</code> + * @return The doubleFlag. + */ + @java.lang.Override + public boolean getDoubleFlag() { + return doubleFlag_; + } + + public static final int SEQID_FIELD_NUMBER = 2; + private int seqId_ = 0; + /** + * <code>uint32 seqId = 2;</code> + * @return The seqId. + */ + @java.lang.Override + public int getSeqId() { + return seqId_; + } + + public static final int RENEWALSNUM_FIELD_NUMBER = 3; + private int renewalsNum_ = 0; + /** + * <code>uint32 renewalsNum = 3;</code> + * @return The renewalsNum. + */ + @java.lang.Override + public int getRenewalsNum() { + return renewalsNum_; + } + + public static final int TRIGGERSNUM_FIELD_NUMBER = 4; + private int triggersNum_ = 0; + /** + * <code>uint32 triggersNum = 4;</code> + * @return The triggersNum. + */ + @java.lang.Override + public int getTriggersNum() { + return triggersNum_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (doubleFlag_ != false) { + output.writeBool(1, doubleFlag_); + } + if (seqId_ != 0) { + output.writeUInt32(2, seqId_); + } + if (renewalsNum_ != 0) { + output.writeUInt32(3, renewalsNum_); + } + if (triggersNum_ != 0) { + output.writeUInt32(4, triggersNum_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (doubleFlag_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, doubleFlag_); + } + if (seqId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, seqId_); + } + if (renewalsNum_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, renewalsNum_); + } + if (triggersNum_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, triggersNum_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail) obj; + + if (getDoubleFlag() + != other.getDoubleFlag()) return false; + if (getSeqId() + != other.getSeqId()) return false; + if (getRenewalsNum() + != other.getRenewalsNum()) return false; + if (getTriggersNum() + != other.getTriggersNum()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DOUBLEFLAG_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDoubleFlag()); + hash = (37 * hash) + SEQID_FIELD_NUMBER; + hash = (53 * hash) + getSeqId(); + hash = (37 * hash) + RENEWALSNUM_FIELD_NUMBER; + hash = (53 * hash) + getRenewalsNum(); + hash = (37 * hash) + TRIGGERSNUM_FIELD_NUMBER; + hash = (53 * hash) + getTriggersNum(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code DoubleLikeDetail} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:DoubleLikeDetail) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetailOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.internal_static_DoubleLikeDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.internal_static_DoubleLikeDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + doubleFlag_ = false; + seqId_ = 0; + renewalsNum_ = 0; + triggersNum_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.internal_static_DoubleLikeDetail_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.doubleFlag_ = doubleFlag_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.seqId_ = seqId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.renewalsNum_ = renewalsNum_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.triggersNum_ = triggersNum_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail.getDefaultInstance()) return this; + if (other.getDoubleFlag() != false) { + setDoubleFlag(other.getDoubleFlag()); + } + if (other.getSeqId() != 0) { + setSeqId(other.getSeqId()); + } + if (other.getRenewalsNum() != 0) { + setRenewalsNum(other.getRenewalsNum()); + } + if (other.getTriggersNum() != 0) { + setTriggersNum(other.getTriggersNum()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + doubleFlag_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + seqId_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + renewalsNum_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + triggersNum_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean doubleFlag_ ; + /** + * <code>bool doubleFlag = 1;</code> + * @return The doubleFlag. + */ + @java.lang.Override + public boolean getDoubleFlag() { + return doubleFlag_; + } + /** + * <code>bool doubleFlag = 1;</code> + * @param value The doubleFlag to set. + * @return This builder for chaining. + */ + public Builder setDoubleFlag(boolean value) { + + doubleFlag_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>bool doubleFlag = 1;</code> + * @return This builder for chaining. + */ + public Builder clearDoubleFlag() { + bitField0_ = (bitField0_ & ~0x00000001); + doubleFlag_ = false; + onChanged(); + return this; + } + + private int seqId_ ; + /** + * <code>uint32 seqId = 2;</code> + * @return The seqId. + */ + @java.lang.Override + public int getSeqId() { + return seqId_; + } + /** + * <code>uint32 seqId = 2;</code> + * @param value The seqId to set. + * @return This builder for chaining. + */ + public Builder setSeqId(int value) { + + seqId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>uint32 seqId = 2;</code> + * @return This builder for chaining. + */ + public Builder clearSeqId() { + bitField0_ = (bitField0_ & ~0x00000002); + seqId_ = 0; + onChanged(); + return this; + } + + private int renewalsNum_ ; + /** + * <code>uint32 renewalsNum = 3;</code> + * @return The renewalsNum. + */ + @java.lang.Override + public int getRenewalsNum() { + return renewalsNum_; + } + /** + * <code>uint32 renewalsNum = 3;</code> + * @param value The renewalsNum to set. + * @return This builder for chaining. + */ + public Builder setRenewalsNum(int value) { + + renewalsNum_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint32 renewalsNum = 3;</code> + * @return This builder for chaining. + */ + public Builder clearRenewalsNum() { + bitField0_ = (bitField0_ & ~0x00000004); + renewalsNum_ = 0; + onChanged(); + return this; + } + + private int triggersNum_ ; + /** + * <code>uint32 triggersNum = 4;</code> + * @return The triggersNum. + */ + @java.lang.Override + public int getTriggersNum() { + return triggersNum_; + } + /** + * <code>uint32 triggersNum = 4;</code> + * @param value The triggersNum to set. + * @return This builder for chaining. + */ + public Builder setTriggersNum(int value) { + + triggersNum_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint32 triggersNum = 4;</code> + * @return This builder for chaining. + */ + public Builder clearTriggersNum() { + bitField0_ = (bitField0_ & ~0x00000008); + triggersNum_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:DoubleLikeDetail) + } + + // @@protoc_insertion_point(class_scope:DoubleLikeDetail) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<DoubleLikeDetail> + PARSER = new com.google.protobuf.AbstractParser<DoubleLikeDetail>() { + @java.lang.Override + public DoubleLikeDetail parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<DoubleLikeDetail> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<DoubleLikeDetail> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.DoubleLikeDetailOuterClass.DoubleLikeDetail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_DoubleLikeDetail_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_DoubleLikeDetail_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026DoubleLikeDetail.proto\"_\n\020DoubleLikeDe" + + "tail\022\022\n\ndoubleFlag\030\001 \001(\010\022\r\n\005seqId\030\002 \001(\r\022" + + "\023\n\013renewalsNum\030\003 \001(\r\022\023\n\013triggersNum\030\004 \001(" + + "\rB8\n6tech.ordinaryroad.live.chat.client." + + "douyin.protobuf.dtob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_DoubleLikeDetail_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_DoubleLikeDetail_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_DoubleLikeDetail_descriptor, + new java.lang.String[] { "DoubleFlag", "SeqId", "RenewalsNum", "TriggersNum", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/GiftIMPriorityOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/GiftIMPriorityOuterClass.java new file mode 100644 index 0000000..79765e3 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/GiftIMPriorityOuterClass.java @@ -0,0 +1,816 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: GiftIMPriority.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class GiftIMPriorityOuterClass { + private GiftIMPriorityOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface GiftIMPriorityOrBuilder extends + // @@protoc_insertion_point(interface_extends:GiftIMPriority) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>repeated uint64 queue_sizes_list = 1;</code> + * @return A list containing the queueSizesList. + */ + java.util.List<java.lang.Long> getQueueSizesListList(); + /** + * <code>repeated uint64 queue_sizes_list = 1;</code> + * @return The count of queueSizesList. + */ + int getQueueSizesListCount(); + /** + * <code>repeated uint64 queue_sizes_list = 1;</code> + * @param index The index of the element to return. + * @return The queueSizesList at the given index. + */ + long getQueueSizesList(int index); + + /** + * <code>uint64 self_queue_priority = 2;</code> + * @return The selfQueuePriority. + */ + long getSelfQueuePriority(); + + /** + * <code>uint64 priority = 3;</code> + * @return The priority. + */ + long getPriority(); + } + /** + * Protobuf type {@code GiftIMPriority} + */ + public static final class GiftIMPriority extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:GiftIMPriority) + GiftIMPriorityOrBuilder { + private static final long serialVersionUID = 0L; + // Use GiftIMPriority.newBuilder() to construct. + private GiftIMPriority(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private GiftIMPriority() { + queueSizesList_ = emptyLongList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GiftIMPriority(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.internal_static_GiftIMPriority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.internal_static_GiftIMPriority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.Builder.class); + } + + public static final int QUEUE_SIZES_LIST_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList queueSizesList_; + /** + * <code>repeated uint64 queue_sizes_list = 1;</code> + * @return A list containing the queueSizesList. + */ + @java.lang.Override + public java.util.List<java.lang.Long> + getQueueSizesListList() { + return queueSizesList_; + } + /** + * <code>repeated uint64 queue_sizes_list = 1;</code> + * @return The count of queueSizesList. + */ + public int getQueueSizesListCount() { + return queueSizesList_.size(); + } + /** + * <code>repeated uint64 queue_sizes_list = 1;</code> + * @param index The index of the element to return. + * @return The queueSizesList at the given index. + */ + public long getQueueSizesList(int index) { + return queueSizesList_.getLong(index); + } + private int queueSizesListMemoizedSerializedSize = -1; + + public static final int SELF_QUEUE_PRIORITY_FIELD_NUMBER = 2; + private long selfQueuePriority_ = 0L; + /** + * <code>uint64 self_queue_priority = 2;</code> + * @return The selfQueuePriority. + */ + @java.lang.Override + public long getSelfQueuePriority() { + return selfQueuePriority_; + } + + public static final int PRIORITY_FIELD_NUMBER = 3; + private long priority_ = 0L; + /** + * <code>uint64 priority = 3;</code> + * @return The priority. + */ + @java.lang.Override + public long getPriority() { + return priority_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (getQueueSizesListList().size() > 0) { + output.writeUInt32NoTag(10); + output.writeUInt32NoTag(queueSizesListMemoizedSerializedSize); + } + for (int i = 0; i < queueSizesList_.size(); i++) { + output.writeUInt64NoTag(queueSizesList_.getLong(i)); + } + if (selfQueuePriority_ != 0L) { + output.writeUInt64(2, selfQueuePriority_); + } + if (priority_ != 0L) { + output.writeUInt64(3, priority_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < queueSizesList_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt64SizeNoTag(queueSizesList_.getLong(i)); + } + size += dataSize; + if (!getQueueSizesListList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + queueSizesListMemoizedSerializedSize = dataSize; + } + if (selfQueuePriority_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, selfQueuePriority_); + } + if (priority_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, priority_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority) obj; + + if (!getQueueSizesListList() + .equals(other.getQueueSizesListList())) return false; + if (getSelfQueuePriority() + != other.getSelfQueuePriority()) return false; + if (getPriority() + != other.getPriority()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getQueueSizesListCount() > 0) { + hash = (37 * hash) + QUEUE_SIZES_LIST_FIELD_NUMBER; + hash = (53 * hash) + getQueueSizesListList().hashCode(); + } + hash = (37 * hash) + SELF_QUEUE_PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSelfQueuePriority()); + hash = (37 * hash) + PRIORITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPriority()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code GiftIMPriority} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:GiftIMPriority) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriorityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.internal_static_GiftIMPriority_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.internal_static_GiftIMPriority_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + queueSizesList_ = emptyLongList(); + selfQueuePriority_ = 0L; + priority_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.internal_static_GiftIMPriority_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority result) { + if (((bitField0_ & 0x00000001) != 0)) { + queueSizesList_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.queueSizesList_ = queueSizesList_; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.selfQueuePriority_ = selfQueuePriority_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.priority_ = priority_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority.getDefaultInstance()) return this; + if (!other.queueSizesList_.isEmpty()) { + if (queueSizesList_.isEmpty()) { + queueSizesList_ = other.queueSizesList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQueueSizesListIsMutable(); + queueSizesList_.addAll(other.queueSizesList_); + } + onChanged(); + } + if (other.getSelfQueuePriority() != 0L) { + setSelfQueuePriority(other.getSelfQueuePriority()); + } + if (other.getPriority() != 0L) { + setPriority(other.getPriority()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + long v = input.readUInt64(); + ensureQueueSizesListIsMutable(); + queueSizesList_.addLong(v); + break; + } // case 8 + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureQueueSizesListIsMutable(); + while (input.getBytesUntilLimit() > 0) { + queueSizesList_.addLong(input.readUInt64()); + } + input.popLimit(limit); + break; + } // case 10 + case 16: { + selfQueuePriority_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + priority_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.LongList queueSizesList_ = emptyLongList(); + private void ensureQueueSizesListIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + queueSizesList_ = mutableCopy(queueSizesList_); + bitField0_ |= 0x00000001; + } + } + /** + * <code>repeated uint64 queue_sizes_list = 1;</code> + * @return A list containing the queueSizesList. + */ + public java.util.List<java.lang.Long> + getQueueSizesListList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(queueSizesList_) : queueSizesList_; + } + /** + * <code>repeated uint64 queue_sizes_list = 1;</code> + * @return The count of queueSizesList. + */ + public int getQueueSizesListCount() { + return queueSizesList_.size(); + } + /** + * <code>repeated uint64 queue_sizes_list = 1;</code> + * @param index The index of the element to return. + * @return The queueSizesList at the given index. + */ + public long getQueueSizesList(int index) { + return queueSizesList_.getLong(index); + } + /** + * <code>repeated uint64 queue_sizes_list = 1;</code> + * @param index The index to set the value at. + * @param value The queueSizesList to set. + * @return This builder for chaining. + */ + public Builder setQueueSizesList( + int index, long value) { + + ensureQueueSizesListIsMutable(); + queueSizesList_.setLong(index, value); + onChanged(); + return this; + } + /** + * <code>repeated uint64 queue_sizes_list = 1;</code> + * @param value The queueSizesList to add. + * @return This builder for chaining. + */ + public Builder addQueueSizesList(long value) { + + ensureQueueSizesListIsMutable(); + queueSizesList_.addLong(value); + onChanged(); + return this; + } + /** + * <code>repeated uint64 queue_sizes_list = 1;</code> + * @param values The queueSizesList to add. + * @return This builder for chaining. + */ + public Builder addAllQueueSizesList( + java.lang.Iterable<? extends java.lang.Long> values) { + ensureQueueSizesListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, queueSizesList_); + onChanged(); + return this; + } + /** + * <code>repeated uint64 queue_sizes_list = 1;</code> + * @return This builder for chaining. + */ + public Builder clearQueueSizesList() { + queueSizesList_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private long selfQueuePriority_ ; + /** + * <code>uint64 self_queue_priority = 2;</code> + * @return The selfQueuePriority. + */ + @java.lang.Override + public long getSelfQueuePriority() { + return selfQueuePriority_; + } + /** + * <code>uint64 self_queue_priority = 2;</code> + * @param value The selfQueuePriority to set. + * @return This builder for chaining. + */ + public Builder setSelfQueuePriority(long value) { + + selfQueuePriority_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>uint64 self_queue_priority = 2;</code> + * @return This builder for chaining. + */ + public Builder clearSelfQueuePriority() { + bitField0_ = (bitField0_ & ~0x00000002); + selfQueuePriority_ = 0L; + onChanged(); + return this; + } + + private long priority_ ; + /** + * <code>uint64 priority = 3;</code> + * @return The priority. + */ + @java.lang.Override + public long getPriority() { + return priority_; + } + /** + * <code>uint64 priority = 3;</code> + * @param value The priority to set. + * @return This builder for chaining. + */ + public Builder setPriority(long value) { + + priority_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 priority = 3;</code> + * @return This builder for chaining. + */ + public Builder clearPriority() { + bitField0_ = (bitField0_ & ~0x00000004); + priority_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:GiftIMPriority) + } + + // @@protoc_insertion_point(class_scope:GiftIMPriority) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<GiftIMPriority> + PARSER = new com.google.protobuf.AbstractParser<GiftIMPriority>() { + @java.lang.Override + public GiftIMPriority parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<GiftIMPriority> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<GiftIMPriority> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftIMPriorityOuterClass.GiftIMPriority getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GiftIMPriority_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_GiftIMPriority_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024GiftIMPriority.proto\"Y\n\016GiftIMPriority" + + "\022\030\n\020queue_sizes_list\030\001 \003(\004\022\033\n\023self_queue" + + "_priority\030\002 \001(\004\022\020\n\010priority\030\003 \001(\004B8\n6tec" + + "h.ordinaryroad.live.chat.client.douyin.p" + + "rotobuf.dtob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_GiftIMPriority_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_GiftIMPriority_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_GiftIMPriority_descriptor, + new java.lang.String[] { "QueueSizesList", "SelfQueuePriority", "Priority", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/GiftStructOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/GiftStructOuterClass.java new file mode 100644 index 0000000..e4e15b3 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/GiftStructOuterClass.java @@ -0,0 +1,6440 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: GiftStruct.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class GiftStructOuterClass { + private GiftStructOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface GiftStructOrBuilder extends + // @@protoc_insertion_point(interface_extends:GiftStruct) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.Image image = 1;</code> + * @return Whether the image field is set. + */ + boolean hasImage(); + /** + * <code>.Image image = 1;</code> + * @return The image. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getImage(); + /** + * <code>.Image image = 1;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImageOrBuilder(); + + /** + * <code>string describe = 2;</code> + * @return The describe. + */ + java.lang.String getDescribe(); + /** + * <code>string describe = 2;</code> + * @return The bytes for describe. + */ + com.google.protobuf.ByteString + getDescribeBytes(); + + /** + * <code>bool notify = 3;</code> + * @return The notify. + */ + boolean getNotify(); + + /** + * <code>uint64 duration = 4;</code> + * @return The duration. + */ + long getDuration(); + + /** + * <code>uint64 id = 5;</code> + * @return The id. + */ + long getId(); + + /** + * <pre> + * GiftStructFansClubInfo fansclubInfo = 6; + * </pre> + * + * <code>bool for_linkmic = 7;</code> + * @return The forLinkmic. + */ + boolean getForLinkmic(); + + /** + * <code>bool doodle = 8;</code> + * @return The doodle. + */ + boolean getDoodle(); + + /** + * <code>bool for_fansclub = 9;</code> + * @return The forFansclub. + */ + boolean getForFansclub(); + + /** + * <code>bool combo = 10;</code> + * @return The combo. + */ + boolean getCombo(); + + /** + * <code>uint32 type = 11;</code> + * @return The type. + */ + int getType(); + + /** + * <code>uint32 diamond_count = 12;</code> + * @return The diamondCount. + */ + int getDiamondCount(); + + /** + * <code>bool is_displayed_on_panel = 13;</code> + * @return The isDisplayedOnPanel. + */ + boolean getIsDisplayedOnPanel(); + + /** + * <code>uint64 primary_effect_id = 14;</code> + * @return The primaryEffectId. + */ + long getPrimaryEffectId(); + + /** + * <code>.Image gift_label_icon = 15;</code> + * @return Whether the giftLabelIcon field is set. + */ + boolean hasGiftLabelIcon(); + /** + * <code>.Image gift_label_icon = 15;</code> + * @return The giftLabelIcon. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getGiftLabelIcon(); + /** + * <code>.Image gift_label_icon = 15;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getGiftLabelIconOrBuilder(); + + /** + * <code>string name = 16;</code> + * @return The name. + */ + java.lang.String getName(); + /** + * <code>string name = 16;</code> + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * <code>string region = 17;</code> + * @return The region. + */ + java.lang.String getRegion(); + /** + * <code>string region = 17;</code> + * @return The bytes for region. + */ + com.google.protobuf.ByteString + getRegionBytes(); + + /** + * <code>string manual = 18;</code> + * @return The manual. + */ + java.lang.String getManual(); + /** + * <code>string manual = 18;</code> + * @return The bytes for manual. + */ + com.google.protobuf.ByteString + getManualBytes(); + + /** + * <code>bool for_custom = 19;</code> + * @return The forCustom. + */ + boolean getForCustom(); + + /** + * <code>map<string, int64> specialEffectsMap = 20;</code> + */ + int getSpecialEffectsMapCount(); + /** + * <code>map<string, int64> specialEffectsMap = 20;</code> + */ + boolean containsSpecialEffectsMap( + java.lang.String key); + /** + * Use {@link #getSpecialEffectsMapMap()} instead. + */ + @java.lang.Deprecated + java.util.Map<java.lang.String, java.lang.Long> + getSpecialEffectsMap(); + /** + * <code>map<string, int64> specialEffectsMap = 20;</code> + */ + java.util.Map<java.lang.String, java.lang.Long> + getSpecialEffectsMapMap(); + /** + * <code>map<string, int64> specialEffectsMap = 20;</code> + */ + long getSpecialEffectsMapOrDefault( + java.lang.String key, + long defaultValue); + /** + * <code>map<string, int64> specialEffectsMap = 20;</code> + */ + long getSpecialEffectsMapOrThrow( + java.lang.String key); + + /** + * <code>.Image icon = 21;</code> + * @return Whether the icon field is set. + */ + boolean hasIcon(); + /** + * <code>.Image icon = 21;</code> + * @return The icon. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getIcon(); + /** + * <code>.Image icon = 21;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder(); + + /** + * <code>uint32 action_type = 22;</code> + * @return The actionType. + */ + int getActionType(); + + /** + * <code>int32 watermelonSeeds = 23;</code> + * @return The watermelonSeeds. + */ + int getWatermelonSeeds(); + + /** + * <code>string goldEffect = 24;</code> + * @return The goldEffect. + */ + java.lang.String getGoldEffect(); + /** + * <code>string goldEffect = 24;</code> + * @return The bytes for goldEffect. + */ + com.google.protobuf.ByteString + getGoldEffectBytes(); + + /** + * <pre> + * repeated LuckyMoneyGiftMeta subs = 25; + * </pre> + * + * <code>int64 goldenBeans = 26;</code> + * @return The goldenBeans. + */ + long getGoldenBeans(); + + /** + * <code>int64 honorLevel = 27;</code> + * @return The honorLevel. + */ + long getHonorLevel(); + + /** + * <code>int32 itemType = 28;</code> + * @return The itemType. + */ + int getItemType(); + + /** + * <code>string schemeUrl = 29;</code> + * @return The schemeUrl. + */ + java.lang.String getSchemeUrl(); + /** + * <code>string schemeUrl = 29;</code> + * @return The bytes for schemeUrl. + */ + com.google.protobuf.ByteString + getSchemeUrlBytes(); + + /** + * <pre> + * GiftPanelOperation giftOperation = 30; + * </pre> + * + * <code>string eventName = 31;</code> + * @return The eventName. + */ + java.lang.String getEventName(); + /** + * <pre> + * GiftPanelOperation giftOperation = 30; + * </pre> + * + * <code>string eventName = 31;</code> + * @return The bytes for eventName. + */ + com.google.protobuf.ByteString + getEventNameBytes(); + + /** + * <code>int64 nobleLevel = 32;</code> + * @return The nobleLevel. + */ + long getNobleLevel(); + + /** + * <code>string guideUrl = 33;</code> + * @return The guideUrl. + */ + java.lang.String getGuideUrl(); + /** + * <code>string guideUrl = 33;</code> + * @return The bytes for guideUrl. + */ + com.google.protobuf.ByteString + getGuideUrlBytes(); + + /** + * <code>bool punishMedicine = 34;</code> + * @return The punishMedicine. + */ + boolean getPunishMedicine(); + + /** + * <code>bool forPortal = 35;</code> + * @return The forPortal. + */ + boolean getForPortal(); + + /** + * <code>string businessText = 36;</code> + * @return The businessText. + */ + java.lang.String getBusinessText(); + /** + * <code>string businessText = 36;</code> + * @return The bytes for businessText. + */ + com.google.protobuf.ByteString + getBusinessTextBytes(); + + /** + * <code>bool cnyGift = 37;</code> + * @return The cnyGift. + */ + boolean getCnyGift(); + + /** + * <code>int64 appId = 38;</code> + * @return The appId. + */ + long getAppId(); + + /** + * <code>int64 vipLevel = 39;</code> + * @return The vipLevel. + */ + long getVipLevel(); + + /** + * <code>bool isGray = 40;</code> + * @return The isGray. + */ + boolean getIsGray(); + + /** + * <code>string graySchemeUrl = 41;</code> + * @return The graySchemeUrl. + */ + java.lang.String getGraySchemeUrl(); + /** + * <code>string graySchemeUrl = 41;</code> + * @return The bytes for graySchemeUrl. + */ + com.google.protobuf.ByteString + getGraySchemeUrlBytes(); + + /** + * <code>int64 giftScene = 42;</code> + * @return The giftScene. + */ + long getGiftScene(); + + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @return A list containing the triggerWords. + */ + java.util.List<java.lang.String> + getTriggerWordsList(); + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @return The count of triggerWords. + */ + int getTriggerWordsCount(); + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @param index The index of the element to return. + * @return The triggerWords at the given index. + */ + java.lang.String getTriggerWords(int index); + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @param index The index of the value to return. + * @return The bytes of the triggerWords at the given index. + */ + com.google.protobuf.ByteString + getTriggerWordsBytes(int index); + + /** + * <pre> + * repeated GiftBuffInfo giftBuffInfos = 45; + * </pre> + * + * <code>bool forFirstRecharge = 46;</code> + * @return The forFirstRecharge. + */ + boolean getForFirstRecharge(); + + /** + * <code>.Image dynamicImgForSelected = 47;</code> + * @return Whether the dynamicImgForSelected field is set. + */ + boolean hasDynamicImgForSelected(); + /** + * <code>.Image dynamicImgForSelected = 47;</code> + * @return The dynamicImgForSelected. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getDynamicImgForSelected(); + /** + * <code>.Image dynamicImgForSelected = 47;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getDynamicImgForSelectedOrBuilder(); + + /** + * <code>int32 afterSendAction = 48;</code> + * @return The afterSendAction. + */ + int getAfterSendAction(); + + /** + * <code>int64 giftOfflineTime = 49;</code> + * @return The giftOfflineTime. + */ + long getGiftOfflineTime(); + + /** + * <code>string topBarText = 50;</code> + * @return The topBarText. + */ + java.lang.String getTopBarText(); + /** + * <code>string topBarText = 50;</code> + * @return The bytes for topBarText. + */ + com.google.protobuf.ByteString + getTopBarTextBytes(); + + /** + * <code>.Image topRightAvatar = 51;</code> + * @return Whether the topRightAvatar field is set. + */ + boolean hasTopRightAvatar(); + /** + * <code>.Image topRightAvatar = 51;</code> + * @return The topRightAvatar. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getTopRightAvatar(); + /** + * <code>.Image topRightAvatar = 51;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getTopRightAvatarOrBuilder(); + + /** + * <code>string bannerSchemeUrl = 52;</code> + * @return The bannerSchemeUrl. + */ + java.lang.String getBannerSchemeUrl(); + /** + * <code>string bannerSchemeUrl = 52;</code> + * @return The bytes for bannerSchemeUrl. + */ + com.google.protobuf.ByteString + getBannerSchemeUrlBytes(); + + /** + * <code>bool isLocked = 53;</code> + * @return The isLocked. + */ + boolean getIsLocked(); + + /** + * <code>int64 reqExtraType = 54;</code> + * @return The reqExtraType. + */ + long getReqExtraType(); + + /** + * <code>repeated int64 assetIds = 55;</code> + * @return A list containing the assetIds. + */ + java.util.List<java.lang.Long> getAssetIdsList(); + /** + * <code>repeated int64 assetIds = 55;</code> + * @return The count of assetIds. + */ + int getAssetIdsCount(); + /** + * <code>repeated int64 assetIds = 55;</code> + * @param index The index of the element to return. + * @return The assetIds at the given index. + */ + long getAssetIds(int index); + + /** + * <pre> + * GiftPreviewInfo giftPreviewInfo = 56; + * GiftTip giftTip = 57; + * </pre> + * + * <code>int32 needSweepLightCount = 58;</code> + * @return The needSweepLightCount. + */ + int getNeedSweepLightCount(); + } + /** + * Protobuf type {@code GiftStruct} + */ + public static final class GiftStruct extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:GiftStruct) + GiftStructOrBuilder { + private static final long serialVersionUID = 0L; + // Use GiftStruct.newBuilder() to construct. + private GiftStruct(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private GiftStruct() { + describe_ = ""; + name_ = ""; + region_ = ""; + manual_ = ""; + goldEffect_ = ""; + schemeUrl_ = ""; + eventName_ = ""; + guideUrl_ = ""; + businessText_ = ""; + graySchemeUrl_ = ""; + triggerWords_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + topBarText_ = ""; + bannerSchemeUrl_ = ""; + assetIds_ = emptyLongList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GiftStruct(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.internal_static_GiftStruct_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 20: + return internalGetSpecialEffectsMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.internal_static_GiftStruct_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.Builder.class); + } + + public static final int IMAGE_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image image_; + /** + * <code>.Image image = 1;</code> + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return image_ != null; + } + /** + * <code>.Image image = 1;</code> + * @return The image. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getImage() { + return image_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : image_; + } + /** + * <code>.Image image = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImageOrBuilder() { + return image_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : image_; + } + + public static final int DESCRIBE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object describe_ = ""; + /** + * <code>string describe = 2;</code> + * @return The describe. + */ + @java.lang.Override + public java.lang.String getDescribe() { + java.lang.Object ref = describe_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + describe_ = s; + return s; + } + } + /** + * <code>string describe = 2;</code> + * @return The bytes for describe. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescribeBytes() { + java.lang.Object ref = describe_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + describe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTIFY_FIELD_NUMBER = 3; + private boolean notify_ = false; + /** + * <code>bool notify = 3;</code> + * @return The notify. + */ + @java.lang.Override + public boolean getNotify() { + return notify_; + } + + public static final int DURATION_FIELD_NUMBER = 4; + private long duration_ = 0L; + /** + * <code>uint64 duration = 4;</code> + * @return The duration. + */ + @java.lang.Override + public long getDuration() { + return duration_; + } + + public static final int ID_FIELD_NUMBER = 5; + private long id_ = 0L; + /** + * <code>uint64 id = 5;</code> + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + + public static final int FOR_LINKMIC_FIELD_NUMBER = 7; + private boolean forLinkmic_ = false; + /** + * <pre> + * GiftStructFansClubInfo fansclubInfo = 6; + * </pre> + * + * <code>bool for_linkmic = 7;</code> + * @return The forLinkmic. + */ + @java.lang.Override + public boolean getForLinkmic() { + return forLinkmic_; + } + + public static final int DOODLE_FIELD_NUMBER = 8; + private boolean doodle_ = false; + /** + * <code>bool doodle = 8;</code> + * @return The doodle. + */ + @java.lang.Override + public boolean getDoodle() { + return doodle_; + } + + public static final int FOR_FANSCLUB_FIELD_NUMBER = 9; + private boolean forFansclub_ = false; + /** + * <code>bool for_fansclub = 9;</code> + * @return The forFansclub. + */ + @java.lang.Override + public boolean getForFansclub() { + return forFansclub_; + } + + public static final int COMBO_FIELD_NUMBER = 10; + private boolean combo_ = false; + /** + * <code>bool combo = 10;</code> + * @return The combo. + */ + @java.lang.Override + public boolean getCombo() { + return combo_; + } + + public static final int TYPE_FIELD_NUMBER = 11; + private int type_ = 0; + /** + * <code>uint32 type = 11;</code> + * @return The type. + */ + @java.lang.Override + public int getType() { + return type_; + } + + public static final int DIAMOND_COUNT_FIELD_NUMBER = 12; + private int diamondCount_ = 0; + /** + * <code>uint32 diamond_count = 12;</code> + * @return The diamondCount. + */ + @java.lang.Override + public int getDiamondCount() { + return diamondCount_; + } + + public static final int IS_DISPLAYED_ON_PANEL_FIELD_NUMBER = 13; + private boolean isDisplayedOnPanel_ = false; + /** + * <code>bool is_displayed_on_panel = 13;</code> + * @return The isDisplayedOnPanel. + */ + @java.lang.Override + public boolean getIsDisplayedOnPanel() { + return isDisplayedOnPanel_; + } + + public static final int PRIMARY_EFFECT_ID_FIELD_NUMBER = 14; + private long primaryEffectId_ = 0L; + /** + * <code>uint64 primary_effect_id = 14;</code> + * @return The primaryEffectId. + */ + @java.lang.Override + public long getPrimaryEffectId() { + return primaryEffectId_; + } + + public static final int GIFT_LABEL_ICON_FIELD_NUMBER = 15; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image giftLabelIcon_; + /** + * <code>.Image gift_label_icon = 15;</code> + * @return Whether the giftLabelIcon field is set. + */ + @java.lang.Override + public boolean hasGiftLabelIcon() { + return giftLabelIcon_ != null; + } + /** + * <code>.Image gift_label_icon = 15;</code> + * @return The giftLabelIcon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getGiftLabelIcon() { + return giftLabelIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : giftLabelIcon_; + } + /** + * <code>.Image gift_label_icon = 15;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getGiftLabelIconOrBuilder() { + return giftLabelIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : giftLabelIcon_; + } + + public static final int NAME_FIELD_NUMBER = 16; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * <code>string name = 16;</code> + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * <code>string name = 16;</code> + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REGION_FIELD_NUMBER = 17; + @SuppressWarnings("serial") + private volatile java.lang.Object region_ = ""; + /** + * <code>string region = 17;</code> + * @return The region. + */ + @java.lang.Override + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } + } + /** + * <code>string region = 17;</code> + * @return The bytes for region. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MANUAL_FIELD_NUMBER = 18; + @SuppressWarnings("serial") + private volatile java.lang.Object manual_ = ""; + /** + * <code>string manual = 18;</code> + * @return The manual. + */ + @java.lang.Override + public java.lang.String getManual() { + java.lang.Object ref = manual_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + manual_ = s; + return s; + } + } + /** + * <code>string manual = 18;</code> + * @return The bytes for manual. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getManualBytes() { + java.lang.Object ref = manual_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + manual_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FOR_CUSTOM_FIELD_NUMBER = 19; + private boolean forCustom_ = false; + /** + * <code>bool for_custom = 19;</code> + * @return The forCustom. + */ + @java.lang.Override + public boolean getForCustom() { + return forCustom_; + } + + public static final int SPECIALEFFECTSMAP_FIELD_NUMBER = 20; + private static final class SpecialEffectsMapDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.Long> defaultEntry = + com.google.protobuf.MapEntry + .<java.lang.String, java.lang.Long>newDefaultInstance( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.internal_static_GiftStruct_SpecialEffectsMapEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.INT64, + 0L); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.Long> specialEffectsMap_; + private com.google.protobuf.MapField<java.lang.String, java.lang.Long> + internalGetSpecialEffectsMap() { + if (specialEffectsMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SpecialEffectsMapDefaultEntryHolder.defaultEntry); + } + return specialEffectsMap_; + } + public int getSpecialEffectsMapCount() { + return internalGetSpecialEffectsMap().getMap().size(); + } + /** + * <code>map<string, int64> specialEffectsMap = 20;</code> + */ + @java.lang.Override + public boolean containsSpecialEffectsMap( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetSpecialEffectsMap().getMap().containsKey(key); + } + /** + * Use {@link #getSpecialEffectsMapMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map<java.lang.String, java.lang.Long> getSpecialEffectsMap() { + return getSpecialEffectsMapMap(); + } + /** + * <code>map<string, int64> specialEffectsMap = 20;</code> + */ + @java.lang.Override + public java.util.Map<java.lang.String, java.lang.Long> getSpecialEffectsMapMap() { + return internalGetSpecialEffectsMap().getMap(); + } + /** + * <code>map<string, int64> specialEffectsMap = 20;</code> + */ + @java.lang.Override + public long getSpecialEffectsMapOrDefault( + java.lang.String key, + long defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map<java.lang.String, java.lang.Long> map = + internalGetSpecialEffectsMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * <code>map<string, int64> specialEffectsMap = 20;</code> + */ + @java.lang.Override + public long getSpecialEffectsMapOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map<java.lang.String, java.lang.Long> map = + internalGetSpecialEffectsMap().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ICON_FIELD_NUMBER = 21; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image icon_; + /** + * <code>.Image icon = 21;</code> + * @return Whether the icon field is set. + */ + @java.lang.Override + public boolean hasIcon() { + return icon_ != null; + } + /** + * <code>.Image icon = 21;</code> + * @return The icon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getIcon() { + return icon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + /** + * <code>.Image icon = 21;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder() { + return icon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + + public static final int ACTION_TYPE_FIELD_NUMBER = 22; + private int actionType_ = 0; + /** + * <code>uint32 action_type = 22;</code> + * @return The actionType. + */ + @java.lang.Override + public int getActionType() { + return actionType_; + } + + public static final int WATERMELONSEEDS_FIELD_NUMBER = 23; + private int watermelonSeeds_ = 0; + /** + * <code>int32 watermelonSeeds = 23;</code> + * @return The watermelonSeeds. + */ + @java.lang.Override + public int getWatermelonSeeds() { + return watermelonSeeds_; + } + + public static final int GOLDEFFECT_FIELD_NUMBER = 24; + @SuppressWarnings("serial") + private volatile java.lang.Object goldEffect_ = ""; + /** + * <code>string goldEffect = 24;</code> + * @return The goldEffect. + */ + @java.lang.Override + public java.lang.String getGoldEffect() { + java.lang.Object ref = goldEffect_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + goldEffect_ = s; + return s; + } + } + /** + * <code>string goldEffect = 24;</code> + * @return The bytes for goldEffect. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGoldEffectBytes() { + java.lang.Object ref = goldEffect_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + goldEffect_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GOLDENBEANS_FIELD_NUMBER = 26; + private long goldenBeans_ = 0L; + /** + * <pre> + * repeated LuckyMoneyGiftMeta subs = 25; + * </pre> + * + * <code>int64 goldenBeans = 26;</code> + * @return The goldenBeans. + */ + @java.lang.Override + public long getGoldenBeans() { + return goldenBeans_; + } + + public static final int HONORLEVEL_FIELD_NUMBER = 27; + private long honorLevel_ = 0L; + /** + * <code>int64 honorLevel = 27;</code> + * @return The honorLevel. + */ + @java.lang.Override + public long getHonorLevel() { + return honorLevel_; + } + + public static final int ITEMTYPE_FIELD_NUMBER = 28; + private int itemType_ = 0; + /** + * <code>int32 itemType = 28;</code> + * @return The itemType. + */ + @java.lang.Override + public int getItemType() { + return itemType_; + } + + public static final int SCHEMEURL_FIELD_NUMBER = 29; + @SuppressWarnings("serial") + private volatile java.lang.Object schemeUrl_ = ""; + /** + * <code>string schemeUrl = 29;</code> + * @return The schemeUrl. + */ + @java.lang.Override + public java.lang.String getSchemeUrl() { + java.lang.Object ref = schemeUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemeUrl_ = s; + return s; + } + } + /** + * <code>string schemeUrl = 29;</code> + * @return The bytes for schemeUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSchemeUrlBytes() { + java.lang.Object ref = schemeUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schemeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENTNAME_FIELD_NUMBER = 31; + @SuppressWarnings("serial") + private volatile java.lang.Object eventName_ = ""; + /** + * <pre> + * GiftPanelOperation giftOperation = 30; + * </pre> + * + * <code>string eventName = 31;</code> + * @return The eventName. + */ + @java.lang.Override + public java.lang.String getEventName() { + java.lang.Object ref = eventName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventName_ = s; + return s; + } + } + /** + * <pre> + * GiftPanelOperation giftOperation = 30; + * </pre> + * + * <code>string eventName = 31;</code> + * @return The bytes for eventName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEventNameBytes() { + java.lang.Object ref = eventName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + eventName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOBLELEVEL_FIELD_NUMBER = 32; + private long nobleLevel_ = 0L; + /** + * <code>int64 nobleLevel = 32;</code> + * @return The nobleLevel. + */ + @java.lang.Override + public long getNobleLevel() { + return nobleLevel_; + } + + public static final int GUIDEURL_FIELD_NUMBER = 33; + @SuppressWarnings("serial") + private volatile java.lang.Object guideUrl_ = ""; + /** + * <code>string guideUrl = 33;</code> + * @return The guideUrl. + */ + @java.lang.Override + public java.lang.String getGuideUrl() { + java.lang.Object ref = guideUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + guideUrl_ = s; + return s; + } + } + /** + * <code>string guideUrl = 33;</code> + * @return The bytes for guideUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGuideUrlBytes() { + java.lang.Object ref = guideUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + guideUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUNISHMEDICINE_FIELD_NUMBER = 34; + private boolean punishMedicine_ = false; + /** + * <code>bool punishMedicine = 34;</code> + * @return The punishMedicine. + */ + @java.lang.Override + public boolean getPunishMedicine() { + return punishMedicine_; + } + + public static final int FORPORTAL_FIELD_NUMBER = 35; + private boolean forPortal_ = false; + /** + * <code>bool forPortal = 35;</code> + * @return The forPortal. + */ + @java.lang.Override + public boolean getForPortal() { + return forPortal_; + } + + public static final int BUSINESSTEXT_FIELD_NUMBER = 36; + @SuppressWarnings("serial") + private volatile java.lang.Object businessText_ = ""; + /** + * <code>string businessText = 36;</code> + * @return The businessText. + */ + @java.lang.Override + public java.lang.String getBusinessText() { + java.lang.Object ref = businessText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + businessText_ = s; + return s; + } + } + /** + * <code>string businessText = 36;</code> + * @return The bytes for businessText. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBusinessTextBytes() { + java.lang.Object ref = businessText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + businessText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CNYGIFT_FIELD_NUMBER = 37; + private boolean cnyGift_ = false; + /** + * <code>bool cnyGift = 37;</code> + * @return The cnyGift. + */ + @java.lang.Override + public boolean getCnyGift() { + return cnyGift_; + } + + public static final int APPID_FIELD_NUMBER = 38; + private long appId_ = 0L; + /** + * <code>int64 appId = 38;</code> + * @return The appId. + */ + @java.lang.Override + public long getAppId() { + return appId_; + } + + public static final int VIPLEVEL_FIELD_NUMBER = 39; + private long vipLevel_ = 0L; + /** + * <code>int64 vipLevel = 39;</code> + * @return The vipLevel. + */ + @java.lang.Override + public long getVipLevel() { + return vipLevel_; + } + + public static final int ISGRAY_FIELD_NUMBER = 40; + private boolean isGray_ = false; + /** + * <code>bool isGray = 40;</code> + * @return The isGray. + */ + @java.lang.Override + public boolean getIsGray() { + return isGray_; + } + + public static final int GRAYSCHEMEURL_FIELD_NUMBER = 41; + @SuppressWarnings("serial") + private volatile java.lang.Object graySchemeUrl_ = ""; + /** + * <code>string graySchemeUrl = 41;</code> + * @return The graySchemeUrl. + */ + @java.lang.Override + public java.lang.String getGraySchemeUrl() { + java.lang.Object ref = graySchemeUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + graySchemeUrl_ = s; + return s; + } + } + /** + * <code>string graySchemeUrl = 41;</code> + * @return The bytes for graySchemeUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGraySchemeUrlBytes() { + java.lang.Object ref = graySchemeUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + graySchemeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GIFTSCENE_FIELD_NUMBER = 42; + private long giftScene_ = 0L; + /** + * <code>int64 giftScene = 42;</code> + * @return The giftScene. + */ + @java.lang.Override + public long getGiftScene() { + return giftScene_; + } + + public static final int TRIGGERWORDS_FIELD_NUMBER = 44; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList triggerWords_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @return A list containing the triggerWords. + */ + public com.google.protobuf.ProtocolStringList + getTriggerWordsList() { + return triggerWords_; + } + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @return The count of triggerWords. + */ + public int getTriggerWordsCount() { + return triggerWords_.size(); + } + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @param index The index of the element to return. + * @return The triggerWords at the given index. + */ + public java.lang.String getTriggerWords(int index) { + return triggerWords_.get(index); + } + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @param index The index of the value to return. + * @return The bytes of the triggerWords at the given index. + */ + public com.google.protobuf.ByteString + getTriggerWordsBytes(int index) { + return triggerWords_.getByteString(index); + } + + public static final int FORFIRSTRECHARGE_FIELD_NUMBER = 46; + private boolean forFirstRecharge_ = false; + /** + * <pre> + * repeated GiftBuffInfo giftBuffInfos = 45; + * </pre> + * + * <code>bool forFirstRecharge = 46;</code> + * @return The forFirstRecharge. + */ + @java.lang.Override + public boolean getForFirstRecharge() { + return forFirstRecharge_; + } + + public static final int DYNAMICIMGFORSELECTED_FIELD_NUMBER = 47; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image dynamicImgForSelected_; + /** + * <code>.Image dynamicImgForSelected = 47;</code> + * @return Whether the dynamicImgForSelected field is set. + */ + @java.lang.Override + public boolean hasDynamicImgForSelected() { + return dynamicImgForSelected_ != null; + } + /** + * <code>.Image dynamicImgForSelected = 47;</code> + * @return The dynamicImgForSelected. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getDynamicImgForSelected() { + return dynamicImgForSelected_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : dynamicImgForSelected_; + } + /** + * <code>.Image dynamicImgForSelected = 47;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getDynamicImgForSelectedOrBuilder() { + return dynamicImgForSelected_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : dynamicImgForSelected_; + } + + public static final int AFTERSENDACTION_FIELD_NUMBER = 48; + private int afterSendAction_ = 0; + /** + * <code>int32 afterSendAction = 48;</code> + * @return The afterSendAction. + */ + @java.lang.Override + public int getAfterSendAction() { + return afterSendAction_; + } + + public static final int GIFTOFFLINETIME_FIELD_NUMBER = 49; + private long giftOfflineTime_ = 0L; + /** + * <code>int64 giftOfflineTime = 49;</code> + * @return The giftOfflineTime. + */ + @java.lang.Override + public long getGiftOfflineTime() { + return giftOfflineTime_; + } + + public static final int TOPBARTEXT_FIELD_NUMBER = 50; + @SuppressWarnings("serial") + private volatile java.lang.Object topBarText_ = ""; + /** + * <code>string topBarText = 50;</code> + * @return The topBarText. + */ + @java.lang.Override + public java.lang.String getTopBarText() { + java.lang.Object ref = topBarText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topBarText_ = s; + return s; + } + } + /** + * <code>string topBarText = 50;</code> + * @return The bytes for topBarText. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTopBarTextBytes() { + java.lang.Object ref = topBarText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topBarText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOPRIGHTAVATAR_FIELD_NUMBER = 51; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image topRightAvatar_; + /** + * <code>.Image topRightAvatar = 51;</code> + * @return Whether the topRightAvatar field is set. + */ + @java.lang.Override + public boolean hasTopRightAvatar() { + return topRightAvatar_ != null; + } + /** + * <code>.Image topRightAvatar = 51;</code> + * @return The topRightAvatar. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getTopRightAvatar() { + return topRightAvatar_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : topRightAvatar_; + } + /** + * <code>.Image topRightAvatar = 51;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getTopRightAvatarOrBuilder() { + return topRightAvatar_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : topRightAvatar_; + } + + public static final int BANNERSCHEMEURL_FIELD_NUMBER = 52; + @SuppressWarnings("serial") + private volatile java.lang.Object bannerSchemeUrl_ = ""; + /** + * <code>string bannerSchemeUrl = 52;</code> + * @return The bannerSchemeUrl. + */ + @java.lang.Override + public java.lang.String getBannerSchemeUrl() { + java.lang.Object ref = bannerSchemeUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bannerSchemeUrl_ = s; + return s; + } + } + /** + * <code>string bannerSchemeUrl = 52;</code> + * @return The bytes for bannerSchemeUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBannerSchemeUrlBytes() { + java.lang.Object ref = bannerSchemeUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + bannerSchemeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ISLOCKED_FIELD_NUMBER = 53; + private boolean isLocked_ = false; + /** + * <code>bool isLocked = 53;</code> + * @return The isLocked. + */ + @java.lang.Override + public boolean getIsLocked() { + return isLocked_; + } + + public static final int REQEXTRATYPE_FIELD_NUMBER = 54; + private long reqExtraType_ = 0L; + /** + * <code>int64 reqExtraType = 54;</code> + * @return The reqExtraType. + */ + @java.lang.Override + public long getReqExtraType() { + return reqExtraType_; + } + + public static final int ASSETIDS_FIELD_NUMBER = 55; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList assetIds_; + /** + * <code>repeated int64 assetIds = 55;</code> + * @return A list containing the assetIds. + */ + @java.lang.Override + public java.util.List<java.lang.Long> + getAssetIdsList() { + return assetIds_; + } + /** + * <code>repeated int64 assetIds = 55;</code> + * @return The count of assetIds. + */ + public int getAssetIdsCount() { + return assetIds_.size(); + } + /** + * <code>repeated int64 assetIds = 55;</code> + * @param index The index of the element to return. + * @return The assetIds at the given index. + */ + public long getAssetIds(int index) { + return assetIds_.getLong(index); + } + private int assetIdsMemoizedSerializedSize = -1; + + public static final int NEEDSWEEPLIGHTCOUNT_FIELD_NUMBER = 58; + private int needSweepLightCount_ = 0; + /** + * <pre> + * GiftPreviewInfo giftPreviewInfo = 56; + * GiftTip giftTip = 57; + * </pre> + * + * <code>int32 needSweepLightCount = 58;</code> + * @return The needSweepLightCount. + */ + @java.lang.Override + public int getNeedSweepLightCount() { + return needSweepLightCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (image_ != null) { + output.writeMessage(1, getImage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(describe_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, describe_); + } + if (notify_ != false) { + output.writeBool(3, notify_); + } + if (duration_ != 0L) { + output.writeUInt64(4, duration_); + } + if (id_ != 0L) { + output.writeUInt64(5, id_); + } + if (forLinkmic_ != false) { + output.writeBool(7, forLinkmic_); + } + if (doodle_ != false) { + output.writeBool(8, doodle_); + } + if (forFansclub_ != false) { + output.writeBool(9, forFansclub_); + } + if (combo_ != false) { + output.writeBool(10, combo_); + } + if (type_ != 0) { + output.writeUInt32(11, type_); + } + if (diamondCount_ != 0) { + output.writeUInt32(12, diamondCount_); + } + if (isDisplayedOnPanel_ != false) { + output.writeBool(13, isDisplayedOnPanel_); + } + if (primaryEffectId_ != 0L) { + output.writeUInt64(14, primaryEffectId_); + } + if (giftLabelIcon_ != null) { + output.writeMessage(15, getGiftLabelIcon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, region_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(manual_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, manual_); + } + if (forCustom_ != false) { + output.writeBool(19, forCustom_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetSpecialEffectsMap(), + SpecialEffectsMapDefaultEntryHolder.defaultEntry, + 20); + if (icon_ != null) { + output.writeMessage(21, getIcon()); + } + if (actionType_ != 0) { + output.writeUInt32(22, actionType_); + } + if (watermelonSeeds_ != 0) { + output.writeInt32(23, watermelonSeeds_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(goldEffect_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 24, goldEffect_); + } + if (goldenBeans_ != 0L) { + output.writeInt64(26, goldenBeans_); + } + if (honorLevel_ != 0L) { + output.writeInt64(27, honorLevel_); + } + if (itemType_ != 0) { + output.writeInt32(28, itemType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemeUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 29, schemeUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 31, eventName_); + } + if (nobleLevel_ != 0L) { + output.writeInt64(32, nobleLevel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(guideUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 33, guideUrl_); + } + if (punishMedicine_ != false) { + output.writeBool(34, punishMedicine_); + } + if (forPortal_ != false) { + output.writeBool(35, forPortal_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(businessText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 36, businessText_); + } + if (cnyGift_ != false) { + output.writeBool(37, cnyGift_); + } + if (appId_ != 0L) { + output.writeInt64(38, appId_); + } + if (vipLevel_ != 0L) { + output.writeInt64(39, vipLevel_); + } + if (isGray_ != false) { + output.writeBool(40, isGray_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graySchemeUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 41, graySchemeUrl_); + } + if (giftScene_ != 0L) { + output.writeInt64(42, giftScene_); + } + for (int i = 0; i < triggerWords_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 44, triggerWords_.getRaw(i)); + } + if (forFirstRecharge_ != false) { + output.writeBool(46, forFirstRecharge_); + } + if (dynamicImgForSelected_ != null) { + output.writeMessage(47, getDynamicImgForSelected()); + } + if (afterSendAction_ != 0) { + output.writeInt32(48, afterSendAction_); + } + if (giftOfflineTime_ != 0L) { + output.writeInt64(49, giftOfflineTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topBarText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 50, topBarText_); + } + if (topRightAvatar_ != null) { + output.writeMessage(51, getTopRightAvatar()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bannerSchemeUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 52, bannerSchemeUrl_); + } + if (isLocked_ != false) { + output.writeBool(53, isLocked_); + } + if (reqExtraType_ != 0L) { + output.writeInt64(54, reqExtraType_); + } + if (getAssetIdsList().size() > 0) { + output.writeUInt32NoTag(442); + output.writeUInt32NoTag(assetIdsMemoizedSerializedSize); + } + for (int i = 0; i < assetIds_.size(); i++) { + output.writeInt64NoTag(assetIds_.getLong(i)); + } + if (needSweepLightCount_ != 0) { + output.writeInt32(58, needSweepLightCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (image_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getImage()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(describe_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, describe_); + } + if (notify_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, notify_); + } + if (duration_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, duration_); + } + if (id_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(5, id_); + } + if (forLinkmic_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, forLinkmic_); + } + if (doodle_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, doodle_); + } + if (forFansclub_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, forFansclub_); + } + if (combo_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(10, combo_); + } + if (type_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(11, type_); + } + if (diamondCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(12, diamondCount_); + } + if (isDisplayedOnPanel_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(13, isDisplayedOnPanel_); + } + if (primaryEffectId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(14, primaryEffectId_); + } + if (giftLabelIcon_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getGiftLabelIcon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, region_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(manual_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, manual_); + } + if (forCustom_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(19, forCustom_); + } + for (java.util.Map.Entry<java.lang.String, java.lang.Long> entry + : internalGetSpecialEffectsMap().getMap().entrySet()) { + com.google.protobuf.MapEntry<java.lang.String, java.lang.Long> + specialEffectsMap__ = SpecialEffectsMapDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, specialEffectsMap__); + } + if (icon_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getIcon()); + } + if (actionType_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(22, actionType_); + } + if (watermelonSeeds_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(23, watermelonSeeds_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(goldEffect_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(24, goldEffect_); + } + if (goldenBeans_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(26, goldenBeans_); + } + if (honorLevel_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(27, honorLevel_); + } + if (itemType_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(28, itemType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemeUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(29, schemeUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(eventName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(31, eventName_); + } + if (nobleLevel_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(32, nobleLevel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(guideUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(33, guideUrl_); + } + if (punishMedicine_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(34, punishMedicine_); + } + if (forPortal_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(35, forPortal_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(businessText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(36, businessText_); + } + if (cnyGift_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(37, cnyGift_); + } + if (appId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(38, appId_); + } + if (vipLevel_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(39, vipLevel_); + } + if (isGray_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(40, isGray_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(graySchemeUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(41, graySchemeUrl_); + } + if (giftScene_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(42, giftScene_); + } + { + int dataSize = 0; + for (int i = 0; i < triggerWords_.size(); i++) { + dataSize += computeStringSizeNoTag(triggerWords_.getRaw(i)); + } + size += dataSize; + size += 2 * getTriggerWordsList().size(); + } + if (forFirstRecharge_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(46, forFirstRecharge_); + } + if (dynamicImgForSelected_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(47, getDynamicImgForSelected()); + } + if (afterSendAction_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(48, afterSendAction_); + } + if (giftOfflineTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(49, giftOfflineTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topBarText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(50, topBarText_); + } + if (topRightAvatar_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(51, getTopRightAvatar()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bannerSchemeUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(52, bannerSchemeUrl_); + } + if (isLocked_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(53, isLocked_); + } + if (reqExtraType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(54, reqExtraType_); + } + { + int dataSize = 0; + for (int i = 0; i < assetIds_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(assetIds_.getLong(i)); + } + size += dataSize; + if (!getAssetIdsList().isEmpty()) { + size += 2; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + assetIdsMemoizedSerializedSize = dataSize; + } + if (needSweepLightCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(58, needSweepLightCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct) obj; + + if (hasImage() != other.hasImage()) return false; + if (hasImage()) { + if (!getImage() + .equals(other.getImage())) return false; + } + if (!getDescribe() + .equals(other.getDescribe())) return false; + if (getNotify() + != other.getNotify()) return false; + if (getDuration() + != other.getDuration()) return false; + if (getId() + != other.getId()) return false; + if (getForLinkmic() + != other.getForLinkmic()) return false; + if (getDoodle() + != other.getDoodle()) return false; + if (getForFansclub() + != other.getForFansclub()) return false; + if (getCombo() + != other.getCombo()) return false; + if (getType() + != other.getType()) return false; + if (getDiamondCount() + != other.getDiamondCount()) return false; + if (getIsDisplayedOnPanel() + != other.getIsDisplayedOnPanel()) return false; + if (getPrimaryEffectId() + != other.getPrimaryEffectId()) return false; + if (hasGiftLabelIcon() != other.hasGiftLabelIcon()) return false; + if (hasGiftLabelIcon()) { + if (!getGiftLabelIcon() + .equals(other.getGiftLabelIcon())) return false; + } + if (!getName() + .equals(other.getName())) return false; + if (!getRegion() + .equals(other.getRegion())) return false; + if (!getManual() + .equals(other.getManual())) return false; + if (getForCustom() + != other.getForCustom()) return false; + if (!internalGetSpecialEffectsMap().equals( + other.internalGetSpecialEffectsMap())) return false; + if (hasIcon() != other.hasIcon()) return false; + if (hasIcon()) { + if (!getIcon() + .equals(other.getIcon())) return false; + } + if (getActionType() + != other.getActionType()) return false; + if (getWatermelonSeeds() + != other.getWatermelonSeeds()) return false; + if (!getGoldEffect() + .equals(other.getGoldEffect())) return false; + if (getGoldenBeans() + != other.getGoldenBeans()) return false; + if (getHonorLevel() + != other.getHonorLevel()) return false; + if (getItemType() + != other.getItemType()) return false; + if (!getSchemeUrl() + .equals(other.getSchemeUrl())) return false; + if (!getEventName() + .equals(other.getEventName())) return false; + if (getNobleLevel() + != other.getNobleLevel()) return false; + if (!getGuideUrl() + .equals(other.getGuideUrl())) return false; + if (getPunishMedicine() + != other.getPunishMedicine()) return false; + if (getForPortal() + != other.getForPortal()) return false; + if (!getBusinessText() + .equals(other.getBusinessText())) return false; + if (getCnyGift() + != other.getCnyGift()) return false; + if (getAppId() + != other.getAppId()) return false; + if (getVipLevel() + != other.getVipLevel()) return false; + if (getIsGray() + != other.getIsGray()) return false; + if (!getGraySchemeUrl() + .equals(other.getGraySchemeUrl())) return false; + if (getGiftScene() + != other.getGiftScene()) return false; + if (!getTriggerWordsList() + .equals(other.getTriggerWordsList())) return false; + if (getForFirstRecharge() + != other.getForFirstRecharge()) return false; + if (hasDynamicImgForSelected() != other.hasDynamicImgForSelected()) return false; + if (hasDynamicImgForSelected()) { + if (!getDynamicImgForSelected() + .equals(other.getDynamicImgForSelected())) return false; + } + if (getAfterSendAction() + != other.getAfterSendAction()) return false; + if (getGiftOfflineTime() + != other.getGiftOfflineTime()) return false; + if (!getTopBarText() + .equals(other.getTopBarText())) return false; + if (hasTopRightAvatar() != other.hasTopRightAvatar()) return false; + if (hasTopRightAvatar()) { + if (!getTopRightAvatar() + .equals(other.getTopRightAvatar())) return false; + } + if (!getBannerSchemeUrl() + .equals(other.getBannerSchemeUrl())) return false; + if (getIsLocked() + != other.getIsLocked()) return false; + if (getReqExtraType() + != other.getReqExtraType()) return false; + if (!getAssetIdsList() + .equals(other.getAssetIdsList())) return false; + if (getNeedSweepLightCount() + != other.getNeedSweepLightCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasImage()) { + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + } + hash = (37 * hash) + DESCRIBE_FIELD_NUMBER; + hash = (53 * hash) + getDescribe().hashCode(); + hash = (37 * hash) + NOTIFY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getNotify()); + hash = (37 * hash) + DURATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDuration()); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getId()); + hash = (37 * hash) + FOR_LINKMIC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForLinkmic()); + hash = (37 * hash) + DOODLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDoodle()); + hash = (37 * hash) + FOR_FANSCLUB_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForFansclub()); + hash = (37 * hash) + COMBO_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCombo()); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType(); + hash = (37 * hash) + DIAMOND_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getDiamondCount(); + hash = (37 * hash) + IS_DISPLAYED_ON_PANEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsDisplayedOnPanel()); + hash = (37 * hash) + PRIMARY_EFFECT_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPrimaryEffectId()); + if (hasGiftLabelIcon()) { + hash = (37 * hash) + GIFT_LABEL_ICON_FIELD_NUMBER; + hash = (53 * hash) + getGiftLabelIcon().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REGION_FIELD_NUMBER; + hash = (53 * hash) + getRegion().hashCode(); + hash = (37 * hash) + MANUAL_FIELD_NUMBER; + hash = (53 * hash) + getManual().hashCode(); + hash = (37 * hash) + FOR_CUSTOM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForCustom()); + if (!internalGetSpecialEffectsMap().getMap().isEmpty()) { + hash = (37 * hash) + SPECIALEFFECTSMAP_FIELD_NUMBER; + hash = (53 * hash) + internalGetSpecialEffectsMap().hashCode(); + } + if (hasIcon()) { + hash = (37 * hash) + ICON_FIELD_NUMBER; + hash = (53 * hash) + getIcon().hashCode(); + } + hash = (37 * hash) + ACTION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getActionType(); + hash = (37 * hash) + WATERMELONSEEDS_FIELD_NUMBER; + hash = (53 * hash) + getWatermelonSeeds(); + hash = (37 * hash) + GOLDEFFECT_FIELD_NUMBER; + hash = (53 * hash) + getGoldEffect().hashCode(); + hash = (37 * hash) + GOLDENBEANS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGoldenBeans()); + hash = (37 * hash) + HONORLEVEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getHonorLevel()); + hash = (37 * hash) + ITEMTYPE_FIELD_NUMBER; + hash = (53 * hash) + getItemType(); + hash = (37 * hash) + SCHEMEURL_FIELD_NUMBER; + hash = (53 * hash) + getSchemeUrl().hashCode(); + hash = (37 * hash) + EVENTNAME_FIELD_NUMBER; + hash = (53 * hash) + getEventName().hashCode(); + hash = (37 * hash) + NOBLELEVEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNobleLevel()); + hash = (37 * hash) + GUIDEURL_FIELD_NUMBER; + hash = (53 * hash) + getGuideUrl().hashCode(); + hash = (37 * hash) + PUNISHMEDICINE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPunishMedicine()); + hash = (37 * hash) + FORPORTAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForPortal()); + hash = (37 * hash) + BUSINESSTEXT_FIELD_NUMBER; + hash = (53 * hash) + getBusinessText().hashCode(); + hash = (37 * hash) + CNYGIFT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCnyGift()); + hash = (37 * hash) + APPID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAppId()); + hash = (37 * hash) + VIPLEVEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getVipLevel()); + hash = (37 * hash) + ISGRAY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsGray()); + hash = (37 * hash) + GRAYSCHEMEURL_FIELD_NUMBER; + hash = (53 * hash) + getGraySchemeUrl().hashCode(); + hash = (37 * hash) + GIFTSCENE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGiftScene()); + if (getTriggerWordsCount() > 0) { + hash = (37 * hash) + TRIGGERWORDS_FIELD_NUMBER; + hash = (53 * hash) + getTriggerWordsList().hashCode(); + } + hash = (37 * hash) + FORFIRSTRECHARGE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getForFirstRecharge()); + if (hasDynamicImgForSelected()) { + hash = (37 * hash) + DYNAMICIMGFORSELECTED_FIELD_NUMBER; + hash = (53 * hash) + getDynamicImgForSelected().hashCode(); + } + hash = (37 * hash) + AFTERSENDACTION_FIELD_NUMBER; + hash = (53 * hash) + getAfterSendAction(); + hash = (37 * hash) + GIFTOFFLINETIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGiftOfflineTime()); + hash = (37 * hash) + TOPBARTEXT_FIELD_NUMBER; + hash = (53 * hash) + getTopBarText().hashCode(); + if (hasTopRightAvatar()) { + hash = (37 * hash) + TOPRIGHTAVATAR_FIELD_NUMBER; + hash = (53 * hash) + getTopRightAvatar().hashCode(); + } + hash = (37 * hash) + BANNERSCHEMEURL_FIELD_NUMBER; + hash = (53 * hash) + getBannerSchemeUrl().hashCode(); + hash = (37 * hash) + ISLOCKED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsLocked()); + hash = (37 * hash) + REQEXTRATYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getReqExtraType()); + if (getAssetIdsCount() > 0) { + hash = (37 * hash) + ASSETIDS_FIELD_NUMBER; + hash = (53 * hash) + getAssetIdsList().hashCode(); + } + hash = (37 * hash) + NEEDSWEEPLIGHTCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getNeedSweepLightCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code GiftStruct} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:GiftStruct) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStructOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.internal_static_GiftStruct_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 20: + return internalGetSpecialEffectsMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 20: + return internalGetMutableSpecialEffectsMap(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.internal_static_GiftStruct_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bitField1_ = 0; + image_ = null; + if (imageBuilder_ != null) { + imageBuilder_.dispose(); + imageBuilder_ = null; + } + describe_ = ""; + notify_ = false; + duration_ = 0L; + id_ = 0L; + forLinkmic_ = false; + doodle_ = false; + forFansclub_ = false; + combo_ = false; + type_ = 0; + diamondCount_ = 0; + isDisplayedOnPanel_ = false; + primaryEffectId_ = 0L; + giftLabelIcon_ = null; + if (giftLabelIconBuilder_ != null) { + giftLabelIconBuilder_.dispose(); + giftLabelIconBuilder_ = null; + } + name_ = ""; + region_ = ""; + manual_ = ""; + forCustom_ = false; + internalGetMutableSpecialEffectsMap().clear(); + icon_ = null; + if (iconBuilder_ != null) { + iconBuilder_.dispose(); + iconBuilder_ = null; + } + actionType_ = 0; + watermelonSeeds_ = 0; + goldEffect_ = ""; + goldenBeans_ = 0L; + honorLevel_ = 0L; + itemType_ = 0; + schemeUrl_ = ""; + eventName_ = ""; + nobleLevel_ = 0L; + guideUrl_ = ""; + punishMedicine_ = false; + forPortal_ = false; + businessText_ = ""; + cnyGift_ = false; + appId_ = 0L; + vipLevel_ = 0L; + isGray_ = false; + graySchemeUrl_ = ""; + giftScene_ = 0L; + triggerWords_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + forFirstRecharge_ = false; + dynamicImgForSelected_ = null; + if (dynamicImgForSelectedBuilder_ != null) { + dynamicImgForSelectedBuilder_.dispose(); + dynamicImgForSelectedBuilder_ = null; + } + afterSendAction_ = 0; + giftOfflineTime_ = 0L; + topBarText_ = ""; + topRightAvatar_ = null; + if (topRightAvatarBuilder_ != null) { + topRightAvatarBuilder_.dispose(); + topRightAvatarBuilder_ = null; + } + bannerSchemeUrl_ = ""; + isLocked_ = false; + reqExtraType_ = 0L; + assetIds_ = emptyLongList(); + needSweepLightCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.internal_static_GiftStruct_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + if (bitField1_ != 0) { buildPartial1(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct result) { + if (((bitField1_ & 0x00020000) != 0)) { + assetIds_.makeImmutable(); + bitField1_ = (bitField1_ & ~0x00020000); + } + result.assetIds_ = assetIds_; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.image_ = imageBuilder_ == null + ? image_ + : imageBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.describe_ = describe_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.notify_ = notify_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.duration_ = duration_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.forLinkmic_ = forLinkmic_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.doodle_ = doodle_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.forFansclub_ = forFansclub_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.combo_ = combo_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.diamondCount_ = diamondCount_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.isDisplayedOnPanel_ = isDisplayedOnPanel_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.primaryEffectId_ = primaryEffectId_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.giftLabelIcon_ = giftLabelIconBuilder_ == null + ? giftLabelIcon_ + : giftLabelIconBuilder_.build(); + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.region_ = region_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.manual_ = manual_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.forCustom_ = forCustom_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.specialEffectsMap_ = internalGetSpecialEffectsMap(); + result.specialEffectsMap_.makeImmutable(); + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.icon_ = iconBuilder_ == null + ? icon_ + : iconBuilder_.build(); + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.actionType_ = actionType_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.watermelonSeeds_ = watermelonSeeds_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.goldEffect_ = goldEffect_; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.goldenBeans_ = goldenBeans_; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.honorLevel_ = honorLevel_; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.itemType_ = itemType_; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.schemeUrl_ = schemeUrl_; + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.eventName_ = eventName_; + } + if (((from_bitField0_ & 0x10000000) != 0)) { + result.nobleLevel_ = nobleLevel_; + } + if (((from_bitField0_ & 0x20000000) != 0)) { + result.guideUrl_ = guideUrl_; + } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.punishMedicine_ = punishMedicine_; + } + if (((from_bitField0_ & 0x80000000) != 0)) { + result.forPortal_ = forPortal_; + } + } + + private void buildPartial1(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct result) { + int from_bitField1_ = bitField1_; + if (((from_bitField1_ & 0x00000001) != 0)) { + result.businessText_ = businessText_; + } + if (((from_bitField1_ & 0x00000002) != 0)) { + result.cnyGift_ = cnyGift_; + } + if (((from_bitField1_ & 0x00000004) != 0)) { + result.appId_ = appId_; + } + if (((from_bitField1_ & 0x00000008) != 0)) { + result.vipLevel_ = vipLevel_; + } + if (((from_bitField1_ & 0x00000010) != 0)) { + result.isGray_ = isGray_; + } + if (((from_bitField1_ & 0x00000020) != 0)) { + result.graySchemeUrl_ = graySchemeUrl_; + } + if (((from_bitField1_ & 0x00000040) != 0)) { + result.giftScene_ = giftScene_; + } + if (((from_bitField1_ & 0x00000080) != 0)) { + triggerWords_.makeImmutable(); + result.triggerWords_ = triggerWords_; + } + if (((from_bitField1_ & 0x00000100) != 0)) { + result.forFirstRecharge_ = forFirstRecharge_; + } + if (((from_bitField1_ & 0x00000200) != 0)) { + result.dynamicImgForSelected_ = dynamicImgForSelectedBuilder_ == null + ? dynamicImgForSelected_ + : dynamicImgForSelectedBuilder_.build(); + } + if (((from_bitField1_ & 0x00000400) != 0)) { + result.afterSendAction_ = afterSendAction_; + } + if (((from_bitField1_ & 0x00000800) != 0)) { + result.giftOfflineTime_ = giftOfflineTime_; + } + if (((from_bitField1_ & 0x00001000) != 0)) { + result.topBarText_ = topBarText_; + } + if (((from_bitField1_ & 0x00002000) != 0)) { + result.topRightAvatar_ = topRightAvatarBuilder_ == null + ? topRightAvatar_ + : topRightAvatarBuilder_.build(); + } + if (((from_bitField1_ & 0x00004000) != 0)) { + result.bannerSchemeUrl_ = bannerSchemeUrl_; + } + if (((from_bitField1_ & 0x00008000) != 0)) { + result.isLocked_ = isLocked_; + } + if (((from_bitField1_ & 0x00010000) != 0)) { + result.reqExtraType_ = reqExtraType_; + } + if (((from_bitField1_ & 0x00040000) != 0)) { + result.needSweepLightCount_ = needSweepLightCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct.getDefaultInstance()) return this; + if (other.hasImage()) { + mergeImage(other.getImage()); + } + if (!other.getDescribe().isEmpty()) { + describe_ = other.describe_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getNotify() != false) { + setNotify(other.getNotify()); + } + if (other.getDuration() != 0L) { + setDuration(other.getDuration()); + } + if (other.getId() != 0L) { + setId(other.getId()); + } + if (other.getForLinkmic() != false) { + setForLinkmic(other.getForLinkmic()); + } + if (other.getDoodle() != false) { + setDoodle(other.getDoodle()); + } + if (other.getForFansclub() != false) { + setForFansclub(other.getForFansclub()); + } + if (other.getCombo() != false) { + setCombo(other.getCombo()); + } + if (other.getType() != 0) { + setType(other.getType()); + } + if (other.getDiamondCount() != 0) { + setDiamondCount(other.getDiamondCount()); + } + if (other.getIsDisplayedOnPanel() != false) { + setIsDisplayedOnPanel(other.getIsDisplayedOnPanel()); + } + if (other.getPrimaryEffectId() != 0L) { + setPrimaryEffectId(other.getPrimaryEffectId()); + } + if (other.hasGiftLabelIcon()) { + mergeGiftLabelIcon(other.getGiftLabelIcon()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00004000; + onChanged(); + } + if (!other.getRegion().isEmpty()) { + region_ = other.region_; + bitField0_ |= 0x00008000; + onChanged(); + } + if (!other.getManual().isEmpty()) { + manual_ = other.manual_; + bitField0_ |= 0x00010000; + onChanged(); + } + if (other.getForCustom() != false) { + setForCustom(other.getForCustom()); + } + internalGetMutableSpecialEffectsMap().mergeFrom( + other.internalGetSpecialEffectsMap()); + bitField0_ |= 0x00040000; + if (other.hasIcon()) { + mergeIcon(other.getIcon()); + } + if (other.getActionType() != 0) { + setActionType(other.getActionType()); + } + if (other.getWatermelonSeeds() != 0) { + setWatermelonSeeds(other.getWatermelonSeeds()); + } + if (!other.getGoldEffect().isEmpty()) { + goldEffect_ = other.goldEffect_; + bitField0_ |= 0x00400000; + onChanged(); + } + if (other.getGoldenBeans() != 0L) { + setGoldenBeans(other.getGoldenBeans()); + } + if (other.getHonorLevel() != 0L) { + setHonorLevel(other.getHonorLevel()); + } + if (other.getItemType() != 0) { + setItemType(other.getItemType()); + } + if (!other.getSchemeUrl().isEmpty()) { + schemeUrl_ = other.schemeUrl_; + bitField0_ |= 0x04000000; + onChanged(); + } + if (!other.getEventName().isEmpty()) { + eventName_ = other.eventName_; + bitField0_ |= 0x08000000; + onChanged(); + } + if (other.getNobleLevel() != 0L) { + setNobleLevel(other.getNobleLevel()); + } + if (!other.getGuideUrl().isEmpty()) { + guideUrl_ = other.guideUrl_; + bitField0_ |= 0x20000000; + onChanged(); + } + if (other.getPunishMedicine() != false) { + setPunishMedicine(other.getPunishMedicine()); + } + if (other.getForPortal() != false) { + setForPortal(other.getForPortal()); + } + if (!other.getBusinessText().isEmpty()) { + businessText_ = other.businessText_; + bitField1_ |= 0x00000001; + onChanged(); + } + if (other.getCnyGift() != false) { + setCnyGift(other.getCnyGift()); + } + if (other.getAppId() != 0L) { + setAppId(other.getAppId()); + } + if (other.getVipLevel() != 0L) { + setVipLevel(other.getVipLevel()); + } + if (other.getIsGray() != false) { + setIsGray(other.getIsGray()); + } + if (!other.getGraySchemeUrl().isEmpty()) { + graySchemeUrl_ = other.graySchemeUrl_; + bitField1_ |= 0x00000020; + onChanged(); + } + if (other.getGiftScene() != 0L) { + setGiftScene(other.getGiftScene()); + } + if (!other.triggerWords_.isEmpty()) { + if (triggerWords_.isEmpty()) { + triggerWords_ = other.triggerWords_; + bitField1_ |= 0x00000080; + } else { + ensureTriggerWordsIsMutable(); + triggerWords_.addAll(other.triggerWords_); + } + onChanged(); + } + if (other.getForFirstRecharge() != false) { + setForFirstRecharge(other.getForFirstRecharge()); + } + if (other.hasDynamicImgForSelected()) { + mergeDynamicImgForSelected(other.getDynamicImgForSelected()); + } + if (other.getAfterSendAction() != 0) { + setAfterSendAction(other.getAfterSendAction()); + } + if (other.getGiftOfflineTime() != 0L) { + setGiftOfflineTime(other.getGiftOfflineTime()); + } + if (!other.getTopBarText().isEmpty()) { + topBarText_ = other.topBarText_; + bitField1_ |= 0x00001000; + onChanged(); + } + if (other.hasTopRightAvatar()) { + mergeTopRightAvatar(other.getTopRightAvatar()); + } + if (!other.getBannerSchemeUrl().isEmpty()) { + bannerSchemeUrl_ = other.bannerSchemeUrl_; + bitField1_ |= 0x00004000; + onChanged(); + } + if (other.getIsLocked() != false) { + setIsLocked(other.getIsLocked()); + } + if (other.getReqExtraType() != 0L) { + setReqExtraType(other.getReqExtraType()); + } + if (!other.assetIds_.isEmpty()) { + if (assetIds_.isEmpty()) { + assetIds_ = other.assetIds_; + bitField1_ = (bitField1_ & ~0x00020000); + } else { + ensureAssetIdsIsMutable(); + assetIds_.addAll(other.assetIds_); + } + onChanged(); + } + if (other.getNeedSweepLightCount() != 0) { + setNeedSweepLightCount(other.getNeedSweepLightCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getImageFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + describe_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + notify_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + duration_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + id_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 56: { + forLinkmic_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 56 + case 64: { + doodle_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 64 + case 72: { + forFansclub_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 72 + case 80: { + combo_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 80 + case 88: { + type_ = input.readUInt32(); + bitField0_ |= 0x00000200; + break; + } // case 88 + case 96: { + diamondCount_ = input.readUInt32(); + bitField0_ |= 0x00000400; + break; + } // case 96 + case 104: { + isDisplayedOnPanel_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 104 + case 112: { + primaryEffectId_ = input.readUInt64(); + bitField0_ |= 0x00001000; + break; + } // case 112 + case 122: { + input.readMessage( + getGiftLabelIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 122 + case 130: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 130 + case 138: { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 138 + case 146: { + manual_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 146 + case 152: { + forCustom_ = input.readBool(); + bitField0_ |= 0x00020000; + break; + } // case 152 + case 162: { + com.google.protobuf.MapEntry<java.lang.String, java.lang.Long> + specialEffectsMap__ = input.readMessage( + SpecialEffectsMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableSpecialEffectsMap().getMutableMap().put( + specialEffectsMap__.getKey(), specialEffectsMap__.getValue()); + bitField0_ |= 0x00040000; + break; + } // case 162 + case 170: { + input.readMessage( + getIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00080000; + break; + } // case 170 + case 176: { + actionType_ = input.readUInt32(); + bitField0_ |= 0x00100000; + break; + } // case 176 + case 184: { + watermelonSeeds_ = input.readInt32(); + bitField0_ |= 0x00200000; + break; + } // case 184 + case 194: { + goldEffect_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00400000; + break; + } // case 194 + case 208: { + goldenBeans_ = input.readInt64(); + bitField0_ |= 0x00800000; + break; + } // case 208 + case 216: { + honorLevel_ = input.readInt64(); + bitField0_ |= 0x01000000; + break; + } // case 216 + case 224: { + itemType_ = input.readInt32(); + bitField0_ |= 0x02000000; + break; + } // case 224 + case 234: { + schemeUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x04000000; + break; + } // case 234 + case 250: { + eventName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x08000000; + break; + } // case 250 + case 256: { + nobleLevel_ = input.readInt64(); + bitField0_ |= 0x10000000; + break; + } // case 256 + case 266: { + guideUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x20000000; + break; + } // case 266 + case 272: { + punishMedicine_ = input.readBool(); + bitField0_ |= 0x40000000; + break; + } // case 272 + case 280: { + forPortal_ = input.readBool(); + bitField0_ |= 0x80000000; + break; + } // case 280 + case 290: { + businessText_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000001; + break; + } // case 290 + case 296: { + cnyGift_ = input.readBool(); + bitField1_ |= 0x00000002; + break; + } // case 296 + case 304: { + appId_ = input.readInt64(); + bitField1_ |= 0x00000004; + break; + } // case 304 + case 312: { + vipLevel_ = input.readInt64(); + bitField1_ |= 0x00000008; + break; + } // case 312 + case 320: { + isGray_ = input.readBool(); + bitField1_ |= 0x00000010; + break; + } // case 320 + case 330: { + graySchemeUrl_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000020; + break; + } // case 330 + case 336: { + giftScene_ = input.readInt64(); + bitField1_ |= 0x00000040; + break; + } // case 336 + case 354: { + java.lang.String s = input.readStringRequireUtf8(); + ensureTriggerWordsIsMutable(); + triggerWords_.add(s); + break; + } // case 354 + case 368: { + forFirstRecharge_ = input.readBool(); + bitField1_ |= 0x00000100; + break; + } // case 368 + case 378: { + input.readMessage( + getDynamicImgForSelectedFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00000200; + break; + } // case 378 + case 384: { + afterSendAction_ = input.readInt32(); + bitField1_ |= 0x00000400; + break; + } // case 384 + case 392: { + giftOfflineTime_ = input.readInt64(); + bitField1_ |= 0x00000800; + break; + } // case 392 + case 402: { + topBarText_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00001000; + break; + } // case 402 + case 410: { + input.readMessage( + getTopRightAvatarFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00002000; + break; + } // case 410 + case 418: { + bannerSchemeUrl_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00004000; + break; + } // case 418 + case 424: { + isLocked_ = input.readBool(); + bitField1_ |= 0x00008000; + break; + } // case 424 + case 432: { + reqExtraType_ = input.readInt64(); + bitField1_ |= 0x00010000; + break; + } // case 432 + case 440: { + long v = input.readInt64(); + ensureAssetIdsIsMutable(); + assetIds_.addLong(v); + break; + } // case 440 + case 442: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureAssetIdsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + assetIds_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } // case 442 + case 464: { + needSweepLightCount_ = input.readInt32(); + bitField1_ |= 0x00040000; + break; + } // case 464 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + private int bitField1_; + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image image_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> imageBuilder_; + /** + * <code>.Image image = 1;</code> + * @return Whether the image field is set. + */ + public boolean hasImage() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.Image image = 1;</code> + * @return The image. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getImage() { + if (imageBuilder_ == null) { + return image_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : image_; + } else { + return imageBuilder_.getMessage(); + } + } + /** + * <code>.Image image = 1;</code> + */ + public Builder setImage(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + image_ = value; + } else { + imageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Image image = 1;</code> + */ + public Builder setImage( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (imageBuilder_ == null) { + image_ = builderForValue.build(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Image image = 1;</code> + */ + public Builder mergeImage(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (imageBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + image_ != null && + image_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getImageBuilder().mergeFrom(value); + } else { + image_ = value; + } + } else { + imageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Image image = 1;</code> + */ + public Builder clearImage() { + bitField0_ = (bitField0_ & ~0x00000001); + image_ = null; + if (imageBuilder_ != null) { + imageBuilder_.dispose(); + imageBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image image = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getImageBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getImageFieldBuilder().getBuilder(); + } + /** + * <code>.Image image = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImageOrBuilder() { + if (imageBuilder_ != null) { + return imageBuilder_.getMessageOrBuilder(); + } else { + return image_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : image_; + } + } + /** + * <code>.Image image = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getImage(), + getParentForChildren(), + isClean()); + image_ = null; + } + return imageBuilder_; + } + + private java.lang.Object describe_ = ""; + /** + * <code>string describe = 2;</code> + * @return The describe. + */ + public java.lang.String getDescribe() { + java.lang.Object ref = describe_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + describe_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string describe = 2;</code> + * @return The bytes for describe. + */ + public com.google.protobuf.ByteString + getDescribeBytes() { + java.lang.Object ref = describe_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + describe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string describe = 2;</code> + * @param value The describe to set. + * @return This builder for chaining. + */ + public Builder setDescribe( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + describe_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string describe = 2;</code> + * @return This builder for chaining. + */ + public Builder clearDescribe() { + describe_ = getDefaultInstance().getDescribe(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string describe = 2;</code> + * @param value The bytes for describe to set. + * @return This builder for chaining. + */ + public Builder setDescribeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + describe_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean notify_ ; + /** + * <code>bool notify = 3;</code> + * @return The notify. + */ + @java.lang.Override + public boolean getNotify() { + return notify_; + } + /** + * <code>bool notify = 3;</code> + * @param value The notify to set. + * @return This builder for chaining. + */ + public Builder setNotify(boolean value) { + + notify_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>bool notify = 3;</code> + * @return This builder for chaining. + */ + public Builder clearNotify() { + bitField0_ = (bitField0_ & ~0x00000004); + notify_ = false; + onChanged(); + return this; + } + + private long duration_ ; + /** + * <code>uint64 duration = 4;</code> + * @return The duration. + */ + @java.lang.Override + public long getDuration() { + return duration_; + } + /** + * <code>uint64 duration = 4;</code> + * @param value The duration to set. + * @return This builder for chaining. + */ + public Builder setDuration(long value) { + + duration_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint64 duration = 4;</code> + * @return This builder for chaining. + */ + public Builder clearDuration() { + bitField0_ = (bitField0_ & ~0x00000008); + duration_ = 0L; + onChanged(); + return this; + } + + private long id_ ; + /** + * <code>uint64 id = 5;</code> + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + /** + * <code>uint64 id = 5;</code> + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(long value) { + + id_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>uint64 id = 5;</code> + * @return This builder for chaining. + */ + public Builder clearId() { + bitField0_ = (bitField0_ & ~0x00000010); + id_ = 0L; + onChanged(); + return this; + } + + private boolean forLinkmic_ ; + /** + * <pre> + * GiftStructFansClubInfo fansclubInfo = 6; + * </pre> + * + * <code>bool for_linkmic = 7;</code> + * @return The forLinkmic. + */ + @java.lang.Override + public boolean getForLinkmic() { + return forLinkmic_; + } + /** + * <pre> + * GiftStructFansClubInfo fansclubInfo = 6; + * </pre> + * + * <code>bool for_linkmic = 7;</code> + * @param value The forLinkmic to set. + * @return This builder for chaining. + */ + public Builder setForLinkmic(boolean value) { + + forLinkmic_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <pre> + * GiftStructFansClubInfo fansclubInfo = 6; + * </pre> + * + * <code>bool for_linkmic = 7;</code> + * @return This builder for chaining. + */ + public Builder clearForLinkmic() { + bitField0_ = (bitField0_ & ~0x00000020); + forLinkmic_ = false; + onChanged(); + return this; + } + + private boolean doodle_ ; + /** + * <code>bool doodle = 8;</code> + * @return The doodle. + */ + @java.lang.Override + public boolean getDoodle() { + return doodle_; + } + /** + * <code>bool doodle = 8;</code> + * @param value The doodle to set. + * @return This builder for chaining. + */ + public Builder setDoodle(boolean value) { + + doodle_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>bool doodle = 8;</code> + * @return This builder for chaining. + */ + public Builder clearDoodle() { + bitField0_ = (bitField0_ & ~0x00000040); + doodle_ = false; + onChanged(); + return this; + } + + private boolean forFansclub_ ; + /** + * <code>bool for_fansclub = 9;</code> + * @return The forFansclub. + */ + @java.lang.Override + public boolean getForFansclub() { + return forFansclub_; + } + /** + * <code>bool for_fansclub = 9;</code> + * @param value The forFansclub to set. + * @return This builder for chaining. + */ + public Builder setForFansclub(boolean value) { + + forFansclub_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>bool for_fansclub = 9;</code> + * @return This builder for chaining. + */ + public Builder clearForFansclub() { + bitField0_ = (bitField0_ & ~0x00000080); + forFansclub_ = false; + onChanged(); + return this; + } + + private boolean combo_ ; + /** + * <code>bool combo = 10;</code> + * @return The combo. + */ + @java.lang.Override + public boolean getCombo() { + return combo_; + } + /** + * <code>bool combo = 10;</code> + * @param value The combo to set. + * @return This builder for chaining. + */ + public Builder setCombo(boolean value) { + + combo_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>bool combo = 10;</code> + * @return This builder for chaining. + */ + public Builder clearCombo() { + bitField0_ = (bitField0_ & ~0x00000100); + combo_ = false; + onChanged(); + return this; + } + + private int type_ ; + /** + * <code>uint32 type = 11;</code> + * @return The type. + */ + @java.lang.Override + public int getType() { + return type_; + } + /** + * <code>uint32 type = 11;</code> + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(int value) { + + type_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>uint32 type = 11;</code> + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000200); + type_ = 0; + onChanged(); + return this; + } + + private int diamondCount_ ; + /** + * <code>uint32 diamond_count = 12;</code> + * @return The diamondCount. + */ + @java.lang.Override + public int getDiamondCount() { + return diamondCount_; + } + /** + * <code>uint32 diamond_count = 12;</code> + * @param value The diamondCount to set. + * @return This builder for chaining. + */ + public Builder setDiamondCount(int value) { + + diamondCount_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * <code>uint32 diamond_count = 12;</code> + * @return This builder for chaining. + */ + public Builder clearDiamondCount() { + bitField0_ = (bitField0_ & ~0x00000400); + diamondCount_ = 0; + onChanged(); + return this; + } + + private boolean isDisplayedOnPanel_ ; + /** + * <code>bool is_displayed_on_panel = 13;</code> + * @return The isDisplayedOnPanel. + */ + @java.lang.Override + public boolean getIsDisplayedOnPanel() { + return isDisplayedOnPanel_; + } + /** + * <code>bool is_displayed_on_panel = 13;</code> + * @param value The isDisplayedOnPanel to set. + * @return This builder for chaining. + */ + public Builder setIsDisplayedOnPanel(boolean value) { + + isDisplayedOnPanel_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * <code>bool is_displayed_on_panel = 13;</code> + * @return This builder for chaining. + */ + public Builder clearIsDisplayedOnPanel() { + bitField0_ = (bitField0_ & ~0x00000800); + isDisplayedOnPanel_ = false; + onChanged(); + return this; + } + + private long primaryEffectId_ ; + /** + * <code>uint64 primary_effect_id = 14;</code> + * @return The primaryEffectId. + */ + @java.lang.Override + public long getPrimaryEffectId() { + return primaryEffectId_; + } + /** + * <code>uint64 primary_effect_id = 14;</code> + * @param value The primaryEffectId to set. + * @return This builder for chaining. + */ + public Builder setPrimaryEffectId(long value) { + + primaryEffectId_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * <code>uint64 primary_effect_id = 14;</code> + * @return This builder for chaining. + */ + public Builder clearPrimaryEffectId() { + bitField0_ = (bitField0_ & ~0x00001000); + primaryEffectId_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image giftLabelIcon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> giftLabelIconBuilder_; + /** + * <code>.Image gift_label_icon = 15;</code> + * @return Whether the giftLabelIcon field is set. + */ + public boolean hasGiftLabelIcon() { + return ((bitField0_ & 0x00002000) != 0); + } + /** + * <code>.Image gift_label_icon = 15;</code> + * @return The giftLabelIcon. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getGiftLabelIcon() { + if (giftLabelIconBuilder_ == null) { + return giftLabelIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : giftLabelIcon_; + } else { + return giftLabelIconBuilder_.getMessage(); + } + } + /** + * <code>.Image gift_label_icon = 15;</code> + */ + public Builder setGiftLabelIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (giftLabelIconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + giftLabelIcon_ = value; + } else { + giftLabelIconBuilder_.setMessage(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>.Image gift_label_icon = 15;</code> + */ + public Builder setGiftLabelIcon( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (giftLabelIconBuilder_ == null) { + giftLabelIcon_ = builderForValue.build(); + } else { + giftLabelIconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>.Image gift_label_icon = 15;</code> + */ + public Builder mergeGiftLabelIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (giftLabelIconBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0) && + giftLabelIcon_ != null && + giftLabelIcon_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getGiftLabelIconBuilder().mergeFrom(value); + } else { + giftLabelIcon_ = value; + } + } else { + giftLabelIconBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>.Image gift_label_icon = 15;</code> + */ + public Builder clearGiftLabelIcon() { + bitField0_ = (bitField0_ & ~0x00002000); + giftLabelIcon_ = null; + if (giftLabelIconBuilder_ != null) { + giftLabelIconBuilder_.dispose(); + giftLabelIconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image gift_label_icon = 15;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getGiftLabelIconBuilder() { + bitField0_ |= 0x00002000; + onChanged(); + return getGiftLabelIconFieldBuilder().getBuilder(); + } + /** + * <code>.Image gift_label_icon = 15;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getGiftLabelIconOrBuilder() { + if (giftLabelIconBuilder_ != null) { + return giftLabelIconBuilder_.getMessageOrBuilder(); + } else { + return giftLabelIcon_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : giftLabelIcon_; + } + } + /** + * <code>.Image gift_label_icon = 15;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getGiftLabelIconFieldBuilder() { + if (giftLabelIconBuilder_ == null) { + giftLabelIconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getGiftLabelIcon(), + getParentForChildren(), + isClean()); + giftLabelIcon_ = null; + } + return giftLabelIconBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * <code>string name = 16;</code> + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string name = 16;</code> + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string name = 16;</code> + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <code>string name = 16;</code> + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + return this; + } + /** + * <code>string name = 16;</code> + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + private java.lang.Object region_ = ""; + /** + * <code>string region = 17;</code> + * @return The region. + */ + public java.lang.String getRegion() { + java.lang.Object ref = region_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + region_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string region = 17;</code> + * @return The bytes for region. + */ + public com.google.protobuf.ByteString + getRegionBytes() { + java.lang.Object ref = region_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + region_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string region = 17;</code> + * @param value The region to set. + * @return This builder for chaining. + */ + public Builder setRegion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + region_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>string region = 17;</code> + * @return This builder for chaining. + */ + public Builder clearRegion() { + region_ = getDefaultInstance().getRegion(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + /** + * <code>string region = 17;</code> + * @param value The bytes for region to set. + * @return This builder for chaining. + */ + public Builder setRegionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + region_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private java.lang.Object manual_ = ""; + /** + * <code>string manual = 18;</code> + * @return The manual. + */ + public java.lang.String getManual() { + java.lang.Object ref = manual_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + manual_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string manual = 18;</code> + * @return The bytes for manual. + */ + public com.google.protobuf.ByteString + getManualBytes() { + java.lang.Object ref = manual_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + manual_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string manual = 18;</code> + * @param value The manual to set. + * @return This builder for chaining. + */ + public Builder setManual( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + manual_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * <code>string manual = 18;</code> + * @return This builder for chaining. + */ + public Builder clearManual() { + manual_ = getDefaultInstance().getManual(); + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + return this; + } + /** + * <code>string manual = 18;</code> + * @param value The bytes for manual to set. + * @return This builder for chaining. + */ + public Builder setManualBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + manual_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + private boolean forCustom_ ; + /** + * <code>bool for_custom = 19;</code> + * @return The forCustom. + */ + @java.lang.Override + public boolean getForCustom() { + return forCustom_; + } + /** + * <code>bool for_custom = 19;</code> + * @param value The forCustom to set. + * @return This builder for chaining. + */ + public Builder setForCustom(boolean value) { + + forCustom_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * <code>bool for_custom = 19;</code> + * @return This builder for chaining. + */ + public Builder clearForCustom() { + bitField0_ = (bitField0_ & ~0x00020000); + forCustom_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.Long> specialEffectsMap_; + private com.google.protobuf.MapField<java.lang.String, java.lang.Long> + internalGetSpecialEffectsMap() { + if (specialEffectsMap_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SpecialEffectsMapDefaultEntryHolder.defaultEntry); + } + return specialEffectsMap_; + } + private com.google.protobuf.MapField<java.lang.String, java.lang.Long> + internalGetMutableSpecialEffectsMap() { + if (specialEffectsMap_ == null) { + specialEffectsMap_ = com.google.protobuf.MapField.newMapField( + SpecialEffectsMapDefaultEntryHolder.defaultEntry); + } + if (!specialEffectsMap_.isMutable()) { + specialEffectsMap_ = specialEffectsMap_.copy(); + } + bitField0_ |= 0x00040000; + onChanged(); + return specialEffectsMap_; + } + public int getSpecialEffectsMapCount() { + return internalGetSpecialEffectsMap().getMap().size(); + } + /** + * <code>map<string, int64> specialEffectsMap = 20;</code> + */ + @java.lang.Override + public boolean containsSpecialEffectsMap( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetSpecialEffectsMap().getMap().containsKey(key); + } + /** + * Use {@link #getSpecialEffectsMapMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map<java.lang.String, java.lang.Long> getSpecialEffectsMap() { + return getSpecialEffectsMapMap(); + } + /** + * <code>map<string, int64> specialEffectsMap = 20;</code> + */ + @java.lang.Override + public java.util.Map<java.lang.String, java.lang.Long> getSpecialEffectsMapMap() { + return internalGetSpecialEffectsMap().getMap(); + } + /** + * <code>map<string, int64> specialEffectsMap = 20;</code> + */ + @java.lang.Override + public long getSpecialEffectsMapOrDefault( + java.lang.String key, + long defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map<java.lang.String, java.lang.Long> map = + internalGetSpecialEffectsMap().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * <code>map<string, int64> specialEffectsMap = 20;</code> + */ + @java.lang.Override + public long getSpecialEffectsMapOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map<java.lang.String, java.lang.Long> map = + internalGetSpecialEffectsMap().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearSpecialEffectsMap() { + bitField0_ = (bitField0_ & ~0x00040000); + internalGetMutableSpecialEffectsMap().getMutableMap() + .clear(); + return this; + } + /** + * <code>map<string, int64> specialEffectsMap = 20;</code> + */ + public Builder removeSpecialEffectsMap( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableSpecialEffectsMap().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map<java.lang.String, java.lang.Long> + getMutableSpecialEffectsMap() { + bitField0_ |= 0x00040000; + return internalGetMutableSpecialEffectsMap().getMutableMap(); + } + /** + * <code>map<string, int64> specialEffectsMap = 20;</code> + */ + public Builder putSpecialEffectsMap( + java.lang.String key, + long value) { + if (key == null) { throw new NullPointerException("map key"); } + + internalGetMutableSpecialEffectsMap().getMutableMap() + .put(key, value); + bitField0_ |= 0x00040000; + return this; + } + /** + * <code>map<string, int64> specialEffectsMap = 20;</code> + */ + public Builder putAllSpecialEffectsMap( + java.util.Map<java.lang.String, java.lang.Long> values) { + internalGetMutableSpecialEffectsMap().getMutableMap() + .putAll(values); + bitField0_ |= 0x00040000; + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image icon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> iconBuilder_; + /** + * <code>.Image icon = 21;</code> + * @return Whether the icon field is set. + */ + public boolean hasIcon() { + return ((bitField0_ & 0x00080000) != 0); + } + /** + * <code>.Image icon = 21;</code> + * @return The icon. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getIcon() { + if (iconBuilder_ == null) { + return icon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } else { + return iconBuilder_.getMessage(); + } + } + /** + * <code>.Image icon = 21;</code> + */ + public Builder setIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (iconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + icon_ = value; + } else { + iconBuilder_.setMessage(value); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * <code>.Image icon = 21;</code> + */ + public Builder setIcon( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (iconBuilder_ == null) { + icon_ = builderForValue.build(); + } else { + iconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * <code>.Image icon = 21;</code> + */ + public Builder mergeIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (iconBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0) && + icon_ != null && + icon_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getIconBuilder().mergeFrom(value); + } else { + icon_ = value; + } + } else { + iconBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * <code>.Image icon = 21;</code> + */ + public Builder clearIcon() { + bitField0_ = (bitField0_ & ~0x00080000); + icon_ = null; + if (iconBuilder_ != null) { + iconBuilder_.dispose(); + iconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image icon = 21;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getIconBuilder() { + bitField0_ |= 0x00080000; + onChanged(); + return getIconFieldBuilder().getBuilder(); + } + /** + * <code>.Image icon = 21;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder() { + if (iconBuilder_ != null) { + return iconBuilder_.getMessageOrBuilder(); + } else { + return icon_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + } + /** + * <code>.Image icon = 21;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getIconFieldBuilder() { + if (iconBuilder_ == null) { + iconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getIcon(), + getParentForChildren(), + isClean()); + icon_ = null; + } + return iconBuilder_; + } + + private int actionType_ ; + /** + * <code>uint32 action_type = 22;</code> + * @return The actionType. + */ + @java.lang.Override + public int getActionType() { + return actionType_; + } + /** + * <code>uint32 action_type = 22;</code> + * @param value The actionType to set. + * @return This builder for chaining. + */ + public Builder setActionType(int value) { + + actionType_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * <code>uint32 action_type = 22;</code> + * @return This builder for chaining. + */ + public Builder clearActionType() { + bitField0_ = (bitField0_ & ~0x00100000); + actionType_ = 0; + onChanged(); + return this; + } + + private int watermelonSeeds_ ; + /** + * <code>int32 watermelonSeeds = 23;</code> + * @return The watermelonSeeds. + */ + @java.lang.Override + public int getWatermelonSeeds() { + return watermelonSeeds_; + } + /** + * <code>int32 watermelonSeeds = 23;</code> + * @param value The watermelonSeeds to set. + * @return This builder for chaining. + */ + public Builder setWatermelonSeeds(int value) { + + watermelonSeeds_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * <code>int32 watermelonSeeds = 23;</code> + * @return This builder for chaining. + */ + public Builder clearWatermelonSeeds() { + bitField0_ = (bitField0_ & ~0x00200000); + watermelonSeeds_ = 0; + onChanged(); + return this; + } + + private java.lang.Object goldEffect_ = ""; + /** + * <code>string goldEffect = 24;</code> + * @return The goldEffect. + */ + public java.lang.String getGoldEffect() { + java.lang.Object ref = goldEffect_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + goldEffect_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string goldEffect = 24;</code> + * @return The bytes for goldEffect. + */ + public com.google.protobuf.ByteString + getGoldEffectBytes() { + java.lang.Object ref = goldEffect_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + goldEffect_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string goldEffect = 24;</code> + * @param value The goldEffect to set. + * @return This builder for chaining. + */ + public Builder setGoldEffect( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + goldEffect_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * <code>string goldEffect = 24;</code> + * @return This builder for chaining. + */ + public Builder clearGoldEffect() { + goldEffect_ = getDefaultInstance().getGoldEffect(); + bitField0_ = (bitField0_ & ~0x00400000); + onChanged(); + return this; + } + /** + * <code>string goldEffect = 24;</code> + * @param value The bytes for goldEffect to set. + * @return This builder for chaining. + */ + public Builder setGoldEffectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + goldEffect_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + private long goldenBeans_ ; + /** + * <pre> + * repeated LuckyMoneyGiftMeta subs = 25; + * </pre> + * + * <code>int64 goldenBeans = 26;</code> + * @return The goldenBeans. + */ + @java.lang.Override + public long getGoldenBeans() { + return goldenBeans_; + } + /** + * <pre> + * repeated LuckyMoneyGiftMeta subs = 25; + * </pre> + * + * <code>int64 goldenBeans = 26;</code> + * @param value The goldenBeans to set. + * @return This builder for chaining. + */ + public Builder setGoldenBeans(long value) { + + goldenBeans_ = value; + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * <pre> + * repeated LuckyMoneyGiftMeta subs = 25; + * </pre> + * + * <code>int64 goldenBeans = 26;</code> + * @return This builder for chaining. + */ + public Builder clearGoldenBeans() { + bitField0_ = (bitField0_ & ~0x00800000); + goldenBeans_ = 0L; + onChanged(); + return this; + } + + private long honorLevel_ ; + /** + * <code>int64 honorLevel = 27;</code> + * @return The honorLevel. + */ + @java.lang.Override + public long getHonorLevel() { + return honorLevel_; + } + /** + * <code>int64 honorLevel = 27;</code> + * @param value The honorLevel to set. + * @return This builder for chaining. + */ + public Builder setHonorLevel(long value) { + + honorLevel_ = value; + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * <code>int64 honorLevel = 27;</code> + * @return This builder for chaining. + */ + public Builder clearHonorLevel() { + bitField0_ = (bitField0_ & ~0x01000000); + honorLevel_ = 0L; + onChanged(); + return this; + } + + private int itemType_ ; + /** + * <code>int32 itemType = 28;</code> + * @return The itemType. + */ + @java.lang.Override + public int getItemType() { + return itemType_; + } + /** + * <code>int32 itemType = 28;</code> + * @param value The itemType to set. + * @return This builder for chaining. + */ + public Builder setItemType(int value) { + + itemType_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + /** + * <code>int32 itemType = 28;</code> + * @return This builder for chaining. + */ + public Builder clearItemType() { + bitField0_ = (bitField0_ & ~0x02000000); + itemType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object schemeUrl_ = ""; + /** + * <code>string schemeUrl = 29;</code> + * @return The schemeUrl. + */ + public java.lang.String getSchemeUrl() { + java.lang.Object ref = schemeUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + schemeUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string schemeUrl = 29;</code> + * @return The bytes for schemeUrl. + */ + public com.google.protobuf.ByteString + getSchemeUrlBytes() { + java.lang.Object ref = schemeUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + schemeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string schemeUrl = 29;</code> + * @param value The schemeUrl to set. + * @return This builder for chaining. + */ + public Builder setSchemeUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + schemeUrl_ = value; + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * <code>string schemeUrl = 29;</code> + * @return This builder for chaining. + */ + public Builder clearSchemeUrl() { + schemeUrl_ = getDefaultInstance().getSchemeUrl(); + bitField0_ = (bitField0_ & ~0x04000000); + onChanged(); + return this; + } + /** + * <code>string schemeUrl = 29;</code> + * @param value The bytes for schemeUrl to set. + * @return This builder for chaining. + */ + public Builder setSchemeUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + schemeUrl_ = value; + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + + private java.lang.Object eventName_ = ""; + /** + * <pre> + * GiftPanelOperation giftOperation = 30; + * </pre> + * + * <code>string eventName = 31;</code> + * @return The eventName. + */ + public java.lang.String getEventName() { + java.lang.Object ref = eventName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + eventName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <pre> + * GiftPanelOperation giftOperation = 30; + * </pre> + * + * <code>string eventName = 31;</code> + * @return The bytes for eventName. + */ + public com.google.protobuf.ByteString + getEventNameBytes() { + java.lang.Object ref = eventName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + eventName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <pre> + * GiftPanelOperation giftOperation = 30; + * </pre> + * + * <code>string eventName = 31;</code> + * @param value The eventName to set. + * @return This builder for chaining. + */ + public Builder setEventName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + eventName_ = value; + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * <pre> + * GiftPanelOperation giftOperation = 30; + * </pre> + * + * <code>string eventName = 31;</code> + * @return This builder for chaining. + */ + public Builder clearEventName() { + eventName_ = getDefaultInstance().getEventName(); + bitField0_ = (bitField0_ & ~0x08000000); + onChanged(); + return this; + } + /** + * <pre> + * GiftPanelOperation giftOperation = 30; + * </pre> + * + * <code>string eventName = 31;</code> + * @param value The bytes for eventName to set. + * @return This builder for chaining. + */ + public Builder setEventNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + eventName_ = value; + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + + private long nobleLevel_ ; + /** + * <code>int64 nobleLevel = 32;</code> + * @return The nobleLevel. + */ + @java.lang.Override + public long getNobleLevel() { + return nobleLevel_; + } + /** + * <code>int64 nobleLevel = 32;</code> + * @param value The nobleLevel to set. + * @return This builder for chaining. + */ + public Builder setNobleLevel(long value) { + + nobleLevel_ = value; + bitField0_ |= 0x10000000; + onChanged(); + return this; + } + /** + * <code>int64 nobleLevel = 32;</code> + * @return This builder for chaining. + */ + public Builder clearNobleLevel() { + bitField0_ = (bitField0_ & ~0x10000000); + nobleLevel_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object guideUrl_ = ""; + /** + * <code>string guideUrl = 33;</code> + * @return The guideUrl. + */ + public java.lang.String getGuideUrl() { + java.lang.Object ref = guideUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + guideUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string guideUrl = 33;</code> + * @return The bytes for guideUrl. + */ + public com.google.protobuf.ByteString + getGuideUrlBytes() { + java.lang.Object ref = guideUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + guideUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string guideUrl = 33;</code> + * @param value The guideUrl to set. + * @return This builder for chaining. + */ + public Builder setGuideUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + guideUrl_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + /** + * <code>string guideUrl = 33;</code> + * @return This builder for chaining. + */ + public Builder clearGuideUrl() { + guideUrl_ = getDefaultInstance().getGuideUrl(); + bitField0_ = (bitField0_ & ~0x20000000); + onChanged(); + return this; + } + /** + * <code>string guideUrl = 33;</code> + * @param value The bytes for guideUrl to set. + * @return This builder for chaining. + */ + public Builder setGuideUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + guideUrl_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + + private boolean punishMedicine_ ; + /** + * <code>bool punishMedicine = 34;</code> + * @return The punishMedicine. + */ + @java.lang.Override + public boolean getPunishMedicine() { + return punishMedicine_; + } + /** + * <code>bool punishMedicine = 34;</code> + * @param value The punishMedicine to set. + * @return This builder for chaining. + */ + public Builder setPunishMedicine(boolean value) { + + punishMedicine_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + /** + * <code>bool punishMedicine = 34;</code> + * @return This builder for chaining. + */ + public Builder clearPunishMedicine() { + bitField0_ = (bitField0_ & ~0x40000000); + punishMedicine_ = false; + onChanged(); + return this; + } + + private boolean forPortal_ ; + /** + * <code>bool forPortal = 35;</code> + * @return The forPortal. + */ + @java.lang.Override + public boolean getForPortal() { + return forPortal_; + } + /** + * <code>bool forPortal = 35;</code> + * @param value The forPortal to set. + * @return This builder for chaining. + */ + public Builder setForPortal(boolean value) { + + forPortal_ = value; + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + /** + * <code>bool forPortal = 35;</code> + * @return This builder for chaining. + */ + public Builder clearForPortal() { + bitField0_ = (bitField0_ & ~0x80000000); + forPortal_ = false; + onChanged(); + return this; + } + + private java.lang.Object businessText_ = ""; + /** + * <code>string businessText = 36;</code> + * @return The businessText. + */ + public java.lang.String getBusinessText() { + java.lang.Object ref = businessText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + businessText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string businessText = 36;</code> + * @return The bytes for businessText. + */ + public com.google.protobuf.ByteString + getBusinessTextBytes() { + java.lang.Object ref = businessText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + businessText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string businessText = 36;</code> + * @param value The businessText to set. + * @return This builder for chaining. + */ + public Builder setBusinessText( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + businessText_ = value; + bitField1_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string businessText = 36;</code> + * @return This builder for chaining. + */ + public Builder clearBusinessText() { + businessText_ = getDefaultInstance().getBusinessText(); + bitField1_ = (bitField1_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string businessText = 36;</code> + * @param value The bytes for businessText to set. + * @return This builder for chaining. + */ + public Builder setBusinessTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + businessText_ = value; + bitField1_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean cnyGift_ ; + /** + * <code>bool cnyGift = 37;</code> + * @return The cnyGift. + */ + @java.lang.Override + public boolean getCnyGift() { + return cnyGift_; + } + /** + * <code>bool cnyGift = 37;</code> + * @param value The cnyGift to set. + * @return This builder for chaining. + */ + public Builder setCnyGift(boolean value) { + + cnyGift_ = value; + bitField1_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>bool cnyGift = 37;</code> + * @return This builder for chaining. + */ + public Builder clearCnyGift() { + bitField1_ = (bitField1_ & ~0x00000002); + cnyGift_ = false; + onChanged(); + return this; + } + + private long appId_ ; + /** + * <code>int64 appId = 38;</code> + * @return The appId. + */ + @java.lang.Override + public long getAppId() { + return appId_; + } + /** + * <code>int64 appId = 38;</code> + * @param value The appId to set. + * @return This builder for chaining. + */ + public Builder setAppId(long value) { + + appId_ = value; + bitField1_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>int64 appId = 38;</code> + * @return This builder for chaining. + */ + public Builder clearAppId() { + bitField1_ = (bitField1_ & ~0x00000004); + appId_ = 0L; + onChanged(); + return this; + } + + private long vipLevel_ ; + /** + * <code>int64 vipLevel = 39;</code> + * @return The vipLevel. + */ + @java.lang.Override + public long getVipLevel() { + return vipLevel_; + } + /** + * <code>int64 vipLevel = 39;</code> + * @param value The vipLevel to set. + * @return This builder for chaining. + */ + public Builder setVipLevel(long value) { + + vipLevel_ = value; + bitField1_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>int64 vipLevel = 39;</code> + * @return This builder for chaining. + */ + public Builder clearVipLevel() { + bitField1_ = (bitField1_ & ~0x00000008); + vipLevel_ = 0L; + onChanged(); + return this; + } + + private boolean isGray_ ; + /** + * <code>bool isGray = 40;</code> + * @return The isGray. + */ + @java.lang.Override + public boolean getIsGray() { + return isGray_; + } + /** + * <code>bool isGray = 40;</code> + * @param value The isGray to set. + * @return This builder for chaining. + */ + public Builder setIsGray(boolean value) { + + isGray_ = value; + bitField1_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>bool isGray = 40;</code> + * @return This builder for chaining. + */ + public Builder clearIsGray() { + bitField1_ = (bitField1_ & ~0x00000010); + isGray_ = false; + onChanged(); + return this; + } + + private java.lang.Object graySchemeUrl_ = ""; + /** + * <code>string graySchemeUrl = 41;</code> + * @return The graySchemeUrl. + */ + public java.lang.String getGraySchemeUrl() { + java.lang.Object ref = graySchemeUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + graySchemeUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string graySchemeUrl = 41;</code> + * @return The bytes for graySchemeUrl. + */ + public com.google.protobuf.ByteString + getGraySchemeUrlBytes() { + java.lang.Object ref = graySchemeUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + graySchemeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string graySchemeUrl = 41;</code> + * @param value The graySchemeUrl to set. + * @return This builder for chaining. + */ + public Builder setGraySchemeUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + graySchemeUrl_ = value; + bitField1_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>string graySchemeUrl = 41;</code> + * @return This builder for chaining. + */ + public Builder clearGraySchemeUrl() { + graySchemeUrl_ = getDefaultInstance().getGraySchemeUrl(); + bitField1_ = (bitField1_ & ~0x00000020); + onChanged(); + return this; + } + /** + * <code>string graySchemeUrl = 41;</code> + * @param value The bytes for graySchemeUrl to set. + * @return This builder for chaining. + */ + public Builder setGraySchemeUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + graySchemeUrl_ = value; + bitField1_ |= 0x00000020; + onChanged(); + return this; + } + + private long giftScene_ ; + /** + * <code>int64 giftScene = 42;</code> + * @return The giftScene. + */ + @java.lang.Override + public long getGiftScene() { + return giftScene_; + } + /** + * <code>int64 giftScene = 42;</code> + * @param value The giftScene to set. + * @return This builder for chaining. + */ + public Builder setGiftScene(long value) { + + giftScene_ = value; + bitField1_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>int64 giftScene = 42;</code> + * @return This builder for chaining. + */ + public Builder clearGiftScene() { + bitField1_ = (bitField1_ & ~0x00000040); + giftScene_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList triggerWords_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureTriggerWordsIsMutable() { + if (!triggerWords_.isModifiable()) { + triggerWords_ = new com.google.protobuf.LazyStringArrayList(triggerWords_); + } + bitField1_ |= 0x00000080; + } + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @return A list containing the triggerWords. + */ + public com.google.protobuf.ProtocolStringList + getTriggerWordsList() { + triggerWords_.makeImmutable(); + return triggerWords_; + } + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @return The count of triggerWords. + */ + public int getTriggerWordsCount() { + return triggerWords_.size(); + } + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @param index The index of the element to return. + * @return The triggerWords at the given index. + */ + public java.lang.String getTriggerWords(int index) { + return triggerWords_.get(index); + } + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @param index The index of the value to return. + * @return The bytes of the triggerWords at the given index. + */ + public com.google.protobuf.ByteString + getTriggerWordsBytes(int index) { + return triggerWords_.getByteString(index); + } + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @param index The index to set the value at. + * @param value The triggerWords to set. + * @return This builder for chaining. + */ + public Builder setTriggerWords( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureTriggerWordsIsMutable(); + triggerWords_.set(index, value); + bitField1_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @param value The triggerWords to add. + * @return This builder for chaining. + */ + public Builder addTriggerWords( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureTriggerWordsIsMutable(); + triggerWords_.add(value); + bitField1_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @param values The triggerWords to add. + * @return This builder for chaining. + */ + public Builder addAllTriggerWords( + java.lang.Iterable<java.lang.String> values) { + ensureTriggerWordsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, triggerWords_); + bitField1_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @return This builder for chaining. + */ + public Builder clearTriggerWords() { + triggerWords_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField1_ = (bitField1_ & ~0x00000080);; + onChanged(); + return this; + } + /** + * <pre> + * GiftBanner giftBanner = 43; + * </pre> + * + * <code>repeated string triggerWords = 44;</code> + * @param value The bytes of the triggerWords to add. + * @return This builder for chaining. + */ + public Builder addTriggerWordsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureTriggerWordsIsMutable(); + triggerWords_.add(value); + bitField1_ |= 0x00000080; + onChanged(); + return this; + } + + private boolean forFirstRecharge_ ; + /** + * <pre> + * repeated GiftBuffInfo giftBuffInfos = 45; + * </pre> + * + * <code>bool forFirstRecharge = 46;</code> + * @return The forFirstRecharge. + */ + @java.lang.Override + public boolean getForFirstRecharge() { + return forFirstRecharge_; + } + /** + * <pre> + * repeated GiftBuffInfo giftBuffInfos = 45; + * </pre> + * + * <code>bool forFirstRecharge = 46;</code> + * @param value The forFirstRecharge to set. + * @return This builder for chaining. + */ + public Builder setForFirstRecharge(boolean value) { + + forFirstRecharge_ = value; + bitField1_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <pre> + * repeated GiftBuffInfo giftBuffInfos = 45; + * </pre> + * + * <code>bool forFirstRecharge = 46;</code> + * @return This builder for chaining. + */ + public Builder clearForFirstRecharge() { + bitField1_ = (bitField1_ & ~0x00000100); + forFirstRecharge_ = false; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image dynamicImgForSelected_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> dynamicImgForSelectedBuilder_; + /** + * <code>.Image dynamicImgForSelected = 47;</code> + * @return Whether the dynamicImgForSelected field is set. + */ + public boolean hasDynamicImgForSelected() { + return ((bitField1_ & 0x00000200) != 0); + } + /** + * <code>.Image dynamicImgForSelected = 47;</code> + * @return The dynamicImgForSelected. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getDynamicImgForSelected() { + if (dynamicImgForSelectedBuilder_ == null) { + return dynamicImgForSelected_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : dynamicImgForSelected_; + } else { + return dynamicImgForSelectedBuilder_.getMessage(); + } + } + /** + * <code>.Image dynamicImgForSelected = 47;</code> + */ + public Builder setDynamicImgForSelected(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (dynamicImgForSelectedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dynamicImgForSelected_ = value; + } else { + dynamicImgForSelectedBuilder_.setMessage(value); + } + bitField1_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>.Image dynamicImgForSelected = 47;</code> + */ + public Builder setDynamicImgForSelected( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (dynamicImgForSelectedBuilder_ == null) { + dynamicImgForSelected_ = builderForValue.build(); + } else { + dynamicImgForSelectedBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>.Image dynamicImgForSelected = 47;</code> + */ + public Builder mergeDynamicImgForSelected(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (dynamicImgForSelectedBuilder_ == null) { + if (((bitField1_ & 0x00000200) != 0) && + dynamicImgForSelected_ != null && + dynamicImgForSelected_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getDynamicImgForSelectedBuilder().mergeFrom(value); + } else { + dynamicImgForSelected_ = value; + } + } else { + dynamicImgForSelectedBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>.Image dynamicImgForSelected = 47;</code> + */ + public Builder clearDynamicImgForSelected() { + bitField1_ = (bitField1_ & ~0x00000200); + dynamicImgForSelected_ = null; + if (dynamicImgForSelectedBuilder_ != null) { + dynamicImgForSelectedBuilder_.dispose(); + dynamicImgForSelectedBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image dynamicImgForSelected = 47;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getDynamicImgForSelectedBuilder() { + bitField1_ |= 0x00000200; + onChanged(); + return getDynamicImgForSelectedFieldBuilder().getBuilder(); + } + /** + * <code>.Image dynamicImgForSelected = 47;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getDynamicImgForSelectedOrBuilder() { + if (dynamicImgForSelectedBuilder_ != null) { + return dynamicImgForSelectedBuilder_.getMessageOrBuilder(); + } else { + return dynamicImgForSelected_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : dynamicImgForSelected_; + } + } + /** + * <code>.Image dynamicImgForSelected = 47;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getDynamicImgForSelectedFieldBuilder() { + if (dynamicImgForSelectedBuilder_ == null) { + dynamicImgForSelectedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getDynamicImgForSelected(), + getParentForChildren(), + isClean()); + dynamicImgForSelected_ = null; + } + return dynamicImgForSelectedBuilder_; + } + + private int afterSendAction_ ; + /** + * <code>int32 afterSendAction = 48;</code> + * @return The afterSendAction. + */ + @java.lang.Override + public int getAfterSendAction() { + return afterSendAction_; + } + /** + * <code>int32 afterSendAction = 48;</code> + * @param value The afterSendAction to set. + * @return This builder for chaining. + */ + public Builder setAfterSendAction(int value) { + + afterSendAction_ = value; + bitField1_ |= 0x00000400; + onChanged(); + return this; + } + /** + * <code>int32 afterSendAction = 48;</code> + * @return This builder for chaining. + */ + public Builder clearAfterSendAction() { + bitField1_ = (bitField1_ & ~0x00000400); + afterSendAction_ = 0; + onChanged(); + return this; + } + + private long giftOfflineTime_ ; + /** + * <code>int64 giftOfflineTime = 49;</code> + * @return The giftOfflineTime. + */ + @java.lang.Override + public long getGiftOfflineTime() { + return giftOfflineTime_; + } + /** + * <code>int64 giftOfflineTime = 49;</code> + * @param value The giftOfflineTime to set. + * @return This builder for chaining. + */ + public Builder setGiftOfflineTime(long value) { + + giftOfflineTime_ = value; + bitField1_ |= 0x00000800; + onChanged(); + return this; + } + /** + * <code>int64 giftOfflineTime = 49;</code> + * @return This builder for chaining. + */ + public Builder clearGiftOfflineTime() { + bitField1_ = (bitField1_ & ~0x00000800); + giftOfflineTime_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object topBarText_ = ""; + /** + * <code>string topBarText = 50;</code> + * @return The topBarText. + */ + public java.lang.String getTopBarText() { + java.lang.Object ref = topBarText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topBarText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string topBarText = 50;</code> + * @return The bytes for topBarText. + */ + public com.google.protobuf.ByteString + getTopBarTextBytes() { + java.lang.Object ref = topBarText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topBarText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string topBarText = 50;</code> + * @param value The topBarText to set. + * @return This builder for chaining. + */ + public Builder setTopBarText( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + topBarText_ = value; + bitField1_ |= 0x00001000; + onChanged(); + return this; + } + /** + * <code>string topBarText = 50;</code> + * @return This builder for chaining. + */ + public Builder clearTopBarText() { + topBarText_ = getDefaultInstance().getTopBarText(); + bitField1_ = (bitField1_ & ~0x00001000); + onChanged(); + return this; + } + /** + * <code>string topBarText = 50;</code> + * @param value The bytes for topBarText to set. + * @return This builder for chaining. + */ + public Builder setTopBarTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + topBarText_ = value; + bitField1_ |= 0x00001000; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image topRightAvatar_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> topRightAvatarBuilder_; + /** + * <code>.Image topRightAvatar = 51;</code> + * @return Whether the topRightAvatar field is set. + */ + public boolean hasTopRightAvatar() { + return ((bitField1_ & 0x00002000) != 0); + } + /** + * <code>.Image topRightAvatar = 51;</code> + * @return The topRightAvatar. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getTopRightAvatar() { + if (topRightAvatarBuilder_ == null) { + return topRightAvatar_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : topRightAvatar_; + } else { + return topRightAvatarBuilder_.getMessage(); + } + } + /** + * <code>.Image topRightAvatar = 51;</code> + */ + public Builder setTopRightAvatar(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (topRightAvatarBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + topRightAvatar_ = value; + } else { + topRightAvatarBuilder_.setMessage(value); + } + bitField1_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>.Image topRightAvatar = 51;</code> + */ + public Builder setTopRightAvatar( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (topRightAvatarBuilder_ == null) { + topRightAvatar_ = builderForValue.build(); + } else { + topRightAvatarBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>.Image topRightAvatar = 51;</code> + */ + public Builder mergeTopRightAvatar(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (topRightAvatarBuilder_ == null) { + if (((bitField1_ & 0x00002000) != 0) && + topRightAvatar_ != null && + topRightAvatar_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getTopRightAvatarBuilder().mergeFrom(value); + } else { + topRightAvatar_ = value; + } + } else { + topRightAvatarBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>.Image topRightAvatar = 51;</code> + */ + public Builder clearTopRightAvatar() { + bitField1_ = (bitField1_ & ~0x00002000); + topRightAvatar_ = null; + if (topRightAvatarBuilder_ != null) { + topRightAvatarBuilder_.dispose(); + topRightAvatarBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image topRightAvatar = 51;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getTopRightAvatarBuilder() { + bitField1_ |= 0x00002000; + onChanged(); + return getTopRightAvatarFieldBuilder().getBuilder(); + } + /** + * <code>.Image topRightAvatar = 51;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getTopRightAvatarOrBuilder() { + if (topRightAvatarBuilder_ != null) { + return topRightAvatarBuilder_.getMessageOrBuilder(); + } else { + return topRightAvatar_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : topRightAvatar_; + } + } + /** + * <code>.Image topRightAvatar = 51;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getTopRightAvatarFieldBuilder() { + if (topRightAvatarBuilder_ == null) { + topRightAvatarBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getTopRightAvatar(), + getParentForChildren(), + isClean()); + topRightAvatar_ = null; + } + return topRightAvatarBuilder_; + } + + private java.lang.Object bannerSchemeUrl_ = ""; + /** + * <code>string bannerSchemeUrl = 52;</code> + * @return The bannerSchemeUrl. + */ + public java.lang.String getBannerSchemeUrl() { + java.lang.Object ref = bannerSchemeUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bannerSchemeUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string bannerSchemeUrl = 52;</code> + * @return The bytes for bannerSchemeUrl. + */ + public com.google.protobuf.ByteString + getBannerSchemeUrlBytes() { + java.lang.Object ref = bannerSchemeUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + bannerSchemeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string bannerSchemeUrl = 52;</code> + * @param value The bannerSchemeUrl to set. + * @return This builder for chaining. + */ + public Builder setBannerSchemeUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + bannerSchemeUrl_ = value; + bitField1_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <code>string bannerSchemeUrl = 52;</code> + * @return This builder for chaining. + */ + public Builder clearBannerSchemeUrl() { + bannerSchemeUrl_ = getDefaultInstance().getBannerSchemeUrl(); + bitField1_ = (bitField1_ & ~0x00004000); + onChanged(); + return this; + } + /** + * <code>string bannerSchemeUrl = 52;</code> + * @param value The bytes for bannerSchemeUrl to set. + * @return This builder for chaining. + */ + public Builder setBannerSchemeUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + bannerSchemeUrl_ = value; + bitField1_ |= 0x00004000; + onChanged(); + return this; + } + + private boolean isLocked_ ; + /** + * <code>bool isLocked = 53;</code> + * @return The isLocked. + */ + @java.lang.Override + public boolean getIsLocked() { + return isLocked_; + } + /** + * <code>bool isLocked = 53;</code> + * @param value The isLocked to set. + * @return This builder for chaining. + */ + public Builder setIsLocked(boolean value) { + + isLocked_ = value; + bitField1_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>bool isLocked = 53;</code> + * @return This builder for chaining. + */ + public Builder clearIsLocked() { + bitField1_ = (bitField1_ & ~0x00008000); + isLocked_ = false; + onChanged(); + return this; + } + + private long reqExtraType_ ; + /** + * <code>int64 reqExtraType = 54;</code> + * @return The reqExtraType. + */ + @java.lang.Override + public long getReqExtraType() { + return reqExtraType_; + } + /** + * <code>int64 reqExtraType = 54;</code> + * @param value The reqExtraType to set. + * @return This builder for chaining. + */ + public Builder setReqExtraType(long value) { + + reqExtraType_ = value; + bitField1_ |= 0x00010000; + onChanged(); + return this; + } + /** + * <code>int64 reqExtraType = 54;</code> + * @return This builder for chaining. + */ + public Builder clearReqExtraType() { + bitField1_ = (bitField1_ & ~0x00010000); + reqExtraType_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.LongList assetIds_ = emptyLongList(); + private void ensureAssetIdsIsMutable() { + if (!((bitField1_ & 0x00020000) != 0)) { + assetIds_ = mutableCopy(assetIds_); + bitField1_ |= 0x00020000; + } + } + /** + * <code>repeated int64 assetIds = 55;</code> + * @return A list containing the assetIds. + */ + public java.util.List<java.lang.Long> + getAssetIdsList() { + return ((bitField1_ & 0x00020000) != 0) ? + java.util.Collections.unmodifiableList(assetIds_) : assetIds_; + } + /** + * <code>repeated int64 assetIds = 55;</code> + * @return The count of assetIds. + */ + public int getAssetIdsCount() { + return assetIds_.size(); + } + /** + * <code>repeated int64 assetIds = 55;</code> + * @param index The index of the element to return. + * @return The assetIds at the given index. + */ + public long getAssetIds(int index) { + return assetIds_.getLong(index); + } + /** + * <code>repeated int64 assetIds = 55;</code> + * @param index The index to set the value at. + * @param value The assetIds to set. + * @return This builder for chaining. + */ + public Builder setAssetIds( + int index, long value) { + + ensureAssetIdsIsMutable(); + assetIds_.setLong(index, value); + onChanged(); + return this; + } + /** + * <code>repeated int64 assetIds = 55;</code> + * @param value The assetIds to add. + * @return This builder for chaining. + */ + public Builder addAssetIds(long value) { + + ensureAssetIdsIsMutable(); + assetIds_.addLong(value); + onChanged(); + return this; + } + /** + * <code>repeated int64 assetIds = 55;</code> + * @param values The assetIds to add. + * @return This builder for chaining. + */ + public Builder addAllAssetIds( + java.lang.Iterable<? extends java.lang.Long> values) { + ensureAssetIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, assetIds_); + onChanged(); + return this; + } + /** + * <code>repeated int64 assetIds = 55;</code> + * @return This builder for chaining. + */ + public Builder clearAssetIds() { + assetIds_ = emptyLongList(); + bitField1_ = (bitField1_ & ~0x00020000); + onChanged(); + return this; + } + + private int needSweepLightCount_ ; + /** + * <pre> + * GiftPreviewInfo giftPreviewInfo = 56; + * GiftTip giftTip = 57; + * </pre> + * + * <code>int32 needSweepLightCount = 58;</code> + * @return The needSweepLightCount. + */ + @java.lang.Override + public int getNeedSweepLightCount() { + return needSweepLightCount_; + } + /** + * <pre> + * GiftPreviewInfo giftPreviewInfo = 56; + * GiftTip giftTip = 57; + * </pre> + * + * <code>int32 needSweepLightCount = 58;</code> + * @param value The needSweepLightCount to set. + * @return This builder for chaining. + */ + public Builder setNeedSweepLightCount(int value) { + + needSweepLightCount_ = value; + bitField1_ |= 0x00040000; + onChanged(); + return this; + } + /** + * <pre> + * GiftPreviewInfo giftPreviewInfo = 56; + * GiftTip giftTip = 57; + * </pre> + * + * <code>int32 needSweepLightCount = 58;</code> + * @return This builder for chaining. + */ + public Builder clearNeedSweepLightCount() { + bitField1_ = (bitField1_ & ~0x00040000); + needSweepLightCount_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:GiftStruct) + } + + // @@protoc_insertion_point(class_scope:GiftStruct) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<GiftStruct> + PARSER = new com.google.protobuf.AbstractParser<GiftStruct>() { + @java.lang.Override + public GiftStruct parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<GiftStruct> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<GiftStruct> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.GiftStructOuterClass.GiftStruct getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GiftStruct_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_GiftStruct_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GiftStruct_SpecialEffectsMapEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_GiftStruct_SpecialEffectsMapEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\020GiftStruct.proto\032\013Image.proto\"\241\t\n\nGift" + + "Struct\022\025\n\005image\030\001 \001(\0132\006.Image\022\020\n\010describ" + + "e\030\002 \001(\t\022\016\n\006notify\030\003 \001(\010\022\020\n\010duration\030\004 \001(" + + "\004\022\n\n\002id\030\005 \001(\004\022\023\n\013for_linkmic\030\007 \001(\010\022\016\n\006do" + + "odle\030\010 \001(\010\022\024\n\014for_fansclub\030\t \001(\010\022\r\n\005comb" + + "o\030\n \001(\010\022\014\n\004type\030\013 \001(\r\022\025\n\rdiamond_count\030\014" + + " \001(\r\022\035\n\025is_displayed_on_panel\030\r \001(\010\022\031\n\021p" + + "rimary_effect_id\030\016 \001(\004\022\037\n\017gift_label_ico" + + "n\030\017 \001(\0132\006.Image\022\014\n\004name\030\020 \001(\t\022\016\n\006region\030" + + "\021 \001(\t\022\016\n\006manual\030\022 \001(\t\022\022\n\nfor_custom\030\023 \001(" + + "\010\022=\n\021specialEffectsMap\030\024 \003(\0132\".GiftStruc" + + "t.SpecialEffectsMapEntry\022\024\n\004icon\030\025 \001(\0132\006" + + ".Image\022\023\n\013action_type\030\026 \001(\r\022\027\n\017watermelo" + + "nSeeds\030\027 \001(\005\022\022\n\ngoldEffect\030\030 \001(\t\022\023\n\013gold" + + "enBeans\030\032 \001(\003\022\022\n\nhonorLevel\030\033 \001(\003\022\020\n\010ite" + + "mType\030\034 \001(\005\022\021\n\tschemeUrl\030\035 \001(\t\022\021\n\teventN" + + "ame\030\037 \001(\t\022\022\n\nnobleLevel\030 \001(\003\022\020\n\010guideUr" + + "l\030! \001(\t\022\026\n\016punishMedicine\030\" \001(\010\022\021\n\tforPo" + + "rtal\030# \001(\010\022\024\n\014businessText\030$ \001(\t\022\017\n\007cnyG" + + "ift\030% \001(\010\022\r\n\005appId\030& \001(\003\022\020\n\010vipLevel\030\' \001" + + "(\003\022\016\n\006isGray\030( \001(\010\022\025\n\rgraySchemeUrl\030) \001(" + + "\t\022\021\n\tgiftScene\030* \001(\003\022\024\n\014triggerWords\030, \003" + + "(\t\022\030\n\020forFirstRecharge\030. \001(\010\022%\n\025dynamicI" + + "mgForSelected\030/ \001(\0132\006.Image\022\027\n\017afterSend" + + "Action\0300 \001(\005\022\027\n\017giftOfflineTime\0301 \001(\003\022\022\n" + + "\ntopBarText\0302 \001(\t\022\036\n\016topRightAvatar\0303 \001(" + + "\0132\006.Image\022\027\n\017bannerSchemeUrl\0304 \001(\t\022\020\n\010is" + + "Locked\0305 \001(\010\022\024\n\014reqExtraType\0306 \001(\003\022\020\n\010as" + + "setIds\0307 \003(\003\022\033\n\023needSweepLightCount\030: \001(" + + "\005\0328\n\026SpecialEffectsMapEntry\022\013\n\003key\030\001 \001(\t" + + "\022\r\n\005value\030\002 \001(\003:\0028\001B8\n6tech.ordinaryroad" + + ".live.chat.client.douyin.protobuf.dtob\006p" + + "roto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor(), + }); + internal_static_GiftStruct_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_GiftStruct_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_GiftStruct_descriptor, + new java.lang.String[] { "Image", "Describe", "Notify", "Duration", "Id", "ForLinkmic", "Doodle", "ForFansclub", "Combo", "Type", "DiamondCount", "IsDisplayedOnPanel", "PrimaryEffectId", "GiftLabelIcon", "Name", "Region", "Manual", "ForCustom", "SpecialEffectsMap", "Icon", "ActionType", "WatermelonSeeds", "GoldEffect", "GoldenBeans", "HonorLevel", "ItemType", "SchemeUrl", "EventName", "NobleLevel", "GuideUrl", "PunishMedicine", "ForPortal", "BusinessText", "CnyGift", "AppId", "VipLevel", "IsGray", "GraySchemeUrl", "GiftScene", "TriggerWords", "ForFirstRecharge", "DynamicImgForSelected", "AfterSendAction", "GiftOfflineTime", "TopBarText", "TopRightAvatar", "BannerSchemeUrl", "IsLocked", "ReqExtraType", "AssetIds", "NeedSweepLightCount", }); + internal_static_GiftStruct_SpecialEffectsMapEntry_descriptor = + internal_static_GiftStruct_descriptor.getNestedTypes().get(0); + internal_static_GiftStruct_SpecialEffectsMapEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_GiftStruct_SpecialEffectsMapEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/ImageOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/ImageOuterClass.java new file mode 100644 index 0000000..4a30d6e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/ImageOuterClass.java @@ -0,0 +1,3722 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Image.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class ImageOuterClass { + private ImageOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:Image) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>repeated string urlListList = 1;</code> + * @return A list containing the urlListList. + */ + java.util.List<java.lang.String> + getUrlListListList(); + /** + * <code>repeated string urlListList = 1;</code> + * @return The count of urlListList. + */ + int getUrlListListCount(); + /** + * <code>repeated string urlListList = 1;</code> + * @param index The index of the element to return. + * @return The urlListList at the given index. + */ + java.lang.String getUrlListList(int index); + /** + * <code>repeated string urlListList = 1;</code> + * @param index The index of the value to return. + * @return The bytes of the urlListList at the given index. + */ + com.google.protobuf.ByteString + getUrlListListBytes(int index); + + /** + * <code>string uri = 2;</code> + * @return The uri. + */ + java.lang.String getUri(); + /** + * <code>string uri = 2;</code> + * @return The bytes for uri. + */ + com.google.protobuf.ByteString + getUriBytes(); + + /** + * <code>int64 height = 3;</code> + * @return The height. + */ + long getHeight(); + + /** + * <code>int64 width = 4;</code> + * @return The width. + */ + long getWidth(); + + /** + * <code>string avgColor = 5;</code> + * @return The avgColor. + */ + java.lang.String getAvgColor(); + /** + * <code>string avgColor = 5;</code> + * @return The bytes for avgColor. + */ + com.google.protobuf.ByteString + getAvgColorBytes(); + + /** + * <code>int32 imageType = 6;</code> + * @return The imageType. + */ + int getImageType(); + + /** + * <code>string openWebUrl = 7;</code> + * @return The openWebUrl. + */ + java.lang.String getOpenWebUrl(); + /** + * <code>string openWebUrl = 7;</code> + * @return The bytes for openWebUrl. + */ + com.google.protobuf.ByteString + getOpenWebUrlBytes(); + + /** + * <code>.Image.Content content = 8;</code> + * @return Whether the content field is set. + */ + boolean hasContent(); + /** + * <code>.Image.Content content = 8;</code> + * @return The content. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content getContent(); + /** + * <code>.Image.Content content = 8;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.ContentOrBuilder getContentOrBuilder(); + + /** + * <code>bool isAnimated = 9;</code> + * @return The isAnimated. + */ + boolean getIsAnimated(); + + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting> + getFlexSettingListListList(); + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getFlexSettingListList(int index); + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + int getFlexSettingListListCount(); + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder> + getFlexSettingListListOrBuilderList(); + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder getFlexSettingListListOrBuilder( + int index); + + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting> + getTextSettingListListList(); + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getTextSettingListList(int index); + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + int getTextSettingListListCount(); + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder> + getTextSettingListListOrBuilderList(); + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder getTextSettingListListOrBuilder( + int index); + } + /** + * Protobuf type {@code Image} + */ + public static final class Image extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Image) + ImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use Image.newBuilder() to construct. + private Image(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private Image() { + urlListList_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + uri_ = ""; + avgColor_ = ""; + openWebUrl_ = ""; + flexSettingListList_ = java.util.Collections.emptyList(); + textSettingListList_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Image(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder.class); + } + + public interface ContentOrBuilder extends + // @@protoc_insertion_point(interface_extends:Image.Content) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string name = 1;</code> + * @return The name. + */ + java.lang.String getName(); + /** + * <code>string name = 1;</code> + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * <code>string fontColor = 2;</code> + * @return The fontColor. + */ + java.lang.String getFontColor(); + /** + * <code>string fontColor = 2;</code> + * @return The bytes for fontColor. + */ + com.google.protobuf.ByteString + getFontColorBytes(); + + /** + * <code>int64 level = 3;</code> + * @return The level. + */ + long getLevel(); + + /** + * <code>string alternativeText = 4;</code> + * @return The alternativeText. + */ + java.lang.String getAlternativeText(); + /** + * <code>string alternativeText = 4;</code> + * @return The bytes for alternativeText. + */ + com.google.protobuf.ByteString + getAlternativeTextBytes(); + } + /** + * Protobuf type {@code Image.Content} + */ + public static final class Content extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Image.Content) + ContentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Content.newBuilder() to construct. + private Content(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private Content() { + name_ = ""; + fontColor_ = ""; + alternativeText_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Content(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_Content_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_Content_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * <code>string name = 1;</code> + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * <code>string name = 1;</code> + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FONTCOLOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object fontColor_ = ""; + /** + * <code>string fontColor = 2;</code> + * @return The fontColor. + */ + @java.lang.Override + public java.lang.String getFontColor() { + java.lang.Object ref = fontColor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fontColor_ = s; + return s; + } + } + /** + * <code>string fontColor = 2;</code> + * @return The bytes for fontColor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFontColorBytes() { + java.lang.Object ref = fontColor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fontColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LEVEL_FIELD_NUMBER = 3; + private long level_ = 0L; + /** + * <code>int64 level = 3;</code> + * @return The level. + */ + @java.lang.Override + public long getLevel() { + return level_; + } + + public static final int ALTERNATIVETEXT_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object alternativeText_ = ""; + /** + * <code>string alternativeText = 4;</code> + * @return The alternativeText. + */ + @java.lang.Override + public java.lang.String getAlternativeText() { + java.lang.Object ref = alternativeText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + alternativeText_ = s; + return s; + } + } + /** + * <code>string alternativeText = 4;</code> + * @return The bytes for alternativeText. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAlternativeTextBytes() { + java.lang.Object ref = alternativeText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + alternativeText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fontColor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fontColor_); + } + if (level_ != 0L) { + output.writeInt64(3, level_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(alternativeText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, alternativeText_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(fontColor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fontColor_); + } + if (level_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, level_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(alternativeText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, alternativeText_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getFontColor() + .equals(other.getFontColor())) return false; + if (getLevel() + != other.getLevel()) return false; + if (!getAlternativeText() + .equals(other.getAlternativeText())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + FONTCOLOR_FIELD_NUMBER; + hash = (53 * hash) + getFontColor().hashCode(); + hash = (37 * hash) + LEVEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLevel()); + hash = (37 * hash) + ALTERNATIVETEXT_FIELD_NUMBER; + hash = (53 * hash) + getAlternativeText().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Image.Content} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:Image.Content) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.ContentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_Content_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_Content_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + fontColor_ = ""; + level_ = 0L; + alternativeText_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_Content_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.fontColor_ = fontColor_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.level_ = level_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.alternativeText_ = alternativeText_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getFontColor().isEmpty()) { + fontColor_ = other.fontColor_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getLevel() != 0L) { + setLevel(other.getLevel()); + } + if (!other.getAlternativeText().isEmpty()) { + alternativeText_ = other.alternativeText_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + fontColor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + level_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + alternativeText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * <code>string name = 1;</code> + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string name = 1;</code> + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string name = 1;</code> + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string name = 1;</code> + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string name = 1;</code> + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object fontColor_ = ""; + /** + * <code>string fontColor = 2;</code> + * @return The fontColor. + */ + public java.lang.String getFontColor() { + java.lang.Object ref = fontColor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fontColor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string fontColor = 2;</code> + * @return The bytes for fontColor. + */ + public com.google.protobuf.ByteString + getFontColorBytes() { + java.lang.Object ref = fontColor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fontColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string fontColor = 2;</code> + * @param value The fontColor to set. + * @return This builder for chaining. + */ + public Builder setFontColor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + fontColor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string fontColor = 2;</code> + * @return This builder for chaining. + */ + public Builder clearFontColor() { + fontColor_ = getDefaultInstance().getFontColor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string fontColor = 2;</code> + * @param value The bytes for fontColor to set. + * @return This builder for chaining. + */ + public Builder setFontColorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + fontColor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long level_ ; + /** + * <code>int64 level = 3;</code> + * @return The level. + */ + @java.lang.Override + public long getLevel() { + return level_; + } + /** + * <code>int64 level = 3;</code> + * @param value The level to set. + * @return This builder for chaining. + */ + public Builder setLevel(long value) { + + level_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>int64 level = 3;</code> + * @return This builder for chaining. + */ + public Builder clearLevel() { + bitField0_ = (bitField0_ & ~0x00000004); + level_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object alternativeText_ = ""; + /** + * <code>string alternativeText = 4;</code> + * @return The alternativeText. + */ + public java.lang.String getAlternativeText() { + java.lang.Object ref = alternativeText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + alternativeText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string alternativeText = 4;</code> + * @return The bytes for alternativeText. + */ + public com.google.protobuf.ByteString + getAlternativeTextBytes() { + java.lang.Object ref = alternativeText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + alternativeText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string alternativeText = 4;</code> + * @param value The alternativeText to set. + * @return This builder for chaining. + */ + public Builder setAlternativeText( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + alternativeText_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>string alternativeText = 4;</code> + * @return This builder for chaining. + */ + public Builder clearAlternativeText() { + alternativeText_ = getDefaultInstance().getAlternativeText(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * <code>string alternativeText = 4;</code> + * @param value The bytes for alternativeText to set. + * @return This builder for chaining. + */ + public Builder setAlternativeTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + alternativeText_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Image.Content) + } + + // @@protoc_insertion_point(class_scope:Image.Content) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<Content> + PARSER = new com.google.protobuf.AbstractParser<Content>() { + @java.lang.Override + public Content parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<Content> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<Content> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface NinePatchSettingOrBuilder extends + // @@protoc_insertion_point(interface_extends:Image.NinePatchSetting) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code Image.NinePatchSetting} + */ + public static final class NinePatchSetting extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Image.NinePatchSetting) + NinePatchSettingOrBuilder { + private static final long serialVersionUID = 0L; + // Use NinePatchSetting.newBuilder() to construct. + private NinePatchSetting(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private NinePatchSetting() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NinePatchSetting(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_NinePatchSetting_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_NinePatchSetting_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Image.NinePatchSetting} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:Image.NinePatchSetting) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_NinePatchSetting_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_NinePatchSetting_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_NinePatchSetting_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Image.NinePatchSetting) + } + + // @@protoc_insertion_point(class_scope:Image.NinePatchSetting) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<NinePatchSetting> + PARSER = new com.google.protobuf.AbstractParser<NinePatchSetting>() { + @java.lang.Override + public NinePatchSetting parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<NinePatchSetting> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<NinePatchSetting> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int URLLISTLIST_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList urlListList_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * <code>repeated string urlListList = 1;</code> + * @return A list containing the urlListList. + */ + public com.google.protobuf.ProtocolStringList + getUrlListListList() { + return urlListList_; + } + /** + * <code>repeated string urlListList = 1;</code> + * @return The count of urlListList. + */ + public int getUrlListListCount() { + return urlListList_.size(); + } + /** + * <code>repeated string urlListList = 1;</code> + * @param index The index of the element to return. + * @return The urlListList at the given index. + */ + public java.lang.String getUrlListList(int index) { + return urlListList_.get(index); + } + /** + * <code>repeated string urlListList = 1;</code> + * @param index The index of the value to return. + * @return The bytes of the urlListList at the given index. + */ + public com.google.protobuf.ByteString + getUrlListListBytes(int index) { + return urlListList_.getByteString(index); + } + + public static final int URI_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object uri_ = ""; + /** + * <code>string uri = 2;</code> + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } + } + /** + * <code>string uri = 2;</code> + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEIGHT_FIELD_NUMBER = 3; + private long height_ = 0L; + /** + * <code>int64 height = 3;</code> + * @return The height. + */ + @java.lang.Override + public long getHeight() { + return height_; + } + + public static final int WIDTH_FIELD_NUMBER = 4; + private long width_ = 0L; + /** + * <code>int64 width = 4;</code> + * @return The width. + */ + @java.lang.Override + public long getWidth() { + return width_; + } + + public static final int AVGCOLOR_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object avgColor_ = ""; + /** + * <code>string avgColor = 5;</code> + * @return The avgColor. + */ + @java.lang.Override + public java.lang.String getAvgColor() { + java.lang.Object ref = avgColor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avgColor_ = s; + return s; + } + } + /** + * <code>string avgColor = 5;</code> + * @return The bytes for avgColor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAvgColorBytes() { + java.lang.Object ref = avgColor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avgColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGETYPE_FIELD_NUMBER = 6; + private int imageType_ = 0; + /** + * <code>int32 imageType = 6;</code> + * @return The imageType. + */ + @java.lang.Override + public int getImageType() { + return imageType_; + } + + public static final int OPENWEBURL_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object openWebUrl_ = ""; + /** + * <code>string openWebUrl = 7;</code> + * @return The openWebUrl. + */ + @java.lang.Override + public java.lang.String getOpenWebUrl() { + java.lang.Object ref = openWebUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + openWebUrl_ = s; + return s; + } + } + /** + * <code>string openWebUrl = 7;</code> + * @return The bytes for openWebUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOpenWebUrlBytes() { + java.lang.Object ref = openWebUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + openWebUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 8; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content content_; + /** + * <code>.Image.Content content = 8;</code> + * @return Whether the content field is set. + */ + @java.lang.Override + public boolean hasContent() { + return content_ != null; + } + /** + * <code>.Image.Content content = 8;</code> + * @return The content. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content getContent() { + return content_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.getDefaultInstance() : content_; + } + /** + * <code>.Image.Content content = 8;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.ContentOrBuilder getContentOrBuilder() { + return content_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.getDefaultInstance() : content_; + } + + public static final int ISANIMATED_FIELD_NUMBER = 9; + private boolean isAnimated_ = false; + /** + * <code>bool isAnimated = 9;</code> + * @return The isAnimated. + */ + @java.lang.Override + public boolean getIsAnimated() { + return isAnimated_; + } + + public static final int FLEXSETTINGLISTLIST_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting> flexSettingListList_; + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting> getFlexSettingListListList() { + return flexSettingListList_; + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder> + getFlexSettingListListOrBuilderList() { + return flexSettingListList_; + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + @java.lang.Override + public int getFlexSettingListListCount() { + return flexSettingListList_.size(); + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getFlexSettingListList(int index) { + return flexSettingListList_.get(index); + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder getFlexSettingListListOrBuilder( + int index) { + return flexSettingListList_.get(index); + } + + public static final int TEXTSETTINGLISTLIST_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting> textSettingListList_; + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting> getTextSettingListListList() { + return textSettingListList_; + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder> + getTextSettingListListOrBuilderList() { + return textSettingListList_; + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + @java.lang.Override + public int getTextSettingListListCount() { + return textSettingListList_.size(); + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getTextSettingListList(int index) { + return textSettingListList_.get(index); + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder getTextSettingListListOrBuilder( + int index) { + return textSettingListList_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < urlListList_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, urlListList_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_); + } + if (height_ != 0L) { + output.writeInt64(3, height_); + } + if (width_ != 0L) { + output.writeInt64(4, width_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avgColor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, avgColor_); + } + if (imageType_ != 0) { + output.writeInt32(6, imageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(openWebUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, openWebUrl_); + } + if (content_ != null) { + output.writeMessage(8, getContent()); + } + if (isAnimated_ != false) { + output.writeBool(9, isAnimated_); + } + for (int i = 0; i < flexSettingListList_.size(); i++) { + output.writeMessage(10, flexSettingListList_.get(i)); + } + for (int i = 0; i < textSettingListList_.size(); i++) { + output.writeMessage(11, textSettingListList_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < urlListList_.size(); i++) { + dataSize += computeStringSizeNoTag(urlListList_.getRaw(i)); + } + size += dataSize; + size += 1 * getUrlListListList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_); + } + if (height_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, height_); + } + if (width_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, width_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avgColor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, avgColor_); + } + if (imageType_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, imageType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(openWebUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, openWebUrl_); + } + if (content_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getContent()); + } + if (isAnimated_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, isAnimated_); + } + for (int i = 0; i < flexSettingListList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, flexSettingListList_.get(i)); + } + for (int i = 0; i < textSettingListList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, textSettingListList_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image) obj; + + if (!getUrlListListList() + .equals(other.getUrlListListList())) return false; + if (!getUri() + .equals(other.getUri())) return false; + if (getHeight() + != other.getHeight()) return false; + if (getWidth() + != other.getWidth()) return false; + if (!getAvgColor() + .equals(other.getAvgColor())) return false; + if (getImageType() + != other.getImageType()) return false; + if (!getOpenWebUrl() + .equals(other.getOpenWebUrl())) return false; + if (hasContent() != other.hasContent()) return false; + if (hasContent()) { + if (!getContent() + .equals(other.getContent())) return false; + } + if (getIsAnimated() + != other.getIsAnimated()) return false; + if (!getFlexSettingListListList() + .equals(other.getFlexSettingListListList())) return false; + if (!getTextSettingListListList() + .equals(other.getTextSettingListListList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getUrlListListCount() > 0) { + hash = (37 * hash) + URLLISTLIST_FIELD_NUMBER; + hash = (53 * hash) + getUrlListListList().hashCode(); + } + hash = (37 * hash) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getHeight()); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getWidth()); + hash = (37 * hash) + AVGCOLOR_FIELD_NUMBER; + hash = (53 * hash) + getAvgColor().hashCode(); + hash = (37 * hash) + IMAGETYPE_FIELD_NUMBER; + hash = (53 * hash) + getImageType(); + hash = (37 * hash) + OPENWEBURL_FIELD_NUMBER; + hash = (53 * hash) + getOpenWebUrl().hashCode(); + if (hasContent()) { + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + } + hash = (37 * hash) + ISANIMATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsAnimated()); + if (getFlexSettingListListCount() > 0) { + hash = (37 * hash) + FLEXSETTINGLISTLIST_FIELD_NUMBER; + hash = (53 * hash) + getFlexSettingListListList().hashCode(); + } + if (getTextSettingListListCount() > 0) { + hash = (37 * hash) + TEXTSETTINGLISTLIST_FIELD_NUMBER; + hash = (53 * hash) + getTextSettingListListList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Image} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:Image) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + urlListList_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + uri_ = ""; + height_ = 0L; + width_ = 0L; + avgColor_ = ""; + imageType_ = 0; + openWebUrl_ = ""; + content_ = null; + if (contentBuilder_ != null) { + contentBuilder_.dispose(); + contentBuilder_ = null; + } + isAnimated_ = false; + if (flexSettingListListBuilder_ == null) { + flexSettingListList_ = java.util.Collections.emptyList(); + } else { + flexSettingListList_ = null; + flexSettingListListBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + if (textSettingListListBuilder_ == null) { + textSettingListList_ = java.util.Collections.emptyList(); + } else { + textSettingListList_ = null; + textSettingListListBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.internal_static_Image_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image result) { + if (flexSettingListListBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + flexSettingListList_ = java.util.Collections.unmodifiableList(flexSettingListList_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.flexSettingListList_ = flexSettingListList_; + } else { + result.flexSettingListList_ = flexSettingListListBuilder_.build(); + } + if (textSettingListListBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + textSettingListList_ = java.util.Collections.unmodifiableList(textSettingListList_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.textSettingListList_ = textSettingListList_; + } else { + result.textSettingListList_ = textSettingListListBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + urlListList_.makeImmutable(); + result.urlListList_ = urlListList_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uri_ = uri_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.height_ = height_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.width_ = width_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.avgColor_ = avgColor_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.imageType_ = imageType_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.openWebUrl_ = openWebUrl_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.content_ = contentBuilder_ == null + ? content_ + : contentBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.isAnimated_ = isAnimated_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) return this; + if (!other.urlListList_.isEmpty()) { + if (urlListList_.isEmpty()) { + urlListList_ = other.urlListList_; + bitField0_ |= 0x00000001; + } else { + ensureUrlListListIsMutable(); + urlListList_.addAll(other.urlListList_); + } + onChanged(); + } + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getHeight() != 0L) { + setHeight(other.getHeight()); + } + if (other.getWidth() != 0L) { + setWidth(other.getWidth()); + } + if (!other.getAvgColor().isEmpty()) { + avgColor_ = other.avgColor_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getImageType() != 0) { + setImageType(other.getImageType()); + } + if (!other.getOpenWebUrl().isEmpty()) { + openWebUrl_ = other.openWebUrl_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasContent()) { + mergeContent(other.getContent()); + } + if (other.getIsAnimated() != false) { + setIsAnimated(other.getIsAnimated()); + } + if (flexSettingListListBuilder_ == null) { + if (!other.flexSettingListList_.isEmpty()) { + if (flexSettingListList_.isEmpty()) { + flexSettingListList_ = other.flexSettingListList_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureFlexSettingListListIsMutable(); + flexSettingListList_.addAll(other.flexSettingListList_); + } + onChanged(); + } + } else { + if (!other.flexSettingListList_.isEmpty()) { + if (flexSettingListListBuilder_.isEmpty()) { + flexSettingListListBuilder_.dispose(); + flexSettingListListBuilder_ = null; + flexSettingListList_ = other.flexSettingListList_; + bitField0_ = (bitField0_ & ~0x00000200); + flexSettingListListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getFlexSettingListListFieldBuilder() : null; + } else { + flexSettingListListBuilder_.addAllMessages(other.flexSettingListList_); + } + } + } + if (textSettingListListBuilder_ == null) { + if (!other.textSettingListList_.isEmpty()) { + if (textSettingListList_.isEmpty()) { + textSettingListList_ = other.textSettingListList_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureTextSettingListListIsMutable(); + textSettingListList_.addAll(other.textSettingListList_); + } + onChanged(); + } + } else { + if (!other.textSettingListList_.isEmpty()) { + if (textSettingListListBuilder_.isEmpty()) { + textSettingListListBuilder_.dispose(); + textSettingListListBuilder_ = null; + textSettingListList_ = other.textSettingListList_; + bitField0_ = (bitField0_ & ~0x00000400); + textSettingListListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTextSettingListListFieldBuilder() : null; + } else { + textSettingListListBuilder_.addAllMessages(other.textSettingListList_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUrlListListIsMutable(); + urlListList_.add(s); + break; + } // case 10 + case 18: { + uri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + height_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + width_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + avgColor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + imageType_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + openWebUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getContentFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: { + isAnimated_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting m = + input.readMessage( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.parser(), + extensionRegistry); + if (flexSettingListListBuilder_ == null) { + ensureFlexSettingListListIsMutable(); + flexSettingListList_.add(m); + } else { + flexSettingListListBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting m = + input.readMessage( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.parser(), + extensionRegistry); + if (textSettingListListBuilder_ == null) { + ensureTextSettingListListIsMutable(); + textSettingListList_.add(m); + } else { + textSettingListListBuilder_.addMessage(m); + } + break; + } // case 90 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList urlListList_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureUrlListListIsMutable() { + if (!urlListList_.isModifiable()) { + urlListList_ = new com.google.protobuf.LazyStringArrayList(urlListList_); + } + bitField0_ |= 0x00000001; + } + /** + * <code>repeated string urlListList = 1;</code> + * @return A list containing the urlListList. + */ + public com.google.protobuf.ProtocolStringList + getUrlListListList() { + urlListList_.makeImmutable(); + return urlListList_; + } + /** + * <code>repeated string urlListList = 1;</code> + * @return The count of urlListList. + */ + public int getUrlListListCount() { + return urlListList_.size(); + } + /** + * <code>repeated string urlListList = 1;</code> + * @param index The index of the element to return. + * @return The urlListList at the given index. + */ + public java.lang.String getUrlListList(int index) { + return urlListList_.get(index); + } + /** + * <code>repeated string urlListList = 1;</code> + * @param index The index of the value to return. + * @return The bytes of the urlListList at the given index. + */ + public com.google.protobuf.ByteString + getUrlListListBytes(int index) { + return urlListList_.getByteString(index); + } + /** + * <code>repeated string urlListList = 1;</code> + * @param index The index to set the value at. + * @param value The urlListList to set. + * @return This builder for chaining. + */ + public Builder setUrlListList( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUrlListListIsMutable(); + urlListList_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>repeated string urlListList = 1;</code> + * @param value The urlListList to add. + * @return This builder for chaining. + */ + public Builder addUrlListList( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUrlListListIsMutable(); + urlListList_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>repeated string urlListList = 1;</code> + * @param values The urlListList to add. + * @return This builder for chaining. + */ + public Builder addAllUrlListList( + java.lang.Iterable<java.lang.String> values) { + ensureUrlListListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, urlListList_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>repeated string urlListList = 1;</code> + * @return This builder for chaining. + */ + public Builder clearUrlListList() { + urlListList_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + * <code>repeated string urlListList = 1;</code> + * @param value The bytes of the urlListList to add. + * @return This builder for chaining. + */ + public Builder addUrlListListBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUrlListListIsMutable(); + urlListList_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uri_ = ""; + /** + * <code>string uri = 2;</code> + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string uri = 2;</code> + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString + getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string uri = 2;</code> + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string uri = 2;</code> + * @return This builder for chaining. + */ + public Builder clearUri() { + uri_ = getDefaultInstance().getUri(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string uri = 2;</code> + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + uri_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long height_ ; + /** + * <code>int64 height = 3;</code> + * @return The height. + */ + @java.lang.Override + public long getHeight() { + return height_; + } + /** + * <code>int64 height = 3;</code> + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(long value) { + + height_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>int64 height = 3;</code> + * @return This builder for chaining. + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000004); + height_ = 0L; + onChanged(); + return this; + } + + private long width_ ; + /** + * <code>int64 width = 4;</code> + * @return The width. + */ + @java.lang.Override + public long getWidth() { + return width_; + } + /** + * <code>int64 width = 4;</code> + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(long value) { + + width_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>int64 width = 4;</code> + * @return This builder for chaining. + */ + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000008); + width_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object avgColor_ = ""; + /** + * <code>string avgColor = 5;</code> + * @return The avgColor. + */ + public java.lang.String getAvgColor() { + java.lang.Object ref = avgColor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avgColor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string avgColor = 5;</code> + * @return The bytes for avgColor. + */ + public com.google.protobuf.ByteString + getAvgColorBytes() { + java.lang.Object ref = avgColor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avgColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string avgColor = 5;</code> + * @param value The avgColor to set. + * @return This builder for chaining. + */ + public Builder setAvgColor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + avgColor_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>string avgColor = 5;</code> + * @return This builder for chaining. + */ + public Builder clearAvgColor() { + avgColor_ = getDefaultInstance().getAvgColor(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * <code>string avgColor = 5;</code> + * @param value The bytes for avgColor to set. + * @return This builder for chaining. + */ + public Builder setAvgColorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + avgColor_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int imageType_ ; + /** + * <code>int32 imageType = 6;</code> + * @return The imageType. + */ + @java.lang.Override + public int getImageType() { + return imageType_; + } + /** + * <code>int32 imageType = 6;</code> + * @param value The imageType to set. + * @return This builder for chaining. + */ + public Builder setImageType(int value) { + + imageType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>int32 imageType = 6;</code> + * @return This builder for chaining. + */ + public Builder clearImageType() { + bitField0_ = (bitField0_ & ~0x00000020); + imageType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object openWebUrl_ = ""; + /** + * <code>string openWebUrl = 7;</code> + * @return The openWebUrl. + */ + public java.lang.String getOpenWebUrl() { + java.lang.Object ref = openWebUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + openWebUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string openWebUrl = 7;</code> + * @return The bytes for openWebUrl. + */ + public com.google.protobuf.ByteString + getOpenWebUrlBytes() { + java.lang.Object ref = openWebUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + openWebUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string openWebUrl = 7;</code> + * @param value The openWebUrl to set. + * @return This builder for chaining. + */ + public Builder setOpenWebUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + openWebUrl_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>string openWebUrl = 7;</code> + * @return This builder for chaining. + */ + public Builder clearOpenWebUrl() { + openWebUrl_ = getDefaultInstance().getOpenWebUrl(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * <code>string openWebUrl = 7;</code> + * @param value The bytes for openWebUrl to set. + * @return This builder for chaining. + */ + public Builder setOpenWebUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + openWebUrl_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content content_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.ContentOrBuilder> contentBuilder_; + /** + * <code>.Image.Content content = 8;</code> + * @return Whether the content field is set. + */ + public boolean hasContent() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * <code>.Image.Content content = 8;</code> + * @return The content. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content getContent() { + if (contentBuilder_ == null) { + return content_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.getDefaultInstance() : content_; + } else { + return contentBuilder_.getMessage(); + } + } + /** + * <code>.Image.Content content = 8;</code> + */ + public Builder setContent(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content value) { + if (contentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + } else { + contentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>.Image.Content content = 8;</code> + */ + public Builder setContent( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.Builder builderForValue) { + if (contentBuilder_ == null) { + content_ = builderForValue.build(); + } else { + contentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>.Image.Content content = 8;</code> + */ + public Builder mergeContent(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content value) { + if (contentBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + content_ != null && + content_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.getDefaultInstance()) { + getContentBuilder().mergeFrom(value); + } else { + content_ = value; + } + } else { + contentBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>.Image.Content content = 8;</code> + */ + public Builder clearContent() { + bitField0_ = (bitField0_ & ~0x00000080); + content_ = null; + if (contentBuilder_ != null) { + contentBuilder_.dispose(); + contentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image.Content content = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.Builder getContentBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getContentFieldBuilder().getBuilder(); + } + /** + * <code>.Image.Content content = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.ContentOrBuilder getContentOrBuilder() { + if (contentBuilder_ != null) { + return contentBuilder_.getMessageOrBuilder(); + } else { + return content_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.getDefaultInstance() : content_; + } + } + /** + * <code>.Image.Content content = 8;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.ContentOrBuilder> + getContentFieldBuilder() { + if (contentBuilder_ == null) { + contentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Content.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.ContentOrBuilder>( + getContent(), + getParentForChildren(), + isClean()); + content_ = null; + } + return contentBuilder_; + } + + private boolean isAnimated_ ; + /** + * <code>bool isAnimated = 9;</code> + * @return The isAnimated. + */ + @java.lang.Override + public boolean getIsAnimated() { + return isAnimated_; + } + /** + * <code>bool isAnimated = 9;</code> + * @param value The isAnimated to set. + * @return This builder for chaining. + */ + public Builder setIsAnimated(boolean value) { + + isAnimated_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>bool isAnimated = 9;</code> + * @return This builder for chaining. + */ + public Builder clearIsAnimated() { + bitField0_ = (bitField0_ & ~0x00000100); + isAnimated_ = false; + onChanged(); + return this; + } + + private java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting> flexSettingListList_ = + java.util.Collections.emptyList(); + private void ensureFlexSettingListListIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + flexSettingListList_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting>(flexSettingListList_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder> flexSettingListListBuilder_; + + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting> getFlexSettingListListList() { + if (flexSettingListListBuilder_ == null) { + return java.util.Collections.unmodifiableList(flexSettingListList_); + } else { + return flexSettingListListBuilder_.getMessageList(); + } + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public int getFlexSettingListListCount() { + if (flexSettingListListBuilder_ == null) { + return flexSettingListList_.size(); + } else { + return flexSettingListListBuilder_.getCount(); + } + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getFlexSettingListList(int index) { + if (flexSettingListListBuilder_ == null) { + return flexSettingListList_.get(index); + } else { + return flexSettingListListBuilder_.getMessage(index); + } + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public Builder setFlexSettingListList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting value) { + if (flexSettingListListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlexSettingListListIsMutable(); + flexSettingListList_.set(index, value); + onChanged(); + } else { + flexSettingListListBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public Builder setFlexSettingListList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder builderForValue) { + if (flexSettingListListBuilder_ == null) { + ensureFlexSettingListListIsMutable(); + flexSettingListList_.set(index, builderForValue.build()); + onChanged(); + } else { + flexSettingListListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public Builder addFlexSettingListList(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting value) { + if (flexSettingListListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlexSettingListListIsMutable(); + flexSettingListList_.add(value); + onChanged(); + } else { + flexSettingListListBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public Builder addFlexSettingListList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting value) { + if (flexSettingListListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFlexSettingListListIsMutable(); + flexSettingListList_.add(index, value); + onChanged(); + } else { + flexSettingListListBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public Builder addFlexSettingListList( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder builderForValue) { + if (flexSettingListListBuilder_ == null) { + ensureFlexSettingListListIsMutable(); + flexSettingListList_.add(builderForValue.build()); + onChanged(); + } else { + flexSettingListListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public Builder addFlexSettingListList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder builderForValue) { + if (flexSettingListListBuilder_ == null) { + ensureFlexSettingListListIsMutable(); + flexSettingListList_.add(index, builderForValue.build()); + onChanged(); + } else { + flexSettingListListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public Builder addAllFlexSettingListList( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting> values) { + if (flexSettingListListBuilder_ == null) { + ensureFlexSettingListListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, flexSettingListList_); + onChanged(); + } else { + flexSettingListListBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public Builder clearFlexSettingListList() { + if (flexSettingListListBuilder_ == null) { + flexSettingListList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + flexSettingListListBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public Builder removeFlexSettingListList(int index) { + if (flexSettingListListBuilder_ == null) { + ensureFlexSettingListListIsMutable(); + flexSettingListList_.remove(index); + onChanged(); + } else { + flexSettingListListBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder getFlexSettingListListBuilder( + int index) { + return getFlexSettingListListFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder getFlexSettingListListOrBuilder( + int index) { + if (flexSettingListListBuilder_ == null) { + return flexSettingListList_.get(index); } else { + return flexSettingListListBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder> + getFlexSettingListListOrBuilderList() { + if (flexSettingListListBuilder_ != null) { + return flexSettingListListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(flexSettingListList_); + } + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder addFlexSettingListListBuilder() { + return getFlexSettingListListFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.getDefaultInstance()); + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder addFlexSettingListListBuilder( + int index) { + return getFlexSettingListListFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.getDefaultInstance()); + } + /** + * <code>repeated .Image.NinePatchSetting flexSettingListList = 10;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder> + getFlexSettingListListBuilderList() { + return getFlexSettingListListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder> + getFlexSettingListListFieldBuilder() { + if (flexSettingListListBuilder_ == null) { + flexSettingListListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder>( + flexSettingListList_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + flexSettingListList_ = null; + } + return flexSettingListListBuilder_; + } + + private java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting> textSettingListList_ = + java.util.Collections.emptyList(); + private void ensureTextSettingListListIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + textSettingListList_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting>(textSettingListList_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder> textSettingListListBuilder_; + + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting> getTextSettingListListList() { + if (textSettingListListBuilder_ == null) { + return java.util.Collections.unmodifiableList(textSettingListList_); + } else { + return textSettingListListBuilder_.getMessageList(); + } + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public int getTextSettingListListCount() { + if (textSettingListListBuilder_ == null) { + return textSettingListList_.size(); + } else { + return textSettingListListBuilder_.getCount(); + } + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting getTextSettingListList(int index) { + if (textSettingListListBuilder_ == null) { + return textSettingListList_.get(index); + } else { + return textSettingListListBuilder_.getMessage(index); + } + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public Builder setTextSettingListList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting value) { + if (textSettingListListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextSettingListListIsMutable(); + textSettingListList_.set(index, value); + onChanged(); + } else { + textSettingListListBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public Builder setTextSettingListList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder builderForValue) { + if (textSettingListListBuilder_ == null) { + ensureTextSettingListListIsMutable(); + textSettingListList_.set(index, builderForValue.build()); + onChanged(); + } else { + textSettingListListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public Builder addTextSettingListList(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting value) { + if (textSettingListListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextSettingListListIsMutable(); + textSettingListList_.add(value); + onChanged(); + } else { + textSettingListListBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public Builder addTextSettingListList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting value) { + if (textSettingListListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTextSettingListListIsMutable(); + textSettingListList_.add(index, value); + onChanged(); + } else { + textSettingListListBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public Builder addTextSettingListList( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder builderForValue) { + if (textSettingListListBuilder_ == null) { + ensureTextSettingListListIsMutable(); + textSettingListList_.add(builderForValue.build()); + onChanged(); + } else { + textSettingListListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public Builder addTextSettingListList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder builderForValue) { + if (textSettingListListBuilder_ == null) { + ensureTextSettingListListIsMutable(); + textSettingListList_.add(index, builderForValue.build()); + onChanged(); + } else { + textSettingListListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public Builder addAllTextSettingListList( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting> values) { + if (textSettingListListBuilder_ == null) { + ensureTextSettingListListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, textSettingListList_); + onChanged(); + } else { + textSettingListListBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public Builder clearTextSettingListList() { + if (textSettingListListBuilder_ == null) { + textSettingListList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + textSettingListListBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public Builder removeTextSettingListList(int index) { + if (textSettingListListBuilder_ == null) { + ensureTextSettingListListIsMutable(); + textSettingListList_.remove(index); + onChanged(); + } else { + textSettingListListBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder getTextSettingListListBuilder( + int index) { + return getTextSettingListListFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder getTextSettingListListOrBuilder( + int index) { + if (textSettingListListBuilder_ == null) { + return textSettingListList_.get(index); } else { + return textSettingListListBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder> + getTextSettingListListOrBuilderList() { + if (textSettingListListBuilder_ != null) { + return textSettingListListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(textSettingListList_); + } + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder addTextSettingListListBuilder() { + return getTextSettingListListFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.getDefaultInstance()); + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder addTextSettingListListBuilder( + int index) { + return getTextSettingListListFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.getDefaultInstance()); + } + /** + * <code>repeated .Image.NinePatchSetting textSettingListList = 11;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder> + getTextSettingListListBuilderList() { + return getTextSettingListListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder> + getTextSettingListListFieldBuilder() { + if (textSettingListListBuilder_ == null) { + textSettingListListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSetting.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.NinePatchSettingOrBuilder>( + textSettingListList_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + textSettingListList_ = null; + } + return textSettingListListBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Image) + } + + // @@protoc_insertion_point(class_scope:Image) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<Image> + PARSER = new com.google.protobuf.AbstractParser<Image>() { + @java.lang.Override + public Image parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<Image> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<Image> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Image_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Image_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Image_Content_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Image_Content_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Image_NinePatchSetting_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Image_NinePatchSetting_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\013Image.proto\"\212\003\n\005Image\022\023\n\013urlListList\030\001" + + " \003(\t\022\013\n\003uri\030\002 \001(\t\022\016\n\006height\030\003 \001(\003\022\r\n\005wid" + + "th\030\004 \001(\003\022\020\n\010avgColor\030\005 \001(\t\022\021\n\timageType\030" + + "\006 \001(\005\022\022\n\nopenWebUrl\030\007 \001(\t\022\037\n\007content\030\010 \001" + + "(\0132\016.Image.Content\022\022\n\nisAnimated\030\t \001(\010\0224" + + "\n\023flexSettingListList\030\n \003(\0132\027.Image.Nine" + + "PatchSetting\0224\n\023textSettingListList\030\013 \003(" + + "\0132\027.Image.NinePatchSetting\032R\n\007Content\022\014\n" + + "\004name\030\001 \001(\t\022\021\n\tfontColor\030\002 \001(\t\022\r\n\005level\030" + + "\003 \001(\003\022\027\n\017alternativeText\030\004 \001(\t\032\022\n\020NinePa" + + "tchSettingB8\n6tech.ordinaryroad.live.cha" + + "t.client.douyin.protobuf.dtob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_Image_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Image_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Image_descriptor, + new java.lang.String[] { "UrlListList", "Uri", "Height", "Width", "AvgColor", "ImageType", "OpenWebUrl", "Content", "IsAnimated", "FlexSettingListList", "TextSettingListList", }); + internal_static_Image_Content_descriptor = + internal_static_Image_descriptor.getNestedTypes().get(0); + internal_static_Image_Content_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Image_Content_descriptor, + new java.lang.String[] { "Name", "FontColor", "Level", "AlternativeText", }); + internal_static_Image_NinePatchSetting_descriptor = + internal_static_Image_descriptor.getNestedTypes().get(1); + internal_static_Image_NinePatchSetting_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Image_NinePatchSetting_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/PatternRefOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/PatternRefOuterClass.java new file mode 100644 index 0000000..378b1fc --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/PatternRefOuterClass.java @@ -0,0 +1,773 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: PatternRef.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class PatternRefOuterClass { + private PatternRefOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PatternRefOrBuilder extends + // @@protoc_insertion_point(interface_extends:PatternRef) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string key = 1;</code> + * @return The key. + */ + java.lang.String getKey(); + /** + * <code>string key = 1;</code> + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + * <code>string default_pattern = 2;</code> + * @return The defaultPattern. + */ + java.lang.String getDefaultPattern(); + /** + * <code>string default_pattern = 2;</code> + * @return The bytes for defaultPattern. + */ + com.google.protobuf.ByteString + getDefaultPatternBytes(); + } + /** + * Protobuf type {@code PatternRef} + */ + public static final class PatternRef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:PatternRef) + PatternRefOrBuilder { + private static final long serialVersionUID = 0L; + // Use PatternRef.newBuilder() to construct. + private PatternRef(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private PatternRef() { + key_ = ""; + defaultPattern_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PatternRef(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.internal_static_PatternRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.internal_static_PatternRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * <code>string key = 1;</code> + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * <code>string key = 1;</code> + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_PATTERN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object defaultPattern_ = ""; + /** + * <code>string default_pattern = 2;</code> + * @return The defaultPattern. + */ + @java.lang.Override + public java.lang.String getDefaultPattern() { + java.lang.Object ref = defaultPattern_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultPattern_ = s; + return s; + } + } + /** + * <code>string default_pattern = 2;</code> + * @return The bytes for defaultPattern. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDefaultPatternBytes() { + java.lang.Object ref = defaultPattern_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + defaultPattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultPattern_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, defaultPattern_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultPattern_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, defaultPattern_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (!getDefaultPattern() + .equals(other.getDefaultPattern())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + DEFAULT_PATTERN_FIELD_NUMBER; + hash = (53 * hash) + getDefaultPattern().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code PatternRef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:PatternRef) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.internal_static_PatternRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.internal_static_PatternRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + defaultPattern_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.internal_static_PatternRef_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.defaultPattern_ = defaultPattern_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDefaultPattern().isEmpty()) { + defaultPattern_ = other.defaultPattern_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + defaultPattern_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * <code>string key = 1;</code> + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string key = 1;</code> + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string key = 1;</code> + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string key = 1;</code> + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string key = 1;</code> + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object defaultPattern_ = ""; + /** + * <code>string default_pattern = 2;</code> + * @return The defaultPattern. + */ + public java.lang.String getDefaultPattern() { + java.lang.Object ref = defaultPattern_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultPattern_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string default_pattern = 2;</code> + * @return The bytes for defaultPattern. + */ + public com.google.protobuf.ByteString + getDefaultPatternBytes() { + java.lang.Object ref = defaultPattern_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + defaultPattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string default_pattern = 2;</code> + * @param value The defaultPattern to set. + * @return This builder for chaining. + */ + public Builder setDefaultPattern( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + defaultPattern_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string default_pattern = 2;</code> + * @return This builder for chaining. + */ + public Builder clearDefaultPattern() { + defaultPattern_ = getDefaultInstance().getDefaultPattern(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string default_pattern = 2;</code> + * @param value The bytes for defaultPattern to set. + * @return This builder for chaining. + */ + public Builder setDefaultPatternBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + defaultPattern_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:PatternRef) + } + + // @@protoc_insertion_point(class_scope:PatternRef) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<PatternRef> + PARSER = new com.google.protobuf.AbstractParser<PatternRef>() { + @java.lang.Override + public PatternRef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<PatternRef> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<PatternRef> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_PatternRef_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_PatternRef_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\020PatternRef.proto\"2\n\nPatternRef\022\013\n\003key\030" + + "\001 \001(\t\022\027\n\017default_pattern\030\002 \001(\tB8\n6tech.o" + + "rdinaryroad.live.chat.client.douyin.prot" + + "obuf.dtob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_PatternRef_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_PatternRef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_PatternRef_descriptor, + new java.lang.String[] { "Key", "DefaultPattern", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/PublicAreaCommonOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/PublicAreaCommonOuterClass.java new file mode 100644 index 0000000..6585a11 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/PublicAreaCommonOuterClass.java @@ -0,0 +1,823 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: PublicAreaCommon.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class PublicAreaCommonOuterClass { + private PublicAreaCommonOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PublicAreaCommonOrBuilder extends + // @@protoc_insertion_point(interface_extends:PublicAreaCommon) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.Image user_label = 1;</code> + * @return Whether the userLabel field is set. + */ + boolean hasUserLabel(); + /** + * <code>.Image user_label = 1;</code> + * @return The userLabel. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getUserLabel(); + /** + * <code>.Image user_label = 1;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getUserLabelOrBuilder(); + + /** + * <code>uint64 user_consume_in_room = 2;</code> + * @return The userConsumeInRoom. + */ + long getUserConsumeInRoom(); + + /** + * <code>uint64 user_send_gift_cnt_in_room = 3;</code> + * @return The userSendGiftCntInRoom. + */ + long getUserSendGiftCntInRoom(); + } + /** + * Protobuf type {@code PublicAreaCommon} + */ + public static final class PublicAreaCommon extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:PublicAreaCommon) + PublicAreaCommonOrBuilder { + private static final long serialVersionUID = 0L; + // Use PublicAreaCommon.newBuilder() to construct. + private PublicAreaCommon(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private PublicAreaCommon() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PublicAreaCommon(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.internal_static_PublicAreaCommon_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.internal_static_PublicAreaCommon_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder.class); + } + + public static final int USER_LABEL_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image userLabel_; + /** + * <code>.Image user_label = 1;</code> + * @return Whether the userLabel field is set. + */ + @java.lang.Override + public boolean hasUserLabel() { + return userLabel_ != null; + } + /** + * <code>.Image user_label = 1;</code> + * @return The userLabel. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getUserLabel() { + return userLabel_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : userLabel_; + } + /** + * <code>.Image user_label = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getUserLabelOrBuilder() { + return userLabel_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : userLabel_; + } + + public static final int USER_CONSUME_IN_ROOM_FIELD_NUMBER = 2; + private long userConsumeInRoom_ = 0L; + /** + * <code>uint64 user_consume_in_room = 2;</code> + * @return The userConsumeInRoom. + */ + @java.lang.Override + public long getUserConsumeInRoom() { + return userConsumeInRoom_; + } + + public static final int USER_SEND_GIFT_CNT_IN_ROOM_FIELD_NUMBER = 3; + private long userSendGiftCntInRoom_ = 0L; + /** + * <code>uint64 user_send_gift_cnt_in_room = 3;</code> + * @return The userSendGiftCntInRoom. + */ + @java.lang.Override + public long getUserSendGiftCntInRoom() { + return userSendGiftCntInRoom_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (userLabel_ != null) { + output.writeMessage(1, getUserLabel()); + } + if (userConsumeInRoom_ != 0L) { + output.writeUInt64(2, userConsumeInRoom_); + } + if (userSendGiftCntInRoom_ != 0L) { + output.writeUInt64(3, userSendGiftCntInRoom_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (userLabel_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUserLabel()); + } + if (userConsumeInRoom_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, userConsumeInRoom_); + } + if (userSendGiftCntInRoom_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, userSendGiftCntInRoom_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon) obj; + + if (hasUserLabel() != other.hasUserLabel()) return false; + if (hasUserLabel()) { + if (!getUserLabel() + .equals(other.getUserLabel())) return false; + } + if (getUserConsumeInRoom() + != other.getUserConsumeInRoom()) return false; + if (getUserSendGiftCntInRoom() + != other.getUserSendGiftCntInRoom()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUserLabel()) { + hash = (37 * hash) + USER_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getUserLabel().hashCode(); + } + hash = (37 * hash) + USER_CONSUME_IN_ROOM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUserConsumeInRoom()); + hash = (37 * hash) + USER_SEND_GIFT_CNT_IN_ROOM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUserSendGiftCntInRoom()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code PublicAreaCommon} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:PublicAreaCommon) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommonOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.internal_static_PublicAreaCommon_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.internal_static_PublicAreaCommon_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userLabel_ = null; + if (userLabelBuilder_ != null) { + userLabelBuilder_.dispose(); + userLabelBuilder_ = null; + } + userConsumeInRoom_ = 0L; + userSendGiftCntInRoom_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.internal_static_PublicAreaCommon_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userLabel_ = userLabelBuilder_ == null + ? userLabel_ + : userLabelBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userConsumeInRoom_ = userConsumeInRoom_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.userSendGiftCntInRoom_ = userSendGiftCntInRoom_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon.getDefaultInstance()) return this; + if (other.hasUserLabel()) { + mergeUserLabel(other.getUserLabel()); + } + if (other.getUserConsumeInRoom() != 0L) { + setUserConsumeInRoom(other.getUserConsumeInRoom()); + } + if (other.getUserSendGiftCntInRoom() != 0L) { + setUserSendGiftCntInRoom(other.getUserSendGiftCntInRoom()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUserLabelFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + userConsumeInRoom_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + userSendGiftCntInRoom_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image userLabel_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> userLabelBuilder_; + /** + * <code>.Image user_label = 1;</code> + * @return Whether the userLabel field is set. + */ + public boolean hasUserLabel() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.Image user_label = 1;</code> + * @return The userLabel. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getUserLabel() { + if (userLabelBuilder_ == null) { + return userLabel_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : userLabel_; + } else { + return userLabelBuilder_.getMessage(); + } + } + /** + * <code>.Image user_label = 1;</code> + */ + public Builder setUserLabel(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (userLabelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userLabel_ = value; + } else { + userLabelBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Image user_label = 1;</code> + */ + public Builder setUserLabel( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (userLabelBuilder_ == null) { + userLabel_ = builderForValue.build(); + } else { + userLabelBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Image user_label = 1;</code> + */ + public Builder mergeUserLabel(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (userLabelBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + userLabel_ != null && + userLabel_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getUserLabelBuilder().mergeFrom(value); + } else { + userLabel_ = value; + } + } else { + userLabelBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Image user_label = 1;</code> + */ + public Builder clearUserLabel() { + bitField0_ = (bitField0_ & ~0x00000001); + userLabel_ = null; + if (userLabelBuilder_ != null) { + userLabelBuilder_.dispose(); + userLabelBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image user_label = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getUserLabelBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUserLabelFieldBuilder().getBuilder(); + } + /** + * <code>.Image user_label = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getUserLabelOrBuilder() { + if (userLabelBuilder_ != null) { + return userLabelBuilder_.getMessageOrBuilder(); + } else { + return userLabel_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : userLabel_; + } + } + /** + * <code>.Image user_label = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getUserLabelFieldBuilder() { + if (userLabelBuilder_ == null) { + userLabelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getUserLabel(), + getParentForChildren(), + isClean()); + userLabel_ = null; + } + return userLabelBuilder_; + } + + private long userConsumeInRoom_ ; + /** + * <code>uint64 user_consume_in_room = 2;</code> + * @return The userConsumeInRoom. + */ + @java.lang.Override + public long getUserConsumeInRoom() { + return userConsumeInRoom_; + } + /** + * <code>uint64 user_consume_in_room = 2;</code> + * @param value The userConsumeInRoom to set. + * @return This builder for chaining. + */ + public Builder setUserConsumeInRoom(long value) { + + userConsumeInRoom_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>uint64 user_consume_in_room = 2;</code> + * @return This builder for chaining. + */ + public Builder clearUserConsumeInRoom() { + bitField0_ = (bitField0_ & ~0x00000002); + userConsumeInRoom_ = 0L; + onChanged(); + return this; + } + + private long userSendGiftCntInRoom_ ; + /** + * <code>uint64 user_send_gift_cnt_in_room = 3;</code> + * @return The userSendGiftCntInRoom. + */ + @java.lang.Override + public long getUserSendGiftCntInRoom() { + return userSendGiftCntInRoom_; + } + /** + * <code>uint64 user_send_gift_cnt_in_room = 3;</code> + * @param value The userSendGiftCntInRoom to set. + * @return This builder for chaining. + */ + public Builder setUserSendGiftCntInRoom(long value) { + + userSendGiftCntInRoom_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 user_send_gift_cnt_in_room = 3;</code> + * @return This builder for chaining. + */ + public Builder clearUserSendGiftCntInRoom() { + bitField0_ = (bitField0_ & ~0x00000004); + userSendGiftCntInRoom_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:PublicAreaCommon) + } + + // @@protoc_insertion_point(class_scope:PublicAreaCommon) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<PublicAreaCommon> + PARSER = new com.google.protobuf.AbstractParser<PublicAreaCommon>() { + @java.lang.Override + public PublicAreaCommon parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<PublicAreaCommon> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<PublicAreaCommon> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PublicAreaCommonOuterClass.PublicAreaCommon getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_PublicAreaCommon_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_PublicAreaCommon_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026PublicAreaCommon.proto\032\013Image.proto\"p\n" + + "\020PublicAreaCommon\022\032\n\nuser_label\030\001 \001(\0132\006." + + "Image\022\034\n\024user_consume_in_room\030\002 \001(\004\022\"\n\032u" + + "ser_send_gift_cnt_in_room\030\003 \001(\004B8\n6tech." + + "ordinaryroad.live.chat.client.douyin.pro" + + "tobuf.dtob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor(), + }); + internal_static_PublicAreaCommon_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_PublicAreaCommon_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_PublicAreaCommon_descriptor, + new java.lang.String[] { "UserLabel", "UserConsumeInRoom", "UserSendGiftCntInRoom", }); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextEffectDetailOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextEffectDetailOuterClass.java new file mode 100644 index 0000000..9e29e90 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextEffectDetailOuterClass.java @@ -0,0 +1,1968 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: TextEffectDetail.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class TextEffectDetailOuterClass { + private TextEffectDetailOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface TextEffectDetailOrBuilder extends + // @@protoc_insertion_point(interface_extends:TextEffectDetail) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.Text text = 1;</code> + * @return Whether the text field is set. + */ + boolean hasText(); + /** + * <code>.Text text = 1;</code> + * @return The text. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text getText(); + /** + * <code>.Text text = 1;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getTextOrBuilder(); + + /** + * <code>uint32 text_font_size = 2;</code> + * @return The textFontSize. + */ + int getTextFontSize(); + + /** + * <code>.Image background = 3;</code> + * @return Whether the background field is set. + */ + boolean hasBackground(); + /** + * <code>.Image background = 3;</code> + * @return The background. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackground(); + /** + * <code>.Image background = 3;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundOrBuilder(); + + /** + * <code>uint32 start = 4;</code> + * @return The start. + */ + int getStart(); + + /** + * <code>uint32 duration = 5;</code> + * @return The duration. + */ + int getDuration(); + + /** + * <code>uint32 x = 6;</code> + * @return The x. + */ + int getX(); + + /** + * <code>uint32 y = 7;</code> + * @return The y. + */ + int getY(); + + /** + * <code>uint32 width = 8;</code> + * @return The width. + */ + int getWidth(); + + /** + * <code>uint32 height = 9;</code> + * @return The height. + */ + int getHeight(); + + /** + * <code>uint32 shadow_dx = 10;</code> + * @return The shadowDx. + */ + int getShadowDx(); + + /** + * <code>uint32 shadow_dy = 11;</code> + * @return The shadowDy. + */ + int getShadowDy(); + + /** + * <code>uint32 shadow_radius = 12;</code> + * @return The shadowRadius. + */ + int getShadowRadius(); + + /** + * <code>string shadow_color = 13;</code> + * @return The shadowColor. + */ + java.lang.String getShadowColor(); + /** + * <code>string shadow_color = 13;</code> + * @return The bytes for shadowColor. + */ + com.google.protobuf.ByteString + getShadowColorBytes(); + + /** + * <code>string stroke_color = 14;</code> + * @return The strokeColor. + */ + java.lang.String getStrokeColor(); + /** + * <code>string stroke_color = 14;</code> + * @return The bytes for strokeColor. + */ + com.google.protobuf.ByteString + getStrokeColorBytes(); + + /** + * <code>uint32 stroke_width = 15;</code> + * @return The strokeWidth. + */ + int getStrokeWidth(); + } + /** + * Protobuf type {@code TextEffectDetail} + */ + public static final class TextEffectDetail extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextEffectDetail) + TextEffectDetailOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextEffectDetail.newBuilder() to construct. + private TextEffectDetail(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private TextEffectDetail() { + shadowColor_ = ""; + strokeColor_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextEffectDetail(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.internal_static_TextEffectDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.internal_static_TextEffectDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder.class); + } + + public static final int TEXT_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text text_; + /** + * <code>.Text text = 1;</code> + * @return Whether the text field is set. + */ + @java.lang.Override + public boolean hasText() { + return text_ != null; + } + /** + * <code>.Text text = 1;</code> + * @return The text. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text getText() { + return text_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : text_; + } + /** + * <code>.Text text = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getTextOrBuilder() { + return text_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : text_; + } + + public static final int TEXT_FONT_SIZE_FIELD_NUMBER = 2; + private int textFontSize_ = 0; + /** + * <code>uint32 text_font_size = 2;</code> + * @return The textFontSize. + */ + @java.lang.Override + public int getTextFontSize() { + return textFontSize_; + } + + public static final int BACKGROUND_FIELD_NUMBER = 3; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image background_; + /** + * <code>.Image background = 3;</code> + * @return Whether the background field is set. + */ + @java.lang.Override + public boolean hasBackground() { + return background_ != null; + } + /** + * <code>.Image background = 3;</code> + * @return The background. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackground() { + return background_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : background_; + } + /** + * <code>.Image background = 3;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundOrBuilder() { + return background_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : background_; + } + + public static final int START_FIELD_NUMBER = 4; + private int start_ = 0; + /** + * <code>uint32 start = 4;</code> + * @return The start. + */ + @java.lang.Override + public int getStart() { + return start_; + } + + public static final int DURATION_FIELD_NUMBER = 5; + private int duration_ = 0; + /** + * <code>uint32 duration = 5;</code> + * @return The duration. + */ + @java.lang.Override + public int getDuration() { + return duration_; + } + + public static final int X_FIELD_NUMBER = 6; + private int x_ = 0; + /** + * <code>uint32 x = 6;</code> + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 7; + private int y_ = 0; + /** + * <code>uint32 y = 7;</code> + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + + public static final int WIDTH_FIELD_NUMBER = 8; + private int width_ = 0; + /** + * <code>uint32 width = 8;</code> + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + + public static final int HEIGHT_FIELD_NUMBER = 9; + private int height_ = 0; + /** + * <code>uint32 height = 9;</code> + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + + public static final int SHADOW_DX_FIELD_NUMBER = 10; + private int shadowDx_ = 0; + /** + * <code>uint32 shadow_dx = 10;</code> + * @return The shadowDx. + */ + @java.lang.Override + public int getShadowDx() { + return shadowDx_; + } + + public static final int SHADOW_DY_FIELD_NUMBER = 11; + private int shadowDy_ = 0; + /** + * <code>uint32 shadow_dy = 11;</code> + * @return The shadowDy. + */ + @java.lang.Override + public int getShadowDy() { + return shadowDy_; + } + + public static final int SHADOW_RADIUS_FIELD_NUMBER = 12; + private int shadowRadius_ = 0; + /** + * <code>uint32 shadow_radius = 12;</code> + * @return The shadowRadius. + */ + @java.lang.Override + public int getShadowRadius() { + return shadowRadius_; + } + + public static final int SHADOW_COLOR_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private volatile java.lang.Object shadowColor_ = ""; + /** + * <code>string shadow_color = 13;</code> + * @return The shadowColor. + */ + @java.lang.Override + public java.lang.String getShadowColor() { + java.lang.Object ref = shadowColor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shadowColor_ = s; + return s; + } + } + /** + * <code>string shadow_color = 13;</code> + * @return The bytes for shadowColor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getShadowColorBytes() { + java.lang.Object ref = shadowColor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shadowColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STROKE_COLOR_FIELD_NUMBER = 14; + @SuppressWarnings("serial") + private volatile java.lang.Object strokeColor_ = ""; + /** + * <code>string stroke_color = 14;</code> + * @return The strokeColor. + */ + @java.lang.Override + public java.lang.String getStrokeColor() { + java.lang.Object ref = strokeColor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + strokeColor_ = s; + return s; + } + } + /** + * <code>string stroke_color = 14;</code> + * @return The bytes for strokeColor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStrokeColorBytes() { + java.lang.Object ref = strokeColor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + strokeColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STROKE_WIDTH_FIELD_NUMBER = 15; + private int strokeWidth_ = 0; + /** + * <code>uint32 stroke_width = 15;</code> + * @return The strokeWidth. + */ + @java.lang.Override + public int getStrokeWidth() { + return strokeWidth_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (text_ != null) { + output.writeMessage(1, getText()); + } + if (textFontSize_ != 0) { + output.writeUInt32(2, textFontSize_); + } + if (background_ != null) { + output.writeMessage(3, getBackground()); + } + if (start_ != 0) { + output.writeUInt32(4, start_); + } + if (duration_ != 0) { + output.writeUInt32(5, duration_); + } + if (x_ != 0) { + output.writeUInt32(6, x_); + } + if (y_ != 0) { + output.writeUInt32(7, y_); + } + if (width_ != 0) { + output.writeUInt32(8, width_); + } + if (height_ != 0) { + output.writeUInt32(9, height_); + } + if (shadowDx_ != 0) { + output.writeUInt32(10, shadowDx_); + } + if (shadowDy_ != 0) { + output.writeUInt32(11, shadowDy_); + } + if (shadowRadius_ != 0) { + output.writeUInt32(12, shadowRadius_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shadowColor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, shadowColor_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(strokeColor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, strokeColor_); + } + if (strokeWidth_ != 0) { + output.writeUInt32(15, strokeWidth_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (text_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getText()); + } + if (textFontSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, textFontSize_); + } + if (background_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getBackground()); + } + if (start_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, start_); + } + if (duration_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, duration_); + } + if (x_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, x_); + } + if (y_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, y_); + } + if (width_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(8, width_); + } + if (height_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(9, height_); + } + if (shadowDx_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(10, shadowDx_); + } + if (shadowDy_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(11, shadowDy_); + } + if (shadowRadius_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(12, shadowRadius_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shadowColor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, shadowColor_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(strokeColor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, strokeColor_); + } + if (strokeWidth_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(15, strokeWidth_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail) obj; + + if (hasText() != other.hasText()) return false; + if (hasText()) { + if (!getText() + .equals(other.getText())) return false; + } + if (getTextFontSize() + != other.getTextFontSize()) return false; + if (hasBackground() != other.hasBackground()) return false; + if (hasBackground()) { + if (!getBackground() + .equals(other.getBackground())) return false; + } + if (getStart() + != other.getStart()) return false; + if (getDuration() + != other.getDuration()) return false; + if (getX() + != other.getX()) return false; + if (getY() + != other.getY()) return false; + if (getWidth() + != other.getWidth()) return false; + if (getHeight() + != other.getHeight()) return false; + if (getShadowDx() + != other.getShadowDx()) return false; + if (getShadowDy() + != other.getShadowDy()) return false; + if (getShadowRadius() + != other.getShadowRadius()) return false; + if (!getShadowColor() + .equals(other.getShadowColor())) return false; + if (!getStrokeColor() + .equals(other.getStrokeColor())) return false; + if (getStrokeWidth() + != other.getStrokeWidth()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasText()) { + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + } + hash = (37 * hash) + TEXT_FONT_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getTextFontSize(); + if (hasBackground()) { + hash = (37 * hash) + BACKGROUND_FIELD_NUMBER; + hash = (53 * hash) + getBackground().hashCode(); + } + hash = (37 * hash) + START_FIELD_NUMBER; + hash = (53 * hash) + getStart(); + hash = (37 * hash) + DURATION_FIELD_NUMBER; + hash = (53 * hash) + getDuration(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + getX(); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + getY(); + hash = (37 * hash) + WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getWidth(); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getHeight(); + hash = (37 * hash) + SHADOW_DX_FIELD_NUMBER; + hash = (53 * hash) + getShadowDx(); + hash = (37 * hash) + SHADOW_DY_FIELD_NUMBER; + hash = (53 * hash) + getShadowDy(); + hash = (37 * hash) + SHADOW_RADIUS_FIELD_NUMBER; + hash = (53 * hash) + getShadowRadius(); + hash = (37 * hash) + SHADOW_COLOR_FIELD_NUMBER; + hash = (53 * hash) + getShadowColor().hashCode(); + hash = (37 * hash) + STROKE_COLOR_FIELD_NUMBER; + hash = (53 * hash) + getStrokeColor().hashCode(); + hash = (37 * hash) + STROKE_WIDTH_FIELD_NUMBER; + hash = (53 * hash) + getStrokeWidth(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code TextEffectDetail} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:TextEffectDetail) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.internal_static_TextEffectDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.internal_static_TextEffectDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + text_ = null; + if (textBuilder_ != null) { + textBuilder_.dispose(); + textBuilder_ = null; + } + textFontSize_ = 0; + background_ = null; + if (backgroundBuilder_ != null) { + backgroundBuilder_.dispose(); + backgroundBuilder_ = null; + } + start_ = 0; + duration_ = 0; + x_ = 0; + y_ = 0; + width_ = 0; + height_ = 0; + shadowDx_ = 0; + shadowDy_ = 0; + shadowRadius_ = 0; + shadowColor_ = ""; + strokeColor_ = ""; + strokeWidth_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.internal_static_TextEffectDetail_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = textBuilder_ == null + ? text_ + : textBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.textFontSize_ = textFontSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.background_ = backgroundBuilder_ == null + ? background_ + : backgroundBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.start_ = start_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.duration_ = duration_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.x_ = x_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.y_ = y_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.width_ = width_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.height_ = height_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.shadowDx_ = shadowDx_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.shadowDy_ = shadowDy_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.shadowRadius_ = shadowRadius_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.shadowColor_ = shadowColor_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.strokeColor_ = strokeColor_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.strokeWidth_ = strokeWidth_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance()) return this; + if (other.hasText()) { + mergeText(other.getText()); + } + if (other.getTextFontSize() != 0) { + setTextFontSize(other.getTextFontSize()); + } + if (other.hasBackground()) { + mergeBackground(other.getBackground()); + } + if (other.getStart() != 0) { + setStart(other.getStart()); + } + if (other.getDuration() != 0) { + setDuration(other.getDuration()); + } + if (other.getX() != 0) { + setX(other.getX()); + } + if (other.getY() != 0) { + setY(other.getY()); + } + if (other.getWidth() != 0) { + setWidth(other.getWidth()); + } + if (other.getHeight() != 0) { + setHeight(other.getHeight()); + } + if (other.getShadowDx() != 0) { + setShadowDx(other.getShadowDx()); + } + if (other.getShadowDy() != 0) { + setShadowDy(other.getShadowDy()); + } + if (other.getShadowRadius() != 0) { + setShadowRadius(other.getShadowRadius()); + } + if (!other.getShadowColor().isEmpty()) { + shadowColor_ = other.shadowColor_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (!other.getStrokeColor().isEmpty()) { + strokeColor_ = other.strokeColor_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (other.getStrokeWidth() != 0) { + setStrokeWidth(other.getStrokeWidth()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getTextFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + textFontSize_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + input.readMessage( + getBackgroundFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + start_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + duration_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + x_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + y_ = input.readUInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + width_ = input.readUInt32(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + height_ = input.readUInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + shadowDx_ = input.readUInt32(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: { + shadowDy_ = input.readUInt32(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: { + shadowRadius_ = input.readUInt32(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 106: { + shadowColor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: { + strokeColor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 120: { + strokeWidth_ = input.readUInt32(); + bitField0_ |= 0x00004000; + break; + } // case 120 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text text_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder> textBuilder_; + /** + * <code>.Text text = 1;</code> + * @return Whether the text field is set. + */ + public boolean hasText() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.Text text = 1;</code> + * @return The text. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text getText() { + if (textBuilder_ == null) { + return text_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : text_; + } else { + return textBuilder_.getMessage(); + } + } + /** + * <code>.Text text = 1;</code> + */ + public Builder setText(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text value) { + if (textBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + text_ = value; + } else { + textBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Text text = 1;</code> + */ + public Builder setText( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder builderForValue) { + if (textBuilder_ == null) { + text_ = builderForValue.build(); + } else { + textBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Text text = 1;</code> + */ + public Builder mergeText(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text value) { + if (textBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + text_ != null && + text_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance()) { + getTextBuilder().mergeFrom(value); + } else { + text_ = value; + } + } else { + textBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Text text = 1;</code> + */ + public Builder clearText() { + bitField0_ = (bitField0_ & ~0x00000001); + text_ = null; + if (textBuilder_ != null) { + textBuilder_.dispose(); + textBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Text text = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder getTextBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTextFieldBuilder().getBuilder(); + } + /** + * <code>.Text text = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder getTextOrBuilder() { + if (textBuilder_ != null) { + return textBuilder_.getMessageOrBuilder(); + } else { + return text_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance() : text_; + } + } + /** + * <code>.Text text = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder> + getTextFieldBuilder() { + if (textBuilder_ == null) { + textBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder>( + getText(), + getParentForChildren(), + isClean()); + text_ = null; + } + return textBuilder_; + } + + private int textFontSize_ ; + /** + * <code>uint32 text_font_size = 2;</code> + * @return The textFontSize. + */ + @java.lang.Override + public int getTextFontSize() { + return textFontSize_; + } + /** + * <code>uint32 text_font_size = 2;</code> + * @param value The textFontSize to set. + * @return This builder for chaining. + */ + public Builder setTextFontSize(int value) { + + textFontSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>uint32 text_font_size = 2;</code> + * @return This builder for chaining. + */ + public Builder clearTextFontSize() { + bitField0_ = (bitField0_ & ~0x00000002); + textFontSize_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image background_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> backgroundBuilder_; + /** + * <code>.Image background = 3;</code> + * @return Whether the background field is set. + */ + public boolean hasBackground() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * <code>.Image background = 3;</code> + * @return The background. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackground() { + if (backgroundBuilder_ == null) { + return background_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : background_; + } else { + return backgroundBuilder_.getMessage(); + } + } + /** + * <code>.Image background = 3;</code> + */ + public Builder setBackground(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + background_ = value; + } else { + backgroundBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>.Image background = 3;</code> + */ + public Builder setBackground( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (backgroundBuilder_ == null) { + background_ = builderForValue.build(); + } else { + backgroundBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>.Image background = 3;</code> + */ + public Builder mergeBackground(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + background_ != null && + background_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBackgroundBuilder().mergeFrom(value); + } else { + background_ = value; + } + } else { + backgroundBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>.Image background = 3;</code> + */ + public Builder clearBackground() { + bitField0_ = (bitField0_ & ~0x00000004); + background_ = null; + if (backgroundBuilder_ != null) { + backgroundBuilder_.dispose(); + backgroundBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image background = 3;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBackgroundBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getBackgroundFieldBuilder().getBuilder(); + } + /** + * <code>.Image background = 3;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundOrBuilder() { + if (backgroundBuilder_ != null) { + return backgroundBuilder_.getMessageOrBuilder(); + } else { + return background_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : background_; + } + } + /** + * <code>.Image background = 3;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBackgroundFieldBuilder() { + if (backgroundBuilder_ == null) { + backgroundBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBackground(), + getParentForChildren(), + isClean()); + background_ = null; + } + return backgroundBuilder_; + } + + private int start_ ; + /** + * <code>uint32 start = 4;</code> + * @return The start. + */ + @java.lang.Override + public int getStart() { + return start_; + } + /** + * <code>uint32 start = 4;</code> + * @param value The start to set. + * @return This builder for chaining. + */ + public Builder setStart(int value) { + + start_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint32 start = 4;</code> + * @return This builder for chaining. + */ + public Builder clearStart() { + bitField0_ = (bitField0_ & ~0x00000008); + start_ = 0; + onChanged(); + return this; + } + + private int duration_ ; + /** + * <code>uint32 duration = 5;</code> + * @return The duration. + */ + @java.lang.Override + public int getDuration() { + return duration_; + } + /** + * <code>uint32 duration = 5;</code> + * @param value The duration to set. + * @return This builder for chaining. + */ + public Builder setDuration(int value) { + + duration_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>uint32 duration = 5;</code> + * @return This builder for chaining. + */ + public Builder clearDuration() { + bitField0_ = (bitField0_ & ~0x00000010); + duration_ = 0; + onChanged(); + return this; + } + + private int x_ ; + /** + * <code>uint32 x = 6;</code> + * @return The x. + */ + @java.lang.Override + public int getX() { + return x_; + } + /** + * <code>uint32 x = 6;</code> + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(int value) { + + x_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>uint32 x = 6;</code> + * @return This builder for chaining. + */ + public Builder clearX() { + bitField0_ = (bitField0_ & ~0x00000020); + x_ = 0; + onChanged(); + return this; + } + + private int y_ ; + /** + * <code>uint32 y = 7;</code> + * @return The y. + */ + @java.lang.Override + public int getY() { + return y_; + } + /** + * <code>uint32 y = 7;</code> + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(int value) { + + y_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>uint32 y = 7;</code> + * @return This builder for chaining. + */ + public Builder clearY() { + bitField0_ = (bitField0_ & ~0x00000040); + y_ = 0; + onChanged(); + return this; + } + + private int width_ ; + /** + * <code>uint32 width = 8;</code> + * @return The width. + */ + @java.lang.Override + public int getWidth() { + return width_; + } + /** + * <code>uint32 width = 8;</code> + * @param value The width to set. + * @return This builder for chaining. + */ + public Builder setWidth(int value) { + + width_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>uint32 width = 8;</code> + * @return This builder for chaining. + */ + public Builder clearWidth() { + bitField0_ = (bitField0_ & ~0x00000080); + width_ = 0; + onChanged(); + return this; + } + + private int height_ ; + /** + * <code>uint32 height = 9;</code> + * @return The height. + */ + @java.lang.Override + public int getHeight() { + return height_; + } + /** + * <code>uint32 height = 9;</code> + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(int value) { + + height_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>uint32 height = 9;</code> + * @return This builder for chaining. + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000100); + height_ = 0; + onChanged(); + return this; + } + + private int shadowDx_ ; + /** + * <code>uint32 shadow_dx = 10;</code> + * @return The shadowDx. + */ + @java.lang.Override + public int getShadowDx() { + return shadowDx_; + } + /** + * <code>uint32 shadow_dx = 10;</code> + * @param value The shadowDx to set. + * @return This builder for chaining. + */ + public Builder setShadowDx(int value) { + + shadowDx_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>uint32 shadow_dx = 10;</code> + * @return This builder for chaining. + */ + public Builder clearShadowDx() { + bitField0_ = (bitField0_ & ~0x00000200); + shadowDx_ = 0; + onChanged(); + return this; + } + + private int shadowDy_ ; + /** + * <code>uint32 shadow_dy = 11;</code> + * @return The shadowDy. + */ + @java.lang.Override + public int getShadowDy() { + return shadowDy_; + } + /** + * <code>uint32 shadow_dy = 11;</code> + * @param value The shadowDy to set. + * @return This builder for chaining. + */ + public Builder setShadowDy(int value) { + + shadowDy_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * <code>uint32 shadow_dy = 11;</code> + * @return This builder for chaining. + */ + public Builder clearShadowDy() { + bitField0_ = (bitField0_ & ~0x00000400); + shadowDy_ = 0; + onChanged(); + return this; + } + + private int shadowRadius_ ; + /** + * <code>uint32 shadow_radius = 12;</code> + * @return The shadowRadius. + */ + @java.lang.Override + public int getShadowRadius() { + return shadowRadius_; + } + /** + * <code>uint32 shadow_radius = 12;</code> + * @param value The shadowRadius to set. + * @return This builder for chaining. + */ + public Builder setShadowRadius(int value) { + + shadowRadius_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * <code>uint32 shadow_radius = 12;</code> + * @return This builder for chaining. + */ + public Builder clearShadowRadius() { + bitField0_ = (bitField0_ & ~0x00000800); + shadowRadius_ = 0; + onChanged(); + return this; + } + + private java.lang.Object shadowColor_ = ""; + /** + * <code>string shadow_color = 13;</code> + * @return The shadowColor. + */ + public java.lang.String getShadowColor() { + java.lang.Object ref = shadowColor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shadowColor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string shadow_color = 13;</code> + * @return The bytes for shadowColor. + */ + public com.google.protobuf.ByteString + getShadowColorBytes() { + java.lang.Object ref = shadowColor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shadowColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string shadow_color = 13;</code> + * @param value The shadowColor to set. + * @return This builder for chaining. + */ + public Builder setShadowColor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + shadowColor_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * <code>string shadow_color = 13;</code> + * @return This builder for chaining. + */ + public Builder clearShadowColor() { + shadowColor_ = getDefaultInstance().getShadowColor(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + * <code>string shadow_color = 13;</code> + * @param value The bytes for shadowColor to set. + * @return This builder for chaining. + */ + public Builder setShadowColorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + shadowColor_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private java.lang.Object strokeColor_ = ""; + /** + * <code>string stroke_color = 14;</code> + * @return The strokeColor. + */ + public java.lang.String getStrokeColor() { + java.lang.Object ref = strokeColor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + strokeColor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string stroke_color = 14;</code> + * @return The bytes for strokeColor. + */ + public com.google.protobuf.ByteString + getStrokeColorBytes() { + java.lang.Object ref = strokeColor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + strokeColor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string stroke_color = 14;</code> + * @param value The strokeColor to set. + * @return This builder for chaining. + */ + public Builder setStrokeColor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + strokeColor_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>string stroke_color = 14;</code> + * @return This builder for chaining. + */ + public Builder clearStrokeColor() { + strokeColor_ = getDefaultInstance().getStrokeColor(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + * <code>string stroke_color = 14;</code> + * @param value The bytes for strokeColor to set. + * @return This builder for chaining. + */ + public Builder setStrokeColorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + strokeColor_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private int strokeWidth_ ; + /** + * <code>uint32 stroke_width = 15;</code> + * @return The strokeWidth. + */ + @java.lang.Override + public int getStrokeWidth() { + return strokeWidth_; + } + /** + * <code>uint32 stroke_width = 15;</code> + * @param value The strokeWidth to set. + * @return This builder for chaining. + */ + public Builder setStrokeWidth(int value) { + + strokeWidth_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <code>uint32 stroke_width = 15;</code> + * @return This builder for chaining. + */ + public Builder clearStrokeWidth() { + bitField0_ = (bitField0_ & ~0x00004000); + strokeWidth_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextEffectDetail) + } + + // @@protoc_insertion_point(class_scope:TextEffectDetail) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<TextEffectDetail> + PARSER = new com.google.protobuf.AbstractParser<TextEffectDetail>() { + @java.lang.Override + public TextEffectDetail parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<TextEffectDetail> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<TextEffectDetail> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextEffectDetail_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextEffectDetail_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026TextEffectDetail.proto\032\013Image.proto\032\nT" + + "ext.proto\"\260\002\n\020TextEffectDetail\022\023\n\004text\030\001" + + " \001(\0132\005.Text\022\026\n\016text_font_size\030\002 \001(\r\022\032\n\nb" + + "ackground\030\003 \001(\0132\006.Image\022\r\n\005start\030\004 \001(\r\022\020" + + "\n\010duration\030\005 \001(\r\022\t\n\001x\030\006 \001(\r\022\t\n\001y\030\007 \001(\r\022\r" + + "\n\005width\030\010 \001(\r\022\016\n\006height\030\t \001(\r\022\021\n\tshadow_" + + "dx\030\n \001(\r\022\021\n\tshadow_dy\030\013 \001(\r\022\025\n\rshadow_ra" + + "dius\030\014 \001(\r\022\024\n\014shadow_color\030\r \001(\t\022\024\n\014stro" + + "ke_color\030\016 \001(\t\022\024\n\014stroke_width\030\017 \001(\rB8\n6" + + "tech.ordinaryroad.live.chat.client.douyi" + + "n.protobuf.dtob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.getDescriptor(), + }); + internal_static_TextEffectDetail_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_TextEffectDetail_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_TextEffectDetail_descriptor, + new java.lang.String[] { "Text", "TextFontSize", "Background", "Start", "Duration", "X", "Y", "Width", "Height", "ShadowDx", "ShadowDy", "ShadowRadius", "ShadowColor", "StrokeColor", "StrokeWidth", }); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextEffectOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextEffectOuterClass.java new file mode 100644 index 0000000..9fffc74 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextEffectOuterClass.java @@ -0,0 +1,872 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: TextEffect.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class TextEffectOuterClass { + private TextEffectOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface TextEffectOrBuilder extends + // @@protoc_insertion_point(interface_extends:TextEffect) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.TextEffectDetail portrait = 1;</code> + * @return Whether the portrait field is set. + */ + boolean hasPortrait(); + /** + * <code>.TextEffectDetail portrait = 1;</code> + * @return The portrait. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getPortrait(); + /** + * <code>.TextEffectDetail portrait = 1;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder getPortraitOrBuilder(); + + /** + * <code>.TextEffectDetail landscape = 2;</code> + * @return Whether the landscape field is set. + */ + boolean hasLandscape(); + /** + * <code>.TextEffectDetail landscape = 2;</code> + * @return The landscape. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getLandscape(); + /** + * <code>.TextEffectDetail landscape = 2;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder getLandscapeOrBuilder(); + } + /** + * Protobuf type {@code TextEffect} + */ + public static final class TextEffect extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextEffect) + TextEffectOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextEffect.newBuilder() to construct. + private TextEffect(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private TextEffect() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextEffect(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.internal_static_TextEffect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.internal_static_TextEffect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.Builder.class); + } + + public static final int PORTRAIT_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail portrait_; + /** + * <code>.TextEffectDetail portrait = 1;</code> + * @return Whether the portrait field is set. + */ + @java.lang.Override + public boolean hasPortrait() { + return portrait_ != null; + } + /** + * <code>.TextEffectDetail portrait = 1;</code> + * @return The portrait. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getPortrait() { + return portrait_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance() : portrait_; + } + /** + * <code>.TextEffectDetail portrait = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder getPortraitOrBuilder() { + return portrait_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance() : portrait_; + } + + public static final int LANDSCAPE_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail landscape_; + /** + * <code>.TextEffectDetail landscape = 2;</code> + * @return Whether the landscape field is set. + */ + @java.lang.Override + public boolean hasLandscape() { + return landscape_ != null; + } + /** + * <code>.TextEffectDetail landscape = 2;</code> + * @return The landscape. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getLandscape() { + return landscape_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance() : landscape_; + } + /** + * <code>.TextEffectDetail landscape = 2;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder getLandscapeOrBuilder() { + return landscape_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance() : landscape_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (portrait_ != null) { + output.writeMessage(1, getPortrait()); + } + if (landscape_ != null) { + output.writeMessage(2, getLandscape()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (portrait_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getPortrait()); + } + if (landscape_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getLandscape()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect) obj; + + if (hasPortrait() != other.hasPortrait()) return false; + if (hasPortrait()) { + if (!getPortrait() + .equals(other.getPortrait())) return false; + } + if (hasLandscape() != other.hasLandscape()) return false; + if (hasLandscape()) { + if (!getLandscape() + .equals(other.getLandscape())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPortrait()) { + hash = (37 * hash) + PORTRAIT_FIELD_NUMBER; + hash = (53 * hash) + getPortrait().hashCode(); + } + if (hasLandscape()) { + hash = (37 * hash) + LANDSCAPE_FIELD_NUMBER; + hash = (53 * hash) + getLandscape().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code TextEffect} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:TextEffect) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.internal_static_TextEffect_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.internal_static_TextEffect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + portrait_ = null; + if (portraitBuilder_ != null) { + portraitBuilder_.dispose(); + portraitBuilder_ = null; + } + landscape_ = null; + if (landscapeBuilder_ != null) { + landscapeBuilder_.dispose(); + landscapeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.internal_static_TextEffect_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.portrait_ = portraitBuilder_ == null + ? portrait_ + : portraitBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.landscape_ = landscapeBuilder_ == null + ? landscape_ + : landscapeBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect.getDefaultInstance()) return this; + if (other.hasPortrait()) { + mergePortrait(other.getPortrait()); + } + if (other.hasLandscape()) { + mergeLandscape(other.getLandscape()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getPortraitFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getLandscapeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail portrait_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder> portraitBuilder_; + /** + * <code>.TextEffectDetail portrait = 1;</code> + * @return Whether the portrait field is set. + */ + public boolean hasPortrait() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.TextEffectDetail portrait = 1;</code> + * @return The portrait. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getPortrait() { + if (portraitBuilder_ == null) { + return portrait_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance() : portrait_; + } else { + return portraitBuilder_.getMessage(); + } + } + /** + * <code>.TextEffectDetail portrait = 1;</code> + */ + public Builder setPortrait(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail value) { + if (portraitBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + portrait_ = value; + } else { + portraitBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.TextEffectDetail portrait = 1;</code> + */ + public Builder setPortrait( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder builderForValue) { + if (portraitBuilder_ == null) { + portrait_ = builderForValue.build(); + } else { + portraitBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.TextEffectDetail portrait = 1;</code> + */ + public Builder mergePortrait(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail value) { + if (portraitBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + portrait_ != null && + portrait_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance()) { + getPortraitBuilder().mergeFrom(value); + } else { + portrait_ = value; + } + } else { + portraitBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.TextEffectDetail portrait = 1;</code> + */ + public Builder clearPortrait() { + bitField0_ = (bitField0_ & ~0x00000001); + portrait_ = null; + if (portraitBuilder_ != null) { + portraitBuilder_.dispose(); + portraitBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.TextEffectDetail portrait = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder getPortraitBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPortraitFieldBuilder().getBuilder(); + } + /** + * <code>.TextEffectDetail portrait = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder getPortraitOrBuilder() { + if (portraitBuilder_ != null) { + return portraitBuilder_.getMessageOrBuilder(); + } else { + return portrait_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance() : portrait_; + } + } + /** + * <code>.TextEffectDetail portrait = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder> + getPortraitFieldBuilder() { + if (portraitBuilder_ == null) { + portraitBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder>( + getPortrait(), + getParentForChildren(), + isClean()); + portrait_ = null; + } + return portraitBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail landscape_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder> landscapeBuilder_; + /** + * <code>.TextEffectDetail landscape = 2;</code> + * @return Whether the landscape field is set. + */ + public boolean hasLandscape() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * <code>.TextEffectDetail landscape = 2;</code> + * @return The landscape. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail getLandscape() { + if (landscapeBuilder_ == null) { + return landscape_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance() : landscape_; + } else { + return landscapeBuilder_.getMessage(); + } + } + /** + * <code>.TextEffectDetail landscape = 2;</code> + */ + public Builder setLandscape(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail value) { + if (landscapeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + landscape_ = value; + } else { + landscapeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.TextEffectDetail landscape = 2;</code> + */ + public Builder setLandscape( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder builderForValue) { + if (landscapeBuilder_ == null) { + landscape_ = builderForValue.build(); + } else { + landscapeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.TextEffectDetail landscape = 2;</code> + */ + public Builder mergeLandscape(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail value) { + if (landscapeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + landscape_ != null && + landscape_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance()) { + getLandscapeBuilder().mergeFrom(value); + } else { + landscape_ = value; + } + } else { + landscapeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.TextEffectDetail landscape = 2;</code> + */ + public Builder clearLandscape() { + bitField0_ = (bitField0_ & ~0x00000002); + landscape_ = null; + if (landscapeBuilder_ != null) { + landscapeBuilder_.dispose(); + landscapeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.TextEffectDetail landscape = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder getLandscapeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getLandscapeFieldBuilder().getBuilder(); + } + /** + * <code>.TextEffectDetail landscape = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder getLandscapeOrBuilder() { + if (landscapeBuilder_ != null) { + return landscapeBuilder_.getMessageOrBuilder(); + } else { + return landscape_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.getDefaultInstance() : landscape_; + } + } + /** + * <code>.TextEffectDetail landscape = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder> + getLandscapeFieldBuilder() { + if (landscapeBuilder_ == null) { + landscapeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetail.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.TextEffectDetailOrBuilder>( + getLandscape(), + getParentForChildren(), + isClean()); + landscape_ = null; + } + return landscapeBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextEffect) + } + + // @@protoc_insertion_point(class_scope:TextEffect) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<TextEffect> + PARSER = new com.google.protobuf.AbstractParser<TextEffect>() { + @java.lang.Override + public TextEffect parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<TextEffect> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<TextEffect> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectOuterClass.TextEffect getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextEffect_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextEffect_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\020TextEffect.proto\032\026TextEffectDetail.pro" + + "to\"W\n\nTextEffect\022#\n\010portrait\030\001 \001(\0132\021.Tex" + + "tEffectDetail\022$\n\tlandscape\030\002 \001(\0132\021.TextE" + + "ffectDetailB8\n6tech.ordinaryroad.live.ch" + + "at.client.douyin.protobuf.dtob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.getDescriptor(), + }); + internal_static_TextEffect_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_TextEffect_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_TextEffect_descriptor, + new java.lang.String[] { "Portrait", "Landscape", }); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextEffectDetailOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextFormatOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextFormatOuterClass.java new file mode 100644 index 0000000..d3fc345 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextFormatOuterClass.java @@ -0,0 +1,1136 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: TextFormat.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class TextFormatOuterClass { + private TextFormatOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface TextFormatOrBuilder extends + // @@protoc_insertion_point(interface_extends:TextFormat) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string color = 1;</code> + * @return The color. + */ + java.lang.String getColor(); + /** + * <code>string color = 1;</code> + * @return The bytes for color. + */ + com.google.protobuf.ByteString + getColorBytes(); + + /** + * <code>bool bold = 2;</code> + * @return The bold. + */ + boolean getBold(); + + /** + * <code>bool italic = 3;</code> + * @return The italic. + */ + boolean getItalic(); + + /** + * <code>uint32 weight = 4;</code> + * @return The weight. + */ + int getWeight(); + + /** + * <code>uint32 italic_angle = 5;</code> + * @return The italicAngle. + */ + int getItalicAngle(); + + /** + * <code>uint32 font_size = 6;</code> + * @return The fontSize. + */ + int getFontSize(); + + /** + * <code>bool use_heigh_light_color = 7;</code> + * @return The useHeighLightColor. + */ + boolean getUseHeighLightColor(); + + /** + * <code>bool use_remote_clor = 8;</code> + * @return The useRemoteClor. + */ + boolean getUseRemoteClor(); + } + /** + * Protobuf type {@code TextFormat} + */ + public static final class TextFormat extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextFormat) + TextFormatOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextFormat.newBuilder() to construct. + private TextFormat(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private TextFormat() { + color_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextFormat(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.internal_static_TextFormat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.internal_static_TextFormat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder.class); + } + + public static final int COLOR_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object color_ = ""; + /** + * <code>string color = 1;</code> + * @return The color. + */ + @java.lang.Override + public java.lang.String getColor() { + java.lang.Object ref = color_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + color_ = s; + return s; + } + } + /** + * <code>string color = 1;</code> + * @return The bytes for color. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getColorBytes() { + java.lang.Object ref = color_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + color_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOLD_FIELD_NUMBER = 2; + private boolean bold_ = false; + /** + * <code>bool bold = 2;</code> + * @return The bold. + */ + @java.lang.Override + public boolean getBold() { + return bold_; + } + + public static final int ITALIC_FIELD_NUMBER = 3; + private boolean italic_ = false; + /** + * <code>bool italic = 3;</code> + * @return The italic. + */ + @java.lang.Override + public boolean getItalic() { + return italic_; + } + + public static final int WEIGHT_FIELD_NUMBER = 4; + private int weight_ = 0; + /** + * <code>uint32 weight = 4;</code> + * @return The weight. + */ + @java.lang.Override + public int getWeight() { + return weight_; + } + + public static final int ITALIC_ANGLE_FIELD_NUMBER = 5; + private int italicAngle_ = 0; + /** + * <code>uint32 italic_angle = 5;</code> + * @return The italicAngle. + */ + @java.lang.Override + public int getItalicAngle() { + return italicAngle_; + } + + public static final int FONT_SIZE_FIELD_NUMBER = 6; + private int fontSize_ = 0; + /** + * <code>uint32 font_size = 6;</code> + * @return The fontSize. + */ + @java.lang.Override + public int getFontSize() { + return fontSize_; + } + + public static final int USE_HEIGH_LIGHT_COLOR_FIELD_NUMBER = 7; + private boolean useHeighLightColor_ = false; + /** + * <code>bool use_heigh_light_color = 7;</code> + * @return The useHeighLightColor. + */ + @java.lang.Override + public boolean getUseHeighLightColor() { + return useHeighLightColor_; + } + + public static final int USE_REMOTE_CLOR_FIELD_NUMBER = 8; + private boolean useRemoteClor_ = false; + /** + * <code>bool use_remote_clor = 8;</code> + * @return The useRemoteClor. + */ + @java.lang.Override + public boolean getUseRemoteClor() { + return useRemoteClor_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(color_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, color_); + } + if (bold_ != false) { + output.writeBool(2, bold_); + } + if (italic_ != false) { + output.writeBool(3, italic_); + } + if (weight_ != 0) { + output.writeUInt32(4, weight_); + } + if (italicAngle_ != 0) { + output.writeUInt32(5, italicAngle_); + } + if (fontSize_ != 0) { + output.writeUInt32(6, fontSize_); + } + if (useHeighLightColor_ != false) { + output.writeBool(7, useHeighLightColor_); + } + if (useRemoteClor_ != false) { + output.writeBool(8, useRemoteClor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(color_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, color_); + } + if (bold_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, bold_); + } + if (italic_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, italic_); + } + if (weight_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, weight_); + } + if (italicAngle_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(5, italicAngle_); + } + if (fontSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, fontSize_); + } + if (useHeighLightColor_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, useHeighLightColor_); + } + if (useRemoteClor_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, useRemoteClor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat) obj; + + if (!getColor() + .equals(other.getColor())) return false; + if (getBold() + != other.getBold()) return false; + if (getItalic() + != other.getItalic()) return false; + if (getWeight() + != other.getWeight()) return false; + if (getItalicAngle() + != other.getItalicAngle()) return false; + if (getFontSize() + != other.getFontSize()) return false; + if (getUseHeighLightColor() + != other.getUseHeighLightColor()) return false; + if (getUseRemoteClor() + != other.getUseRemoteClor()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor().hashCode(); + hash = (37 * hash) + BOLD_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getBold()); + hash = (37 * hash) + ITALIC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getItalic()); + hash = (37 * hash) + WEIGHT_FIELD_NUMBER; + hash = (53 * hash) + getWeight(); + hash = (37 * hash) + ITALIC_ANGLE_FIELD_NUMBER; + hash = (53 * hash) + getItalicAngle(); + hash = (37 * hash) + FONT_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getFontSize(); + hash = (37 * hash) + USE_HEIGH_LIGHT_COLOR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUseHeighLightColor()); + hash = (37 * hash) + USE_REMOTE_CLOR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUseRemoteClor()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code TextFormat} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:TextFormat) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.internal_static_TextFormat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.internal_static_TextFormat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + color_ = ""; + bold_ = false; + italic_ = false; + weight_ = 0; + italicAngle_ = 0; + fontSize_ = 0; + useHeighLightColor_ = false; + useRemoteClor_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.internal_static_TextFormat_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.color_ = color_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.bold_ = bold_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.italic_ = italic_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.weight_ = weight_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.italicAngle_ = italicAngle_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.fontSize_ = fontSize_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.useHeighLightColor_ = useHeighLightColor_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.useRemoteClor_ = useRemoteClor_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance()) return this; + if (!other.getColor().isEmpty()) { + color_ = other.color_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getBold() != false) { + setBold(other.getBold()); + } + if (other.getItalic() != false) { + setItalic(other.getItalic()); + } + if (other.getWeight() != 0) { + setWeight(other.getWeight()); + } + if (other.getItalicAngle() != 0) { + setItalicAngle(other.getItalicAngle()); + } + if (other.getFontSize() != 0) { + setFontSize(other.getFontSize()); + } + if (other.getUseHeighLightColor() != false) { + setUseHeighLightColor(other.getUseHeighLightColor()); + } + if (other.getUseRemoteClor() != false) { + setUseRemoteClor(other.getUseRemoteClor()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + color_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + bold_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + italic_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + weight_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + italicAngle_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + fontSize_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + useHeighLightColor_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + useRemoteClor_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object color_ = ""; + /** + * <code>string color = 1;</code> + * @return The color. + */ + public java.lang.String getColor() { + java.lang.Object ref = color_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + color_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string color = 1;</code> + * @return The bytes for color. + */ + public com.google.protobuf.ByteString + getColorBytes() { + java.lang.Object ref = color_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + color_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string color = 1;</code> + * @param value The color to set. + * @return This builder for chaining. + */ + public Builder setColor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + color_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string color = 1;</code> + * @return This builder for chaining. + */ + public Builder clearColor() { + color_ = getDefaultInstance().getColor(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string color = 1;</code> + * @param value The bytes for color to set. + * @return This builder for chaining. + */ + public Builder setColorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + color_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private boolean bold_ ; + /** + * <code>bool bold = 2;</code> + * @return The bold. + */ + @java.lang.Override + public boolean getBold() { + return bold_; + } + /** + * <code>bool bold = 2;</code> + * @param value The bold to set. + * @return This builder for chaining. + */ + public Builder setBold(boolean value) { + + bold_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>bool bold = 2;</code> + * @return This builder for chaining. + */ + public Builder clearBold() { + bitField0_ = (bitField0_ & ~0x00000002); + bold_ = false; + onChanged(); + return this; + } + + private boolean italic_ ; + /** + * <code>bool italic = 3;</code> + * @return The italic. + */ + @java.lang.Override + public boolean getItalic() { + return italic_; + } + /** + * <code>bool italic = 3;</code> + * @param value The italic to set. + * @return This builder for chaining. + */ + public Builder setItalic(boolean value) { + + italic_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>bool italic = 3;</code> + * @return This builder for chaining. + */ + public Builder clearItalic() { + bitField0_ = (bitField0_ & ~0x00000004); + italic_ = false; + onChanged(); + return this; + } + + private int weight_ ; + /** + * <code>uint32 weight = 4;</code> + * @return The weight. + */ + @java.lang.Override + public int getWeight() { + return weight_; + } + /** + * <code>uint32 weight = 4;</code> + * @param value The weight to set. + * @return This builder for chaining. + */ + public Builder setWeight(int value) { + + weight_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint32 weight = 4;</code> + * @return This builder for chaining. + */ + public Builder clearWeight() { + bitField0_ = (bitField0_ & ~0x00000008); + weight_ = 0; + onChanged(); + return this; + } + + private int italicAngle_ ; + /** + * <code>uint32 italic_angle = 5;</code> + * @return The italicAngle. + */ + @java.lang.Override + public int getItalicAngle() { + return italicAngle_; + } + /** + * <code>uint32 italic_angle = 5;</code> + * @param value The italicAngle to set. + * @return This builder for chaining. + */ + public Builder setItalicAngle(int value) { + + italicAngle_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>uint32 italic_angle = 5;</code> + * @return This builder for chaining. + */ + public Builder clearItalicAngle() { + bitField0_ = (bitField0_ & ~0x00000010); + italicAngle_ = 0; + onChanged(); + return this; + } + + private int fontSize_ ; + /** + * <code>uint32 font_size = 6;</code> + * @return The fontSize. + */ + @java.lang.Override + public int getFontSize() { + return fontSize_; + } + /** + * <code>uint32 font_size = 6;</code> + * @param value The fontSize to set. + * @return This builder for chaining. + */ + public Builder setFontSize(int value) { + + fontSize_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>uint32 font_size = 6;</code> + * @return This builder for chaining. + */ + public Builder clearFontSize() { + bitField0_ = (bitField0_ & ~0x00000020); + fontSize_ = 0; + onChanged(); + return this; + } + + private boolean useHeighLightColor_ ; + /** + * <code>bool use_heigh_light_color = 7;</code> + * @return The useHeighLightColor. + */ + @java.lang.Override + public boolean getUseHeighLightColor() { + return useHeighLightColor_; + } + /** + * <code>bool use_heigh_light_color = 7;</code> + * @param value The useHeighLightColor to set. + * @return This builder for chaining. + */ + public Builder setUseHeighLightColor(boolean value) { + + useHeighLightColor_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>bool use_heigh_light_color = 7;</code> + * @return This builder for chaining. + */ + public Builder clearUseHeighLightColor() { + bitField0_ = (bitField0_ & ~0x00000040); + useHeighLightColor_ = false; + onChanged(); + return this; + } + + private boolean useRemoteClor_ ; + /** + * <code>bool use_remote_clor = 8;</code> + * @return The useRemoteClor. + */ + @java.lang.Override + public boolean getUseRemoteClor() { + return useRemoteClor_; + } + /** + * <code>bool use_remote_clor = 8;</code> + * @param value The useRemoteClor to set. + * @return This builder for chaining. + */ + public Builder setUseRemoteClor(boolean value) { + + useRemoteClor_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>bool use_remote_clor = 8;</code> + * @return This builder for chaining. + */ + public Builder clearUseRemoteClor() { + bitField0_ = (bitField0_ & ~0x00000080); + useRemoteClor_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextFormat) + } + + // @@protoc_insertion_point(class_scope:TextFormat) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<TextFormat> + PARSER = new com.google.protobuf.AbstractParser<TextFormat>() { + @java.lang.Override + public TextFormat parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<TextFormat> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<TextFormat> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextFormat_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextFormat_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\020TextFormat.proto\"\252\001\n\nTextFormat\022\r\n\005col" + + "or\030\001 \001(\t\022\014\n\004bold\030\002 \001(\010\022\016\n\006italic\030\003 \001(\010\022\016" + + "\n\006weight\030\004 \001(\r\022\024\n\014italic_angle\030\005 \001(\r\022\021\n\t" + + "font_size\030\006 \001(\r\022\035\n\025use_heigh_light_color" + + "\030\007 \001(\010\022\027\n\017use_remote_clor\030\010 \001(\010B8\n6tech." + + "ordinaryroad.live.chat.client.douyin.pro" + + "tobuf.dtob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_TextFormat_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_TextFormat_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_TextFormat_descriptor, + new java.lang.String[] { "Color", "Bold", "Italic", "Weight", "ItalicAngle", "FontSize", "UseHeighLightColor", "UseRemoteClor", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextOuterClass.java new file mode 100644 index 0000000..4ff0f8d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextOuterClass.java @@ -0,0 +1,1171 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Text.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class TextOuterClass { + private TextOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface TextOrBuilder extends + // @@protoc_insertion_point(interface_extends:Text) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string key = 1;</code> + * @return The key. + */ + java.lang.String getKey(); + /** + * <code>string key = 1;</code> + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + * <code>string default_patter = 2;</code> + * @return The defaultPatter. + */ + java.lang.String getDefaultPatter(); + /** + * <code>string default_patter = 2;</code> + * @return The bytes for defaultPatter. + */ + com.google.protobuf.ByteString + getDefaultPatterBytes(); + + /** + * <code>.TextFormat default_format = 3;</code> + * @return Whether the defaultFormat field is set. + */ + boolean hasDefaultFormat(); + /** + * <code>.TextFormat default_format = 3;</code> + * @return The defaultFormat. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getDefaultFormat(); + /** + * <code>.TextFormat default_format = 3;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder getDefaultFormatOrBuilder(); + + /** + * <code>.TextPiece pieces_list = 4;</code> + * @return Whether the piecesList field is set. + */ + boolean hasPiecesList(); + /** + * <code>.TextPiece pieces_list = 4;</code> + * @return The piecesList. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece getPiecesList(); + /** + * <code>.TextPiece pieces_list = 4;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPieceOrBuilder getPiecesListOrBuilder(); + } + /** + * Protobuf type {@code Text} + */ + public static final class Text extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Text) + TextOrBuilder { + private static final long serialVersionUID = 0L; + // Use Text.newBuilder() to construct. + private Text(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private Text() { + key_ = ""; + defaultPatter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Text(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.internal_static_Text_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.internal_static_Text_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * <code>string key = 1;</code> + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * <code>string key = 1;</code> + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_PATTER_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object defaultPatter_ = ""; + /** + * <code>string default_patter = 2;</code> + * @return The defaultPatter. + */ + @java.lang.Override + public java.lang.String getDefaultPatter() { + java.lang.Object ref = defaultPatter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultPatter_ = s; + return s; + } + } + /** + * <code>string default_patter = 2;</code> + * @return The bytes for defaultPatter. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDefaultPatterBytes() { + java.lang.Object ref = defaultPatter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + defaultPatter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_FORMAT_FIELD_NUMBER = 3; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat defaultFormat_; + /** + * <code>.TextFormat default_format = 3;</code> + * @return Whether the defaultFormat field is set. + */ + @java.lang.Override + public boolean hasDefaultFormat() { + return defaultFormat_ != null; + } + /** + * <code>.TextFormat default_format = 3;</code> + * @return The defaultFormat. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getDefaultFormat() { + return defaultFormat_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance() : defaultFormat_; + } + /** + * <code>.TextFormat default_format = 3;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder getDefaultFormatOrBuilder() { + return defaultFormat_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance() : defaultFormat_; + } + + public static final int PIECES_LIST_FIELD_NUMBER = 4; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece piecesList_; + /** + * <code>.TextPiece pieces_list = 4;</code> + * @return Whether the piecesList field is set. + */ + @java.lang.Override + public boolean hasPiecesList() { + return piecesList_ != null; + } + /** + * <code>.TextPiece pieces_list = 4;</code> + * @return The piecesList. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece getPiecesList() { + return piecesList_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.getDefaultInstance() : piecesList_; + } + /** + * <code>.TextPiece pieces_list = 4;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPieceOrBuilder getPiecesListOrBuilder() { + return piecesList_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.getDefaultInstance() : piecesList_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultPatter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, defaultPatter_); + } + if (defaultFormat_ != null) { + output.writeMessage(3, getDefaultFormat()); + } + if (piecesList_ != null) { + output.writeMessage(4, getPiecesList()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultPatter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, defaultPatter_); + } + if (defaultFormat_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getDefaultFormat()); + } + if (piecesList_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getPiecesList()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (!getDefaultPatter() + .equals(other.getDefaultPatter())) return false; + if (hasDefaultFormat() != other.hasDefaultFormat()) return false; + if (hasDefaultFormat()) { + if (!getDefaultFormat() + .equals(other.getDefaultFormat())) return false; + } + if (hasPiecesList() != other.hasPiecesList()) return false; + if (hasPiecesList()) { + if (!getPiecesList() + .equals(other.getPiecesList())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + DEFAULT_PATTER_FIELD_NUMBER; + hash = (53 * hash) + getDefaultPatter().hashCode(); + if (hasDefaultFormat()) { + hash = (37 * hash) + DEFAULT_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getDefaultFormat().hashCode(); + } + if (hasPiecesList()) { + hash = (37 * hash) + PIECES_LIST_FIELD_NUMBER; + hash = (53 * hash) + getPiecesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Text} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:Text) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.TextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.internal_static_Text_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.internal_static_Text_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + defaultPatter_ = ""; + defaultFormat_ = null; + if (defaultFormatBuilder_ != null) { + defaultFormatBuilder_.dispose(); + defaultFormatBuilder_ = null; + } + piecesList_ = null; + if (piecesListBuilder_ != null) { + piecesListBuilder_.dispose(); + piecesListBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.internal_static_Text_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.defaultPatter_ = defaultPatter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.defaultFormat_ = defaultFormatBuilder_ == null + ? defaultFormat_ + : defaultFormatBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.piecesList_ = piecesListBuilder_ == null + ? piecesList_ + : piecesListBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDefaultPatter().isEmpty()) { + defaultPatter_ = other.defaultPatter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDefaultFormat()) { + mergeDefaultFormat(other.getDefaultFormat()); + } + if (other.hasPiecesList()) { + mergePiecesList(other.getPiecesList()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + defaultPatter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getDefaultFormatFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getPiecesListFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * <code>string key = 1;</code> + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string key = 1;</code> + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string key = 1;</code> + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string key = 1;</code> + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string key = 1;</code> + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object defaultPatter_ = ""; + /** + * <code>string default_patter = 2;</code> + * @return The defaultPatter. + */ + public java.lang.String getDefaultPatter() { + java.lang.Object ref = defaultPatter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultPatter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string default_patter = 2;</code> + * @return The bytes for defaultPatter. + */ + public com.google.protobuf.ByteString + getDefaultPatterBytes() { + java.lang.Object ref = defaultPatter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + defaultPatter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string default_patter = 2;</code> + * @param value The defaultPatter to set. + * @return This builder for chaining. + */ + public Builder setDefaultPatter( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + defaultPatter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string default_patter = 2;</code> + * @return This builder for chaining. + */ + public Builder clearDefaultPatter() { + defaultPatter_ = getDefaultInstance().getDefaultPatter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string default_patter = 2;</code> + * @param value The bytes for defaultPatter to set. + * @return This builder for chaining. + */ + public Builder setDefaultPatterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + defaultPatter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat defaultFormat_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder> defaultFormatBuilder_; + /** + * <code>.TextFormat default_format = 3;</code> + * @return Whether the defaultFormat field is set. + */ + public boolean hasDefaultFormat() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * <code>.TextFormat default_format = 3;</code> + * @return The defaultFormat. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getDefaultFormat() { + if (defaultFormatBuilder_ == null) { + return defaultFormat_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance() : defaultFormat_; + } else { + return defaultFormatBuilder_.getMessage(); + } + } + /** + * <code>.TextFormat default_format = 3;</code> + */ + public Builder setDefaultFormat(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat value) { + if (defaultFormatBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + defaultFormat_ = value; + } else { + defaultFormatBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>.TextFormat default_format = 3;</code> + */ + public Builder setDefaultFormat( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder builderForValue) { + if (defaultFormatBuilder_ == null) { + defaultFormat_ = builderForValue.build(); + } else { + defaultFormatBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>.TextFormat default_format = 3;</code> + */ + public Builder mergeDefaultFormat(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat value) { + if (defaultFormatBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + defaultFormat_ != null && + defaultFormat_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance()) { + getDefaultFormatBuilder().mergeFrom(value); + } else { + defaultFormat_ = value; + } + } else { + defaultFormatBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>.TextFormat default_format = 3;</code> + */ + public Builder clearDefaultFormat() { + bitField0_ = (bitField0_ & ~0x00000004); + defaultFormat_ = null; + if (defaultFormatBuilder_ != null) { + defaultFormatBuilder_.dispose(); + defaultFormatBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.TextFormat default_format = 3;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder getDefaultFormatBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDefaultFormatFieldBuilder().getBuilder(); + } + /** + * <code>.TextFormat default_format = 3;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder getDefaultFormatOrBuilder() { + if (defaultFormatBuilder_ != null) { + return defaultFormatBuilder_.getMessageOrBuilder(); + } else { + return defaultFormat_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance() : defaultFormat_; + } + } + /** + * <code>.TextFormat default_format = 3;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder> + getDefaultFormatFieldBuilder() { + if (defaultFormatBuilder_ == null) { + defaultFormatBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder>( + getDefaultFormat(), + getParentForChildren(), + isClean()); + defaultFormat_ = null; + } + return defaultFormatBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece piecesList_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPieceOrBuilder> piecesListBuilder_; + /** + * <code>.TextPiece pieces_list = 4;</code> + * @return Whether the piecesList field is set. + */ + public boolean hasPiecesList() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * <code>.TextPiece pieces_list = 4;</code> + * @return The piecesList. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece getPiecesList() { + if (piecesListBuilder_ == null) { + return piecesList_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.getDefaultInstance() : piecesList_; + } else { + return piecesListBuilder_.getMessage(); + } + } + /** + * <code>.TextPiece pieces_list = 4;</code> + */ + public Builder setPiecesList(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece value) { + if (piecesListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + piecesList_ = value; + } else { + piecesListBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.TextPiece pieces_list = 4;</code> + */ + public Builder setPiecesList( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.Builder builderForValue) { + if (piecesListBuilder_ == null) { + piecesList_ = builderForValue.build(); + } else { + piecesListBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.TextPiece pieces_list = 4;</code> + */ + public Builder mergePiecesList(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece value) { + if (piecesListBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + piecesList_ != null && + piecesList_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.getDefaultInstance()) { + getPiecesListBuilder().mergeFrom(value); + } else { + piecesList_ = value; + } + } else { + piecesListBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.TextPiece pieces_list = 4;</code> + */ + public Builder clearPiecesList() { + bitField0_ = (bitField0_ & ~0x00000008); + piecesList_ = null; + if (piecesListBuilder_ != null) { + piecesListBuilder_.dispose(); + piecesListBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.TextPiece pieces_list = 4;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.Builder getPiecesListBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPiecesListFieldBuilder().getBuilder(); + } + /** + * <code>.TextPiece pieces_list = 4;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPieceOrBuilder getPiecesListOrBuilder() { + if (piecesListBuilder_ != null) { + return piecesListBuilder_.getMessageOrBuilder(); + } else { + return piecesList_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.getDefaultInstance() : piecesList_; + } + } + /** + * <code>.TextPiece pieces_list = 4;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPieceOrBuilder> + getPiecesListFieldBuilder() { + if (piecesListBuilder_ == null) { + piecesListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPieceOrBuilder>( + getPiecesList(), + getParentForChildren(), + isClean()); + piecesList_ = null; + } + return piecesListBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Text) + } + + // @@protoc_insertion_point(class_scope:Text) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<Text> + PARSER = new com.google.protobuf.AbstractParser<Text>() { + @java.lang.Override + public Text parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<Text> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<Text> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextOuterClass.Text getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Text_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Text_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\nText.proto\032\020TextFormat.proto\032\017TextPiec" + + "e.proto\"q\n\004Text\022\013\n\003key\030\001 \001(\t\022\026\n\016default_" + + "patter\030\002 \001(\t\022#\n\016default_format\030\003 \001(\0132\013.T" + + "extFormat\022\037\n\013pieces_list\030\004 \001(\0132\n.TextPie" + + "ceB8\n6tech.ordinaryroad.live.chat.client" + + ".douyin.protobuf.dtob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.getDescriptor(), + }); + internal_static_Text_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Text_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Text_descriptor, + new java.lang.String[] { "Key", "DefaultPatter", "DefaultFormat", "PiecesList", }); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceGiftOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceGiftOuterClass.java new file mode 100644 index 0000000..7e8d34f --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceGiftOuterClass.java @@ -0,0 +1,749 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: TextPieceGift.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class TextPieceGiftOuterClass { + private TextPieceGiftOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface TextPieceGiftOrBuilder extends + // @@protoc_insertion_point(interface_extends:TextPieceGift) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 gift_id = 1;</code> + * @return The giftId. + */ + long getGiftId(); + + /** + * <code>.PatternRef name_ref = 2;</code> + * @return Whether the nameRef field is set. + */ + boolean hasNameRef(); + /** + * <code>.PatternRef name_ref = 2;</code> + * @return The nameRef. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef getNameRef(); + /** + * <code>.PatternRef name_ref = 2;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRefOrBuilder getNameRefOrBuilder(); + } + /** + * Protobuf type {@code TextPieceGift} + */ + public static final class TextPieceGift extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextPieceGift) + TextPieceGiftOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextPieceGift.newBuilder() to construct. + private TextPieceGift(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private TextPieceGift() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextPieceGift(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.internal_static_TextPieceGift_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.internal_static_TextPieceGift_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.Builder.class); + } + + public static final int GIFT_ID_FIELD_NUMBER = 1; + private long giftId_ = 0L; + /** + * <code>uint64 gift_id = 1;</code> + * @return The giftId. + */ + @java.lang.Override + public long getGiftId() { + return giftId_; + } + + public static final int NAME_REF_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef nameRef_; + /** + * <code>.PatternRef name_ref = 2;</code> + * @return Whether the nameRef field is set. + */ + @java.lang.Override + public boolean hasNameRef() { + return nameRef_ != null; + } + /** + * <code>.PatternRef name_ref = 2;</code> + * @return The nameRef. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef getNameRef() { + return nameRef_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.getDefaultInstance() : nameRef_; + } + /** + * <code>.PatternRef name_ref = 2;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRefOrBuilder getNameRefOrBuilder() { + return nameRef_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.getDefaultInstance() : nameRef_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (giftId_ != 0L) { + output.writeUInt64(1, giftId_); + } + if (nameRef_ != null) { + output.writeMessage(2, getNameRef()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (giftId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, giftId_); + } + if (nameRef_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getNameRef()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift) obj; + + if (getGiftId() + != other.getGiftId()) return false; + if (hasNameRef() != other.hasNameRef()) return false; + if (hasNameRef()) { + if (!getNameRef() + .equals(other.getNameRef())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + GIFT_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getGiftId()); + if (hasNameRef()) { + hash = (37 * hash) + NAME_REF_FIELD_NUMBER; + hash = (53 * hash) + getNameRef().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code TextPieceGift} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:TextPieceGift) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGiftOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.internal_static_TextPieceGift_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.internal_static_TextPieceGift_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + giftId_ = 0L; + nameRef_ = null; + if (nameRefBuilder_ != null) { + nameRefBuilder_.dispose(); + nameRefBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.internal_static_TextPieceGift_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.giftId_ = giftId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nameRef_ = nameRefBuilder_ == null + ? nameRef_ + : nameRefBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.getDefaultInstance()) return this; + if (other.getGiftId() != 0L) { + setGiftId(other.getGiftId()); + } + if (other.hasNameRef()) { + mergeNameRef(other.getNameRef()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + giftId_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getNameRefFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long giftId_ ; + /** + * <code>uint64 gift_id = 1;</code> + * @return The giftId. + */ + @java.lang.Override + public long getGiftId() { + return giftId_; + } + /** + * <code>uint64 gift_id = 1;</code> + * @param value The giftId to set. + * @return This builder for chaining. + */ + public Builder setGiftId(long value) { + + giftId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 gift_id = 1;</code> + * @return This builder for chaining. + */ + public Builder clearGiftId() { + bitField0_ = (bitField0_ & ~0x00000001); + giftId_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef nameRef_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRefOrBuilder> nameRefBuilder_; + /** + * <code>.PatternRef name_ref = 2;</code> + * @return Whether the nameRef field is set. + */ + public boolean hasNameRef() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * <code>.PatternRef name_ref = 2;</code> + * @return The nameRef. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef getNameRef() { + if (nameRefBuilder_ == null) { + return nameRef_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.getDefaultInstance() : nameRef_; + } else { + return nameRefBuilder_.getMessage(); + } + } + /** + * <code>.PatternRef name_ref = 2;</code> + */ + public Builder setNameRef(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef value) { + if (nameRefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nameRef_ = value; + } else { + nameRefBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.PatternRef name_ref = 2;</code> + */ + public Builder setNameRef( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.Builder builderForValue) { + if (nameRefBuilder_ == null) { + nameRef_ = builderForValue.build(); + } else { + nameRefBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.PatternRef name_ref = 2;</code> + */ + public Builder mergeNameRef(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef value) { + if (nameRefBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + nameRef_ != null && + nameRef_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.getDefaultInstance()) { + getNameRefBuilder().mergeFrom(value); + } else { + nameRef_ = value; + } + } else { + nameRefBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.PatternRef name_ref = 2;</code> + */ + public Builder clearNameRef() { + bitField0_ = (bitField0_ & ~0x00000002); + nameRef_ = null; + if (nameRefBuilder_ != null) { + nameRefBuilder_.dispose(); + nameRefBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.PatternRef name_ref = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.Builder getNameRefBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNameRefFieldBuilder().getBuilder(); + } + /** + * <code>.PatternRef name_ref = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRefOrBuilder getNameRefOrBuilder() { + if (nameRefBuilder_ != null) { + return nameRefBuilder_.getMessageOrBuilder(); + } else { + return nameRef_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.getDefaultInstance() : nameRef_; + } + } + /** + * <code>.PatternRef name_ref = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRefOrBuilder> + getNameRefFieldBuilder() { + if (nameRefBuilder_ == null) { + nameRefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRef.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.PatternRefOrBuilder>( + getNameRef(), + getParentForChildren(), + isClean()); + nameRef_ = null; + } + return nameRefBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextPieceGift) + } + + // @@protoc_insertion_point(class_scope:TextPieceGift) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<TextPieceGift> + PARSER = new com.google.protobuf.AbstractParser<TextPieceGift>() { + @java.lang.Override + public TextPieceGift parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<TextPieceGift> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<TextPieceGift> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextPieceGift_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextPieceGift_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\023TextPieceGift.proto\032\020PatternRef.proto\"" + + "?\n\rTextPieceGift\022\017\n\007gift_id\030\001 \001(\004\022\035\n\010nam" + + "e_ref\030\002 \001(\0132\013.PatternRefB8\n6tech.ordinar" + + "yroad.live.chat.client.douyin.protobuf.d" + + "tob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.getDescriptor(), + }); + internal_static_TextPieceGift_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_TextPieceGift_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_TextPieceGift_descriptor, + new java.lang.String[] { "GiftId", "NameRef", }); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.PatternRefOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceHeartOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceHeartOuterClass.java new file mode 100644 index 0000000..7e4c99c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceHeartOuterClass.java @@ -0,0 +1,625 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: TextPieceHeart.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class TextPieceHeartOuterClass { + private TextPieceHeartOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface TextPieceHeartOrBuilder extends + // @@protoc_insertion_point(interface_extends:TextPieceHeart) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string color = 1;</code> + * @return The color. + */ + java.lang.String getColor(); + /** + * <code>string color = 1;</code> + * @return The bytes for color. + */ + com.google.protobuf.ByteString + getColorBytes(); + } + /** + * Protobuf type {@code TextPieceHeart} + */ + public static final class TextPieceHeart extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextPieceHeart) + TextPieceHeartOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextPieceHeart.newBuilder() to construct. + private TextPieceHeart(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private TextPieceHeart() { + color_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextPieceHeart(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.internal_static_TextPieceHeart_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.internal_static_TextPieceHeart_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.Builder.class); + } + + public static final int COLOR_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object color_ = ""; + /** + * <code>string color = 1;</code> + * @return The color. + */ + @java.lang.Override + public java.lang.String getColor() { + java.lang.Object ref = color_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + color_ = s; + return s; + } + } + /** + * <code>string color = 1;</code> + * @return The bytes for color. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getColorBytes() { + java.lang.Object ref = color_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + color_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(color_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, color_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(color_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, color_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart) obj; + + if (!getColor() + .equals(other.getColor())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code TextPieceHeart} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:TextPieceHeart) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeartOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.internal_static_TextPieceHeart_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.internal_static_TextPieceHeart_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + color_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.internal_static_TextPieceHeart_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.color_ = color_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.getDefaultInstance()) return this; + if (!other.getColor().isEmpty()) { + color_ = other.color_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + color_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object color_ = ""; + /** + * <code>string color = 1;</code> + * @return The color. + */ + public java.lang.String getColor() { + java.lang.Object ref = color_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + color_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string color = 1;</code> + * @return The bytes for color. + */ + public com.google.protobuf.ByteString + getColorBytes() { + java.lang.Object ref = color_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + color_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string color = 1;</code> + * @param value The color to set. + * @return This builder for chaining. + */ + public Builder setColor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + color_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string color = 1;</code> + * @return This builder for chaining. + */ + public Builder clearColor() { + color_ = getDefaultInstance().getColor(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string color = 1;</code> + * @param value The bytes for color to set. + * @return This builder for chaining. + */ + public Builder setColorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + color_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextPieceHeart) + } + + // @@protoc_insertion_point(class_scope:TextPieceHeart) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<TextPieceHeart> + PARSER = new com.google.protobuf.AbstractParser<TextPieceHeart>() { + @java.lang.Override + public TextPieceHeart parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<TextPieceHeart> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<TextPieceHeart> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextPieceHeart_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextPieceHeart_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024TextPieceHeart.proto\"\037\n\016TextPieceHeart" + + "\022\r\n\005color\030\001 \001(\tB8\n6tech.ordinaryroad.liv" + + "e.chat.client.douyin.protobuf.dtob\006proto" + + "3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_TextPieceHeart_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_TextPieceHeart_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_TextPieceHeart_descriptor, + new java.lang.String[] { "Color", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceImageOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceImageOuterClass.java new file mode 100644 index 0000000..8d3adcb --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceImageOuterClass.java @@ -0,0 +1,750 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: TextPieceImage.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class TextPieceImageOuterClass { + private TextPieceImageOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface TextPieceImageOrBuilder extends + // @@protoc_insertion_point(interface_extends:TextPieceImage) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.Image image = 1;</code> + * @return Whether the image field is set. + */ + boolean hasImage(); + /** + * <code>.Image image = 1;</code> + * @return The image. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getImage(); + /** + * <code>.Image image = 1;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImageOrBuilder(); + + /** + * <code>float scaling_rate = 2;</code> + * @return The scalingRate. + */ + float getScalingRate(); + } + /** + * Protobuf type {@code TextPieceImage} + */ + public static final class TextPieceImage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextPieceImage) + TextPieceImageOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextPieceImage.newBuilder() to construct. + private TextPieceImage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private TextPieceImage() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextPieceImage(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.internal_static_TextPieceImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.internal_static_TextPieceImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.Builder.class); + } + + public static final int IMAGE_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image image_; + /** + * <code>.Image image = 1;</code> + * @return Whether the image field is set. + */ + @java.lang.Override + public boolean hasImage() { + return image_ != null; + } + /** + * <code>.Image image = 1;</code> + * @return The image. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getImage() { + return image_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : image_; + } + /** + * <code>.Image image = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImageOrBuilder() { + return image_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : image_; + } + + public static final int SCALING_RATE_FIELD_NUMBER = 2; + private float scalingRate_ = 0F; + /** + * <code>float scaling_rate = 2;</code> + * @return The scalingRate. + */ + @java.lang.Override + public float getScalingRate() { + return scalingRate_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (image_ != null) { + output.writeMessage(1, getImage()); + } + if (java.lang.Float.floatToRawIntBits(scalingRate_) != 0) { + output.writeFloat(2, scalingRate_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (image_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getImage()); + } + if (java.lang.Float.floatToRawIntBits(scalingRate_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, scalingRate_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage) obj; + + if (hasImage() != other.hasImage()) return false; + if (hasImage()) { + if (!getImage() + .equals(other.getImage())) return false; + } + if (java.lang.Float.floatToIntBits(getScalingRate()) + != java.lang.Float.floatToIntBits( + other.getScalingRate())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasImage()) { + hash = (37 * hash) + IMAGE_FIELD_NUMBER; + hash = (53 * hash) + getImage().hashCode(); + } + hash = (37 * hash) + SCALING_RATE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getScalingRate()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code TextPieceImage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:TextPieceImage) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.internal_static_TextPieceImage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.internal_static_TextPieceImage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + image_ = null; + if (imageBuilder_ != null) { + imageBuilder_.dispose(); + imageBuilder_ = null; + } + scalingRate_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.internal_static_TextPieceImage_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.image_ = imageBuilder_ == null + ? image_ + : imageBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.scalingRate_ = scalingRate_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.getDefaultInstance()) return this; + if (other.hasImage()) { + mergeImage(other.getImage()); + } + if (other.getScalingRate() != 0F) { + setScalingRate(other.getScalingRate()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getImageFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: { + scalingRate_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image image_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> imageBuilder_; + /** + * <code>.Image image = 1;</code> + * @return Whether the image field is set. + */ + public boolean hasImage() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.Image image = 1;</code> + * @return The image. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getImage() { + if (imageBuilder_ == null) { + return image_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : image_; + } else { + return imageBuilder_.getMessage(); + } + } + /** + * <code>.Image image = 1;</code> + */ + public Builder setImage(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (imageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + image_ = value; + } else { + imageBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Image image = 1;</code> + */ + public Builder setImage( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (imageBuilder_ == null) { + image_ = builderForValue.build(); + } else { + imageBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Image image = 1;</code> + */ + public Builder mergeImage(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (imageBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + image_ != null && + image_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getImageBuilder().mergeFrom(value); + } else { + image_ = value; + } + } else { + imageBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Image image = 1;</code> + */ + public Builder clearImage() { + bitField0_ = (bitField0_ & ~0x00000001); + image_ = null; + if (imageBuilder_ != null) { + imageBuilder_.dispose(); + imageBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image image = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getImageBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getImageFieldBuilder().getBuilder(); + } + /** + * <code>.Image image = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImageOrBuilder() { + if (imageBuilder_ != null) { + return imageBuilder_.getMessageOrBuilder(); + } else { + return image_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : image_; + } + } + /** + * <code>.Image image = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getImageFieldBuilder() { + if (imageBuilder_ == null) { + imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getImage(), + getParentForChildren(), + isClean()); + image_ = null; + } + return imageBuilder_; + } + + private float scalingRate_ ; + /** + * <code>float scaling_rate = 2;</code> + * @return The scalingRate. + */ + @java.lang.Override + public float getScalingRate() { + return scalingRate_; + } + /** + * <code>float scaling_rate = 2;</code> + * @param value The scalingRate to set. + * @return This builder for chaining. + */ + public Builder setScalingRate(float value) { + + scalingRate_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>float scaling_rate = 2;</code> + * @return This builder for chaining. + */ + public Builder clearScalingRate() { + bitField0_ = (bitField0_ & ~0x00000002); + scalingRate_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextPieceImage) + } + + // @@protoc_insertion_point(class_scope:TextPieceImage) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<TextPieceImage> + PARSER = new com.google.protobuf.AbstractParser<TextPieceImage>() { + @java.lang.Override + public TextPieceImage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<TextPieceImage> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<TextPieceImage> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextPieceImage_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextPieceImage_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024TextPieceImage.proto\032\013Image.proto\"=\n\016T" + + "extPieceImage\022\025\n\005image\030\001 \001(\0132\006.Image\022\024\n\014" + + "scaling_rate\030\002 \001(\002B8\n6tech.ordinaryroad." + + "live.chat.client.douyin.protobuf.dtob\006pr" + + "oto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor(), + }); + internal_static_TextPieceImage_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_TextPieceImage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_TextPieceImage_descriptor, + new java.lang.String[] { "Image", "ScalingRate", }); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceOuterClass.java new file mode 100644 index 0000000..3eecce9 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceOuterClass.java @@ -0,0 +1,1895 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: TextPiece.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class TextPieceOuterClass { + private TextPieceOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface TextPieceOrBuilder extends + // @@protoc_insertion_point(interface_extends:TextPiece) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>bool type = 1;</code> + * @return The type. + */ + boolean getType(); + + /** + * <code>.TextFormat format = 2;</code> + * @return Whether the format field is set. + */ + boolean hasFormat(); + /** + * <code>.TextFormat format = 2;</code> + * @return The format. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getFormat(); + /** + * <code>.TextFormat format = 2;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder getFormatOrBuilder(); + + /** + * <code>string string_value = 3;</code> + * @return The stringValue. + */ + java.lang.String getStringValue(); + /** + * <code>string string_value = 3;</code> + * @return The bytes for stringValue. + */ + com.google.protobuf.ByteString + getStringValueBytes(); + + /** + * <code>.TextPieceUser user_value = 4;</code> + * @return Whether the userValue field is set. + */ + boolean hasUserValue(); + /** + * <code>.TextPieceUser user_value = 4;</code> + * @return The userValue. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser getUserValue(); + /** + * <code>.TextPieceUser user_value = 4;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUserOrBuilder getUserValueOrBuilder(); + + /** + * <code>.TextPieceGift gift_value = 5;</code> + * @return Whether the giftValue field is set. + */ + boolean hasGiftValue(); + /** + * <code>.TextPieceGift gift_value = 5;</code> + * @return The giftValue. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift getGiftValue(); + /** + * <code>.TextPieceGift gift_value = 5;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGiftOrBuilder getGiftValueOrBuilder(); + + /** + * <code>.TextPieceHeart heart_value = 6;</code> + * @return Whether the heartValue field is set. + */ + boolean hasHeartValue(); + /** + * <code>.TextPieceHeart heart_value = 6;</code> + * @return The heartValue. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart getHeartValue(); + /** + * <code>.TextPieceHeart heart_value = 6;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeartOrBuilder getHeartValueOrBuilder(); + + /** + * <code>.TextPiecePatternRef pattern_ref_value = 7;</code> + * @return Whether the patternRefValue field is set. + */ + boolean hasPatternRefValue(); + /** + * <code>.TextPiecePatternRef pattern_ref_value = 7;</code> + * @return The patternRefValue. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef getPatternRefValue(); + /** + * <code>.TextPiecePatternRef pattern_ref_value = 7;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRefOrBuilder getPatternRefValueOrBuilder(); + + /** + * <code>.TextPieceImage image_value = 8;</code> + * @return Whether the imageValue field is set. + */ + boolean hasImageValue(); + /** + * <code>.TextPieceImage image_value = 8;</code> + * @return The imageValue. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage getImageValue(); + /** + * <code>.TextPieceImage image_value = 8;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImageOrBuilder getImageValueOrBuilder(); + } + /** + * Protobuf type {@code TextPiece} + */ + public static final class TextPiece extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextPiece) + TextPieceOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextPiece.newBuilder() to construct. + private TextPiece(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private TextPiece() { + stringValue_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextPiece(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.internal_static_TextPiece_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.internal_static_TextPiece_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 1; + private boolean type_ = false; + /** + * <code>bool type = 1;</code> + * @return The type. + */ + @java.lang.Override + public boolean getType() { + return type_; + } + + public static final int FORMAT_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat format_; + /** + * <code>.TextFormat format = 2;</code> + * @return Whether the format field is set. + */ + @java.lang.Override + public boolean hasFormat() { + return format_ != null; + } + /** + * <code>.TextFormat format = 2;</code> + * @return The format. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getFormat() { + return format_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance() : format_; + } + /** + * <code>.TextFormat format = 2;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder getFormatOrBuilder() { + return format_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance() : format_; + } + + public static final int STRING_VALUE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object stringValue_ = ""; + /** + * <code>string string_value = 3;</code> + * @return The stringValue. + */ + @java.lang.Override + public java.lang.String getStringValue() { + java.lang.Object ref = stringValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stringValue_ = s; + return s; + } + } + /** + * <code>string string_value = 3;</code> + * @return The bytes for stringValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = stringValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_VALUE_FIELD_NUMBER = 4; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser userValue_; + /** + * <code>.TextPieceUser user_value = 4;</code> + * @return Whether the userValue field is set. + */ + @java.lang.Override + public boolean hasUserValue() { + return userValue_ != null; + } + /** + * <code>.TextPieceUser user_value = 4;</code> + * @return The userValue. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser getUserValue() { + return userValue_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.getDefaultInstance() : userValue_; + } + /** + * <code>.TextPieceUser user_value = 4;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUserOrBuilder getUserValueOrBuilder() { + return userValue_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.getDefaultInstance() : userValue_; + } + + public static final int GIFT_VALUE_FIELD_NUMBER = 5; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift giftValue_; + /** + * <code>.TextPieceGift gift_value = 5;</code> + * @return Whether the giftValue field is set. + */ + @java.lang.Override + public boolean hasGiftValue() { + return giftValue_ != null; + } + /** + * <code>.TextPieceGift gift_value = 5;</code> + * @return The giftValue. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift getGiftValue() { + return giftValue_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.getDefaultInstance() : giftValue_; + } + /** + * <code>.TextPieceGift gift_value = 5;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGiftOrBuilder getGiftValueOrBuilder() { + return giftValue_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.getDefaultInstance() : giftValue_; + } + + public static final int HEART_VALUE_FIELD_NUMBER = 6; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart heartValue_; + /** + * <code>.TextPieceHeart heart_value = 6;</code> + * @return Whether the heartValue field is set. + */ + @java.lang.Override + public boolean hasHeartValue() { + return heartValue_ != null; + } + /** + * <code>.TextPieceHeart heart_value = 6;</code> + * @return The heartValue. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart getHeartValue() { + return heartValue_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.getDefaultInstance() : heartValue_; + } + /** + * <code>.TextPieceHeart heart_value = 6;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeartOrBuilder getHeartValueOrBuilder() { + return heartValue_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.getDefaultInstance() : heartValue_; + } + + public static final int PATTERN_REF_VALUE_FIELD_NUMBER = 7; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef patternRefValue_; + /** + * <code>.TextPiecePatternRef pattern_ref_value = 7;</code> + * @return Whether the patternRefValue field is set. + */ + @java.lang.Override + public boolean hasPatternRefValue() { + return patternRefValue_ != null; + } + /** + * <code>.TextPiecePatternRef pattern_ref_value = 7;</code> + * @return The patternRefValue. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef getPatternRefValue() { + return patternRefValue_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.getDefaultInstance() : patternRefValue_; + } + /** + * <code>.TextPiecePatternRef pattern_ref_value = 7;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRefOrBuilder getPatternRefValueOrBuilder() { + return patternRefValue_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.getDefaultInstance() : patternRefValue_; + } + + public static final int IMAGE_VALUE_FIELD_NUMBER = 8; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage imageValue_; + /** + * <code>.TextPieceImage image_value = 8;</code> + * @return Whether the imageValue field is set. + */ + @java.lang.Override + public boolean hasImageValue() { + return imageValue_ != null; + } + /** + * <code>.TextPieceImage image_value = 8;</code> + * @return The imageValue. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage getImageValue() { + return imageValue_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.getDefaultInstance() : imageValue_; + } + /** + * <code>.TextPieceImage image_value = 8;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImageOrBuilder getImageValueOrBuilder() { + return imageValue_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.getDefaultInstance() : imageValue_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (type_ != false) { + output.writeBool(1, type_); + } + if (format_ != null) { + output.writeMessage(2, getFormat()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stringValue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, stringValue_); + } + if (userValue_ != null) { + output.writeMessage(4, getUserValue()); + } + if (giftValue_ != null) { + output.writeMessage(5, getGiftValue()); + } + if (heartValue_ != null) { + output.writeMessage(6, getHeartValue()); + } + if (patternRefValue_ != null) { + output.writeMessage(7, getPatternRefValue()); + } + if (imageValue_ != null) { + output.writeMessage(8, getImageValue()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, type_); + } + if (format_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getFormat()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stringValue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, stringValue_); + } + if (userValue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getUserValue()); + } + if (giftValue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getGiftValue()); + } + if (heartValue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getHeartValue()); + } + if (patternRefValue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getPatternRefValue()); + } + if (imageValue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getImageValue()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece) obj; + + if (getType() + != other.getType()) return false; + if (hasFormat() != other.hasFormat()) return false; + if (hasFormat()) { + if (!getFormat() + .equals(other.getFormat())) return false; + } + if (!getStringValue() + .equals(other.getStringValue())) return false; + if (hasUserValue() != other.hasUserValue()) return false; + if (hasUserValue()) { + if (!getUserValue() + .equals(other.getUserValue())) return false; + } + if (hasGiftValue() != other.hasGiftValue()) return false; + if (hasGiftValue()) { + if (!getGiftValue() + .equals(other.getGiftValue())) return false; + } + if (hasHeartValue() != other.hasHeartValue()) return false; + if (hasHeartValue()) { + if (!getHeartValue() + .equals(other.getHeartValue())) return false; + } + if (hasPatternRefValue() != other.hasPatternRefValue()) return false; + if (hasPatternRefValue()) { + if (!getPatternRefValue() + .equals(other.getPatternRefValue())) return false; + } + if (hasImageValue() != other.hasImageValue()) return false; + if (hasImageValue()) { + if (!getImageValue() + .equals(other.getImageValue())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getType()); + if (hasFormat()) { + hash = (37 * hash) + FORMAT_FIELD_NUMBER; + hash = (53 * hash) + getFormat().hashCode(); + } + hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + if (hasUserValue()) { + hash = (37 * hash) + USER_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getUserValue().hashCode(); + } + if (hasGiftValue()) { + hash = (37 * hash) + GIFT_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getGiftValue().hashCode(); + } + if (hasHeartValue()) { + hash = (37 * hash) + HEART_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getHeartValue().hashCode(); + } + if (hasPatternRefValue()) { + hash = (37 * hash) + PATTERN_REF_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getPatternRefValue().hashCode(); + } + if (hasImageValue()) { + hash = (37 * hash) + IMAGE_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getImageValue().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code TextPiece} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:TextPiece) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPieceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.internal_static_TextPiece_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.internal_static_TextPiece_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = false; + format_ = null; + if (formatBuilder_ != null) { + formatBuilder_.dispose(); + formatBuilder_ = null; + } + stringValue_ = ""; + userValue_ = null; + if (userValueBuilder_ != null) { + userValueBuilder_.dispose(); + userValueBuilder_ = null; + } + giftValue_ = null; + if (giftValueBuilder_ != null) { + giftValueBuilder_.dispose(); + giftValueBuilder_ = null; + } + heartValue_ = null; + if (heartValueBuilder_ != null) { + heartValueBuilder_.dispose(); + heartValueBuilder_ = null; + } + patternRefValue_ = null; + if (patternRefValueBuilder_ != null) { + patternRefValueBuilder_.dispose(); + patternRefValueBuilder_ = null; + } + imageValue_ = null; + if (imageValueBuilder_ != null) { + imageValueBuilder_.dispose(); + imageValueBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.internal_static_TextPiece_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.format_ = formatBuilder_ == null + ? format_ + : formatBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.stringValue_ = stringValue_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.userValue_ = userValueBuilder_ == null + ? userValue_ + : userValueBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.giftValue_ = giftValueBuilder_ == null + ? giftValue_ + : giftValueBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.heartValue_ = heartValueBuilder_ == null + ? heartValue_ + : heartValueBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.patternRefValue_ = patternRefValueBuilder_ == null + ? patternRefValue_ + : patternRefValueBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.imageValue_ = imageValueBuilder_ == null + ? imageValue_ + : imageValueBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece.getDefaultInstance()) return this; + if (other.getType() != false) { + setType(other.getType()); + } + if (other.hasFormat()) { + mergeFormat(other.getFormat()); + } + if (!other.getStringValue().isEmpty()) { + stringValue_ = other.stringValue_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasUserValue()) { + mergeUserValue(other.getUserValue()); + } + if (other.hasGiftValue()) { + mergeGiftValue(other.getGiftValue()); + } + if (other.hasHeartValue()) { + mergeHeartValue(other.getHeartValue()); + } + if (other.hasPatternRefValue()) { + mergePatternRefValue(other.getPatternRefValue()); + } + if (other.hasImageValue()) { + mergeImageValue(other.getImageValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + type_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getFormatFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + stringValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getUserValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + input.readMessage( + getGiftValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getHeartValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + input.readMessage( + getPatternRefValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + input.readMessage( + getImageValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean type_ ; + /** + * <code>bool type = 1;</code> + * @return The type. + */ + @java.lang.Override + public boolean getType() { + return type_; + } + /** + * <code>bool type = 1;</code> + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(boolean value) { + + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>bool type = 1;</code> + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = false; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat format_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder> formatBuilder_; + /** + * <code>.TextFormat format = 2;</code> + * @return Whether the format field is set. + */ + public boolean hasFormat() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * <code>.TextFormat format = 2;</code> + * @return The format. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat getFormat() { + if (formatBuilder_ == null) { + return format_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance() : format_; + } else { + return formatBuilder_.getMessage(); + } + } + /** + * <code>.TextFormat format = 2;</code> + */ + public Builder setFormat(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat value) { + if (formatBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + format_ = value; + } else { + formatBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.TextFormat format = 2;</code> + */ + public Builder setFormat( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder builderForValue) { + if (formatBuilder_ == null) { + format_ = builderForValue.build(); + } else { + formatBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.TextFormat format = 2;</code> + */ + public Builder mergeFormat(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat value) { + if (formatBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + format_ != null && + format_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance()) { + getFormatBuilder().mergeFrom(value); + } else { + format_ = value; + } + } else { + formatBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.TextFormat format = 2;</code> + */ + public Builder clearFormat() { + bitField0_ = (bitField0_ & ~0x00000002); + format_ = null; + if (formatBuilder_ != null) { + formatBuilder_.dispose(); + formatBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.TextFormat format = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder getFormatBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getFormatFieldBuilder().getBuilder(); + } + /** + * <code>.TextFormat format = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder getFormatOrBuilder() { + if (formatBuilder_ != null) { + return formatBuilder_.getMessageOrBuilder(); + } else { + return format_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.getDefaultInstance() : format_; + } + } + /** + * <code>.TextFormat format = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder> + getFormatFieldBuilder() { + if (formatBuilder_ == null) { + formatBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormat.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.TextFormatOrBuilder>( + getFormat(), + getParentForChildren(), + isClean()); + format_ = null; + } + return formatBuilder_; + } + + private java.lang.Object stringValue_ = ""; + /** + * <code>string string_value = 3;</code> + * @return The stringValue. + */ + public java.lang.String getStringValue() { + java.lang.Object ref = stringValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + stringValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string string_value = 3;</code> + * @return The bytes for stringValue. + */ + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = stringValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string string_value = 3;</code> + * @param value The stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValue( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + stringValue_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>string string_value = 3;</code> + * @return This builder for chaining. + */ + public Builder clearStringValue() { + stringValue_ = getDefaultInstance().getStringValue(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * <code>string string_value = 3;</code> + * @param value The bytes for stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + stringValue_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser userValue_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUserOrBuilder> userValueBuilder_; + /** + * <code>.TextPieceUser user_value = 4;</code> + * @return Whether the userValue field is set. + */ + public boolean hasUserValue() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * <code>.TextPieceUser user_value = 4;</code> + * @return The userValue. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser getUserValue() { + if (userValueBuilder_ == null) { + return userValue_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.getDefaultInstance() : userValue_; + } else { + return userValueBuilder_.getMessage(); + } + } + /** + * <code>.TextPieceUser user_value = 4;</code> + */ + public Builder setUserValue(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser value) { + if (userValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userValue_ = value; + } else { + userValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.TextPieceUser user_value = 4;</code> + */ + public Builder setUserValue( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.Builder builderForValue) { + if (userValueBuilder_ == null) { + userValue_ = builderForValue.build(); + } else { + userValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.TextPieceUser user_value = 4;</code> + */ + public Builder mergeUserValue(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser value) { + if (userValueBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + userValue_ != null && + userValue_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.getDefaultInstance()) { + getUserValueBuilder().mergeFrom(value); + } else { + userValue_ = value; + } + } else { + userValueBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.TextPieceUser user_value = 4;</code> + */ + public Builder clearUserValue() { + bitField0_ = (bitField0_ & ~0x00000008); + userValue_ = null; + if (userValueBuilder_ != null) { + userValueBuilder_.dispose(); + userValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.TextPieceUser user_value = 4;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.Builder getUserValueBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUserValueFieldBuilder().getBuilder(); + } + /** + * <code>.TextPieceUser user_value = 4;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUserOrBuilder getUserValueOrBuilder() { + if (userValueBuilder_ != null) { + return userValueBuilder_.getMessageOrBuilder(); + } else { + return userValue_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.getDefaultInstance() : userValue_; + } + } + /** + * <code>.TextPieceUser user_value = 4;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUserOrBuilder> + getUserValueFieldBuilder() { + if (userValueBuilder_ == null) { + userValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUserOrBuilder>( + getUserValue(), + getParentForChildren(), + isClean()); + userValue_ = null; + } + return userValueBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift giftValue_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGiftOrBuilder> giftValueBuilder_; + /** + * <code>.TextPieceGift gift_value = 5;</code> + * @return Whether the giftValue field is set. + */ + public boolean hasGiftValue() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * <code>.TextPieceGift gift_value = 5;</code> + * @return The giftValue. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift getGiftValue() { + if (giftValueBuilder_ == null) { + return giftValue_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.getDefaultInstance() : giftValue_; + } else { + return giftValueBuilder_.getMessage(); + } + } + /** + * <code>.TextPieceGift gift_value = 5;</code> + */ + public Builder setGiftValue(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift value) { + if (giftValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + giftValue_ = value; + } else { + giftValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>.TextPieceGift gift_value = 5;</code> + */ + public Builder setGiftValue( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.Builder builderForValue) { + if (giftValueBuilder_ == null) { + giftValue_ = builderForValue.build(); + } else { + giftValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>.TextPieceGift gift_value = 5;</code> + */ + public Builder mergeGiftValue(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift value) { + if (giftValueBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + giftValue_ != null && + giftValue_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.getDefaultInstance()) { + getGiftValueBuilder().mergeFrom(value); + } else { + giftValue_ = value; + } + } else { + giftValueBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>.TextPieceGift gift_value = 5;</code> + */ + public Builder clearGiftValue() { + bitField0_ = (bitField0_ & ~0x00000010); + giftValue_ = null; + if (giftValueBuilder_ != null) { + giftValueBuilder_.dispose(); + giftValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.TextPieceGift gift_value = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.Builder getGiftValueBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getGiftValueFieldBuilder().getBuilder(); + } + /** + * <code>.TextPieceGift gift_value = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGiftOrBuilder getGiftValueOrBuilder() { + if (giftValueBuilder_ != null) { + return giftValueBuilder_.getMessageOrBuilder(); + } else { + return giftValue_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.getDefaultInstance() : giftValue_; + } + } + /** + * <code>.TextPieceGift gift_value = 5;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGiftOrBuilder> + getGiftValueFieldBuilder() { + if (giftValueBuilder_ == null) { + giftValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGift.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.TextPieceGiftOrBuilder>( + getGiftValue(), + getParentForChildren(), + isClean()); + giftValue_ = null; + } + return giftValueBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart heartValue_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeartOrBuilder> heartValueBuilder_; + /** + * <code>.TextPieceHeart heart_value = 6;</code> + * @return Whether the heartValue field is set. + */ + public boolean hasHeartValue() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * <code>.TextPieceHeart heart_value = 6;</code> + * @return The heartValue. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart getHeartValue() { + if (heartValueBuilder_ == null) { + return heartValue_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.getDefaultInstance() : heartValue_; + } else { + return heartValueBuilder_.getMessage(); + } + } + /** + * <code>.TextPieceHeart heart_value = 6;</code> + */ + public Builder setHeartValue(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart value) { + if (heartValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + heartValue_ = value; + } else { + heartValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>.TextPieceHeart heart_value = 6;</code> + */ + public Builder setHeartValue( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.Builder builderForValue) { + if (heartValueBuilder_ == null) { + heartValue_ = builderForValue.build(); + } else { + heartValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>.TextPieceHeart heart_value = 6;</code> + */ + public Builder mergeHeartValue(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart value) { + if (heartValueBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + heartValue_ != null && + heartValue_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.getDefaultInstance()) { + getHeartValueBuilder().mergeFrom(value); + } else { + heartValue_ = value; + } + } else { + heartValueBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>.TextPieceHeart heart_value = 6;</code> + */ + public Builder clearHeartValue() { + bitField0_ = (bitField0_ & ~0x00000020); + heartValue_ = null; + if (heartValueBuilder_ != null) { + heartValueBuilder_.dispose(); + heartValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.TextPieceHeart heart_value = 6;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.Builder getHeartValueBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getHeartValueFieldBuilder().getBuilder(); + } + /** + * <code>.TextPieceHeart heart_value = 6;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeartOrBuilder getHeartValueOrBuilder() { + if (heartValueBuilder_ != null) { + return heartValueBuilder_.getMessageOrBuilder(); + } else { + return heartValue_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.getDefaultInstance() : heartValue_; + } + } + /** + * <code>.TextPieceHeart heart_value = 6;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeartOrBuilder> + getHeartValueFieldBuilder() { + if (heartValueBuilder_ == null) { + heartValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeart.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.TextPieceHeartOrBuilder>( + getHeartValue(), + getParentForChildren(), + isClean()); + heartValue_ = null; + } + return heartValueBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef patternRefValue_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRefOrBuilder> patternRefValueBuilder_; + /** + * <code>.TextPiecePatternRef pattern_ref_value = 7;</code> + * @return Whether the patternRefValue field is set. + */ + public boolean hasPatternRefValue() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * <code>.TextPiecePatternRef pattern_ref_value = 7;</code> + * @return The patternRefValue. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef getPatternRefValue() { + if (patternRefValueBuilder_ == null) { + return patternRefValue_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.getDefaultInstance() : patternRefValue_; + } else { + return patternRefValueBuilder_.getMessage(); + } + } + /** + * <code>.TextPiecePatternRef pattern_ref_value = 7;</code> + */ + public Builder setPatternRefValue(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef value) { + if (patternRefValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + patternRefValue_ = value; + } else { + patternRefValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.TextPiecePatternRef pattern_ref_value = 7;</code> + */ + public Builder setPatternRefValue( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.Builder builderForValue) { + if (patternRefValueBuilder_ == null) { + patternRefValue_ = builderForValue.build(); + } else { + patternRefValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.TextPiecePatternRef pattern_ref_value = 7;</code> + */ + public Builder mergePatternRefValue(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef value) { + if (patternRefValueBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + patternRefValue_ != null && + patternRefValue_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.getDefaultInstance()) { + getPatternRefValueBuilder().mergeFrom(value); + } else { + patternRefValue_ = value; + } + } else { + patternRefValueBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.TextPiecePatternRef pattern_ref_value = 7;</code> + */ + public Builder clearPatternRefValue() { + bitField0_ = (bitField0_ & ~0x00000040); + patternRefValue_ = null; + if (patternRefValueBuilder_ != null) { + patternRefValueBuilder_.dispose(); + patternRefValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.TextPiecePatternRef pattern_ref_value = 7;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.Builder getPatternRefValueBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getPatternRefValueFieldBuilder().getBuilder(); + } + /** + * <code>.TextPiecePatternRef pattern_ref_value = 7;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRefOrBuilder getPatternRefValueOrBuilder() { + if (patternRefValueBuilder_ != null) { + return patternRefValueBuilder_.getMessageOrBuilder(); + } else { + return patternRefValue_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.getDefaultInstance() : patternRefValue_; + } + } + /** + * <code>.TextPiecePatternRef pattern_ref_value = 7;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRefOrBuilder> + getPatternRefValueFieldBuilder() { + if (patternRefValueBuilder_ == null) { + patternRefValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRefOrBuilder>( + getPatternRefValue(), + getParentForChildren(), + isClean()); + patternRefValue_ = null; + } + return patternRefValueBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage imageValue_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImageOrBuilder> imageValueBuilder_; + /** + * <code>.TextPieceImage image_value = 8;</code> + * @return Whether the imageValue field is set. + */ + public boolean hasImageValue() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * <code>.TextPieceImage image_value = 8;</code> + * @return The imageValue. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage getImageValue() { + if (imageValueBuilder_ == null) { + return imageValue_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.getDefaultInstance() : imageValue_; + } else { + return imageValueBuilder_.getMessage(); + } + } + /** + * <code>.TextPieceImage image_value = 8;</code> + */ + public Builder setImageValue(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage value) { + if (imageValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imageValue_ = value; + } else { + imageValueBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>.TextPieceImage image_value = 8;</code> + */ + public Builder setImageValue( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.Builder builderForValue) { + if (imageValueBuilder_ == null) { + imageValue_ = builderForValue.build(); + } else { + imageValueBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>.TextPieceImage image_value = 8;</code> + */ + public Builder mergeImageValue(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage value) { + if (imageValueBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + imageValue_ != null && + imageValue_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.getDefaultInstance()) { + getImageValueBuilder().mergeFrom(value); + } else { + imageValue_ = value; + } + } else { + imageValueBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>.TextPieceImage image_value = 8;</code> + */ + public Builder clearImageValue() { + bitField0_ = (bitField0_ & ~0x00000080); + imageValue_ = null; + if (imageValueBuilder_ != null) { + imageValueBuilder_.dispose(); + imageValueBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.TextPieceImage image_value = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.Builder getImageValueBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getImageValueFieldBuilder().getBuilder(); + } + /** + * <code>.TextPieceImage image_value = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImageOrBuilder getImageValueOrBuilder() { + if (imageValueBuilder_ != null) { + return imageValueBuilder_.getMessageOrBuilder(); + } else { + return imageValue_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.getDefaultInstance() : imageValue_; + } + } + /** + * <code>.TextPieceImage image_value = 8;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImageOrBuilder> + getImageValueFieldBuilder() { + if (imageValueBuilder_ == null) { + imageValueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImage.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.TextPieceImageOrBuilder>( + getImageValue(), + getParentForChildren(), + isClean()); + imageValue_ = null; + } + return imageValueBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextPiece) + } + + // @@protoc_insertion_point(class_scope:TextPiece) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<TextPiece> + PARSER = new com.google.protobuf.AbstractParser<TextPiece>() { + @java.lang.Override + public TextPiece parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<TextPiece> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<TextPiece> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceOuterClass.TextPiece getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextPiece_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextPiece_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\017TextPiece.proto\032\020TextFormat.proto\032\024Tex" + + "tPieceImage.proto\032\031TextPiecePatternRef.p" + + "roto\032\024TextPieceHeart.proto\032\023TextPieceGif" + + "t.proto\032\023TextPieceUser.proto\"\221\002\n\tTextPie" + + "ce\022\014\n\004type\030\001 \001(\010\022\033\n\006format\030\002 \001(\0132\013.TextF" + + "ormat\022\024\n\014string_value\030\003 \001(\t\022\"\n\nuser_valu" + + "e\030\004 \001(\0132\016.TextPieceUser\022\"\n\ngift_value\030\005 " + + "\001(\0132\016.TextPieceGift\022$\n\013heart_value\030\006 \001(\013" + + "2\017.TextPieceHeart\022/\n\021pattern_ref_value\030\007" + + " \001(\0132\024.TextPiecePatternRef\022$\n\013image_valu" + + "e\030\010 \001(\0132\017.TextPieceImageB8\n6tech.ordinar" + + "yroad.live.chat.client.douyin.protobuf.d" + + "tob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.getDescriptor(), + }); + internal_static_TextPiece_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_TextPiece_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_TextPiece_descriptor, + new java.lang.String[] { "Type", "Format", "StringValue", "UserValue", "GiftValue", "HeartValue", "PatternRefValue", "ImageValue", }); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextFormatOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceImageOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceHeartOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceGiftOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPiecePatternRefOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPiecePatternRefOuterClass.java new file mode 100644 index 0000000..1a928e5 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPiecePatternRefOuterClass.java @@ -0,0 +1,773 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: TextPiecePatternRef.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class TextPiecePatternRefOuterClass { + private TextPiecePatternRefOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface TextPiecePatternRefOrBuilder extends + // @@protoc_insertion_point(interface_extends:TextPiecePatternRef) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string key = 1;</code> + * @return The key. + */ + java.lang.String getKey(); + /** + * <code>string key = 1;</code> + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + * <code>string default_pattern = 2;</code> + * @return The defaultPattern. + */ + java.lang.String getDefaultPattern(); + /** + * <code>string default_pattern = 2;</code> + * @return The bytes for defaultPattern. + */ + com.google.protobuf.ByteString + getDefaultPatternBytes(); + } + /** + * Protobuf type {@code TextPiecePatternRef} + */ + public static final class TextPiecePatternRef extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextPiecePatternRef) + TextPiecePatternRefOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextPiecePatternRef.newBuilder() to construct. + private TextPiecePatternRef(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private TextPiecePatternRef() { + key_ = ""; + defaultPattern_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextPiecePatternRef(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.internal_static_TextPiecePatternRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.internal_static_TextPiecePatternRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; + /** + * <code>string key = 1;</code> + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } + } + /** + * <code>string key = 1;</code> + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEFAULT_PATTERN_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object defaultPattern_ = ""; + /** + * <code>string default_pattern = 2;</code> + * @return The defaultPattern. + */ + @java.lang.Override + public java.lang.String getDefaultPattern() { + java.lang.Object ref = defaultPattern_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultPattern_ = s; + return s; + } + } + /** + * <code>string default_pattern = 2;</code> + * @return The bytes for defaultPattern. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDefaultPatternBytes() { + java.lang.Object ref = defaultPattern_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + defaultPattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultPattern_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, defaultPattern_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultPattern_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, defaultPattern_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (!getDefaultPattern() + .equals(other.getDefaultPattern())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + DEFAULT_PATTERN_FIELD_NUMBER; + hash = (53 * hash) + getDefaultPattern().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code TextPiecePatternRef} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:TextPiecePatternRef) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.internal_static_TextPiecePatternRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.internal_static_TextPiecePatternRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + key_ = ""; + defaultPattern_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.internal_static_TextPiecePatternRef_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.defaultPattern_ = defaultPattern_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDefaultPattern().isEmpty()) { + defaultPattern_ = other.defaultPattern_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + defaultPattern_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * <code>string key = 1;</code> + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string key = 1;</code> + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string key = 1;</code> + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string key = 1;</code> + * @return This builder for chaining. + */ + public Builder clearKey() { + key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string key = 1;</code> + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + key_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object defaultPattern_ = ""; + /** + * <code>string default_pattern = 2;</code> + * @return The defaultPattern. + */ + public java.lang.String getDefaultPattern() { + java.lang.Object ref = defaultPattern_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + defaultPattern_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string default_pattern = 2;</code> + * @return The bytes for defaultPattern. + */ + public com.google.protobuf.ByteString + getDefaultPatternBytes() { + java.lang.Object ref = defaultPattern_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + defaultPattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string default_pattern = 2;</code> + * @param value The defaultPattern to set. + * @return This builder for chaining. + */ + public Builder setDefaultPattern( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + defaultPattern_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string default_pattern = 2;</code> + * @return This builder for chaining. + */ + public Builder clearDefaultPattern() { + defaultPattern_ = getDefaultInstance().getDefaultPattern(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string default_pattern = 2;</code> + * @param value The bytes for defaultPattern to set. + * @return This builder for chaining. + */ + public Builder setDefaultPatternBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + defaultPattern_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextPiecePatternRef) + } + + // @@protoc_insertion_point(class_scope:TextPiecePatternRef) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<TextPiecePatternRef> + PARSER = new com.google.protobuf.AbstractParser<TextPiecePatternRef>() { + @java.lang.Override + public TextPiecePatternRef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<TextPiecePatternRef> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<TextPiecePatternRef> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPiecePatternRefOuterClass.TextPiecePatternRef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextPiecePatternRef_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextPiecePatternRef_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031TextPiecePatternRef.proto\";\n\023TextPiece" + + "PatternRef\022\013\n\003key\030\001 \001(\t\022\027\n\017default_patte" + + "rn\030\002 \001(\tB8\n6tech.ordinaryroad.live.chat." + + "client.douyin.protobuf.dtob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_TextPiecePatternRef_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_TextPiecePatternRef_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_TextPiecePatternRef_descriptor, + new java.lang.String[] { "Key", "DefaultPattern", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceUserOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceUserOuterClass.java new file mode 100644 index 0000000..2d0fc47 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/TextPieceUserOuterClass.java @@ -0,0 +1,748 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: TextPieceUser.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class TextPieceUserOuterClass { + private TextPieceUserOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface TextPieceUserOrBuilder extends + // @@protoc_insertion_point(interface_extends:TextPieceUser) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.User user = 1;</code> + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * <code>.User user = 1;</code> + * @return The user. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser(); + /** + * <code>.User user = 1;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder(); + + /** + * <code>bool with_colon = 2;</code> + * @return The withColon. + */ + boolean getWithColon(); + } + /** + * Protobuf type {@code TextPieceUser} + */ + public static final class TextPieceUser extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:TextPieceUser) + TextPieceUserOrBuilder { + private static final long serialVersionUID = 0L; + // Use TextPieceUser.newBuilder() to construct. + private TextPieceUser(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private TextPieceUser() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TextPieceUser(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.internal_static_TextPieceUser_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.internal_static_TextPieceUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.Builder.class); + } + + public static final int USER_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User user_; + /** + * <code>.User user = 1;</code> + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return user_ != null; + } + /** + * <code>.User user = 1;</code> + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + /** + * <code>.User user = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + + public static final int WITH_COLON_FIELD_NUMBER = 2; + private boolean withColon_ = false; + /** + * <code>bool with_colon = 2;</code> + * @return The withColon. + */ + @java.lang.Override + public boolean getWithColon() { + return withColon_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (user_ != null) { + output.writeMessage(1, getUser()); + } + if (withColon_ != false) { + output.writeBool(2, withColon_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (user_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUser()); + } + if (withColon_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, withColon_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser) obj; + + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getWithColon() + != other.getWithColon()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + WITH_COLON_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithColon()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code TextPieceUser} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:TextPieceUser) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUserOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.internal_static_TextPieceUser_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.internal_static_TextPieceUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + withColon_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.internal_static_TextPieceUser_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.withColon_ = withColon_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser.getDefaultInstance()) return this; + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getWithColon() != false) { + setWithColon(other.getWithColon()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + withColon_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> userBuilder_; + /** + * <code>.User user = 1;</code> + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.User user = 1;</code> + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * <code>.User user = 1;</code> + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.User user = 1;</code> + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.User user = 1;</code> + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.User user = 1;</code> + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000001); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User user = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder getUserBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * <code>.User user = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance() : user_; + } + } + /** + * <code>.User user = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private boolean withColon_ ; + /** + * <code>bool with_colon = 2;</code> + * @return The withColon. + */ + @java.lang.Override + public boolean getWithColon() { + return withColon_; + } + /** + * <code>bool with_colon = 2;</code> + * @param value The withColon to set. + * @return This builder for chaining. + */ + public Builder setWithColon(boolean value) { + + withColon_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>bool with_colon = 2;</code> + * @return This builder for chaining. + */ + public Builder clearWithColon() { + bitField0_ = (bitField0_ & ~0x00000002); + withColon_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:TextPieceUser) + } + + // @@protoc_insertion_point(class_scope:TextPieceUser) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<TextPieceUser> + PARSER = new com.google.protobuf.AbstractParser<TextPieceUser>() { + @java.lang.Override + public TextPieceUser parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<TextPieceUser> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<TextPieceUser> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.TextPieceUserOuterClass.TextPieceUser getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_TextPieceUser_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_TextPieceUser_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\023TextPieceUser.proto\032\nUser.proto\"8\n\rTex" + + "tPieceUser\022\023\n\004user\030\001 \001(\0132\005.User\022\022\n\nwith_" + + "colon\030\002 \001(\010B8\n6tech.ordinaryroad.live.ch" + + "at.client.douyin.protobuf.dtob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor(), + }); + internal_static_TextPieceUser_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_TextPieceUser_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_TextPieceUser_descriptor, + new java.lang.String[] { "User", "WithColon", }); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/UserOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/UserOuterClass.java new file mode 100644 index 0000000..e8d3b53 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/java/tech/ordinaryroad/live/chat/client/douyin/protobuf/dto/UserOuterClass.java @@ -0,0 +1,33138 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: User.proto + +package tech.ordinaryroad.live.chat.client.douyin.protobuf.dto; + +public final class UserOuterClass { + private UserOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface UserOrBuilder extends + // @@protoc_insertion_point(interface_extends:User) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 id = 1;</code> + * @return The id. + */ + long getId(); + + /** + * <code>uint64 shortId = 2;</code> + * @return The shortId. + */ + long getShortId(); + + /** + * <code>string nickname = 3;</code> + * @return The nickname. + */ + java.lang.String getNickname(); + /** + * <code>string nickname = 3;</code> + * @return The bytes for nickname. + */ + com.google.protobuf.ByteString + getNicknameBytes(); + + /** + * <code>uint32 gender = 4;</code> + * @return The gender. + */ + int getGender(); + + /** + * <code>string signature = 5;</code> + * @return The signature. + */ + java.lang.String getSignature(); + /** + * <code>string signature = 5;</code> + * @return The bytes for signature. + */ + com.google.protobuf.ByteString + getSignatureBytes(); + + /** + * <code>uint32 level = 6;</code> + * @return The level. + */ + int getLevel(); + + /** + * <code>uint64 birthday = 7;</code> + * @return The birthday. + */ + long getBirthday(); + + /** + * <code>string telephone = 8;</code> + * @return The telephone. + */ + java.lang.String getTelephone(); + /** + * <code>string telephone = 8;</code> + * @return The bytes for telephone. + */ + com.google.protobuf.ByteString + getTelephoneBytes(); + + /** + * <code>.Image avatarThumb = 9;</code> + * @return Whether the avatarThumb field is set. + */ + boolean hasAvatarThumb(); + /** + * <code>.Image avatarThumb = 9;</code> + * @return The avatarThumb. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getAvatarThumb(); + /** + * <code>.Image avatarThumb = 9;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarThumbOrBuilder(); + + /** + * <code>.Image avatarMedium = 10;</code> + * @return Whether the avatarMedium field is set. + */ + boolean hasAvatarMedium(); + /** + * <code>.Image avatarMedium = 10;</code> + * @return The avatarMedium. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getAvatarMedium(); + /** + * <code>.Image avatarMedium = 10;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarMediumOrBuilder(); + + /** + * <code>.Image avatarLarge = 11;</code> + * @return Whether the avatarLarge field is set. + */ + boolean hasAvatarLarge(); + /** + * <code>.Image avatarLarge = 11;</code> + * @return The avatarLarge. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getAvatarLarge(); + /** + * <code>.Image avatarLarge = 11;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarLargeOrBuilder(); + + /** + * <code>bool verified = 12;</code> + * @return The verified. + */ + boolean getVerified(); + + /** + * <code>int32 experience = 13;</code> + * @return The experience. + */ + int getExperience(); + + /** + * <code>string city = 14;</code> + * @return The city. + */ + java.lang.String getCity(); + /** + * <code>string city = 14;</code> + * @return The bytes for city. + */ + com.google.protobuf.ByteString + getCityBytes(); + + /** + * <code>int32 status = 15;</code> + * @return The status. + */ + int getStatus(); + + /** + * <code>int64 createTime = 16;</code> + * @return The createTime. + */ + long getCreateTime(); + + /** + * <code>int64 modifyTime = 17;</code> + * @return The modifyTime. + */ + long getModifyTime(); + + /** + * <code>int32 secret = 18;</code> + * @return The secret. + */ + int getSecret(); + + /** + * <code>string shareQrcodeUri = 19;</code> + * @return The shareQrcodeUri. + */ + java.lang.String getShareQrcodeUri(); + /** + * <code>string shareQrcodeUri = 19;</code> + * @return The bytes for shareQrcodeUri. + */ + com.google.protobuf.ByteString + getShareQrcodeUriBytes(); + + /** + * <code>int32 incomeSharePercent = 20;</code> + * @return The incomeSharePercent. + */ + int getIncomeSharePercent(); + + /** + * <code>.Image badgeImageListList = 21;</code> + * @return Whether the badgeImageListList field is set. + */ + boolean hasBadgeImageListList(); + /** + * <code>.Image badgeImageListList = 21;</code> + * @return The badgeImageListList. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBadgeImageListList(); + /** + * <code>.Image badgeImageListList = 21;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBadgeImageListListOrBuilder(); + + /** + * <code>.User.FollowInfo followInfo = 22;</code> + * @return Whether the followInfo field is set. + */ + boolean hasFollowInfo(); + /** + * <code>.User.FollowInfo followInfo = 22;</code> + * @return The followInfo. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo getFollowInfo(); + /** + * <code>.User.FollowInfo followInfo = 22;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfoOrBuilder getFollowInfoOrBuilder(); + + /** + * <code>.User.PayGrade payGrade = 23;</code> + * @return Whether the payGrade field is set. + */ + boolean hasPayGrade(); + /** + * <code>.User.PayGrade payGrade = 23;</code> + * @return The payGrade. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade getPayGrade(); + /** + * <code>.User.PayGrade payGrade = 23;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGradeOrBuilder getPayGradeOrBuilder(); + + /** + * <code>.User.FansClub fansClub = 24;</code> + * @return Whether the fansClub field is set. + */ + boolean hasFansClub(); + /** + * <code>.User.FansClub fansClub = 24;</code> + * @return The fansClub. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub getFansClub(); + /** + * <code>.User.FansClub fansClub = 24;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClubOrBuilder getFansClubOrBuilder(); + + /** + * <code>.User.Border border = 25;</code> + * @return Whether the border field is set. + */ + boolean hasBorder(); + /** + * <code>.User.Border border = 25;</code> + * @return The border. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border getBorder(); + /** + * <code>.User.Border border = 25;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BorderOrBuilder getBorderOrBuilder(); + + /** + * <code>string specialId = 26;</code> + * @return The specialId. + */ + java.lang.String getSpecialId(); + /** + * <code>string specialId = 26;</code> + * @return The bytes for specialId. + */ + com.google.protobuf.ByteString + getSpecialIdBytes(); + + /** + * <code>.Image avatarBorder = 27;</code> + * @return Whether the avatarBorder field is set. + */ + boolean hasAvatarBorder(); + /** + * <code>.Image avatarBorder = 27;</code> + * @return The avatarBorder. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getAvatarBorder(); + /** + * <code>.Image avatarBorder = 27;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarBorderOrBuilder(); + + /** + * <code>.Image medal = 28;</code> + * @return Whether the medal field is set. + */ + boolean hasMedal(); + /** + * <code>.Image medal = 28;</code> + * @return The medal. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getMedal(); + /** + * <code>.Image medal = 28;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getMedalOrBuilder(); + + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> + getRealTimeIconsListList(); + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getRealTimeIconsList(int index); + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + int getRealTimeIconsListCount(); + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getRealTimeIconsListOrBuilderList(); + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getRealTimeIconsListOrBuilder( + int index); + + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> + getNewRealTimeIconsListList(); + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getNewRealTimeIconsList(int index); + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + int getNewRealTimeIconsListCount(); + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getNewRealTimeIconsListOrBuilderList(); + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewRealTimeIconsListOrBuilder( + int index); + + /** + * <code>int64 topVipNo = 31;</code> + * @return The topVipNo. + */ + long getTopVipNo(); + + /** + * <code>.User.UserAttr userAttr = 32;</code> + * @return Whether the userAttr field is set. + */ + boolean hasUserAttr(); + /** + * <code>.User.UserAttr userAttr = 32;</code> + * @return The userAttr. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr getUserAttr(); + /** + * <code>.User.UserAttr userAttr = 32;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttrOrBuilder getUserAttrOrBuilder(); + + /** + * <code>.User.OwnRoom ownRoom = 33;</code> + * @return Whether the ownRoom field is set. + */ + boolean hasOwnRoom(); + /** + * <code>.User.OwnRoom ownRoom = 33;</code> + * @return The ownRoom. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom getOwnRoom(); + /** + * <code>.User.OwnRoom ownRoom = 33;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoomOrBuilder getOwnRoomOrBuilder(); + + /** + * <code>int64 payScore = 34;</code> + * @return The payScore. + */ + long getPayScore(); + + /** + * <code>int64 ticketCount = 35;</code> + * @return The ticketCount. + */ + long getTicketCount(); + + /** + * <code>.User.AnchorInfo anchorInfo = 36;</code> + * @return Whether the anchorInfo field is set. + */ + boolean hasAnchorInfo(); + /** + * <code>.User.AnchorInfo anchorInfo = 36;</code> + * @return The anchorInfo. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo getAnchorInfo(); + /** + * <code>.User.AnchorInfo anchorInfo = 36;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfoOrBuilder getAnchorInfoOrBuilder(); + + /** + * <code>int32 linkMicStats = 37;</code> + * @return The linkMicStats. + */ + int getLinkMicStats(); + + /** + * <code>string displayId = 38;</code> + * @return The displayId. + */ + java.lang.String getDisplayId(); + /** + * <code>string displayId = 38;</code> + * @return The bytes for displayId. + */ + com.google.protobuf.ByteString + getDisplayIdBytes(); + + /** + * <code>bool withCommercePermission = 39;</code> + * @return The withCommercePermission. + */ + boolean getWithCommercePermission(); + + /** + * <code>bool withFusionShopEntry = 40;</code> + * @return The withFusionShopEntry. + */ + boolean getWithFusionShopEntry(); + + /** + * <code>int64 totalRechargeDiamondCount = 41;</code> + * @return The totalRechargeDiamondCount. + */ + long getTotalRechargeDiamondCount(); + + /** + * <code>.User.AnchorLevel webcastAnchorLevel = 42;</code> + * @return Whether the webcastAnchorLevel field is set. + */ + boolean hasWebcastAnchorLevel(); + /** + * <code>.User.AnchorLevel webcastAnchorLevel = 42;</code> + * @return The webcastAnchorLevel. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getWebcastAnchorLevel(); + /** + * <code>.User.AnchorLevel webcastAnchorLevel = 42;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder getWebcastAnchorLevelOrBuilder(); + + /** + * <code>string verifiedContent = 43;</code> + * @return The verifiedContent. + */ + java.lang.String getVerifiedContent(); + /** + * <code>string verifiedContent = 43;</code> + * @return The bytes for verifiedContent. + */ + com.google.protobuf.ByteString + getVerifiedContentBytes(); + + /** + * <code>.User.AuthorStats authorStats = 44;</code> + * @return Whether the authorStats field is set. + */ + boolean hasAuthorStats(); + /** + * <code>.User.AuthorStats authorStats = 44;</code> + * @return The authorStats. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats getAuthorStats(); + /** + * <code>.User.AuthorStats authorStats = 44;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStatsOrBuilder getAuthorStatsOrBuilder(); + + /** + * <code>repeated .User topFansList = 45;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User> + getTopFansListList(); + /** + * <code>repeated .User topFansList = 45;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getTopFansList(int index); + /** + * <code>repeated .User topFansList = 45;</code> + */ + int getTopFansListCount(); + /** + * <code>repeated .User topFansList = 45;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getTopFansListOrBuilderList(); + /** + * <code>repeated .User topFansList = 45;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getTopFansListOrBuilder( + int index); + + /** + * <code>string secUid = 46;</code> + * @return The secUid. + */ + java.lang.String getSecUid(); + /** + * <code>string secUid = 46;</code> + * @return The bytes for secUid. + */ + com.google.protobuf.ByteString + getSecUidBytes(); + + /** + * <code>int32 userRole = 47;</code> + * @return The userRole. + */ + int getUserRole(); + + /** + * <code>.User.XiguaParams xiguaInfo = 48;</code> + * @return Whether the xiguaInfo field is set. + */ + boolean hasXiguaInfo(); + /** + * <code>.User.XiguaParams xiguaInfo = 48;</code> + * @return The xiguaInfo. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams getXiguaInfo(); + /** + * <code>.User.XiguaParams xiguaInfo = 48;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParamsOrBuilder getXiguaInfoOrBuilder(); + + /** + * <code>.User.ActivityInfo activityReward = 49;</code> + * @return Whether the activityReward field is set. + */ + boolean hasActivityReward(); + /** + * <code>.User.ActivityInfo activityReward = 49;</code> + * @return The activityReward. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo getActivityReward(); + /** + * <code>.User.ActivityInfo activityReward = 49;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfoOrBuilder getActivityRewardOrBuilder(); + + /** + * <code>.User.NobleLevelInfo nobleInfo = 50;</code> + * @return Whether the nobleInfo field is set. + */ + boolean hasNobleInfo(); + /** + * <code>.User.NobleLevelInfo nobleInfo = 50;</code> + * @return The nobleInfo. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo getNobleInfo(); + /** + * <code>.User.NobleLevelInfo nobleInfo = 50;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfoOrBuilder getNobleInfoOrBuilder(); + + /** + * <code>.User.BrotherhoodInfo brotherhoodInfo = 51;</code> + * @return Whether the brotherhoodInfo field is set. + */ + boolean hasBrotherhoodInfo(); + /** + * <code>.User.BrotherhoodInfo brotherhoodInfo = 51;</code> + * @return The brotherhoodInfo. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo getBrotherhoodInfo(); + /** + * <code>.User.BrotherhoodInfo brotherhoodInfo = 51;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfoOrBuilder getBrotherhoodInfoOrBuilder(); + + /** + * <code>.Image personalCard = 52;</code> + * @return Whether the personalCard field is set. + */ + boolean hasPersonalCard(); + /** + * <code>.Image personalCard = 52;</code> + * @return The personalCard. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getPersonalCard(); + /** + * <code>.Image personalCard = 52;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getPersonalCardOrBuilder(); + + /** + * <code>.User.AuthenticationInfo authenticationInfo = 53;</code> + * @return Whether the authenticationInfo field is set. + */ + boolean hasAuthenticationInfo(); + /** + * <code>.User.AuthenticationInfo authenticationInfo = 53;</code> + * @return The authenticationInfo. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo getAuthenticationInfo(); + /** + * <code>.User.AuthenticationInfo authenticationInfo = 53;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfoOrBuilder getAuthenticationInfoOrBuilder(); + + /** + * <code>int32 authorizationInfo = 54;</code> + * @return The authorizationInfo. + */ + int getAuthorizationInfo(); + + /** + * <code>int32 adversaryAuthorizationInfo = 55;</code> + * @return The adversaryAuthorizationInfo. + */ + int getAdversaryAuthorizationInfo(); + + /** + * <code>.User.PoiInfo poiInfo = 56;</code> + * @return Whether the poiInfo field is set. + */ + boolean hasPoiInfo(); + /** + * <code>.User.PoiInfo poiInfo = 56;</code> + * @return The poiInfo. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo getPoiInfo(); + /** + * <code>.User.PoiInfo poiInfo = 56;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfoOrBuilder getPoiInfoOrBuilder(); + + /** + * <code>.Image mediaBadgeImageListList = 57;</code> + * @return Whether the mediaBadgeImageListList field is set. + */ + boolean hasMediaBadgeImageListList(); + /** + * <code>.Image mediaBadgeImageListList = 57;</code> + * @return The mediaBadgeImageListList. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getMediaBadgeImageListList(); + /** + * <code>.Image mediaBadgeImageListList = 57;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getMediaBadgeImageListListOrBuilder(); + + /** + * <code>int32 adversaryUserStatus = 58;</code> + * @return The adversaryUserStatus. + */ + int getAdversaryUserStatus(); + + /** + * <code>.User.UserVIPInfo userVipInfo = 59;</code> + * @return Whether the userVipInfo field is set. + */ + boolean hasUserVipInfo(); + /** + * <code>.User.UserVIPInfo userVipInfo = 59;</code> + * @return The userVipInfo. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo getUserVipInfo(); + /** + * <code>.User.UserVIPInfo userVipInfo = 59;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfoOrBuilder getUserVipInfoOrBuilder(); + + /** + * <code>repeated int64 commerceWebcastConfigIdsList = 60;</code> + * @return A list containing the commerceWebcastConfigIdsList. + */ + java.util.List<java.lang.Long> getCommerceWebcastConfigIdsListList(); + /** + * <code>repeated int64 commerceWebcastConfigIdsList = 60;</code> + * @return The count of commerceWebcastConfigIdsList. + */ + int getCommerceWebcastConfigIdsListCount(); + /** + * <code>repeated int64 commerceWebcastConfigIdsList = 60;</code> + * @param index The index of the element to return. + * @return The commerceWebcastConfigIdsList at the given index. + */ + long getCommerceWebcastConfigIdsList(int index); + + /** + * <code>.Image badgeImageListV2List = 61;</code> + * @return Whether the badgeImageListV2List field is set. + */ + boolean hasBadgeImageListV2List(); + /** + * <code>.Image badgeImageListV2List = 61;</code> + * @return The badgeImageListV2List. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBadgeImageListV2List(); + /** + * <code>.Image badgeImageListV2List = 61;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBadgeImageListV2ListOrBuilder(); + + /** + * <pre> + * IndustryCertification industryCertification = 62; + * </pre> + * + * <code>string locationCity = 63;</code> + * @return The locationCity. + */ + java.lang.String getLocationCity(); + /** + * <pre> + * IndustryCertification industryCertification = 62; + * </pre> + * + * <code>string locationCity = 63;</code> + * @return The bytes for locationCity. + */ + com.google.protobuf.ByteString + getLocationCityBytes(); + + /** + * <code>.User.FansGroupInfo fansGroupInfo = 64;</code> + * @return Whether the fansGroupInfo field is set. + */ + boolean hasFansGroupInfo(); + /** + * <code>.User.FansGroupInfo fansGroupInfo = 64;</code> + * @return The fansGroupInfo. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo getFansGroupInfo(); + /** + * <code>.User.FansGroupInfo fansGroupInfo = 64;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfoOrBuilder getFansGroupInfoOrBuilder(); + + /** + * <code>string remarkName = 65;</code> + * @return The remarkName. + */ + java.lang.String getRemarkName(); + /** + * <code>string remarkName = 65;</code> + * @return The bytes for remarkName. + */ + com.google.protobuf.ByteString + getRemarkNameBytes(); + + /** + * <code>int32 mysteryMan = 66;</code> + * @return The mysteryMan. + */ + int getMysteryMan(); + + /** + * <code>string webRid = 67;</code> + * @return The webRid. + */ + java.lang.String getWebRid(); + /** + * <code>string webRid = 67;</code> + * @return The bytes for webRid. + */ + com.google.protobuf.ByteString + getWebRidBytes(); + + /** + * <code>string desensitizedNickname = 68;</code> + * @return The desensitizedNickname. + */ + java.lang.String getDesensitizedNickname(); + /** + * <code>string desensitizedNickname = 68;</code> + * @return The bytes for desensitizedNickname. + */ + com.google.protobuf.ByteString + getDesensitizedNicknameBytes(); + + /** + * <code>.User.JAccreditInfo jAccreditInfo = 69;</code> + * @return Whether the jAccreditInfo field is set. + */ + boolean hasJAccreditInfo(); + /** + * <code>.User.JAccreditInfo jAccreditInfo = 69;</code> + * @return The jAccreditInfo. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo getJAccreditInfo(); + /** + * <code>.User.JAccreditInfo jAccreditInfo = 69;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfoOrBuilder getJAccreditInfoOrBuilder(); + + /** + * <code>.User.Subscribe subscribe = 70;</code> + * @return Whether the subscribe field is set. + */ + boolean hasSubscribe(); + /** + * <code>.User.Subscribe subscribe = 70;</code> + * @return The subscribe. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe getSubscribe(); + /** + * <code>.User.Subscribe subscribe = 70;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.SubscribeOrBuilder getSubscribeOrBuilder(); + + /** + * <code>bool isAnonymous = 71;</code> + * @return The isAnonymous. + */ + boolean getIsAnonymous(); + + /** + * <code>int32 consumeDiamondLevel = 72;</code> + * @return The consumeDiamondLevel. + */ + int getConsumeDiamondLevel(); + + /** + * <code>string webcastUid = 73;</code> + * @return The webcastUid. + */ + java.lang.String getWebcastUid(); + /** + * <code>string webcastUid = 73;</code> + * @return The bytes for webcastUid. + */ + com.google.protobuf.ByteString + getWebcastUidBytes(); + + /** + * <code>.User.ProfileStyleParams profileStyleParams = 74;</code> + * @return Whether the profileStyleParams field is set. + */ + boolean hasProfileStyleParams(); + /** + * <code>.User.ProfileStyleParams profileStyleParams = 74;</code> + * @return The profileStyleParams. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams getProfileStyleParams(); + /** + * <code>.User.ProfileStyleParams profileStyleParams = 74;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParamsOrBuilder getProfileStyleParamsOrBuilder(); + + /** + * <code>.User.UserDressInfo userDressInfo = 75;</code> + * @return Whether the userDressInfo field is set. + */ + boolean hasUserDressInfo(); + /** + * <code>.User.UserDressInfo userDressInfo = 75;</code> + * @return The userDressInfo. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo getUserDressInfo(); + /** + * <code>.User.UserDressInfo userDressInfo = 75;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfoOrBuilder getUserDressInfoOrBuilder(); + + /** + * <code>bool allowBeLocated = 1001;</code> + * @return The allowBeLocated. + */ + boolean getAllowBeLocated(); + + /** + * <code>bool allowFindByContacts = 1002;</code> + * @return The allowFindByContacts. + */ + boolean getAllowFindByContacts(); + + /** + * <code>bool allowOthersDownloadVideo = 1003;</code> + * @return The allowOthersDownloadVideo. + */ + boolean getAllowOthersDownloadVideo(); + + /** + * <code>bool allowOthersDownloadWhenSharingVideo = 1004;</code> + * @return The allowOthersDownloadWhenSharingVideo. + */ + boolean getAllowOthersDownloadWhenSharingVideo(); + + /** + * <code>bool allowShareShowProfile = 1005;</code> + * @return The allowShareShowProfile. + */ + boolean getAllowShareShowProfile(); + + /** + * <code>bool allowShowInGossip = 1006;</code> + * @return The allowShowInGossip. + */ + boolean getAllowShowInGossip(); + + /** + * <code>bool allowShowMyAction = 1007;</code> + * @return The allowShowMyAction. + */ + boolean getAllowShowMyAction(); + + /** + * <code>bool allowStrangeComment = 1008;</code> + * @return The allowStrangeComment. + */ + boolean getAllowStrangeComment(); + + /** + * <code>bool allowUnfollowerComment = 1009;</code> + * @return The allowUnfollowerComment. + */ + boolean getAllowUnfollowerComment(); + + /** + * <code>bool allowUseLinkmic = 1010;</code> + * @return The allowUseLinkmic. + */ + boolean getAllowUseLinkmic(); + + /** + * <code>.User.AnchorLevel anchorLevel = 1011;</code> + * @return Whether the anchorLevel field is set. + */ + boolean hasAnchorLevel(); + /** + * <code>.User.AnchorLevel anchorLevel = 1011;</code> + * @return The anchorLevel. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getAnchorLevel(); + /** + * <code>.User.AnchorLevel anchorLevel = 1011;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder getAnchorLevelOrBuilder(); + + /** + * <code>.Image avatarJpg = 1012;</code> + * @return Whether the avatarJpg field is set. + */ + boolean hasAvatarJpg(); + /** + * <code>.Image avatarJpg = 1012;</code> + * @return The avatarJpg. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getAvatarJpg(); + /** + * <code>.Image avatarJpg = 1012;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarJpgOrBuilder(); + + /** + * <code>string bgImgUrl = 1013;</code> + * @return The bgImgUrl. + */ + java.lang.String getBgImgUrl(); + /** + * <code>string bgImgUrl = 1013;</code> + * @return The bytes for bgImgUrl. + */ + com.google.protobuf.ByteString + getBgImgUrlBytes(); + + /** + * <code>string birthdayDescription = 1014;</code> + * @return The birthdayDescription. + */ + java.lang.String getBirthdayDescription(); + /** + * <code>string birthdayDescription = 1014;</code> + * @return The bytes for birthdayDescription. + */ + com.google.protobuf.ByteString + getBirthdayDescriptionBytes(); + + /** + * <code>bool birthdayValid = 1015;</code> + * @return The birthdayValid. + */ + boolean getBirthdayValid(); + + /** + * <code>int32 blockStatus = 1016;</code> + * @return The blockStatus. + */ + int getBlockStatus(); + + /** + * <code>int32 commentRestrict = 1017;</code> + * @return The commentRestrict. + */ + int getCommentRestrict(); + + /** + * <code>string constellation = 1018;</code> + * @return The constellation. + */ + java.lang.String getConstellation(); + /** + * <code>string constellation = 1018;</code> + * @return The bytes for constellation. + */ + com.google.protobuf.ByteString + getConstellationBytes(); + + /** + * <code>int32 disableIchat = 1019;</code> + * @return The disableIchat. + */ + int getDisableIchat(); + + /** + * <code>int64 enableIchatImg = 1020;</code> + * @return The enableIchatImg. + */ + long getEnableIchatImg(); + + /** + * <code>int32 exp = 1021;</code> + * @return The exp. + */ + int getExp(); + + /** + * <code>int64 fanTicketCount = 1022;</code> + * @return The fanTicketCount. + */ + long getFanTicketCount(); + + /** + * <code>bool foldStrangerChat = 1023;</code> + * @return The foldStrangerChat. + */ + boolean getFoldStrangerChat(); + + /** + * <code>int64 followStatus = 1024;</code> + * @return The followStatus. + */ + long getFollowStatus(); + + /** + * <code>bool hotsoonVerified = 1025;</code> + * @return The hotsoonVerified. + */ + boolean getHotsoonVerified(); + + /** + * <code>string hotsoonVerifiedReason = 1026;</code> + * @return The hotsoonVerifiedReason. + */ + java.lang.String getHotsoonVerifiedReason(); + /** + * <code>string hotsoonVerifiedReason = 1026;</code> + * @return The bytes for hotsoonVerifiedReason. + */ + com.google.protobuf.ByteString + getHotsoonVerifiedReasonBytes(); + + /** + * <code>int32 ichatRestrictType = 1027;</code> + * @return The ichatRestrictType. + */ + int getIchatRestrictType(); + + /** + * <code>string idStr = 1028;</code> + * @return The idStr. + */ + java.lang.String getIdStr(); + /** + * <code>string idStr = 1028;</code> + * @return The bytes for idStr. + */ + com.google.protobuf.ByteString + getIdStrBytes(); + + /** + * <code>bool isFollower = 1029;</code> + * @return The isFollower. + */ + boolean getIsFollower(); + + /** + * <code>bool isFollowing = 1030;</code> + * @return The isFollowing. + */ + boolean getIsFollowing(); + + /** + * <code>bool needProfileGuide = 1031;</code> + * @return The needProfileGuide. + */ + boolean getNeedProfileGuide(); + + /** + * <code>int64 payScores = 1032;</code> + * @return The payScores. + */ + long getPayScores(); + + /** + * <code>bool pushCommentStatus = 1033;</code> + * @return The pushCommentStatus. + */ + boolean getPushCommentStatus(); + + /** + * <code>bool pushDigg = 1034;</code> + * @return The pushDigg. + */ + boolean getPushDigg(); + + /** + * <code>bool pushFollow = 1035;</code> + * @return The pushFollow. + */ + boolean getPushFollow(); + + /** + * <code>bool pushFriendAction = 1036;</code> + * @return The pushFriendAction. + */ + boolean getPushFriendAction(); + + /** + * <code>bool pushIchat = 1037;</code> + * @return The pushIchat. + */ + boolean getPushIchat(); + + /** + * <code>bool pushStatus = 1038;</code> + * @return The pushStatus. + */ + boolean getPushStatus(); + + /** + * <code>bool pushVideoPost = 1039;</code> + * @return The pushVideoPost. + */ + boolean getPushVideoPost(); + + /** + * <code>bool pushVideoRecommend = 1040;</code> + * @return The pushVideoRecommend. + */ + boolean getPushVideoRecommend(); + + /** + * <code>.User.UserStats stats = 1041;</code> + * @return Whether the stats field is set. + */ + boolean hasStats(); + /** + * <code>.User.UserStats stats = 1041;</code> + * @return The stats. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats getStats(); + /** + * <code>.User.UserStats stats = 1041;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStatsOrBuilder getStatsOrBuilder(); + + /** + * <code>bool verifiedMobile = 1042;</code> + * @return The verifiedMobile. + */ + boolean getVerifiedMobile(); + + /** + * <code>string verifiedReason = 1043;</code> + * @return The verifiedReason. + */ + java.lang.String getVerifiedReason(); + /** + * <code>string verifiedReason = 1043;</code> + * @return The bytes for verifiedReason. + */ + com.google.protobuf.ByteString + getVerifiedReasonBytes(); + + /** + * <code>bool withCarManagementPermission = 1044;</code> + * @return The withCarManagementPermission. + */ + boolean getWithCarManagementPermission(); + + /** + * <code>int32 ageRange = 1045;</code> + * @return The ageRange. + */ + int getAgeRange(); + + /** + * <code>int64 watchDurationMonth = 1046;</code> + * @return The watchDurationMonth. + */ + long getWatchDurationMonth(); + } + /** + * Protobuf type {@code User} + */ + public static final class User extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User) + UserOrBuilder { + private static final long serialVersionUID = 0L; + // Use User.newBuilder() to construct. + private User(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private User() { + nickname_ = ""; + signature_ = ""; + telephone_ = ""; + city_ = ""; + shareQrcodeUri_ = ""; + specialId_ = ""; + realTimeIconsList_ = java.util.Collections.emptyList(); + newRealTimeIconsList_ = java.util.Collections.emptyList(); + displayId_ = ""; + verifiedContent_ = ""; + topFansList_ = java.util.Collections.emptyList(); + secUid_ = ""; + commerceWebcastConfigIdsList_ = emptyLongList(); + locationCity_ = ""; + remarkName_ = ""; + webRid_ = ""; + desensitizedNickname_ = ""; + webcastUid_ = ""; + bgImgUrl_ = ""; + birthdayDescription_ = ""; + constellation_ = ""; + hotsoonVerifiedReason_ = ""; + idStr_ = ""; + verifiedReason_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new User(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder.class); + } + + public interface ActivityInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.ActivityInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.ActivityInfo} + */ + public static final class ActivityInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.ActivityInfo) + ActivityInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ActivityInfo.newBuilder() to construct. + private ActivityInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private ActivityInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ActivityInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_ActivityInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_ActivityInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.ActivityInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.ActivityInfo) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_ActivityInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_ActivityInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_ActivityInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.ActivityInfo) + } + + // @@protoc_insertion_point(class_scope:User.ActivityInfo) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<ActivityInfo> + PARSER = new com.google.protobuf.AbstractParser<ActivityInfo>() { + @java.lang.Override + public ActivityInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<ActivityInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<ActivityInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AnchorInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.AnchorInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.AnchorInfo} + */ + public static final class AnchorInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.AnchorInfo) + AnchorInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnchorInfo.newBuilder() to construct. + private AnchorInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private AnchorInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnchorInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.AnchorInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.AnchorInfo) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.AnchorInfo) + } + + // @@protoc_insertion_point(class_scope:User.AnchorInfo) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<AnchorInfo> + PARSER = new com.google.protobuf.AbstractParser<AnchorInfo>() { + @java.lang.Override + public AnchorInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<AnchorInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<AnchorInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AnchorLevelOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.AnchorLevel) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.AnchorLevel} + */ + public static final class AnchorLevel extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.AnchorLevel) + AnchorLevelOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnchorLevel.newBuilder() to construct. + private AnchorLevel(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private AnchorLevel() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AnchorLevel(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorLevel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorLevel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.AnchorLevel} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.AnchorLevel) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorLevel_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorLevel_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AnchorLevel_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.AnchorLevel) + } + + // @@protoc_insertion_point(class_scope:User.AnchorLevel) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<AnchorLevel> + PARSER = new com.google.protobuf.AbstractParser<AnchorLevel>() { + @java.lang.Override + public AnchorLevel parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<AnchorLevel> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<AnchorLevel> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AuthenticationInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.AuthenticationInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.AuthenticationInfo} + */ + public static final class AuthenticationInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.AuthenticationInfo) + AuthenticationInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuthenticationInfo.newBuilder() to construct. + private AuthenticationInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private AuthenticationInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AuthenticationInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthenticationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthenticationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.AuthenticationInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.AuthenticationInfo) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthenticationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthenticationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthenticationInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.AuthenticationInfo) + } + + // @@protoc_insertion_point(class_scope:User.AuthenticationInfo) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<AuthenticationInfo> + PARSER = new com.google.protobuf.AbstractParser<AuthenticationInfo>() { + @java.lang.Override + public AuthenticationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<AuthenticationInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<AuthenticationInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AuthorStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.AuthorStats) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.AuthorStats} + */ + public static final class AuthorStats extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.AuthorStats) + AuthorStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuthorStats.newBuilder() to construct. + private AuthorStats(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private AuthorStats() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AuthorStats(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthorStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthorStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.AuthorStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.AuthorStats) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthorStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthorStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_AuthorStats_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.AuthorStats) + } + + // @@protoc_insertion_point(class_scope:User.AuthorStats) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<AuthorStats> + PARSER = new com.google.protobuf.AbstractParser<AuthorStats>() { + @java.lang.Override + public AuthorStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<AuthorStats> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<AuthorStats> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BorderOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.Border) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.Border} + */ + public static final class Border extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.Border) + BorderOrBuilder { + private static final long serialVersionUID = 0L; + // Use Border.newBuilder() to construct. + private Border(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private Border() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Border(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_Border_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_Border_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.Border} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.Border) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BorderOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_Border_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_Border_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_Border_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.Border) + } + + // @@protoc_insertion_point(class_scope:User.Border) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<Border> + PARSER = new com.google.protobuf.AbstractParser<Border>() { + @java.lang.Override + public Border parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<Border> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<Border> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BrotherhoodInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.BrotherhoodInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.BrotherhoodInfo} + */ + public static final class BrotherhoodInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.BrotherhoodInfo) + BrotherhoodInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use BrotherhoodInfo.newBuilder() to construct. + private BrotherhoodInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private BrotherhoodInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BrotherhoodInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_BrotherhoodInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_BrotherhoodInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.BrotherhoodInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.BrotherhoodInfo) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_BrotherhoodInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_BrotherhoodInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_BrotherhoodInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.BrotherhoodInfo) + } + + // @@protoc_insertion_point(class_scope:User.BrotherhoodInfo) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<BrotherhoodInfo> + PARSER = new com.google.protobuf.AbstractParser<BrotherhoodInfo>() { + @java.lang.Override + public BrotherhoodInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<BrotherhoodInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<BrotherhoodInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FansClubOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.FansClub) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.User.FansClub.FansClubData data = 1;</code> + * @return Whether the data field is set. + */ + boolean hasData(); + /** + * <code>.User.FansClub.FansClubData data = 1;</code> + * @return The data. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getData(); + /** + * <code>.User.FansClub.FansClubData data = 1;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder getDataOrBuilder(); + + /** + * <code>map<int32, .User.FansClub.FansClubData> preferData = 2;</code> + */ + int getPreferDataCount(); + /** + * <code>map<int32, .User.FansClub.FansClubData> preferData = 2;</code> + */ + boolean containsPreferData( + int key); + /** + * Use {@link #getPreferDataMap()} instead. + */ + @java.lang.Deprecated + java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> + getPreferData(); + /** + * <code>map<int32, .User.FansClub.FansClubData> preferData = 2;</code> + */ + java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> + getPreferDataMap(); + /** + * <code>map<int32, .User.FansClub.FansClubData> preferData = 2;</code> + */ + /* nullable */ +tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getPreferDataOrDefault( + int key, + /* nullable */ +tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData defaultValue); + /** + * <code>map<int32, .User.FansClub.FansClubData> preferData = 2;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getPreferDataOrThrow( + int key); + } + /** + * Protobuf type {@code User.FansClub} + */ + public static final class FansClub extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.FansClub) + FansClubOrBuilder { + private static final long serialVersionUID = 0L; + // Use FansClub.newBuilder() to construct. + private FansClub(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private FansClub() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FansClub(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetPreferData(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.Builder.class); + } + + public interface FansClubDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.FansClub.FansClubData) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string clubName = 1;</code> + * @return The clubName. + */ + java.lang.String getClubName(); + /** + * <code>string clubName = 1;</code> + * @return The bytes for clubName. + */ + com.google.protobuf.ByteString + getClubNameBytes(); + + /** + * <code>int32 level = 2;</code> + * @return The level. + */ + int getLevel(); + + /** + * <code>int32 userFansClubStatus = 3;</code> + * @return The userFansClubStatus. + */ + int getUserFansClubStatus(); + + /** + * <code>.User.FansClub.FansClubData.UserBadge badge = 4;</code> + * @return Whether the badge field is set. + */ + boolean hasBadge(); + /** + * <code>.User.FansClub.FansClubData.UserBadge badge = 4;</code> + * @return The badge. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge getBadge(); + /** + * <code>.User.FansClub.FansClubData.UserBadge badge = 4;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadgeOrBuilder getBadgeOrBuilder(); + + /** + * <code>repeated int64 availableGiftIds = 5;</code> + * @return A list containing the availableGiftIds. + */ + java.util.List<java.lang.Long> getAvailableGiftIdsList(); + /** + * <code>repeated int64 availableGiftIds = 5;</code> + * @return The count of availableGiftIds. + */ + int getAvailableGiftIdsCount(); + /** + * <code>repeated int64 availableGiftIds = 5;</code> + * @param index The index of the element to return. + * @return The availableGiftIds at the given index. + */ + long getAvailableGiftIds(int index); + + /** + * <code>int64 anchorId = 6;</code> + * @return The anchorId. + */ + long getAnchorId(); + } + /** + * Protobuf type {@code User.FansClub.FansClubData} + */ + public static final class FansClubData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.FansClub.FansClubData) + FansClubDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use FansClubData.newBuilder() to construct. + private FansClubData(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private FansClubData() { + clubName_ = ""; + availableGiftIds_ = emptyLongList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FansClubData(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder.class); + } + + public interface UserBadgeOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.FansClub.FansClubData.UserBadge) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>map<int32, .Image> icons = 1;</code> + */ + int getIconsCount(); + /** + * <code>map<int32, .Image> icons = 1;</code> + */ + boolean containsIcons( + int key); + /** + * Use {@link #getIconsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> + getIcons(); + /** + * <code>map<int32, .Image> icons = 1;</code> + */ + java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> + getIconsMap(); + /** + * <code>map<int32, .Image> icons = 1;</code> + */ + /* nullable */ +tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getIconsOrDefault( + int key, + /* nullable */ +tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image defaultValue); + /** + * <code>map<int32, .Image> icons = 1;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getIconsOrThrow( + int key); + + /** + * <code>string title = 2;</code> + * @return The title. + */ + java.lang.String getTitle(); + /** + * <code>string title = 2;</code> + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + } + /** + * Protobuf type {@code User.FansClub.FansClubData.UserBadge} + */ + public static final class UserBadge extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.FansClub.FansClubData.UserBadge) + UserBadgeOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserBadge.newBuilder() to construct. + private UserBadge(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private UserBadge() { + title_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UserBadge(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_UserBadge_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetIcons(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_UserBadge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.Builder.class); + } + + public static final int ICONS_FIELD_NUMBER = 1; + private static final class IconsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> defaultEntry = + com.google.protobuf.MapEntry + .<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image>newDefaultInstance( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_UserBadge_IconsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.MESSAGE, + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> icons_; + private com.google.protobuf.MapField<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> + internalGetIcons() { + if (icons_ == null) { + return com.google.protobuf.MapField.emptyMapField( + IconsDefaultEntryHolder.defaultEntry); + } + return icons_; + } + public int getIconsCount() { + return internalGetIcons().getMap().size(); + } + /** + * <code>map<int32, .Image> icons = 1;</code> + */ + @java.lang.Override + public boolean containsIcons( + int key) { + + return internalGetIcons().getMap().containsKey(key); + } + /** + * Use {@link #getIconsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> getIcons() { + return getIconsMap(); + } + /** + * <code>map<int32, .Image> icons = 1;</code> + */ + @java.lang.Override + public java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> getIconsMap() { + return internalGetIcons().getMap(); + } + /** + * <code>map<int32, .Image> icons = 1;</code> + */ + @java.lang.Override + public /* nullable */ +tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getIconsOrDefault( + int key, + /* nullable */ +tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image defaultValue) { + + java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> map = + internalGetIcons().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * <code>map<int32, .Image> icons = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getIconsOrThrow( + int key) { + + java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> map = + internalGetIcons().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TITLE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + * <code>string title = 2;</code> + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + * <code>string title = 2;</code> + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetIcons(), + IconsDefaultEntryHolder.defaultEntry, + 1); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> entry + : internalGetIcons().getMap().entrySet()) { + com.google.protobuf.MapEntry<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> + icons__ = IconsDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, icons__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge) obj; + + if (!internalGetIcons().equals( + other.internalGetIcons())) return false; + if (!getTitle() + .equals(other.getTitle())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetIcons().getMap().isEmpty()) { + hash = (37 * hash) + ICONS_FIELD_NUMBER; + hash = (53 * hash) + internalGetIcons().hashCode(); + } + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.FansClub.FansClubData.UserBadge} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.FansClub.FansClubData.UserBadge) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadgeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_UserBadge_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetIcons(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableIcons(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_UserBadge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + internalGetMutableIcons().clear(); + title_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_UserBadge_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.icons_ = internalGetIcons(); + result.icons_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.title_ = title_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.getDefaultInstance()) return this; + internalGetMutableIcons().mergeFrom( + other.internalGetIcons()); + bitField0_ |= 0x00000001; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.MapEntry<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> + icons__ = input.readMessage( + IconsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableIcons().getMutableMap().put( + icons__.getKey(), icons__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> icons_; + private com.google.protobuf.MapField<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> + internalGetIcons() { + if (icons_ == null) { + return com.google.protobuf.MapField.emptyMapField( + IconsDefaultEntryHolder.defaultEntry); + } + return icons_; + } + private com.google.protobuf.MapField<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> + internalGetMutableIcons() { + if (icons_ == null) { + icons_ = com.google.protobuf.MapField.newMapField( + IconsDefaultEntryHolder.defaultEntry); + } + if (!icons_.isMutable()) { + icons_ = icons_.copy(); + } + bitField0_ |= 0x00000001; + onChanged(); + return icons_; + } + public int getIconsCount() { + return internalGetIcons().getMap().size(); + } + /** + * <code>map<int32, .Image> icons = 1;</code> + */ + @java.lang.Override + public boolean containsIcons( + int key) { + + return internalGetIcons().getMap().containsKey(key); + } + /** + * Use {@link #getIconsMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> getIcons() { + return getIconsMap(); + } + /** + * <code>map<int32, .Image> icons = 1;</code> + */ + @java.lang.Override + public java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> getIconsMap() { + return internalGetIcons().getMap(); + } + /** + * <code>map<int32, .Image> icons = 1;</code> + */ + @java.lang.Override + public /* nullable */ +tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getIconsOrDefault( + int key, + /* nullable */ +tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image defaultValue) { + + java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> map = + internalGetIcons().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * <code>map<int32, .Image> icons = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getIconsOrThrow( + int key) { + + java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> map = + internalGetIcons().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearIcons() { + bitField0_ = (bitField0_ & ~0x00000001); + internalGetMutableIcons().getMutableMap() + .clear(); + return this; + } + /** + * <code>map<int32, .Image> icons = 1;</code> + */ + public Builder removeIcons( + int key) { + + internalGetMutableIcons().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> + getMutableIcons() { + bitField0_ |= 0x00000001; + return internalGetMutableIcons().getMutableMap(); + } + /** + * <code>map<int32, .Image> icons = 1;</code> + */ + public Builder putIcons( + int key, + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableIcons().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000001; + return this; + } + /** + * <code>map<int32, .Image> icons = 1;</code> + */ + public Builder putAllIcons( + java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> values) { + internalGetMutableIcons().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000001; + return this; + } + + private java.lang.Object title_ = ""; + /** + * <code>string title = 2;</code> + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string title = 2;</code> + * @return The bytes for title. + */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string title = 2;</code> + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string title = 2;</code> + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string title = 2;</code> + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.FansClub.FansClubData.UserBadge) + } + + // @@protoc_insertion_point(class_scope:User.FansClub.FansClubData.UserBadge) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<UserBadge> + PARSER = new com.google.protobuf.AbstractParser<UserBadge>() { + @java.lang.Override + public UserBadge parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<UserBadge> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<UserBadge> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int CLUBNAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object clubName_ = ""; + /** + * <code>string clubName = 1;</code> + * @return The clubName. + */ + @java.lang.Override + public java.lang.String getClubName() { + java.lang.Object ref = clubName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clubName_ = s; + return s; + } + } + /** + * <code>string clubName = 1;</code> + * @return The bytes for clubName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getClubNameBytes() { + java.lang.Object ref = clubName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clubName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LEVEL_FIELD_NUMBER = 2; + private int level_ = 0; + /** + * <code>int32 level = 2;</code> + * @return The level. + */ + @java.lang.Override + public int getLevel() { + return level_; + } + + public static final int USERFANSCLUBSTATUS_FIELD_NUMBER = 3; + private int userFansClubStatus_ = 0; + /** + * <code>int32 userFansClubStatus = 3;</code> + * @return The userFansClubStatus. + */ + @java.lang.Override + public int getUserFansClubStatus() { + return userFansClubStatus_; + } + + public static final int BADGE_FIELD_NUMBER = 4; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge badge_; + /** + * <code>.User.FansClub.FansClubData.UserBadge badge = 4;</code> + * @return Whether the badge field is set. + */ + @java.lang.Override + public boolean hasBadge() { + return badge_ != null; + } + /** + * <code>.User.FansClub.FansClubData.UserBadge badge = 4;</code> + * @return The badge. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge getBadge() { + return badge_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.getDefaultInstance() : badge_; + } + /** + * <code>.User.FansClub.FansClubData.UserBadge badge = 4;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadgeOrBuilder getBadgeOrBuilder() { + return badge_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.getDefaultInstance() : badge_; + } + + public static final int AVAILABLEGIFTIDS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList availableGiftIds_; + /** + * <code>repeated int64 availableGiftIds = 5;</code> + * @return A list containing the availableGiftIds. + */ + @java.lang.Override + public java.util.List<java.lang.Long> + getAvailableGiftIdsList() { + return availableGiftIds_; + } + /** + * <code>repeated int64 availableGiftIds = 5;</code> + * @return The count of availableGiftIds. + */ + public int getAvailableGiftIdsCount() { + return availableGiftIds_.size(); + } + /** + * <code>repeated int64 availableGiftIds = 5;</code> + * @param index The index of the element to return. + * @return The availableGiftIds at the given index. + */ + public long getAvailableGiftIds(int index) { + return availableGiftIds_.getLong(index); + } + private int availableGiftIdsMemoizedSerializedSize = -1; + + public static final int ANCHORID_FIELD_NUMBER = 6; + private long anchorId_ = 0L; + /** + * <code>int64 anchorId = 6;</code> + * @return The anchorId. + */ + @java.lang.Override + public long getAnchorId() { + return anchorId_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clubName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clubName_); + } + if (level_ != 0) { + output.writeInt32(2, level_); + } + if (userFansClubStatus_ != 0) { + output.writeInt32(3, userFansClubStatus_); + } + if (badge_ != null) { + output.writeMessage(4, getBadge()); + } + if (getAvailableGiftIdsList().size() > 0) { + output.writeUInt32NoTag(42); + output.writeUInt32NoTag(availableGiftIdsMemoizedSerializedSize); + } + for (int i = 0; i < availableGiftIds_.size(); i++) { + output.writeInt64NoTag(availableGiftIds_.getLong(i)); + } + if (anchorId_ != 0L) { + output.writeInt64(6, anchorId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clubName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clubName_); + } + if (level_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, level_); + } + if (userFansClubStatus_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, userFansClubStatus_); + } + if (badge_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getBadge()); + } + { + int dataSize = 0; + for (int i = 0; i < availableGiftIds_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(availableGiftIds_.getLong(i)); + } + size += dataSize; + if (!getAvailableGiftIdsList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + availableGiftIdsMemoizedSerializedSize = dataSize; + } + if (anchorId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, anchorId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData) obj; + + if (!getClubName() + .equals(other.getClubName())) return false; + if (getLevel() + != other.getLevel()) return false; + if (getUserFansClubStatus() + != other.getUserFansClubStatus()) return false; + if (hasBadge() != other.hasBadge()) return false; + if (hasBadge()) { + if (!getBadge() + .equals(other.getBadge())) return false; + } + if (!getAvailableGiftIdsList() + .equals(other.getAvailableGiftIdsList())) return false; + if (getAnchorId() + != other.getAnchorId()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CLUBNAME_FIELD_NUMBER; + hash = (53 * hash) + getClubName().hashCode(); + hash = (37 * hash) + LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getLevel(); + hash = (37 * hash) + USERFANSCLUBSTATUS_FIELD_NUMBER; + hash = (53 * hash) + getUserFansClubStatus(); + if (hasBadge()) { + hash = (37 * hash) + BADGE_FIELD_NUMBER; + hash = (53 * hash) + getBadge().hashCode(); + } + if (getAvailableGiftIdsCount() > 0) { + hash = (37 * hash) + AVAILABLEGIFTIDS_FIELD_NUMBER; + hash = (53 * hash) + getAvailableGiftIdsList().hashCode(); + } + hash = (37 * hash) + ANCHORID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getAnchorId()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.FansClub.FansClubData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.FansClub.FansClubData) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + clubName_ = ""; + level_ = 0; + userFansClubStatus_ = 0; + badge_ = null; + if (badgeBuilder_ != null) { + badgeBuilder_.dispose(); + badgeBuilder_ = null; + } + availableGiftIds_ = emptyLongList(); + anchorId_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_FansClubData_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData result) { + if (((bitField0_ & 0x00000010) != 0)) { + availableGiftIds_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.availableGiftIds_ = availableGiftIds_; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.clubName_ = clubName_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.level_ = level_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.userFansClubStatus_ = userFansClubStatus_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.badge_ = badgeBuilder_ == null + ? badge_ + : badgeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.anchorId_ = anchorId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.getDefaultInstance()) return this; + if (!other.getClubName().isEmpty()) { + clubName_ = other.clubName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getLevel() != 0) { + setLevel(other.getLevel()); + } + if (other.getUserFansClubStatus() != 0) { + setUserFansClubStatus(other.getUserFansClubStatus()); + } + if (other.hasBadge()) { + mergeBadge(other.getBadge()); + } + if (!other.availableGiftIds_.isEmpty()) { + if (availableGiftIds_.isEmpty()) { + availableGiftIds_ = other.availableGiftIds_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureAvailableGiftIdsIsMutable(); + availableGiftIds_.addAll(other.availableGiftIds_); + } + onChanged(); + } + if (other.getAnchorId() != 0L) { + setAnchorId(other.getAnchorId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + clubName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + level_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + userFansClubStatus_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + input.readMessage( + getBadgeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + long v = input.readInt64(); + ensureAvailableGiftIdsIsMutable(); + availableGiftIds_.addLong(v); + break; + } // case 40 + case 42: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureAvailableGiftIdsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + availableGiftIds_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } // case 42 + case 48: { + anchorId_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object clubName_ = ""; + /** + * <code>string clubName = 1;</code> + * @return The clubName. + */ + public java.lang.String getClubName() { + java.lang.Object ref = clubName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clubName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string clubName = 1;</code> + * @return The bytes for clubName. + */ + public com.google.protobuf.ByteString + getClubNameBytes() { + java.lang.Object ref = clubName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clubName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string clubName = 1;</code> + * @param value The clubName to set. + * @return This builder for chaining. + */ + public Builder setClubName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + clubName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string clubName = 1;</code> + * @return This builder for chaining. + */ + public Builder clearClubName() { + clubName_ = getDefaultInstance().getClubName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string clubName = 1;</code> + * @param value The bytes for clubName to set. + * @return This builder for chaining. + */ + public Builder setClubNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + clubName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int level_ ; + /** + * <code>int32 level = 2;</code> + * @return The level. + */ + @java.lang.Override + public int getLevel() { + return level_; + } + /** + * <code>int32 level = 2;</code> + * @param value The level to set. + * @return This builder for chaining. + */ + public Builder setLevel(int value) { + + level_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>int32 level = 2;</code> + * @return This builder for chaining. + */ + public Builder clearLevel() { + bitField0_ = (bitField0_ & ~0x00000002); + level_ = 0; + onChanged(); + return this; + } + + private int userFansClubStatus_ ; + /** + * <code>int32 userFansClubStatus = 3;</code> + * @return The userFansClubStatus. + */ + @java.lang.Override + public int getUserFansClubStatus() { + return userFansClubStatus_; + } + /** + * <code>int32 userFansClubStatus = 3;</code> + * @param value The userFansClubStatus to set. + * @return This builder for chaining. + */ + public Builder setUserFansClubStatus(int value) { + + userFansClubStatus_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>int32 userFansClubStatus = 3;</code> + * @return This builder for chaining. + */ + public Builder clearUserFansClubStatus() { + bitField0_ = (bitField0_ & ~0x00000004); + userFansClubStatus_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge badge_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadgeOrBuilder> badgeBuilder_; + /** + * <code>.User.FansClub.FansClubData.UserBadge badge = 4;</code> + * @return Whether the badge field is set. + */ + public boolean hasBadge() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * <code>.User.FansClub.FansClubData.UserBadge badge = 4;</code> + * @return The badge. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge getBadge() { + if (badgeBuilder_ == null) { + return badge_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.getDefaultInstance() : badge_; + } else { + return badgeBuilder_.getMessage(); + } + } + /** + * <code>.User.FansClub.FansClubData.UserBadge badge = 4;</code> + */ + public Builder setBadge(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge value) { + if (badgeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + badge_ = value; + } else { + badgeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.User.FansClub.FansClubData.UserBadge badge = 4;</code> + */ + public Builder setBadge( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.Builder builderForValue) { + if (badgeBuilder_ == null) { + badge_ = builderForValue.build(); + } else { + badgeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.User.FansClub.FansClubData.UserBadge badge = 4;</code> + */ + public Builder mergeBadge(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge value) { + if (badgeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + badge_ != null && + badge_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.getDefaultInstance()) { + getBadgeBuilder().mergeFrom(value); + } else { + badge_ = value; + } + } else { + badgeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.User.FansClub.FansClubData.UserBadge badge = 4;</code> + */ + public Builder clearBadge() { + bitField0_ = (bitField0_ & ~0x00000008); + badge_ = null; + if (badgeBuilder_ != null) { + badgeBuilder_.dispose(); + badgeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.FansClub.FansClubData.UserBadge badge = 4;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.Builder getBadgeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getBadgeFieldBuilder().getBuilder(); + } + /** + * <code>.User.FansClub.FansClubData.UserBadge badge = 4;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadgeOrBuilder getBadgeOrBuilder() { + if (badgeBuilder_ != null) { + return badgeBuilder_.getMessageOrBuilder(); + } else { + return badge_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.getDefaultInstance() : badge_; + } + } + /** + * <code>.User.FansClub.FansClubData.UserBadge badge = 4;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadgeOrBuilder> + getBadgeFieldBuilder() { + if (badgeBuilder_ == null) { + badgeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadge.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.UserBadgeOrBuilder>( + getBadge(), + getParentForChildren(), + isClean()); + badge_ = null; + } + return badgeBuilder_; + } + + private com.google.protobuf.Internal.LongList availableGiftIds_ = emptyLongList(); + private void ensureAvailableGiftIdsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + availableGiftIds_ = mutableCopy(availableGiftIds_); + bitField0_ |= 0x00000010; + } + } + /** + * <code>repeated int64 availableGiftIds = 5;</code> + * @return A list containing the availableGiftIds. + */ + public java.util.List<java.lang.Long> + getAvailableGiftIdsList() { + return ((bitField0_ & 0x00000010) != 0) ? + java.util.Collections.unmodifiableList(availableGiftIds_) : availableGiftIds_; + } + /** + * <code>repeated int64 availableGiftIds = 5;</code> + * @return The count of availableGiftIds. + */ + public int getAvailableGiftIdsCount() { + return availableGiftIds_.size(); + } + /** + * <code>repeated int64 availableGiftIds = 5;</code> + * @param index The index of the element to return. + * @return The availableGiftIds at the given index. + */ + public long getAvailableGiftIds(int index) { + return availableGiftIds_.getLong(index); + } + /** + * <code>repeated int64 availableGiftIds = 5;</code> + * @param index The index to set the value at. + * @param value The availableGiftIds to set. + * @return This builder for chaining. + */ + public Builder setAvailableGiftIds( + int index, long value) { + + ensureAvailableGiftIdsIsMutable(); + availableGiftIds_.setLong(index, value); + onChanged(); + return this; + } + /** + * <code>repeated int64 availableGiftIds = 5;</code> + * @param value The availableGiftIds to add. + * @return This builder for chaining. + */ + public Builder addAvailableGiftIds(long value) { + + ensureAvailableGiftIdsIsMutable(); + availableGiftIds_.addLong(value); + onChanged(); + return this; + } + /** + * <code>repeated int64 availableGiftIds = 5;</code> + * @param values The availableGiftIds to add. + * @return This builder for chaining. + */ + public Builder addAllAvailableGiftIds( + java.lang.Iterable<? extends java.lang.Long> values) { + ensureAvailableGiftIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, availableGiftIds_); + onChanged(); + return this; + } + /** + * <code>repeated int64 availableGiftIds = 5;</code> + * @return This builder for chaining. + */ + public Builder clearAvailableGiftIds() { + availableGiftIds_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + private long anchorId_ ; + /** + * <code>int64 anchorId = 6;</code> + * @return The anchorId. + */ + @java.lang.Override + public long getAnchorId() { + return anchorId_; + } + /** + * <code>int64 anchorId = 6;</code> + * @param value The anchorId to set. + * @return This builder for chaining. + */ + public Builder setAnchorId(long value) { + + anchorId_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>int64 anchorId = 6;</code> + * @return This builder for chaining. + */ + public Builder clearAnchorId() { + bitField0_ = (bitField0_ & ~0x00000020); + anchorId_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.FansClub.FansClubData) + } + + // @@protoc_insertion_point(class_scope:User.FansClub.FansClubData) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<FansClubData> + PARSER = new com.google.protobuf.AbstractParser<FansClubData>() { + @java.lang.Override + public FansClubData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<FansClubData> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<FansClubData> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int DATA_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData data_; + /** + * <code>.User.FansClub.FansClubData data = 1;</code> + * @return Whether the data field is set. + */ + @java.lang.Override + public boolean hasData() { + return data_ != null; + } + /** + * <code>.User.FansClub.FansClubData data = 1;</code> + * @return The data. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getData() { + return data_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.getDefaultInstance() : data_; + } + /** + * <code>.User.FansClub.FansClubData data = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder getDataOrBuilder() { + return data_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.getDefaultInstance() : data_; + } + + public static final int PREFERDATA_FIELD_NUMBER = 2; + private static final class PreferDataDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> defaultEntry = + com.google.protobuf.MapEntry + .<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData>newDefaultInstance( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_PreferDataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.INT32, + 0, + com.google.protobuf.WireFormat.FieldType.MESSAGE, + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.getDefaultInstance()); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> preferData_; + private com.google.protobuf.MapField<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> + internalGetPreferData() { + if (preferData_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PreferDataDefaultEntryHolder.defaultEntry); + } + return preferData_; + } + public int getPreferDataCount() { + return internalGetPreferData().getMap().size(); + } + /** + * <code>map<int32, .User.FansClub.FansClubData> preferData = 2;</code> + */ + @java.lang.Override + public boolean containsPreferData( + int key) { + + return internalGetPreferData().getMap().containsKey(key); + } + /** + * Use {@link #getPreferDataMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> getPreferData() { + return getPreferDataMap(); + } + /** + * <code>map<int32, .User.FansClub.FansClubData> preferData = 2;</code> + */ + @java.lang.Override + public java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> getPreferDataMap() { + return internalGetPreferData().getMap(); + } + /** + * <code>map<int32, .User.FansClub.FansClubData> preferData = 2;</code> + */ + @java.lang.Override + public /* nullable */ +tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getPreferDataOrDefault( + int key, + /* nullable */ +tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData defaultValue) { + + java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> map = + internalGetPreferData().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * <code>map<int32, .User.FansClub.FansClubData> preferData = 2;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getPreferDataOrThrow( + int key) { + + java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> map = + internalGetPreferData().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (data_ != null) { + output.writeMessage(1, getData()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeIntegerMapTo( + output, + internalGetPreferData(), + PreferDataDefaultEntryHolder.defaultEntry, + 2); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (data_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getData()); + } + for (java.util.Map.Entry<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> entry + : internalGetPreferData().getMap().entrySet()) { + com.google.protobuf.MapEntry<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> + preferData__ = PreferDataDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, preferData__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub) obj; + + if (hasData() != other.hasData()) return false; + if (hasData()) { + if (!getData() + .equals(other.getData())) return false; + } + if (!internalGetPreferData().equals( + other.internalGetPreferData())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasData()) { + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + } + if (!internalGetPreferData().getMap().isEmpty()) { + hash = (37 * hash) + PREFERDATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetPreferData().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.FansClub} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.FansClub) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClubOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetPreferData(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutablePreferData(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + data_ = null; + if (dataBuilder_ != null) { + dataBuilder_.dispose(); + dataBuilder_ = null; + } + internalGetMutablePreferData().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansClub_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.data_ = dataBuilder_ == null + ? data_ + : dataBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.preferData_ = internalGetPreferData(); + result.preferData_.makeImmutable(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.getDefaultInstance()) return this; + if (other.hasData()) { + mergeData(other.getData()); + } + internalGetMutablePreferData().mergeFrom( + other.internalGetPreferData()); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getDataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> + preferData__ = input.readMessage( + PreferDataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutablePreferData().getMutableMap().put( + preferData__.getKey(), preferData__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData data_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder> dataBuilder_; + /** + * <code>.User.FansClub.FansClubData data = 1;</code> + * @return Whether the data field is set. + */ + public boolean hasData() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.User.FansClub.FansClubData data = 1;</code> + * @return The data. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getData() { + if (dataBuilder_ == null) { + return data_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.getDefaultInstance() : data_; + } else { + return dataBuilder_.getMessage(); + } + } + /** + * <code>.User.FansClub.FansClubData data = 1;</code> + */ + public Builder setData(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + data_ = value; + } else { + dataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.User.FansClub.FansClubData data = 1;</code> + */ + public Builder setData( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder builderForValue) { + if (dataBuilder_ == null) { + data_ = builderForValue.build(); + } else { + dataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.User.FansClub.FansClubData data = 1;</code> + */ + public Builder mergeData(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData value) { + if (dataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + data_ != null && + data_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.getDefaultInstance()) { + getDataBuilder().mergeFrom(value); + } else { + data_ = value; + } + } else { + dataBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.User.FansClub.FansClubData data = 1;</code> + */ + public Builder clearData() { + bitField0_ = (bitField0_ & ~0x00000001); + data_ = null; + if (dataBuilder_ != null) { + dataBuilder_.dispose(); + dataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.FansClub.FansClubData data = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder getDataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDataFieldBuilder().getBuilder(); + } + /** + * <code>.User.FansClub.FansClubData data = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder getDataOrBuilder() { + if (dataBuilder_ != null) { + return dataBuilder_.getMessageOrBuilder(); + } else { + return data_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.getDefaultInstance() : data_; + } + } + /** + * <code>.User.FansClub.FansClubData data = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder> + getDataFieldBuilder() { + if (dataBuilder_ == null) { + dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubDataOrBuilder>( + getData(), + getParentForChildren(), + isClean()); + data_ = null; + } + return dataBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> preferData_; + private com.google.protobuf.MapField<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> + internalGetPreferData() { + if (preferData_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PreferDataDefaultEntryHolder.defaultEntry); + } + return preferData_; + } + private com.google.protobuf.MapField<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> + internalGetMutablePreferData() { + if (preferData_ == null) { + preferData_ = com.google.protobuf.MapField.newMapField( + PreferDataDefaultEntryHolder.defaultEntry); + } + if (!preferData_.isMutable()) { + preferData_ = preferData_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return preferData_; + } + public int getPreferDataCount() { + return internalGetPreferData().getMap().size(); + } + /** + * <code>map<int32, .User.FansClub.FansClubData> preferData = 2;</code> + */ + @java.lang.Override + public boolean containsPreferData( + int key) { + + return internalGetPreferData().getMap().containsKey(key); + } + /** + * Use {@link #getPreferDataMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> getPreferData() { + return getPreferDataMap(); + } + /** + * <code>map<int32, .User.FansClub.FansClubData> preferData = 2;</code> + */ + @java.lang.Override + public java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> getPreferDataMap() { + return internalGetPreferData().getMap(); + } + /** + * <code>map<int32, .User.FansClub.FansClubData> preferData = 2;</code> + */ + @java.lang.Override + public /* nullable */ +tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getPreferDataOrDefault( + int key, + /* nullable */ +tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData defaultValue) { + + java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> map = + internalGetPreferData().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * <code>map<int32, .User.FansClub.FansClubData> preferData = 2;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData getPreferDataOrThrow( + int key) { + + java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> map = + internalGetPreferData().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearPreferData() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutablePreferData().getMutableMap() + .clear(); + return this; + } + /** + * <code>map<int32, .User.FansClub.FansClubData> preferData = 2;</code> + */ + public Builder removePreferData( + int key) { + + internalGetMutablePreferData().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> + getMutablePreferData() { + bitField0_ |= 0x00000002; + return internalGetMutablePreferData().getMutableMap(); + } + /** + * <code>map<int32, .User.FansClub.FansClubData> preferData = 2;</code> + */ + public Builder putPreferData( + int key, + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData value) { + + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutablePreferData().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * <code>map<int32, .User.FansClub.FansClubData> preferData = 2;</code> + */ + public Builder putAllPreferData( + java.util.Map<java.lang.Integer, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.FansClubData> values) { + internalGetMutablePreferData().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000002; + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.FansClub) + } + + // @@protoc_insertion_point(class_scope:User.FansClub) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<FansClub> + PARSER = new com.google.protobuf.AbstractParser<FansClub>() { + @java.lang.Override + public FansClub parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<FansClub> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<FansClub> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FansGroupInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.FansGroupInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.FansGroupInfo} + */ + public static final class FansGroupInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.FansGroupInfo) + FansGroupInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use FansGroupInfo.newBuilder() to construct. + private FansGroupInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private FansGroupInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FansGroupInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansGroupInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansGroupInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.FansGroupInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.FansGroupInfo) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansGroupInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansGroupInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FansGroupInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.FansGroupInfo) + } + + // @@protoc_insertion_point(class_scope:User.FansGroupInfo) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<FansGroupInfo> + PARSER = new com.google.protobuf.AbstractParser<FansGroupInfo>() { + @java.lang.Override + public FansGroupInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<FansGroupInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<FansGroupInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FollowInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.FollowInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>int64 followingCount = 1;</code> + * @return The followingCount. + */ + long getFollowingCount(); + + /** + * <code>int64 followerCount = 2;</code> + * @return The followerCount. + */ + long getFollowerCount(); + + /** + * <code>int64 followStatus = 3;</code> + * @return The followStatus. + */ + long getFollowStatus(); + + /** + * <code>int64 pushStatus = 4;</code> + * @return The pushStatus. + */ + long getPushStatus(); + + /** + * <code>string remarkName = 5;</code> + * @return The remarkName. + */ + java.lang.String getRemarkName(); + /** + * <code>string remarkName = 5;</code> + * @return The bytes for remarkName. + */ + com.google.protobuf.ByteString + getRemarkNameBytes(); + } + /** + * Protobuf type {@code User.FollowInfo} + */ + public static final class FollowInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.FollowInfo) + FollowInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use FollowInfo.newBuilder() to construct. + private FollowInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private FollowInfo() { + remarkName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new FollowInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FollowInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FollowInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.Builder.class); + } + + public static final int FOLLOWINGCOUNT_FIELD_NUMBER = 1; + private long followingCount_ = 0L; + /** + * <code>int64 followingCount = 1;</code> + * @return The followingCount. + */ + @java.lang.Override + public long getFollowingCount() { + return followingCount_; + } + + public static final int FOLLOWERCOUNT_FIELD_NUMBER = 2; + private long followerCount_ = 0L; + /** + * <code>int64 followerCount = 2;</code> + * @return The followerCount. + */ + @java.lang.Override + public long getFollowerCount() { + return followerCount_; + } + + public static final int FOLLOWSTATUS_FIELD_NUMBER = 3; + private long followStatus_ = 0L; + /** + * <code>int64 followStatus = 3;</code> + * @return The followStatus. + */ + @java.lang.Override + public long getFollowStatus() { + return followStatus_; + } + + public static final int PUSHSTATUS_FIELD_NUMBER = 4; + private long pushStatus_ = 0L; + /** + * <code>int64 pushStatus = 4;</code> + * @return The pushStatus. + */ + @java.lang.Override + public long getPushStatus() { + return pushStatus_; + } + + public static final int REMARKNAME_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object remarkName_ = ""; + /** + * <code>string remarkName = 5;</code> + * @return The remarkName. + */ + @java.lang.Override + public java.lang.String getRemarkName() { + java.lang.Object ref = remarkName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remarkName_ = s; + return s; + } + } + /** + * <code>string remarkName = 5;</code> + * @return The bytes for remarkName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRemarkNameBytes() { + java.lang.Object ref = remarkName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + remarkName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (followingCount_ != 0L) { + output.writeInt64(1, followingCount_); + } + if (followerCount_ != 0L) { + output.writeInt64(2, followerCount_); + } + if (followStatus_ != 0L) { + output.writeInt64(3, followStatus_); + } + if (pushStatus_ != 0L) { + output.writeInt64(4, pushStatus_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remarkName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, remarkName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (followingCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, followingCount_); + } + if (followerCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, followerCount_); + } + if (followStatus_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, followStatus_); + } + if (pushStatus_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, pushStatus_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remarkName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, remarkName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo) obj; + + if (getFollowingCount() + != other.getFollowingCount()) return false; + if (getFollowerCount() + != other.getFollowerCount()) return false; + if (getFollowStatus() + != other.getFollowStatus()) return false; + if (getPushStatus() + != other.getPushStatus()) return false; + if (!getRemarkName() + .equals(other.getRemarkName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FOLLOWINGCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFollowingCount()); + hash = (37 * hash) + FOLLOWERCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFollowerCount()); + hash = (37 * hash) + FOLLOWSTATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFollowStatus()); + hash = (37 * hash) + PUSHSTATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPushStatus()); + hash = (37 * hash) + REMARKNAME_FIELD_NUMBER; + hash = (53 * hash) + getRemarkName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.FollowInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.FollowInfo) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FollowInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FollowInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + followingCount_ = 0L; + followerCount_ = 0L; + followStatus_ = 0L; + pushStatus_ = 0L; + remarkName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_FollowInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.followingCount_ = followingCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.followerCount_ = followerCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.followStatus_ = followStatus_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pushStatus_ = pushStatus_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.remarkName_ = remarkName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.getDefaultInstance()) return this; + if (other.getFollowingCount() != 0L) { + setFollowingCount(other.getFollowingCount()); + } + if (other.getFollowerCount() != 0L) { + setFollowerCount(other.getFollowerCount()); + } + if (other.getFollowStatus() != 0L) { + setFollowStatus(other.getFollowStatus()); + } + if (other.getPushStatus() != 0L) { + setPushStatus(other.getPushStatus()); + } + if (!other.getRemarkName().isEmpty()) { + remarkName_ = other.remarkName_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + followingCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + followerCount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + followStatus_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + pushStatus_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + remarkName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long followingCount_ ; + /** + * <code>int64 followingCount = 1;</code> + * @return The followingCount. + */ + @java.lang.Override + public long getFollowingCount() { + return followingCount_; + } + /** + * <code>int64 followingCount = 1;</code> + * @param value The followingCount to set. + * @return This builder for chaining. + */ + public Builder setFollowingCount(long value) { + + followingCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>int64 followingCount = 1;</code> + * @return This builder for chaining. + */ + public Builder clearFollowingCount() { + bitField0_ = (bitField0_ & ~0x00000001); + followingCount_ = 0L; + onChanged(); + return this; + } + + private long followerCount_ ; + /** + * <code>int64 followerCount = 2;</code> + * @return The followerCount. + */ + @java.lang.Override + public long getFollowerCount() { + return followerCount_; + } + /** + * <code>int64 followerCount = 2;</code> + * @param value The followerCount to set. + * @return This builder for chaining. + */ + public Builder setFollowerCount(long value) { + + followerCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>int64 followerCount = 2;</code> + * @return This builder for chaining. + */ + public Builder clearFollowerCount() { + bitField0_ = (bitField0_ & ~0x00000002); + followerCount_ = 0L; + onChanged(); + return this; + } + + private long followStatus_ ; + /** + * <code>int64 followStatus = 3;</code> + * @return The followStatus. + */ + @java.lang.Override + public long getFollowStatus() { + return followStatus_; + } + /** + * <code>int64 followStatus = 3;</code> + * @param value The followStatus to set. + * @return This builder for chaining. + */ + public Builder setFollowStatus(long value) { + + followStatus_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>int64 followStatus = 3;</code> + * @return This builder for chaining. + */ + public Builder clearFollowStatus() { + bitField0_ = (bitField0_ & ~0x00000004); + followStatus_ = 0L; + onChanged(); + return this; + } + + private long pushStatus_ ; + /** + * <code>int64 pushStatus = 4;</code> + * @return The pushStatus. + */ + @java.lang.Override + public long getPushStatus() { + return pushStatus_; + } + /** + * <code>int64 pushStatus = 4;</code> + * @param value The pushStatus to set. + * @return This builder for chaining. + */ + public Builder setPushStatus(long value) { + + pushStatus_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>int64 pushStatus = 4;</code> + * @return This builder for chaining. + */ + public Builder clearPushStatus() { + bitField0_ = (bitField0_ & ~0x00000008); + pushStatus_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object remarkName_ = ""; + /** + * <code>string remarkName = 5;</code> + * @return The remarkName. + */ + public java.lang.String getRemarkName() { + java.lang.Object ref = remarkName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remarkName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string remarkName = 5;</code> + * @return The bytes for remarkName. + */ + public com.google.protobuf.ByteString + getRemarkNameBytes() { + java.lang.Object ref = remarkName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + remarkName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string remarkName = 5;</code> + * @param value The remarkName to set. + * @return This builder for chaining. + */ + public Builder setRemarkName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + remarkName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>string remarkName = 5;</code> + * @return This builder for chaining. + */ + public Builder clearRemarkName() { + remarkName_ = getDefaultInstance().getRemarkName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * <code>string remarkName = 5;</code> + * @param value The bytes for remarkName to set. + * @return This builder for chaining. + */ + public Builder setRemarkNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + remarkName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.FollowInfo) + } + + // @@protoc_insertion_point(class_scope:User.FollowInfo) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<FollowInfo> + PARSER = new com.google.protobuf.AbstractParser<FollowInfo>() { + @java.lang.Override + public FollowInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<FollowInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<FollowInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface JAccreditInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.JAccreditInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.JAccreditInfo} + */ + public static final class JAccreditInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.JAccreditInfo) + JAccreditInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use JAccreditInfo.newBuilder() to construct. + private JAccreditInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private JAccreditInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new JAccreditInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_JAccreditInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_JAccreditInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.JAccreditInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.JAccreditInfo) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_JAccreditInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_JAccreditInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_JAccreditInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.JAccreditInfo) + } + + // @@protoc_insertion_point(class_scope:User.JAccreditInfo) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<JAccreditInfo> + PARSER = new com.google.protobuf.AbstractParser<JAccreditInfo>() { + @java.lang.Override + public JAccreditInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<JAccreditInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<JAccreditInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface NobleLevelInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.NobleLevelInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.NobleLevelInfo} + */ + public static final class NobleLevelInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.NobleLevelInfo) + NobleLevelInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use NobleLevelInfo.newBuilder() to construct. + private NobleLevelInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private NobleLevelInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NobleLevelInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_NobleLevelInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_NobleLevelInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.NobleLevelInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.NobleLevelInfo) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_NobleLevelInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_NobleLevelInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_NobleLevelInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.NobleLevelInfo) + } + + // @@protoc_insertion_point(class_scope:User.NobleLevelInfo) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<NobleLevelInfo> + PARSER = new com.google.protobuf.AbstractParser<NobleLevelInfo>() { + @java.lang.Override + public NobleLevelInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<NobleLevelInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<NobleLevelInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface OwnRoomOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.OwnRoom) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.OwnRoom} + */ + public static final class OwnRoom extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.OwnRoom) + OwnRoomOrBuilder { + private static final long serialVersionUID = 0L; + // Use OwnRoom.newBuilder() to construct. + private OwnRoom(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private OwnRoom() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new OwnRoom(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_OwnRoom_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_OwnRoom_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.OwnRoom} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.OwnRoom) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoomOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_OwnRoom_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_OwnRoom_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_OwnRoom_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.OwnRoom) + } + + // @@protoc_insertion_point(class_scope:User.OwnRoom) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<OwnRoom> + PARSER = new com.google.protobuf.AbstractParser<OwnRoom>() { + @java.lang.Override + public OwnRoom parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<OwnRoom> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<OwnRoom> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PayGradeOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.PayGrade) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>int64 totalDiamondCount = 1;</code> + * @return The totalDiamondCount. + */ + long getTotalDiamondCount(); + + /** + * <code>.Image diamondIcon = 2;</code> + * @return Whether the diamondIcon field is set. + */ + boolean hasDiamondIcon(); + /** + * <code>.Image diamondIcon = 2;</code> + * @return The diamondIcon. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getDiamondIcon(); + /** + * <code>.Image diamondIcon = 2;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getDiamondIconOrBuilder(); + + /** + * <code>string name = 3;</code> + * @return The name. + */ + java.lang.String getName(); + /** + * <code>string name = 3;</code> + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * <code>.Image icon = 4;</code> + * @return Whether the icon field is set. + */ + boolean hasIcon(); + /** + * <code>.Image icon = 4;</code> + * @return The icon. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getIcon(); + /** + * <code>.Image icon = 4;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder(); + + /** + * <code>string nextName = 5;</code> + * @return The nextName. + */ + java.lang.String getNextName(); + /** + * <code>string nextName = 5;</code> + * @return The bytes for nextName. + */ + com.google.protobuf.ByteString + getNextNameBytes(); + + /** + * <code>int64 level = 6;</code> + * @return The level. + */ + long getLevel(); + + /** + * <code>.Image nextIcon = 7;</code> + * @return Whether the nextIcon field is set. + */ + boolean hasNextIcon(); + /** + * <code>.Image nextIcon = 7;</code> + * @return The nextIcon. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getNextIcon(); + /** + * <code>.Image nextIcon = 7;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNextIconOrBuilder(); + + /** + * <code>int64 nextDiamond = 8;</code> + * @return The nextDiamond. + */ + long getNextDiamond(); + + /** + * <code>int64 nowDiamond = 9;</code> + * @return The nowDiamond. + */ + long getNowDiamond(); + + /** + * <code>int64 thisGradeMinDiamond = 10;</code> + * @return The thisGradeMinDiamond. + */ + long getThisGradeMinDiamond(); + + /** + * <code>int64 thisGradeMaxDiamond = 11;</code> + * @return The thisGradeMaxDiamond. + */ + long getThisGradeMaxDiamond(); + + /** + * <code>int64 payDiamondBak = 12;</code> + * @return The payDiamondBak. + */ + long getPayDiamondBak(); + + /** + * <code>string gradeDescribe = 13;</code> + * @return The gradeDescribe. + */ + java.lang.String getGradeDescribe(); + /** + * <code>string gradeDescribe = 13;</code> + * @return The bytes for gradeDescribe. + */ + com.google.protobuf.ByteString + getGradeDescribeBytes(); + + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon> + getGradeIconListList(); + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon getGradeIconList(int index); + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + int getGradeIconListCount(); + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder> + getGradeIconListOrBuilderList(); + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder getGradeIconListOrBuilder( + int index); + + /** + * <code>int64 screenChatType = 15;</code> + * @return The screenChatType. + */ + long getScreenChatType(); + + /** + * <code>.Image imIcon = 16;</code> + * @return Whether the imIcon field is set. + */ + boolean hasImIcon(); + /** + * <code>.Image imIcon = 16;</code> + * @return The imIcon. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getImIcon(); + /** + * <code>.Image imIcon = 16;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImIconOrBuilder(); + + /** + * <code>.Image imIconWithLevel = 17;</code> + * @return Whether the imIconWithLevel field is set. + */ + boolean hasImIconWithLevel(); + /** + * <code>.Image imIconWithLevel = 17;</code> + * @return The imIconWithLevel. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getImIconWithLevel(); + /** + * <code>.Image imIconWithLevel = 17;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImIconWithLevelOrBuilder(); + + /** + * <code>.Image liveIcon = 18;</code> + * @return Whether the liveIcon field is set. + */ + boolean hasLiveIcon(); + /** + * <code>.Image liveIcon = 18;</code> + * @return The liveIcon. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getLiveIcon(); + /** + * <code>.Image liveIcon = 18;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getLiveIconOrBuilder(); + + /** + * <code>.Image newImIconWithLevel = 19;</code> + * @return Whether the newImIconWithLevel field is set. + */ + boolean hasNewImIconWithLevel(); + /** + * <code>.Image newImIconWithLevel = 19;</code> + * @return The newImIconWithLevel. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getNewImIconWithLevel(); + /** + * <code>.Image newImIconWithLevel = 19;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewImIconWithLevelOrBuilder(); + + /** + * <code>.Image newLiveIcon = 20;</code> + * @return Whether the newLiveIcon field is set. + */ + boolean hasNewLiveIcon(); + /** + * <code>.Image newLiveIcon = 20;</code> + * @return The newLiveIcon. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getNewLiveIcon(); + /** + * <code>.Image newLiveIcon = 20;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewLiveIconOrBuilder(); + + /** + * <code>int64 upgradeNeedConsume = 21;</code> + * @return The upgradeNeedConsume. + */ + long getUpgradeNeedConsume(); + + /** + * <code>string nextPrivileges = 22;</code> + * @return The nextPrivileges. + */ + java.lang.String getNextPrivileges(); + /** + * <code>string nextPrivileges = 22;</code> + * @return The bytes for nextPrivileges. + */ + com.google.protobuf.ByteString + getNextPrivilegesBytes(); + + /** + * <code>.Image background = 23;</code> + * @return Whether the background field is set. + */ + boolean hasBackground(); + /** + * <code>.Image background = 23;</code> + * @return The background. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackground(); + /** + * <code>.Image background = 23;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundOrBuilder(); + + /** + * <code>.Image backgroundBack = 24;</code> + * @return Whether the backgroundBack field is set. + */ + boolean hasBackgroundBack(); + /** + * <code>.Image backgroundBack = 24;</code> + * @return The backgroundBack. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundBack(); + /** + * <code>.Image backgroundBack = 24;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundBackOrBuilder(); + + /** + * <code>int64 score = 25;</code> + * @return The score. + */ + long getScore(); + + /** + * <pre> + * GradeBuffInfo buffInfo = 26; + * </pre> + * + * <code>string gradeBanner = 1001;</code> + * @return The gradeBanner. + */ + java.lang.String getGradeBanner(); + /** + * <pre> + * GradeBuffInfo buffInfo = 26; + * </pre> + * + * <code>string gradeBanner = 1001;</code> + * @return The bytes for gradeBanner. + */ + com.google.protobuf.ByteString + getGradeBannerBytes(); + + /** + * <code>.Image profileDialogBg = 1002;</code> + * @return Whether the profileDialogBg field is set. + */ + boolean hasProfileDialogBg(); + /** + * <code>.Image profileDialogBg = 1002;</code> + * @return The profileDialogBg. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getProfileDialogBg(); + /** + * <code>.Image profileDialogBg = 1002;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getProfileDialogBgOrBuilder(); + + /** + * <code>.Image profileDialogBgBack = 1003;</code> + * @return Whether the profileDialogBgBack field is set. + */ + boolean hasProfileDialogBgBack(); + /** + * <code>.Image profileDialogBgBack = 1003;</code> + * @return The profileDialogBgBack. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getProfileDialogBgBack(); + /** + * <code>.Image profileDialogBgBack = 1003;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getProfileDialogBgBackOrBuilder(); + } + /** + * Protobuf type {@code User.PayGrade} + */ + public static final class PayGrade extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.PayGrade) + PayGradeOrBuilder { + private static final long serialVersionUID = 0L; + // Use PayGrade.newBuilder() to construct. + private PayGrade(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private PayGrade() { + name_ = ""; + nextName_ = ""; + gradeDescribe_ = ""; + gradeIconList_ = java.util.Collections.emptyList(); + nextPrivileges_ = ""; + gradeBanner_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PayGrade(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.Builder.class); + } + + public interface GradeIconOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.PayGrade.GradeIcon) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.Image icon = 1;</code> + * @return Whether the icon field is set. + */ + boolean hasIcon(); + /** + * <code>.Image icon = 1;</code> + * @return The icon. + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getIcon(); + /** + * <code>.Image icon = 1;</code> + */ + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder(); + + /** + * <code>int64 iconDiamond = 2;</code> + * @return The iconDiamond. + */ + long getIconDiamond(); + + /** + * <code>int64 level = 3;</code> + * @return The level. + */ + long getLevel(); + + /** + * <code>string levelStr = 4;</code> + * @return The levelStr. + */ + java.lang.String getLevelStr(); + /** + * <code>string levelStr = 4;</code> + * @return The bytes for levelStr. + */ + com.google.protobuf.ByteString + getLevelStrBytes(); + } + /** + * Protobuf type {@code User.PayGrade.GradeIcon} + */ + public static final class GradeIcon extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.PayGrade.GradeIcon) + GradeIconOrBuilder { + private static final long serialVersionUID = 0L; + // Use GradeIcon.newBuilder() to construct. + private GradeIcon(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private GradeIcon() { + levelStr_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GradeIcon(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_GradeIcon_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_GradeIcon_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder.class); + } + + public static final int ICON_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image icon_; + /** + * <code>.Image icon = 1;</code> + * @return Whether the icon field is set. + */ + @java.lang.Override + public boolean hasIcon() { + return icon_ != null; + } + /** + * <code>.Image icon = 1;</code> + * @return The icon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getIcon() { + return icon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + /** + * <code>.Image icon = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder() { + return icon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + + public static final int ICONDIAMOND_FIELD_NUMBER = 2; + private long iconDiamond_ = 0L; + /** + * <code>int64 iconDiamond = 2;</code> + * @return The iconDiamond. + */ + @java.lang.Override + public long getIconDiamond() { + return iconDiamond_; + } + + public static final int LEVEL_FIELD_NUMBER = 3; + private long level_ = 0L; + /** + * <code>int64 level = 3;</code> + * @return The level. + */ + @java.lang.Override + public long getLevel() { + return level_; + } + + public static final int LEVELSTR_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object levelStr_ = ""; + /** + * <code>string levelStr = 4;</code> + * @return The levelStr. + */ + @java.lang.Override + public java.lang.String getLevelStr() { + java.lang.Object ref = levelStr_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + levelStr_ = s; + return s; + } + } + /** + * <code>string levelStr = 4;</code> + * @return The bytes for levelStr. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLevelStrBytes() { + java.lang.Object ref = levelStr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + levelStr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (icon_ != null) { + output.writeMessage(1, getIcon()); + } + if (iconDiamond_ != 0L) { + output.writeInt64(2, iconDiamond_); + } + if (level_ != 0L) { + output.writeInt64(3, level_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(levelStr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, levelStr_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (icon_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getIcon()); + } + if (iconDiamond_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, iconDiamond_); + } + if (level_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, level_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(levelStr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, levelStr_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon) obj; + + if (hasIcon() != other.hasIcon()) return false; + if (hasIcon()) { + if (!getIcon() + .equals(other.getIcon())) return false; + } + if (getIconDiamond() + != other.getIconDiamond()) return false; + if (getLevel() + != other.getLevel()) return false; + if (!getLevelStr() + .equals(other.getLevelStr())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasIcon()) { + hash = (37 * hash) + ICON_FIELD_NUMBER; + hash = (53 * hash) + getIcon().hashCode(); + } + hash = (37 * hash) + ICONDIAMOND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getIconDiamond()); + hash = (37 * hash) + LEVEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLevel()); + hash = (37 * hash) + LEVELSTR_FIELD_NUMBER; + hash = (53 * hash) + getLevelStr().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.PayGrade.GradeIcon} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.PayGrade.GradeIcon) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_GradeIcon_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_GradeIcon_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + icon_ = null; + if (iconBuilder_ != null) { + iconBuilder_.dispose(); + iconBuilder_ = null; + } + iconDiamond_ = 0L; + level_ = 0L; + levelStr_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_GradeIcon_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.icon_ = iconBuilder_ == null + ? icon_ + : iconBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.iconDiamond_ = iconDiamond_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.level_ = level_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.levelStr_ = levelStr_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.getDefaultInstance()) return this; + if (other.hasIcon()) { + mergeIcon(other.getIcon()); + } + if (other.getIconDiamond() != 0L) { + setIconDiamond(other.getIconDiamond()); + } + if (other.getLevel() != 0L) { + setLevel(other.getLevel()); + } + if (!other.getLevelStr().isEmpty()) { + levelStr_ = other.levelStr_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + iconDiamond_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + level_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + levelStr_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image icon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> iconBuilder_; + /** + * <code>.Image icon = 1;</code> + * @return Whether the icon field is set. + */ + public boolean hasIcon() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.Image icon = 1;</code> + * @return The icon. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getIcon() { + if (iconBuilder_ == null) { + return icon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } else { + return iconBuilder_.getMessage(); + } + } + /** + * <code>.Image icon = 1;</code> + */ + public Builder setIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (iconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + icon_ = value; + } else { + iconBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Image icon = 1;</code> + */ + public Builder setIcon( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (iconBuilder_ == null) { + icon_ = builderForValue.build(); + } else { + iconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Image icon = 1;</code> + */ + public Builder mergeIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (iconBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + icon_ != null && + icon_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getIconBuilder().mergeFrom(value); + } else { + icon_ = value; + } + } else { + iconBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.Image icon = 1;</code> + */ + public Builder clearIcon() { + bitField0_ = (bitField0_ & ~0x00000001); + icon_ = null; + if (iconBuilder_ != null) { + iconBuilder_.dispose(); + iconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image icon = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getIconBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getIconFieldBuilder().getBuilder(); + } + /** + * <code>.Image icon = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder() { + if (iconBuilder_ != null) { + return iconBuilder_.getMessageOrBuilder(); + } else { + return icon_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + } + /** + * <code>.Image icon = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getIconFieldBuilder() { + if (iconBuilder_ == null) { + iconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getIcon(), + getParentForChildren(), + isClean()); + icon_ = null; + } + return iconBuilder_; + } + + private long iconDiamond_ ; + /** + * <code>int64 iconDiamond = 2;</code> + * @return The iconDiamond. + */ + @java.lang.Override + public long getIconDiamond() { + return iconDiamond_; + } + /** + * <code>int64 iconDiamond = 2;</code> + * @param value The iconDiamond to set. + * @return This builder for chaining. + */ + public Builder setIconDiamond(long value) { + + iconDiamond_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>int64 iconDiamond = 2;</code> + * @return This builder for chaining. + */ + public Builder clearIconDiamond() { + bitField0_ = (bitField0_ & ~0x00000002); + iconDiamond_ = 0L; + onChanged(); + return this; + } + + private long level_ ; + /** + * <code>int64 level = 3;</code> + * @return The level. + */ + @java.lang.Override + public long getLevel() { + return level_; + } + /** + * <code>int64 level = 3;</code> + * @param value The level to set. + * @return This builder for chaining. + */ + public Builder setLevel(long value) { + + level_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>int64 level = 3;</code> + * @return This builder for chaining. + */ + public Builder clearLevel() { + bitField0_ = (bitField0_ & ~0x00000004); + level_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object levelStr_ = ""; + /** + * <code>string levelStr = 4;</code> + * @return The levelStr. + */ + public java.lang.String getLevelStr() { + java.lang.Object ref = levelStr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + levelStr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string levelStr = 4;</code> + * @return The bytes for levelStr. + */ + public com.google.protobuf.ByteString + getLevelStrBytes() { + java.lang.Object ref = levelStr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + levelStr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string levelStr = 4;</code> + * @param value The levelStr to set. + * @return This builder for chaining. + */ + public Builder setLevelStr( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + levelStr_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>string levelStr = 4;</code> + * @return This builder for chaining. + */ + public Builder clearLevelStr() { + levelStr_ = getDefaultInstance().getLevelStr(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * <code>string levelStr = 4;</code> + * @param value The bytes for levelStr to set. + * @return This builder for chaining. + */ + public Builder setLevelStrBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + levelStr_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.PayGrade.GradeIcon) + } + + // @@protoc_insertion_point(class_scope:User.PayGrade.GradeIcon) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<GradeIcon> + PARSER = new com.google.protobuf.AbstractParser<GradeIcon>() { + @java.lang.Override + public GradeIcon parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<GradeIcon> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<GradeIcon> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int TOTALDIAMONDCOUNT_FIELD_NUMBER = 1; + private long totalDiamondCount_ = 0L; + /** + * <code>int64 totalDiamondCount = 1;</code> + * @return The totalDiamondCount. + */ + @java.lang.Override + public long getTotalDiamondCount() { + return totalDiamondCount_; + } + + public static final int DIAMONDICON_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image diamondIcon_; + /** + * <code>.Image diamondIcon = 2;</code> + * @return Whether the diamondIcon field is set. + */ + @java.lang.Override + public boolean hasDiamondIcon() { + return diamondIcon_ != null; + } + /** + * <code>.Image diamondIcon = 2;</code> + * @return The diamondIcon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getDiamondIcon() { + return diamondIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : diamondIcon_; + } + /** + * <code>.Image diamondIcon = 2;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getDiamondIconOrBuilder() { + return diamondIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : diamondIcon_; + } + + public static final int NAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * <code>string name = 3;</code> + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * <code>string name = 3;</code> + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ICON_FIELD_NUMBER = 4; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image icon_; + /** + * <code>.Image icon = 4;</code> + * @return Whether the icon field is set. + */ + @java.lang.Override + public boolean hasIcon() { + return icon_ != null; + } + /** + * <code>.Image icon = 4;</code> + * @return The icon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getIcon() { + return icon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + /** + * <code>.Image icon = 4;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder() { + return icon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + + public static final int NEXTNAME_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object nextName_ = ""; + /** + * <code>string nextName = 5;</code> + * @return The nextName. + */ + @java.lang.Override + public java.lang.String getNextName() { + java.lang.Object ref = nextName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextName_ = s; + return s; + } + } + /** + * <code>string nextName = 5;</code> + * @return The bytes for nextName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextNameBytes() { + java.lang.Object ref = nextName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LEVEL_FIELD_NUMBER = 6; + private long level_ = 0L; + /** + * <code>int64 level = 6;</code> + * @return The level. + */ + @java.lang.Override + public long getLevel() { + return level_; + } + + public static final int NEXTICON_FIELD_NUMBER = 7; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image nextIcon_; + /** + * <code>.Image nextIcon = 7;</code> + * @return Whether the nextIcon field is set. + */ + @java.lang.Override + public boolean hasNextIcon() { + return nextIcon_ != null; + } + /** + * <code>.Image nextIcon = 7;</code> + * @return The nextIcon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getNextIcon() { + return nextIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : nextIcon_; + } + /** + * <code>.Image nextIcon = 7;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNextIconOrBuilder() { + return nextIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : nextIcon_; + } + + public static final int NEXTDIAMOND_FIELD_NUMBER = 8; + private long nextDiamond_ = 0L; + /** + * <code>int64 nextDiamond = 8;</code> + * @return The nextDiamond. + */ + @java.lang.Override + public long getNextDiamond() { + return nextDiamond_; + } + + public static final int NOWDIAMOND_FIELD_NUMBER = 9; + private long nowDiamond_ = 0L; + /** + * <code>int64 nowDiamond = 9;</code> + * @return The nowDiamond. + */ + @java.lang.Override + public long getNowDiamond() { + return nowDiamond_; + } + + public static final int THISGRADEMINDIAMOND_FIELD_NUMBER = 10; + private long thisGradeMinDiamond_ = 0L; + /** + * <code>int64 thisGradeMinDiamond = 10;</code> + * @return The thisGradeMinDiamond. + */ + @java.lang.Override + public long getThisGradeMinDiamond() { + return thisGradeMinDiamond_; + } + + public static final int THISGRADEMAXDIAMOND_FIELD_NUMBER = 11; + private long thisGradeMaxDiamond_ = 0L; + /** + * <code>int64 thisGradeMaxDiamond = 11;</code> + * @return The thisGradeMaxDiamond. + */ + @java.lang.Override + public long getThisGradeMaxDiamond() { + return thisGradeMaxDiamond_; + } + + public static final int PAYDIAMONDBAK_FIELD_NUMBER = 12; + private long payDiamondBak_ = 0L; + /** + * <code>int64 payDiamondBak = 12;</code> + * @return The payDiamondBak. + */ + @java.lang.Override + public long getPayDiamondBak() { + return payDiamondBak_; + } + + public static final int GRADEDESCRIBE_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private volatile java.lang.Object gradeDescribe_ = ""; + /** + * <code>string gradeDescribe = 13;</code> + * @return The gradeDescribe. + */ + @java.lang.Override + public java.lang.String getGradeDescribe() { + java.lang.Object ref = gradeDescribe_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gradeDescribe_ = s; + return s; + } + } + /** + * <code>string gradeDescribe = 13;</code> + * @return The bytes for gradeDescribe. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGradeDescribeBytes() { + java.lang.Object ref = gradeDescribe_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gradeDescribe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GRADEICONLIST_FIELD_NUMBER = 14; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon> gradeIconList_; + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon> getGradeIconListList() { + return gradeIconList_; + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder> + getGradeIconListOrBuilderList() { + return gradeIconList_; + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + @java.lang.Override + public int getGradeIconListCount() { + return gradeIconList_.size(); + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon getGradeIconList(int index) { + return gradeIconList_.get(index); + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder getGradeIconListOrBuilder( + int index) { + return gradeIconList_.get(index); + } + + public static final int SCREENCHATTYPE_FIELD_NUMBER = 15; + private long screenChatType_ = 0L; + /** + * <code>int64 screenChatType = 15;</code> + * @return The screenChatType. + */ + @java.lang.Override + public long getScreenChatType() { + return screenChatType_; + } + + public static final int IMICON_FIELD_NUMBER = 16; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image imIcon_; + /** + * <code>.Image imIcon = 16;</code> + * @return Whether the imIcon field is set. + */ + @java.lang.Override + public boolean hasImIcon() { + return imIcon_ != null; + } + /** + * <code>.Image imIcon = 16;</code> + * @return The imIcon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getImIcon() { + return imIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : imIcon_; + } + /** + * <code>.Image imIcon = 16;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImIconOrBuilder() { + return imIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : imIcon_; + } + + public static final int IMICONWITHLEVEL_FIELD_NUMBER = 17; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image imIconWithLevel_; + /** + * <code>.Image imIconWithLevel = 17;</code> + * @return Whether the imIconWithLevel field is set. + */ + @java.lang.Override + public boolean hasImIconWithLevel() { + return imIconWithLevel_ != null; + } + /** + * <code>.Image imIconWithLevel = 17;</code> + * @return The imIconWithLevel. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getImIconWithLevel() { + return imIconWithLevel_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : imIconWithLevel_; + } + /** + * <code>.Image imIconWithLevel = 17;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImIconWithLevelOrBuilder() { + return imIconWithLevel_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : imIconWithLevel_; + } + + public static final int LIVEICON_FIELD_NUMBER = 18; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image liveIcon_; + /** + * <code>.Image liveIcon = 18;</code> + * @return Whether the liveIcon field is set. + */ + @java.lang.Override + public boolean hasLiveIcon() { + return liveIcon_ != null; + } + /** + * <code>.Image liveIcon = 18;</code> + * @return The liveIcon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getLiveIcon() { + return liveIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : liveIcon_; + } + /** + * <code>.Image liveIcon = 18;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getLiveIconOrBuilder() { + return liveIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : liveIcon_; + } + + public static final int NEWIMICONWITHLEVEL_FIELD_NUMBER = 19; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image newImIconWithLevel_; + /** + * <code>.Image newImIconWithLevel = 19;</code> + * @return Whether the newImIconWithLevel field is set. + */ + @java.lang.Override + public boolean hasNewImIconWithLevel() { + return newImIconWithLevel_ != null; + } + /** + * <code>.Image newImIconWithLevel = 19;</code> + * @return The newImIconWithLevel. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getNewImIconWithLevel() { + return newImIconWithLevel_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : newImIconWithLevel_; + } + /** + * <code>.Image newImIconWithLevel = 19;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewImIconWithLevelOrBuilder() { + return newImIconWithLevel_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : newImIconWithLevel_; + } + + public static final int NEWLIVEICON_FIELD_NUMBER = 20; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image newLiveIcon_; + /** + * <code>.Image newLiveIcon = 20;</code> + * @return Whether the newLiveIcon field is set. + */ + @java.lang.Override + public boolean hasNewLiveIcon() { + return newLiveIcon_ != null; + } + /** + * <code>.Image newLiveIcon = 20;</code> + * @return The newLiveIcon. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getNewLiveIcon() { + return newLiveIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : newLiveIcon_; + } + /** + * <code>.Image newLiveIcon = 20;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewLiveIconOrBuilder() { + return newLiveIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : newLiveIcon_; + } + + public static final int UPGRADENEEDCONSUME_FIELD_NUMBER = 21; + private long upgradeNeedConsume_ = 0L; + /** + * <code>int64 upgradeNeedConsume = 21;</code> + * @return The upgradeNeedConsume. + */ + @java.lang.Override + public long getUpgradeNeedConsume() { + return upgradeNeedConsume_; + } + + public static final int NEXTPRIVILEGES_FIELD_NUMBER = 22; + @SuppressWarnings("serial") + private volatile java.lang.Object nextPrivileges_ = ""; + /** + * <code>string nextPrivileges = 22;</code> + * @return The nextPrivileges. + */ + @java.lang.Override + public java.lang.String getNextPrivileges() { + java.lang.Object ref = nextPrivileges_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPrivileges_ = s; + return s; + } + } + /** + * <code>string nextPrivileges = 22;</code> + * @return The bytes for nextPrivileges. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNextPrivilegesBytes() { + java.lang.Object ref = nextPrivileges_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPrivileges_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BACKGROUND_FIELD_NUMBER = 23; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image background_; + /** + * <code>.Image background = 23;</code> + * @return Whether the background field is set. + */ + @java.lang.Override + public boolean hasBackground() { + return background_ != null; + } + /** + * <code>.Image background = 23;</code> + * @return The background. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackground() { + return background_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : background_; + } + /** + * <code>.Image background = 23;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundOrBuilder() { + return background_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : background_; + } + + public static final int BACKGROUNDBACK_FIELD_NUMBER = 24; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image backgroundBack_; + /** + * <code>.Image backgroundBack = 24;</code> + * @return Whether the backgroundBack field is set. + */ + @java.lang.Override + public boolean hasBackgroundBack() { + return backgroundBack_ != null; + } + /** + * <code>.Image backgroundBack = 24;</code> + * @return The backgroundBack. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundBack() { + return backgroundBack_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundBack_; + } + /** + * <code>.Image backgroundBack = 24;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundBackOrBuilder() { + return backgroundBack_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundBack_; + } + + public static final int SCORE_FIELD_NUMBER = 25; + private long score_ = 0L; + /** + * <code>int64 score = 25;</code> + * @return The score. + */ + @java.lang.Override + public long getScore() { + return score_; + } + + public static final int GRADEBANNER_FIELD_NUMBER = 1001; + @SuppressWarnings("serial") + private volatile java.lang.Object gradeBanner_ = ""; + /** + * <pre> + * GradeBuffInfo buffInfo = 26; + * </pre> + * + * <code>string gradeBanner = 1001;</code> + * @return The gradeBanner. + */ + @java.lang.Override + public java.lang.String getGradeBanner() { + java.lang.Object ref = gradeBanner_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gradeBanner_ = s; + return s; + } + } + /** + * <pre> + * GradeBuffInfo buffInfo = 26; + * </pre> + * + * <code>string gradeBanner = 1001;</code> + * @return The bytes for gradeBanner. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGradeBannerBytes() { + java.lang.Object ref = gradeBanner_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gradeBanner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROFILEDIALOGBG_FIELD_NUMBER = 1002; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image profileDialogBg_; + /** + * <code>.Image profileDialogBg = 1002;</code> + * @return Whether the profileDialogBg field is set. + */ + @java.lang.Override + public boolean hasProfileDialogBg() { + return profileDialogBg_ != null; + } + /** + * <code>.Image profileDialogBg = 1002;</code> + * @return The profileDialogBg. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getProfileDialogBg() { + return profileDialogBg_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : profileDialogBg_; + } + /** + * <code>.Image profileDialogBg = 1002;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getProfileDialogBgOrBuilder() { + return profileDialogBg_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : profileDialogBg_; + } + + public static final int PROFILEDIALOGBGBACK_FIELD_NUMBER = 1003; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image profileDialogBgBack_; + /** + * <code>.Image profileDialogBgBack = 1003;</code> + * @return Whether the profileDialogBgBack field is set. + */ + @java.lang.Override + public boolean hasProfileDialogBgBack() { + return profileDialogBgBack_ != null; + } + /** + * <code>.Image profileDialogBgBack = 1003;</code> + * @return The profileDialogBgBack. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getProfileDialogBgBack() { + return profileDialogBgBack_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : profileDialogBgBack_; + } + /** + * <code>.Image profileDialogBgBack = 1003;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getProfileDialogBgBackOrBuilder() { + return profileDialogBgBack_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : profileDialogBgBack_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (totalDiamondCount_ != 0L) { + output.writeInt64(1, totalDiamondCount_); + } + if (diamondIcon_ != null) { + output.writeMessage(2, getDiamondIcon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + if (icon_ != null) { + output.writeMessage(4, getIcon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, nextName_); + } + if (level_ != 0L) { + output.writeInt64(6, level_); + } + if (nextIcon_ != null) { + output.writeMessage(7, getNextIcon()); + } + if (nextDiamond_ != 0L) { + output.writeInt64(8, nextDiamond_); + } + if (nowDiamond_ != 0L) { + output.writeInt64(9, nowDiamond_); + } + if (thisGradeMinDiamond_ != 0L) { + output.writeInt64(10, thisGradeMinDiamond_); + } + if (thisGradeMaxDiamond_ != 0L) { + output.writeInt64(11, thisGradeMaxDiamond_); + } + if (payDiamondBak_ != 0L) { + output.writeInt64(12, payDiamondBak_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gradeDescribe_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, gradeDescribe_); + } + for (int i = 0; i < gradeIconList_.size(); i++) { + output.writeMessage(14, gradeIconList_.get(i)); + } + if (screenChatType_ != 0L) { + output.writeInt64(15, screenChatType_); + } + if (imIcon_ != null) { + output.writeMessage(16, getImIcon()); + } + if (imIconWithLevel_ != null) { + output.writeMessage(17, getImIconWithLevel()); + } + if (liveIcon_ != null) { + output.writeMessage(18, getLiveIcon()); + } + if (newImIconWithLevel_ != null) { + output.writeMessage(19, getNewImIconWithLevel()); + } + if (newLiveIcon_ != null) { + output.writeMessage(20, getNewLiveIcon()); + } + if (upgradeNeedConsume_ != 0L) { + output.writeInt64(21, upgradeNeedConsume_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPrivileges_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 22, nextPrivileges_); + } + if (background_ != null) { + output.writeMessage(23, getBackground()); + } + if (backgroundBack_ != null) { + output.writeMessage(24, getBackgroundBack()); + } + if (score_ != 0L) { + output.writeInt64(25, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gradeBanner_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1001, gradeBanner_); + } + if (profileDialogBg_ != null) { + output.writeMessage(1002, getProfileDialogBg()); + } + if (profileDialogBgBack_ != null) { + output.writeMessage(1003, getProfileDialogBgBack()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (totalDiamondCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, totalDiamondCount_); + } + if (diamondIcon_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDiamondIcon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + if (icon_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getIcon()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, nextName_); + } + if (level_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, level_); + } + if (nextIcon_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getNextIcon()); + } + if (nextDiamond_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(8, nextDiamond_); + } + if (nowDiamond_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(9, nowDiamond_); + } + if (thisGradeMinDiamond_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(10, thisGradeMinDiamond_); + } + if (thisGradeMaxDiamond_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(11, thisGradeMaxDiamond_); + } + if (payDiamondBak_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(12, payDiamondBak_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gradeDescribe_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, gradeDescribe_); + } + for (int i = 0; i < gradeIconList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, gradeIconList_.get(i)); + } + if (screenChatType_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(15, screenChatType_); + } + if (imIcon_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getImIcon()); + } + if (imIconWithLevel_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getImIconWithLevel()); + } + if (liveIcon_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, getLiveIcon()); + } + if (newImIconWithLevel_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, getNewImIconWithLevel()); + } + if (newLiveIcon_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, getNewLiveIcon()); + } + if (upgradeNeedConsume_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(21, upgradeNeedConsume_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPrivileges_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, nextPrivileges_); + } + if (background_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, getBackground()); + } + if (backgroundBack_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, getBackgroundBack()); + } + if (score_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(25, score_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gradeBanner_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1001, gradeBanner_); + } + if (profileDialogBg_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1002, getProfileDialogBg()); + } + if (profileDialogBgBack_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1003, getProfileDialogBgBack()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade) obj; + + if (getTotalDiamondCount() + != other.getTotalDiamondCount()) return false; + if (hasDiamondIcon() != other.hasDiamondIcon()) return false; + if (hasDiamondIcon()) { + if (!getDiamondIcon() + .equals(other.getDiamondIcon())) return false; + } + if (!getName() + .equals(other.getName())) return false; + if (hasIcon() != other.hasIcon()) return false; + if (hasIcon()) { + if (!getIcon() + .equals(other.getIcon())) return false; + } + if (!getNextName() + .equals(other.getNextName())) return false; + if (getLevel() + != other.getLevel()) return false; + if (hasNextIcon() != other.hasNextIcon()) return false; + if (hasNextIcon()) { + if (!getNextIcon() + .equals(other.getNextIcon())) return false; + } + if (getNextDiamond() + != other.getNextDiamond()) return false; + if (getNowDiamond() + != other.getNowDiamond()) return false; + if (getThisGradeMinDiamond() + != other.getThisGradeMinDiamond()) return false; + if (getThisGradeMaxDiamond() + != other.getThisGradeMaxDiamond()) return false; + if (getPayDiamondBak() + != other.getPayDiamondBak()) return false; + if (!getGradeDescribe() + .equals(other.getGradeDescribe())) return false; + if (!getGradeIconListList() + .equals(other.getGradeIconListList())) return false; + if (getScreenChatType() + != other.getScreenChatType()) return false; + if (hasImIcon() != other.hasImIcon()) return false; + if (hasImIcon()) { + if (!getImIcon() + .equals(other.getImIcon())) return false; + } + if (hasImIconWithLevel() != other.hasImIconWithLevel()) return false; + if (hasImIconWithLevel()) { + if (!getImIconWithLevel() + .equals(other.getImIconWithLevel())) return false; + } + if (hasLiveIcon() != other.hasLiveIcon()) return false; + if (hasLiveIcon()) { + if (!getLiveIcon() + .equals(other.getLiveIcon())) return false; + } + if (hasNewImIconWithLevel() != other.hasNewImIconWithLevel()) return false; + if (hasNewImIconWithLevel()) { + if (!getNewImIconWithLevel() + .equals(other.getNewImIconWithLevel())) return false; + } + if (hasNewLiveIcon() != other.hasNewLiveIcon()) return false; + if (hasNewLiveIcon()) { + if (!getNewLiveIcon() + .equals(other.getNewLiveIcon())) return false; + } + if (getUpgradeNeedConsume() + != other.getUpgradeNeedConsume()) return false; + if (!getNextPrivileges() + .equals(other.getNextPrivileges())) return false; + if (hasBackground() != other.hasBackground()) return false; + if (hasBackground()) { + if (!getBackground() + .equals(other.getBackground())) return false; + } + if (hasBackgroundBack() != other.hasBackgroundBack()) return false; + if (hasBackgroundBack()) { + if (!getBackgroundBack() + .equals(other.getBackgroundBack())) return false; + } + if (getScore() + != other.getScore()) return false; + if (!getGradeBanner() + .equals(other.getGradeBanner())) return false; + if (hasProfileDialogBg() != other.hasProfileDialogBg()) return false; + if (hasProfileDialogBg()) { + if (!getProfileDialogBg() + .equals(other.getProfileDialogBg())) return false; + } + if (hasProfileDialogBgBack() != other.hasProfileDialogBgBack()) return false; + if (hasProfileDialogBgBack()) { + if (!getProfileDialogBgBack() + .equals(other.getProfileDialogBgBack())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOTALDIAMONDCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalDiamondCount()); + if (hasDiamondIcon()) { + hash = (37 * hash) + DIAMONDICON_FIELD_NUMBER; + hash = (53 * hash) + getDiamondIcon().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasIcon()) { + hash = (37 * hash) + ICON_FIELD_NUMBER; + hash = (53 * hash) + getIcon().hashCode(); + } + hash = (37 * hash) + NEXTNAME_FIELD_NUMBER; + hash = (53 * hash) + getNextName().hashCode(); + hash = (37 * hash) + LEVEL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLevel()); + if (hasNextIcon()) { + hash = (37 * hash) + NEXTICON_FIELD_NUMBER; + hash = (53 * hash) + getNextIcon().hashCode(); + } + hash = (37 * hash) + NEXTDIAMOND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNextDiamond()); + hash = (37 * hash) + NOWDIAMOND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNowDiamond()); + hash = (37 * hash) + THISGRADEMINDIAMOND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getThisGradeMinDiamond()); + hash = (37 * hash) + THISGRADEMAXDIAMOND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getThisGradeMaxDiamond()); + hash = (37 * hash) + PAYDIAMONDBAK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPayDiamondBak()); + hash = (37 * hash) + GRADEDESCRIBE_FIELD_NUMBER; + hash = (53 * hash) + getGradeDescribe().hashCode(); + if (getGradeIconListCount() > 0) { + hash = (37 * hash) + GRADEICONLIST_FIELD_NUMBER; + hash = (53 * hash) + getGradeIconListList().hashCode(); + } + hash = (37 * hash) + SCREENCHATTYPE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getScreenChatType()); + if (hasImIcon()) { + hash = (37 * hash) + IMICON_FIELD_NUMBER; + hash = (53 * hash) + getImIcon().hashCode(); + } + if (hasImIconWithLevel()) { + hash = (37 * hash) + IMICONWITHLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getImIconWithLevel().hashCode(); + } + if (hasLiveIcon()) { + hash = (37 * hash) + LIVEICON_FIELD_NUMBER; + hash = (53 * hash) + getLiveIcon().hashCode(); + } + if (hasNewImIconWithLevel()) { + hash = (37 * hash) + NEWIMICONWITHLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getNewImIconWithLevel().hashCode(); + } + if (hasNewLiveIcon()) { + hash = (37 * hash) + NEWLIVEICON_FIELD_NUMBER; + hash = (53 * hash) + getNewLiveIcon().hashCode(); + } + hash = (37 * hash) + UPGRADENEEDCONSUME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUpgradeNeedConsume()); + hash = (37 * hash) + NEXTPRIVILEGES_FIELD_NUMBER; + hash = (53 * hash) + getNextPrivileges().hashCode(); + if (hasBackground()) { + hash = (37 * hash) + BACKGROUND_FIELD_NUMBER; + hash = (53 * hash) + getBackground().hashCode(); + } + if (hasBackgroundBack()) { + hash = (37 * hash) + BACKGROUNDBACK_FIELD_NUMBER; + hash = (53 * hash) + getBackgroundBack().hashCode(); + } + hash = (37 * hash) + SCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getScore()); + hash = (37 * hash) + GRADEBANNER_FIELD_NUMBER; + hash = (53 * hash) + getGradeBanner().hashCode(); + if (hasProfileDialogBg()) { + hash = (37 * hash) + PROFILEDIALOGBG_FIELD_NUMBER; + hash = (53 * hash) + getProfileDialogBg().hashCode(); + } + if (hasProfileDialogBgBack()) { + hash = (37 * hash) + PROFILEDIALOGBGBACK_FIELD_NUMBER; + hash = (53 * hash) + getProfileDialogBgBack().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.PayGrade} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.PayGrade) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGradeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + totalDiamondCount_ = 0L; + diamondIcon_ = null; + if (diamondIconBuilder_ != null) { + diamondIconBuilder_.dispose(); + diamondIconBuilder_ = null; + } + name_ = ""; + icon_ = null; + if (iconBuilder_ != null) { + iconBuilder_.dispose(); + iconBuilder_ = null; + } + nextName_ = ""; + level_ = 0L; + nextIcon_ = null; + if (nextIconBuilder_ != null) { + nextIconBuilder_.dispose(); + nextIconBuilder_ = null; + } + nextDiamond_ = 0L; + nowDiamond_ = 0L; + thisGradeMinDiamond_ = 0L; + thisGradeMaxDiamond_ = 0L; + payDiamondBak_ = 0L; + gradeDescribe_ = ""; + if (gradeIconListBuilder_ == null) { + gradeIconList_ = java.util.Collections.emptyList(); + } else { + gradeIconList_ = null; + gradeIconListBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00002000); + screenChatType_ = 0L; + imIcon_ = null; + if (imIconBuilder_ != null) { + imIconBuilder_.dispose(); + imIconBuilder_ = null; + } + imIconWithLevel_ = null; + if (imIconWithLevelBuilder_ != null) { + imIconWithLevelBuilder_.dispose(); + imIconWithLevelBuilder_ = null; + } + liveIcon_ = null; + if (liveIconBuilder_ != null) { + liveIconBuilder_.dispose(); + liveIconBuilder_ = null; + } + newImIconWithLevel_ = null; + if (newImIconWithLevelBuilder_ != null) { + newImIconWithLevelBuilder_.dispose(); + newImIconWithLevelBuilder_ = null; + } + newLiveIcon_ = null; + if (newLiveIconBuilder_ != null) { + newLiveIconBuilder_.dispose(); + newLiveIconBuilder_ = null; + } + upgradeNeedConsume_ = 0L; + nextPrivileges_ = ""; + background_ = null; + if (backgroundBuilder_ != null) { + backgroundBuilder_.dispose(); + backgroundBuilder_ = null; + } + backgroundBack_ = null; + if (backgroundBackBuilder_ != null) { + backgroundBackBuilder_.dispose(); + backgroundBackBuilder_ = null; + } + score_ = 0L; + gradeBanner_ = ""; + profileDialogBg_ = null; + if (profileDialogBgBuilder_ != null) { + profileDialogBgBuilder_.dispose(); + profileDialogBgBuilder_ = null; + } + profileDialogBgBack_ = null; + if (profileDialogBgBackBuilder_ != null) { + profileDialogBgBackBuilder_.dispose(); + profileDialogBgBackBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_PayGrade_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade result) { + if (gradeIconListBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0)) { + gradeIconList_ = java.util.Collections.unmodifiableList(gradeIconList_); + bitField0_ = (bitField0_ & ~0x00002000); + } + result.gradeIconList_ = gradeIconList_; + } else { + result.gradeIconList_ = gradeIconListBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.totalDiamondCount_ = totalDiamondCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.diamondIcon_ = diamondIconBuilder_ == null + ? diamondIcon_ + : diamondIconBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.icon_ = iconBuilder_ == null + ? icon_ + : iconBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.nextName_ = nextName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.level_ = level_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.nextIcon_ = nextIconBuilder_ == null + ? nextIcon_ + : nextIconBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.nextDiamond_ = nextDiamond_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.nowDiamond_ = nowDiamond_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.thisGradeMinDiamond_ = thisGradeMinDiamond_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.thisGradeMaxDiamond_ = thisGradeMaxDiamond_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.payDiamondBak_ = payDiamondBak_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.gradeDescribe_ = gradeDescribe_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.screenChatType_ = screenChatType_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.imIcon_ = imIconBuilder_ == null + ? imIcon_ + : imIconBuilder_.build(); + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.imIconWithLevel_ = imIconWithLevelBuilder_ == null + ? imIconWithLevel_ + : imIconWithLevelBuilder_.build(); + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.liveIcon_ = liveIconBuilder_ == null + ? liveIcon_ + : liveIconBuilder_.build(); + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.newImIconWithLevel_ = newImIconWithLevelBuilder_ == null + ? newImIconWithLevel_ + : newImIconWithLevelBuilder_.build(); + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.newLiveIcon_ = newLiveIconBuilder_ == null + ? newLiveIcon_ + : newLiveIconBuilder_.build(); + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.upgradeNeedConsume_ = upgradeNeedConsume_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.nextPrivileges_ = nextPrivileges_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.background_ = backgroundBuilder_ == null + ? background_ + : backgroundBuilder_.build(); + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.backgroundBack_ = backgroundBackBuilder_ == null + ? backgroundBack_ + : backgroundBackBuilder_.build(); + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.score_ = score_; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.gradeBanner_ = gradeBanner_; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.profileDialogBg_ = profileDialogBgBuilder_ == null + ? profileDialogBg_ + : profileDialogBgBuilder_.build(); + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.profileDialogBgBack_ = profileDialogBgBackBuilder_ == null + ? profileDialogBgBack_ + : profileDialogBgBackBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.getDefaultInstance()) return this; + if (other.getTotalDiamondCount() != 0L) { + setTotalDiamondCount(other.getTotalDiamondCount()); + } + if (other.hasDiamondIcon()) { + mergeDiamondIcon(other.getDiamondIcon()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasIcon()) { + mergeIcon(other.getIcon()); + } + if (!other.getNextName().isEmpty()) { + nextName_ = other.nextName_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getLevel() != 0L) { + setLevel(other.getLevel()); + } + if (other.hasNextIcon()) { + mergeNextIcon(other.getNextIcon()); + } + if (other.getNextDiamond() != 0L) { + setNextDiamond(other.getNextDiamond()); + } + if (other.getNowDiamond() != 0L) { + setNowDiamond(other.getNowDiamond()); + } + if (other.getThisGradeMinDiamond() != 0L) { + setThisGradeMinDiamond(other.getThisGradeMinDiamond()); + } + if (other.getThisGradeMaxDiamond() != 0L) { + setThisGradeMaxDiamond(other.getThisGradeMaxDiamond()); + } + if (other.getPayDiamondBak() != 0L) { + setPayDiamondBak(other.getPayDiamondBak()); + } + if (!other.getGradeDescribe().isEmpty()) { + gradeDescribe_ = other.gradeDescribe_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (gradeIconListBuilder_ == null) { + if (!other.gradeIconList_.isEmpty()) { + if (gradeIconList_.isEmpty()) { + gradeIconList_ = other.gradeIconList_; + bitField0_ = (bitField0_ & ~0x00002000); + } else { + ensureGradeIconListIsMutable(); + gradeIconList_.addAll(other.gradeIconList_); + } + onChanged(); + } + } else { + if (!other.gradeIconList_.isEmpty()) { + if (gradeIconListBuilder_.isEmpty()) { + gradeIconListBuilder_.dispose(); + gradeIconListBuilder_ = null; + gradeIconList_ = other.gradeIconList_; + bitField0_ = (bitField0_ & ~0x00002000); + gradeIconListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGradeIconListFieldBuilder() : null; + } else { + gradeIconListBuilder_.addAllMessages(other.gradeIconList_); + } + } + } + if (other.getScreenChatType() != 0L) { + setScreenChatType(other.getScreenChatType()); + } + if (other.hasImIcon()) { + mergeImIcon(other.getImIcon()); + } + if (other.hasImIconWithLevel()) { + mergeImIconWithLevel(other.getImIconWithLevel()); + } + if (other.hasLiveIcon()) { + mergeLiveIcon(other.getLiveIcon()); + } + if (other.hasNewImIconWithLevel()) { + mergeNewImIconWithLevel(other.getNewImIconWithLevel()); + } + if (other.hasNewLiveIcon()) { + mergeNewLiveIcon(other.getNewLiveIcon()); + } + if (other.getUpgradeNeedConsume() != 0L) { + setUpgradeNeedConsume(other.getUpgradeNeedConsume()); + } + if (!other.getNextPrivileges().isEmpty()) { + nextPrivileges_ = other.nextPrivileges_; + bitField0_ |= 0x00200000; + onChanged(); + } + if (other.hasBackground()) { + mergeBackground(other.getBackground()); + } + if (other.hasBackgroundBack()) { + mergeBackgroundBack(other.getBackgroundBack()); + } + if (other.getScore() != 0L) { + setScore(other.getScore()); + } + if (!other.getGradeBanner().isEmpty()) { + gradeBanner_ = other.gradeBanner_; + bitField0_ |= 0x02000000; + onChanged(); + } + if (other.hasProfileDialogBg()) { + mergeProfileDialogBg(other.getProfileDialogBg()); + } + if (other.hasProfileDialogBgBack()) { + mergeProfileDialogBgBack(other.getProfileDialogBgBack()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + totalDiamondCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getDiamondIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + nextName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + level_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + input.readMessage( + getNextIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 64: { + nextDiamond_ = input.readInt64(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + nowDiamond_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + thisGradeMinDiamond_ = input.readInt64(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: { + thisGradeMaxDiamond_ = input.readInt64(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: { + payDiamondBak_ = input.readInt64(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 106: { + gradeDescribe_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon m = + input.readMessage( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.parser(), + extensionRegistry); + if (gradeIconListBuilder_ == null) { + ensureGradeIconListIsMutable(); + gradeIconList_.add(m); + } else { + gradeIconListBuilder_.addMessage(m); + } + break; + } // case 114 + case 120: { + screenChatType_ = input.readInt64(); + bitField0_ |= 0x00004000; + break; + } // case 120 + case 130: { + input.readMessage( + getImIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 138: { + input.readMessage( + getImIconWithLevelFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 138 + case 146: { + input.readMessage( + getLiveIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 146 + case 154: { + input.readMessage( + getNewImIconWithLevelFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 154 + case 162: { + input.readMessage( + getNewLiveIconFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00080000; + break; + } // case 162 + case 168: { + upgradeNeedConsume_ = input.readInt64(); + bitField0_ |= 0x00100000; + break; + } // case 168 + case 178: { + nextPrivileges_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00200000; + break; + } // case 178 + case 186: { + input.readMessage( + getBackgroundFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00400000; + break; + } // case 186 + case 194: { + input.readMessage( + getBackgroundBackFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00800000; + break; + } // case 194 + case 200: { + score_ = input.readInt64(); + bitField0_ |= 0x01000000; + break; + } // case 200 + case 8010: { + gradeBanner_ = input.readStringRequireUtf8(); + bitField0_ |= 0x02000000; + break; + } // case 8010 + case 8018: { + input.readMessage( + getProfileDialogBgFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x04000000; + break; + } // case 8018 + case 8026: { + input.readMessage( + getProfileDialogBgBackFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x08000000; + break; + } // case 8026 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long totalDiamondCount_ ; + /** + * <code>int64 totalDiamondCount = 1;</code> + * @return The totalDiamondCount. + */ + @java.lang.Override + public long getTotalDiamondCount() { + return totalDiamondCount_; + } + /** + * <code>int64 totalDiamondCount = 1;</code> + * @param value The totalDiamondCount to set. + * @return This builder for chaining. + */ + public Builder setTotalDiamondCount(long value) { + + totalDiamondCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>int64 totalDiamondCount = 1;</code> + * @return This builder for chaining. + */ + public Builder clearTotalDiamondCount() { + bitField0_ = (bitField0_ & ~0x00000001); + totalDiamondCount_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image diamondIcon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> diamondIconBuilder_; + /** + * <code>.Image diamondIcon = 2;</code> + * @return Whether the diamondIcon field is set. + */ + public boolean hasDiamondIcon() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * <code>.Image diamondIcon = 2;</code> + * @return The diamondIcon. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getDiamondIcon() { + if (diamondIconBuilder_ == null) { + return diamondIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : diamondIcon_; + } else { + return diamondIconBuilder_.getMessage(); + } + } + /** + * <code>.Image diamondIcon = 2;</code> + */ + public Builder setDiamondIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (diamondIconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + diamondIcon_ = value; + } else { + diamondIconBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.Image diamondIcon = 2;</code> + */ + public Builder setDiamondIcon( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (diamondIconBuilder_ == null) { + diamondIcon_ = builderForValue.build(); + } else { + diamondIconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.Image diamondIcon = 2;</code> + */ + public Builder mergeDiamondIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (diamondIconBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + diamondIcon_ != null && + diamondIcon_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getDiamondIconBuilder().mergeFrom(value); + } else { + diamondIcon_ = value; + } + } else { + diamondIconBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.Image diamondIcon = 2;</code> + */ + public Builder clearDiamondIcon() { + bitField0_ = (bitField0_ & ~0x00000002); + diamondIcon_ = null; + if (diamondIconBuilder_ != null) { + diamondIconBuilder_.dispose(); + diamondIconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image diamondIcon = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getDiamondIconBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDiamondIconFieldBuilder().getBuilder(); + } + /** + * <code>.Image diamondIcon = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getDiamondIconOrBuilder() { + if (diamondIconBuilder_ != null) { + return diamondIconBuilder_.getMessageOrBuilder(); + } else { + return diamondIcon_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : diamondIcon_; + } + } + /** + * <code>.Image diamondIcon = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getDiamondIconFieldBuilder() { + if (diamondIconBuilder_ == null) { + diamondIconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getDiamondIcon(), + getParentForChildren(), + isClean()); + diamondIcon_ = null; + } + return diamondIconBuilder_; + } + + private java.lang.Object name_ = ""; + /** + * <code>string name = 3;</code> + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string name = 3;</code> + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string name = 3;</code> + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>string name = 3;</code> + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * <code>string name = 3;</code> + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image icon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> iconBuilder_; + /** + * <code>.Image icon = 4;</code> + * @return Whether the icon field is set. + */ + public boolean hasIcon() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * <code>.Image icon = 4;</code> + * @return The icon. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getIcon() { + if (iconBuilder_ == null) { + return icon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } else { + return iconBuilder_.getMessage(); + } + } + /** + * <code>.Image icon = 4;</code> + */ + public Builder setIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (iconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + icon_ = value; + } else { + iconBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.Image icon = 4;</code> + */ + public Builder setIcon( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (iconBuilder_ == null) { + icon_ = builderForValue.build(); + } else { + iconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.Image icon = 4;</code> + */ + public Builder mergeIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (iconBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + icon_ != null && + icon_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getIconBuilder().mergeFrom(value); + } else { + icon_ = value; + } + } else { + iconBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.Image icon = 4;</code> + */ + public Builder clearIcon() { + bitField0_ = (bitField0_ & ~0x00000008); + icon_ = null; + if (iconBuilder_ != null) { + iconBuilder_.dispose(); + iconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image icon = 4;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getIconBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getIconFieldBuilder().getBuilder(); + } + /** + * <code>.Image icon = 4;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getIconOrBuilder() { + if (iconBuilder_ != null) { + return iconBuilder_.getMessageOrBuilder(); + } else { + return icon_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : icon_; + } + } + /** + * <code>.Image icon = 4;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getIconFieldBuilder() { + if (iconBuilder_ == null) { + iconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getIcon(), + getParentForChildren(), + isClean()); + icon_ = null; + } + return iconBuilder_; + } + + private java.lang.Object nextName_ = ""; + /** + * <code>string nextName = 5;</code> + * @return The nextName. + */ + public java.lang.String getNextName() { + java.lang.Object ref = nextName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string nextName = 5;</code> + * @return The bytes for nextName. + */ + public com.google.protobuf.ByteString + getNextNameBytes() { + java.lang.Object ref = nextName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string nextName = 5;</code> + * @param value The nextName to set. + * @return This builder for chaining. + */ + public Builder setNextName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>string nextName = 5;</code> + * @return This builder for chaining. + */ + public Builder clearNextName() { + nextName_ = getDefaultInstance().getNextName(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * <code>string nextName = 5;</code> + * @param value The bytes for nextName to set. + * @return This builder for chaining. + */ + public Builder setNextNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextName_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private long level_ ; + /** + * <code>int64 level = 6;</code> + * @return The level. + */ + @java.lang.Override + public long getLevel() { + return level_; + } + /** + * <code>int64 level = 6;</code> + * @param value The level to set. + * @return This builder for chaining. + */ + public Builder setLevel(long value) { + + level_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>int64 level = 6;</code> + * @return This builder for chaining. + */ + public Builder clearLevel() { + bitField0_ = (bitField0_ & ~0x00000020); + level_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image nextIcon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> nextIconBuilder_; + /** + * <code>.Image nextIcon = 7;</code> + * @return Whether the nextIcon field is set. + */ + public boolean hasNextIcon() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * <code>.Image nextIcon = 7;</code> + * @return The nextIcon. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getNextIcon() { + if (nextIconBuilder_ == null) { + return nextIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : nextIcon_; + } else { + return nextIconBuilder_.getMessage(); + } + } + /** + * <code>.Image nextIcon = 7;</code> + */ + public Builder setNextIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (nextIconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nextIcon_ = value; + } else { + nextIconBuilder_.setMessage(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.Image nextIcon = 7;</code> + */ + public Builder setNextIcon( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (nextIconBuilder_ == null) { + nextIcon_ = builderForValue.build(); + } else { + nextIconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.Image nextIcon = 7;</code> + */ + public Builder mergeNextIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (nextIconBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0) && + nextIcon_ != null && + nextIcon_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getNextIconBuilder().mergeFrom(value); + } else { + nextIcon_ = value; + } + } else { + nextIconBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.Image nextIcon = 7;</code> + */ + public Builder clearNextIcon() { + bitField0_ = (bitField0_ & ~0x00000040); + nextIcon_ = null; + if (nextIconBuilder_ != null) { + nextIconBuilder_.dispose(); + nextIconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image nextIcon = 7;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getNextIconBuilder() { + bitField0_ |= 0x00000040; + onChanged(); + return getNextIconFieldBuilder().getBuilder(); + } + /** + * <code>.Image nextIcon = 7;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNextIconOrBuilder() { + if (nextIconBuilder_ != null) { + return nextIconBuilder_.getMessageOrBuilder(); + } else { + return nextIcon_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : nextIcon_; + } + } + /** + * <code>.Image nextIcon = 7;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getNextIconFieldBuilder() { + if (nextIconBuilder_ == null) { + nextIconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getNextIcon(), + getParentForChildren(), + isClean()); + nextIcon_ = null; + } + return nextIconBuilder_; + } + + private long nextDiamond_ ; + /** + * <code>int64 nextDiamond = 8;</code> + * @return The nextDiamond. + */ + @java.lang.Override + public long getNextDiamond() { + return nextDiamond_; + } + /** + * <code>int64 nextDiamond = 8;</code> + * @param value The nextDiamond to set. + * @return This builder for chaining. + */ + public Builder setNextDiamond(long value) { + + nextDiamond_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>int64 nextDiamond = 8;</code> + * @return This builder for chaining. + */ + public Builder clearNextDiamond() { + bitField0_ = (bitField0_ & ~0x00000080); + nextDiamond_ = 0L; + onChanged(); + return this; + } + + private long nowDiamond_ ; + /** + * <code>int64 nowDiamond = 9;</code> + * @return The nowDiamond. + */ + @java.lang.Override + public long getNowDiamond() { + return nowDiamond_; + } + /** + * <code>int64 nowDiamond = 9;</code> + * @param value The nowDiamond to set. + * @return This builder for chaining. + */ + public Builder setNowDiamond(long value) { + + nowDiamond_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>int64 nowDiamond = 9;</code> + * @return This builder for chaining. + */ + public Builder clearNowDiamond() { + bitField0_ = (bitField0_ & ~0x00000100); + nowDiamond_ = 0L; + onChanged(); + return this; + } + + private long thisGradeMinDiamond_ ; + /** + * <code>int64 thisGradeMinDiamond = 10;</code> + * @return The thisGradeMinDiamond. + */ + @java.lang.Override + public long getThisGradeMinDiamond() { + return thisGradeMinDiamond_; + } + /** + * <code>int64 thisGradeMinDiamond = 10;</code> + * @param value The thisGradeMinDiamond to set. + * @return This builder for chaining. + */ + public Builder setThisGradeMinDiamond(long value) { + + thisGradeMinDiamond_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>int64 thisGradeMinDiamond = 10;</code> + * @return This builder for chaining. + */ + public Builder clearThisGradeMinDiamond() { + bitField0_ = (bitField0_ & ~0x00000200); + thisGradeMinDiamond_ = 0L; + onChanged(); + return this; + } + + private long thisGradeMaxDiamond_ ; + /** + * <code>int64 thisGradeMaxDiamond = 11;</code> + * @return The thisGradeMaxDiamond. + */ + @java.lang.Override + public long getThisGradeMaxDiamond() { + return thisGradeMaxDiamond_; + } + /** + * <code>int64 thisGradeMaxDiamond = 11;</code> + * @param value The thisGradeMaxDiamond to set. + * @return This builder for chaining. + */ + public Builder setThisGradeMaxDiamond(long value) { + + thisGradeMaxDiamond_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * <code>int64 thisGradeMaxDiamond = 11;</code> + * @return This builder for chaining. + */ + public Builder clearThisGradeMaxDiamond() { + bitField0_ = (bitField0_ & ~0x00000400); + thisGradeMaxDiamond_ = 0L; + onChanged(); + return this; + } + + private long payDiamondBak_ ; + /** + * <code>int64 payDiamondBak = 12;</code> + * @return The payDiamondBak. + */ + @java.lang.Override + public long getPayDiamondBak() { + return payDiamondBak_; + } + /** + * <code>int64 payDiamondBak = 12;</code> + * @param value The payDiamondBak to set. + * @return This builder for chaining. + */ + public Builder setPayDiamondBak(long value) { + + payDiamondBak_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * <code>int64 payDiamondBak = 12;</code> + * @return This builder for chaining. + */ + public Builder clearPayDiamondBak() { + bitField0_ = (bitField0_ & ~0x00000800); + payDiamondBak_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object gradeDescribe_ = ""; + /** + * <code>string gradeDescribe = 13;</code> + * @return The gradeDescribe. + */ + public java.lang.String getGradeDescribe() { + java.lang.Object ref = gradeDescribe_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gradeDescribe_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string gradeDescribe = 13;</code> + * @return The bytes for gradeDescribe. + */ + public com.google.protobuf.ByteString + getGradeDescribeBytes() { + java.lang.Object ref = gradeDescribe_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gradeDescribe_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string gradeDescribe = 13;</code> + * @param value The gradeDescribe to set. + * @return This builder for chaining. + */ + public Builder setGradeDescribe( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + gradeDescribe_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * <code>string gradeDescribe = 13;</code> + * @return This builder for chaining. + */ + public Builder clearGradeDescribe() { + gradeDescribe_ = getDefaultInstance().getGradeDescribe(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + * <code>string gradeDescribe = 13;</code> + * @param value The bytes for gradeDescribe to set. + * @return This builder for chaining. + */ + public Builder setGradeDescribeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + gradeDescribe_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon> gradeIconList_ = + java.util.Collections.emptyList(); + private void ensureGradeIconListIsMutable() { + if (!((bitField0_ & 0x00002000) != 0)) { + gradeIconList_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon>(gradeIconList_); + bitField0_ |= 0x00002000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder> gradeIconListBuilder_; + + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon> getGradeIconListList() { + if (gradeIconListBuilder_ == null) { + return java.util.Collections.unmodifiableList(gradeIconList_); + } else { + return gradeIconListBuilder_.getMessageList(); + } + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public int getGradeIconListCount() { + if (gradeIconListBuilder_ == null) { + return gradeIconList_.size(); + } else { + return gradeIconListBuilder_.getCount(); + } + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon getGradeIconList(int index) { + if (gradeIconListBuilder_ == null) { + return gradeIconList_.get(index); + } else { + return gradeIconListBuilder_.getMessage(index); + } + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public Builder setGradeIconList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon value) { + if (gradeIconListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGradeIconListIsMutable(); + gradeIconList_.set(index, value); + onChanged(); + } else { + gradeIconListBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public Builder setGradeIconList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder builderForValue) { + if (gradeIconListBuilder_ == null) { + ensureGradeIconListIsMutable(); + gradeIconList_.set(index, builderForValue.build()); + onChanged(); + } else { + gradeIconListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public Builder addGradeIconList(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon value) { + if (gradeIconListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGradeIconListIsMutable(); + gradeIconList_.add(value); + onChanged(); + } else { + gradeIconListBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public Builder addGradeIconList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon value) { + if (gradeIconListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGradeIconListIsMutable(); + gradeIconList_.add(index, value); + onChanged(); + } else { + gradeIconListBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public Builder addGradeIconList( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder builderForValue) { + if (gradeIconListBuilder_ == null) { + ensureGradeIconListIsMutable(); + gradeIconList_.add(builderForValue.build()); + onChanged(); + } else { + gradeIconListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public Builder addGradeIconList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder builderForValue) { + if (gradeIconListBuilder_ == null) { + ensureGradeIconListIsMutable(); + gradeIconList_.add(index, builderForValue.build()); + onChanged(); + } else { + gradeIconListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public Builder addAllGradeIconList( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon> values) { + if (gradeIconListBuilder_ == null) { + ensureGradeIconListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, gradeIconList_); + onChanged(); + } else { + gradeIconListBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public Builder clearGradeIconList() { + if (gradeIconListBuilder_ == null) { + gradeIconList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + } else { + gradeIconListBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public Builder removeGradeIconList(int index) { + if (gradeIconListBuilder_ == null) { + ensureGradeIconListIsMutable(); + gradeIconList_.remove(index); + onChanged(); + } else { + gradeIconListBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder getGradeIconListBuilder( + int index) { + return getGradeIconListFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder getGradeIconListOrBuilder( + int index) { + if (gradeIconListBuilder_ == null) { + return gradeIconList_.get(index); } else { + return gradeIconListBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder> + getGradeIconListOrBuilderList() { + if (gradeIconListBuilder_ != null) { + return gradeIconListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(gradeIconList_); + } + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder addGradeIconListBuilder() { + return getGradeIconListFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.getDefaultInstance()); + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder addGradeIconListBuilder( + int index) { + return getGradeIconListFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.getDefaultInstance()); + } + /** + * <code>repeated .User.PayGrade.GradeIcon gradeIconList = 14;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder> + getGradeIconListBuilderList() { + return getGradeIconListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder> + getGradeIconListFieldBuilder() { + if (gradeIconListBuilder_ == null) { + gradeIconListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIcon.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.GradeIconOrBuilder>( + gradeIconList_, + ((bitField0_ & 0x00002000) != 0), + getParentForChildren(), + isClean()); + gradeIconList_ = null; + } + return gradeIconListBuilder_; + } + + private long screenChatType_ ; + /** + * <code>int64 screenChatType = 15;</code> + * @return The screenChatType. + */ + @java.lang.Override + public long getScreenChatType() { + return screenChatType_; + } + /** + * <code>int64 screenChatType = 15;</code> + * @param value The screenChatType to set. + * @return This builder for chaining. + */ + public Builder setScreenChatType(long value) { + + screenChatType_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <code>int64 screenChatType = 15;</code> + * @return This builder for chaining. + */ + public Builder clearScreenChatType() { + bitField0_ = (bitField0_ & ~0x00004000); + screenChatType_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image imIcon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> imIconBuilder_; + /** + * <code>.Image imIcon = 16;</code> + * @return Whether the imIcon field is set. + */ + public boolean hasImIcon() { + return ((bitField0_ & 0x00008000) != 0); + } + /** + * <code>.Image imIcon = 16;</code> + * @return The imIcon. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getImIcon() { + if (imIconBuilder_ == null) { + return imIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : imIcon_; + } else { + return imIconBuilder_.getMessage(); + } + } + /** + * <code>.Image imIcon = 16;</code> + */ + public Builder setImIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (imIconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imIcon_ = value; + } else { + imIconBuilder_.setMessage(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>.Image imIcon = 16;</code> + */ + public Builder setImIcon( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (imIconBuilder_ == null) { + imIcon_ = builderForValue.build(); + } else { + imIconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>.Image imIcon = 16;</code> + */ + public Builder mergeImIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (imIconBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) && + imIcon_ != null && + imIcon_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getImIconBuilder().mergeFrom(value); + } else { + imIcon_ = value; + } + } else { + imIconBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>.Image imIcon = 16;</code> + */ + public Builder clearImIcon() { + bitField0_ = (bitField0_ & ~0x00008000); + imIcon_ = null; + if (imIconBuilder_ != null) { + imIconBuilder_.dispose(); + imIconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image imIcon = 16;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getImIconBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getImIconFieldBuilder().getBuilder(); + } + /** + * <code>.Image imIcon = 16;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImIconOrBuilder() { + if (imIconBuilder_ != null) { + return imIconBuilder_.getMessageOrBuilder(); + } else { + return imIcon_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : imIcon_; + } + } + /** + * <code>.Image imIcon = 16;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getImIconFieldBuilder() { + if (imIconBuilder_ == null) { + imIconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getImIcon(), + getParentForChildren(), + isClean()); + imIcon_ = null; + } + return imIconBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image imIconWithLevel_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> imIconWithLevelBuilder_; + /** + * <code>.Image imIconWithLevel = 17;</code> + * @return Whether the imIconWithLevel field is set. + */ + public boolean hasImIconWithLevel() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * <code>.Image imIconWithLevel = 17;</code> + * @return The imIconWithLevel. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getImIconWithLevel() { + if (imIconWithLevelBuilder_ == null) { + return imIconWithLevel_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : imIconWithLevel_; + } else { + return imIconWithLevelBuilder_.getMessage(); + } + } + /** + * <code>.Image imIconWithLevel = 17;</code> + */ + public Builder setImIconWithLevel(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (imIconWithLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + imIconWithLevel_ = value; + } else { + imIconWithLevelBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * <code>.Image imIconWithLevel = 17;</code> + */ + public Builder setImIconWithLevel( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (imIconWithLevelBuilder_ == null) { + imIconWithLevel_ = builderForValue.build(); + } else { + imIconWithLevelBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * <code>.Image imIconWithLevel = 17;</code> + */ + public Builder mergeImIconWithLevel(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (imIconWithLevelBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) && + imIconWithLevel_ != null && + imIconWithLevel_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getImIconWithLevelBuilder().mergeFrom(value); + } else { + imIconWithLevel_ = value; + } + } else { + imIconWithLevelBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * <code>.Image imIconWithLevel = 17;</code> + */ + public Builder clearImIconWithLevel() { + bitField0_ = (bitField0_ & ~0x00010000); + imIconWithLevel_ = null; + if (imIconWithLevelBuilder_ != null) { + imIconWithLevelBuilder_.dispose(); + imIconWithLevelBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image imIconWithLevel = 17;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getImIconWithLevelBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getImIconWithLevelFieldBuilder().getBuilder(); + } + /** + * <code>.Image imIconWithLevel = 17;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getImIconWithLevelOrBuilder() { + if (imIconWithLevelBuilder_ != null) { + return imIconWithLevelBuilder_.getMessageOrBuilder(); + } else { + return imIconWithLevel_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : imIconWithLevel_; + } + } + /** + * <code>.Image imIconWithLevel = 17;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getImIconWithLevelFieldBuilder() { + if (imIconWithLevelBuilder_ == null) { + imIconWithLevelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getImIconWithLevel(), + getParentForChildren(), + isClean()); + imIconWithLevel_ = null; + } + return imIconWithLevelBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image liveIcon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> liveIconBuilder_; + /** + * <code>.Image liveIcon = 18;</code> + * @return Whether the liveIcon field is set. + */ + public boolean hasLiveIcon() { + return ((bitField0_ & 0x00020000) != 0); + } + /** + * <code>.Image liveIcon = 18;</code> + * @return The liveIcon. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getLiveIcon() { + if (liveIconBuilder_ == null) { + return liveIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : liveIcon_; + } else { + return liveIconBuilder_.getMessage(); + } + } + /** + * <code>.Image liveIcon = 18;</code> + */ + public Builder setLiveIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (liveIconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + liveIcon_ = value; + } else { + liveIconBuilder_.setMessage(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * <code>.Image liveIcon = 18;</code> + */ + public Builder setLiveIcon( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (liveIconBuilder_ == null) { + liveIcon_ = builderForValue.build(); + } else { + liveIconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * <code>.Image liveIcon = 18;</code> + */ + public Builder mergeLiveIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (liveIconBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0) && + liveIcon_ != null && + liveIcon_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getLiveIconBuilder().mergeFrom(value); + } else { + liveIcon_ = value; + } + } else { + liveIconBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * <code>.Image liveIcon = 18;</code> + */ + public Builder clearLiveIcon() { + bitField0_ = (bitField0_ & ~0x00020000); + liveIcon_ = null; + if (liveIconBuilder_ != null) { + liveIconBuilder_.dispose(); + liveIconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image liveIcon = 18;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getLiveIconBuilder() { + bitField0_ |= 0x00020000; + onChanged(); + return getLiveIconFieldBuilder().getBuilder(); + } + /** + * <code>.Image liveIcon = 18;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getLiveIconOrBuilder() { + if (liveIconBuilder_ != null) { + return liveIconBuilder_.getMessageOrBuilder(); + } else { + return liveIcon_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : liveIcon_; + } + } + /** + * <code>.Image liveIcon = 18;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getLiveIconFieldBuilder() { + if (liveIconBuilder_ == null) { + liveIconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getLiveIcon(), + getParentForChildren(), + isClean()); + liveIcon_ = null; + } + return liveIconBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image newImIconWithLevel_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> newImIconWithLevelBuilder_; + /** + * <code>.Image newImIconWithLevel = 19;</code> + * @return Whether the newImIconWithLevel field is set. + */ + public boolean hasNewImIconWithLevel() { + return ((bitField0_ & 0x00040000) != 0); + } + /** + * <code>.Image newImIconWithLevel = 19;</code> + * @return The newImIconWithLevel. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getNewImIconWithLevel() { + if (newImIconWithLevelBuilder_ == null) { + return newImIconWithLevel_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : newImIconWithLevel_; + } else { + return newImIconWithLevelBuilder_.getMessage(); + } + } + /** + * <code>.Image newImIconWithLevel = 19;</code> + */ + public Builder setNewImIconWithLevel(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (newImIconWithLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + newImIconWithLevel_ = value; + } else { + newImIconWithLevelBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * <code>.Image newImIconWithLevel = 19;</code> + */ + public Builder setNewImIconWithLevel( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (newImIconWithLevelBuilder_ == null) { + newImIconWithLevel_ = builderForValue.build(); + } else { + newImIconWithLevelBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * <code>.Image newImIconWithLevel = 19;</code> + */ + public Builder mergeNewImIconWithLevel(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (newImIconWithLevelBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) && + newImIconWithLevel_ != null && + newImIconWithLevel_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getNewImIconWithLevelBuilder().mergeFrom(value); + } else { + newImIconWithLevel_ = value; + } + } else { + newImIconWithLevelBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * <code>.Image newImIconWithLevel = 19;</code> + */ + public Builder clearNewImIconWithLevel() { + bitField0_ = (bitField0_ & ~0x00040000); + newImIconWithLevel_ = null; + if (newImIconWithLevelBuilder_ != null) { + newImIconWithLevelBuilder_.dispose(); + newImIconWithLevelBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image newImIconWithLevel = 19;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getNewImIconWithLevelBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return getNewImIconWithLevelFieldBuilder().getBuilder(); + } + /** + * <code>.Image newImIconWithLevel = 19;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewImIconWithLevelOrBuilder() { + if (newImIconWithLevelBuilder_ != null) { + return newImIconWithLevelBuilder_.getMessageOrBuilder(); + } else { + return newImIconWithLevel_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : newImIconWithLevel_; + } + } + /** + * <code>.Image newImIconWithLevel = 19;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getNewImIconWithLevelFieldBuilder() { + if (newImIconWithLevelBuilder_ == null) { + newImIconWithLevelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getNewImIconWithLevel(), + getParentForChildren(), + isClean()); + newImIconWithLevel_ = null; + } + return newImIconWithLevelBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image newLiveIcon_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> newLiveIconBuilder_; + /** + * <code>.Image newLiveIcon = 20;</code> + * @return Whether the newLiveIcon field is set. + */ + public boolean hasNewLiveIcon() { + return ((bitField0_ & 0x00080000) != 0); + } + /** + * <code>.Image newLiveIcon = 20;</code> + * @return The newLiveIcon. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getNewLiveIcon() { + if (newLiveIconBuilder_ == null) { + return newLiveIcon_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : newLiveIcon_; + } else { + return newLiveIconBuilder_.getMessage(); + } + } + /** + * <code>.Image newLiveIcon = 20;</code> + */ + public Builder setNewLiveIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (newLiveIconBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + newLiveIcon_ = value; + } else { + newLiveIconBuilder_.setMessage(value); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * <code>.Image newLiveIcon = 20;</code> + */ + public Builder setNewLiveIcon( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (newLiveIconBuilder_ == null) { + newLiveIcon_ = builderForValue.build(); + } else { + newLiveIconBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * <code>.Image newLiveIcon = 20;</code> + */ + public Builder mergeNewLiveIcon(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (newLiveIconBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0) && + newLiveIcon_ != null && + newLiveIcon_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getNewLiveIconBuilder().mergeFrom(value); + } else { + newLiveIcon_ = value; + } + } else { + newLiveIconBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * <code>.Image newLiveIcon = 20;</code> + */ + public Builder clearNewLiveIcon() { + bitField0_ = (bitField0_ & ~0x00080000); + newLiveIcon_ = null; + if (newLiveIconBuilder_ != null) { + newLiveIconBuilder_.dispose(); + newLiveIconBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image newLiveIcon = 20;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getNewLiveIconBuilder() { + bitField0_ |= 0x00080000; + onChanged(); + return getNewLiveIconFieldBuilder().getBuilder(); + } + /** + * <code>.Image newLiveIcon = 20;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewLiveIconOrBuilder() { + if (newLiveIconBuilder_ != null) { + return newLiveIconBuilder_.getMessageOrBuilder(); + } else { + return newLiveIcon_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : newLiveIcon_; + } + } + /** + * <code>.Image newLiveIcon = 20;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getNewLiveIconFieldBuilder() { + if (newLiveIconBuilder_ == null) { + newLiveIconBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getNewLiveIcon(), + getParentForChildren(), + isClean()); + newLiveIcon_ = null; + } + return newLiveIconBuilder_; + } + + private long upgradeNeedConsume_ ; + /** + * <code>int64 upgradeNeedConsume = 21;</code> + * @return The upgradeNeedConsume. + */ + @java.lang.Override + public long getUpgradeNeedConsume() { + return upgradeNeedConsume_; + } + /** + * <code>int64 upgradeNeedConsume = 21;</code> + * @param value The upgradeNeedConsume to set. + * @return This builder for chaining. + */ + public Builder setUpgradeNeedConsume(long value) { + + upgradeNeedConsume_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * <code>int64 upgradeNeedConsume = 21;</code> + * @return This builder for chaining. + */ + public Builder clearUpgradeNeedConsume() { + bitField0_ = (bitField0_ & ~0x00100000); + upgradeNeedConsume_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object nextPrivileges_ = ""; + /** + * <code>string nextPrivileges = 22;</code> + * @return The nextPrivileges. + */ + public java.lang.String getNextPrivileges() { + java.lang.Object ref = nextPrivileges_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPrivileges_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string nextPrivileges = 22;</code> + * @return The bytes for nextPrivileges. + */ + public com.google.protobuf.ByteString + getNextPrivilegesBytes() { + java.lang.Object ref = nextPrivileges_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nextPrivileges_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string nextPrivileges = 22;</code> + * @param value The nextPrivileges to set. + * @return This builder for chaining. + */ + public Builder setNextPrivileges( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nextPrivileges_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * <code>string nextPrivileges = 22;</code> + * @return This builder for chaining. + */ + public Builder clearNextPrivileges() { + nextPrivileges_ = getDefaultInstance().getNextPrivileges(); + bitField0_ = (bitField0_ & ~0x00200000); + onChanged(); + return this; + } + /** + * <code>string nextPrivileges = 22;</code> + * @param value The bytes for nextPrivileges to set. + * @return This builder for chaining. + */ + public Builder setNextPrivilegesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nextPrivileges_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image background_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> backgroundBuilder_; + /** + * <code>.Image background = 23;</code> + * @return Whether the background field is set. + */ + public boolean hasBackground() { + return ((bitField0_ & 0x00400000) != 0); + } + /** + * <code>.Image background = 23;</code> + * @return The background. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackground() { + if (backgroundBuilder_ == null) { + return background_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : background_; + } else { + return backgroundBuilder_.getMessage(); + } + } + /** + * <code>.Image background = 23;</code> + */ + public Builder setBackground(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + background_ = value; + } else { + backgroundBuilder_.setMessage(value); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * <code>.Image background = 23;</code> + */ + public Builder setBackground( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (backgroundBuilder_ == null) { + background_ = builderForValue.build(); + } else { + backgroundBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * <code>.Image background = 23;</code> + */ + public Builder mergeBackground(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundBuilder_ == null) { + if (((bitField0_ & 0x00400000) != 0) && + background_ != null && + background_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBackgroundBuilder().mergeFrom(value); + } else { + background_ = value; + } + } else { + backgroundBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * <code>.Image background = 23;</code> + */ + public Builder clearBackground() { + bitField0_ = (bitField0_ & ~0x00400000); + background_ = null; + if (backgroundBuilder_ != null) { + backgroundBuilder_.dispose(); + backgroundBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image background = 23;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBackgroundBuilder() { + bitField0_ |= 0x00400000; + onChanged(); + return getBackgroundFieldBuilder().getBuilder(); + } + /** + * <code>.Image background = 23;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundOrBuilder() { + if (backgroundBuilder_ != null) { + return backgroundBuilder_.getMessageOrBuilder(); + } else { + return background_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : background_; + } + } + /** + * <code>.Image background = 23;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBackgroundFieldBuilder() { + if (backgroundBuilder_ == null) { + backgroundBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBackground(), + getParentForChildren(), + isClean()); + background_ = null; + } + return backgroundBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image backgroundBack_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> backgroundBackBuilder_; + /** + * <code>.Image backgroundBack = 24;</code> + * @return Whether the backgroundBack field is set. + */ + public boolean hasBackgroundBack() { + return ((bitField0_ & 0x00800000) != 0); + } + /** + * <code>.Image backgroundBack = 24;</code> + * @return The backgroundBack. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBackgroundBack() { + if (backgroundBackBuilder_ == null) { + return backgroundBack_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundBack_; + } else { + return backgroundBackBuilder_.getMessage(); + } + } + /** + * <code>.Image backgroundBack = 24;</code> + */ + public Builder setBackgroundBack(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundBackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backgroundBack_ = value; + } else { + backgroundBackBuilder_.setMessage(value); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * <code>.Image backgroundBack = 24;</code> + */ + public Builder setBackgroundBack( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (backgroundBackBuilder_ == null) { + backgroundBack_ = builderForValue.build(); + } else { + backgroundBackBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * <code>.Image backgroundBack = 24;</code> + */ + public Builder mergeBackgroundBack(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (backgroundBackBuilder_ == null) { + if (((bitField0_ & 0x00800000) != 0) && + backgroundBack_ != null && + backgroundBack_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBackgroundBackBuilder().mergeFrom(value); + } else { + backgroundBack_ = value; + } + } else { + backgroundBackBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * <code>.Image backgroundBack = 24;</code> + */ + public Builder clearBackgroundBack() { + bitField0_ = (bitField0_ & ~0x00800000); + backgroundBack_ = null; + if (backgroundBackBuilder_ != null) { + backgroundBackBuilder_.dispose(); + backgroundBackBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image backgroundBack = 24;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBackgroundBackBuilder() { + bitField0_ |= 0x00800000; + onChanged(); + return getBackgroundBackFieldBuilder().getBuilder(); + } + /** + * <code>.Image backgroundBack = 24;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBackgroundBackOrBuilder() { + if (backgroundBackBuilder_ != null) { + return backgroundBackBuilder_.getMessageOrBuilder(); + } else { + return backgroundBack_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : backgroundBack_; + } + } + /** + * <code>.Image backgroundBack = 24;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBackgroundBackFieldBuilder() { + if (backgroundBackBuilder_ == null) { + backgroundBackBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBackgroundBack(), + getParentForChildren(), + isClean()); + backgroundBack_ = null; + } + return backgroundBackBuilder_; + } + + private long score_ ; + /** + * <code>int64 score = 25;</code> + * @return The score. + */ + @java.lang.Override + public long getScore() { + return score_; + } + /** + * <code>int64 score = 25;</code> + * @param value The score to set. + * @return This builder for chaining. + */ + public Builder setScore(long value) { + + score_ = value; + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * <code>int64 score = 25;</code> + * @return This builder for chaining. + */ + public Builder clearScore() { + bitField0_ = (bitField0_ & ~0x01000000); + score_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object gradeBanner_ = ""; + /** + * <pre> + * GradeBuffInfo buffInfo = 26; + * </pre> + * + * <code>string gradeBanner = 1001;</code> + * @return The gradeBanner. + */ + public java.lang.String getGradeBanner() { + java.lang.Object ref = gradeBanner_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + gradeBanner_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <pre> + * GradeBuffInfo buffInfo = 26; + * </pre> + * + * <code>string gradeBanner = 1001;</code> + * @return The bytes for gradeBanner. + */ + public com.google.protobuf.ByteString + getGradeBannerBytes() { + java.lang.Object ref = gradeBanner_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + gradeBanner_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <pre> + * GradeBuffInfo buffInfo = 26; + * </pre> + * + * <code>string gradeBanner = 1001;</code> + * @param value The gradeBanner to set. + * @return This builder for chaining. + */ + public Builder setGradeBanner( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + gradeBanner_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + /** + * <pre> + * GradeBuffInfo buffInfo = 26; + * </pre> + * + * <code>string gradeBanner = 1001;</code> + * @return This builder for chaining. + */ + public Builder clearGradeBanner() { + gradeBanner_ = getDefaultInstance().getGradeBanner(); + bitField0_ = (bitField0_ & ~0x02000000); + onChanged(); + return this; + } + /** + * <pre> + * GradeBuffInfo buffInfo = 26; + * </pre> + * + * <code>string gradeBanner = 1001;</code> + * @param value The bytes for gradeBanner to set. + * @return This builder for chaining. + */ + public Builder setGradeBannerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + gradeBanner_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image profileDialogBg_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> profileDialogBgBuilder_; + /** + * <code>.Image profileDialogBg = 1002;</code> + * @return Whether the profileDialogBg field is set. + */ + public boolean hasProfileDialogBg() { + return ((bitField0_ & 0x04000000) != 0); + } + /** + * <code>.Image profileDialogBg = 1002;</code> + * @return The profileDialogBg. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getProfileDialogBg() { + if (profileDialogBgBuilder_ == null) { + return profileDialogBg_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : profileDialogBg_; + } else { + return profileDialogBgBuilder_.getMessage(); + } + } + /** + * <code>.Image profileDialogBg = 1002;</code> + */ + public Builder setProfileDialogBg(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (profileDialogBgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profileDialogBg_ = value; + } else { + profileDialogBgBuilder_.setMessage(value); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * <code>.Image profileDialogBg = 1002;</code> + */ + public Builder setProfileDialogBg( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (profileDialogBgBuilder_ == null) { + profileDialogBg_ = builderForValue.build(); + } else { + profileDialogBgBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * <code>.Image profileDialogBg = 1002;</code> + */ + public Builder mergeProfileDialogBg(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (profileDialogBgBuilder_ == null) { + if (((bitField0_ & 0x04000000) != 0) && + profileDialogBg_ != null && + profileDialogBg_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getProfileDialogBgBuilder().mergeFrom(value); + } else { + profileDialogBg_ = value; + } + } else { + profileDialogBgBuilder_.mergeFrom(value); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * <code>.Image profileDialogBg = 1002;</code> + */ + public Builder clearProfileDialogBg() { + bitField0_ = (bitField0_ & ~0x04000000); + profileDialogBg_ = null; + if (profileDialogBgBuilder_ != null) { + profileDialogBgBuilder_.dispose(); + profileDialogBgBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image profileDialogBg = 1002;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getProfileDialogBgBuilder() { + bitField0_ |= 0x04000000; + onChanged(); + return getProfileDialogBgFieldBuilder().getBuilder(); + } + /** + * <code>.Image profileDialogBg = 1002;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getProfileDialogBgOrBuilder() { + if (profileDialogBgBuilder_ != null) { + return profileDialogBgBuilder_.getMessageOrBuilder(); + } else { + return profileDialogBg_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : profileDialogBg_; + } + } + /** + * <code>.Image profileDialogBg = 1002;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getProfileDialogBgFieldBuilder() { + if (profileDialogBgBuilder_ == null) { + profileDialogBgBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getProfileDialogBg(), + getParentForChildren(), + isClean()); + profileDialogBg_ = null; + } + return profileDialogBgBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image profileDialogBgBack_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> profileDialogBgBackBuilder_; + /** + * <code>.Image profileDialogBgBack = 1003;</code> + * @return Whether the profileDialogBgBack field is set. + */ + public boolean hasProfileDialogBgBack() { + return ((bitField0_ & 0x08000000) != 0); + } + /** + * <code>.Image profileDialogBgBack = 1003;</code> + * @return The profileDialogBgBack. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getProfileDialogBgBack() { + if (profileDialogBgBackBuilder_ == null) { + return profileDialogBgBack_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : profileDialogBgBack_; + } else { + return profileDialogBgBackBuilder_.getMessage(); + } + } + /** + * <code>.Image profileDialogBgBack = 1003;</code> + */ + public Builder setProfileDialogBgBack(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (profileDialogBgBackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profileDialogBgBack_ = value; + } else { + profileDialogBgBackBuilder_.setMessage(value); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * <code>.Image profileDialogBgBack = 1003;</code> + */ + public Builder setProfileDialogBgBack( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (profileDialogBgBackBuilder_ == null) { + profileDialogBgBack_ = builderForValue.build(); + } else { + profileDialogBgBackBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * <code>.Image profileDialogBgBack = 1003;</code> + */ + public Builder mergeProfileDialogBgBack(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (profileDialogBgBackBuilder_ == null) { + if (((bitField0_ & 0x08000000) != 0) && + profileDialogBgBack_ != null && + profileDialogBgBack_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getProfileDialogBgBackBuilder().mergeFrom(value); + } else { + profileDialogBgBack_ = value; + } + } else { + profileDialogBgBackBuilder_.mergeFrom(value); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * <code>.Image profileDialogBgBack = 1003;</code> + */ + public Builder clearProfileDialogBgBack() { + bitField0_ = (bitField0_ & ~0x08000000); + profileDialogBgBack_ = null; + if (profileDialogBgBackBuilder_ != null) { + profileDialogBgBackBuilder_.dispose(); + profileDialogBgBackBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image profileDialogBgBack = 1003;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getProfileDialogBgBackBuilder() { + bitField0_ |= 0x08000000; + onChanged(); + return getProfileDialogBgBackFieldBuilder().getBuilder(); + } + /** + * <code>.Image profileDialogBgBack = 1003;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getProfileDialogBgBackOrBuilder() { + if (profileDialogBgBackBuilder_ != null) { + return profileDialogBgBackBuilder_.getMessageOrBuilder(); + } else { + return profileDialogBgBack_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : profileDialogBgBack_; + } + } + /** + * <code>.Image profileDialogBgBack = 1003;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getProfileDialogBgBackFieldBuilder() { + if (profileDialogBgBackBuilder_ == null) { + profileDialogBgBackBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getProfileDialogBgBack(), + getParentForChildren(), + isClean()); + profileDialogBgBack_ = null; + } + return profileDialogBgBackBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.PayGrade) + } + + // @@protoc_insertion_point(class_scope:User.PayGrade) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<PayGrade> + PARSER = new com.google.protobuf.AbstractParser<PayGrade>() { + @java.lang.Override + public PayGrade parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<PayGrade> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<PayGrade> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PoiInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.PoiInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.PoiInfo} + */ + public static final class PoiInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.PoiInfo) + PoiInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use PoiInfo.newBuilder() to construct. + private PoiInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private PoiInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PoiInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_PoiInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_PoiInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.PoiInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.PoiInfo) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_PoiInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_PoiInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_PoiInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.PoiInfo) + } + + // @@protoc_insertion_point(class_scope:User.PoiInfo) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<PoiInfo> + PARSER = new com.google.protobuf.AbstractParser<PoiInfo>() { + @java.lang.Override + public PoiInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<PoiInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<PoiInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ProfileStyleParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.ProfileStyleParams) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.ProfileStyleParams} + */ + public static final class ProfileStyleParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.ProfileStyleParams) + ProfileStyleParamsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProfileStyleParams.newBuilder() to construct. + private ProfileStyleParams(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private ProfileStyleParams() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProfileStyleParams(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_ProfileStyleParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_ProfileStyleParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.ProfileStyleParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.ProfileStyleParams) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_ProfileStyleParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_ProfileStyleParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_ProfileStyleParams_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.ProfileStyleParams) + } + + // @@protoc_insertion_point(class_scope:User.ProfileStyleParams) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<ProfileStyleParams> + PARSER = new com.google.protobuf.AbstractParser<ProfileStyleParams>() { + @java.lang.Override + public ProfileStyleParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<ProfileStyleParams> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<ProfileStyleParams> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SubscribeOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.Subscribe) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.Subscribe} + */ + public static final class Subscribe extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.Subscribe) + SubscribeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Subscribe.newBuilder() to construct. + private Subscribe(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private Subscribe() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Subscribe(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_Subscribe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_Subscribe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.Subscribe} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.Subscribe) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.SubscribeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_Subscribe_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_Subscribe_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_Subscribe_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.Subscribe) + } + + // @@protoc_insertion_point(class_scope:User.Subscribe) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<Subscribe> + PARSER = new com.google.protobuf.AbstractParser<Subscribe>() { + @java.lang.Override + public Subscribe parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<Subscribe> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<Subscribe> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UserAttrOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.UserAttr) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.UserAttr} + */ + public static final class UserAttr extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.UserAttr) + UserAttrOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserAttr.newBuilder() to construct. + private UserAttr(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private UserAttr() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UserAttr(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserAttr_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserAttr_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.UserAttr} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.UserAttr) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttrOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserAttr_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserAttr_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserAttr_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.UserAttr) + } + + // @@protoc_insertion_point(class_scope:User.UserAttr) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<UserAttr> + PARSER = new com.google.protobuf.AbstractParser<UserAttr>() { + @java.lang.Override + public UserAttr parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<UserAttr> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<UserAttr> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UserDressInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.UserDressInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.UserDressInfo} + */ + public static final class UserDressInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.UserDressInfo) + UserDressInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserDressInfo.newBuilder() to construct. + private UserDressInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private UserDressInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UserDressInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserDressInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserDressInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.UserDressInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.UserDressInfo) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserDressInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserDressInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserDressInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.UserDressInfo) + } + + // @@protoc_insertion_point(class_scope:User.UserDressInfo) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<UserDressInfo> + PARSER = new com.google.protobuf.AbstractParser<UserDressInfo>() { + @java.lang.Override + public UserDressInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<UserDressInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<UserDressInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UserVIPInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.UserVIPInfo) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.UserVIPInfo} + */ + public static final class UserVIPInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.UserVIPInfo) + UserVIPInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserVIPInfo.newBuilder() to construct. + private UserVIPInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private UserVIPInfo() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UserVIPInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserVIPInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserVIPInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.UserVIPInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.UserVIPInfo) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserVIPInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserVIPInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserVIPInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.UserVIPInfo) + } + + // @@protoc_insertion_point(class_scope:User.UserVIPInfo) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<UserVIPInfo> + PARSER = new com.google.protobuf.AbstractParser<UserVIPInfo>() { + @java.lang.Override + public UserVIPInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<UserVIPInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<UserVIPInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UserStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.UserStats) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.UserStats} + */ + public static final class UserStats extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.UserStats) + UserStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserStats.newBuilder() to construct. + private UserStats(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private UserStats() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UserStats(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.UserStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.UserStats) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_UserStats_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.UserStats) + } + + // @@protoc_insertion_point(class_scope:User.UserStats) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<UserStats> + PARSER = new com.google.protobuf.AbstractParser<UserStats>() { + @java.lang.Override + public UserStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<UserStats> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<UserStats> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface XiguaParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:User.XiguaParams) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code User.XiguaParams} + */ + public static final class XiguaParams extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:User.XiguaParams) + XiguaParamsOrBuilder { + private static final long serialVersionUID = 0L; + // Use XiguaParams.newBuilder() to construct. + private XiguaParams(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private XiguaParams() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new XiguaParams(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_XiguaParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_XiguaParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User.XiguaParams} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User.XiguaParams) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParamsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_XiguaParams_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_XiguaParams_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_XiguaParams_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User.XiguaParams) + } + + // @@protoc_insertion_point(class_scope:User.XiguaParams) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<XiguaParams> + PARSER = new com.google.protobuf.AbstractParser<XiguaParams>() { + @java.lang.Override + public XiguaParams parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<XiguaParams> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<XiguaParams> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int ID_FIELD_NUMBER = 1; + private long id_ = 0L; + /** + * <code>uint64 id = 1;</code> + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + + public static final int SHORTID_FIELD_NUMBER = 2; + private long shortId_ = 0L; + /** + * <code>uint64 shortId = 2;</code> + * @return The shortId. + */ + @java.lang.Override + public long getShortId() { + return shortId_; + } + + public static final int NICKNAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object nickname_ = ""; + /** + * <code>string nickname = 3;</code> + * @return The nickname. + */ + @java.lang.Override + public java.lang.String getNickname() { + java.lang.Object ref = nickname_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nickname_ = s; + return s; + } + } + /** + * <code>string nickname = 3;</code> + * @return The bytes for nickname. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNicknameBytes() { + java.lang.Object ref = nickname_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nickname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GENDER_FIELD_NUMBER = 4; + private int gender_ = 0; + /** + * <code>uint32 gender = 4;</code> + * @return The gender. + */ + @java.lang.Override + public int getGender() { + return gender_; + } + + public static final int SIGNATURE_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object signature_ = ""; + /** + * <code>string signature = 5;</code> + * @return The signature. + */ + @java.lang.Override + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } + } + /** + * <code>string signature = 5;</code> + * @return The bytes for signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LEVEL_FIELD_NUMBER = 6; + private int level_ = 0; + /** + * <code>uint32 level = 6;</code> + * @return The level. + */ + @java.lang.Override + public int getLevel() { + return level_; + } + + public static final int BIRTHDAY_FIELD_NUMBER = 7; + private long birthday_ = 0L; + /** + * <code>uint64 birthday = 7;</code> + * @return The birthday. + */ + @java.lang.Override + public long getBirthday() { + return birthday_; + } + + public static final int TELEPHONE_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object telephone_ = ""; + /** + * <code>string telephone = 8;</code> + * @return The telephone. + */ + @java.lang.Override + public java.lang.String getTelephone() { + java.lang.Object ref = telephone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + telephone_ = s; + return s; + } + } + /** + * <code>string telephone = 8;</code> + * @return The bytes for telephone. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTelephoneBytes() { + java.lang.Object ref = telephone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + telephone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AVATARTHUMB_FIELD_NUMBER = 9; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image avatarThumb_; + /** + * <code>.Image avatarThumb = 9;</code> + * @return Whether the avatarThumb field is set. + */ + @java.lang.Override + public boolean hasAvatarThumb() { + return avatarThumb_ != null; + } + /** + * <code>.Image avatarThumb = 9;</code> + * @return The avatarThumb. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getAvatarThumb() { + return avatarThumb_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarThumb_; + } + /** + * <code>.Image avatarThumb = 9;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarThumbOrBuilder() { + return avatarThumb_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarThumb_; + } + + public static final int AVATARMEDIUM_FIELD_NUMBER = 10; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image avatarMedium_; + /** + * <code>.Image avatarMedium = 10;</code> + * @return Whether the avatarMedium field is set. + */ + @java.lang.Override + public boolean hasAvatarMedium() { + return avatarMedium_ != null; + } + /** + * <code>.Image avatarMedium = 10;</code> + * @return The avatarMedium. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getAvatarMedium() { + return avatarMedium_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarMedium_; + } + /** + * <code>.Image avatarMedium = 10;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarMediumOrBuilder() { + return avatarMedium_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarMedium_; + } + + public static final int AVATARLARGE_FIELD_NUMBER = 11; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image avatarLarge_; + /** + * <code>.Image avatarLarge = 11;</code> + * @return Whether the avatarLarge field is set. + */ + @java.lang.Override + public boolean hasAvatarLarge() { + return avatarLarge_ != null; + } + /** + * <code>.Image avatarLarge = 11;</code> + * @return The avatarLarge. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getAvatarLarge() { + return avatarLarge_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarLarge_; + } + /** + * <code>.Image avatarLarge = 11;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarLargeOrBuilder() { + return avatarLarge_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarLarge_; + } + + public static final int VERIFIED_FIELD_NUMBER = 12; + private boolean verified_ = false; + /** + * <code>bool verified = 12;</code> + * @return The verified. + */ + @java.lang.Override + public boolean getVerified() { + return verified_; + } + + public static final int EXPERIENCE_FIELD_NUMBER = 13; + private int experience_ = 0; + /** + * <code>int32 experience = 13;</code> + * @return The experience. + */ + @java.lang.Override + public int getExperience() { + return experience_; + } + + public static final int CITY_FIELD_NUMBER = 14; + @SuppressWarnings("serial") + private volatile java.lang.Object city_ = ""; + /** + * <code>string city = 14;</code> + * @return The city. + */ + @java.lang.Override + public java.lang.String getCity() { + java.lang.Object ref = city_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + city_ = s; + return s; + } + } + /** + * <code>string city = 14;</code> + * @return The bytes for city. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCityBytes() { + java.lang.Object ref = city_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + city_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_FIELD_NUMBER = 15; + private int status_ = 0; + /** + * <code>int32 status = 15;</code> + * @return The status. + */ + @java.lang.Override + public int getStatus() { + return status_; + } + + public static final int CREATETIME_FIELD_NUMBER = 16; + private long createTime_ = 0L; + /** + * <code>int64 createTime = 16;</code> + * @return The createTime. + */ + @java.lang.Override + public long getCreateTime() { + return createTime_; + } + + public static final int MODIFYTIME_FIELD_NUMBER = 17; + private long modifyTime_ = 0L; + /** + * <code>int64 modifyTime = 17;</code> + * @return The modifyTime. + */ + @java.lang.Override + public long getModifyTime() { + return modifyTime_; + } + + public static final int SECRET_FIELD_NUMBER = 18; + private int secret_ = 0; + /** + * <code>int32 secret = 18;</code> + * @return The secret. + */ + @java.lang.Override + public int getSecret() { + return secret_; + } + + public static final int SHAREQRCODEURI_FIELD_NUMBER = 19; + @SuppressWarnings("serial") + private volatile java.lang.Object shareQrcodeUri_ = ""; + /** + * <code>string shareQrcodeUri = 19;</code> + * @return The shareQrcodeUri. + */ + @java.lang.Override + public java.lang.String getShareQrcodeUri() { + java.lang.Object ref = shareQrcodeUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shareQrcodeUri_ = s; + return s; + } + } + /** + * <code>string shareQrcodeUri = 19;</code> + * @return The bytes for shareQrcodeUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getShareQrcodeUriBytes() { + java.lang.Object ref = shareQrcodeUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shareQrcodeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INCOMESHAREPERCENT_FIELD_NUMBER = 20; + private int incomeSharePercent_ = 0; + /** + * <code>int32 incomeSharePercent = 20;</code> + * @return The incomeSharePercent. + */ + @java.lang.Override + public int getIncomeSharePercent() { + return incomeSharePercent_; + } + + public static final int BADGEIMAGELISTLIST_FIELD_NUMBER = 21; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image badgeImageListList_; + /** + * <code>.Image badgeImageListList = 21;</code> + * @return Whether the badgeImageListList field is set. + */ + @java.lang.Override + public boolean hasBadgeImageListList() { + return badgeImageListList_ != null; + } + /** + * <code>.Image badgeImageListList = 21;</code> + * @return The badgeImageListList. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBadgeImageListList() { + return badgeImageListList_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : badgeImageListList_; + } + /** + * <code>.Image badgeImageListList = 21;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBadgeImageListListOrBuilder() { + return badgeImageListList_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : badgeImageListList_; + } + + public static final int FOLLOWINFO_FIELD_NUMBER = 22; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo followInfo_; + /** + * <code>.User.FollowInfo followInfo = 22;</code> + * @return Whether the followInfo field is set. + */ + @java.lang.Override + public boolean hasFollowInfo() { + return followInfo_ != null; + } + /** + * <code>.User.FollowInfo followInfo = 22;</code> + * @return The followInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo getFollowInfo() { + return followInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.getDefaultInstance() : followInfo_; + } + /** + * <code>.User.FollowInfo followInfo = 22;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfoOrBuilder getFollowInfoOrBuilder() { + return followInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.getDefaultInstance() : followInfo_; + } + + public static final int PAYGRADE_FIELD_NUMBER = 23; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade payGrade_; + /** + * <code>.User.PayGrade payGrade = 23;</code> + * @return Whether the payGrade field is set. + */ + @java.lang.Override + public boolean hasPayGrade() { + return payGrade_ != null; + } + /** + * <code>.User.PayGrade payGrade = 23;</code> + * @return The payGrade. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade getPayGrade() { + return payGrade_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.getDefaultInstance() : payGrade_; + } + /** + * <code>.User.PayGrade payGrade = 23;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGradeOrBuilder getPayGradeOrBuilder() { + return payGrade_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.getDefaultInstance() : payGrade_; + } + + public static final int FANSCLUB_FIELD_NUMBER = 24; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub fansClub_; + /** + * <code>.User.FansClub fansClub = 24;</code> + * @return Whether the fansClub field is set. + */ + @java.lang.Override + public boolean hasFansClub() { + return fansClub_ != null; + } + /** + * <code>.User.FansClub fansClub = 24;</code> + * @return The fansClub. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub getFansClub() { + return fansClub_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.getDefaultInstance() : fansClub_; + } + /** + * <code>.User.FansClub fansClub = 24;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClubOrBuilder getFansClubOrBuilder() { + return fansClub_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.getDefaultInstance() : fansClub_; + } + + public static final int BORDER_FIELD_NUMBER = 25; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border border_; + /** + * <code>.User.Border border = 25;</code> + * @return Whether the border field is set. + */ + @java.lang.Override + public boolean hasBorder() { + return border_ != null; + } + /** + * <code>.User.Border border = 25;</code> + * @return The border. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border getBorder() { + return border_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.getDefaultInstance() : border_; + } + /** + * <code>.User.Border border = 25;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BorderOrBuilder getBorderOrBuilder() { + return border_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.getDefaultInstance() : border_; + } + + public static final int SPECIALID_FIELD_NUMBER = 26; + @SuppressWarnings("serial") + private volatile java.lang.Object specialId_ = ""; + /** + * <code>string specialId = 26;</code> + * @return The specialId. + */ + @java.lang.Override + public java.lang.String getSpecialId() { + java.lang.Object ref = specialId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + specialId_ = s; + return s; + } + } + /** + * <code>string specialId = 26;</code> + * @return The bytes for specialId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSpecialIdBytes() { + java.lang.Object ref = specialId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + specialId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AVATARBORDER_FIELD_NUMBER = 27; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image avatarBorder_; + /** + * <code>.Image avatarBorder = 27;</code> + * @return Whether the avatarBorder field is set. + */ + @java.lang.Override + public boolean hasAvatarBorder() { + return avatarBorder_ != null; + } + /** + * <code>.Image avatarBorder = 27;</code> + * @return The avatarBorder. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getAvatarBorder() { + return avatarBorder_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarBorder_; + } + /** + * <code>.Image avatarBorder = 27;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarBorderOrBuilder() { + return avatarBorder_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarBorder_; + } + + public static final int MEDAL_FIELD_NUMBER = 28; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image medal_; + /** + * <code>.Image medal = 28;</code> + * @return Whether the medal field is set. + */ + @java.lang.Override + public boolean hasMedal() { + return medal_ != null; + } + /** + * <code>.Image medal = 28;</code> + * @return The medal. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getMedal() { + return medal_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : medal_; + } + /** + * <code>.Image medal = 28;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getMedalOrBuilder() { + return medal_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : medal_; + } + + public static final int REALTIMEICONSLIST_FIELD_NUMBER = 29; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> realTimeIconsList_; + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> getRealTimeIconsListList() { + return realTimeIconsList_; + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getRealTimeIconsListOrBuilderList() { + return realTimeIconsList_; + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + @java.lang.Override + public int getRealTimeIconsListCount() { + return realTimeIconsList_.size(); + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getRealTimeIconsList(int index) { + return realTimeIconsList_.get(index); + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getRealTimeIconsListOrBuilder( + int index) { + return realTimeIconsList_.get(index); + } + + public static final int NEWREALTIMEICONSLIST_FIELD_NUMBER = 30; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> newRealTimeIconsList_; + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> getNewRealTimeIconsListList() { + return newRealTimeIconsList_; + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getNewRealTimeIconsListOrBuilderList() { + return newRealTimeIconsList_; + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + @java.lang.Override + public int getNewRealTimeIconsListCount() { + return newRealTimeIconsList_.size(); + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getNewRealTimeIconsList(int index) { + return newRealTimeIconsList_.get(index); + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewRealTimeIconsListOrBuilder( + int index) { + return newRealTimeIconsList_.get(index); + } + + public static final int TOPVIPNO_FIELD_NUMBER = 31; + private long topVipNo_ = 0L; + /** + * <code>int64 topVipNo = 31;</code> + * @return The topVipNo. + */ + @java.lang.Override + public long getTopVipNo() { + return topVipNo_; + } + + public static final int USERATTR_FIELD_NUMBER = 32; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr userAttr_; + /** + * <code>.User.UserAttr userAttr = 32;</code> + * @return Whether the userAttr field is set. + */ + @java.lang.Override + public boolean hasUserAttr() { + return userAttr_ != null; + } + /** + * <code>.User.UserAttr userAttr = 32;</code> + * @return The userAttr. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr getUserAttr() { + return userAttr_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.getDefaultInstance() : userAttr_; + } + /** + * <code>.User.UserAttr userAttr = 32;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttrOrBuilder getUserAttrOrBuilder() { + return userAttr_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.getDefaultInstance() : userAttr_; + } + + public static final int OWNROOM_FIELD_NUMBER = 33; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom ownRoom_; + /** + * <code>.User.OwnRoom ownRoom = 33;</code> + * @return Whether the ownRoom field is set. + */ + @java.lang.Override + public boolean hasOwnRoom() { + return ownRoom_ != null; + } + /** + * <code>.User.OwnRoom ownRoom = 33;</code> + * @return The ownRoom. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom getOwnRoom() { + return ownRoom_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.getDefaultInstance() : ownRoom_; + } + /** + * <code>.User.OwnRoom ownRoom = 33;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoomOrBuilder getOwnRoomOrBuilder() { + return ownRoom_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.getDefaultInstance() : ownRoom_; + } + + public static final int PAYSCORE_FIELD_NUMBER = 34; + private long payScore_ = 0L; + /** + * <code>int64 payScore = 34;</code> + * @return The payScore. + */ + @java.lang.Override + public long getPayScore() { + return payScore_; + } + + public static final int TICKETCOUNT_FIELD_NUMBER = 35; + private long ticketCount_ = 0L; + /** + * <code>int64 ticketCount = 35;</code> + * @return The ticketCount. + */ + @java.lang.Override + public long getTicketCount() { + return ticketCount_; + } + + public static final int ANCHORINFO_FIELD_NUMBER = 36; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo anchorInfo_; + /** + * <code>.User.AnchorInfo anchorInfo = 36;</code> + * @return Whether the anchorInfo field is set. + */ + @java.lang.Override + public boolean hasAnchorInfo() { + return anchorInfo_ != null; + } + /** + * <code>.User.AnchorInfo anchorInfo = 36;</code> + * @return The anchorInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo getAnchorInfo() { + return anchorInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.getDefaultInstance() : anchorInfo_; + } + /** + * <code>.User.AnchorInfo anchorInfo = 36;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfoOrBuilder getAnchorInfoOrBuilder() { + return anchorInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.getDefaultInstance() : anchorInfo_; + } + + public static final int LINKMICSTATS_FIELD_NUMBER = 37; + private int linkMicStats_ = 0; + /** + * <code>int32 linkMicStats = 37;</code> + * @return The linkMicStats. + */ + @java.lang.Override + public int getLinkMicStats() { + return linkMicStats_; + } + + public static final int DISPLAYID_FIELD_NUMBER = 38; + @SuppressWarnings("serial") + private volatile java.lang.Object displayId_ = ""; + /** + * <code>string displayId = 38;</code> + * @return The displayId. + */ + @java.lang.Override + public java.lang.String getDisplayId() { + java.lang.Object ref = displayId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayId_ = s; + return s; + } + } + /** + * <code>string displayId = 38;</code> + * @return The bytes for displayId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayIdBytes() { + java.lang.Object ref = displayId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WITHCOMMERCEPERMISSION_FIELD_NUMBER = 39; + private boolean withCommercePermission_ = false; + /** + * <code>bool withCommercePermission = 39;</code> + * @return The withCommercePermission. + */ + @java.lang.Override + public boolean getWithCommercePermission() { + return withCommercePermission_; + } + + public static final int WITHFUSIONSHOPENTRY_FIELD_NUMBER = 40; + private boolean withFusionShopEntry_ = false; + /** + * <code>bool withFusionShopEntry = 40;</code> + * @return The withFusionShopEntry. + */ + @java.lang.Override + public boolean getWithFusionShopEntry() { + return withFusionShopEntry_; + } + + public static final int TOTALRECHARGEDIAMONDCOUNT_FIELD_NUMBER = 41; + private long totalRechargeDiamondCount_ = 0L; + /** + * <code>int64 totalRechargeDiamondCount = 41;</code> + * @return The totalRechargeDiamondCount. + */ + @java.lang.Override + public long getTotalRechargeDiamondCount() { + return totalRechargeDiamondCount_; + } + + public static final int WEBCASTANCHORLEVEL_FIELD_NUMBER = 42; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel webcastAnchorLevel_; + /** + * <code>.User.AnchorLevel webcastAnchorLevel = 42;</code> + * @return Whether the webcastAnchorLevel field is set. + */ + @java.lang.Override + public boolean hasWebcastAnchorLevel() { + return webcastAnchorLevel_ != null; + } + /** + * <code>.User.AnchorLevel webcastAnchorLevel = 42;</code> + * @return The webcastAnchorLevel. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getWebcastAnchorLevel() { + return webcastAnchorLevel_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance() : webcastAnchorLevel_; + } + /** + * <code>.User.AnchorLevel webcastAnchorLevel = 42;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder getWebcastAnchorLevelOrBuilder() { + return webcastAnchorLevel_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance() : webcastAnchorLevel_; + } + + public static final int VERIFIEDCONTENT_FIELD_NUMBER = 43; + @SuppressWarnings("serial") + private volatile java.lang.Object verifiedContent_ = ""; + /** + * <code>string verifiedContent = 43;</code> + * @return The verifiedContent. + */ + @java.lang.Override + public java.lang.String getVerifiedContent() { + java.lang.Object ref = verifiedContent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verifiedContent_ = s; + return s; + } + } + /** + * <code>string verifiedContent = 43;</code> + * @return The bytes for verifiedContent. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVerifiedContentBytes() { + java.lang.Object ref = verifiedContent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verifiedContent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTHORSTATS_FIELD_NUMBER = 44; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats authorStats_; + /** + * <code>.User.AuthorStats authorStats = 44;</code> + * @return Whether the authorStats field is set. + */ + @java.lang.Override + public boolean hasAuthorStats() { + return authorStats_ != null; + } + /** + * <code>.User.AuthorStats authorStats = 44;</code> + * @return The authorStats. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats getAuthorStats() { + return authorStats_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.getDefaultInstance() : authorStats_; + } + /** + * <code>.User.AuthorStats authorStats = 44;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStatsOrBuilder getAuthorStatsOrBuilder() { + return authorStats_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.getDefaultInstance() : authorStats_; + } + + public static final int TOPFANSLIST_FIELD_NUMBER = 45; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User> topFansList_; + /** + * <code>repeated .User topFansList = 45;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User> getTopFansListList() { + return topFansList_; + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getTopFansListOrBuilderList() { + return topFansList_; + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + @java.lang.Override + public int getTopFansListCount() { + return topFansList_.size(); + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getTopFansList(int index) { + return topFansList_.get(index); + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getTopFansListOrBuilder( + int index) { + return topFansList_.get(index); + } + + public static final int SECUID_FIELD_NUMBER = 46; + @SuppressWarnings("serial") + private volatile java.lang.Object secUid_ = ""; + /** + * <code>string secUid = 46;</code> + * @return The secUid. + */ + @java.lang.Override + public java.lang.String getSecUid() { + java.lang.Object ref = secUid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secUid_ = s; + return s; + } + } + /** + * <code>string secUid = 46;</code> + * @return The bytes for secUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSecUidBytes() { + java.lang.Object ref = secUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + secUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERROLE_FIELD_NUMBER = 47; + private int userRole_ = 0; + /** + * <code>int32 userRole = 47;</code> + * @return The userRole. + */ + @java.lang.Override + public int getUserRole() { + return userRole_; + } + + public static final int XIGUAINFO_FIELD_NUMBER = 48; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams xiguaInfo_; + /** + * <code>.User.XiguaParams xiguaInfo = 48;</code> + * @return Whether the xiguaInfo field is set. + */ + @java.lang.Override + public boolean hasXiguaInfo() { + return xiguaInfo_ != null; + } + /** + * <code>.User.XiguaParams xiguaInfo = 48;</code> + * @return The xiguaInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams getXiguaInfo() { + return xiguaInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.getDefaultInstance() : xiguaInfo_; + } + /** + * <code>.User.XiguaParams xiguaInfo = 48;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParamsOrBuilder getXiguaInfoOrBuilder() { + return xiguaInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.getDefaultInstance() : xiguaInfo_; + } + + public static final int ACTIVITYREWARD_FIELD_NUMBER = 49; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo activityReward_; + /** + * <code>.User.ActivityInfo activityReward = 49;</code> + * @return Whether the activityReward field is set. + */ + @java.lang.Override + public boolean hasActivityReward() { + return activityReward_ != null; + } + /** + * <code>.User.ActivityInfo activityReward = 49;</code> + * @return The activityReward. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo getActivityReward() { + return activityReward_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.getDefaultInstance() : activityReward_; + } + /** + * <code>.User.ActivityInfo activityReward = 49;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfoOrBuilder getActivityRewardOrBuilder() { + return activityReward_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.getDefaultInstance() : activityReward_; + } + + public static final int NOBLEINFO_FIELD_NUMBER = 50; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo nobleInfo_; + /** + * <code>.User.NobleLevelInfo nobleInfo = 50;</code> + * @return Whether the nobleInfo field is set. + */ + @java.lang.Override + public boolean hasNobleInfo() { + return nobleInfo_ != null; + } + /** + * <code>.User.NobleLevelInfo nobleInfo = 50;</code> + * @return The nobleInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo getNobleInfo() { + return nobleInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.getDefaultInstance() : nobleInfo_; + } + /** + * <code>.User.NobleLevelInfo nobleInfo = 50;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfoOrBuilder getNobleInfoOrBuilder() { + return nobleInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.getDefaultInstance() : nobleInfo_; + } + + public static final int BROTHERHOODINFO_FIELD_NUMBER = 51; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo brotherhoodInfo_; + /** + * <code>.User.BrotherhoodInfo brotherhoodInfo = 51;</code> + * @return Whether the brotherhoodInfo field is set. + */ + @java.lang.Override + public boolean hasBrotherhoodInfo() { + return brotherhoodInfo_ != null; + } + /** + * <code>.User.BrotherhoodInfo brotherhoodInfo = 51;</code> + * @return The brotherhoodInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo getBrotherhoodInfo() { + return brotherhoodInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.getDefaultInstance() : brotherhoodInfo_; + } + /** + * <code>.User.BrotherhoodInfo brotherhoodInfo = 51;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfoOrBuilder getBrotherhoodInfoOrBuilder() { + return brotherhoodInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.getDefaultInstance() : brotherhoodInfo_; + } + + public static final int PERSONALCARD_FIELD_NUMBER = 52; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image personalCard_; + /** + * <code>.Image personalCard = 52;</code> + * @return Whether the personalCard field is set. + */ + @java.lang.Override + public boolean hasPersonalCard() { + return personalCard_ != null; + } + /** + * <code>.Image personalCard = 52;</code> + * @return The personalCard. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getPersonalCard() { + return personalCard_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : personalCard_; + } + /** + * <code>.Image personalCard = 52;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getPersonalCardOrBuilder() { + return personalCard_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : personalCard_; + } + + public static final int AUTHENTICATIONINFO_FIELD_NUMBER = 53; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo authenticationInfo_; + /** + * <code>.User.AuthenticationInfo authenticationInfo = 53;</code> + * @return Whether the authenticationInfo field is set. + */ + @java.lang.Override + public boolean hasAuthenticationInfo() { + return authenticationInfo_ != null; + } + /** + * <code>.User.AuthenticationInfo authenticationInfo = 53;</code> + * @return The authenticationInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo getAuthenticationInfo() { + return authenticationInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.getDefaultInstance() : authenticationInfo_; + } + /** + * <code>.User.AuthenticationInfo authenticationInfo = 53;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfoOrBuilder getAuthenticationInfoOrBuilder() { + return authenticationInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.getDefaultInstance() : authenticationInfo_; + } + + public static final int AUTHORIZATIONINFO_FIELD_NUMBER = 54; + private int authorizationInfo_ = 0; + /** + * <code>int32 authorizationInfo = 54;</code> + * @return The authorizationInfo. + */ + @java.lang.Override + public int getAuthorizationInfo() { + return authorizationInfo_; + } + + public static final int ADVERSARYAUTHORIZATIONINFO_FIELD_NUMBER = 55; + private int adversaryAuthorizationInfo_ = 0; + /** + * <code>int32 adversaryAuthorizationInfo = 55;</code> + * @return The adversaryAuthorizationInfo. + */ + @java.lang.Override + public int getAdversaryAuthorizationInfo() { + return adversaryAuthorizationInfo_; + } + + public static final int POIINFO_FIELD_NUMBER = 56; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo poiInfo_; + /** + * <code>.User.PoiInfo poiInfo = 56;</code> + * @return Whether the poiInfo field is set. + */ + @java.lang.Override + public boolean hasPoiInfo() { + return poiInfo_ != null; + } + /** + * <code>.User.PoiInfo poiInfo = 56;</code> + * @return The poiInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo getPoiInfo() { + return poiInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.getDefaultInstance() : poiInfo_; + } + /** + * <code>.User.PoiInfo poiInfo = 56;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfoOrBuilder getPoiInfoOrBuilder() { + return poiInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.getDefaultInstance() : poiInfo_; + } + + public static final int MEDIABADGEIMAGELISTLIST_FIELD_NUMBER = 57; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image mediaBadgeImageListList_; + /** + * <code>.Image mediaBadgeImageListList = 57;</code> + * @return Whether the mediaBadgeImageListList field is set. + */ + @java.lang.Override + public boolean hasMediaBadgeImageListList() { + return mediaBadgeImageListList_ != null; + } + /** + * <code>.Image mediaBadgeImageListList = 57;</code> + * @return The mediaBadgeImageListList. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getMediaBadgeImageListList() { + return mediaBadgeImageListList_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : mediaBadgeImageListList_; + } + /** + * <code>.Image mediaBadgeImageListList = 57;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getMediaBadgeImageListListOrBuilder() { + return mediaBadgeImageListList_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : mediaBadgeImageListList_; + } + + public static final int ADVERSARYUSERSTATUS_FIELD_NUMBER = 58; + private int adversaryUserStatus_ = 0; + /** + * <code>int32 adversaryUserStatus = 58;</code> + * @return The adversaryUserStatus. + */ + @java.lang.Override + public int getAdversaryUserStatus() { + return adversaryUserStatus_; + } + + public static final int USERVIPINFO_FIELD_NUMBER = 59; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo userVipInfo_; + /** + * <code>.User.UserVIPInfo userVipInfo = 59;</code> + * @return Whether the userVipInfo field is set. + */ + @java.lang.Override + public boolean hasUserVipInfo() { + return userVipInfo_ != null; + } + /** + * <code>.User.UserVIPInfo userVipInfo = 59;</code> + * @return The userVipInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo getUserVipInfo() { + return userVipInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.getDefaultInstance() : userVipInfo_; + } + /** + * <code>.User.UserVIPInfo userVipInfo = 59;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfoOrBuilder getUserVipInfoOrBuilder() { + return userVipInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.getDefaultInstance() : userVipInfo_; + } + + public static final int COMMERCEWEBCASTCONFIGIDSLIST_FIELD_NUMBER = 60; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.LongList commerceWebcastConfigIdsList_; + /** + * <code>repeated int64 commerceWebcastConfigIdsList = 60;</code> + * @return A list containing the commerceWebcastConfigIdsList. + */ + @java.lang.Override + public java.util.List<java.lang.Long> + getCommerceWebcastConfigIdsListList() { + return commerceWebcastConfigIdsList_; + } + /** + * <code>repeated int64 commerceWebcastConfigIdsList = 60;</code> + * @return The count of commerceWebcastConfigIdsList. + */ + public int getCommerceWebcastConfigIdsListCount() { + return commerceWebcastConfigIdsList_.size(); + } + /** + * <code>repeated int64 commerceWebcastConfigIdsList = 60;</code> + * @param index The index of the element to return. + * @return The commerceWebcastConfigIdsList at the given index. + */ + public long getCommerceWebcastConfigIdsList(int index) { + return commerceWebcastConfigIdsList_.getLong(index); + } + private int commerceWebcastConfigIdsListMemoizedSerializedSize = -1; + + public static final int BADGEIMAGELISTV2LIST_FIELD_NUMBER = 61; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image badgeImageListV2List_; + /** + * <code>.Image badgeImageListV2List = 61;</code> + * @return Whether the badgeImageListV2List field is set. + */ + @java.lang.Override + public boolean hasBadgeImageListV2List() { + return badgeImageListV2List_ != null; + } + /** + * <code>.Image badgeImageListV2List = 61;</code> + * @return The badgeImageListV2List. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBadgeImageListV2List() { + return badgeImageListV2List_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : badgeImageListV2List_; + } + /** + * <code>.Image badgeImageListV2List = 61;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBadgeImageListV2ListOrBuilder() { + return badgeImageListV2List_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : badgeImageListV2List_; + } + + public static final int LOCATIONCITY_FIELD_NUMBER = 63; + @SuppressWarnings("serial") + private volatile java.lang.Object locationCity_ = ""; + /** + * <pre> + * IndustryCertification industryCertification = 62; + * </pre> + * + * <code>string locationCity = 63;</code> + * @return The locationCity. + */ + @java.lang.Override + public java.lang.String getLocationCity() { + java.lang.Object ref = locationCity_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationCity_ = s; + return s; + } + } + /** + * <pre> + * IndustryCertification industryCertification = 62; + * </pre> + * + * <code>string locationCity = 63;</code> + * @return The bytes for locationCity. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLocationCityBytes() { + java.lang.Object ref = locationCity_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationCity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FANSGROUPINFO_FIELD_NUMBER = 64; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo fansGroupInfo_; + /** + * <code>.User.FansGroupInfo fansGroupInfo = 64;</code> + * @return Whether the fansGroupInfo field is set. + */ + @java.lang.Override + public boolean hasFansGroupInfo() { + return fansGroupInfo_ != null; + } + /** + * <code>.User.FansGroupInfo fansGroupInfo = 64;</code> + * @return The fansGroupInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo getFansGroupInfo() { + return fansGroupInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.getDefaultInstance() : fansGroupInfo_; + } + /** + * <code>.User.FansGroupInfo fansGroupInfo = 64;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfoOrBuilder getFansGroupInfoOrBuilder() { + return fansGroupInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.getDefaultInstance() : fansGroupInfo_; + } + + public static final int REMARKNAME_FIELD_NUMBER = 65; + @SuppressWarnings("serial") + private volatile java.lang.Object remarkName_ = ""; + /** + * <code>string remarkName = 65;</code> + * @return The remarkName. + */ + @java.lang.Override + public java.lang.String getRemarkName() { + java.lang.Object ref = remarkName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remarkName_ = s; + return s; + } + } + /** + * <code>string remarkName = 65;</code> + * @return The bytes for remarkName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRemarkNameBytes() { + java.lang.Object ref = remarkName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + remarkName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MYSTERYMAN_FIELD_NUMBER = 66; + private int mysteryMan_ = 0; + /** + * <code>int32 mysteryMan = 66;</code> + * @return The mysteryMan. + */ + @java.lang.Override + public int getMysteryMan() { + return mysteryMan_; + } + + public static final int WEBRID_FIELD_NUMBER = 67; + @SuppressWarnings("serial") + private volatile java.lang.Object webRid_ = ""; + /** + * <code>string webRid = 67;</code> + * @return The webRid. + */ + @java.lang.Override + public java.lang.String getWebRid() { + java.lang.Object ref = webRid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webRid_ = s; + return s; + } + } + /** + * <code>string webRid = 67;</code> + * @return The bytes for webRid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWebRidBytes() { + java.lang.Object ref = webRid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webRid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESENSITIZEDNICKNAME_FIELD_NUMBER = 68; + @SuppressWarnings("serial") + private volatile java.lang.Object desensitizedNickname_ = ""; + /** + * <code>string desensitizedNickname = 68;</code> + * @return The desensitizedNickname. + */ + @java.lang.Override + public java.lang.String getDesensitizedNickname() { + java.lang.Object ref = desensitizedNickname_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + desensitizedNickname_ = s; + return s; + } + } + /** + * <code>string desensitizedNickname = 68;</code> + * @return The bytes for desensitizedNickname. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDesensitizedNicknameBytes() { + java.lang.Object ref = desensitizedNickname_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + desensitizedNickname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JACCREDITINFO_FIELD_NUMBER = 69; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo jAccreditInfo_; + /** + * <code>.User.JAccreditInfo jAccreditInfo = 69;</code> + * @return Whether the jAccreditInfo field is set. + */ + @java.lang.Override + public boolean hasJAccreditInfo() { + return jAccreditInfo_ != null; + } + /** + * <code>.User.JAccreditInfo jAccreditInfo = 69;</code> + * @return The jAccreditInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo getJAccreditInfo() { + return jAccreditInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.getDefaultInstance() : jAccreditInfo_; + } + /** + * <code>.User.JAccreditInfo jAccreditInfo = 69;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfoOrBuilder getJAccreditInfoOrBuilder() { + return jAccreditInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.getDefaultInstance() : jAccreditInfo_; + } + + public static final int SUBSCRIBE_FIELD_NUMBER = 70; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe subscribe_; + /** + * <code>.User.Subscribe subscribe = 70;</code> + * @return Whether the subscribe field is set. + */ + @java.lang.Override + public boolean hasSubscribe() { + return subscribe_ != null; + } + /** + * <code>.User.Subscribe subscribe = 70;</code> + * @return The subscribe. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe getSubscribe() { + return subscribe_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.getDefaultInstance() : subscribe_; + } + /** + * <code>.User.Subscribe subscribe = 70;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.SubscribeOrBuilder getSubscribeOrBuilder() { + return subscribe_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.getDefaultInstance() : subscribe_; + } + + public static final int ISANONYMOUS_FIELD_NUMBER = 71; + private boolean isAnonymous_ = false; + /** + * <code>bool isAnonymous = 71;</code> + * @return The isAnonymous. + */ + @java.lang.Override + public boolean getIsAnonymous() { + return isAnonymous_; + } + + public static final int CONSUMEDIAMONDLEVEL_FIELD_NUMBER = 72; + private int consumeDiamondLevel_ = 0; + /** + * <code>int32 consumeDiamondLevel = 72;</code> + * @return The consumeDiamondLevel. + */ + @java.lang.Override + public int getConsumeDiamondLevel() { + return consumeDiamondLevel_; + } + + public static final int WEBCASTUID_FIELD_NUMBER = 73; + @SuppressWarnings("serial") + private volatile java.lang.Object webcastUid_ = ""; + /** + * <code>string webcastUid = 73;</code> + * @return The webcastUid. + */ + @java.lang.Override + public java.lang.String getWebcastUid() { + java.lang.Object ref = webcastUid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webcastUid_ = s; + return s; + } + } + /** + * <code>string webcastUid = 73;</code> + * @return The bytes for webcastUid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWebcastUidBytes() { + java.lang.Object ref = webcastUid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webcastUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROFILESTYLEPARAMS_FIELD_NUMBER = 74; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams profileStyleParams_; + /** + * <code>.User.ProfileStyleParams profileStyleParams = 74;</code> + * @return Whether the profileStyleParams field is set. + */ + @java.lang.Override + public boolean hasProfileStyleParams() { + return profileStyleParams_ != null; + } + /** + * <code>.User.ProfileStyleParams profileStyleParams = 74;</code> + * @return The profileStyleParams. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams getProfileStyleParams() { + return profileStyleParams_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.getDefaultInstance() : profileStyleParams_; + } + /** + * <code>.User.ProfileStyleParams profileStyleParams = 74;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParamsOrBuilder getProfileStyleParamsOrBuilder() { + return profileStyleParams_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.getDefaultInstance() : profileStyleParams_; + } + + public static final int USERDRESSINFO_FIELD_NUMBER = 75; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo userDressInfo_; + /** + * <code>.User.UserDressInfo userDressInfo = 75;</code> + * @return Whether the userDressInfo field is set. + */ + @java.lang.Override + public boolean hasUserDressInfo() { + return userDressInfo_ != null; + } + /** + * <code>.User.UserDressInfo userDressInfo = 75;</code> + * @return The userDressInfo. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo getUserDressInfo() { + return userDressInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.getDefaultInstance() : userDressInfo_; + } + /** + * <code>.User.UserDressInfo userDressInfo = 75;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfoOrBuilder getUserDressInfoOrBuilder() { + return userDressInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.getDefaultInstance() : userDressInfo_; + } + + public static final int ALLOWBELOCATED_FIELD_NUMBER = 1001; + private boolean allowBeLocated_ = false; + /** + * <code>bool allowBeLocated = 1001;</code> + * @return The allowBeLocated. + */ + @java.lang.Override + public boolean getAllowBeLocated() { + return allowBeLocated_; + } + + public static final int ALLOWFINDBYCONTACTS_FIELD_NUMBER = 1002; + private boolean allowFindByContacts_ = false; + /** + * <code>bool allowFindByContacts = 1002;</code> + * @return The allowFindByContacts. + */ + @java.lang.Override + public boolean getAllowFindByContacts() { + return allowFindByContacts_; + } + + public static final int ALLOWOTHERSDOWNLOADVIDEO_FIELD_NUMBER = 1003; + private boolean allowOthersDownloadVideo_ = false; + /** + * <code>bool allowOthersDownloadVideo = 1003;</code> + * @return The allowOthersDownloadVideo. + */ + @java.lang.Override + public boolean getAllowOthersDownloadVideo() { + return allowOthersDownloadVideo_; + } + + public static final int ALLOWOTHERSDOWNLOADWHENSHARINGVIDEO_FIELD_NUMBER = 1004; + private boolean allowOthersDownloadWhenSharingVideo_ = false; + /** + * <code>bool allowOthersDownloadWhenSharingVideo = 1004;</code> + * @return The allowOthersDownloadWhenSharingVideo. + */ + @java.lang.Override + public boolean getAllowOthersDownloadWhenSharingVideo() { + return allowOthersDownloadWhenSharingVideo_; + } + + public static final int ALLOWSHARESHOWPROFILE_FIELD_NUMBER = 1005; + private boolean allowShareShowProfile_ = false; + /** + * <code>bool allowShareShowProfile = 1005;</code> + * @return The allowShareShowProfile. + */ + @java.lang.Override + public boolean getAllowShareShowProfile() { + return allowShareShowProfile_; + } + + public static final int ALLOWSHOWINGOSSIP_FIELD_NUMBER = 1006; + private boolean allowShowInGossip_ = false; + /** + * <code>bool allowShowInGossip = 1006;</code> + * @return The allowShowInGossip. + */ + @java.lang.Override + public boolean getAllowShowInGossip() { + return allowShowInGossip_; + } + + public static final int ALLOWSHOWMYACTION_FIELD_NUMBER = 1007; + private boolean allowShowMyAction_ = false; + /** + * <code>bool allowShowMyAction = 1007;</code> + * @return The allowShowMyAction. + */ + @java.lang.Override + public boolean getAllowShowMyAction() { + return allowShowMyAction_; + } + + public static final int ALLOWSTRANGECOMMENT_FIELD_NUMBER = 1008; + private boolean allowStrangeComment_ = false; + /** + * <code>bool allowStrangeComment = 1008;</code> + * @return The allowStrangeComment. + */ + @java.lang.Override + public boolean getAllowStrangeComment() { + return allowStrangeComment_; + } + + public static final int ALLOWUNFOLLOWERCOMMENT_FIELD_NUMBER = 1009; + private boolean allowUnfollowerComment_ = false; + /** + * <code>bool allowUnfollowerComment = 1009;</code> + * @return The allowUnfollowerComment. + */ + @java.lang.Override + public boolean getAllowUnfollowerComment() { + return allowUnfollowerComment_; + } + + public static final int ALLOWUSELINKMIC_FIELD_NUMBER = 1010; + private boolean allowUseLinkmic_ = false; + /** + * <code>bool allowUseLinkmic = 1010;</code> + * @return The allowUseLinkmic. + */ + @java.lang.Override + public boolean getAllowUseLinkmic() { + return allowUseLinkmic_; + } + + public static final int ANCHORLEVEL_FIELD_NUMBER = 1011; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel anchorLevel_; + /** + * <code>.User.AnchorLevel anchorLevel = 1011;</code> + * @return Whether the anchorLevel field is set. + */ + @java.lang.Override + public boolean hasAnchorLevel() { + return anchorLevel_ != null; + } + /** + * <code>.User.AnchorLevel anchorLevel = 1011;</code> + * @return The anchorLevel. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getAnchorLevel() { + return anchorLevel_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance() : anchorLevel_; + } + /** + * <code>.User.AnchorLevel anchorLevel = 1011;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder getAnchorLevelOrBuilder() { + return anchorLevel_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance() : anchorLevel_; + } + + public static final int AVATARJPG_FIELD_NUMBER = 1012; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image avatarJpg_; + /** + * <code>.Image avatarJpg = 1012;</code> + * @return Whether the avatarJpg field is set. + */ + @java.lang.Override + public boolean hasAvatarJpg() { + return avatarJpg_ != null; + } + /** + * <code>.Image avatarJpg = 1012;</code> + * @return The avatarJpg. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getAvatarJpg() { + return avatarJpg_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarJpg_; + } + /** + * <code>.Image avatarJpg = 1012;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarJpgOrBuilder() { + return avatarJpg_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarJpg_; + } + + public static final int BGIMGURL_FIELD_NUMBER = 1013; + @SuppressWarnings("serial") + private volatile java.lang.Object bgImgUrl_ = ""; + /** + * <code>string bgImgUrl = 1013;</code> + * @return The bgImgUrl. + */ + @java.lang.Override + public java.lang.String getBgImgUrl() { + java.lang.Object ref = bgImgUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bgImgUrl_ = s; + return s; + } + } + /** + * <code>string bgImgUrl = 1013;</code> + * @return The bytes for bgImgUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBgImgUrlBytes() { + java.lang.Object ref = bgImgUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + bgImgUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BIRTHDAYDESCRIPTION_FIELD_NUMBER = 1014; + @SuppressWarnings("serial") + private volatile java.lang.Object birthdayDescription_ = ""; + /** + * <code>string birthdayDescription = 1014;</code> + * @return The birthdayDescription. + */ + @java.lang.Override + public java.lang.String getBirthdayDescription() { + java.lang.Object ref = birthdayDescription_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + birthdayDescription_ = s; + return s; + } + } + /** + * <code>string birthdayDescription = 1014;</code> + * @return The bytes for birthdayDescription. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBirthdayDescriptionBytes() { + java.lang.Object ref = birthdayDescription_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + birthdayDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BIRTHDAYVALID_FIELD_NUMBER = 1015; + private boolean birthdayValid_ = false; + /** + * <code>bool birthdayValid = 1015;</code> + * @return The birthdayValid. + */ + @java.lang.Override + public boolean getBirthdayValid() { + return birthdayValid_; + } + + public static final int BLOCKSTATUS_FIELD_NUMBER = 1016; + private int blockStatus_ = 0; + /** + * <code>int32 blockStatus = 1016;</code> + * @return The blockStatus. + */ + @java.lang.Override + public int getBlockStatus() { + return blockStatus_; + } + + public static final int COMMENTRESTRICT_FIELD_NUMBER = 1017; + private int commentRestrict_ = 0; + /** + * <code>int32 commentRestrict = 1017;</code> + * @return The commentRestrict. + */ + @java.lang.Override + public int getCommentRestrict() { + return commentRestrict_; + } + + public static final int CONSTELLATION_FIELD_NUMBER = 1018; + @SuppressWarnings("serial") + private volatile java.lang.Object constellation_ = ""; + /** + * <code>string constellation = 1018;</code> + * @return The constellation. + */ + @java.lang.Override + public java.lang.String getConstellation() { + java.lang.Object ref = constellation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + constellation_ = s; + return s; + } + } + /** + * <code>string constellation = 1018;</code> + * @return The bytes for constellation. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getConstellationBytes() { + java.lang.Object ref = constellation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + constellation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISABLEICHAT_FIELD_NUMBER = 1019; + private int disableIchat_ = 0; + /** + * <code>int32 disableIchat = 1019;</code> + * @return The disableIchat. + */ + @java.lang.Override + public int getDisableIchat() { + return disableIchat_; + } + + public static final int ENABLEICHATIMG_FIELD_NUMBER = 1020; + private long enableIchatImg_ = 0L; + /** + * <code>int64 enableIchatImg = 1020;</code> + * @return The enableIchatImg. + */ + @java.lang.Override + public long getEnableIchatImg() { + return enableIchatImg_; + } + + public static final int EXP_FIELD_NUMBER = 1021; + private int exp_ = 0; + /** + * <code>int32 exp = 1021;</code> + * @return The exp. + */ + @java.lang.Override + public int getExp() { + return exp_; + } + + public static final int FANTICKETCOUNT_FIELD_NUMBER = 1022; + private long fanTicketCount_ = 0L; + /** + * <code>int64 fanTicketCount = 1022;</code> + * @return The fanTicketCount. + */ + @java.lang.Override + public long getFanTicketCount() { + return fanTicketCount_; + } + + public static final int FOLDSTRANGERCHAT_FIELD_NUMBER = 1023; + private boolean foldStrangerChat_ = false; + /** + * <code>bool foldStrangerChat = 1023;</code> + * @return The foldStrangerChat. + */ + @java.lang.Override + public boolean getFoldStrangerChat() { + return foldStrangerChat_; + } + + public static final int FOLLOWSTATUS_FIELD_NUMBER = 1024; + private long followStatus_ = 0L; + /** + * <code>int64 followStatus = 1024;</code> + * @return The followStatus. + */ + @java.lang.Override + public long getFollowStatus() { + return followStatus_; + } + + public static final int HOTSOONVERIFIED_FIELD_NUMBER = 1025; + private boolean hotsoonVerified_ = false; + /** + * <code>bool hotsoonVerified = 1025;</code> + * @return The hotsoonVerified. + */ + @java.lang.Override + public boolean getHotsoonVerified() { + return hotsoonVerified_; + } + + public static final int HOTSOONVERIFIEDREASON_FIELD_NUMBER = 1026; + @SuppressWarnings("serial") + private volatile java.lang.Object hotsoonVerifiedReason_ = ""; + /** + * <code>string hotsoonVerifiedReason = 1026;</code> + * @return The hotsoonVerifiedReason. + */ + @java.lang.Override + public java.lang.String getHotsoonVerifiedReason() { + java.lang.Object ref = hotsoonVerifiedReason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hotsoonVerifiedReason_ = s; + return s; + } + } + /** + * <code>string hotsoonVerifiedReason = 1026;</code> + * @return The bytes for hotsoonVerifiedReason. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHotsoonVerifiedReasonBytes() { + java.lang.Object ref = hotsoonVerifiedReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hotsoonVerifiedReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ICHATRESTRICTTYPE_FIELD_NUMBER = 1027; + private int ichatRestrictType_ = 0; + /** + * <code>int32 ichatRestrictType = 1027;</code> + * @return The ichatRestrictType. + */ + @java.lang.Override + public int getIchatRestrictType() { + return ichatRestrictType_; + } + + public static final int IDSTR_FIELD_NUMBER = 1028; + @SuppressWarnings("serial") + private volatile java.lang.Object idStr_ = ""; + /** + * <code>string idStr = 1028;</code> + * @return The idStr. + */ + @java.lang.Override + public java.lang.String getIdStr() { + java.lang.Object ref = idStr_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + idStr_ = s; + return s; + } + } + /** + * <code>string idStr = 1028;</code> + * @return The bytes for idStr. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdStrBytes() { + java.lang.Object ref = idStr_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + idStr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ISFOLLOWER_FIELD_NUMBER = 1029; + private boolean isFollower_ = false; + /** + * <code>bool isFollower = 1029;</code> + * @return The isFollower. + */ + @java.lang.Override + public boolean getIsFollower() { + return isFollower_; + } + + public static final int ISFOLLOWING_FIELD_NUMBER = 1030; + private boolean isFollowing_ = false; + /** + * <code>bool isFollowing = 1030;</code> + * @return The isFollowing. + */ + @java.lang.Override + public boolean getIsFollowing() { + return isFollowing_; + } + + public static final int NEEDPROFILEGUIDE_FIELD_NUMBER = 1031; + private boolean needProfileGuide_ = false; + /** + * <code>bool needProfileGuide = 1031;</code> + * @return The needProfileGuide. + */ + @java.lang.Override + public boolean getNeedProfileGuide() { + return needProfileGuide_; + } + + public static final int PAYSCORES_FIELD_NUMBER = 1032; + private long payScores_ = 0L; + /** + * <code>int64 payScores = 1032;</code> + * @return The payScores. + */ + @java.lang.Override + public long getPayScores() { + return payScores_; + } + + public static final int PUSHCOMMENTSTATUS_FIELD_NUMBER = 1033; + private boolean pushCommentStatus_ = false; + /** + * <code>bool pushCommentStatus = 1033;</code> + * @return The pushCommentStatus. + */ + @java.lang.Override + public boolean getPushCommentStatus() { + return pushCommentStatus_; + } + + public static final int PUSHDIGG_FIELD_NUMBER = 1034; + private boolean pushDigg_ = false; + /** + * <code>bool pushDigg = 1034;</code> + * @return The pushDigg. + */ + @java.lang.Override + public boolean getPushDigg() { + return pushDigg_; + } + + public static final int PUSHFOLLOW_FIELD_NUMBER = 1035; + private boolean pushFollow_ = false; + /** + * <code>bool pushFollow = 1035;</code> + * @return The pushFollow. + */ + @java.lang.Override + public boolean getPushFollow() { + return pushFollow_; + } + + public static final int PUSHFRIENDACTION_FIELD_NUMBER = 1036; + private boolean pushFriendAction_ = false; + /** + * <code>bool pushFriendAction = 1036;</code> + * @return The pushFriendAction. + */ + @java.lang.Override + public boolean getPushFriendAction() { + return pushFriendAction_; + } + + public static final int PUSHICHAT_FIELD_NUMBER = 1037; + private boolean pushIchat_ = false; + /** + * <code>bool pushIchat = 1037;</code> + * @return The pushIchat. + */ + @java.lang.Override + public boolean getPushIchat() { + return pushIchat_; + } + + public static final int PUSHSTATUS_FIELD_NUMBER = 1038; + private boolean pushStatus_ = false; + /** + * <code>bool pushStatus = 1038;</code> + * @return The pushStatus. + */ + @java.lang.Override + public boolean getPushStatus() { + return pushStatus_; + } + + public static final int PUSHVIDEOPOST_FIELD_NUMBER = 1039; + private boolean pushVideoPost_ = false; + /** + * <code>bool pushVideoPost = 1039;</code> + * @return The pushVideoPost. + */ + @java.lang.Override + public boolean getPushVideoPost() { + return pushVideoPost_; + } + + public static final int PUSHVIDEORECOMMEND_FIELD_NUMBER = 1040; + private boolean pushVideoRecommend_ = false; + /** + * <code>bool pushVideoRecommend = 1040;</code> + * @return The pushVideoRecommend. + */ + @java.lang.Override + public boolean getPushVideoRecommend() { + return pushVideoRecommend_; + } + + public static final int STATS_FIELD_NUMBER = 1041; + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats stats_; + /** + * <code>.User.UserStats stats = 1041;</code> + * @return Whether the stats field is set. + */ + @java.lang.Override + public boolean hasStats() { + return stats_ != null; + } + /** + * <code>.User.UserStats stats = 1041;</code> + * @return The stats. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats getStats() { + return stats_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.getDefaultInstance() : stats_; + } + /** + * <code>.User.UserStats stats = 1041;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStatsOrBuilder getStatsOrBuilder() { + return stats_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.getDefaultInstance() : stats_; + } + + public static final int VERIFIEDMOBILE_FIELD_NUMBER = 1042; + private boolean verifiedMobile_ = false; + /** + * <code>bool verifiedMobile = 1042;</code> + * @return The verifiedMobile. + */ + @java.lang.Override + public boolean getVerifiedMobile() { + return verifiedMobile_; + } + + public static final int VERIFIEDREASON_FIELD_NUMBER = 1043; + @SuppressWarnings("serial") + private volatile java.lang.Object verifiedReason_ = ""; + /** + * <code>string verifiedReason = 1043;</code> + * @return The verifiedReason. + */ + @java.lang.Override + public java.lang.String getVerifiedReason() { + java.lang.Object ref = verifiedReason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verifiedReason_ = s; + return s; + } + } + /** + * <code>string verifiedReason = 1043;</code> + * @return The bytes for verifiedReason. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVerifiedReasonBytes() { + java.lang.Object ref = verifiedReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verifiedReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WITHCARMANAGEMENTPERMISSION_FIELD_NUMBER = 1044; + private boolean withCarManagementPermission_ = false; + /** + * <code>bool withCarManagementPermission = 1044;</code> + * @return The withCarManagementPermission. + */ + @java.lang.Override + public boolean getWithCarManagementPermission() { + return withCarManagementPermission_; + } + + public static final int AGERANGE_FIELD_NUMBER = 1045; + private int ageRange_ = 0; + /** + * <code>int32 ageRange = 1045;</code> + * @return The ageRange. + */ + @java.lang.Override + public int getAgeRange() { + return ageRange_; + } + + public static final int WATCHDURATIONMONTH_FIELD_NUMBER = 1046; + private long watchDurationMonth_ = 0L; + /** + * <code>int64 watchDurationMonth = 1046;</code> + * @return The watchDurationMonth. + */ + @java.lang.Override + public long getWatchDurationMonth() { + return watchDurationMonth_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (id_ != 0L) { + output.writeUInt64(1, id_); + } + if (shortId_ != 0L) { + output.writeUInt64(2, shortId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nickname_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nickname_); + } + if (gender_ != 0) { + output.writeUInt32(4, gender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, signature_); + } + if (level_ != 0) { + output.writeUInt32(6, level_); + } + if (birthday_ != 0L) { + output.writeUInt64(7, birthday_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(telephone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, telephone_); + } + if (avatarThumb_ != null) { + output.writeMessage(9, getAvatarThumb()); + } + if (avatarMedium_ != null) { + output.writeMessage(10, getAvatarMedium()); + } + if (avatarLarge_ != null) { + output.writeMessage(11, getAvatarLarge()); + } + if (verified_ != false) { + output.writeBool(12, verified_); + } + if (experience_ != 0) { + output.writeInt32(13, experience_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(city_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, city_); + } + if (status_ != 0) { + output.writeInt32(15, status_); + } + if (createTime_ != 0L) { + output.writeInt64(16, createTime_); + } + if (modifyTime_ != 0L) { + output.writeInt64(17, modifyTime_); + } + if (secret_ != 0) { + output.writeInt32(18, secret_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shareQrcodeUri_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, shareQrcodeUri_); + } + if (incomeSharePercent_ != 0) { + output.writeInt32(20, incomeSharePercent_); + } + if (badgeImageListList_ != null) { + output.writeMessage(21, getBadgeImageListList()); + } + if (followInfo_ != null) { + output.writeMessage(22, getFollowInfo()); + } + if (payGrade_ != null) { + output.writeMessage(23, getPayGrade()); + } + if (fansClub_ != null) { + output.writeMessage(24, getFansClub()); + } + if (border_ != null) { + output.writeMessage(25, getBorder()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(specialId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 26, specialId_); + } + if (avatarBorder_ != null) { + output.writeMessage(27, getAvatarBorder()); + } + if (medal_ != null) { + output.writeMessage(28, getMedal()); + } + for (int i = 0; i < realTimeIconsList_.size(); i++) { + output.writeMessage(29, realTimeIconsList_.get(i)); + } + for (int i = 0; i < newRealTimeIconsList_.size(); i++) { + output.writeMessage(30, newRealTimeIconsList_.get(i)); + } + if (topVipNo_ != 0L) { + output.writeInt64(31, topVipNo_); + } + if (userAttr_ != null) { + output.writeMessage(32, getUserAttr()); + } + if (ownRoom_ != null) { + output.writeMessage(33, getOwnRoom()); + } + if (payScore_ != 0L) { + output.writeInt64(34, payScore_); + } + if (ticketCount_ != 0L) { + output.writeInt64(35, ticketCount_); + } + if (anchorInfo_ != null) { + output.writeMessage(36, getAnchorInfo()); + } + if (linkMicStats_ != 0) { + output.writeInt32(37, linkMicStats_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 38, displayId_); + } + if (withCommercePermission_ != false) { + output.writeBool(39, withCommercePermission_); + } + if (withFusionShopEntry_ != false) { + output.writeBool(40, withFusionShopEntry_); + } + if (totalRechargeDiamondCount_ != 0L) { + output.writeInt64(41, totalRechargeDiamondCount_); + } + if (webcastAnchorLevel_ != null) { + output.writeMessage(42, getWebcastAnchorLevel()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verifiedContent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 43, verifiedContent_); + } + if (authorStats_ != null) { + output.writeMessage(44, getAuthorStats()); + } + for (int i = 0; i < topFansList_.size(); i++) { + output.writeMessage(45, topFansList_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 46, secUid_); + } + if (userRole_ != 0) { + output.writeInt32(47, userRole_); + } + if (xiguaInfo_ != null) { + output.writeMessage(48, getXiguaInfo()); + } + if (activityReward_ != null) { + output.writeMessage(49, getActivityReward()); + } + if (nobleInfo_ != null) { + output.writeMessage(50, getNobleInfo()); + } + if (brotherhoodInfo_ != null) { + output.writeMessage(51, getBrotherhoodInfo()); + } + if (personalCard_ != null) { + output.writeMessage(52, getPersonalCard()); + } + if (authenticationInfo_ != null) { + output.writeMessage(53, getAuthenticationInfo()); + } + if (authorizationInfo_ != 0) { + output.writeInt32(54, authorizationInfo_); + } + if (adversaryAuthorizationInfo_ != 0) { + output.writeInt32(55, adversaryAuthorizationInfo_); + } + if (poiInfo_ != null) { + output.writeMessage(56, getPoiInfo()); + } + if (mediaBadgeImageListList_ != null) { + output.writeMessage(57, getMediaBadgeImageListList()); + } + if (adversaryUserStatus_ != 0) { + output.writeInt32(58, adversaryUserStatus_); + } + if (userVipInfo_ != null) { + output.writeMessage(59, getUserVipInfo()); + } + if (getCommerceWebcastConfigIdsListList().size() > 0) { + output.writeUInt32NoTag(482); + output.writeUInt32NoTag(commerceWebcastConfigIdsListMemoizedSerializedSize); + } + for (int i = 0; i < commerceWebcastConfigIdsList_.size(); i++) { + output.writeInt64NoTag(commerceWebcastConfigIdsList_.getLong(i)); + } + if (badgeImageListV2List_ != null) { + output.writeMessage(61, getBadgeImageListV2List()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationCity_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 63, locationCity_); + } + if (fansGroupInfo_ != null) { + output.writeMessage(64, getFansGroupInfo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remarkName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 65, remarkName_); + } + if (mysteryMan_ != 0) { + output.writeInt32(66, mysteryMan_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webRid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 67, webRid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(desensitizedNickname_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 68, desensitizedNickname_); + } + if (jAccreditInfo_ != null) { + output.writeMessage(69, getJAccreditInfo()); + } + if (subscribe_ != null) { + output.writeMessage(70, getSubscribe()); + } + if (isAnonymous_ != false) { + output.writeBool(71, isAnonymous_); + } + if (consumeDiamondLevel_ != 0) { + output.writeInt32(72, consumeDiamondLevel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webcastUid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 73, webcastUid_); + } + if (profileStyleParams_ != null) { + output.writeMessage(74, getProfileStyleParams()); + } + if (userDressInfo_ != null) { + output.writeMessage(75, getUserDressInfo()); + } + if (allowBeLocated_ != false) { + output.writeBool(1001, allowBeLocated_); + } + if (allowFindByContacts_ != false) { + output.writeBool(1002, allowFindByContacts_); + } + if (allowOthersDownloadVideo_ != false) { + output.writeBool(1003, allowOthersDownloadVideo_); + } + if (allowOthersDownloadWhenSharingVideo_ != false) { + output.writeBool(1004, allowOthersDownloadWhenSharingVideo_); + } + if (allowShareShowProfile_ != false) { + output.writeBool(1005, allowShareShowProfile_); + } + if (allowShowInGossip_ != false) { + output.writeBool(1006, allowShowInGossip_); + } + if (allowShowMyAction_ != false) { + output.writeBool(1007, allowShowMyAction_); + } + if (allowStrangeComment_ != false) { + output.writeBool(1008, allowStrangeComment_); + } + if (allowUnfollowerComment_ != false) { + output.writeBool(1009, allowUnfollowerComment_); + } + if (allowUseLinkmic_ != false) { + output.writeBool(1010, allowUseLinkmic_); + } + if (anchorLevel_ != null) { + output.writeMessage(1011, getAnchorLevel()); + } + if (avatarJpg_ != null) { + output.writeMessage(1012, getAvatarJpg()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bgImgUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1013, bgImgUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(birthdayDescription_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1014, birthdayDescription_); + } + if (birthdayValid_ != false) { + output.writeBool(1015, birthdayValid_); + } + if (blockStatus_ != 0) { + output.writeInt32(1016, blockStatus_); + } + if (commentRestrict_ != 0) { + output.writeInt32(1017, commentRestrict_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(constellation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1018, constellation_); + } + if (disableIchat_ != 0) { + output.writeInt32(1019, disableIchat_); + } + if (enableIchatImg_ != 0L) { + output.writeInt64(1020, enableIchatImg_); + } + if (exp_ != 0) { + output.writeInt32(1021, exp_); + } + if (fanTicketCount_ != 0L) { + output.writeInt64(1022, fanTicketCount_); + } + if (foldStrangerChat_ != false) { + output.writeBool(1023, foldStrangerChat_); + } + if (followStatus_ != 0L) { + output.writeInt64(1024, followStatus_); + } + if (hotsoonVerified_ != false) { + output.writeBool(1025, hotsoonVerified_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hotsoonVerifiedReason_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1026, hotsoonVerifiedReason_); + } + if (ichatRestrictType_ != 0) { + output.writeInt32(1027, ichatRestrictType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(idStr_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1028, idStr_); + } + if (isFollower_ != false) { + output.writeBool(1029, isFollower_); + } + if (isFollowing_ != false) { + output.writeBool(1030, isFollowing_); + } + if (needProfileGuide_ != false) { + output.writeBool(1031, needProfileGuide_); + } + if (payScores_ != 0L) { + output.writeInt64(1032, payScores_); + } + if (pushCommentStatus_ != false) { + output.writeBool(1033, pushCommentStatus_); + } + if (pushDigg_ != false) { + output.writeBool(1034, pushDigg_); + } + if (pushFollow_ != false) { + output.writeBool(1035, pushFollow_); + } + if (pushFriendAction_ != false) { + output.writeBool(1036, pushFriendAction_); + } + if (pushIchat_ != false) { + output.writeBool(1037, pushIchat_); + } + if (pushStatus_ != false) { + output.writeBool(1038, pushStatus_); + } + if (pushVideoPost_ != false) { + output.writeBool(1039, pushVideoPost_); + } + if (pushVideoRecommend_ != false) { + output.writeBool(1040, pushVideoRecommend_); + } + if (stats_ != null) { + output.writeMessage(1041, getStats()); + } + if (verifiedMobile_ != false) { + output.writeBool(1042, verifiedMobile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verifiedReason_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1043, verifiedReason_); + } + if (withCarManagementPermission_ != false) { + output.writeBool(1044, withCarManagementPermission_); + } + if (ageRange_ != 0) { + output.writeInt32(1045, ageRange_); + } + if (watchDurationMonth_ != 0L) { + output.writeInt64(1046, watchDurationMonth_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (id_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, id_); + } + if (shortId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, shortId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nickname_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nickname_); + } + if (gender_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, gender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signature_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, signature_); + } + if (level_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(6, level_); + } + if (birthday_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(7, birthday_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(telephone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, telephone_); + } + if (avatarThumb_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getAvatarThumb()); + } + if (avatarMedium_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getAvatarMedium()); + } + if (avatarLarge_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getAvatarLarge()); + } + if (verified_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(12, verified_); + } + if (experience_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(13, experience_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(city_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, city_); + } + if (status_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(15, status_); + } + if (createTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(16, createTime_); + } + if (modifyTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(17, modifyTime_); + } + if (secret_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(18, secret_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(shareQrcodeUri_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, shareQrcodeUri_); + } + if (incomeSharePercent_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(20, incomeSharePercent_); + } + if (badgeImageListList_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getBadgeImageListList()); + } + if (followInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(22, getFollowInfo()); + } + if (payGrade_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, getPayGrade()); + } + if (fansClub_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, getFansClub()); + } + if (border_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(25, getBorder()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(specialId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(26, specialId_); + } + if (avatarBorder_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(27, getAvatarBorder()); + } + if (medal_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(28, getMedal()); + } + for (int i = 0; i < realTimeIconsList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(29, realTimeIconsList_.get(i)); + } + for (int i = 0; i < newRealTimeIconsList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(30, newRealTimeIconsList_.get(i)); + } + if (topVipNo_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(31, topVipNo_); + } + if (userAttr_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(32, getUserAttr()); + } + if (ownRoom_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(33, getOwnRoom()); + } + if (payScore_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(34, payScore_); + } + if (ticketCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(35, ticketCount_); + } + if (anchorInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(36, getAnchorInfo()); + } + if (linkMicStats_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(37, linkMicStats_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(38, displayId_); + } + if (withCommercePermission_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(39, withCommercePermission_); + } + if (withFusionShopEntry_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(40, withFusionShopEntry_); + } + if (totalRechargeDiamondCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(41, totalRechargeDiamondCount_); + } + if (webcastAnchorLevel_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(42, getWebcastAnchorLevel()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verifiedContent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(43, verifiedContent_); + } + if (authorStats_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(44, getAuthorStats()); + } + for (int i = 0; i < topFansList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(45, topFansList_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(46, secUid_); + } + if (userRole_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(47, userRole_); + } + if (xiguaInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(48, getXiguaInfo()); + } + if (activityReward_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(49, getActivityReward()); + } + if (nobleInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(50, getNobleInfo()); + } + if (brotherhoodInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(51, getBrotherhoodInfo()); + } + if (personalCard_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(52, getPersonalCard()); + } + if (authenticationInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(53, getAuthenticationInfo()); + } + if (authorizationInfo_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(54, authorizationInfo_); + } + if (adversaryAuthorizationInfo_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(55, adversaryAuthorizationInfo_); + } + if (poiInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(56, getPoiInfo()); + } + if (mediaBadgeImageListList_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(57, getMediaBadgeImageListList()); + } + if (adversaryUserStatus_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(58, adversaryUserStatus_); + } + if (userVipInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(59, getUserVipInfo()); + } + { + int dataSize = 0; + for (int i = 0; i < commerceWebcastConfigIdsList_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt64SizeNoTag(commerceWebcastConfigIdsList_.getLong(i)); + } + size += dataSize; + if (!getCommerceWebcastConfigIdsListList().isEmpty()) { + size += 2; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + commerceWebcastConfigIdsListMemoizedSerializedSize = dataSize; + } + if (badgeImageListV2List_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(61, getBadgeImageListV2List()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationCity_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(63, locationCity_); + } + if (fansGroupInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(64, getFansGroupInfo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remarkName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(65, remarkName_); + } + if (mysteryMan_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(66, mysteryMan_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webRid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(67, webRid_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(desensitizedNickname_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(68, desensitizedNickname_); + } + if (jAccreditInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(69, getJAccreditInfo()); + } + if (subscribe_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(70, getSubscribe()); + } + if (isAnonymous_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(71, isAnonymous_); + } + if (consumeDiamondLevel_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(72, consumeDiamondLevel_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(webcastUid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(73, webcastUid_); + } + if (profileStyleParams_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(74, getProfileStyleParams()); + } + if (userDressInfo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(75, getUserDressInfo()); + } + if (allowBeLocated_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1001, allowBeLocated_); + } + if (allowFindByContacts_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1002, allowFindByContacts_); + } + if (allowOthersDownloadVideo_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1003, allowOthersDownloadVideo_); + } + if (allowOthersDownloadWhenSharingVideo_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1004, allowOthersDownloadWhenSharingVideo_); + } + if (allowShareShowProfile_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1005, allowShareShowProfile_); + } + if (allowShowInGossip_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1006, allowShowInGossip_); + } + if (allowShowMyAction_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1007, allowShowMyAction_); + } + if (allowStrangeComment_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1008, allowStrangeComment_); + } + if (allowUnfollowerComment_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1009, allowUnfollowerComment_); + } + if (allowUseLinkmic_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1010, allowUseLinkmic_); + } + if (anchorLevel_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1011, getAnchorLevel()); + } + if (avatarJpg_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1012, getAvatarJpg()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bgImgUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1013, bgImgUrl_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(birthdayDescription_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1014, birthdayDescription_); + } + if (birthdayValid_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1015, birthdayValid_); + } + if (blockStatus_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1016, blockStatus_); + } + if (commentRestrict_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1017, commentRestrict_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(constellation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1018, constellation_); + } + if (disableIchat_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1019, disableIchat_); + } + if (enableIchatImg_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1020, enableIchatImg_); + } + if (exp_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1021, exp_); + } + if (fanTicketCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1022, fanTicketCount_); + } + if (foldStrangerChat_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1023, foldStrangerChat_); + } + if (followStatus_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1024, followStatus_); + } + if (hotsoonVerified_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1025, hotsoonVerified_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(hotsoonVerifiedReason_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1026, hotsoonVerifiedReason_); + } + if (ichatRestrictType_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1027, ichatRestrictType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(idStr_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1028, idStr_); + } + if (isFollower_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1029, isFollower_); + } + if (isFollowing_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1030, isFollowing_); + } + if (needProfileGuide_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1031, needProfileGuide_); + } + if (payScores_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1032, payScores_); + } + if (pushCommentStatus_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1033, pushCommentStatus_); + } + if (pushDigg_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1034, pushDigg_); + } + if (pushFollow_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1035, pushFollow_); + } + if (pushFriendAction_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1036, pushFriendAction_); + } + if (pushIchat_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1037, pushIchat_); + } + if (pushStatus_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1038, pushStatus_); + } + if (pushVideoPost_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1039, pushVideoPost_); + } + if (pushVideoRecommend_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1040, pushVideoRecommend_); + } + if (stats_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1041, getStats()); + } + if (verifiedMobile_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1042, verifiedMobile_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(verifiedReason_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1043, verifiedReason_); + } + if (withCarManagementPermission_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1044, withCarManagementPermission_); + } + if (ageRange_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1045, ageRange_); + } + if (watchDurationMonth_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1046, watchDurationMonth_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User other = (tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User) obj; + + if (getId() + != other.getId()) return false; + if (getShortId() + != other.getShortId()) return false; + if (!getNickname() + .equals(other.getNickname())) return false; + if (getGender() + != other.getGender()) return false; + if (!getSignature() + .equals(other.getSignature())) return false; + if (getLevel() + != other.getLevel()) return false; + if (getBirthday() + != other.getBirthday()) return false; + if (!getTelephone() + .equals(other.getTelephone())) return false; + if (hasAvatarThumb() != other.hasAvatarThumb()) return false; + if (hasAvatarThumb()) { + if (!getAvatarThumb() + .equals(other.getAvatarThumb())) return false; + } + if (hasAvatarMedium() != other.hasAvatarMedium()) return false; + if (hasAvatarMedium()) { + if (!getAvatarMedium() + .equals(other.getAvatarMedium())) return false; + } + if (hasAvatarLarge() != other.hasAvatarLarge()) return false; + if (hasAvatarLarge()) { + if (!getAvatarLarge() + .equals(other.getAvatarLarge())) return false; + } + if (getVerified() + != other.getVerified()) return false; + if (getExperience() + != other.getExperience()) return false; + if (!getCity() + .equals(other.getCity())) return false; + if (getStatus() + != other.getStatus()) return false; + if (getCreateTime() + != other.getCreateTime()) return false; + if (getModifyTime() + != other.getModifyTime()) return false; + if (getSecret() + != other.getSecret()) return false; + if (!getShareQrcodeUri() + .equals(other.getShareQrcodeUri())) return false; + if (getIncomeSharePercent() + != other.getIncomeSharePercent()) return false; + if (hasBadgeImageListList() != other.hasBadgeImageListList()) return false; + if (hasBadgeImageListList()) { + if (!getBadgeImageListList() + .equals(other.getBadgeImageListList())) return false; + } + if (hasFollowInfo() != other.hasFollowInfo()) return false; + if (hasFollowInfo()) { + if (!getFollowInfo() + .equals(other.getFollowInfo())) return false; + } + if (hasPayGrade() != other.hasPayGrade()) return false; + if (hasPayGrade()) { + if (!getPayGrade() + .equals(other.getPayGrade())) return false; + } + if (hasFansClub() != other.hasFansClub()) return false; + if (hasFansClub()) { + if (!getFansClub() + .equals(other.getFansClub())) return false; + } + if (hasBorder() != other.hasBorder()) return false; + if (hasBorder()) { + if (!getBorder() + .equals(other.getBorder())) return false; + } + if (!getSpecialId() + .equals(other.getSpecialId())) return false; + if (hasAvatarBorder() != other.hasAvatarBorder()) return false; + if (hasAvatarBorder()) { + if (!getAvatarBorder() + .equals(other.getAvatarBorder())) return false; + } + if (hasMedal() != other.hasMedal()) return false; + if (hasMedal()) { + if (!getMedal() + .equals(other.getMedal())) return false; + } + if (!getRealTimeIconsListList() + .equals(other.getRealTimeIconsListList())) return false; + if (!getNewRealTimeIconsListList() + .equals(other.getNewRealTimeIconsListList())) return false; + if (getTopVipNo() + != other.getTopVipNo()) return false; + if (hasUserAttr() != other.hasUserAttr()) return false; + if (hasUserAttr()) { + if (!getUserAttr() + .equals(other.getUserAttr())) return false; + } + if (hasOwnRoom() != other.hasOwnRoom()) return false; + if (hasOwnRoom()) { + if (!getOwnRoom() + .equals(other.getOwnRoom())) return false; + } + if (getPayScore() + != other.getPayScore()) return false; + if (getTicketCount() + != other.getTicketCount()) return false; + if (hasAnchorInfo() != other.hasAnchorInfo()) return false; + if (hasAnchorInfo()) { + if (!getAnchorInfo() + .equals(other.getAnchorInfo())) return false; + } + if (getLinkMicStats() + != other.getLinkMicStats()) return false; + if (!getDisplayId() + .equals(other.getDisplayId())) return false; + if (getWithCommercePermission() + != other.getWithCommercePermission()) return false; + if (getWithFusionShopEntry() + != other.getWithFusionShopEntry()) return false; + if (getTotalRechargeDiamondCount() + != other.getTotalRechargeDiamondCount()) return false; + if (hasWebcastAnchorLevel() != other.hasWebcastAnchorLevel()) return false; + if (hasWebcastAnchorLevel()) { + if (!getWebcastAnchorLevel() + .equals(other.getWebcastAnchorLevel())) return false; + } + if (!getVerifiedContent() + .equals(other.getVerifiedContent())) return false; + if (hasAuthorStats() != other.hasAuthorStats()) return false; + if (hasAuthorStats()) { + if (!getAuthorStats() + .equals(other.getAuthorStats())) return false; + } + if (!getTopFansListList() + .equals(other.getTopFansListList())) return false; + if (!getSecUid() + .equals(other.getSecUid())) return false; + if (getUserRole() + != other.getUserRole()) return false; + if (hasXiguaInfo() != other.hasXiguaInfo()) return false; + if (hasXiguaInfo()) { + if (!getXiguaInfo() + .equals(other.getXiguaInfo())) return false; + } + if (hasActivityReward() != other.hasActivityReward()) return false; + if (hasActivityReward()) { + if (!getActivityReward() + .equals(other.getActivityReward())) return false; + } + if (hasNobleInfo() != other.hasNobleInfo()) return false; + if (hasNobleInfo()) { + if (!getNobleInfo() + .equals(other.getNobleInfo())) return false; + } + if (hasBrotherhoodInfo() != other.hasBrotherhoodInfo()) return false; + if (hasBrotherhoodInfo()) { + if (!getBrotherhoodInfo() + .equals(other.getBrotherhoodInfo())) return false; + } + if (hasPersonalCard() != other.hasPersonalCard()) return false; + if (hasPersonalCard()) { + if (!getPersonalCard() + .equals(other.getPersonalCard())) return false; + } + if (hasAuthenticationInfo() != other.hasAuthenticationInfo()) return false; + if (hasAuthenticationInfo()) { + if (!getAuthenticationInfo() + .equals(other.getAuthenticationInfo())) return false; + } + if (getAuthorizationInfo() + != other.getAuthorizationInfo()) return false; + if (getAdversaryAuthorizationInfo() + != other.getAdversaryAuthorizationInfo()) return false; + if (hasPoiInfo() != other.hasPoiInfo()) return false; + if (hasPoiInfo()) { + if (!getPoiInfo() + .equals(other.getPoiInfo())) return false; + } + if (hasMediaBadgeImageListList() != other.hasMediaBadgeImageListList()) return false; + if (hasMediaBadgeImageListList()) { + if (!getMediaBadgeImageListList() + .equals(other.getMediaBadgeImageListList())) return false; + } + if (getAdversaryUserStatus() + != other.getAdversaryUserStatus()) return false; + if (hasUserVipInfo() != other.hasUserVipInfo()) return false; + if (hasUserVipInfo()) { + if (!getUserVipInfo() + .equals(other.getUserVipInfo())) return false; + } + if (!getCommerceWebcastConfigIdsListList() + .equals(other.getCommerceWebcastConfigIdsListList())) return false; + if (hasBadgeImageListV2List() != other.hasBadgeImageListV2List()) return false; + if (hasBadgeImageListV2List()) { + if (!getBadgeImageListV2List() + .equals(other.getBadgeImageListV2List())) return false; + } + if (!getLocationCity() + .equals(other.getLocationCity())) return false; + if (hasFansGroupInfo() != other.hasFansGroupInfo()) return false; + if (hasFansGroupInfo()) { + if (!getFansGroupInfo() + .equals(other.getFansGroupInfo())) return false; + } + if (!getRemarkName() + .equals(other.getRemarkName())) return false; + if (getMysteryMan() + != other.getMysteryMan()) return false; + if (!getWebRid() + .equals(other.getWebRid())) return false; + if (!getDesensitizedNickname() + .equals(other.getDesensitizedNickname())) return false; + if (hasJAccreditInfo() != other.hasJAccreditInfo()) return false; + if (hasJAccreditInfo()) { + if (!getJAccreditInfo() + .equals(other.getJAccreditInfo())) return false; + } + if (hasSubscribe() != other.hasSubscribe()) return false; + if (hasSubscribe()) { + if (!getSubscribe() + .equals(other.getSubscribe())) return false; + } + if (getIsAnonymous() + != other.getIsAnonymous()) return false; + if (getConsumeDiamondLevel() + != other.getConsumeDiamondLevel()) return false; + if (!getWebcastUid() + .equals(other.getWebcastUid())) return false; + if (hasProfileStyleParams() != other.hasProfileStyleParams()) return false; + if (hasProfileStyleParams()) { + if (!getProfileStyleParams() + .equals(other.getProfileStyleParams())) return false; + } + if (hasUserDressInfo() != other.hasUserDressInfo()) return false; + if (hasUserDressInfo()) { + if (!getUserDressInfo() + .equals(other.getUserDressInfo())) return false; + } + if (getAllowBeLocated() + != other.getAllowBeLocated()) return false; + if (getAllowFindByContacts() + != other.getAllowFindByContacts()) return false; + if (getAllowOthersDownloadVideo() + != other.getAllowOthersDownloadVideo()) return false; + if (getAllowOthersDownloadWhenSharingVideo() + != other.getAllowOthersDownloadWhenSharingVideo()) return false; + if (getAllowShareShowProfile() + != other.getAllowShareShowProfile()) return false; + if (getAllowShowInGossip() + != other.getAllowShowInGossip()) return false; + if (getAllowShowMyAction() + != other.getAllowShowMyAction()) return false; + if (getAllowStrangeComment() + != other.getAllowStrangeComment()) return false; + if (getAllowUnfollowerComment() + != other.getAllowUnfollowerComment()) return false; + if (getAllowUseLinkmic() + != other.getAllowUseLinkmic()) return false; + if (hasAnchorLevel() != other.hasAnchorLevel()) return false; + if (hasAnchorLevel()) { + if (!getAnchorLevel() + .equals(other.getAnchorLevel())) return false; + } + if (hasAvatarJpg() != other.hasAvatarJpg()) return false; + if (hasAvatarJpg()) { + if (!getAvatarJpg() + .equals(other.getAvatarJpg())) return false; + } + if (!getBgImgUrl() + .equals(other.getBgImgUrl())) return false; + if (!getBirthdayDescription() + .equals(other.getBirthdayDescription())) return false; + if (getBirthdayValid() + != other.getBirthdayValid()) return false; + if (getBlockStatus() + != other.getBlockStatus()) return false; + if (getCommentRestrict() + != other.getCommentRestrict()) return false; + if (!getConstellation() + .equals(other.getConstellation())) return false; + if (getDisableIchat() + != other.getDisableIchat()) return false; + if (getEnableIchatImg() + != other.getEnableIchatImg()) return false; + if (getExp() + != other.getExp()) return false; + if (getFanTicketCount() + != other.getFanTicketCount()) return false; + if (getFoldStrangerChat() + != other.getFoldStrangerChat()) return false; + if (getFollowStatus() + != other.getFollowStatus()) return false; + if (getHotsoonVerified() + != other.getHotsoonVerified()) return false; + if (!getHotsoonVerifiedReason() + .equals(other.getHotsoonVerifiedReason())) return false; + if (getIchatRestrictType() + != other.getIchatRestrictType()) return false; + if (!getIdStr() + .equals(other.getIdStr())) return false; + if (getIsFollower() + != other.getIsFollower()) return false; + if (getIsFollowing() + != other.getIsFollowing()) return false; + if (getNeedProfileGuide() + != other.getNeedProfileGuide()) return false; + if (getPayScores() + != other.getPayScores()) return false; + if (getPushCommentStatus() + != other.getPushCommentStatus()) return false; + if (getPushDigg() + != other.getPushDigg()) return false; + if (getPushFollow() + != other.getPushFollow()) return false; + if (getPushFriendAction() + != other.getPushFriendAction()) return false; + if (getPushIchat() + != other.getPushIchat()) return false; + if (getPushStatus() + != other.getPushStatus()) return false; + if (getPushVideoPost() + != other.getPushVideoPost()) return false; + if (getPushVideoRecommend() + != other.getPushVideoRecommend()) return false; + if (hasStats() != other.hasStats()) return false; + if (hasStats()) { + if (!getStats() + .equals(other.getStats())) return false; + } + if (getVerifiedMobile() + != other.getVerifiedMobile()) return false; + if (!getVerifiedReason() + .equals(other.getVerifiedReason())) return false; + if (getWithCarManagementPermission() + != other.getWithCarManagementPermission()) return false; + if (getAgeRange() + != other.getAgeRange()) return false; + if (getWatchDurationMonth() + != other.getWatchDurationMonth()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getId()); + hash = (37 * hash) + SHORTID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getShortId()); + hash = (37 * hash) + NICKNAME_FIELD_NUMBER; + hash = (53 * hash) + getNickname().hashCode(); + hash = (37 * hash) + GENDER_FIELD_NUMBER; + hash = (53 * hash) + getGender(); + hash = (37 * hash) + SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getSignature().hashCode(); + hash = (37 * hash) + LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getLevel(); + hash = (37 * hash) + BIRTHDAY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBirthday()); + hash = (37 * hash) + TELEPHONE_FIELD_NUMBER; + hash = (53 * hash) + getTelephone().hashCode(); + if (hasAvatarThumb()) { + hash = (37 * hash) + AVATARTHUMB_FIELD_NUMBER; + hash = (53 * hash) + getAvatarThumb().hashCode(); + } + if (hasAvatarMedium()) { + hash = (37 * hash) + AVATARMEDIUM_FIELD_NUMBER; + hash = (53 * hash) + getAvatarMedium().hashCode(); + } + if (hasAvatarLarge()) { + hash = (37 * hash) + AVATARLARGE_FIELD_NUMBER; + hash = (53 * hash) + getAvatarLarge().hashCode(); + } + hash = (37 * hash) + VERIFIED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getVerified()); + hash = (37 * hash) + EXPERIENCE_FIELD_NUMBER; + hash = (53 * hash) + getExperience(); + hash = (37 * hash) + CITY_FIELD_NUMBER; + hash = (53 * hash) + getCity().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus(); + hash = (37 * hash) + CREATETIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCreateTime()); + hash = (37 * hash) + MODIFYTIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getModifyTime()); + hash = (37 * hash) + SECRET_FIELD_NUMBER; + hash = (53 * hash) + getSecret(); + hash = (37 * hash) + SHAREQRCODEURI_FIELD_NUMBER; + hash = (53 * hash) + getShareQrcodeUri().hashCode(); + hash = (37 * hash) + INCOMESHAREPERCENT_FIELD_NUMBER; + hash = (53 * hash) + getIncomeSharePercent(); + if (hasBadgeImageListList()) { + hash = (37 * hash) + BADGEIMAGELISTLIST_FIELD_NUMBER; + hash = (53 * hash) + getBadgeImageListList().hashCode(); + } + if (hasFollowInfo()) { + hash = (37 * hash) + FOLLOWINFO_FIELD_NUMBER; + hash = (53 * hash) + getFollowInfo().hashCode(); + } + if (hasPayGrade()) { + hash = (37 * hash) + PAYGRADE_FIELD_NUMBER; + hash = (53 * hash) + getPayGrade().hashCode(); + } + if (hasFansClub()) { + hash = (37 * hash) + FANSCLUB_FIELD_NUMBER; + hash = (53 * hash) + getFansClub().hashCode(); + } + if (hasBorder()) { + hash = (37 * hash) + BORDER_FIELD_NUMBER; + hash = (53 * hash) + getBorder().hashCode(); + } + hash = (37 * hash) + SPECIALID_FIELD_NUMBER; + hash = (53 * hash) + getSpecialId().hashCode(); + if (hasAvatarBorder()) { + hash = (37 * hash) + AVATARBORDER_FIELD_NUMBER; + hash = (53 * hash) + getAvatarBorder().hashCode(); + } + if (hasMedal()) { + hash = (37 * hash) + MEDAL_FIELD_NUMBER; + hash = (53 * hash) + getMedal().hashCode(); + } + if (getRealTimeIconsListCount() > 0) { + hash = (37 * hash) + REALTIMEICONSLIST_FIELD_NUMBER; + hash = (53 * hash) + getRealTimeIconsListList().hashCode(); + } + if (getNewRealTimeIconsListCount() > 0) { + hash = (37 * hash) + NEWREALTIMEICONSLIST_FIELD_NUMBER; + hash = (53 * hash) + getNewRealTimeIconsListList().hashCode(); + } + hash = (37 * hash) + TOPVIPNO_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTopVipNo()); + if (hasUserAttr()) { + hash = (37 * hash) + USERATTR_FIELD_NUMBER; + hash = (53 * hash) + getUserAttr().hashCode(); + } + if (hasOwnRoom()) { + hash = (37 * hash) + OWNROOM_FIELD_NUMBER; + hash = (53 * hash) + getOwnRoom().hashCode(); + } + hash = (37 * hash) + PAYSCORE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPayScore()); + hash = (37 * hash) + TICKETCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTicketCount()); + if (hasAnchorInfo()) { + hash = (37 * hash) + ANCHORINFO_FIELD_NUMBER; + hash = (53 * hash) + getAnchorInfo().hashCode(); + } + hash = (37 * hash) + LINKMICSTATS_FIELD_NUMBER; + hash = (53 * hash) + getLinkMicStats(); + hash = (37 * hash) + DISPLAYID_FIELD_NUMBER; + hash = (53 * hash) + getDisplayId().hashCode(); + hash = (37 * hash) + WITHCOMMERCEPERMISSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithCommercePermission()); + hash = (37 * hash) + WITHFUSIONSHOPENTRY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithFusionShopEntry()); + hash = (37 * hash) + TOTALRECHARGEDIAMONDCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalRechargeDiamondCount()); + if (hasWebcastAnchorLevel()) { + hash = (37 * hash) + WEBCASTANCHORLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getWebcastAnchorLevel().hashCode(); + } + hash = (37 * hash) + VERIFIEDCONTENT_FIELD_NUMBER; + hash = (53 * hash) + getVerifiedContent().hashCode(); + if (hasAuthorStats()) { + hash = (37 * hash) + AUTHORSTATS_FIELD_NUMBER; + hash = (53 * hash) + getAuthorStats().hashCode(); + } + if (getTopFansListCount() > 0) { + hash = (37 * hash) + TOPFANSLIST_FIELD_NUMBER; + hash = (53 * hash) + getTopFansListList().hashCode(); + } + hash = (37 * hash) + SECUID_FIELD_NUMBER; + hash = (53 * hash) + getSecUid().hashCode(); + hash = (37 * hash) + USERROLE_FIELD_NUMBER; + hash = (53 * hash) + getUserRole(); + if (hasXiguaInfo()) { + hash = (37 * hash) + XIGUAINFO_FIELD_NUMBER; + hash = (53 * hash) + getXiguaInfo().hashCode(); + } + if (hasActivityReward()) { + hash = (37 * hash) + ACTIVITYREWARD_FIELD_NUMBER; + hash = (53 * hash) + getActivityReward().hashCode(); + } + if (hasNobleInfo()) { + hash = (37 * hash) + NOBLEINFO_FIELD_NUMBER; + hash = (53 * hash) + getNobleInfo().hashCode(); + } + if (hasBrotherhoodInfo()) { + hash = (37 * hash) + BROTHERHOODINFO_FIELD_NUMBER; + hash = (53 * hash) + getBrotherhoodInfo().hashCode(); + } + if (hasPersonalCard()) { + hash = (37 * hash) + PERSONALCARD_FIELD_NUMBER; + hash = (53 * hash) + getPersonalCard().hashCode(); + } + if (hasAuthenticationInfo()) { + hash = (37 * hash) + AUTHENTICATIONINFO_FIELD_NUMBER; + hash = (53 * hash) + getAuthenticationInfo().hashCode(); + } + hash = (37 * hash) + AUTHORIZATIONINFO_FIELD_NUMBER; + hash = (53 * hash) + getAuthorizationInfo(); + hash = (37 * hash) + ADVERSARYAUTHORIZATIONINFO_FIELD_NUMBER; + hash = (53 * hash) + getAdversaryAuthorizationInfo(); + if (hasPoiInfo()) { + hash = (37 * hash) + POIINFO_FIELD_NUMBER; + hash = (53 * hash) + getPoiInfo().hashCode(); + } + if (hasMediaBadgeImageListList()) { + hash = (37 * hash) + MEDIABADGEIMAGELISTLIST_FIELD_NUMBER; + hash = (53 * hash) + getMediaBadgeImageListList().hashCode(); + } + hash = (37 * hash) + ADVERSARYUSERSTATUS_FIELD_NUMBER; + hash = (53 * hash) + getAdversaryUserStatus(); + if (hasUserVipInfo()) { + hash = (37 * hash) + USERVIPINFO_FIELD_NUMBER; + hash = (53 * hash) + getUserVipInfo().hashCode(); + } + if (getCommerceWebcastConfigIdsListCount() > 0) { + hash = (37 * hash) + COMMERCEWEBCASTCONFIGIDSLIST_FIELD_NUMBER; + hash = (53 * hash) + getCommerceWebcastConfigIdsListList().hashCode(); + } + if (hasBadgeImageListV2List()) { + hash = (37 * hash) + BADGEIMAGELISTV2LIST_FIELD_NUMBER; + hash = (53 * hash) + getBadgeImageListV2List().hashCode(); + } + hash = (37 * hash) + LOCATIONCITY_FIELD_NUMBER; + hash = (53 * hash) + getLocationCity().hashCode(); + if (hasFansGroupInfo()) { + hash = (37 * hash) + FANSGROUPINFO_FIELD_NUMBER; + hash = (53 * hash) + getFansGroupInfo().hashCode(); + } + hash = (37 * hash) + REMARKNAME_FIELD_NUMBER; + hash = (53 * hash) + getRemarkName().hashCode(); + hash = (37 * hash) + MYSTERYMAN_FIELD_NUMBER; + hash = (53 * hash) + getMysteryMan(); + hash = (37 * hash) + WEBRID_FIELD_NUMBER; + hash = (53 * hash) + getWebRid().hashCode(); + hash = (37 * hash) + DESENSITIZEDNICKNAME_FIELD_NUMBER; + hash = (53 * hash) + getDesensitizedNickname().hashCode(); + if (hasJAccreditInfo()) { + hash = (37 * hash) + JACCREDITINFO_FIELD_NUMBER; + hash = (53 * hash) + getJAccreditInfo().hashCode(); + } + if (hasSubscribe()) { + hash = (37 * hash) + SUBSCRIBE_FIELD_NUMBER; + hash = (53 * hash) + getSubscribe().hashCode(); + } + hash = (37 * hash) + ISANONYMOUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsAnonymous()); + hash = (37 * hash) + CONSUMEDIAMONDLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getConsumeDiamondLevel(); + hash = (37 * hash) + WEBCASTUID_FIELD_NUMBER; + hash = (53 * hash) + getWebcastUid().hashCode(); + if (hasProfileStyleParams()) { + hash = (37 * hash) + PROFILESTYLEPARAMS_FIELD_NUMBER; + hash = (53 * hash) + getProfileStyleParams().hashCode(); + } + if (hasUserDressInfo()) { + hash = (37 * hash) + USERDRESSINFO_FIELD_NUMBER; + hash = (53 * hash) + getUserDressInfo().hashCode(); + } + hash = (37 * hash) + ALLOWBELOCATED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowBeLocated()); + hash = (37 * hash) + ALLOWFINDBYCONTACTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowFindByContacts()); + hash = (37 * hash) + ALLOWOTHERSDOWNLOADVIDEO_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowOthersDownloadVideo()); + hash = (37 * hash) + ALLOWOTHERSDOWNLOADWHENSHARINGVIDEO_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowOthersDownloadWhenSharingVideo()); + hash = (37 * hash) + ALLOWSHARESHOWPROFILE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowShareShowProfile()); + hash = (37 * hash) + ALLOWSHOWINGOSSIP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowShowInGossip()); + hash = (37 * hash) + ALLOWSHOWMYACTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowShowMyAction()); + hash = (37 * hash) + ALLOWSTRANGECOMMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowStrangeComment()); + hash = (37 * hash) + ALLOWUNFOLLOWERCOMMENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowUnfollowerComment()); + hash = (37 * hash) + ALLOWUSELINKMIC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllowUseLinkmic()); + if (hasAnchorLevel()) { + hash = (37 * hash) + ANCHORLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getAnchorLevel().hashCode(); + } + if (hasAvatarJpg()) { + hash = (37 * hash) + AVATARJPG_FIELD_NUMBER; + hash = (53 * hash) + getAvatarJpg().hashCode(); + } + hash = (37 * hash) + BGIMGURL_FIELD_NUMBER; + hash = (53 * hash) + getBgImgUrl().hashCode(); + hash = (37 * hash) + BIRTHDAYDESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getBirthdayDescription().hashCode(); + hash = (37 * hash) + BIRTHDAYVALID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getBirthdayValid()); + hash = (37 * hash) + BLOCKSTATUS_FIELD_NUMBER; + hash = (53 * hash) + getBlockStatus(); + hash = (37 * hash) + COMMENTRESTRICT_FIELD_NUMBER; + hash = (53 * hash) + getCommentRestrict(); + hash = (37 * hash) + CONSTELLATION_FIELD_NUMBER; + hash = (53 * hash) + getConstellation().hashCode(); + hash = (37 * hash) + DISABLEICHAT_FIELD_NUMBER; + hash = (53 * hash) + getDisableIchat(); + hash = (37 * hash) + ENABLEICHATIMG_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getEnableIchatImg()); + hash = (37 * hash) + EXP_FIELD_NUMBER; + hash = (53 * hash) + getExp(); + hash = (37 * hash) + FANTICKETCOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFanTicketCount()); + hash = (37 * hash) + FOLDSTRANGERCHAT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFoldStrangerChat()); + hash = (37 * hash) + FOLLOWSTATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFollowStatus()); + hash = (37 * hash) + HOTSOONVERIFIED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getHotsoonVerified()); + hash = (37 * hash) + HOTSOONVERIFIEDREASON_FIELD_NUMBER; + hash = (53 * hash) + getHotsoonVerifiedReason().hashCode(); + hash = (37 * hash) + ICHATRESTRICTTYPE_FIELD_NUMBER; + hash = (53 * hash) + getIchatRestrictType(); + hash = (37 * hash) + IDSTR_FIELD_NUMBER; + hash = (53 * hash) + getIdStr().hashCode(); + hash = (37 * hash) + ISFOLLOWER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsFollower()); + hash = (37 * hash) + ISFOLLOWING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsFollowing()); + hash = (37 * hash) + NEEDPROFILEGUIDE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getNeedProfileGuide()); + hash = (37 * hash) + PAYSCORES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPayScores()); + hash = (37 * hash) + PUSHCOMMENTSTATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushCommentStatus()); + hash = (37 * hash) + PUSHDIGG_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushDigg()); + hash = (37 * hash) + PUSHFOLLOW_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushFollow()); + hash = (37 * hash) + PUSHFRIENDACTION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushFriendAction()); + hash = (37 * hash) + PUSHICHAT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushIchat()); + hash = (37 * hash) + PUSHSTATUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushStatus()); + hash = (37 * hash) + PUSHVIDEOPOST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushVideoPost()); + hash = (37 * hash) + PUSHVIDEORECOMMEND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPushVideoRecommend()); + if (hasStats()) { + hash = (37 * hash) + STATS_FIELD_NUMBER; + hash = (53 * hash) + getStats().hashCode(); + } + hash = (37 * hash) + VERIFIEDMOBILE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getVerifiedMobile()); + hash = (37 * hash) + VERIFIEDREASON_FIELD_NUMBER; + hash = (53 * hash) + getVerifiedReason().hashCode(); + hash = (37 * hash) + WITHCARMANAGEMENTPERMISSION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getWithCarManagementPermission()); + hash = (37 * hash) + AGERANGE_FIELD_NUMBER; + hash = (53 * hash) + getAgeRange(); + hash = (37 * hash) + WATCHDURATIONMONTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getWatchDurationMonth()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code User} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:User) + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.class, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bitField1_ = 0; + bitField2_ = 0; + bitField3_ = 0; + id_ = 0L; + shortId_ = 0L; + nickname_ = ""; + gender_ = 0; + signature_ = ""; + level_ = 0; + birthday_ = 0L; + telephone_ = ""; + avatarThumb_ = null; + if (avatarThumbBuilder_ != null) { + avatarThumbBuilder_.dispose(); + avatarThumbBuilder_ = null; + } + avatarMedium_ = null; + if (avatarMediumBuilder_ != null) { + avatarMediumBuilder_.dispose(); + avatarMediumBuilder_ = null; + } + avatarLarge_ = null; + if (avatarLargeBuilder_ != null) { + avatarLargeBuilder_.dispose(); + avatarLargeBuilder_ = null; + } + verified_ = false; + experience_ = 0; + city_ = ""; + status_ = 0; + createTime_ = 0L; + modifyTime_ = 0L; + secret_ = 0; + shareQrcodeUri_ = ""; + incomeSharePercent_ = 0; + badgeImageListList_ = null; + if (badgeImageListListBuilder_ != null) { + badgeImageListListBuilder_.dispose(); + badgeImageListListBuilder_ = null; + } + followInfo_ = null; + if (followInfoBuilder_ != null) { + followInfoBuilder_.dispose(); + followInfoBuilder_ = null; + } + payGrade_ = null; + if (payGradeBuilder_ != null) { + payGradeBuilder_.dispose(); + payGradeBuilder_ = null; + } + fansClub_ = null; + if (fansClubBuilder_ != null) { + fansClubBuilder_.dispose(); + fansClubBuilder_ = null; + } + border_ = null; + if (borderBuilder_ != null) { + borderBuilder_.dispose(); + borderBuilder_ = null; + } + specialId_ = ""; + avatarBorder_ = null; + if (avatarBorderBuilder_ != null) { + avatarBorderBuilder_.dispose(); + avatarBorderBuilder_ = null; + } + medal_ = null; + if (medalBuilder_ != null) { + medalBuilder_.dispose(); + medalBuilder_ = null; + } + if (realTimeIconsListBuilder_ == null) { + realTimeIconsList_ = java.util.Collections.emptyList(); + } else { + realTimeIconsList_ = null; + realTimeIconsListBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x10000000); + if (newRealTimeIconsListBuilder_ == null) { + newRealTimeIconsList_ = java.util.Collections.emptyList(); + } else { + newRealTimeIconsList_ = null; + newRealTimeIconsListBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x20000000); + topVipNo_ = 0L; + userAttr_ = null; + if (userAttrBuilder_ != null) { + userAttrBuilder_.dispose(); + userAttrBuilder_ = null; + } + ownRoom_ = null; + if (ownRoomBuilder_ != null) { + ownRoomBuilder_.dispose(); + ownRoomBuilder_ = null; + } + payScore_ = 0L; + ticketCount_ = 0L; + anchorInfo_ = null; + if (anchorInfoBuilder_ != null) { + anchorInfoBuilder_.dispose(); + anchorInfoBuilder_ = null; + } + linkMicStats_ = 0; + displayId_ = ""; + withCommercePermission_ = false; + withFusionShopEntry_ = false; + totalRechargeDiamondCount_ = 0L; + webcastAnchorLevel_ = null; + if (webcastAnchorLevelBuilder_ != null) { + webcastAnchorLevelBuilder_.dispose(); + webcastAnchorLevelBuilder_ = null; + } + verifiedContent_ = ""; + authorStats_ = null; + if (authorStatsBuilder_ != null) { + authorStatsBuilder_.dispose(); + authorStatsBuilder_ = null; + } + if (topFansListBuilder_ == null) { + topFansList_ = java.util.Collections.emptyList(); + } else { + topFansList_ = null; + topFansListBuilder_.clear(); + } + bitField1_ = (bitField1_ & ~0x00001000); + secUid_ = ""; + userRole_ = 0; + xiguaInfo_ = null; + if (xiguaInfoBuilder_ != null) { + xiguaInfoBuilder_.dispose(); + xiguaInfoBuilder_ = null; + } + activityReward_ = null; + if (activityRewardBuilder_ != null) { + activityRewardBuilder_.dispose(); + activityRewardBuilder_ = null; + } + nobleInfo_ = null; + if (nobleInfoBuilder_ != null) { + nobleInfoBuilder_.dispose(); + nobleInfoBuilder_ = null; + } + brotherhoodInfo_ = null; + if (brotherhoodInfoBuilder_ != null) { + brotherhoodInfoBuilder_.dispose(); + brotherhoodInfoBuilder_ = null; + } + personalCard_ = null; + if (personalCardBuilder_ != null) { + personalCardBuilder_.dispose(); + personalCardBuilder_ = null; + } + authenticationInfo_ = null; + if (authenticationInfoBuilder_ != null) { + authenticationInfoBuilder_.dispose(); + authenticationInfoBuilder_ = null; + } + authorizationInfo_ = 0; + adversaryAuthorizationInfo_ = 0; + poiInfo_ = null; + if (poiInfoBuilder_ != null) { + poiInfoBuilder_.dispose(); + poiInfoBuilder_ = null; + } + mediaBadgeImageListList_ = null; + if (mediaBadgeImageListListBuilder_ != null) { + mediaBadgeImageListListBuilder_.dispose(); + mediaBadgeImageListListBuilder_ = null; + } + adversaryUserStatus_ = 0; + userVipInfo_ = null; + if (userVipInfoBuilder_ != null) { + userVipInfoBuilder_.dispose(); + userVipInfoBuilder_ = null; + } + commerceWebcastConfigIdsList_ = emptyLongList(); + badgeImageListV2List_ = null; + if (badgeImageListV2ListBuilder_ != null) { + badgeImageListV2ListBuilder_.dispose(); + badgeImageListV2ListBuilder_ = null; + } + locationCity_ = ""; + fansGroupInfo_ = null; + if (fansGroupInfoBuilder_ != null) { + fansGroupInfoBuilder_.dispose(); + fansGroupInfoBuilder_ = null; + } + remarkName_ = ""; + mysteryMan_ = 0; + webRid_ = ""; + desensitizedNickname_ = ""; + jAccreditInfo_ = null; + if (jAccreditInfoBuilder_ != null) { + jAccreditInfoBuilder_.dispose(); + jAccreditInfoBuilder_ = null; + } + subscribe_ = null; + if (subscribeBuilder_ != null) { + subscribeBuilder_.dispose(); + subscribeBuilder_ = null; + } + isAnonymous_ = false; + consumeDiamondLevel_ = 0; + webcastUid_ = ""; + profileStyleParams_ = null; + if (profileStyleParamsBuilder_ != null) { + profileStyleParamsBuilder_.dispose(); + profileStyleParamsBuilder_ = null; + } + userDressInfo_ = null; + if (userDressInfoBuilder_ != null) { + userDressInfoBuilder_.dispose(); + userDressInfoBuilder_ = null; + } + allowBeLocated_ = false; + allowFindByContacts_ = false; + allowOthersDownloadVideo_ = false; + allowOthersDownloadWhenSharingVideo_ = false; + allowShareShowProfile_ = false; + allowShowInGossip_ = false; + allowShowMyAction_ = false; + allowStrangeComment_ = false; + allowUnfollowerComment_ = false; + allowUseLinkmic_ = false; + anchorLevel_ = null; + if (anchorLevelBuilder_ != null) { + anchorLevelBuilder_.dispose(); + anchorLevelBuilder_ = null; + } + avatarJpg_ = null; + if (avatarJpgBuilder_ != null) { + avatarJpgBuilder_.dispose(); + avatarJpgBuilder_ = null; + } + bgImgUrl_ = ""; + birthdayDescription_ = ""; + birthdayValid_ = false; + blockStatus_ = 0; + commentRestrict_ = 0; + constellation_ = ""; + disableIchat_ = 0; + enableIchatImg_ = 0L; + exp_ = 0; + fanTicketCount_ = 0L; + foldStrangerChat_ = false; + followStatus_ = 0L; + hotsoonVerified_ = false; + hotsoonVerifiedReason_ = ""; + ichatRestrictType_ = 0; + idStr_ = ""; + isFollower_ = false; + isFollowing_ = false; + needProfileGuide_ = false; + payScores_ = 0L; + pushCommentStatus_ = false; + pushDigg_ = false; + pushFollow_ = false; + pushFriendAction_ = false; + pushIchat_ = false; + pushStatus_ = false; + pushVideoPost_ = false; + pushVideoRecommend_ = false; + stats_ = null; + if (statsBuilder_ != null) { + statsBuilder_.dispose(); + statsBuilder_ = null; + } + verifiedMobile_ = false; + verifiedReason_ = ""; + withCarManagementPermission_ = false; + ageRange_ = 0; + watchDurationMonth_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.internal_static_User_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User build() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User buildPartial() { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User result = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + if (bitField1_ != 0) { buildPartial1(result); } + if (bitField2_ != 0) { buildPartial2(result); } + if (bitField3_ != 0) { buildPartial3(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User result) { + if (realTimeIconsListBuilder_ == null) { + if (((bitField0_ & 0x10000000) != 0)) { + realTimeIconsList_ = java.util.Collections.unmodifiableList(realTimeIconsList_); + bitField0_ = (bitField0_ & ~0x10000000); + } + result.realTimeIconsList_ = realTimeIconsList_; + } else { + result.realTimeIconsList_ = realTimeIconsListBuilder_.build(); + } + if (newRealTimeIconsListBuilder_ == null) { + if (((bitField0_ & 0x20000000) != 0)) { + newRealTimeIconsList_ = java.util.Collections.unmodifiableList(newRealTimeIconsList_); + bitField0_ = (bitField0_ & ~0x20000000); + } + result.newRealTimeIconsList_ = newRealTimeIconsList_; + } else { + result.newRealTimeIconsList_ = newRealTimeIconsListBuilder_.build(); + } + if (topFansListBuilder_ == null) { + if (((bitField1_ & 0x00001000) != 0)) { + topFansList_ = java.util.Collections.unmodifiableList(topFansList_); + bitField1_ = (bitField1_ & ~0x00001000); + } + result.topFansList_ = topFansList_; + } else { + result.topFansList_ = topFansListBuilder_.build(); + } + if (((bitField1_ & 0x08000000) != 0)) { + commerceWebcastConfigIdsList_.makeImmutable(); + bitField1_ = (bitField1_ & ~0x08000000); + } + result.commerceWebcastConfigIdsList_ = commerceWebcastConfigIdsList_; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.shortId_ = shortId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.nickname_ = nickname_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.gender_ = gender_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.signature_ = signature_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.level_ = level_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.birthday_ = birthday_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.telephone_ = telephone_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.avatarThumb_ = avatarThumbBuilder_ == null + ? avatarThumb_ + : avatarThumbBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.avatarMedium_ = avatarMediumBuilder_ == null + ? avatarMedium_ + : avatarMediumBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.avatarLarge_ = avatarLargeBuilder_ == null + ? avatarLarge_ + : avatarLargeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.verified_ = verified_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.experience_ = experience_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.city_ = city_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.status_ = status_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.createTime_ = createTime_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.modifyTime_ = modifyTime_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.secret_ = secret_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.shareQrcodeUri_ = shareQrcodeUri_; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.incomeSharePercent_ = incomeSharePercent_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.badgeImageListList_ = badgeImageListListBuilder_ == null + ? badgeImageListList_ + : badgeImageListListBuilder_.build(); + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.followInfo_ = followInfoBuilder_ == null + ? followInfo_ + : followInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.payGrade_ = payGradeBuilder_ == null + ? payGrade_ + : payGradeBuilder_.build(); + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.fansClub_ = fansClubBuilder_ == null + ? fansClub_ + : fansClubBuilder_.build(); + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.border_ = borderBuilder_ == null + ? border_ + : borderBuilder_.build(); + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.specialId_ = specialId_; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.avatarBorder_ = avatarBorderBuilder_ == null + ? avatarBorder_ + : avatarBorderBuilder_.build(); + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.medal_ = medalBuilder_ == null + ? medal_ + : medalBuilder_.build(); + } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.topVipNo_ = topVipNo_; + } + if (((from_bitField0_ & 0x80000000) != 0)) { + result.userAttr_ = userAttrBuilder_ == null + ? userAttr_ + : userAttrBuilder_.build(); + } + } + + private void buildPartial1(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User result) { + int from_bitField1_ = bitField1_; + if (((from_bitField1_ & 0x00000001) != 0)) { + result.ownRoom_ = ownRoomBuilder_ == null + ? ownRoom_ + : ownRoomBuilder_.build(); + } + if (((from_bitField1_ & 0x00000002) != 0)) { + result.payScore_ = payScore_; + } + if (((from_bitField1_ & 0x00000004) != 0)) { + result.ticketCount_ = ticketCount_; + } + if (((from_bitField1_ & 0x00000008) != 0)) { + result.anchorInfo_ = anchorInfoBuilder_ == null + ? anchorInfo_ + : anchorInfoBuilder_.build(); + } + if (((from_bitField1_ & 0x00000010) != 0)) { + result.linkMicStats_ = linkMicStats_; + } + if (((from_bitField1_ & 0x00000020) != 0)) { + result.displayId_ = displayId_; + } + if (((from_bitField1_ & 0x00000040) != 0)) { + result.withCommercePermission_ = withCommercePermission_; + } + if (((from_bitField1_ & 0x00000080) != 0)) { + result.withFusionShopEntry_ = withFusionShopEntry_; + } + if (((from_bitField1_ & 0x00000100) != 0)) { + result.totalRechargeDiamondCount_ = totalRechargeDiamondCount_; + } + if (((from_bitField1_ & 0x00000200) != 0)) { + result.webcastAnchorLevel_ = webcastAnchorLevelBuilder_ == null + ? webcastAnchorLevel_ + : webcastAnchorLevelBuilder_.build(); + } + if (((from_bitField1_ & 0x00000400) != 0)) { + result.verifiedContent_ = verifiedContent_; + } + if (((from_bitField1_ & 0x00000800) != 0)) { + result.authorStats_ = authorStatsBuilder_ == null + ? authorStats_ + : authorStatsBuilder_.build(); + } + if (((from_bitField1_ & 0x00002000) != 0)) { + result.secUid_ = secUid_; + } + if (((from_bitField1_ & 0x00004000) != 0)) { + result.userRole_ = userRole_; + } + if (((from_bitField1_ & 0x00008000) != 0)) { + result.xiguaInfo_ = xiguaInfoBuilder_ == null + ? xiguaInfo_ + : xiguaInfoBuilder_.build(); + } + if (((from_bitField1_ & 0x00010000) != 0)) { + result.activityReward_ = activityRewardBuilder_ == null + ? activityReward_ + : activityRewardBuilder_.build(); + } + if (((from_bitField1_ & 0x00020000) != 0)) { + result.nobleInfo_ = nobleInfoBuilder_ == null + ? nobleInfo_ + : nobleInfoBuilder_.build(); + } + if (((from_bitField1_ & 0x00040000) != 0)) { + result.brotherhoodInfo_ = brotherhoodInfoBuilder_ == null + ? brotherhoodInfo_ + : brotherhoodInfoBuilder_.build(); + } + if (((from_bitField1_ & 0x00080000) != 0)) { + result.personalCard_ = personalCardBuilder_ == null + ? personalCard_ + : personalCardBuilder_.build(); + } + if (((from_bitField1_ & 0x00100000) != 0)) { + result.authenticationInfo_ = authenticationInfoBuilder_ == null + ? authenticationInfo_ + : authenticationInfoBuilder_.build(); + } + if (((from_bitField1_ & 0x00200000) != 0)) { + result.authorizationInfo_ = authorizationInfo_; + } + if (((from_bitField1_ & 0x00400000) != 0)) { + result.adversaryAuthorizationInfo_ = adversaryAuthorizationInfo_; + } + if (((from_bitField1_ & 0x00800000) != 0)) { + result.poiInfo_ = poiInfoBuilder_ == null + ? poiInfo_ + : poiInfoBuilder_.build(); + } + if (((from_bitField1_ & 0x01000000) != 0)) { + result.mediaBadgeImageListList_ = mediaBadgeImageListListBuilder_ == null + ? mediaBadgeImageListList_ + : mediaBadgeImageListListBuilder_.build(); + } + if (((from_bitField1_ & 0x02000000) != 0)) { + result.adversaryUserStatus_ = adversaryUserStatus_; + } + if (((from_bitField1_ & 0x04000000) != 0)) { + result.userVipInfo_ = userVipInfoBuilder_ == null + ? userVipInfo_ + : userVipInfoBuilder_.build(); + } + if (((from_bitField1_ & 0x10000000) != 0)) { + result.badgeImageListV2List_ = badgeImageListV2ListBuilder_ == null + ? badgeImageListV2List_ + : badgeImageListV2ListBuilder_.build(); + } + if (((from_bitField1_ & 0x20000000) != 0)) { + result.locationCity_ = locationCity_; + } + if (((from_bitField1_ & 0x40000000) != 0)) { + result.fansGroupInfo_ = fansGroupInfoBuilder_ == null + ? fansGroupInfo_ + : fansGroupInfoBuilder_.build(); + } + if (((from_bitField1_ & 0x80000000) != 0)) { + result.remarkName_ = remarkName_; + } + } + + private void buildPartial2(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User result) { + int from_bitField2_ = bitField2_; + if (((from_bitField2_ & 0x00000001) != 0)) { + result.mysteryMan_ = mysteryMan_; + } + if (((from_bitField2_ & 0x00000002) != 0)) { + result.webRid_ = webRid_; + } + if (((from_bitField2_ & 0x00000004) != 0)) { + result.desensitizedNickname_ = desensitizedNickname_; + } + if (((from_bitField2_ & 0x00000008) != 0)) { + result.jAccreditInfo_ = jAccreditInfoBuilder_ == null + ? jAccreditInfo_ + : jAccreditInfoBuilder_.build(); + } + if (((from_bitField2_ & 0x00000010) != 0)) { + result.subscribe_ = subscribeBuilder_ == null + ? subscribe_ + : subscribeBuilder_.build(); + } + if (((from_bitField2_ & 0x00000020) != 0)) { + result.isAnonymous_ = isAnonymous_; + } + if (((from_bitField2_ & 0x00000040) != 0)) { + result.consumeDiamondLevel_ = consumeDiamondLevel_; + } + if (((from_bitField2_ & 0x00000080) != 0)) { + result.webcastUid_ = webcastUid_; + } + if (((from_bitField2_ & 0x00000100) != 0)) { + result.profileStyleParams_ = profileStyleParamsBuilder_ == null + ? profileStyleParams_ + : profileStyleParamsBuilder_.build(); + } + if (((from_bitField2_ & 0x00000200) != 0)) { + result.userDressInfo_ = userDressInfoBuilder_ == null + ? userDressInfo_ + : userDressInfoBuilder_.build(); + } + if (((from_bitField2_ & 0x00000400) != 0)) { + result.allowBeLocated_ = allowBeLocated_; + } + if (((from_bitField2_ & 0x00000800) != 0)) { + result.allowFindByContacts_ = allowFindByContacts_; + } + if (((from_bitField2_ & 0x00001000) != 0)) { + result.allowOthersDownloadVideo_ = allowOthersDownloadVideo_; + } + if (((from_bitField2_ & 0x00002000) != 0)) { + result.allowOthersDownloadWhenSharingVideo_ = allowOthersDownloadWhenSharingVideo_; + } + if (((from_bitField2_ & 0x00004000) != 0)) { + result.allowShareShowProfile_ = allowShareShowProfile_; + } + if (((from_bitField2_ & 0x00008000) != 0)) { + result.allowShowInGossip_ = allowShowInGossip_; + } + if (((from_bitField2_ & 0x00010000) != 0)) { + result.allowShowMyAction_ = allowShowMyAction_; + } + if (((from_bitField2_ & 0x00020000) != 0)) { + result.allowStrangeComment_ = allowStrangeComment_; + } + if (((from_bitField2_ & 0x00040000) != 0)) { + result.allowUnfollowerComment_ = allowUnfollowerComment_; + } + if (((from_bitField2_ & 0x00080000) != 0)) { + result.allowUseLinkmic_ = allowUseLinkmic_; + } + if (((from_bitField2_ & 0x00100000) != 0)) { + result.anchorLevel_ = anchorLevelBuilder_ == null + ? anchorLevel_ + : anchorLevelBuilder_.build(); + } + if (((from_bitField2_ & 0x00200000) != 0)) { + result.avatarJpg_ = avatarJpgBuilder_ == null + ? avatarJpg_ + : avatarJpgBuilder_.build(); + } + if (((from_bitField2_ & 0x00400000) != 0)) { + result.bgImgUrl_ = bgImgUrl_; + } + if (((from_bitField2_ & 0x00800000) != 0)) { + result.birthdayDescription_ = birthdayDescription_; + } + if (((from_bitField2_ & 0x01000000) != 0)) { + result.birthdayValid_ = birthdayValid_; + } + if (((from_bitField2_ & 0x02000000) != 0)) { + result.blockStatus_ = blockStatus_; + } + if (((from_bitField2_ & 0x04000000) != 0)) { + result.commentRestrict_ = commentRestrict_; + } + if (((from_bitField2_ & 0x08000000) != 0)) { + result.constellation_ = constellation_; + } + if (((from_bitField2_ & 0x10000000) != 0)) { + result.disableIchat_ = disableIchat_; + } + if (((from_bitField2_ & 0x20000000) != 0)) { + result.enableIchatImg_ = enableIchatImg_; + } + if (((from_bitField2_ & 0x40000000) != 0)) { + result.exp_ = exp_; + } + if (((from_bitField2_ & 0x80000000) != 0)) { + result.fanTicketCount_ = fanTicketCount_; + } + } + + private void buildPartial3(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User result) { + int from_bitField3_ = bitField3_; + if (((from_bitField3_ & 0x00000001) != 0)) { + result.foldStrangerChat_ = foldStrangerChat_; + } + if (((from_bitField3_ & 0x00000002) != 0)) { + result.followStatus_ = followStatus_; + } + if (((from_bitField3_ & 0x00000004) != 0)) { + result.hotsoonVerified_ = hotsoonVerified_; + } + if (((from_bitField3_ & 0x00000008) != 0)) { + result.hotsoonVerifiedReason_ = hotsoonVerifiedReason_; + } + if (((from_bitField3_ & 0x00000010) != 0)) { + result.ichatRestrictType_ = ichatRestrictType_; + } + if (((from_bitField3_ & 0x00000020) != 0)) { + result.idStr_ = idStr_; + } + if (((from_bitField3_ & 0x00000040) != 0)) { + result.isFollower_ = isFollower_; + } + if (((from_bitField3_ & 0x00000080) != 0)) { + result.isFollowing_ = isFollowing_; + } + if (((from_bitField3_ & 0x00000100) != 0)) { + result.needProfileGuide_ = needProfileGuide_; + } + if (((from_bitField3_ & 0x00000200) != 0)) { + result.payScores_ = payScores_; + } + if (((from_bitField3_ & 0x00000400) != 0)) { + result.pushCommentStatus_ = pushCommentStatus_; + } + if (((from_bitField3_ & 0x00000800) != 0)) { + result.pushDigg_ = pushDigg_; + } + if (((from_bitField3_ & 0x00001000) != 0)) { + result.pushFollow_ = pushFollow_; + } + if (((from_bitField3_ & 0x00002000) != 0)) { + result.pushFriendAction_ = pushFriendAction_; + } + if (((from_bitField3_ & 0x00004000) != 0)) { + result.pushIchat_ = pushIchat_; + } + if (((from_bitField3_ & 0x00008000) != 0)) { + result.pushStatus_ = pushStatus_; + } + if (((from_bitField3_ & 0x00010000) != 0)) { + result.pushVideoPost_ = pushVideoPost_; + } + if (((from_bitField3_ & 0x00020000) != 0)) { + result.pushVideoRecommend_ = pushVideoRecommend_; + } + if (((from_bitField3_ & 0x00040000) != 0)) { + result.stats_ = statsBuilder_ == null + ? stats_ + : statsBuilder_.build(); + } + if (((from_bitField3_ & 0x00080000) != 0)) { + result.verifiedMobile_ = verifiedMobile_; + } + if (((from_bitField3_ & 0x00100000) != 0)) { + result.verifiedReason_ = verifiedReason_; + } + if (((from_bitField3_ & 0x00200000) != 0)) { + result.withCarManagementPermission_ = withCarManagementPermission_; + } + if (((from_bitField3_ & 0x00400000) != 0)) { + result.ageRange_ = ageRange_; + } + if (((from_bitField3_ & 0x00800000) != 0)) { + result.watchDurationMonth_ = watchDurationMonth_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User) { + return mergeFrom((tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User other) { + if (other == tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()) return this; + if (other.getId() != 0L) { + setId(other.getId()); + } + if (other.getShortId() != 0L) { + setShortId(other.getShortId()); + } + if (!other.getNickname().isEmpty()) { + nickname_ = other.nickname_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getGender() != 0) { + setGender(other.getGender()); + } + if (!other.getSignature().isEmpty()) { + signature_ = other.signature_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.getLevel() != 0) { + setLevel(other.getLevel()); + } + if (other.getBirthday() != 0L) { + setBirthday(other.getBirthday()); + } + if (!other.getTelephone().isEmpty()) { + telephone_ = other.telephone_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.hasAvatarThumb()) { + mergeAvatarThumb(other.getAvatarThumb()); + } + if (other.hasAvatarMedium()) { + mergeAvatarMedium(other.getAvatarMedium()); + } + if (other.hasAvatarLarge()) { + mergeAvatarLarge(other.getAvatarLarge()); + } + if (other.getVerified() != false) { + setVerified(other.getVerified()); + } + if (other.getExperience() != 0) { + setExperience(other.getExperience()); + } + if (!other.getCity().isEmpty()) { + city_ = other.city_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (other.getStatus() != 0) { + setStatus(other.getStatus()); + } + if (other.getCreateTime() != 0L) { + setCreateTime(other.getCreateTime()); + } + if (other.getModifyTime() != 0L) { + setModifyTime(other.getModifyTime()); + } + if (other.getSecret() != 0) { + setSecret(other.getSecret()); + } + if (!other.getShareQrcodeUri().isEmpty()) { + shareQrcodeUri_ = other.shareQrcodeUri_; + bitField0_ |= 0x00040000; + onChanged(); + } + if (other.getIncomeSharePercent() != 0) { + setIncomeSharePercent(other.getIncomeSharePercent()); + } + if (other.hasBadgeImageListList()) { + mergeBadgeImageListList(other.getBadgeImageListList()); + } + if (other.hasFollowInfo()) { + mergeFollowInfo(other.getFollowInfo()); + } + if (other.hasPayGrade()) { + mergePayGrade(other.getPayGrade()); + } + if (other.hasFansClub()) { + mergeFansClub(other.getFansClub()); + } + if (other.hasBorder()) { + mergeBorder(other.getBorder()); + } + if (!other.getSpecialId().isEmpty()) { + specialId_ = other.specialId_; + bitField0_ |= 0x02000000; + onChanged(); + } + if (other.hasAvatarBorder()) { + mergeAvatarBorder(other.getAvatarBorder()); + } + if (other.hasMedal()) { + mergeMedal(other.getMedal()); + } + if (realTimeIconsListBuilder_ == null) { + if (!other.realTimeIconsList_.isEmpty()) { + if (realTimeIconsList_.isEmpty()) { + realTimeIconsList_ = other.realTimeIconsList_; + bitField0_ = (bitField0_ & ~0x10000000); + } else { + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.addAll(other.realTimeIconsList_); + } + onChanged(); + } + } else { + if (!other.realTimeIconsList_.isEmpty()) { + if (realTimeIconsListBuilder_.isEmpty()) { + realTimeIconsListBuilder_.dispose(); + realTimeIconsListBuilder_ = null; + realTimeIconsList_ = other.realTimeIconsList_; + bitField0_ = (bitField0_ & ~0x10000000); + realTimeIconsListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRealTimeIconsListFieldBuilder() : null; + } else { + realTimeIconsListBuilder_.addAllMessages(other.realTimeIconsList_); + } + } + } + if (newRealTimeIconsListBuilder_ == null) { + if (!other.newRealTimeIconsList_.isEmpty()) { + if (newRealTimeIconsList_.isEmpty()) { + newRealTimeIconsList_ = other.newRealTimeIconsList_; + bitField0_ = (bitField0_ & ~0x20000000); + } else { + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.addAll(other.newRealTimeIconsList_); + } + onChanged(); + } + } else { + if (!other.newRealTimeIconsList_.isEmpty()) { + if (newRealTimeIconsListBuilder_.isEmpty()) { + newRealTimeIconsListBuilder_.dispose(); + newRealTimeIconsListBuilder_ = null; + newRealTimeIconsList_ = other.newRealTimeIconsList_; + bitField0_ = (bitField0_ & ~0x20000000); + newRealTimeIconsListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNewRealTimeIconsListFieldBuilder() : null; + } else { + newRealTimeIconsListBuilder_.addAllMessages(other.newRealTimeIconsList_); + } + } + } + if (other.getTopVipNo() != 0L) { + setTopVipNo(other.getTopVipNo()); + } + if (other.hasUserAttr()) { + mergeUserAttr(other.getUserAttr()); + } + if (other.hasOwnRoom()) { + mergeOwnRoom(other.getOwnRoom()); + } + if (other.getPayScore() != 0L) { + setPayScore(other.getPayScore()); + } + if (other.getTicketCount() != 0L) { + setTicketCount(other.getTicketCount()); + } + if (other.hasAnchorInfo()) { + mergeAnchorInfo(other.getAnchorInfo()); + } + if (other.getLinkMicStats() != 0) { + setLinkMicStats(other.getLinkMicStats()); + } + if (!other.getDisplayId().isEmpty()) { + displayId_ = other.displayId_; + bitField1_ |= 0x00000020; + onChanged(); + } + if (other.getWithCommercePermission() != false) { + setWithCommercePermission(other.getWithCommercePermission()); + } + if (other.getWithFusionShopEntry() != false) { + setWithFusionShopEntry(other.getWithFusionShopEntry()); + } + if (other.getTotalRechargeDiamondCount() != 0L) { + setTotalRechargeDiamondCount(other.getTotalRechargeDiamondCount()); + } + if (other.hasWebcastAnchorLevel()) { + mergeWebcastAnchorLevel(other.getWebcastAnchorLevel()); + } + if (!other.getVerifiedContent().isEmpty()) { + verifiedContent_ = other.verifiedContent_; + bitField1_ |= 0x00000400; + onChanged(); + } + if (other.hasAuthorStats()) { + mergeAuthorStats(other.getAuthorStats()); + } + if (topFansListBuilder_ == null) { + if (!other.topFansList_.isEmpty()) { + if (topFansList_.isEmpty()) { + topFansList_ = other.topFansList_; + bitField1_ = (bitField1_ & ~0x00001000); + } else { + ensureTopFansListIsMutable(); + topFansList_.addAll(other.topFansList_); + } + onChanged(); + } + } else { + if (!other.topFansList_.isEmpty()) { + if (topFansListBuilder_.isEmpty()) { + topFansListBuilder_.dispose(); + topFansListBuilder_ = null; + topFansList_ = other.topFansList_; + bitField1_ = (bitField1_ & ~0x00001000); + topFansListBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTopFansListFieldBuilder() : null; + } else { + topFansListBuilder_.addAllMessages(other.topFansList_); + } + } + } + if (!other.getSecUid().isEmpty()) { + secUid_ = other.secUid_; + bitField1_ |= 0x00002000; + onChanged(); + } + if (other.getUserRole() != 0) { + setUserRole(other.getUserRole()); + } + if (other.hasXiguaInfo()) { + mergeXiguaInfo(other.getXiguaInfo()); + } + if (other.hasActivityReward()) { + mergeActivityReward(other.getActivityReward()); + } + if (other.hasNobleInfo()) { + mergeNobleInfo(other.getNobleInfo()); + } + if (other.hasBrotherhoodInfo()) { + mergeBrotherhoodInfo(other.getBrotherhoodInfo()); + } + if (other.hasPersonalCard()) { + mergePersonalCard(other.getPersonalCard()); + } + if (other.hasAuthenticationInfo()) { + mergeAuthenticationInfo(other.getAuthenticationInfo()); + } + if (other.getAuthorizationInfo() != 0) { + setAuthorizationInfo(other.getAuthorizationInfo()); + } + if (other.getAdversaryAuthorizationInfo() != 0) { + setAdversaryAuthorizationInfo(other.getAdversaryAuthorizationInfo()); + } + if (other.hasPoiInfo()) { + mergePoiInfo(other.getPoiInfo()); + } + if (other.hasMediaBadgeImageListList()) { + mergeMediaBadgeImageListList(other.getMediaBadgeImageListList()); + } + if (other.getAdversaryUserStatus() != 0) { + setAdversaryUserStatus(other.getAdversaryUserStatus()); + } + if (other.hasUserVipInfo()) { + mergeUserVipInfo(other.getUserVipInfo()); + } + if (!other.commerceWebcastConfigIdsList_.isEmpty()) { + if (commerceWebcastConfigIdsList_.isEmpty()) { + commerceWebcastConfigIdsList_ = other.commerceWebcastConfigIdsList_; + bitField1_ = (bitField1_ & ~0x08000000); + } else { + ensureCommerceWebcastConfigIdsListIsMutable(); + commerceWebcastConfigIdsList_.addAll(other.commerceWebcastConfigIdsList_); + } + onChanged(); + } + if (other.hasBadgeImageListV2List()) { + mergeBadgeImageListV2List(other.getBadgeImageListV2List()); + } + if (!other.getLocationCity().isEmpty()) { + locationCity_ = other.locationCity_; + bitField1_ |= 0x20000000; + onChanged(); + } + if (other.hasFansGroupInfo()) { + mergeFansGroupInfo(other.getFansGroupInfo()); + } + if (!other.getRemarkName().isEmpty()) { + remarkName_ = other.remarkName_; + bitField1_ |= 0x80000000; + onChanged(); + } + if (other.getMysteryMan() != 0) { + setMysteryMan(other.getMysteryMan()); + } + if (!other.getWebRid().isEmpty()) { + webRid_ = other.webRid_; + bitField2_ |= 0x00000002; + onChanged(); + } + if (!other.getDesensitizedNickname().isEmpty()) { + desensitizedNickname_ = other.desensitizedNickname_; + bitField2_ |= 0x00000004; + onChanged(); + } + if (other.hasJAccreditInfo()) { + mergeJAccreditInfo(other.getJAccreditInfo()); + } + if (other.hasSubscribe()) { + mergeSubscribe(other.getSubscribe()); + } + if (other.getIsAnonymous() != false) { + setIsAnonymous(other.getIsAnonymous()); + } + if (other.getConsumeDiamondLevel() != 0) { + setConsumeDiamondLevel(other.getConsumeDiamondLevel()); + } + if (!other.getWebcastUid().isEmpty()) { + webcastUid_ = other.webcastUid_; + bitField2_ |= 0x00000080; + onChanged(); + } + if (other.hasProfileStyleParams()) { + mergeProfileStyleParams(other.getProfileStyleParams()); + } + if (other.hasUserDressInfo()) { + mergeUserDressInfo(other.getUserDressInfo()); + } + if (other.getAllowBeLocated() != false) { + setAllowBeLocated(other.getAllowBeLocated()); + } + if (other.getAllowFindByContacts() != false) { + setAllowFindByContacts(other.getAllowFindByContacts()); + } + if (other.getAllowOthersDownloadVideo() != false) { + setAllowOthersDownloadVideo(other.getAllowOthersDownloadVideo()); + } + if (other.getAllowOthersDownloadWhenSharingVideo() != false) { + setAllowOthersDownloadWhenSharingVideo(other.getAllowOthersDownloadWhenSharingVideo()); + } + if (other.getAllowShareShowProfile() != false) { + setAllowShareShowProfile(other.getAllowShareShowProfile()); + } + if (other.getAllowShowInGossip() != false) { + setAllowShowInGossip(other.getAllowShowInGossip()); + } + if (other.getAllowShowMyAction() != false) { + setAllowShowMyAction(other.getAllowShowMyAction()); + } + if (other.getAllowStrangeComment() != false) { + setAllowStrangeComment(other.getAllowStrangeComment()); + } + if (other.getAllowUnfollowerComment() != false) { + setAllowUnfollowerComment(other.getAllowUnfollowerComment()); + } + if (other.getAllowUseLinkmic() != false) { + setAllowUseLinkmic(other.getAllowUseLinkmic()); + } + if (other.hasAnchorLevel()) { + mergeAnchorLevel(other.getAnchorLevel()); + } + if (other.hasAvatarJpg()) { + mergeAvatarJpg(other.getAvatarJpg()); + } + if (!other.getBgImgUrl().isEmpty()) { + bgImgUrl_ = other.bgImgUrl_; + bitField2_ |= 0x00400000; + onChanged(); + } + if (!other.getBirthdayDescription().isEmpty()) { + birthdayDescription_ = other.birthdayDescription_; + bitField2_ |= 0x00800000; + onChanged(); + } + if (other.getBirthdayValid() != false) { + setBirthdayValid(other.getBirthdayValid()); + } + if (other.getBlockStatus() != 0) { + setBlockStatus(other.getBlockStatus()); + } + if (other.getCommentRestrict() != 0) { + setCommentRestrict(other.getCommentRestrict()); + } + if (!other.getConstellation().isEmpty()) { + constellation_ = other.constellation_; + bitField2_ |= 0x08000000; + onChanged(); + } + if (other.getDisableIchat() != 0) { + setDisableIchat(other.getDisableIchat()); + } + if (other.getEnableIchatImg() != 0L) { + setEnableIchatImg(other.getEnableIchatImg()); + } + if (other.getExp() != 0) { + setExp(other.getExp()); + } + if (other.getFanTicketCount() != 0L) { + setFanTicketCount(other.getFanTicketCount()); + } + if (other.getFoldStrangerChat() != false) { + setFoldStrangerChat(other.getFoldStrangerChat()); + } + if (other.getFollowStatus() != 0L) { + setFollowStatus(other.getFollowStatus()); + } + if (other.getHotsoonVerified() != false) { + setHotsoonVerified(other.getHotsoonVerified()); + } + if (!other.getHotsoonVerifiedReason().isEmpty()) { + hotsoonVerifiedReason_ = other.hotsoonVerifiedReason_; + bitField3_ |= 0x00000008; + onChanged(); + } + if (other.getIchatRestrictType() != 0) { + setIchatRestrictType(other.getIchatRestrictType()); + } + if (!other.getIdStr().isEmpty()) { + idStr_ = other.idStr_; + bitField3_ |= 0x00000020; + onChanged(); + } + if (other.getIsFollower() != false) { + setIsFollower(other.getIsFollower()); + } + if (other.getIsFollowing() != false) { + setIsFollowing(other.getIsFollowing()); + } + if (other.getNeedProfileGuide() != false) { + setNeedProfileGuide(other.getNeedProfileGuide()); + } + if (other.getPayScores() != 0L) { + setPayScores(other.getPayScores()); + } + if (other.getPushCommentStatus() != false) { + setPushCommentStatus(other.getPushCommentStatus()); + } + if (other.getPushDigg() != false) { + setPushDigg(other.getPushDigg()); + } + if (other.getPushFollow() != false) { + setPushFollow(other.getPushFollow()); + } + if (other.getPushFriendAction() != false) { + setPushFriendAction(other.getPushFriendAction()); + } + if (other.getPushIchat() != false) { + setPushIchat(other.getPushIchat()); + } + if (other.getPushStatus() != false) { + setPushStatus(other.getPushStatus()); + } + if (other.getPushVideoPost() != false) { + setPushVideoPost(other.getPushVideoPost()); + } + if (other.getPushVideoRecommend() != false) { + setPushVideoRecommend(other.getPushVideoRecommend()); + } + if (other.hasStats()) { + mergeStats(other.getStats()); + } + if (other.getVerifiedMobile() != false) { + setVerifiedMobile(other.getVerifiedMobile()); + } + if (!other.getVerifiedReason().isEmpty()) { + verifiedReason_ = other.verifiedReason_; + bitField3_ |= 0x00100000; + onChanged(); + } + if (other.getWithCarManagementPermission() != false) { + setWithCarManagementPermission(other.getWithCarManagementPermission()); + } + if (other.getAgeRange() != 0) { + setAgeRange(other.getAgeRange()); + } + if (other.getWatchDurationMonth() != 0L) { + setWatchDurationMonth(other.getWatchDurationMonth()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + id_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + shortId_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + nickname_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + gender_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + signature_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + level_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + birthday_ = input.readUInt64(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: { + telephone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: { + input.readMessage( + getAvatarThumbFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: { + input.readMessage( + getAvatarMediumFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: { + input.readMessage( + getAvatarLargeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 96: { + verified_ = input.readBool(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 104: { + experience_ = input.readInt32(); + bitField0_ |= 0x00001000; + break; + } // case 104 + case 114: { + city_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 120: { + status_ = input.readInt32(); + bitField0_ |= 0x00004000; + break; + } // case 120 + case 128: { + createTime_ = input.readInt64(); + bitField0_ |= 0x00008000; + break; + } // case 128 + case 136: { + modifyTime_ = input.readInt64(); + bitField0_ |= 0x00010000; + break; + } // case 136 + case 144: { + secret_ = input.readInt32(); + bitField0_ |= 0x00020000; + break; + } // case 144 + case 154: { + shareQrcodeUri_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00040000; + break; + } // case 154 + case 160: { + incomeSharePercent_ = input.readInt32(); + bitField0_ |= 0x00080000; + break; + } // case 160 + case 170: { + input.readMessage( + getBadgeImageListListFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00100000; + break; + } // case 170 + case 178: { + input.readMessage( + getFollowInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00200000; + break; + } // case 178 + case 186: { + input.readMessage( + getPayGradeFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00400000; + break; + } // case 186 + case 194: { + input.readMessage( + getFansClubFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00800000; + break; + } // case 194 + case 202: { + input.readMessage( + getBorderFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x01000000; + break; + } // case 202 + case 210: { + specialId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x02000000; + break; + } // case 210 + case 218: { + input.readMessage( + getAvatarBorderFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x04000000; + break; + } // case 218 + case 226: { + input.readMessage( + getMedalFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x08000000; + break; + } // case 226 + case 234: { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image m = + input.readMessage( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.parser(), + extensionRegistry); + if (realTimeIconsListBuilder_ == null) { + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.add(m); + } else { + realTimeIconsListBuilder_.addMessage(m); + } + break; + } // case 234 + case 242: { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image m = + input.readMessage( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.parser(), + extensionRegistry); + if (newRealTimeIconsListBuilder_ == null) { + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.add(m); + } else { + newRealTimeIconsListBuilder_.addMessage(m); + } + break; + } // case 242 + case 248: { + topVipNo_ = input.readInt64(); + bitField0_ |= 0x40000000; + break; + } // case 248 + case 258: { + input.readMessage( + getUserAttrFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x80000000; + break; + } // case 258 + case 266: { + input.readMessage( + getOwnRoomFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00000001; + break; + } // case 266 + case 272: { + payScore_ = input.readInt64(); + bitField1_ |= 0x00000002; + break; + } // case 272 + case 280: { + ticketCount_ = input.readInt64(); + bitField1_ |= 0x00000004; + break; + } // case 280 + case 290: { + input.readMessage( + getAnchorInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00000008; + break; + } // case 290 + case 296: { + linkMicStats_ = input.readInt32(); + bitField1_ |= 0x00000010; + break; + } // case 296 + case 306: { + displayId_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000020; + break; + } // case 306 + case 312: { + withCommercePermission_ = input.readBool(); + bitField1_ |= 0x00000040; + break; + } // case 312 + case 320: { + withFusionShopEntry_ = input.readBool(); + bitField1_ |= 0x00000080; + break; + } // case 320 + case 328: { + totalRechargeDiamondCount_ = input.readInt64(); + bitField1_ |= 0x00000100; + break; + } // case 328 + case 338: { + input.readMessage( + getWebcastAnchorLevelFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00000200; + break; + } // case 338 + case 346: { + verifiedContent_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000400; + break; + } // case 346 + case 354: { + input.readMessage( + getAuthorStatsFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00000800; + break; + } // case 354 + case 362: { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User m = + input.readMessage( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.parser(), + extensionRegistry); + if (topFansListBuilder_ == null) { + ensureTopFansListIsMutable(); + topFansList_.add(m); + } else { + topFansListBuilder_.addMessage(m); + } + break; + } // case 362 + case 370: { + secUid_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00002000; + break; + } // case 370 + case 376: { + userRole_ = input.readInt32(); + bitField1_ |= 0x00004000; + break; + } // case 376 + case 386: { + input.readMessage( + getXiguaInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00008000; + break; + } // case 386 + case 394: { + input.readMessage( + getActivityRewardFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00010000; + break; + } // case 394 + case 402: { + input.readMessage( + getNobleInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00020000; + break; + } // case 402 + case 410: { + input.readMessage( + getBrotherhoodInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00040000; + break; + } // case 410 + case 418: { + input.readMessage( + getPersonalCardFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00080000; + break; + } // case 418 + case 426: { + input.readMessage( + getAuthenticationInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00100000; + break; + } // case 426 + case 432: { + authorizationInfo_ = input.readInt32(); + bitField1_ |= 0x00200000; + break; + } // case 432 + case 440: { + adversaryAuthorizationInfo_ = input.readInt32(); + bitField1_ |= 0x00400000; + break; + } // case 440 + case 450: { + input.readMessage( + getPoiInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00800000; + break; + } // case 450 + case 458: { + input.readMessage( + getMediaBadgeImageListListFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x01000000; + break; + } // case 458 + case 464: { + adversaryUserStatus_ = input.readInt32(); + bitField1_ |= 0x02000000; + break; + } // case 464 + case 474: { + input.readMessage( + getUserVipInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x04000000; + break; + } // case 474 + case 480: { + long v = input.readInt64(); + ensureCommerceWebcastConfigIdsListIsMutable(); + commerceWebcastConfigIdsList_.addLong(v); + break; + } // case 480 + case 482: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureCommerceWebcastConfigIdsListIsMutable(); + while (input.getBytesUntilLimit() > 0) { + commerceWebcastConfigIdsList_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } // case 482 + case 490: { + input.readMessage( + getBadgeImageListV2ListFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x10000000; + break; + } // case 490 + case 506: { + locationCity_ = input.readStringRequireUtf8(); + bitField1_ |= 0x20000000; + break; + } // case 506 + case 514: { + input.readMessage( + getFansGroupInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x40000000; + break; + } // case 514 + case 522: { + remarkName_ = input.readStringRequireUtf8(); + bitField1_ |= 0x80000000; + break; + } // case 522 + case 528: { + mysteryMan_ = input.readInt32(); + bitField2_ |= 0x00000001; + break; + } // case 528 + case 538: { + webRid_ = input.readStringRequireUtf8(); + bitField2_ |= 0x00000002; + break; + } // case 538 + case 546: { + desensitizedNickname_ = input.readStringRequireUtf8(); + bitField2_ |= 0x00000004; + break; + } // case 546 + case 554: { + input.readMessage( + getJAccreditInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField2_ |= 0x00000008; + break; + } // case 554 + case 562: { + input.readMessage( + getSubscribeFieldBuilder().getBuilder(), + extensionRegistry); + bitField2_ |= 0x00000010; + break; + } // case 562 + case 568: { + isAnonymous_ = input.readBool(); + bitField2_ |= 0x00000020; + break; + } // case 568 + case 576: { + consumeDiamondLevel_ = input.readInt32(); + bitField2_ |= 0x00000040; + break; + } // case 576 + case 586: { + webcastUid_ = input.readStringRequireUtf8(); + bitField2_ |= 0x00000080; + break; + } // case 586 + case 594: { + input.readMessage( + getProfileStyleParamsFieldBuilder().getBuilder(), + extensionRegistry); + bitField2_ |= 0x00000100; + break; + } // case 594 + case 602: { + input.readMessage( + getUserDressInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField2_ |= 0x00000200; + break; + } // case 602 + case 8008: { + allowBeLocated_ = input.readBool(); + bitField2_ |= 0x00000400; + break; + } // case 8008 + case 8016: { + allowFindByContacts_ = input.readBool(); + bitField2_ |= 0x00000800; + break; + } // case 8016 + case 8024: { + allowOthersDownloadVideo_ = input.readBool(); + bitField2_ |= 0x00001000; + break; + } // case 8024 + case 8032: { + allowOthersDownloadWhenSharingVideo_ = input.readBool(); + bitField2_ |= 0x00002000; + break; + } // case 8032 + case 8040: { + allowShareShowProfile_ = input.readBool(); + bitField2_ |= 0x00004000; + break; + } // case 8040 + case 8048: { + allowShowInGossip_ = input.readBool(); + bitField2_ |= 0x00008000; + break; + } // case 8048 + case 8056: { + allowShowMyAction_ = input.readBool(); + bitField2_ |= 0x00010000; + break; + } // case 8056 + case 8064: { + allowStrangeComment_ = input.readBool(); + bitField2_ |= 0x00020000; + break; + } // case 8064 + case 8072: { + allowUnfollowerComment_ = input.readBool(); + bitField2_ |= 0x00040000; + break; + } // case 8072 + case 8080: { + allowUseLinkmic_ = input.readBool(); + bitField2_ |= 0x00080000; + break; + } // case 8080 + case 8090: { + input.readMessage( + getAnchorLevelFieldBuilder().getBuilder(), + extensionRegistry); + bitField2_ |= 0x00100000; + break; + } // case 8090 + case 8098: { + input.readMessage( + getAvatarJpgFieldBuilder().getBuilder(), + extensionRegistry); + bitField2_ |= 0x00200000; + break; + } // case 8098 + case 8106: { + bgImgUrl_ = input.readStringRequireUtf8(); + bitField2_ |= 0x00400000; + break; + } // case 8106 + case 8114: { + birthdayDescription_ = input.readStringRequireUtf8(); + bitField2_ |= 0x00800000; + break; + } // case 8114 + case 8120: { + birthdayValid_ = input.readBool(); + bitField2_ |= 0x01000000; + break; + } // case 8120 + case 8128: { + blockStatus_ = input.readInt32(); + bitField2_ |= 0x02000000; + break; + } // case 8128 + case 8136: { + commentRestrict_ = input.readInt32(); + bitField2_ |= 0x04000000; + break; + } // case 8136 + case 8146: { + constellation_ = input.readStringRequireUtf8(); + bitField2_ |= 0x08000000; + break; + } // case 8146 + case 8152: { + disableIchat_ = input.readInt32(); + bitField2_ |= 0x10000000; + break; + } // case 8152 + case 8160: { + enableIchatImg_ = input.readInt64(); + bitField2_ |= 0x20000000; + break; + } // case 8160 + case 8168: { + exp_ = input.readInt32(); + bitField2_ |= 0x40000000; + break; + } // case 8168 + case 8176: { + fanTicketCount_ = input.readInt64(); + bitField2_ |= 0x80000000; + break; + } // case 8176 + case 8184: { + foldStrangerChat_ = input.readBool(); + bitField3_ |= 0x00000001; + break; + } // case 8184 + case 8192: { + followStatus_ = input.readInt64(); + bitField3_ |= 0x00000002; + break; + } // case 8192 + case 8200: { + hotsoonVerified_ = input.readBool(); + bitField3_ |= 0x00000004; + break; + } // case 8200 + case 8210: { + hotsoonVerifiedReason_ = input.readStringRequireUtf8(); + bitField3_ |= 0x00000008; + break; + } // case 8210 + case 8216: { + ichatRestrictType_ = input.readInt32(); + bitField3_ |= 0x00000010; + break; + } // case 8216 + case 8226: { + idStr_ = input.readStringRequireUtf8(); + bitField3_ |= 0x00000020; + break; + } // case 8226 + case 8232: { + isFollower_ = input.readBool(); + bitField3_ |= 0x00000040; + break; + } // case 8232 + case 8240: { + isFollowing_ = input.readBool(); + bitField3_ |= 0x00000080; + break; + } // case 8240 + case 8248: { + needProfileGuide_ = input.readBool(); + bitField3_ |= 0x00000100; + break; + } // case 8248 + case 8256: { + payScores_ = input.readInt64(); + bitField3_ |= 0x00000200; + break; + } // case 8256 + case 8264: { + pushCommentStatus_ = input.readBool(); + bitField3_ |= 0x00000400; + break; + } // case 8264 + case 8272: { + pushDigg_ = input.readBool(); + bitField3_ |= 0x00000800; + break; + } // case 8272 + case 8280: { + pushFollow_ = input.readBool(); + bitField3_ |= 0x00001000; + break; + } // case 8280 + case 8288: { + pushFriendAction_ = input.readBool(); + bitField3_ |= 0x00002000; + break; + } // case 8288 + case 8296: { + pushIchat_ = input.readBool(); + bitField3_ |= 0x00004000; + break; + } // case 8296 + case 8304: { + pushStatus_ = input.readBool(); + bitField3_ |= 0x00008000; + break; + } // case 8304 + case 8312: { + pushVideoPost_ = input.readBool(); + bitField3_ |= 0x00010000; + break; + } // case 8312 + case 8320: { + pushVideoRecommend_ = input.readBool(); + bitField3_ |= 0x00020000; + break; + } // case 8320 + case 8330: { + input.readMessage( + getStatsFieldBuilder().getBuilder(), + extensionRegistry); + bitField3_ |= 0x00040000; + break; + } // case 8330 + case 8336: { + verifiedMobile_ = input.readBool(); + bitField3_ |= 0x00080000; + break; + } // case 8336 + case 8346: { + verifiedReason_ = input.readStringRequireUtf8(); + bitField3_ |= 0x00100000; + break; + } // case 8346 + case 8352: { + withCarManagementPermission_ = input.readBool(); + bitField3_ |= 0x00200000; + break; + } // case 8352 + case 8360: { + ageRange_ = input.readInt32(); + bitField3_ |= 0x00400000; + break; + } // case 8360 + case 8368: { + watchDurationMonth_ = input.readInt64(); + bitField3_ |= 0x00800000; + break; + } // case 8368 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + private int bitField1_; + private int bitField2_; + private int bitField3_; + + private long id_ ; + /** + * <code>uint64 id = 1;</code> + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + /** + * <code>uint64 id = 1;</code> + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(long value) { + + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 id = 1;</code> + * @return This builder for chaining. + */ + public Builder clearId() { + bitField0_ = (bitField0_ & ~0x00000001); + id_ = 0L; + onChanged(); + return this; + } + + private long shortId_ ; + /** + * <code>uint64 shortId = 2;</code> + * @return The shortId. + */ + @java.lang.Override + public long getShortId() { + return shortId_; + } + /** + * <code>uint64 shortId = 2;</code> + * @param value The shortId to set. + * @return This builder for chaining. + */ + public Builder setShortId(long value) { + + shortId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>uint64 shortId = 2;</code> + * @return This builder for chaining. + */ + public Builder clearShortId() { + bitField0_ = (bitField0_ & ~0x00000002); + shortId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object nickname_ = ""; + /** + * <code>string nickname = 3;</code> + * @return The nickname. + */ + public java.lang.String getNickname() { + java.lang.Object ref = nickname_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nickname_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string nickname = 3;</code> + * @return The bytes for nickname. + */ + public com.google.protobuf.ByteString + getNicknameBytes() { + java.lang.Object ref = nickname_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + nickname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string nickname = 3;</code> + * @param value The nickname to set. + * @return This builder for chaining. + */ + public Builder setNickname( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + nickname_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>string nickname = 3;</code> + * @return This builder for chaining. + */ + public Builder clearNickname() { + nickname_ = getDefaultInstance().getNickname(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * <code>string nickname = 3;</code> + * @param value The bytes for nickname to set. + * @return This builder for chaining. + */ + public Builder setNicknameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + nickname_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int gender_ ; + /** + * <code>uint32 gender = 4;</code> + * @return The gender. + */ + @java.lang.Override + public int getGender() { + return gender_; + } + /** + * <code>uint32 gender = 4;</code> + * @param value The gender to set. + * @return This builder for chaining. + */ + public Builder setGender(int value) { + + gender_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint32 gender = 4;</code> + * @return This builder for chaining. + */ + public Builder clearGender() { + bitField0_ = (bitField0_ & ~0x00000008); + gender_ = 0; + onChanged(); + return this; + } + + private java.lang.Object signature_ = ""; + /** + * <code>string signature = 5;</code> + * @return The signature. + */ + public java.lang.String getSignature() { + java.lang.Object ref = signature_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + signature_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string signature = 5;</code> + * @return The bytes for signature. + */ + public com.google.protobuf.ByteString + getSignatureBytes() { + java.lang.Object ref = signature_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + signature_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string signature = 5;</code> + * @param value The signature to set. + * @return This builder for chaining. + */ + public Builder setSignature( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + signature_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>string signature = 5;</code> + * @return This builder for chaining. + */ + public Builder clearSignature() { + signature_ = getDefaultInstance().getSignature(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * <code>string signature = 5;</code> + * @param value The bytes for signature to set. + * @return This builder for chaining. + */ + public Builder setSignatureBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + signature_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private int level_ ; + /** + * <code>uint32 level = 6;</code> + * @return The level. + */ + @java.lang.Override + public int getLevel() { + return level_; + } + /** + * <code>uint32 level = 6;</code> + * @param value The level to set. + * @return This builder for chaining. + */ + public Builder setLevel(int value) { + + level_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>uint32 level = 6;</code> + * @return This builder for chaining. + */ + public Builder clearLevel() { + bitField0_ = (bitField0_ & ~0x00000020); + level_ = 0; + onChanged(); + return this; + } + + private long birthday_ ; + /** + * <code>uint64 birthday = 7;</code> + * @return The birthday. + */ + @java.lang.Override + public long getBirthday() { + return birthday_; + } + /** + * <code>uint64 birthday = 7;</code> + * @param value The birthday to set. + * @return This builder for chaining. + */ + public Builder setBirthday(long value) { + + birthday_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>uint64 birthday = 7;</code> + * @return This builder for chaining. + */ + public Builder clearBirthday() { + bitField0_ = (bitField0_ & ~0x00000040); + birthday_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object telephone_ = ""; + /** + * <code>string telephone = 8;</code> + * @return The telephone. + */ + public java.lang.String getTelephone() { + java.lang.Object ref = telephone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + telephone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string telephone = 8;</code> + * @return The bytes for telephone. + */ + public com.google.protobuf.ByteString + getTelephoneBytes() { + java.lang.Object ref = telephone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + telephone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string telephone = 8;</code> + * @param value The telephone to set. + * @return This builder for chaining. + */ + public Builder setTelephone( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + telephone_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>string telephone = 8;</code> + * @return This builder for chaining. + */ + public Builder clearTelephone() { + telephone_ = getDefaultInstance().getTelephone(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * <code>string telephone = 8;</code> + * @param value The bytes for telephone to set. + * @return This builder for chaining. + */ + public Builder setTelephoneBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + telephone_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image avatarThumb_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> avatarThumbBuilder_; + /** + * <code>.Image avatarThumb = 9;</code> + * @return Whether the avatarThumb field is set. + */ + public boolean hasAvatarThumb() { + return ((bitField0_ & 0x00000100) != 0); + } + /** + * <code>.Image avatarThumb = 9;</code> + * @return The avatarThumb. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getAvatarThumb() { + if (avatarThumbBuilder_ == null) { + return avatarThumb_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarThumb_; + } else { + return avatarThumbBuilder_.getMessage(); + } + } + /** + * <code>.Image avatarThumb = 9;</code> + */ + public Builder setAvatarThumb(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarThumbBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + avatarThumb_ = value; + } else { + avatarThumbBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>.Image avatarThumb = 9;</code> + */ + public Builder setAvatarThumb( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (avatarThumbBuilder_ == null) { + avatarThumb_ = builderForValue.build(); + } else { + avatarThumbBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>.Image avatarThumb = 9;</code> + */ + public Builder mergeAvatarThumb(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarThumbBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0) && + avatarThumb_ != null && + avatarThumb_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getAvatarThumbBuilder().mergeFrom(value); + } else { + avatarThumb_ = value; + } + } else { + avatarThumbBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>.Image avatarThumb = 9;</code> + */ + public Builder clearAvatarThumb() { + bitField0_ = (bitField0_ & ~0x00000100); + avatarThumb_ = null; + if (avatarThumbBuilder_ != null) { + avatarThumbBuilder_.dispose(); + avatarThumbBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image avatarThumb = 9;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getAvatarThumbBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getAvatarThumbFieldBuilder().getBuilder(); + } + /** + * <code>.Image avatarThumb = 9;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarThumbOrBuilder() { + if (avatarThumbBuilder_ != null) { + return avatarThumbBuilder_.getMessageOrBuilder(); + } else { + return avatarThumb_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarThumb_; + } + } + /** + * <code>.Image avatarThumb = 9;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getAvatarThumbFieldBuilder() { + if (avatarThumbBuilder_ == null) { + avatarThumbBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getAvatarThumb(), + getParentForChildren(), + isClean()); + avatarThumb_ = null; + } + return avatarThumbBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image avatarMedium_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> avatarMediumBuilder_; + /** + * <code>.Image avatarMedium = 10;</code> + * @return Whether the avatarMedium field is set. + */ + public boolean hasAvatarMedium() { + return ((bitField0_ & 0x00000200) != 0); + } + /** + * <code>.Image avatarMedium = 10;</code> + * @return The avatarMedium. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getAvatarMedium() { + if (avatarMediumBuilder_ == null) { + return avatarMedium_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarMedium_; + } else { + return avatarMediumBuilder_.getMessage(); + } + } + /** + * <code>.Image avatarMedium = 10;</code> + */ + public Builder setAvatarMedium(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarMediumBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + avatarMedium_ = value; + } else { + avatarMediumBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>.Image avatarMedium = 10;</code> + */ + public Builder setAvatarMedium( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (avatarMediumBuilder_ == null) { + avatarMedium_ = builderForValue.build(); + } else { + avatarMediumBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>.Image avatarMedium = 10;</code> + */ + public Builder mergeAvatarMedium(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarMediumBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) && + avatarMedium_ != null && + avatarMedium_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getAvatarMediumBuilder().mergeFrom(value); + } else { + avatarMedium_ = value; + } + } else { + avatarMediumBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>.Image avatarMedium = 10;</code> + */ + public Builder clearAvatarMedium() { + bitField0_ = (bitField0_ & ~0x00000200); + avatarMedium_ = null; + if (avatarMediumBuilder_ != null) { + avatarMediumBuilder_.dispose(); + avatarMediumBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image avatarMedium = 10;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getAvatarMediumBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return getAvatarMediumFieldBuilder().getBuilder(); + } + /** + * <code>.Image avatarMedium = 10;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarMediumOrBuilder() { + if (avatarMediumBuilder_ != null) { + return avatarMediumBuilder_.getMessageOrBuilder(); + } else { + return avatarMedium_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarMedium_; + } + } + /** + * <code>.Image avatarMedium = 10;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getAvatarMediumFieldBuilder() { + if (avatarMediumBuilder_ == null) { + avatarMediumBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getAvatarMedium(), + getParentForChildren(), + isClean()); + avatarMedium_ = null; + } + return avatarMediumBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image avatarLarge_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> avatarLargeBuilder_; + /** + * <code>.Image avatarLarge = 11;</code> + * @return Whether the avatarLarge field is set. + */ + public boolean hasAvatarLarge() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * <code>.Image avatarLarge = 11;</code> + * @return The avatarLarge. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getAvatarLarge() { + if (avatarLargeBuilder_ == null) { + return avatarLarge_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarLarge_; + } else { + return avatarLargeBuilder_.getMessage(); + } + } + /** + * <code>.Image avatarLarge = 11;</code> + */ + public Builder setAvatarLarge(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarLargeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + avatarLarge_ = value; + } else { + avatarLargeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * <code>.Image avatarLarge = 11;</code> + */ + public Builder setAvatarLarge( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (avatarLargeBuilder_ == null) { + avatarLarge_ = builderForValue.build(); + } else { + avatarLargeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * <code>.Image avatarLarge = 11;</code> + */ + public Builder mergeAvatarLarge(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarLargeBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) && + avatarLarge_ != null && + avatarLarge_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getAvatarLargeBuilder().mergeFrom(value); + } else { + avatarLarge_ = value; + } + } else { + avatarLargeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * <code>.Image avatarLarge = 11;</code> + */ + public Builder clearAvatarLarge() { + bitField0_ = (bitField0_ & ~0x00000400); + avatarLarge_ = null; + if (avatarLargeBuilder_ != null) { + avatarLargeBuilder_.dispose(); + avatarLargeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image avatarLarge = 11;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getAvatarLargeBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getAvatarLargeFieldBuilder().getBuilder(); + } + /** + * <code>.Image avatarLarge = 11;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarLargeOrBuilder() { + if (avatarLargeBuilder_ != null) { + return avatarLargeBuilder_.getMessageOrBuilder(); + } else { + return avatarLarge_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarLarge_; + } + } + /** + * <code>.Image avatarLarge = 11;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getAvatarLargeFieldBuilder() { + if (avatarLargeBuilder_ == null) { + avatarLargeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getAvatarLarge(), + getParentForChildren(), + isClean()); + avatarLarge_ = null; + } + return avatarLargeBuilder_; + } + + private boolean verified_ ; + /** + * <code>bool verified = 12;</code> + * @return The verified. + */ + @java.lang.Override + public boolean getVerified() { + return verified_; + } + /** + * <code>bool verified = 12;</code> + * @param value The verified to set. + * @return This builder for chaining. + */ + public Builder setVerified(boolean value) { + + verified_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * <code>bool verified = 12;</code> + * @return This builder for chaining. + */ + public Builder clearVerified() { + bitField0_ = (bitField0_ & ~0x00000800); + verified_ = false; + onChanged(); + return this; + } + + private int experience_ ; + /** + * <code>int32 experience = 13;</code> + * @return The experience. + */ + @java.lang.Override + public int getExperience() { + return experience_; + } + /** + * <code>int32 experience = 13;</code> + * @param value The experience to set. + * @return This builder for chaining. + */ + public Builder setExperience(int value) { + + experience_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * <code>int32 experience = 13;</code> + * @return This builder for chaining. + */ + public Builder clearExperience() { + bitField0_ = (bitField0_ & ~0x00001000); + experience_ = 0; + onChanged(); + return this; + } + + private java.lang.Object city_ = ""; + /** + * <code>string city = 14;</code> + * @return The city. + */ + public java.lang.String getCity() { + java.lang.Object ref = city_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + city_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string city = 14;</code> + * @return The bytes for city. + */ + public com.google.protobuf.ByteString + getCityBytes() { + java.lang.Object ref = city_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + city_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string city = 14;</code> + * @param value The city to set. + * @return This builder for chaining. + */ + public Builder setCity( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + city_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>string city = 14;</code> + * @return This builder for chaining. + */ + public Builder clearCity() { + city_ = getDefaultInstance().getCity(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + * <code>string city = 14;</code> + * @param value The bytes for city to set. + * @return This builder for chaining. + */ + public Builder setCityBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + city_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private int status_ ; + /** + * <code>int32 status = 15;</code> + * @return The status. + */ + @java.lang.Override + public int getStatus() { + return status_; + } + /** + * <code>int32 status = 15;</code> + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(int value) { + + status_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <code>int32 status = 15;</code> + * @return This builder for chaining. + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00004000); + status_ = 0; + onChanged(); + return this; + } + + private long createTime_ ; + /** + * <code>int64 createTime = 16;</code> + * @return The createTime. + */ + @java.lang.Override + public long getCreateTime() { + return createTime_; + } + /** + * <code>int64 createTime = 16;</code> + * @param value The createTime to set. + * @return This builder for chaining. + */ + public Builder setCreateTime(long value) { + + createTime_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>int64 createTime = 16;</code> + * @return This builder for chaining. + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00008000); + createTime_ = 0L; + onChanged(); + return this; + } + + private long modifyTime_ ; + /** + * <code>int64 modifyTime = 17;</code> + * @return The modifyTime. + */ + @java.lang.Override + public long getModifyTime() { + return modifyTime_; + } + /** + * <code>int64 modifyTime = 17;</code> + * @param value The modifyTime to set. + * @return This builder for chaining. + */ + public Builder setModifyTime(long value) { + + modifyTime_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * <code>int64 modifyTime = 17;</code> + * @return This builder for chaining. + */ + public Builder clearModifyTime() { + bitField0_ = (bitField0_ & ~0x00010000); + modifyTime_ = 0L; + onChanged(); + return this; + } + + private int secret_ ; + /** + * <code>int32 secret = 18;</code> + * @return The secret. + */ + @java.lang.Override + public int getSecret() { + return secret_; + } + /** + * <code>int32 secret = 18;</code> + * @param value The secret to set. + * @return This builder for chaining. + */ + public Builder setSecret(int value) { + + secret_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * <code>int32 secret = 18;</code> + * @return This builder for chaining. + */ + public Builder clearSecret() { + bitField0_ = (bitField0_ & ~0x00020000); + secret_ = 0; + onChanged(); + return this; + } + + private java.lang.Object shareQrcodeUri_ = ""; + /** + * <code>string shareQrcodeUri = 19;</code> + * @return The shareQrcodeUri. + */ + public java.lang.String getShareQrcodeUri() { + java.lang.Object ref = shareQrcodeUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + shareQrcodeUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string shareQrcodeUri = 19;</code> + * @return The bytes for shareQrcodeUri. + */ + public com.google.protobuf.ByteString + getShareQrcodeUriBytes() { + java.lang.Object ref = shareQrcodeUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + shareQrcodeUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string shareQrcodeUri = 19;</code> + * @param value The shareQrcodeUri to set. + * @return This builder for chaining. + */ + public Builder setShareQrcodeUri( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + shareQrcodeUri_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * <code>string shareQrcodeUri = 19;</code> + * @return This builder for chaining. + */ + public Builder clearShareQrcodeUri() { + shareQrcodeUri_ = getDefaultInstance().getShareQrcodeUri(); + bitField0_ = (bitField0_ & ~0x00040000); + onChanged(); + return this; + } + /** + * <code>string shareQrcodeUri = 19;</code> + * @param value The bytes for shareQrcodeUri to set. + * @return This builder for chaining. + */ + public Builder setShareQrcodeUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + shareQrcodeUri_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + private int incomeSharePercent_ ; + /** + * <code>int32 incomeSharePercent = 20;</code> + * @return The incomeSharePercent. + */ + @java.lang.Override + public int getIncomeSharePercent() { + return incomeSharePercent_; + } + /** + * <code>int32 incomeSharePercent = 20;</code> + * @param value The incomeSharePercent to set. + * @return This builder for chaining. + */ + public Builder setIncomeSharePercent(int value) { + + incomeSharePercent_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * <code>int32 incomeSharePercent = 20;</code> + * @return This builder for chaining. + */ + public Builder clearIncomeSharePercent() { + bitField0_ = (bitField0_ & ~0x00080000); + incomeSharePercent_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image badgeImageListList_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> badgeImageListListBuilder_; + /** + * <code>.Image badgeImageListList = 21;</code> + * @return Whether the badgeImageListList field is set. + */ + public boolean hasBadgeImageListList() { + return ((bitField0_ & 0x00100000) != 0); + } + /** + * <code>.Image badgeImageListList = 21;</code> + * @return The badgeImageListList. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBadgeImageListList() { + if (badgeImageListListBuilder_ == null) { + return badgeImageListList_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : badgeImageListList_; + } else { + return badgeImageListListBuilder_.getMessage(); + } + } + /** + * <code>.Image badgeImageListList = 21;</code> + */ + public Builder setBadgeImageListList(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (badgeImageListListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + badgeImageListList_ = value; + } else { + badgeImageListListBuilder_.setMessage(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * <code>.Image badgeImageListList = 21;</code> + */ + public Builder setBadgeImageListList( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (badgeImageListListBuilder_ == null) { + badgeImageListList_ = builderForValue.build(); + } else { + badgeImageListListBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * <code>.Image badgeImageListList = 21;</code> + */ + public Builder mergeBadgeImageListList(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (badgeImageListListBuilder_ == null) { + if (((bitField0_ & 0x00100000) != 0) && + badgeImageListList_ != null && + badgeImageListList_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBadgeImageListListBuilder().mergeFrom(value); + } else { + badgeImageListList_ = value; + } + } else { + badgeImageListListBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * <code>.Image badgeImageListList = 21;</code> + */ + public Builder clearBadgeImageListList() { + bitField0_ = (bitField0_ & ~0x00100000); + badgeImageListList_ = null; + if (badgeImageListListBuilder_ != null) { + badgeImageListListBuilder_.dispose(); + badgeImageListListBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image badgeImageListList = 21;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBadgeImageListListBuilder() { + bitField0_ |= 0x00100000; + onChanged(); + return getBadgeImageListListFieldBuilder().getBuilder(); + } + /** + * <code>.Image badgeImageListList = 21;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBadgeImageListListOrBuilder() { + if (badgeImageListListBuilder_ != null) { + return badgeImageListListBuilder_.getMessageOrBuilder(); + } else { + return badgeImageListList_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : badgeImageListList_; + } + } + /** + * <code>.Image badgeImageListList = 21;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBadgeImageListListFieldBuilder() { + if (badgeImageListListBuilder_ == null) { + badgeImageListListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBadgeImageListList(), + getParentForChildren(), + isClean()); + badgeImageListList_ = null; + } + return badgeImageListListBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo followInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfoOrBuilder> followInfoBuilder_; + /** + * <code>.User.FollowInfo followInfo = 22;</code> + * @return Whether the followInfo field is set. + */ + public boolean hasFollowInfo() { + return ((bitField0_ & 0x00200000) != 0); + } + /** + * <code>.User.FollowInfo followInfo = 22;</code> + * @return The followInfo. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo getFollowInfo() { + if (followInfoBuilder_ == null) { + return followInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.getDefaultInstance() : followInfo_; + } else { + return followInfoBuilder_.getMessage(); + } + } + /** + * <code>.User.FollowInfo followInfo = 22;</code> + */ + public Builder setFollowInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo value) { + if (followInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + followInfo_ = value; + } else { + followInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * <code>.User.FollowInfo followInfo = 22;</code> + */ + public Builder setFollowInfo( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.Builder builderForValue) { + if (followInfoBuilder_ == null) { + followInfo_ = builderForValue.build(); + } else { + followInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * <code>.User.FollowInfo followInfo = 22;</code> + */ + public Builder mergeFollowInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo value) { + if (followInfoBuilder_ == null) { + if (((bitField0_ & 0x00200000) != 0) && + followInfo_ != null && + followInfo_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.getDefaultInstance()) { + getFollowInfoBuilder().mergeFrom(value); + } else { + followInfo_ = value; + } + } else { + followInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * <code>.User.FollowInfo followInfo = 22;</code> + */ + public Builder clearFollowInfo() { + bitField0_ = (bitField0_ & ~0x00200000); + followInfo_ = null; + if (followInfoBuilder_ != null) { + followInfoBuilder_.dispose(); + followInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.FollowInfo followInfo = 22;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.Builder getFollowInfoBuilder() { + bitField0_ |= 0x00200000; + onChanged(); + return getFollowInfoFieldBuilder().getBuilder(); + } + /** + * <code>.User.FollowInfo followInfo = 22;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfoOrBuilder getFollowInfoOrBuilder() { + if (followInfoBuilder_ != null) { + return followInfoBuilder_.getMessageOrBuilder(); + } else { + return followInfo_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.getDefaultInstance() : followInfo_; + } + } + /** + * <code>.User.FollowInfo followInfo = 22;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfoOrBuilder> + getFollowInfoFieldBuilder() { + if (followInfoBuilder_ == null) { + followInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FollowInfoOrBuilder>( + getFollowInfo(), + getParentForChildren(), + isClean()); + followInfo_ = null; + } + return followInfoBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade payGrade_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGradeOrBuilder> payGradeBuilder_; + /** + * <code>.User.PayGrade payGrade = 23;</code> + * @return Whether the payGrade field is set. + */ + public boolean hasPayGrade() { + return ((bitField0_ & 0x00400000) != 0); + } + /** + * <code>.User.PayGrade payGrade = 23;</code> + * @return The payGrade. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade getPayGrade() { + if (payGradeBuilder_ == null) { + return payGrade_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.getDefaultInstance() : payGrade_; + } else { + return payGradeBuilder_.getMessage(); + } + } + /** + * <code>.User.PayGrade payGrade = 23;</code> + */ + public Builder setPayGrade(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade value) { + if (payGradeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payGrade_ = value; + } else { + payGradeBuilder_.setMessage(value); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * <code>.User.PayGrade payGrade = 23;</code> + */ + public Builder setPayGrade( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.Builder builderForValue) { + if (payGradeBuilder_ == null) { + payGrade_ = builderForValue.build(); + } else { + payGradeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * <code>.User.PayGrade payGrade = 23;</code> + */ + public Builder mergePayGrade(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade value) { + if (payGradeBuilder_ == null) { + if (((bitField0_ & 0x00400000) != 0) && + payGrade_ != null && + payGrade_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.getDefaultInstance()) { + getPayGradeBuilder().mergeFrom(value); + } else { + payGrade_ = value; + } + } else { + payGradeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * <code>.User.PayGrade payGrade = 23;</code> + */ + public Builder clearPayGrade() { + bitField0_ = (bitField0_ & ~0x00400000); + payGrade_ = null; + if (payGradeBuilder_ != null) { + payGradeBuilder_.dispose(); + payGradeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.PayGrade payGrade = 23;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.Builder getPayGradeBuilder() { + bitField0_ |= 0x00400000; + onChanged(); + return getPayGradeFieldBuilder().getBuilder(); + } + /** + * <code>.User.PayGrade payGrade = 23;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGradeOrBuilder getPayGradeOrBuilder() { + if (payGradeBuilder_ != null) { + return payGradeBuilder_.getMessageOrBuilder(); + } else { + return payGrade_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.getDefaultInstance() : payGrade_; + } + } + /** + * <code>.User.PayGrade payGrade = 23;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGradeOrBuilder> + getPayGradeFieldBuilder() { + if (payGradeBuilder_ == null) { + payGradeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGrade.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PayGradeOrBuilder>( + getPayGrade(), + getParentForChildren(), + isClean()); + payGrade_ = null; + } + return payGradeBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub fansClub_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClubOrBuilder> fansClubBuilder_; + /** + * <code>.User.FansClub fansClub = 24;</code> + * @return Whether the fansClub field is set. + */ + public boolean hasFansClub() { + return ((bitField0_ & 0x00800000) != 0); + } + /** + * <code>.User.FansClub fansClub = 24;</code> + * @return The fansClub. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub getFansClub() { + if (fansClubBuilder_ == null) { + return fansClub_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.getDefaultInstance() : fansClub_; + } else { + return fansClubBuilder_.getMessage(); + } + } + /** + * <code>.User.FansClub fansClub = 24;</code> + */ + public Builder setFansClub(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub value) { + if (fansClubBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fansClub_ = value; + } else { + fansClubBuilder_.setMessage(value); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * <code>.User.FansClub fansClub = 24;</code> + */ + public Builder setFansClub( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.Builder builderForValue) { + if (fansClubBuilder_ == null) { + fansClub_ = builderForValue.build(); + } else { + fansClubBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * <code>.User.FansClub fansClub = 24;</code> + */ + public Builder mergeFansClub(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub value) { + if (fansClubBuilder_ == null) { + if (((bitField0_ & 0x00800000) != 0) && + fansClub_ != null && + fansClub_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.getDefaultInstance()) { + getFansClubBuilder().mergeFrom(value); + } else { + fansClub_ = value; + } + } else { + fansClubBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * <code>.User.FansClub fansClub = 24;</code> + */ + public Builder clearFansClub() { + bitField0_ = (bitField0_ & ~0x00800000); + fansClub_ = null; + if (fansClubBuilder_ != null) { + fansClubBuilder_.dispose(); + fansClubBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.FansClub fansClub = 24;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.Builder getFansClubBuilder() { + bitField0_ |= 0x00800000; + onChanged(); + return getFansClubFieldBuilder().getBuilder(); + } + /** + * <code>.User.FansClub fansClub = 24;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClubOrBuilder getFansClubOrBuilder() { + if (fansClubBuilder_ != null) { + return fansClubBuilder_.getMessageOrBuilder(); + } else { + return fansClub_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.getDefaultInstance() : fansClub_; + } + } + /** + * <code>.User.FansClub fansClub = 24;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClubOrBuilder> + getFansClubFieldBuilder() { + if (fansClubBuilder_ == null) { + fansClubBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClub.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansClubOrBuilder>( + getFansClub(), + getParentForChildren(), + isClean()); + fansClub_ = null; + } + return fansClubBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border border_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BorderOrBuilder> borderBuilder_; + /** + * <code>.User.Border border = 25;</code> + * @return Whether the border field is set. + */ + public boolean hasBorder() { + return ((bitField0_ & 0x01000000) != 0); + } + /** + * <code>.User.Border border = 25;</code> + * @return The border. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border getBorder() { + if (borderBuilder_ == null) { + return border_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.getDefaultInstance() : border_; + } else { + return borderBuilder_.getMessage(); + } + } + /** + * <code>.User.Border border = 25;</code> + */ + public Builder setBorder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border value) { + if (borderBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + border_ = value; + } else { + borderBuilder_.setMessage(value); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * <code>.User.Border border = 25;</code> + */ + public Builder setBorder( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.Builder builderForValue) { + if (borderBuilder_ == null) { + border_ = builderForValue.build(); + } else { + borderBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * <code>.User.Border border = 25;</code> + */ + public Builder mergeBorder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border value) { + if (borderBuilder_ == null) { + if (((bitField0_ & 0x01000000) != 0) && + border_ != null && + border_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.getDefaultInstance()) { + getBorderBuilder().mergeFrom(value); + } else { + border_ = value; + } + } else { + borderBuilder_.mergeFrom(value); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * <code>.User.Border border = 25;</code> + */ + public Builder clearBorder() { + bitField0_ = (bitField0_ & ~0x01000000); + border_ = null; + if (borderBuilder_ != null) { + borderBuilder_.dispose(); + borderBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.Border border = 25;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.Builder getBorderBuilder() { + bitField0_ |= 0x01000000; + onChanged(); + return getBorderFieldBuilder().getBuilder(); + } + /** + * <code>.User.Border border = 25;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BorderOrBuilder getBorderOrBuilder() { + if (borderBuilder_ != null) { + return borderBuilder_.getMessageOrBuilder(); + } else { + return border_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.getDefaultInstance() : border_; + } + } + /** + * <code>.User.Border border = 25;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BorderOrBuilder> + getBorderFieldBuilder() { + if (borderBuilder_ == null) { + borderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Border.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BorderOrBuilder>( + getBorder(), + getParentForChildren(), + isClean()); + border_ = null; + } + return borderBuilder_; + } + + private java.lang.Object specialId_ = ""; + /** + * <code>string specialId = 26;</code> + * @return The specialId. + */ + public java.lang.String getSpecialId() { + java.lang.Object ref = specialId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + specialId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string specialId = 26;</code> + * @return The bytes for specialId. + */ + public com.google.protobuf.ByteString + getSpecialIdBytes() { + java.lang.Object ref = specialId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + specialId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string specialId = 26;</code> + * @param value The specialId to set. + * @return This builder for chaining. + */ + public Builder setSpecialId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + specialId_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + /** + * <code>string specialId = 26;</code> + * @return This builder for chaining. + */ + public Builder clearSpecialId() { + specialId_ = getDefaultInstance().getSpecialId(); + bitField0_ = (bitField0_ & ~0x02000000); + onChanged(); + return this; + } + /** + * <code>string specialId = 26;</code> + * @param value The bytes for specialId to set. + * @return This builder for chaining. + */ + public Builder setSpecialIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + specialId_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image avatarBorder_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> avatarBorderBuilder_; + /** + * <code>.Image avatarBorder = 27;</code> + * @return Whether the avatarBorder field is set. + */ + public boolean hasAvatarBorder() { + return ((bitField0_ & 0x04000000) != 0); + } + /** + * <code>.Image avatarBorder = 27;</code> + * @return The avatarBorder. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getAvatarBorder() { + if (avatarBorderBuilder_ == null) { + return avatarBorder_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarBorder_; + } else { + return avatarBorderBuilder_.getMessage(); + } + } + /** + * <code>.Image avatarBorder = 27;</code> + */ + public Builder setAvatarBorder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarBorderBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + avatarBorder_ = value; + } else { + avatarBorderBuilder_.setMessage(value); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * <code>.Image avatarBorder = 27;</code> + */ + public Builder setAvatarBorder( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (avatarBorderBuilder_ == null) { + avatarBorder_ = builderForValue.build(); + } else { + avatarBorderBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * <code>.Image avatarBorder = 27;</code> + */ + public Builder mergeAvatarBorder(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarBorderBuilder_ == null) { + if (((bitField0_ & 0x04000000) != 0) && + avatarBorder_ != null && + avatarBorder_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getAvatarBorderBuilder().mergeFrom(value); + } else { + avatarBorder_ = value; + } + } else { + avatarBorderBuilder_.mergeFrom(value); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * <code>.Image avatarBorder = 27;</code> + */ + public Builder clearAvatarBorder() { + bitField0_ = (bitField0_ & ~0x04000000); + avatarBorder_ = null; + if (avatarBorderBuilder_ != null) { + avatarBorderBuilder_.dispose(); + avatarBorderBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image avatarBorder = 27;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getAvatarBorderBuilder() { + bitField0_ |= 0x04000000; + onChanged(); + return getAvatarBorderFieldBuilder().getBuilder(); + } + /** + * <code>.Image avatarBorder = 27;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarBorderOrBuilder() { + if (avatarBorderBuilder_ != null) { + return avatarBorderBuilder_.getMessageOrBuilder(); + } else { + return avatarBorder_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarBorder_; + } + } + /** + * <code>.Image avatarBorder = 27;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getAvatarBorderFieldBuilder() { + if (avatarBorderBuilder_ == null) { + avatarBorderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getAvatarBorder(), + getParentForChildren(), + isClean()); + avatarBorder_ = null; + } + return avatarBorderBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image medal_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> medalBuilder_; + /** + * <code>.Image medal = 28;</code> + * @return Whether the medal field is set. + */ + public boolean hasMedal() { + return ((bitField0_ & 0x08000000) != 0); + } + /** + * <code>.Image medal = 28;</code> + * @return The medal. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getMedal() { + if (medalBuilder_ == null) { + return medal_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : medal_; + } else { + return medalBuilder_.getMessage(); + } + } + /** + * <code>.Image medal = 28;</code> + */ + public Builder setMedal(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (medalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + medal_ = value; + } else { + medalBuilder_.setMessage(value); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * <code>.Image medal = 28;</code> + */ + public Builder setMedal( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (medalBuilder_ == null) { + medal_ = builderForValue.build(); + } else { + medalBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * <code>.Image medal = 28;</code> + */ + public Builder mergeMedal(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (medalBuilder_ == null) { + if (((bitField0_ & 0x08000000) != 0) && + medal_ != null && + medal_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getMedalBuilder().mergeFrom(value); + } else { + medal_ = value; + } + } else { + medalBuilder_.mergeFrom(value); + } + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * <code>.Image medal = 28;</code> + */ + public Builder clearMedal() { + bitField0_ = (bitField0_ & ~0x08000000); + medal_ = null; + if (medalBuilder_ != null) { + medalBuilder_.dispose(); + medalBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image medal = 28;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getMedalBuilder() { + bitField0_ |= 0x08000000; + onChanged(); + return getMedalFieldBuilder().getBuilder(); + } + /** + * <code>.Image medal = 28;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getMedalOrBuilder() { + if (medalBuilder_ != null) { + return medalBuilder_.getMessageOrBuilder(); + } else { + return medal_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : medal_; + } + } + /** + * <code>.Image medal = 28;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getMedalFieldBuilder() { + if (medalBuilder_ == null) { + medalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getMedal(), + getParentForChildren(), + isClean()); + medal_ = null; + } + return medalBuilder_; + } + + private java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> realTimeIconsList_ = + java.util.Collections.emptyList(); + private void ensureRealTimeIconsListIsMutable() { + if (!((bitField0_ & 0x10000000) != 0)) { + realTimeIconsList_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image>(realTimeIconsList_); + bitField0_ |= 0x10000000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> realTimeIconsListBuilder_; + + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> getRealTimeIconsListList() { + if (realTimeIconsListBuilder_ == null) { + return java.util.Collections.unmodifiableList(realTimeIconsList_); + } else { + return realTimeIconsListBuilder_.getMessageList(); + } + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public int getRealTimeIconsListCount() { + if (realTimeIconsListBuilder_ == null) { + return realTimeIconsList_.size(); + } else { + return realTimeIconsListBuilder_.getCount(); + } + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getRealTimeIconsList(int index) { + if (realTimeIconsListBuilder_ == null) { + return realTimeIconsList_.get(index); + } else { + return realTimeIconsListBuilder_.getMessage(index); + } + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public Builder setRealTimeIconsList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (realTimeIconsListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.set(index, value); + onChanged(); + } else { + realTimeIconsListBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public Builder setRealTimeIconsList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (realTimeIconsListBuilder_ == null) { + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.set(index, builderForValue.build()); + onChanged(); + } else { + realTimeIconsListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public Builder addRealTimeIconsList(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (realTimeIconsListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.add(value); + onChanged(); + } else { + realTimeIconsListBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public Builder addRealTimeIconsList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (realTimeIconsListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.add(index, value); + onChanged(); + } else { + realTimeIconsListBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public Builder addRealTimeIconsList( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (realTimeIconsListBuilder_ == null) { + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.add(builderForValue.build()); + onChanged(); + } else { + realTimeIconsListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public Builder addRealTimeIconsList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (realTimeIconsListBuilder_ == null) { + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.add(index, builderForValue.build()); + onChanged(); + } else { + realTimeIconsListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public Builder addAllRealTimeIconsList( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> values) { + if (realTimeIconsListBuilder_ == null) { + ensureRealTimeIconsListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, realTimeIconsList_); + onChanged(); + } else { + realTimeIconsListBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public Builder clearRealTimeIconsList() { + if (realTimeIconsListBuilder_ == null) { + realTimeIconsList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x10000000); + onChanged(); + } else { + realTimeIconsListBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public Builder removeRealTimeIconsList(int index) { + if (realTimeIconsListBuilder_ == null) { + ensureRealTimeIconsListIsMutable(); + realTimeIconsList_.remove(index); + onChanged(); + } else { + realTimeIconsListBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getRealTimeIconsListBuilder( + int index) { + return getRealTimeIconsListFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getRealTimeIconsListOrBuilder( + int index) { + if (realTimeIconsListBuilder_ == null) { + return realTimeIconsList_.get(index); } else { + return realTimeIconsListBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getRealTimeIconsListOrBuilderList() { + if (realTimeIconsListBuilder_ != null) { + return realTimeIconsListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(realTimeIconsList_); + } + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder addRealTimeIconsListBuilder() { + return getRealTimeIconsListFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()); + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder addRealTimeIconsListBuilder( + int index) { + return getRealTimeIconsListFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()); + } + /** + * <code>repeated .Image realTimeIconsList = 29;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder> + getRealTimeIconsListBuilderList() { + return getRealTimeIconsListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getRealTimeIconsListFieldBuilder() { + if (realTimeIconsListBuilder_ == null) { + realTimeIconsListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + realTimeIconsList_, + ((bitField0_ & 0x10000000) != 0), + getParentForChildren(), + isClean()); + realTimeIconsList_ = null; + } + return realTimeIconsListBuilder_; + } + + private java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> newRealTimeIconsList_ = + java.util.Collections.emptyList(); + private void ensureNewRealTimeIconsListIsMutable() { + if (!((bitField0_ & 0x20000000) != 0)) { + newRealTimeIconsList_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image>(newRealTimeIconsList_); + bitField0_ |= 0x20000000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> newRealTimeIconsListBuilder_; + + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> getNewRealTimeIconsListList() { + if (newRealTimeIconsListBuilder_ == null) { + return java.util.Collections.unmodifiableList(newRealTimeIconsList_); + } else { + return newRealTimeIconsListBuilder_.getMessageList(); + } + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public int getNewRealTimeIconsListCount() { + if (newRealTimeIconsListBuilder_ == null) { + return newRealTimeIconsList_.size(); + } else { + return newRealTimeIconsListBuilder_.getCount(); + } + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getNewRealTimeIconsList(int index) { + if (newRealTimeIconsListBuilder_ == null) { + return newRealTimeIconsList_.get(index); + } else { + return newRealTimeIconsListBuilder_.getMessage(index); + } + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public Builder setNewRealTimeIconsList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (newRealTimeIconsListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.set(index, value); + onChanged(); + } else { + newRealTimeIconsListBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public Builder setNewRealTimeIconsList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (newRealTimeIconsListBuilder_ == null) { + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.set(index, builderForValue.build()); + onChanged(); + } else { + newRealTimeIconsListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public Builder addNewRealTimeIconsList(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (newRealTimeIconsListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.add(value); + onChanged(); + } else { + newRealTimeIconsListBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public Builder addNewRealTimeIconsList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (newRealTimeIconsListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.add(index, value); + onChanged(); + } else { + newRealTimeIconsListBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public Builder addNewRealTimeIconsList( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (newRealTimeIconsListBuilder_ == null) { + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.add(builderForValue.build()); + onChanged(); + } else { + newRealTimeIconsListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public Builder addNewRealTimeIconsList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (newRealTimeIconsListBuilder_ == null) { + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.add(index, builderForValue.build()); + onChanged(); + } else { + newRealTimeIconsListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public Builder addAllNewRealTimeIconsList( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image> values) { + if (newRealTimeIconsListBuilder_ == null) { + ensureNewRealTimeIconsListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, newRealTimeIconsList_); + onChanged(); + } else { + newRealTimeIconsListBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public Builder clearNewRealTimeIconsList() { + if (newRealTimeIconsListBuilder_ == null) { + newRealTimeIconsList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x20000000); + onChanged(); + } else { + newRealTimeIconsListBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public Builder removeNewRealTimeIconsList(int index) { + if (newRealTimeIconsListBuilder_ == null) { + ensureNewRealTimeIconsListIsMutable(); + newRealTimeIconsList_.remove(index); + onChanged(); + } else { + newRealTimeIconsListBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getNewRealTimeIconsListBuilder( + int index) { + return getNewRealTimeIconsListFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getNewRealTimeIconsListOrBuilder( + int index) { + if (newRealTimeIconsListBuilder_ == null) { + return newRealTimeIconsList_.get(index); } else { + return newRealTimeIconsListBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getNewRealTimeIconsListOrBuilderList() { + if (newRealTimeIconsListBuilder_ != null) { + return newRealTimeIconsListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(newRealTimeIconsList_); + } + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder addNewRealTimeIconsListBuilder() { + return getNewRealTimeIconsListFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()); + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder addNewRealTimeIconsListBuilder( + int index) { + return getNewRealTimeIconsListFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()); + } + /** + * <code>repeated .Image newRealTimeIconsList = 30;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder> + getNewRealTimeIconsListBuilderList() { + return getNewRealTimeIconsListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getNewRealTimeIconsListFieldBuilder() { + if (newRealTimeIconsListBuilder_ == null) { + newRealTimeIconsListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + newRealTimeIconsList_, + ((bitField0_ & 0x20000000) != 0), + getParentForChildren(), + isClean()); + newRealTimeIconsList_ = null; + } + return newRealTimeIconsListBuilder_; + } + + private long topVipNo_ ; + /** + * <code>int64 topVipNo = 31;</code> + * @return The topVipNo. + */ + @java.lang.Override + public long getTopVipNo() { + return topVipNo_; + } + /** + * <code>int64 topVipNo = 31;</code> + * @param value The topVipNo to set. + * @return This builder for chaining. + */ + public Builder setTopVipNo(long value) { + + topVipNo_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + /** + * <code>int64 topVipNo = 31;</code> + * @return This builder for chaining. + */ + public Builder clearTopVipNo() { + bitField0_ = (bitField0_ & ~0x40000000); + topVipNo_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr userAttr_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttrOrBuilder> userAttrBuilder_; + /** + * <code>.User.UserAttr userAttr = 32;</code> + * @return Whether the userAttr field is set. + */ + public boolean hasUserAttr() { + return ((bitField0_ & 0x80000000) != 0); + } + /** + * <code>.User.UserAttr userAttr = 32;</code> + * @return The userAttr. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr getUserAttr() { + if (userAttrBuilder_ == null) { + return userAttr_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.getDefaultInstance() : userAttr_; + } else { + return userAttrBuilder_.getMessage(); + } + } + /** + * <code>.User.UserAttr userAttr = 32;</code> + */ + public Builder setUserAttr(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr value) { + if (userAttrBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userAttr_ = value; + } else { + userAttrBuilder_.setMessage(value); + } + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + /** + * <code>.User.UserAttr userAttr = 32;</code> + */ + public Builder setUserAttr( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.Builder builderForValue) { + if (userAttrBuilder_ == null) { + userAttr_ = builderForValue.build(); + } else { + userAttrBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + /** + * <code>.User.UserAttr userAttr = 32;</code> + */ + public Builder mergeUserAttr(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr value) { + if (userAttrBuilder_ == null) { + if (((bitField0_ & 0x80000000) != 0) && + userAttr_ != null && + userAttr_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.getDefaultInstance()) { + getUserAttrBuilder().mergeFrom(value); + } else { + userAttr_ = value; + } + } else { + userAttrBuilder_.mergeFrom(value); + } + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + /** + * <code>.User.UserAttr userAttr = 32;</code> + */ + public Builder clearUserAttr() { + bitField0_ = (bitField0_ & ~0x80000000); + userAttr_ = null; + if (userAttrBuilder_ != null) { + userAttrBuilder_.dispose(); + userAttrBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.UserAttr userAttr = 32;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.Builder getUserAttrBuilder() { + bitField0_ |= 0x80000000; + onChanged(); + return getUserAttrFieldBuilder().getBuilder(); + } + /** + * <code>.User.UserAttr userAttr = 32;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttrOrBuilder getUserAttrOrBuilder() { + if (userAttrBuilder_ != null) { + return userAttrBuilder_.getMessageOrBuilder(); + } else { + return userAttr_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.getDefaultInstance() : userAttr_; + } + } + /** + * <code>.User.UserAttr userAttr = 32;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttrOrBuilder> + getUserAttrFieldBuilder() { + if (userAttrBuilder_ == null) { + userAttrBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttr.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserAttrOrBuilder>( + getUserAttr(), + getParentForChildren(), + isClean()); + userAttr_ = null; + } + return userAttrBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom ownRoom_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoomOrBuilder> ownRoomBuilder_; + /** + * <code>.User.OwnRoom ownRoom = 33;</code> + * @return Whether the ownRoom field is set. + */ + public boolean hasOwnRoom() { + return ((bitField1_ & 0x00000001) != 0); + } + /** + * <code>.User.OwnRoom ownRoom = 33;</code> + * @return The ownRoom. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom getOwnRoom() { + if (ownRoomBuilder_ == null) { + return ownRoom_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.getDefaultInstance() : ownRoom_; + } else { + return ownRoomBuilder_.getMessage(); + } + } + /** + * <code>.User.OwnRoom ownRoom = 33;</code> + */ + public Builder setOwnRoom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom value) { + if (ownRoomBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ownRoom_ = value; + } else { + ownRoomBuilder_.setMessage(value); + } + bitField1_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.User.OwnRoom ownRoom = 33;</code> + */ + public Builder setOwnRoom( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.Builder builderForValue) { + if (ownRoomBuilder_ == null) { + ownRoom_ = builderForValue.build(); + } else { + ownRoomBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.User.OwnRoom ownRoom = 33;</code> + */ + public Builder mergeOwnRoom(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom value) { + if (ownRoomBuilder_ == null) { + if (((bitField1_ & 0x00000001) != 0) && + ownRoom_ != null && + ownRoom_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.getDefaultInstance()) { + getOwnRoomBuilder().mergeFrom(value); + } else { + ownRoom_ = value; + } + } else { + ownRoomBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.User.OwnRoom ownRoom = 33;</code> + */ + public Builder clearOwnRoom() { + bitField1_ = (bitField1_ & ~0x00000001); + ownRoom_ = null; + if (ownRoomBuilder_ != null) { + ownRoomBuilder_.dispose(); + ownRoomBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.OwnRoom ownRoom = 33;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.Builder getOwnRoomBuilder() { + bitField1_ |= 0x00000001; + onChanged(); + return getOwnRoomFieldBuilder().getBuilder(); + } + /** + * <code>.User.OwnRoom ownRoom = 33;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoomOrBuilder getOwnRoomOrBuilder() { + if (ownRoomBuilder_ != null) { + return ownRoomBuilder_.getMessageOrBuilder(); + } else { + return ownRoom_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.getDefaultInstance() : ownRoom_; + } + } + /** + * <code>.User.OwnRoom ownRoom = 33;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoomOrBuilder> + getOwnRoomFieldBuilder() { + if (ownRoomBuilder_ == null) { + ownRoomBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoom.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.OwnRoomOrBuilder>( + getOwnRoom(), + getParentForChildren(), + isClean()); + ownRoom_ = null; + } + return ownRoomBuilder_; + } + + private long payScore_ ; + /** + * <code>int64 payScore = 34;</code> + * @return The payScore. + */ + @java.lang.Override + public long getPayScore() { + return payScore_; + } + /** + * <code>int64 payScore = 34;</code> + * @param value The payScore to set. + * @return This builder for chaining. + */ + public Builder setPayScore(long value) { + + payScore_ = value; + bitField1_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>int64 payScore = 34;</code> + * @return This builder for chaining. + */ + public Builder clearPayScore() { + bitField1_ = (bitField1_ & ~0x00000002); + payScore_ = 0L; + onChanged(); + return this; + } + + private long ticketCount_ ; + /** + * <code>int64 ticketCount = 35;</code> + * @return The ticketCount. + */ + @java.lang.Override + public long getTicketCount() { + return ticketCount_; + } + /** + * <code>int64 ticketCount = 35;</code> + * @param value The ticketCount to set. + * @return This builder for chaining. + */ + public Builder setTicketCount(long value) { + + ticketCount_ = value; + bitField1_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>int64 ticketCount = 35;</code> + * @return This builder for chaining. + */ + public Builder clearTicketCount() { + bitField1_ = (bitField1_ & ~0x00000004); + ticketCount_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo anchorInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfoOrBuilder> anchorInfoBuilder_; + /** + * <code>.User.AnchorInfo anchorInfo = 36;</code> + * @return Whether the anchorInfo field is set. + */ + public boolean hasAnchorInfo() { + return ((bitField1_ & 0x00000008) != 0); + } + /** + * <code>.User.AnchorInfo anchorInfo = 36;</code> + * @return The anchorInfo. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo getAnchorInfo() { + if (anchorInfoBuilder_ == null) { + return anchorInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.getDefaultInstance() : anchorInfo_; + } else { + return anchorInfoBuilder_.getMessage(); + } + } + /** + * <code>.User.AnchorInfo anchorInfo = 36;</code> + */ + public Builder setAnchorInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo value) { + if (anchorInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + anchorInfo_ = value; + } else { + anchorInfoBuilder_.setMessage(value); + } + bitField1_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.User.AnchorInfo anchorInfo = 36;</code> + */ + public Builder setAnchorInfo( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.Builder builderForValue) { + if (anchorInfoBuilder_ == null) { + anchorInfo_ = builderForValue.build(); + } else { + anchorInfoBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.User.AnchorInfo anchorInfo = 36;</code> + */ + public Builder mergeAnchorInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo value) { + if (anchorInfoBuilder_ == null) { + if (((bitField1_ & 0x00000008) != 0) && + anchorInfo_ != null && + anchorInfo_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.getDefaultInstance()) { + getAnchorInfoBuilder().mergeFrom(value); + } else { + anchorInfo_ = value; + } + } else { + anchorInfoBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.User.AnchorInfo anchorInfo = 36;</code> + */ + public Builder clearAnchorInfo() { + bitField1_ = (bitField1_ & ~0x00000008); + anchorInfo_ = null; + if (anchorInfoBuilder_ != null) { + anchorInfoBuilder_.dispose(); + anchorInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.AnchorInfo anchorInfo = 36;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.Builder getAnchorInfoBuilder() { + bitField1_ |= 0x00000008; + onChanged(); + return getAnchorInfoFieldBuilder().getBuilder(); + } + /** + * <code>.User.AnchorInfo anchorInfo = 36;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfoOrBuilder getAnchorInfoOrBuilder() { + if (anchorInfoBuilder_ != null) { + return anchorInfoBuilder_.getMessageOrBuilder(); + } else { + return anchorInfo_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.getDefaultInstance() : anchorInfo_; + } + } + /** + * <code>.User.AnchorInfo anchorInfo = 36;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfoOrBuilder> + getAnchorInfoFieldBuilder() { + if (anchorInfoBuilder_ == null) { + anchorInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorInfoOrBuilder>( + getAnchorInfo(), + getParentForChildren(), + isClean()); + anchorInfo_ = null; + } + return anchorInfoBuilder_; + } + + private int linkMicStats_ ; + /** + * <code>int32 linkMicStats = 37;</code> + * @return The linkMicStats. + */ + @java.lang.Override + public int getLinkMicStats() { + return linkMicStats_; + } + /** + * <code>int32 linkMicStats = 37;</code> + * @param value The linkMicStats to set. + * @return This builder for chaining. + */ + public Builder setLinkMicStats(int value) { + + linkMicStats_ = value; + bitField1_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>int32 linkMicStats = 37;</code> + * @return This builder for chaining. + */ + public Builder clearLinkMicStats() { + bitField1_ = (bitField1_ & ~0x00000010); + linkMicStats_ = 0; + onChanged(); + return this; + } + + private java.lang.Object displayId_ = ""; + /** + * <code>string displayId = 38;</code> + * @return The displayId. + */ + public java.lang.String getDisplayId() { + java.lang.Object ref = displayId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string displayId = 38;</code> + * @return The bytes for displayId. + */ + public com.google.protobuf.ByteString + getDisplayIdBytes() { + java.lang.Object ref = displayId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string displayId = 38;</code> + * @param value The displayId to set. + * @return This builder for chaining. + */ + public Builder setDisplayId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + displayId_ = value; + bitField1_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>string displayId = 38;</code> + * @return This builder for chaining. + */ + public Builder clearDisplayId() { + displayId_ = getDefaultInstance().getDisplayId(); + bitField1_ = (bitField1_ & ~0x00000020); + onChanged(); + return this; + } + /** + * <code>string displayId = 38;</code> + * @param value The bytes for displayId to set. + * @return This builder for chaining. + */ + public Builder setDisplayIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + displayId_ = value; + bitField1_ |= 0x00000020; + onChanged(); + return this; + } + + private boolean withCommercePermission_ ; + /** + * <code>bool withCommercePermission = 39;</code> + * @return The withCommercePermission. + */ + @java.lang.Override + public boolean getWithCommercePermission() { + return withCommercePermission_; + } + /** + * <code>bool withCommercePermission = 39;</code> + * @param value The withCommercePermission to set. + * @return This builder for chaining. + */ + public Builder setWithCommercePermission(boolean value) { + + withCommercePermission_ = value; + bitField1_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>bool withCommercePermission = 39;</code> + * @return This builder for chaining. + */ + public Builder clearWithCommercePermission() { + bitField1_ = (bitField1_ & ~0x00000040); + withCommercePermission_ = false; + onChanged(); + return this; + } + + private boolean withFusionShopEntry_ ; + /** + * <code>bool withFusionShopEntry = 40;</code> + * @return The withFusionShopEntry. + */ + @java.lang.Override + public boolean getWithFusionShopEntry() { + return withFusionShopEntry_; + } + /** + * <code>bool withFusionShopEntry = 40;</code> + * @param value The withFusionShopEntry to set. + * @return This builder for chaining. + */ + public Builder setWithFusionShopEntry(boolean value) { + + withFusionShopEntry_ = value; + bitField1_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>bool withFusionShopEntry = 40;</code> + * @return This builder for chaining. + */ + public Builder clearWithFusionShopEntry() { + bitField1_ = (bitField1_ & ~0x00000080); + withFusionShopEntry_ = false; + onChanged(); + return this; + } + + private long totalRechargeDiamondCount_ ; + /** + * <code>int64 totalRechargeDiamondCount = 41;</code> + * @return The totalRechargeDiamondCount. + */ + @java.lang.Override + public long getTotalRechargeDiamondCount() { + return totalRechargeDiamondCount_; + } + /** + * <code>int64 totalRechargeDiamondCount = 41;</code> + * @param value The totalRechargeDiamondCount to set. + * @return This builder for chaining. + */ + public Builder setTotalRechargeDiamondCount(long value) { + + totalRechargeDiamondCount_ = value; + bitField1_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>int64 totalRechargeDiamondCount = 41;</code> + * @return This builder for chaining. + */ + public Builder clearTotalRechargeDiamondCount() { + bitField1_ = (bitField1_ & ~0x00000100); + totalRechargeDiamondCount_ = 0L; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel webcastAnchorLevel_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder> webcastAnchorLevelBuilder_; + /** + * <code>.User.AnchorLevel webcastAnchorLevel = 42;</code> + * @return Whether the webcastAnchorLevel field is set. + */ + public boolean hasWebcastAnchorLevel() { + return ((bitField1_ & 0x00000200) != 0); + } + /** + * <code>.User.AnchorLevel webcastAnchorLevel = 42;</code> + * @return The webcastAnchorLevel. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getWebcastAnchorLevel() { + if (webcastAnchorLevelBuilder_ == null) { + return webcastAnchorLevel_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance() : webcastAnchorLevel_; + } else { + return webcastAnchorLevelBuilder_.getMessage(); + } + } + /** + * <code>.User.AnchorLevel webcastAnchorLevel = 42;</code> + */ + public Builder setWebcastAnchorLevel(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel value) { + if (webcastAnchorLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webcastAnchorLevel_ = value; + } else { + webcastAnchorLevelBuilder_.setMessage(value); + } + bitField1_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>.User.AnchorLevel webcastAnchorLevel = 42;</code> + */ + public Builder setWebcastAnchorLevel( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder builderForValue) { + if (webcastAnchorLevelBuilder_ == null) { + webcastAnchorLevel_ = builderForValue.build(); + } else { + webcastAnchorLevelBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>.User.AnchorLevel webcastAnchorLevel = 42;</code> + */ + public Builder mergeWebcastAnchorLevel(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel value) { + if (webcastAnchorLevelBuilder_ == null) { + if (((bitField1_ & 0x00000200) != 0) && + webcastAnchorLevel_ != null && + webcastAnchorLevel_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance()) { + getWebcastAnchorLevelBuilder().mergeFrom(value); + } else { + webcastAnchorLevel_ = value; + } + } else { + webcastAnchorLevelBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>.User.AnchorLevel webcastAnchorLevel = 42;</code> + */ + public Builder clearWebcastAnchorLevel() { + bitField1_ = (bitField1_ & ~0x00000200); + webcastAnchorLevel_ = null; + if (webcastAnchorLevelBuilder_ != null) { + webcastAnchorLevelBuilder_.dispose(); + webcastAnchorLevelBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.AnchorLevel webcastAnchorLevel = 42;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder getWebcastAnchorLevelBuilder() { + bitField1_ |= 0x00000200; + onChanged(); + return getWebcastAnchorLevelFieldBuilder().getBuilder(); + } + /** + * <code>.User.AnchorLevel webcastAnchorLevel = 42;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder getWebcastAnchorLevelOrBuilder() { + if (webcastAnchorLevelBuilder_ != null) { + return webcastAnchorLevelBuilder_.getMessageOrBuilder(); + } else { + return webcastAnchorLevel_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance() : webcastAnchorLevel_; + } + } + /** + * <code>.User.AnchorLevel webcastAnchorLevel = 42;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder> + getWebcastAnchorLevelFieldBuilder() { + if (webcastAnchorLevelBuilder_ == null) { + webcastAnchorLevelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder>( + getWebcastAnchorLevel(), + getParentForChildren(), + isClean()); + webcastAnchorLevel_ = null; + } + return webcastAnchorLevelBuilder_; + } + + private java.lang.Object verifiedContent_ = ""; + /** + * <code>string verifiedContent = 43;</code> + * @return The verifiedContent. + */ + public java.lang.String getVerifiedContent() { + java.lang.Object ref = verifiedContent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verifiedContent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string verifiedContent = 43;</code> + * @return The bytes for verifiedContent. + */ + public com.google.protobuf.ByteString + getVerifiedContentBytes() { + java.lang.Object ref = verifiedContent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verifiedContent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string verifiedContent = 43;</code> + * @param value The verifiedContent to set. + * @return This builder for chaining. + */ + public Builder setVerifiedContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + verifiedContent_ = value; + bitField1_ |= 0x00000400; + onChanged(); + return this; + } + /** + * <code>string verifiedContent = 43;</code> + * @return This builder for chaining. + */ + public Builder clearVerifiedContent() { + verifiedContent_ = getDefaultInstance().getVerifiedContent(); + bitField1_ = (bitField1_ & ~0x00000400); + onChanged(); + return this; + } + /** + * <code>string verifiedContent = 43;</code> + * @param value The bytes for verifiedContent to set. + * @return This builder for chaining. + */ + public Builder setVerifiedContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + verifiedContent_ = value; + bitField1_ |= 0x00000400; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats authorStats_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStatsOrBuilder> authorStatsBuilder_; + /** + * <code>.User.AuthorStats authorStats = 44;</code> + * @return Whether the authorStats field is set. + */ + public boolean hasAuthorStats() { + return ((bitField1_ & 0x00000800) != 0); + } + /** + * <code>.User.AuthorStats authorStats = 44;</code> + * @return The authorStats. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats getAuthorStats() { + if (authorStatsBuilder_ == null) { + return authorStats_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.getDefaultInstance() : authorStats_; + } else { + return authorStatsBuilder_.getMessage(); + } + } + /** + * <code>.User.AuthorStats authorStats = 44;</code> + */ + public Builder setAuthorStats(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats value) { + if (authorStatsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authorStats_ = value; + } else { + authorStatsBuilder_.setMessage(value); + } + bitField1_ |= 0x00000800; + onChanged(); + return this; + } + /** + * <code>.User.AuthorStats authorStats = 44;</code> + */ + public Builder setAuthorStats( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.Builder builderForValue) { + if (authorStatsBuilder_ == null) { + authorStats_ = builderForValue.build(); + } else { + authorStatsBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00000800; + onChanged(); + return this; + } + /** + * <code>.User.AuthorStats authorStats = 44;</code> + */ + public Builder mergeAuthorStats(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats value) { + if (authorStatsBuilder_ == null) { + if (((bitField1_ & 0x00000800) != 0) && + authorStats_ != null && + authorStats_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.getDefaultInstance()) { + getAuthorStatsBuilder().mergeFrom(value); + } else { + authorStats_ = value; + } + } else { + authorStatsBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00000800; + onChanged(); + return this; + } + /** + * <code>.User.AuthorStats authorStats = 44;</code> + */ + public Builder clearAuthorStats() { + bitField1_ = (bitField1_ & ~0x00000800); + authorStats_ = null; + if (authorStatsBuilder_ != null) { + authorStatsBuilder_.dispose(); + authorStatsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.AuthorStats authorStats = 44;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.Builder getAuthorStatsBuilder() { + bitField1_ |= 0x00000800; + onChanged(); + return getAuthorStatsFieldBuilder().getBuilder(); + } + /** + * <code>.User.AuthorStats authorStats = 44;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStatsOrBuilder getAuthorStatsOrBuilder() { + if (authorStatsBuilder_ != null) { + return authorStatsBuilder_.getMessageOrBuilder(); + } else { + return authorStats_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.getDefaultInstance() : authorStats_; + } + } + /** + * <code>.User.AuthorStats authorStats = 44;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStatsOrBuilder> + getAuthorStatsFieldBuilder() { + if (authorStatsBuilder_ == null) { + authorStatsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStats.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthorStatsOrBuilder>( + getAuthorStats(), + getParentForChildren(), + isClean()); + authorStats_ = null; + } + return authorStatsBuilder_; + } + + private java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User> topFansList_ = + java.util.Collections.emptyList(); + private void ensureTopFansListIsMutable() { + if (!((bitField1_ & 0x00001000) != 0)) { + topFansList_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User>(topFansList_); + bitField1_ |= 0x00001000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> topFansListBuilder_; + + /** + * <code>repeated .User topFansList = 45;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User> getTopFansListList() { + if (topFansListBuilder_ == null) { + return java.util.Collections.unmodifiableList(topFansList_); + } else { + return topFansListBuilder_.getMessageList(); + } + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public int getTopFansListCount() { + if (topFansListBuilder_ == null) { + return topFansList_.size(); + } else { + return topFansListBuilder_.getCount(); + } + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getTopFansList(int index) { + if (topFansListBuilder_ == null) { + return topFansList_.get(index); + } else { + return topFansListBuilder_.getMessage(index); + } + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public Builder setTopFansList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (topFansListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopFansListIsMutable(); + topFansList_.set(index, value); + onChanged(); + } else { + topFansListBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public Builder setTopFansList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (topFansListBuilder_ == null) { + ensureTopFansListIsMutable(); + topFansList_.set(index, builderForValue.build()); + onChanged(); + } else { + topFansListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public Builder addTopFansList(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (topFansListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopFansListIsMutable(); + topFansList_.add(value); + onChanged(); + } else { + topFansListBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public Builder addTopFansList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User value) { + if (topFansListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTopFansListIsMutable(); + topFansList_.add(index, value); + onChanged(); + } else { + topFansListBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public Builder addTopFansList( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (topFansListBuilder_ == null) { + ensureTopFansListIsMutable(); + topFansList_.add(builderForValue.build()); + onChanged(); + } else { + topFansListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public Builder addTopFansList( + int index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder builderForValue) { + if (topFansListBuilder_ == null) { + ensureTopFansListIsMutable(); + topFansList_.add(index, builderForValue.build()); + onChanged(); + } else { + topFansListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public Builder addAllTopFansList( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User> values) { + if (topFansListBuilder_ == null) { + ensureTopFansListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, topFansList_); + onChanged(); + } else { + topFansListBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public Builder clearTopFansList() { + if (topFansListBuilder_ == null) { + topFansList_ = java.util.Collections.emptyList(); + bitField1_ = (bitField1_ & ~0x00001000); + onChanged(); + } else { + topFansListBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public Builder removeTopFansList(int index) { + if (topFansListBuilder_ == null) { + ensureTopFansListIsMutable(); + topFansList_.remove(index); + onChanged(); + } else { + topFansListBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder getTopFansListBuilder( + int index) { + return getTopFansListFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder getTopFansListOrBuilder( + int index) { + if (topFansListBuilder_ == null) { + return topFansList_.get(index); } else { + return topFansListBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getTopFansListOrBuilderList() { + if (topFansListBuilder_ != null) { + return topFansListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(topFansList_); + } + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder addTopFansListBuilder() { + return getTopFansListFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()); + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder addTopFansListBuilder( + int index) { + return getTopFansListFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.getDefaultInstance()); + } + /** + * <code>repeated .User topFansList = 45;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder> + getTopFansListBuilderList() { + return getTopFansListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder> + getTopFansListFieldBuilder() { + if (topFansListBuilder_ == null) { + topFansListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.UserOrBuilder>( + topFansList_, + ((bitField1_ & 0x00001000) != 0), + getParentForChildren(), + isClean()); + topFansList_ = null; + } + return topFansListBuilder_; + } + + private java.lang.Object secUid_ = ""; + /** + * <code>string secUid = 46;</code> + * @return The secUid. + */ + public java.lang.String getSecUid() { + java.lang.Object ref = secUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string secUid = 46;</code> + * @return The bytes for secUid. + */ + public com.google.protobuf.ByteString + getSecUidBytes() { + java.lang.Object ref = secUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + secUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string secUid = 46;</code> + * @param value The secUid to set. + * @return This builder for chaining. + */ + public Builder setSecUid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + secUid_ = value; + bitField1_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>string secUid = 46;</code> + * @return This builder for chaining. + */ + public Builder clearSecUid() { + secUid_ = getDefaultInstance().getSecUid(); + bitField1_ = (bitField1_ & ~0x00002000); + onChanged(); + return this; + } + /** + * <code>string secUid = 46;</code> + * @param value The bytes for secUid to set. + * @return This builder for chaining. + */ + public Builder setSecUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + secUid_ = value; + bitField1_ |= 0x00002000; + onChanged(); + return this; + } + + private int userRole_ ; + /** + * <code>int32 userRole = 47;</code> + * @return The userRole. + */ + @java.lang.Override + public int getUserRole() { + return userRole_; + } + /** + * <code>int32 userRole = 47;</code> + * @param value The userRole to set. + * @return This builder for chaining. + */ + public Builder setUserRole(int value) { + + userRole_ = value; + bitField1_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <code>int32 userRole = 47;</code> + * @return This builder for chaining. + */ + public Builder clearUserRole() { + bitField1_ = (bitField1_ & ~0x00004000); + userRole_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams xiguaInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParamsOrBuilder> xiguaInfoBuilder_; + /** + * <code>.User.XiguaParams xiguaInfo = 48;</code> + * @return Whether the xiguaInfo field is set. + */ + public boolean hasXiguaInfo() { + return ((bitField1_ & 0x00008000) != 0); + } + /** + * <code>.User.XiguaParams xiguaInfo = 48;</code> + * @return The xiguaInfo. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams getXiguaInfo() { + if (xiguaInfoBuilder_ == null) { + return xiguaInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.getDefaultInstance() : xiguaInfo_; + } else { + return xiguaInfoBuilder_.getMessage(); + } + } + /** + * <code>.User.XiguaParams xiguaInfo = 48;</code> + */ + public Builder setXiguaInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams value) { + if (xiguaInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + xiguaInfo_ = value; + } else { + xiguaInfoBuilder_.setMessage(value); + } + bitField1_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>.User.XiguaParams xiguaInfo = 48;</code> + */ + public Builder setXiguaInfo( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.Builder builderForValue) { + if (xiguaInfoBuilder_ == null) { + xiguaInfo_ = builderForValue.build(); + } else { + xiguaInfoBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>.User.XiguaParams xiguaInfo = 48;</code> + */ + public Builder mergeXiguaInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams value) { + if (xiguaInfoBuilder_ == null) { + if (((bitField1_ & 0x00008000) != 0) && + xiguaInfo_ != null && + xiguaInfo_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.getDefaultInstance()) { + getXiguaInfoBuilder().mergeFrom(value); + } else { + xiguaInfo_ = value; + } + } else { + xiguaInfoBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>.User.XiguaParams xiguaInfo = 48;</code> + */ + public Builder clearXiguaInfo() { + bitField1_ = (bitField1_ & ~0x00008000); + xiguaInfo_ = null; + if (xiguaInfoBuilder_ != null) { + xiguaInfoBuilder_.dispose(); + xiguaInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.XiguaParams xiguaInfo = 48;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.Builder getXiguaInfoBuilder() { + bitField1_ |= 0x00008000; + onChanged(); + return getXiguaInfoFieldBuilder().getBuilder(); + } + /** + * <code>.User.XiguaParams xiguaInfo = 48;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParamsOrBuilder getXiguaInfoOrBuilder() { + if (xiguaInfoBuilder_ != null) { + return xiguaInfoBuilder_.getMessageOrBuilder(); + } else { + return xiguaInfo_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.getDefaultInstance() : xiguaInfo_; + } + } + /** + * <code>.User.XiguaParams xiguaInfo = 48;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParamsOrBuilder> + getXiguaInfoFieldBuilder() { + if (xiguaInfoBuilder_ == null) { + xiguaInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParams.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.XiguaParamsOrBuilder>( + getXiguaInfo(), + getParentForChildren(), + isClean()); + xiguaInfo_ = null; + } + return xiguaInfoBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo activityReward_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfoOrBuilder> activityRewardBuilder_; + /** + * <code>.User.ActivityInfo activityReward = 49;</code> + * @return Whether the activityReward field is set. + */ + public boolean hasActivityReward() { + return ((bitField1_ & 0x00010000) != 0); + } + /** + * <code>.User.ActivityInfo activityReward = 49;</code> + * @return The activityReward. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo getActivityReward() { + if (activityRewardBuilder_ == null) { + return activityReward_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.getDefaultInstance() : activityReward_; + } else { + return activityRewardBuilder_.getMessage(); + } + } + /** + * <code>.User.ActivityInfo activityReward = 49;</code> + */ + public Builder setActivityReward(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo value) { + if (activityRewardBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + activityReward_ = value; + } else { + activityRewardBuilder_.setMessage(value); + } + bitField1_ |= 0x00010000; + onChanged(); + return this; + } + /** + * <code>.User.ActivityInfo activityReward = 49;</code> + */ + public Builder setActivityReward( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.Builder builderForValue) { + if (activityRewardBuilder_ == null) { + activityReward_ = builderForValue.build(); + } else { + activityRewardBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00010000; + onChanged(); + return this; + } + /** + * <code>.User.ActivityInfo activityReward = 49;</code> + */ + public Builder mergeActivityReward(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo value) { + if (activityRewardBuilder_ == null) { + if (((bitField1_ & 0x00010000) != 0) && + activityReward_ != null && + activityReward_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.getDefaultInstance()) { + getActivityRewardBuilder().mergeFrom(value); + } else { + activityReward_ = value; + } + } else { + activityRewardBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00010000; + onChanged(); + return this; + } + /** + * <code>.User.ActivityInfo activityReward = 49;</code> + */ + public Builder clearActivityReward() { + bitField1_ = (bitField1_ & ~0x00010000); + activityReward_ = null; + if (activityRewardBuilder_ != null) { + activityRewardBuilder_.dispose(); + activityRewardBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.ActivityInfo activityReward = 49;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.Builder getActivityRewardBuilder() { + bitField1_ |= 0x00010000; + onChanged(); + return getActivityRewardFieldBuilder().getBuilder(); + } + /** + * <code>.User.ActivityInfo activityReward = 49;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfoOrBuilder getActivityRewardOrBuilder() { + if (activityRewardBuilder_ != null) { + return activityRewardBuilder_.getMessageOrBuilder(); + } else { + return activityReward_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.getDefaultInstance() : activityReward_; + } + } + /** + * <code>.User.ActivityInfo activityReward = 49;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfoOrBuilder> + getActivityRewardFieldBuilder() { + if (activityRewardBuilder_ == null) { + activityRewardBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ActivityInfoOrBuilder>( + getActivityReward(), + getParentForChildren(), + isClean()); + activityReward_ = null; + } + return activityRewardBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo nobleInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfoOrBuilder> nobleInfoBuilder_; + /** + * <code>.User.NobleLevelInfo nobleInfo = 50;</code> + * @return Whether the nobleInfo field is set. + */ + public boolean hasNobleInfo() { + return ((bitField1_ & 0x00020000) != 0); + } + /** + * <code>.User.NobleLevelInfo nobleInfo = 50;</code> + * @return The nobleInfo. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo getNobleInfo() { + if (nobleInfoBuilder_ == null) { + return nobleInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.getDefaultInstance() : nobleInfo_; + } else { + return nobleInfoBuilder_.getMessage(); + } + } + /** + * <code>.User.NobleLevelInfo nobleInfo = 50;</code> + */ + public Builder setNobleInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo value) { + if (nobleInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nobleInfo_ = value; + } else { + nobleInfoBuilder_.setMessage(value); + } + bitField1_ |= 0x00020000; + onChanged(); + return this; + } + /** + * <code>.User.NobleLevelInfo nobleInfo = 50;</code> + */ + public Builder setNobleInfo( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.Builder builderForValue) { + if (nobleInfoBuilder_ == null) { + nobleInfo_ = builderForValue.build(); + } else { + nobleInfoBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00020000; + onChanged(); + return this; + } + /** + * <code>.User.NobleLevelInfo nobleInfo = 50;</code> + */ + public Builder mergeNobleInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo value) { + if (nobleInfoBuilder_ == null) { + if (((bitField1_ & 0x00020000) != 0) && + nobleInfo_ != null && + nobleInfo_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.getDefaultInstance()) { + getNobleInfoBuilder().mergeFrom(value); + } else { + nobleInfo_ = value; + } + } else { + nobleInfoBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00020000; + onChanged(); + return this; + } + /** + * <code>.User.NobleLevelInfo nobleInfo = 50;</code> + */ + public Builder clearNobleInfo() { + bitField1_ = (bitField1_ & ~0x00020000); + nobleInfo_ = null; + if (nobleInfoBuilder_ != null) { + nobleInfoBuilder_.dispose(); + nobleInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.NobleLevelInfo nobleInfo = 50;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.Builder getNobleInfoBuilder() { + bitField1_ |= 0x00020000; + onChanged(); + return getNobleInfoFieldBuilder().getBuilder(); + } + /** + * <code>.User.NobleLevelInfo nobleInfo = 50;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfoOrBuilder getNobleInfoOrBuilder() { + if (nobleInfoBuilder_ != null) { + return nobleInfoBuilder_.getMessageOrBuilder(); + } else { + return nobleInfo_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.getDefaultInstance() : nobleInfo_; + } + } + /** + * <code>.User.NobleLevelInfo nobleInfo = 50;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfoOrBuilder> + getNobleInfoFieldBuilder() { + if (nobleInfoBuilder_ == null) { + nobleInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.NobleLevelInfoOrBuilder>( + getNobleInfo(), + getParentForChildren(), + isClean()); + nobleInfo_ = null; + } + return nobleInfoBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo brotherhoodInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfoOrBuilder> brotherhoodInfoBuilder_; + /** + * <code>.User.BrotherhoodInfo brotherhoodInfo = 51;</code> + * @return Whether the brotherhoodInfo field is set. + */ + public boolean hasBrotherhoodInfo() { + return ((bitField1_ & 0x00040000) != 0); + } + /** + * <code>.User.BrotherhoodInfo brotherhoodInfo = 51;</code> + * @return The brotherhoodInfo. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo getBrotherhoodInfo() { + if (brotherhoodInfoBuilder_ == null) { + return brotherhoodInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.getDefaultInstance() : brotherhoodInfo_; + } else { + return brotherhoodInfoBuilder_.getMessage(); + } + } + /** + * <code>.User.BrotherhoodInfo brotherhoodInfo = 51;</code> + */ + public Builder setBrotherhoodInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo value) { + if (brotherhoodInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + brotherhoodInfo_ = value; + } else { + brotherhoodInfoBuilder_.setMessage(value); + } + bitField1_ |= 0x00040000; + onChanged(); + return this; + } + /** + * <code>.User.BrotherhoodInfo brotherhoodInfo = 51;</code> + */ + public Builder setBrotherhoodInfo( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.Builder builderForValue) { + if (brotherhoodInfoBuilder_ == null) { + brotherhoodInfo_ = builderForValue.build(); + } else { + brotherhoodInfoBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00040000; + onChanged(); + return this; + } + /** + * <code>.User.BrotherhoodInfo brotherhoodInfo = 51;</code> + */ + public Builder mergeBrotherhoodInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo value) { + if (brotherhoodInfoBuilder_ == null) { + if (((bitField1_ & 0x00040000) != 0) && + brotherhoodInfo_ != null && + brotherhoodInfo_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.getDefaultInstance()) { + getBrotherhoodInfoBuilder().mergeFrom(value); + } else { + brotherhoodInfo_ = value; + } + } else { + brotherhoodInfoBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00040000; + onChanged(); + return this; + } + /** + * <code>.User.BrotherhoodInfo brotherhoodInfo = 51;</code> + */ + public Builder clearBrotherhoodInfo() { + bitField1_ = (bitField1_ & ~0x00040000); + brotherhoodInfo_ = null; + if (brotherhoodInfoBuilder_ != null) { + brotherhoodInfoBuilder_.dispose(); + brotherhoodInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.BrotherhoodInfo brotherhoodInfo = 51;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.Builder getBrotherhoodInfoBuilder() { + bitField1_ |= 0x00040000; + onChanged(); + return getBrotherhoodInfoFieldBuilder().getBuilder(); + } + /** + * <code>.User.BrotherhoodInfo brotherhoodInfo = 51;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfoOrBuilder getBrotherhoodInfoOrBuilder() { + if (brotherhoodInfoBuilder_ != null) { + return brotherhoodInfoBuilder_.getMessageOrBuilder(); + } else { + return brotherhoodInfo_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.getDefaultInstance() : brotherhoodInfo_; + } + } + /** + * <code>.User.BrotherhoodInfo brotherhoodInfo = 51;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfoOrBuilder> + getBrotherhoodInfoFieldBuilder() { + if (brotherhoodInfoBuilder_ == null) { + brotherhoodInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.BrotherhoodInfoOrBuilder>( + getBrotherhoodInfo(), + getParentForChildren(), + isClean()); + brotherhoodInfo_ = null; + } + return brotherhoodInfoBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image personalCard_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> personalCardBuilder_; + /** + * <code>.Image personalCard = 52;</code> + * @return Whether the personalCard field is set. + */ + public boolean hasPersonalCard() { + return ((bitField1_ & 0x00080000) != 0); + } + /** + * <code>.Image personalCard = 52;</code> + * @return The personalCard. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getPersonalCard() { + if (personalCardBuilder_ == null) { + return personalCard_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : personalCard_; + } else { + return personalCardBuilder_.getMessage(); + } + } + /** + * <code>.Image personalCard = 52;</code> + */ + public Builder setPersonalCard(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (personalCardBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + personalCard_ = value; + } else { + personalCardBuilder_.setMessage(value); + } + bitField1_ |= 0x00080000; + onChanged(); + return this; + } + /** + * <code>.Image personalCard = 52;</code> + */ + public Builder setPersonalCard( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (personalCardBuilder_ == null) { + personalCard_ = builderForValue.build(); + } else { + personalCardBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00080000; + onChanged(); + return this; + } + /** + * <code>.Image personalCard = 52;</code> + */ + public Builder mergePersonalCard(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (personalCardBuilder_ == null) { + if (((bitField1_ & 0x00080000) != 0) && + personalCard_ != null && + personalCard_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getPersonalCardBuilder().mergeFrom(value); + } else { + personalCard_ = value; + } + } else { + personalCardBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00080000; + onChanged(); + return this; + } + /** + * <code>.Image personalCard = 52;</code> + */ + public Builder clearPersonalCard() { + bitField1_ = (bitField1_ & ~0x00080000); + personalCard_ = null; + if (personalCardBuilder_ != null) { + personalCardBuilder_.dispose(); + personalCardBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image personalCard = 52;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getPersonalCardBuilder() { + bitField1_ |= 0x00080000; + onChanged(); + return getPersonalCardFieldBuilder().getBuilder(); + } + /** + * <code>.Image personalCard = 52;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getPersonalCardOrBuilder() { + if (personalCardBuilder_ != null) { + return personalCardBuilder_.getMessageOrBuilder(); + } else { + return personalCard_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : personalCard_; + } + } + /** + * <code>.Image personalCard = 52;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getPersonalCardFieldBuilder() { + if (personalCardBuilder_ == null) { + personalCardBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getPersonalCard(), + getParentForChildren(), + isClean()); + personalCard_ = null; + } + return personalCardBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo authenticationInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfoOrBuilder> authenticationInfoBuilder_; + /** + * <code>.User.AuthenticationInfo authenticationInfo = 53;</code> + * @return Whether the authenticationInfo field is set. + */ + public boolean hasAuthenticationInfo() { + return ((bitField1_ & 0x00100000) != 0); + } + /** + * <code>.User.AuthenticationInfo authenticationInfo = 53;</code> + * @return The authenticationInfo. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo getAuthenticationInfo() { + if (authenticationInfoBuilder_ == null) { + return authenticationInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.getDefaultInstance() : authenticationInfo_; + } else { + return authenticationInfoBuilder_.getMessage(); + } + } + /** + * <code>.User.AuthenticationInfo authenticationInfo = 53;</code> + */ + public Builder setAuthenticationInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo value) { + if (authenticationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + authenticationInfo_ = value; + } else { + authenticationInfoBuilder_.setMessage(value); + } + bitField1_ |= 0x00100000; + onChanged(); + return this; + } + /** + * <code>.User.AuthenticationInfo authenticationInfo = 53;</code> + */ + public Builder setAuthenticationInfo( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.Builder builderForValue) { + if (authenticationInfoBuilder_ == null) { + authenticationInfo_ = builderForValue.build(); + } else { + authenticationInfoBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00100000; + onChanged(); + return this; + } + /** + * <code>.User.AuthenticationInfo authenticationInfo = 53;</code> + */ + public Builder mergeAuthenticationInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo value) { + if (authenticationInfoBuilder_ == null) { + if (((bitField1_ & 0x00100000) != 0) && + authenticationInfo_ != null && + authenticationInfo_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.getDefaultInstance()) { + getAuthenticationInfoBuilder().mergeFrom(value); + } else { + authenticationInfo_ = value; + } + } else { + authenticationInfoBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00100000; + onChanged(); + return this; + } + /** + * <code>.User.AuthenticationInfo authenticationInfo = 53;</code> + */ + public Builder clearAuthenticationInfo() { + bitField1_ = (bitField1_ & ~0x00100000); + authenticationInfo_ = null; + if (authenticationInfoBuilder_ != null) { + authenticationInfoBuilder_.dispose(); + authenticationInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.AuthenticationInfo authenticationInfo = 53;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.Builder getAuthenticationInfoBuilder() { + bitField1_ |= 0x00100000; + onChanged(); + return getAuthenticationInfoFieldBuilder().getBuilder(); + } + /** + * <code>.User.AuthenticationInfo authenticationInfo = 53;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfoOrBuilder getAuthenticationInfoOrBuilder() { + if (authenticationInfoBuilder_ != null) { + return authenticationInfoBuilder_.getMessageOrBuilder(); + } else { + return authenticationInfo_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.getDefaultInstance() : authenticationInfo_; + } + } + /** + * <code>.User.AuthenticationInfo authenticationInfo = 53;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfoOrBuilder> + getAuthenticationInfoFieldBuilder() { + if (authenticationInfoBuilder_ == null) { + authenticationInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AuthenticationInfoOrBuilder>( + getAuthenticationInfo(), + getParentForChildren(), + isClean()); + authenticationInfo_ = null; + } + return authenticationInfoBuilder_; + } + + private int authorizationInfo_ ; + /** + * <code>int32 authorizationInfo = 54;</code> + * @return The authorizationInfo. + */ + @java.lang.Override + public int getAuthorizationInfo() { + return authorizationInfo_; + } + /** + * <code>int32 authorizationInfo = 54;</code> + * @param value The authorizationInfo to set. + * @return This builder for chaining. + */ + public Builder setAuthorizationInfo(int value) { + + authorizationInfo_ = value; + bitField1_ |= 0x00200000; + onChanged(); + return this; + } + /** + * <code>int32 authorizationInfo = 54;</code> + * @return This builder for chaining. + */ + public Builder clearAuthorizationInfo() { + bitField1_ = (bitField1_ & ~0x00200000); + authorizationInfo_ = 0; + onChanged(); + return this; + } + + private int adversaryAuthorizationInfo_ ; + /** + * <code>int32 adversaryAuthorizationInfo = 55;</code> + * @return The adversaryAuthorizationInfo. + */ + @java.lang.Override + public int getAdversaryAuthorizationInfo() { + return adversaryAuthorizationInfo_; + } + /** + * <code>int32 adversaryAuthorizationInfo = 55;</code> + * @param value The adversaryAuthorizationInfo to set. + * @return This builder for chaining. + */ + public Builder setAdversaryAuthorizationInfo(int value) { + + adversaryAuthorizationInfo_ = value; + bitField1_ |= 0x00400000; + onChanged(); + return this; + } + /** + * <code>int32 adversaryAuthorizationInfo = 55;</code> + * @return This builder for chaining. + */ + public Builder clearAdversaryAuthorizationInfo() { + bitField1_ = (bitField1_ & ~0x00400000); + adversaryAuthorizationInfo_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo poiInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfoOrBuilder> poiInfoBuilder_; + /** + * <code>.User.PoiInfo poiInfo = 56;</code> + * @return Whether the poiInfo field is set. + */ + public boolean hasPoiInfo() { + return ((bitField1_ & 0x00800000) != 0); + } + /** + * <code>.User.PoiInfo poiInfo = 56;</code> + * @return The poiInfo. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo getPoiInfo() { + if (poiInfoBuilder_ == null) { + return poiInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.getDefaultInstance() : poiInfo_; + } else { + return poiInfoBuilder_.getMessage(); + } + } + /** + * <code>.User.PoiInfo poiInfo = 56;</code> + */ + public Builder setPoiInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo value) { + if (poiInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + poiInfo_ = value; + } else { + poiInfoBuilder_.setMessage(value); + } + bitField1_ |= 0x00800000; + onChanged(); + return this; + } + /** + * <code>.User.PoiInfo poiInfo = 56;</code> + */ + public Builder setPoiInfo( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.Builder builderForValue) { + if (poiInfoBuilder_ == null) { + poiInfo_ = builderForValue.build(); + } else { + poiInfoBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x00800000; + onChanged(); + return this; + } + /** + * <code>.User.PoiInfo poiInfo = 56;</code> + */ + public Builder mergePoiInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo value) { + if (poiInfoBuilder_ == null) { + if (((bitField1_ & 0x00800000) != 0) && + poiInfo_ != null && + poiInfo_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.getDefaultInstance()) { + getPoiInfoBuilder().mergeFrom(value); + } else { + poiInfo_ = value; + } + } else { + poiInfoBuilder_.mergeFrom(value); + } + bitField1_ |= 0x00800000; + onChanged(); + return this; + } + /** + * <code>.User.PoiInfo poiInfo = 56;</code> + */ + public Builder clearPoiInfo() { + bitField1_ = (bitField1_ & ~0x00800000); + poiInfo_ = null; + if (poiInfoBuilder_ != null) { + poiInfoBuilder_.dispose(); + poiInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.PoiInfo poiInfo = 56;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.Builder getPoiInfoBuilder() { + bitField1_ |= 0x00800000; + onChanged(); + return getPoiInfoFieldBuilder().getBuilder(); + } + /** + * <code>.User.PoiInfo poiInfo = 56;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfoOrBuilder getPoiInfoOrBuilder() { + if (poiInfoBuilder_ != null) { + return poiInfoBuilder_.getMessageOrBuilder(); + } else { + return poiInfo_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.getDefaultInstance() : poiInfo_; + } + } + /** + * <code>.User.PoiInfo poiInfo = 56;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfoOrBuilder> + getPoiInfoFieldBuilder() { + if (poiInfoBuilder_ == null) { + poiInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.PoiInfoOrBuilder>( + getPoiInfo(), + getParentForChildren(), + isClean()); + poiInfo_ = null; + } + return poiInfoBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image mediaBadgeImageListList_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> mediaBadgeImageListListBuilder_; + /** + * <code>.Image mediaBadgeImageListList = 57;</code> + * @return Whether the mediaBadgeImageListList field is set. + */ + public boolean hasMediaBadgeImageListList() { + return ((bitField1_ & 0x01000000) != 0); + } + /** + * <code>.Image mediaBadgeImageListList = 57;</code> + * @return The mediaBadgeImageListList. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getMediaBadgeImageListList() { + if (mediaBadgeImageListListBuilder_ == null) { + return mediaBadgeImageListList_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : mediaBadgeImageListList_; + } else { + return mediaBadgeImageListListBuilder_.getMessage(); + } + } + /** + * <code>.Image mediaBadgeImageListList = 57;</code> + */ + public Builder setMediaBadgeImageListList(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (mediaBadgeImageListListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mediaBadgeImageListList_ = value; + } else { + mediaBadgeImageListListBuilder_.setMessage(value); + } + bitField1_ |= 0x01000000; + onChanged(); + return this; + } + /** + * <code>.Image mediaBadgeImageListList = 57;</code> + */ + public Builder setMediaBadgeImageListList( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (mediaBadgeImageListListBuilder_ == null) { + mediaBadgeImageListList_ = builderForValue.build(); + } else { + mediaBadgeImageListListBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x01000000; + onChanged(); + return this; + } + /** + * <code>.Image mediaBadgeImageListList = 57;</code> + */ + public Builder mergeMediaBadgeImageListList(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (mediaBadgeImageListListBuilder_ == null) { + if (((bitField1_ & 0x01000000) != 0) && + mediaBadgeImageListList_ != null && + mediaBadgeImageListList_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getMediaBadgeImageListListBuilder().mergeFrom(value); + } else { + mediaBadgeImageListList_ = value; + } + } else { + mediaBadgeImageListListBuilder_.mergeFrom(value); + } + bitField1_ |= 0x01000000; + onChanged(); + return this; + } + /** + * <code>.Image mediaBadgeImageListList = 57;</code> + */ + public Builder clearMediaBadgeImageListList() { + bitField1_ = (bitField1_ & ~0x01000000); + mediaBadgeImageListList_ = null; + if (mediaBadgeImageListListBuilder_ != null) { + mediaBadgeImageListListBuilder_.dispose(); + mediaBadgeImageListListBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image mediaBadgeImageListList = 57;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getMediaBadgeImageListListBuilder() { + bitField1_ |= 0x01000000; + onChanged(); + return getMediaBadgeImageListListFieldBuilder().getBuilder(); + } + /** + * <code>.Image mediaBadgeImageListList = 57;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getMediaBadgeImageListListOrBuilder() { + if (mediaBadgeImageListListBuilder_ != null) { + return mediaBadgeImageListListBuilder_.getMessageOrBuilder(); + } else { + return mediaBadgeImageListList_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : mediaBadgeImageListList_; + } + } + /** + * <code>.Image mediaBadgeImageListList = 57;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getMediaBadgeImageListListFieldBuilder() { + if (mediaBadgeImageListListBuilder_ == null) { + mediaBadgeImageListListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getMediaBadgeImageListList(), + getParentForChildren(), + isClean()); + mediaBadgeImageListList_ = null; + } + return mediaBadgeImageListListBuilder_; + } + + private int adversaryUserStatus_ ; + /** + * <code>int32 adversaryUserStatus = 58;</code> + * @return The adversaryUserStatus. + */ + @java.lang.Override + public int getAdversaryUserStatus() { + return adversaryUserStatus_; + } + /** + * <code>int32 adversaryUserStatus = 58;</code> + * @param value The adversaryUserStatus to set. + * @return This builder for chaining. + */ + public Builder setAdversaryUserStatus(int value) { + + adversaryUserStatus_ = value; + bitField1_ |= 0x02000000; + onChanged(); + return this; + } + /** + * <code>int32 adversaryUserStatus = 58;</code> + * @return This builder for chaining. + */ + public Builder clearAdversaryUserStatus() { + bitField1_ = (bitField1_ & ~0x02000000); + adversaryUserStatus_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo userVipInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfoOrBuilder> userVipInfoBuilder_; + /** + * <code>.User.UserVIPInfo userVipInfo = 59;</code> + * @return Whether the userVipInfo field is set. + */ + public boolean hasUserVipInfo() { + return ((bitField1_ & 0x04000000) != 0); + } + /** + * <code>.User.UserVIPInfo userVipInfo = 59;</code> + * @return The userVipInfo. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo getUserVipInfo() { + if (userVipInfoBuilder_ == null) { + return userVipInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.getDefaultInstance() : userVipInfo_; + } else { + return userVipInfoBuilder_.getMessage(); + } + } + /** + * <code>.User.UserVIPInfo userVipInfo = 59;</code> + */ + public Builder setUserVipInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo value) { + if (userVipInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userVipInfo_ = value; + } else { + userVipInfoBuilder_.setMessage(value); + } + bitField1_ |= 0x04000000; + onChanged(); + return this; + } + /** + * <code>.User.UserVIPInfo userVipInfo = 59;</code> + */ + public Builder setUserVipInfo( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.Builder builderForValue) { + if (userVipInfoBuilder_ == null) { + userVipInfo_ = builderForValue.build(); + } else { + userVipInfoBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x04000000; + onChanged(); + return this; + } + /** + * <code>.User.UserVIPInfo userVipInfo = 59;</code> + */ + public Builder mergeUserVipInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo value) { + if (userVipInfoBuilder_ == null) { + if (((bitField1_ & 0x04000000) != 0) && + userVipInfo_ != null && + userVipInfo_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.getDefaultInstance()) { + getUserVipInfoBuilder().mergeFrom(value); + } else { + userVipInfo_ = value; + } + } else { + userVipInfoBuilder_.mergeFrom(value); + } + bitField1_ |= 0x04000000; + onChanged(); + return this; + } + /** + * <code>.User.UserVIPInfo userVipInfo = 59;</code> + */ + public Builder clearUserVipInfo() { + bitField1_ = (bitField1_ & ~0x04000000); + userVipInfo_ = null; + if (userVipInfoBuilder_ != null) { + userVipInfoBuilder_.dispose(); + userVipInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.UserVIPInfo userVipInfo = 59;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.Builder getUserVipInfoBuilder() { + bitField1_ |= 0x04000000; + onChanged(); + return getUserVipInfoFieldBuilder().getBuilder(); + } + /** + * <code>.User.UserVIPInfo userVipInfo = 59;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfoOrBuilder getUserVipInfoOrBuilder() { + if (userVipInfoBuilder_ != null) { + return userVipInfoBuilder_.getMessageOrBuilder(); + } else { + return userVipInfo_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.getDefaultInstance() : userVipInfo_; + } + } + /** + * <code>.User.UserVIPInfo userVipInfo = 59;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfoOrBuilder> + getUserVipInfoFieldBuilder() { + if (userVipInfoBuilder_ == null) { + userVipInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserVIPInfoOrBuilder>( + getUserVipInfo(), + getParentForChildren(), + isClean()); + userVipInfo_ = null; + } + return userVipInfoBuilder_; + } + + private com.google.protobuf.Internal.LongList commerceWebcastConfigIdsList_ = emptyLongList(); + private void ensureCommerceWebcastConfigIdsListIsMutable() { + if (!((bitField1_ & 0x08000000) != 0)) { + commerceWebcastConfigIdsList_ = mutableCopy(commerceWebcastConfigIdsList_); + bitField1_ |= 0x08000000; + } + } + /** + * <code>repeated int64 commerceWebcastConfigIdsList = 60;</code> + * @return A list containing the commerceWebcastConfigIdsList. + */ + public java.util.List<java.lang.Long> + getCommerceWebcastConfigIdsListList() { + return ((bitField1_ & 0x08000000) != 0) ? + java.util.Collections.unmodifiableList(commerceWebcastConfigIdsList_) : commerceWebcastConfigIdsList_; + } + /** + * <code>repeated int64 commerceWebcastConfigIdsList = 60;</code> + * @return The count of commerceWebcastConfigIdsList. + */ + public int getCommerceWebcastConfigIdsListCount() { + return commerceWebcastConfigIdsList_.size(); + } + /** + * <code>repeated int64 commerceWebcastConfigIdsList = 60;</code> + * @param index The index of the element to return. + * @return The commerceWebcastConfigIdsList at the given index. + */ + public long getCommerceWebcastConfigIdsList(int index) { + return commerceWebcastConfigIdsList_.getLong(index); + } + /** + * <code>repeated int64 commerceWebcastConfigIdsList = 60;</code> + * @param index The index to set the value at. + * @param value The commerceWebcastConfigIdsList to set. + * @return This builder for chaining. + */ + public Builder setCommerceWebcastConfigIdsList( + int index, long value) { + + ensureCommerceWebcastConfigIdsListIsMutable(); + commerceWebcastConfigIdsList_.setLong(index, value); + onChanged(); + return this; + } + /** + * <code>repeated int64 commerceWebcastConfigIdsList = 60;</code> + * @param value The commerceWebcastConfigIdsList to add. + * @return This builder for chaining. + */ + public Builder addCommerceWebcastConfigIdsList(long value) { + + ensureCommerceWebcastConfigIdsListIsMutable(); + commerceWebcastConfigIdsList_.addLong(value); + onChanged(); + return this; + } + /** + * <code>repeated int64 commerceWebcastConfigIdsList = 60;</code> + * @param values The commerceWebcastConfigIdsList to add. + * @return This builder for chaining. + */ + public Builder addAllCommerceWebcastConfigIdsList( + java.lang.Iterable<? extends java.lang.Long> values) { + ensureCommerceWebcastConfigIdsListIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, commerceWebcastConfigIdsList_); + onChanged(); + return this; + } + /** + * <code>repeated int64 commerceWebcastConfigIdsList = 60;</code> + * @return This builder for chaining. + */ + public Builder clearCommerceWebcastConfigIdsList() { + commerceWebcastConfigIdsList_ = emptyLongList(); + bitField1_ = (bitField1_ & ~0x08000000); + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image badgeImageListV2List_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> badgeImageListV2ListBuilder_; + /** + * <code>.Image badgeImageListV2List = 61;</code> + * @return Whether the badgeImageListV2List field is set. + */ + public boolean hasBadgeImageListV2List() { + return ((bitField1_ & 0x10000000) != 0); + } + /** + * <code>.Image badgeImageListV2List = 61;</code> + * @return The badgeImageListV2List. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getBadgeImageListV2List() { + if (badgeImageListV2ListBuilder_ == null) { + return badgeImageListV2List_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : badgeImageListV2List_; + } else { + return badgeImageListV2ListBuilder_.getMessage(); + } + } + /** + * <code>.Image badgeImageListV2List = 61;</code> + */ + public Builder setBadgeImageListV2List(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (badgeImageListV2ListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + badgeImageListV2List_ = value; + } else { + badgeImageListV2ListBuilder_.setMessage(value); + } + bitField1_ |= 0x10000000; + onChanged(); + return this; + } + /** + * <code>.Image badgeImageListV2List = 61;</code> + */ + public Builder setBadgeImageListV2List( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (badgeImageListV2ListBuilder_ == null) { + badgeImageListV2List_ = builderForValue.build(); + } else { + badgeImageListV2ListBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x10000000; + onChanged(); + return this; + } + /** + * <code>.Image badgeImageListV2List = 61;</code> + */ + public Builder mergeBadgeImageListV2List(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (badgeImageListV2ListBuilder_ == null) { + if (((bitField1_ & 0x10000000) != 0) && + badgeImageListV2List_ != null && + badgeImageListV2List_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getBadgeImageListV2ListBuilder().mergeFrom(value); + } else { + badgeImageListV2List_ = value; + } + } else { + badgeImageListV2ListBuilder_.mergeFrom(value); + } + bitField1_ |= 0x10000000; + onChanged(); + return this; + } + /** + * <code>.Image badgeImageListV2List = 61;</code> + */ + public Builder clearBadgeImageListV2List() { + bitField1_ = (bitField1_ & ~0x10000000); + badgeImageListV2List_ = null; + if (badgeImageListV2ListBuilder_ != null) { + badgeImageListV2ListBuilder_.dispose(); + badgeImageListV2ListBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image badgeImageListV2List = 61;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getBadgeImageListV2ListBuilder() { + bitField1_ |= 0x10000000; + onChanged(); + return getBadgeImageListV2ListFieldBuilder().getBuilder(); + } + /** + * <code>.Image badgeImageListV2List = 61;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getBadgeImageListV2ListOrBuilder() { + if (badgeImageListV2ListBuilder_ != null) { + return badgeImageListV2ListBuilder_.getMessageOrBuilder(); + } else { + return badgeImageListV2List_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : badgeImageListV2List_; + } + } + /** + * <code>.Image badgeImageListV2List = 61;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getBadgeImageListV2ListFieldBuilder() { + if (badgeImageListV2ListBuilder_ == null) { + badgeImageListV2ListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getBadgeImageListV2List(), + getParentForChildren(), + isClean()); + badgeImageListV2List_ = null; + } + return badgeImageListV2ListBuilder_; + } + + private java.lang.Object locationCity_ = ""; + /** + * <pre> + * IndustryCertification industryCertification = 62; + * </pre> + * + * <code>string locationCity = 63;</code> + * @return The locationCity. + */ + public java.lang.String getLocationCity() { + java.lang.Object ref = locationCity_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + locationCity_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <pre> + * IndustryCertification industryCertification = 62; + * </pre> + * + * <code>string locationCity = 63;</code> + * @return The bytes for locationCity. + */ + public com.google.protobuf.ByteString + getLocationCityBytes() { + java.lang.Object ref = locationCity_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + locationCity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <pre> + * IndustryCertification industryCertification = 62; + * </pre> + * + * <code>string locationCity = 63;</code> + * @param value The locationCity to set. + * @return This builder for chaining. + */ + public Builder setLocationCity( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + locationCity_ = value; + bitField1_ |= 0x20000000; + onChanged(); + return this; + } + /** + * <pre> + * IndustryCertification industryCertification = 62; + * </pre> + * + * <code>string locationCity = 63;</code> + * @return This builder for chaining. + */ + public Builder clearLocationCity() { + locationCity_ = getDefaultInstance().getLocationCity(); + bitField1_ = (bitField1_ & ~0x20000000); + onChanged(); + return this; + } + /** + * <pre> + * IndustryCertification industryCertification = 62; + * </pre> + * + * <code>string locationCity = 63;</code> + * @param value The bytes for locationCity to set. + * @return This builder for chaining. + */ + public Builder setLocationCityBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + locationCity_ = value; + bitField1_ |= 0x20000000; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo fansGroupInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfoOrBuilder> fansGroupInfoBuilder_; + /** + * <code>.User.FansGroupInfo fansGroupInfo = 64;</code> + * @return Whether the fansGroupInfo field is set. + */ + public boolean hasFansGroupInfo() { + return ((bitField1_ & 0x40000000) != 0); + } + /** + * <code>.User.FansGroupInfo fansGroupInfo = 64;</code> + * @return The fansGroupInfo. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo getFansGroupInfo() { + if (fansGroupInfoBuilder_ == null) { + return fansGroupInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.getDefaultInstance() : fansGroupInfo_; + } else { + return fansGroupInfoBuilder_.getMessage(); + } + } + /** + * <code>.User.FansGroupInfo fansGroupInfo = 64;</code> + */ + public Builder setFansGroupInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo value) { + if (fansGroupInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fansGroupInfo_ = value; + } else { + fansGroupInfoBuilder_.setMessage(value); + } + bitField1_ |= 0x40000000; + onChanged(); + return this; + } + /** + * <code>.User.FansGroupInfo fansGroupInfo = 64;</code> + */ + public Builder setFansGroupInfo( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.Builder builderForValue) { + if (fansGroupInfoBuilder_ == null) { + fansGroupInfo_ = builderForValue.build(); + } else { + fansGroupInfoBuilder_.setMessage(builderForValue.build()); + } + bitField1_ |= 0x40000000; + onChanged(); + return this; + } + /** + * <code>.User.FansGroupInfo fansGroupInfo = 64;</code> + */ + public Builder mergeFansGroupInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo value) { + if (fansGroupInfoBuilder_ == null) { + if (((bitField1_ & 0x40000000) != 0) && + fansGroupInfo_ != null && + fansGroupInfo_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.getDefaultInstance()) { + getFansGroupInfoBuilder().mergeFrom(value); + } else { + fansGroupInfo_ = value; + } + } else { + fansGroupInfoBuilder_.mergeFrom(value); + } + bitField1_ |= 0x40000000; + onChanged(); + return this; + } + /** + * <code>.User.FansGroupInfo fansGroupInfo = 64;</code> + */ + public Builder clearFansGroupInfo() { + bitField1_ = (bitField1_ & ~0x40000000); + fansGroupInfo_ = null; + if (fansGroupInfoBuilder_ != null) { + fansGroupInfoBuilder_.dispose(); + fansGroupInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.FansGroupInfo fansGroupInfo = 64;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.Builder getFansGroupInfoBuilder() { + bitField1_ |= 0x40000000; + onChanged(); + return getFansGroupInfoFieldBuilder().getBuilder(); + } + /** + * <code>.User.FansGroupInfo fansGroupInfo = 64;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfoOrBuilder getFansGroupInfoOrBuilder() { + if (fansGroupInfoBuilder_ != null) { + return fansGroupInfoBuilder_.getMessageOrBuilder(); + } else { + return fansGroupInfo_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.getDefaultInstance() : fansGroupInfo_; + } + } + /** + * <code>.User.FansGroupInfo fansGroupInfo = 64;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfoOrBuilder> + getFansGroupInfoFieldBuilder() { + if (fansGroupInfoBuilder_ == null) { + fansGroupInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.FansGroupInfoOrBuilder>( + getFansGroupInfo(), + getParentForChildren(), + isClean()); + fansGroupInfo_ = null; + } + return fansGroupInfoBuilder_; + } + + private java.lang.Object remarkName_ = ""; + /** + * <code>string remarkName = 65;</code> + * @return The remarkName. + */ + public java.lang.String getRemarkName() { + java.lang.Object ref = remarkName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + remarkName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string remarkName = 65;</code> + * @return The bytes for remarkName. + */ + public com.google.protobuf.ByteString + getRemarkNameBytes() { + java.lang.Object ref = remarkName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + remarkName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string remarkName = 65;</code> + * @param value The remarkName to set. + * @return This builder for chaining. + */ + public Builder setRemarkName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + remarkName_ = value; + bitField1_ |= 0x80000000; + onChanged(); + return this; + } + /** + * <code>string remarkName = 65;</code> + * @return This builder for chaining. + */ + public Builder clearRemarkName() { + remarkName_ = getDefaultInstance().getRemarkName(); + bitField1_ = (bitField1_ & ~0x80000000); + onChanged(); + return this; + } + /** + * <code>string remarkName = 65;</code> + * @param value The bytes for remarkName to set. + * @return This builder for chaining. + */ + public Builder setRemarkNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + remarkName_ = value; + bitField1_ |= 0x80000000; + onChanged(); + return this; + } + + private int mysteryMan_ ; + /** + * <code>int32 mysteryMan = 66;</code> + * @return The mysteryMan. + */ + @java.lang.Override + public int getMysteryMan() { + return mysteryMan_; + } + /** + * <code>int32 mysteryMan = 66;</code> + * @param value The mysteryMan to set. + * @return This builder for chaining. + */ + public Builder setMysteryMan(int value) { + + mysteryMan_ = value; + bitField2_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>int32 mysteryMan = 66;</code> + * @return This builder for chaining. + */ + public Builder clearMysteryMan() { + bitField2_ = (bitField2_ & ~0x00000001); + mysteryMan_ = 0; + onChanged(); + return this; + } + + private java.lang.Object webRid_ = ""; + /** + * <code>string webRid = 67;</code> + * @return The webRid. + */ + public java.lang.String getWebRid() { + java.lang.Object ref = webRid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webRid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string webRid = 67;</code> + * @return The bytes for webRid. + */ + public com.google.protobuf.ByteString + getWebRidBytes() { + java.lang.Object ref = webRid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webRid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string webRid = 67;</code> + * @param value The webRid to set. + * @return This builder for chaining. + */ + public Builder setWebRid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + webRid_ = value; + bitField2_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string webRid = 67;</code> + * @return This builder for chaining. + */ + public Builder clearWebRid() { + webRid_ = getDefaultInstance().getWebRid(); + bitField2_ = (bitField2_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string webRid = 67;</code> + * @param value The bytes for webRid to set. + * @return This builder for chaining. + */ + public Builder setWebRidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + webRid_ = value; + bitField2_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object desensitizedNickname_ = ""; + /** + * <code>string desensitizedNickname = 68;</code> + * @return The desensitizedNickname. + */ + public java.lang.String getDesensitizedNickname() { + java.lang.Object ref = desensitizedNickname_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + desensitizedNickname_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string desensitizedNickname = 68;</code> + * @return The bytes for desensitizedNickname. + */ + public com.google.protobuf.ByteString + getDesensitizedNicknameBytes() { + java.lang.Object ref = desensitizedNickname_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + desensitizedNickname_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string desensitizedNickname = 68;</code> + * @param value The desensitizedNickname to set. + * @return This builder for chaining. + */ + public Builder setDesensitizedNickname( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + desensitizedNickname_ = value; + bitField2_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>string desensitizedNickname = 68;</code> + * @return This builder for chaining. + */ + public Builder clearDesensitizedNickname() { + desensitizedNickname_ = getDefaultInstance().getDesensitizedNickname(); + bitField2_ = (bitField2_ & ~0x00000004); + onChanged(); + return this; + } + /** + * <code>string desensitizedNickname = 68;</code> + * @param value The bytes for desensitizedNickname to set. + * @return This builder for chaining. + */ + public Builder setDesensitizedNicknameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + desensitizedNickname_ = value; + bitField2_ |= 0x00000004; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo jAccreditInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfoOrBuilder> jAccreditInfoBuilder_; + /** + * <code>.User.JAccreditInfo jAccreditInfo = 69;</code> + * @return Whether the jAccreditInfo field is set. + */ + public boolean hasJAccreditInfo() { + return ((bitField2_ & 0x00000008) != 0); + } + /** + * <code>.User.JAccreditInfo jAccreditInfo = 69;</code> + * @return The jAccreditInfo. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo getJAccreditInfo() { + if (jAccreditInfoBuilder_ == null) { + return jAccreditInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.getDefaultInstance() : jAccreditInfo_; + } else { + return jAccreditInfoBuilder_.getMessage(); + } + } + /** + * <code>.User.JAccreditInfo jAccreditInfo = 69;</code> + */ + public Builder setJAccreditInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo value) { + if (jAccreditInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + jAccreditInfo_ = value; + } else { + jAccreditInfoBuilder_.setMessage(value); + } + bitField2_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.User.JAccreditInfo jAccreditInfo = 69;</code> + */ + public Builder setJAccreditInfo( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.Builder builderForValue) { + if (jAccreditInfoBuilder_ == null) { + jAccreditInfo_ = builderForValue.build(); + } else { + jAccreditInfoBuilder_.setMessage(builderForValue.build()); + } + bitField2_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.User.JAccreditInfo jAccreditInfo = 69;</code> + */ + public Builder mergeJAccreditInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo value) { + if (jAccreditInfoBuilder_ == null) { + if (((bitField2_ & 0x00000008) != 0) && + jAccreditInfo_ != null && + jAccreditInfo_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.getDefaultInstance()) { + getJAccreditInfoBuilder().mergeFrom(value); + } else { + jAccreditInfo_ = value; + } + } else { + jAccreditInfoBuilder_.mergeFrom(value); + } + bitField2_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.User.JAccreditInfo jAccreditInfo = 69;</code> + */ + public Builder clearJAccreditInfo() { + bitField2_ = (bitField2_ & ~0x00000008); + jAccreditInfo_ = null; + if (jAccreditInfoBuilder_ != null) { + jAccreditInfoBuilder_.dispose(); + jAccreditInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.JAccreditInfo jAccreditInfo = 69;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.Builder getJAccreditInfoBuilder() { + bitField2_ |= 0x00000008; + onChanged(); + return getJAccreditInfoFieldBuilder().getBuilder(); + } + /** + * <code>.User.JAccreditInfo jAccreditInfo = 69;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfoOrBuilder getJAccreditInfoOrBuilder() { + if (jAccreditInfoBuilder_ != null) { + return jAccreditInfoBuilder_.getMessageOrBuilder(); + } else { + return jAccreditInfo_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.getDefaultInstance() : jAccreditInfo_; + } + } + /** + * <code>.User.JAccreditInfo jAccreditInfo = 69;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfoOrBuilder> + getJAccreditInfoFieldBuilder() { + if (jAccreditInfoBuilder_ == null) { + jAccreditInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.JAccreditInfoOrBuilder>( + getJAccreditInfo(), + getParentForChildren(), + isClean()); + jAccreditInfo_ = null; + } + return jAccreditInfoBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe subscribe_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.SubscribeOrBuilder> subscribeBuilder_; + /** + * <code>.User.Subscribe subscribe = 70;</code> + * @return Whether the subscribe field is set. + */ + public boolean hasSubscribe() { + return ((bitField2_ & 0x00000010) != 0); + } + /** + * <code>.User.Subscribe subscribe = 70;</code> + * @return The subscribe. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe getSubscribe() { + if (subscribeBuilder_ == null) { + return subscribe_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.getDefaultInstance() : subscribe_; + } else { + return subscribeBuilder_.getMessage(); + } + } + /** + * <code>.User.Subscribe subscribe = 70;</code> + */ + public Builder setSubscribe(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe value) { + if (subscribeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subscribe_ = value; + } else { + subscribeBuilder_.setMessage(value); + } + bitField2_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>.User.Subscribe subscribe = 70;</code> + */ + public Builder setSubscribe( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.Builder builderForValue) { + if (subscribeBuilder_ == null) { + subscribe_ = builderForValue.build(); + } else { + subscribeBuilder_.setMessage(builderForValue.build()); + } + bitField2_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>.User.Subscribe subscribe = 70;</code> + */ + public Builder mergeSubscribe(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe value) { + if (subscribeBuilder_ == null) { + if (((bitField2_ & 0x00000010) != 0) && + subscribe_ != null && + subscribe_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.getDefaultInstance()) { + getSubscribeBuilder().mergeFrom(value); + } else { + subscribe_ = value; + } + } else { + subscribeBuilder_.mergeFrom(value); + } + bitField2_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>.User.Subscribe subscribe = 70;</code> + */ + public Builder clearSubscribe() { + bitField2_ = (bitField2_ & ~0x00000010); + subscribe_ = null; + if (subscribeBuilder_ != null) { + subscribeBuilder_.dispose(); + subscribeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.Subscribe subscribe = 70;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.Builder getSubscribeBuilder() { + bitField2_ |= 0x00000010; + onChanged(); + return getSubscribeFieldBuilder().getBuilder(); + } + /** + * <code>.User.Subscribe subscribe = 70;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.SubscribeOrBuilder getSubscribeOrBuilder() { + if (subscribeBuilder_ != null) { + return subscribeBuilder_.getMessageOrBuilder(); + } else { + return subscribe_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.getDefaultInstance() : subscribe_; + } + } + /** + * <code>.User.Subscribe subscribe = 70;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.SubscribeOrBuilder> + getSubscribeFieldBuilder() { + if (subscribeBuilder_ == null) { + subscribeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.Subscribe.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.SubscribeOrBuilder>( + getSubscribe(), + getParentForChildren(), + isClean()); + subscribe_ = null; + } + return subscribeBuilder_; + } + + private boolean isAnonymous_ ; + /** + * <code>bool isAnonymous = 71;</code> + * @return The isAnonymous. + */ + @java.lang.Override + public boolean getIsAnonymous() { + return isAnonymous_; + } + /** + * <code>bool isAnonymous = 71;</code> + * @param value The isAnonymous to set. + * @return This builder for chaining. + */ + public Builder setIsAnonymous(boolean value) { + + isAnonymous_ = value; + bitField2_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>bool isAnonymous = 71;</code> + * @return This builder for chaining. + */ + public Builder clearIsAnonymous() { + bitField2_ = (bitField2_ & ~0x00000020); + isAnonymous_ = false; + onChanged(); + return this; + } + + private int consumeDiamondLevel_ ; + /** + * <code>int32 consumeDiamondLevel = 72;</code> + * @return The consumeDiamondLevel. + */ + @java.lang.Override + public int getConsumeDiamondLevel() { + return consumeDiamondLevel_; + } + /** + * <code>int32 consumeDiamondLevel = 72;</code> + * @param value The consumeDiamondLevel to set. + * @return This builder for chaining. + */ + public Builder setConsumeDiamondLevel(int value) { + + consumeDiamondLevel_ = value; + bitField2_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>int32 consumeDiamondLevel = 72;</code> + * @return This builder for chaining. + */ + public Builder clearConsumeDiamondLevel() { + bitField2_ = (bitField2_ & ~0x00000040); + consumeDiamondLevel_ = 0; + onChanged(); + return this; + } + + private java.lang.Object webcastUid_ = ""; + /** + * <code>string webcastUid = 73;</code> + * @return The webcastUid. + */ + public java.lang.String getWebcastUid() { + java.lang.Object ref = webcastUid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + webcastUid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string webcastUid = 73;</code> + * @return The bytes for webcastUid. + */ + public com.google.protobuf.ByteString + getWebcastUidBytes() { + java.lang.Object ref = webcastUid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + webcastUid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string webcastUid = 73;</code> + * @param value The webcastUid to set. + * @return This builder for chaining. + */ + public Builder setWebcastUid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + webcastUid_ = value; + bitField2_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>string webcastUid = 73;</code> + * @return This builder for chaining. + */ + public Builder clearWebcastUid() { + webcastUid_ = getDefaultInstance().getWebcastUid(); + bitField2_ = (bitField2_ & ~0x00000080); + onChanged(); + return this; + } + /** + * <code>string webcastUid = 73;</code> + * @param value The bytes for webcastUid to set. + * @return This builder for chaining. + */ + public Builder setWebcastUidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + webcastUid_ = value; + bitField2_ |= 0x00000080; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams profileStyleParams_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParamsOrBuilder> profileStyleParamsBuilder_; + /** + * <code>.User.ProfileStyleParams profileStyleParams = 74;</code> + * @return Whether the profileStyleParams field is set. + */ + public boolean hasProfileStyleParams() { + return ((bitField2_ & 0x00000100) != 0); + } + /** + * <code>.User.ProfileStyleParams profileStyleParams = 74;</code> + * @return The profileStyleParams. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams getProfileStyleParams() { + if (profileStyleParamsBuilder_ == null) { + return profileStyleParams_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.getDefaultInstance() : profileStyleParams_; + } else { + return profileStyleParamsBuilder_.getMessage(); + } + } + /** + * <code>.User.ProfileStyleParams profileStyleParams = 74;</code> + */ + public Builder setProfileStyleParams(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams value) { + if (profileStyleParamsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + profileStyleParams_ = value; + } else { + profileStyleParamsBuilder_.setMessage(value); + } + bitField2_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>.User.ProfileStyleParams profileStyleParams = 74;</code> + */ + public Builder setProfileStyleParams( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.Builder builderForValue) { + if (profileStyleParamsBuilder_ == null) { + profileStyleParams_ = builderForValue.build(); + } else { + profileStyleParamsBuilder_.setMessage(builderForValue.build()); + } + bitField2_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>.User.ProfileStyleParams profileStyleParams = 74;</code> + */ + public Builder mergeProfileStyleParams(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams value) { + if (profileStyleParamsBuilder_ == null) { + if (((bitField2_ & 0x00000100) != 0) && + profileStyleParams_ != null && + profileStyleParams_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.getDefaultInstance()) { + getProfileStyleParamsBuilder().mergeFrom(value); + } else { + profileStyleParams_ = value; + } + } else { + profileStyleParamsBuilder_.mergeFrom(value); + } + bitField2_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>.User.ProfileStyleParams profileStyleParams = 74;</code> + */ + public Builder clearProfileStyleParams() { + bitField2_ = (bitField2_ & ~0x00000100); + profileStyleParams_ = null; + if (profileStyleParamsBuilder_ != null) { + profileStyleParamsBuilder_.dispose(); + profileStyleParamsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.ProfileStyleParams profileStyleParams = 74;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.Builder getProfileStyleParamsBuilder() { + bitField2_ |= 0x00000100; + onChanged(); + return getProfileStyleParamsFieldBuilder().getBuilder(); + } + /** + * <code>.User.ProfileStyleParams profileStyleParams = 74;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParamsOrBuilder getProfileStyleParamsOrBuilder() { + if (profileStyleParamsBuilder_ != null) { + return profileStyleParamsBuilder_.getMessageOrBuilder(); + } else { + return profileStyleParams_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.getDefaultInstance() : profileStyleParams_; + } + } + /** + * <code>.User.ProfileStyleParams profileStyleParams = 74;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParamsOrBuilder> + getProfileStyleParamsFieldBuilder() { + if (profileStyleParamsBuilder_ == null) { + profileStyleParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParams.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.ProfileStyleParamsOrBuilder>( + getProfileStyleParams(), + getParentForChildren(), + isClean()); + profileStyleParams_ = null; + } + return profileStyleParamsBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo userDressInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfoOrBuilder> userDressInfoBuilder_; + /** + * <code>.User.UserDressInfo userDressInfo = 75;</code> + * @return Whether the userDressInfo field is set. + */ + public boolean hasUserDressInfo() { + return ((bitField2_ & 0x00000200) != 0); + } + /** + * <code>.User.UserDressInfo userDressInfo = 75;</code> + * @return The userDressInfo. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo getUserDressInfo() { + if (userDressInfoBuilder_ == null) { + return userDressInfo_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.getDefaultInstance() : userDressInfo_; + } else { + return userDressInfoBuilder_.getMessage(); + } + } + /** + * <code>.User.UserDressInfo userDressInfo = 75;</code> + */ + public Builder setUserDressInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo value) { + if (userDressInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + userDressInfo_ = value; + } else { + userDressInfoBuilder_.setMessage(value); + } + bitField2_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>.User.UserDressInfo userDressInfo = 75;</code> + */ + public Builder setUserDressInfo( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.Builder builderForValue) { + if (userDressInfoBuilder_ == null) { + userDressInfo_ = builderForValue.build(); + } else { + userDressInfoBuilder_.setMessage(builderForValue.build()); + } + bitField2_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>.User.UserDressInfo userDressInfo = 75;</code> + */ + public Builder mergeUserDressInfo(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo value) { + if (userDressInfoBuilder_ == null) { + if (((bitField2_ & 0x00000200) != 0) && + userDressInfo_ != null && + userDressInfo_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.getDefaultInstance()) { + getUserDressInfoBuilder().mergeFrom(value); + } else { + userDressInfo_ = value; + } + } else { + userDressInfoBuilder_.mergeFrom(value); + } + bitField2_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>.User.UserDressInfo userDressInfo = 75;</code> + */ + public Builder clearUserDressInfo() { + bitField2_ = (bitField2_ & ~0x00000200); + userDressInfo_ = null; + if (userDressInfoBuilder_ != null) { + userDressInfoBuilder_.dispose(); + userDressInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.UserDressInfo userDressInfo = 75;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.Builder getUserDressInfoBuilder() { + bitField2_ |= 0x00000200; + onChanged(); + return getUserDressInfoFieldBuilder().getBuilder(); + } + /** + * <code>.User.UserDressInfo userDressInfo = 75;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfoOrBuilder getUserDressInfoOrBuilder() { + if (userDressInfoBuilder_ != null) { + return userDressInfoBuilder_.getMessageOrBuilder(); + } else { + return userDressInfo_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.getDefaultInstance() : userDressInfo_; + } + } + /** + * <code>.User.UserDressInfo userDressInfo = 75;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfoOrBuilder> + getUserDressInfoFieldBuilder() { + if (userDressInfoBuilder_ == null) { + userDressInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfo.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserDressInfoOrBuilder>( + getUserDressInfo(), + getParentForChildren(), + isClean()); + userDressInfo_ = null; + } + return userDressInfoBuilder_; + } + + private boolean allowBeLocated_ ; + /** + * <code>bool allowBeLocated = 1001;</code> + * @return The allowBeLocated. + */ + @java.lang.Override + public boolean getAllowBeLocated() { + return allowBeLocated_; + } + /** + * <code>bool allowBeLocated = 1001;</code> + * @param value The allowBeLocated to set. + * @return This builder for chaining. + */ + public Builder setAllowBeLocated(boolean value) { + + allowBeLocated_ = value; + bitField2_ |= 0x00000400; + onChanged(); + return this; + } + /** + * <code>bool allowBeLocated = 1001;</code> + * @return This builder for chaining. + */ + public Builder clearAllowBeLocated() { + bitField2_ = (bitField2_ & ~0x00000400); + allowBeLocated_ = false; + onChanged(); + return this; + } + + private boolean allowFindByContacts_ ; + /** + * <code>bool allowFindByContacts = 1002;</code> + * @return The allowFindByContacts. + */ + @java.lang.Override + public boolean getAllowFindByContacts() { + return allowFindByContacts_; + } + /** + * <code>bool allowFindByContacts = 1002;</code> + * @param value The allowFindByContacts to set. + * @return This builder for chaining. + */ + public Builder setAllowFindByContacts(boolean value) { + + allowFindByContacts_ = value; + bitField2_ |= 0x00000800; + onChanged(); + return this; + } + /** + * <code>bool allowFindByContacts = 1002;</code> + * @return This builder for chaining. + */ + public Builder clearAllowFindByContacts() { + bitField2_ = (bitField2_ & ~0x00000800); + allowFindByContacts_ = false; + onChanged(); + return this; + } + + private boolean allowOthersDownloadVideo_ ; + /** + * <code>bool allowOthersDownloadVideo = 1003;</code> + * @return The allowOthersDownloadVideo. + */ + @java.lang.Override + public boolean getAllowOthersDownloadVideo() { + return allowOthersDownloadVideo_; + } + /** + * <code>bool allowOthersDownloadVideo = 1003;</code> + * @param value The allowOthersDownloadVideo to set. + * @return This builder for chaining. + */ + public Builder setAllowOthersDownloadVideo(boolean value) { + + allowOthersDownloadVideo_ = value; + bitField2_ |= 0x00001000; + onChanged(); + return this; + } + /** + * <code>bool allowOthersDownloadVideo = 1003;</code> + * @return This builder for chaining. + */ + public Builder clearAllowOthersDownloadVideo() { + bitField2_ = (bitField2_ & ~0x00001000); + allowOthersDownloadVideo_ = false; + onChanged(); + return this; + } + + private boolean allowOthersDownloadWhenSharingVideo_ ; + /** + * <code>bool allowOthersDownloadWhenSharingVideo = 1004;</code> + * @return The allowOthersDownloadWhenSharingVideo. + */ + @java.lang.Override + public boolean getAllowOthersDownloadWhenSharingVideo() { + return allowOthersDownloadWhenSharingVideo_; + } + /** + * <code>bool allowOthersDownloadWhenSharingVideo = 1004;</code> + * @param value The allowOthersDownloadWhenSharingVideo to set. + * @return This builder for chaining. + */ + public Builder setAllowOthersDownloadWhenSharingVideo(boolean value) { + + allowOthersDownloadWhenSharingVideo_ = value; + bitField2_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>bool allowOthersDownloadWhenSharingVideo = 1004;</code> + * @return This builder for chaining. + */ + public Builder clearAllowOthersDownloadWhenSharingVideo() { + bitField2_ = (bitField2_ & ~0x00002000); + allowOthersDownloadWhenSharingVideo_ = false; + onChanged(); + return this; + } + + private boolean allowShareShowProfile_ ; + /** + * <code>bool allowShareShowProfile = 1005;</code> + * @return The allowShareShowProfile. + */ + @java.lang.Override + public boolean getAllowShareShowProfile() { + return allowShareShowProfile_; + } + /** + * <code>bool allowShareShowProfile = 1005;</code> + * @param value The allowShareShowProfile to set. + * @return This builder for chaining. + */ + public Builder setAllowShareShowProfile(boolean value) { + + allowShareShowProfile_ = value; + bitField2_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <code>bool allowShareShowProfile = 1005;</code> + * @return This builder for chaining. + */ + public Builder clearAllowShareShowProfile() { + bitField2_ = (bitField2_ & ~0x00004000); + allowShareShowProfile_ = false; + onChanged(); + return this; + } + + private boolean allowShowInGossip_ ; + /** + * <code>bool allowShowInGossip = 1006;</code> + * @return The allowShowInGossip. + */ + @java.lang.Override + public boolean getAllowShowInGossip() { + return allowShowInGossip_; + } + /** + * <code>bool allowShowInGossip = 1006;</code> + * @param value The allowShowInGossip to set. + * @return This builder for chaining. + */ + public Builder setAllowShowInGossip(boolean value) { + + allowShowInGossip_ = value; + bitField2_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>bool allowShowInGossip = 1006;</code> + * @return This builder for chaining. + */ + public Builder clearAllowShowInGossip() { + bitField2_ = (bitField2_ & ~0x00008000); + allowShowInGossip_ = false; + onChanged(); + return this; + } + + private boolean allowShowMyAction_ ; + /** + * <code>bool allowShowMyAction = 1007;</code> + * @return The allowShowMyAction. + */ + @java.lang.Override + public boolean getAllowShowMyAction() { + return allowShowMyAction_; + } + /** + * <code>bool allowShowMyAction = 1007;</code> + * @param value The allowShowMyAction to set. + * @return This builder for chaining. + */ + public Builder setAllowShowMyAction(boolean value) { + + allowShowMyAction_ = value; + bitField2_ |= 0x00010000; + onChanged(); + return this; + } + /** + * <code>bool allowShowMyAction = 1007;</code> + * @return This builder for chaining. + */ + public Builder clearAllowShowMyAction() { + bitField2_ = (bitField2_ & ~0x00010000); + allowShowMyAction_ = false; + onChanged(); + return this; + } + + private boolean allowStrangeComment_ ; + /** + * <code>bool allowStrangeComment = 1008;</code> + * @return The allowStrangeComment. + */ + @java.lang.Override + public boolean getAllowStrangeComment() { + return allowStrangeComment_; + } + /** + * <code>bool allowStrangeComment = 1008;</code> + * @param value The allowStrangeComment to set. + * @return This builder for chaining. + */ + public Builder setAllowStrangeComment(boolean value) { + + allowStrangeComment_ = value; + bitField2_ |= 0x00020000; + onChanged(); + return this; + } + /** + * <code>bool allowStrangeComment = 1008;</code> + * @return This builder for chaining. + */ + public Builder clearAllowStrangeComment() { + bitField2_ = (bitField2_ & ~0x00020000); + allowStrangeComment_ = false; + onChanged(); + return this; + } + + private boolean allowUnfollowerComment_ ; + /** + * <code>bool allowUnfollowerComment = 1009;</code> + * @return The allowUnfollowerComment. + */ + @java.lang.Override + public boolean getAllowUnfollowerComment() { + return allowUnfollowerComment_; + } + /** + * <code>bool allowUnfollowerComment = 1009;</code> + * @param value The allowUnfollowerComment to set. + * @return This builder for chaining. + */ + public Builder setAllowUnfollowerComment(boolean value) { + + allowUnfollowerComment_ = value; + bitField2_ |= 0x00040000; + onChanged(); + return this; + } + /** + * <code>bool allowUnfollowerComment = 1009;</code> + * @return This builder for chaining. + */ + public Builder clearAllowUnfollowerComment() { + bitField2_ = (bitField2_ & ~0x00040000); + allowUnfollowerComment_ = false; + onChanged(); + return this; + } + + private boolean allowUseLinkmic_ ; + /** + * <code>bool allowUseLinkmic = 1010;</code> + * @return The allowUseLinkmic. + */ + @java.lang.Override + public boolean getAllowUseLinkmic() { + return allowUseLinkmic_; + } + /** + * <code>bool allowUseLinkmic = 1010;</code> + * @param value The allowUseLinkmic to set. + * @return This builder for chaining. + */ + public Builder setAllowUseLinkmic(boolean value) { + + allowUseLinkmic_ = value; + bitField2_ |= 0x00080000; + onChanged(); + return this; + } + /** + * <code>bool allowUseLinkmic = 1010;</code> + * @return This builder for chaining. + */ + public Builder clearAllowUseLinkmic() { + bitField2_ = (bitField2_ & ~0x00080000); + allowUseLinkmic_ = false; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel anchorLevel_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder> anchorLevelBuilder_; + /** + * <code>.User.AnchorLevel anchorLevel = 1011;</code> + * @return Whether the anchorLevel field is set. + */ + public boolean hasAnchorLevel() { + return ((bitField2_ & 0x00100000) != 0); + } + /** + * <code>.User.AnchorLevel anchorLevel = 1011;</code> + * @return The anchorLevel. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel getAnchorLevel() { + if (anchorLevelBuilder_ == null) { + return anchorLevel_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance() : anchorLevel_; + } else { + return anchorLevelBuilder_.getMessage(); + } + } + /** + * <code>.User.AnchorLevel anchorLevel = 1011;</code> + */ + public Builder setAnchorLevel(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel value) { + if (anchorLevelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + anchorLevel_ = value; + } else { + anchorLevelBuilder_.setMessage(value); + } + bitField2_ |= 0x00100000; + onChanged(); + return this; + } + /** + * <code>.User.AnchorLevel anchorLevel = 1011;</code> + */ + public Builder setAnchorLevel( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder builderForValue) { + if (anchorLevelBuilder_ == null) { + anchorLevel_ = builderForValue.build(); + } else { + anchorLevelBuilder_.setMessage(builderForValue.build()); + } + bitField2_ |= 0x00100000; + onChanged(); + return this; + } + /** + * <code>.User.AnchorLevel anchorLevel = 1011;</code> + */ + public Builder mergeAnchorLevel(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel value) { + if (anchorLevelBuilder_ == null) { + if (((bitField2_ & 0x00100000) != 0) && + anchorLevel_ != null && + anchorLevel_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance()) { + getAnchorLevelBuilder().mergeFrom(value); + } else { + anchorLevel_ = value; + } + } else { + anchorLevelBuilder_.mergeFrom(value); + } + bitField2_ |= 0x00100000; + onChanged(); + return this; + } + /** + * <code>.User.AnchorLevel anchorLevel = 1011;</code> + */ + public Builder clearAnchorLevel() { + bitField2_ = (bitField2_ & ~0x00100000); + anchorLevel_ = null; + if (anchorLevelBuilder_ != null) { + anchorLevelBuilder_.dispose(); + anchorLevelBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.AnchorLevel anchorLevel = 1011;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder getAnchorLevelBuilder() { + bitField2_ |= 0x00100000; + onChanged(); + return getAnchorLevelFieldBuilder().getBuilder(); + } + /** + * <code>.User.AnchorLevel anchorLevel = 1011;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder getAnchorLevelOrBuilder() { + if (anchorLevelBuilder_ != null) { + return anchorLevelBuilder_.getMessageOrBuilder(); + } else { + return anchorLevel_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.getDefaultInstance() : anchorLevel_; + } + } + /** + * <code>.User.AnchorLevel anchorLevel = 1011;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder> + getAnchorLevelFieldBuilder() { + if (anchorLevelBuilder_ == null) { + anchorLevelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevel.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.AnchorLevelOrBuilder>( + getAnchorLevel(), + getParentForChildren(), + isClean()); + anchorLevel_ = null; + } + return anchorLevelBuilder_; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image avatarJpg_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> avatarJpgBuilder_; + /** + * <code>.Image avatarJpg = 1012;</code> + * @return Whether the avatarJpg field is set. + */ + public boolean hasAvatarJpg() { + return ((bitField2_ & 0x00200000) != 0); + } + /** + * <code>.Image avatarJpg = 1012;</code> + * @return The avatarJpg. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image getAvatarJpg() { + if (avatarJpgBuilder_ == null) { + return avatarJpg_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarJpg_; + } else { + return avatarJpgBuilder_.getMessage(); + } + } + /** + * <code>.Image avatarJpg = 1012;</code> + */ + public Builder setAvatarJpg(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarJpgBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + avatarJpg_ = value; + } else { + avatarJpgBuilder_.setMessage(value); + } + bitField2_ |= 0x00200000; + onChanged(); + return this; + } + /** + * <code>.Image avatarJpg = 1012;</code> + */ + public Builder setAvatarJpg( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder builderForValue) { + if (avatarJpgBuilder_ == null) { + avatarJpg_ = builderForValue.build(); + } else { + avatarJpgBuilder_.setMessage(builderForValue.build()); + } + bitField2_ |= 0x00200000; + onChanged(); + return this; + } + /** + * <code>.Image avatarJpg = 1012;</code> + */ + public Builder mergeAvatarJpg(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image value) { + if (avatarJpgBuilder_ == null) { + if (((bitField2_ & 0x00200000) != 0) && + avatarJpg_ != null && + avatarJpg_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance()) { + getAvatarJpgBuilder().mergeFrom(value); + } else { + avatarJpg_ = value; + } + } else { + avatarJpgBuilder_.mergeFrom(value); + } + bitField2_ |= 0x00200000; + onChanged(); + return this; + } + /** + * <code>.Image avatarJpg = 1012;</code> + */ + public Builder clearAvatarJpg() { + bitField2_ = (bitField2_ & ~0x00200000); + avatarJpg_ = null; + if (avatarJpgBuilder_ != null) { + avatarJpgBuilder_.dispose(); + avatarJpgBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.Image avatarJpg = 1012;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder getAvatarJpgBuilder() { + bitField2_ |= 0x00200000; + onChanged(); + return getAvatarJpgFieldBuilder().getBuilder(); + } + /** + * <code>.Image avatarJpg = 1012;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder getAvatarJpgOrBuilder() { + if (avatarJpgBuilder_ != null) { + return avatarJpgBuilder_.getMessageOrBuilder(); + } else { + return avatarJpg_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.getDefaultInstance() : avatarJpg_; + } + } + /** + * <code>.Image avatarJpg = 1012;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder> + getAvatarJpgFieldBuilder() { + if (avatarJpgBuilder_ == null) { + avatarJpgBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.Image.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.ImageOrBuilder>( + getAvatarJpg(), + getParentForChildren(), + isClean()); + avatarJpg_ = null; + } + return avatarJpgBuilder_; + } + + private java.lang.Object bgImgUrl_ = ""; + /** + * <code>string bgImgUrl = 1013;</code> + * @return The bgImgUrl. + */ + public java.lang.String getBgImgUrl() { + java.lang.Object ref = bgImgUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bgImgUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string bgImgUrl = 1013;</code> + * @return The bytes for bgImgUrl. + */ + public com.google.protobuf.ByteString + getBgImgUrlBytes() { + java.lang.Object ref = bgImgUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + bgImgUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string bgImgUrl = 1013;</code> + * @param value The bgImgUrl to set. + * @return This builder for chaining. + */ + public Builder setBgImgUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + bgImgUrl_ = value; + bitField2_ |= 0x00400000; + onChanged(); + return this; + } + /** + * <code>string bgImgUrl = 1013;</code> + * @return This builder for chaining. + */ + public Builder clearBgImgUrl() { + bgImgUrl_ = getDefaultInstance().getBgImgUrl(); + bitField2_ = (bitField2_ & ~0x00400000); + onChanged(); + return this; + } + /** + * <code>string bgImgUrl = 1013;</code> + * @param value The bytes for bgImgUrl to set. + * @return This builder for chaining. + */ + public Builder setBgImgUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + bgImgUrl_ = value; + bitField2_ |= 0x00400000; + onChanged(); + return this; + } + + private java.lang.Object birthdayDescription_ = ""; + /** + * <code>string birthdayDescription = 1014;</code> + * @return The birthdayDescription. + */ + public java.lang.String getBirthdayDescription() { + java.lang.Object ref = birthdayDescription_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + birthdayDescription_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string birthdayDescription = 1014;</code> + * @return The bytes for birthdayDescription. + */ + public com.google.protobuf.ByteString + getBirthdayDescriptionBytes() { + java.lang.Object ref = birthdayDescription_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + birthdayDescription_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string birthdayDescription = 1014;</code> + * @param value The birthdayDescription to set. + * @return This builder for chaining. + */ + public Builder setBirthdayDescription( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + birthdayDescription_ = value; + bitField2_ |= 0x00800000; + onChanged(); + return this; + } + /** + * <code>string birthdayDescription = 1014;</code> + * @return This builder for chaining. + */ + public Builder clearBirthdayDescription() { + birthdayDescription_ = getDefaultInstance().getBirthdayDescription(); + bitField2_ = (bitField2_ & ~0x00800000); + onChanged(); + return this; + } + /** + * <code>string birthdayDescription = 1014;</code> + * @param value The bytes for birthdayDescription to set. + * @return This builder for chaining. + */ + public Builder setBirthdayDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + birthdayDescription_ = value; + bitField2_ |= 0x00800000; + onChanged(); + return this; + } + + private boolean birthdayValid_ ; + /** + * <code>bool birthdayValid = 1015;</code> + * @return The birthdayValid. + */ + @java.lang.Override + public boolean getBirthdayValid() { + return birthdayValid_; + } + /** + * <code>bool birthdayValid = 1015;</code> + * @param value The birthdayValid to set. + * @return This builder for chaining. + */ + public Builder setBirthdayValid(boolean value) { + + birthdayValid_ = value; + bitField2_ |= 0x01000000; + onChanged(); + return this; + } + /** + * <code>bool birthdayValid = 1015;</code> + * @return This builder for chaining. + */ + public Builder clearBirthdayValid() { + bitField2_ = (bitField2_ & ~0x01000000); + birthdayValid_ = false; + onChanged(); + return this; + } + + private int blockStatus_ ; + /** + * <code>int32 blockStatus = 1016;</code> + * @return The blockStatus. + */ + @java.lang.Override + public int getBlockStatus() { + return blockStatus_; + } + /** + * <code>int32 blockStatus = 1016;</code> + * @param value The blockStatus to set. + * @return This builder for chaining. + */ + public Builder setBlockStatus(int value) { + + blockStatus_ = value; + bitField2_ |= 0x02000000; + onChanged(); + return this; + } + /** + * <code>int32 blockStatus = 1016;</code> + * @return This builder for chaining. + */ + public Builder clearBlockStatus() { + bitField2_ = (bitField2_ & ~0x02000000); + blockStatus_ = 0; + onChanged(); + return this; + } + + private int commentRestrict_ ; + /** + * <code>int32 commentRestrict = 1017;</code> + * @return The commentRestrict. + */ + @java.lang.Override + public int getCommentRestrict() { + return commentRestrict_; + } + /** + * <code>int32 commentRestrict = 1017;</code> + * @param value The commentRestrict to set. + * @return This builder for chaining. + */ + public Builder setCommentRestrict(int value) { + + commentRestrict_ = value; + bitField2_ |= 0x04000000; + onChanged(); + return this; + } + /** + * <code>int32 commentRestrict = 1017;</code> + * @return This builder for chaining. + */ + public Builder clearCommentRestrict() { + bitField2_ = (bitField2_ & ~0x04000000); + commentRestrict_ = 0; + onChanged(); + return this; + } + + private java.lang.Object constellation_ = ""; + /** + * <code>string constellation = 1018;</code> + * @return The constellation. + */ + public java.lang.String getConstellation() { + java.lang.Object ref = constellation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + constellation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string constellation = 1018;</code> + * @return The bytes for constellation. + */ + public com.google.protobuf.ByteString + getConstellationBytes() { + java.lang.Object ref = constellation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + constellation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string constellation = 1018;</code> + * @param value The constellation to set. + * @return This builder for chaining. + */ + public Builder setConstellation( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + constellation_ = value; + bitField2_ |= 0x08000000; + onChanged(); + return this; + } + /** + * <code>string constellation = 1018;</code> + * @return This builder for chaining. + */ + public Builder clearConstellation() { + constellation_ = getDefaultInstance().getConstellation(); + bitField2_ = (bitField2_ & ~0x08000000); + onChanged(); + return this; + } + /** + * <code>string constellation = 1018;</code> + * @param value The bytes for constellation to set. + * @return This builder for chaining. + */ + public Builder setConstellationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + constellation_ = value; + bitField2_ |= 0x08000000; + onChanged(); + return this; + } + + private int disableIchat_ ; + /** + * <code>int32 disableIchat = 1019;</code> + * @return The disableIchat. + */ + @java.lang.Override + public int getDisableIchat() { + return disableIchat_; + } + /** + * <code>int32 disableIchat = 1019;</code> + * @param value The disableIchat to set. + * @return This builder for chaining. + */ + public Builder setDisableIchat(int value) { + + disableIchat_ = value; + bitField2_ |= 0x10000000; + onChanged(); + return this; + } + /** + * <code>int32 disableIchat = 1019;</code> + * @return This builder for chaining. + */ + public Builder clearDisableIchat() { + bitField2_ = (bitField2_ & ~0x10000000); + disableIchat_ = 0; + onChanged(); + return this; + } + + private long enableIchatImg_ ; + /** + * <code>int64 enableIchatImg = 1020;</code> + * @return The enableIchatImg. + */ + @java.lang.Override + public long getEnableIchatImg() { + return enableIchatImg_; + } + /** + * <code>int64 enableIchatImg = 1020;</code> + * @param value The enableIchatImg to set. + * @return This builder for chaining. + */ + public Builder setEnableIchatImg(long value) { + + enableIchatImg_ = value; + bitField2_ |= 0x20000000; + onChanged(); + return this; + } + /** + * <code>int64 enableIchatImg = 1020;</code> + * @return This builder for chaining. + */ + public Builder clearEnableIchatImg() { + bitField2_ = (bitField2_ & ~0x20000000); + enableIchatImg_ = 0L; + onChanged(); + return this; + } + + private int exp_ ; + /** + * <code>int32 exp = 1021;</code> + * @return The exp. + */ + @java.lang.Override + public int getExp() { + return exp_; + } + /** + * <code>int32 exp = 1021;</code> + * @param value The exp to set. + * @return This builder for chaining. + */ + public Builder setExp(int value) { + + exp_ = value; + bitField2_ |= 0x40000000; + onChanged(); + return this; + } + /** + * <code>int32 exp = 1021;</code> + * @return This builder for chaining. + */ + public Builder clearExp() { + bitField2_ = (bitField2_ & ~0x40000000); + exp_ = 0; + onChanged(); + return this; + } + + private long fanTicketCount_ ; + /** + * <code>int64 fanTicketCount = 1022;</code> + * @return The fanTicketCount. + */ + @java.lang.Override + public long getFanTicketCount() { + return fanTicketCount_; + } + /** + * <code>int64 fanTicketCount = 1022;</code> + * @param value The fanTicketCount to set. + * @return This builder for chaining. + */ + public Builder setFanTicketCount(long value) { + + fanTicketCount_ = value; + bitField2_ |= 0x80000000; + onChanged(); + return this; + } + /** + * <code>int64 fanTicketCount = 1022;</code> + * @return This builder for chaining. + */ + public Builder clearFanTicketCount() { + bitField2_ = (bitField2_ & ~0x80000000); + fanTicketCount_ = 0L; + onChanged(); + return this; + } + + private boolean foldStrangerChat_ ; + /** + * <code>bool foldStrangerChat = 1023;</code> + * @return The foldStrangerChat. + */ + @java.lang.Override + public boolean getFoldStrangerChat() { + return foldStrangerChat_; + } + /** + * <code>bool foldStrangerChat = 1023;</code> + * @param value The foldStrangerChat to set. + * @return This builder for chaining. + */ + public Builder setFoldStrangerChat(boolean value) { + + foldStrangerChat_ = value; + bitField3_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>bool foldStrangerChat = 1023;</code> + * @return This builder for chaining. + */ + public Builder clearFoldStrangerChat() { + bitField3_ = (bitField3_ & ~0x00000001); + foldStrangerChat_ = false; + onChanged(); + return this; + } + + private long followStatus_ ; + /** + * <code>int64 followStatus = 1024;</code> + * @return The followStatus. + */ + @java.lang.Override + public long getFollowStatus() { + return followStatus_; + } + /** + * <code>int64 followStatus = 1024;</code> + * @param value The followStatus to set. + * @return This builder for chaining. + */ + public Builder setFollowStatus(long value) { + + followStatus_ = value; + bitField3_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>int64 followStatus = 1024;</code> + * @return This builder for chaining. + */ + public Builder clearFollowStatus() { + bitField3_ = (bitField3_ & ~0x00000002); + followStatus_ = 0L; + onChanged(); + return this; + } + + private boolean hotsoonVerified_ ; + /** + * <code>bool hotsoonVerified = 1025;</code> + * @return The hotsoonVerified. + */ + @java.lang.Override + public boolean getHotsoonVerified() { + return hotsoonVerified_; + } + /** + * <code>bool hotsoonVerified = 1025;</code> + * @param value The hotsoonVerified to set. + * @return This builder for chaining. + */ + public Builder setHotsoonVerified(boolean value) { + + hotsoonVerified_ = value; + bitField3_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>bool hotsoonVerified = 1025;</code> + * @return This builder for chaining. + */ + public Builder clearHotsoonVerified() { + bitField3_ = (bitField3_ & ~0x00000004); + hotsoonVerified_ = false; + onChanged(); + return this; + } + + private java.lang.Object hotsoonVerifiedReason_ = ""; + /** + * <code>string hotsoonVerifiedReason = 1026;</code> + * @return The hotsoonVerifiedReason. + */ + public java.lang.String getHotsoonVerifiedReason() { + java.lang.Object ref = hotsoonVerifiedReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + hotsoonVerifiedReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string hotsoonVerifiedReason = 1026;</code> + * @return The bytes for hotsoonVerifiedReason. + */ + public com.google.protobuf.ByteString + getHotsoonVerifiedReasonBytes() { + java.lang.Object ref = hotsoonVerifiedReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + hotsoonVerifiedReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string hotsoonVerifiedReason = 1026;</code> + * @param value The hotsoonVerifiedReason to set. + * @return This builder for chaining. + */ + public Builder setHotsoonVerifiedReason( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + hotsoonVerifiedReason_ = value; + bitField3_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>string hotsoonVerifiedReason = 1026;</code> + * @return This builder for chaining. + */ + public Builder clearHotsoonVerifiedReason() { + hotsoonVerifiedReason_ = getDefaultInstance().getHotsoonVerifiedReason(); + bitField3_ = (bitField3_ & ~0x00000008); + onChanged(); + return this; + } + /** + * <code>string hotsoonVerifiedReason = 1026;</code> + * @param value The bytes for hotsoonVerifiedReason to set. + * @return This builder for chaining. + */ + public Builder setHotsoonVerifiedReasonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + hotsoonVerifiedReason_ = value; + bitField3_ |= 0x00000008; + onChanged(); + return this; + } + + private int ichatRestrictType_ ; + /** + * <code>int32 ichatRestrictType = 1027;</code> + * @return The ichatRestrictType. + */ + @java.lang.Override + public int getIchatRestrictType() { + return ichatRestrictType_; + } + /** + * <code>int32 ichatRestrictType = 1027;</code> + * @param value The ichatRestrictType to set. + * @return This builder for chaining. + */ + public Builder setIchatRestrictType(int value) { + + ichatRestrictType_ = value; + bitField3_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>int32 ichatRestrictType = 1027;</code> + * @return This builder for chaining. + */ + public Builder clearIchatRestrictType() { + bitField3_ = (bitField3_ & ~0x00000010); + ichatRestrictType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object idStr_ = ""; + /** + * <code>string idStr = 1028;</code> + * @return The idStr. + */ + public java.lang.String getIdStr() { + java.lang.Object ref = idStr_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + idStr_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string idStr = 1028;</code> + * @return The bytes for idStr. + */ + public com.google.protobuf.ByteString + getIdStrBytes() { + java.lang.Object ref = idStr_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + idStr_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string idStr = 1028;</code> + * @param value The idStr to set. + * @return This builder for chaining. + */ + public Builder setIdStr( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + idStr_ = value; + bitField3_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>string idStr = 1028;</code> + * @return This builder for chaining. + */ + public Builder clearIdStr() { + idStr_ = getDefaultInstance().getIdStr(); + bitField3_ = (bitField3_ & ~0x00000020); + onChanged(); + return this; + } + /** + * <code>string idStr = 1028;</code> + * @param value The bytes for idStr to set. + * @return This builder for chaining. + */ + public Builder setIdStrBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + idStr_ = value; + bitField3_ |= 0x00000020; + onChanged(); + return this; + } + + private boolean isFollower_ ; + /** + * <code>bool isFollower = 1029;</code> + * @return The isFollower. + */ + @java.lang.Override + public boolean getIsFollower() { + return isFollower_; + } + /** + * <code>bool isFollower = 1029;</code> + * @param value The isFollower to set. + * @return This builder for chaining. + */ + public Builder setIsFollower(boolean value) { + + isFollower_ = value; + bitField3_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>bool isFollower = 1029;</code> + * @return This builder for chaining. + */ + public Builder clearIsFollower() { + bitField3_ = (bitField3_ & ~0x00000040); + isFollower_ = false; + onChanged(); + return this; + } + + private boolean isFollowing_ ; + /** + * <code>bool isFollowing = 1030;</code> + * @return The isFollowing. + */ + @java.lang.Override + public boolean getIsFollowing() { + return isFollowing_; + } + /** + * <code>bool isFollowing = 1030;</code> + * @param value The isFollowing to set. + * @return This builder for chaining. + */ + public Builder setIsFollowing(boolean value) { + + isFollowing_ = value; + bitField3_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>bool isFollowing = 1030;</code> + * @return This builder for chaining. + */ + public Builder clearIsFollowing() { + bitField3_ = (bitField3_ & ~0x00000080); + isFollowing_ = false; + onChanged(); + return this; + } + + private boolean needProfileGuide_ ; + /** + * <code>bool needProfileGuide = 1031;</code> + * @return The needProfileGuide. + */ + @java.lang.Override + public boolean getNeedProfileGuide() { + return needProfileGuide_; + } + /** + * <code>bool needProfileGuide = 1031;</code> + * @param value The needProfileGuide to set. + * @return This builder for chaining. + */ + public Builder setNeedProfileGuide(boolean value) { + + needProfileGuide_ = value; + bitField3_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>bool needProfileGuide = 1031;</code> + * @return This builder for chaining. + */ + public Builder clearNeedProfileGuide() { + bitField3_ = (bitField3_ & ~0x00000100); + needProfileGuide_ = false; + onChanged(); + return this; + } + + private long payScores_ ; + /** + * <code>int64 payScores = 1032;</code> + * @return The payScores. + */ + @java.lang.Override + public long getPayScores() { + return payScores_; + } + /** + * <code>int64 payScores = 1032;</code> + * @param value The payScores to set. + * @return This builder for chaining. + */ + public Builder setPayScores(long value) { + + payScores_ = value; + bitField3_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>int64 payScores = 1032;</code> + * @return This builder for chaining. + */ + public Builder clearPayScores() { + bitField3_ = (bitField3_ & ~0x00000200); + payScores_ = 0L; + onChanged(); + return this; + } + + private boolean pushCommentStatus_ ; + /** + * <code>bool pushCommentStatus = 1033;</code> + * @return The pushCommentStatus. + */ + @java.lang.Override + public boolean getPushCommentStatus() { + return pushCommentStatus_; + } + /** + * <code>bool pushCommentStatus = 1033;</code> + * @param value The pushCommentStatus to set. + * @return This builder for chaining. + */ + public Builder setPushCommentStatus(boolean value) { + + pushCommentStatus_ = value; + bitField3_ |= 0x00000400; + onChanged(); + return this; + } + /** + * <code>bool pushCommentStatus = 1033;</code> + * @return This builder for chaining. + */ + public Builder clearPushCommentStatus() { + bitField3_ = (bitField3_ & ~0x00000400); + pushCommentStatus_ = false; + onChanged(); + return this; + } + + private boolean pushDigg_ ; + /** + * <code>bool pushDigg = 1034;</code> + * @return The pushDigg. + */ + @java.lang.Override + public boolean getPushDigg() { + return pushDigg_; + } + /** + * <code>bool pushDigg = 1034;</code> + * @param value The pushDigg to set. + * @return This builder for chaining. + */ + public Builder setPushDigg(boolean value) { + + pushDigg_ = value; + bitField3_ |= 0x00000800; + onChanged(); + return this; + } + /** + * <code>bool pushDigg = 1034;</code> + * @return This builder for chaining. + */ + public Builder clearPushDigg() { + bitField3_ = (bitField3_ & ~0x00000800); + pushDigg_ = false; + onChanged(); + return this; + } + + private boolean pushFollow_ ; + /** + * <code>bool pushFollow = 1035;</code> + * @return The pushFollow. + */ + @java.lang.Override + public boolean getPushFollow() { + return pushFollow_; + } + /** + * <code>bool pushFollow = 1035;</code> + * @param value The pushFollow to set. + * @return This builder for chaining. + */ + public Builder setPushFollow(boolean value) { + + pushFollow_ = value; + bitField3_ |= 0x00001000; + onChanged(); + return this; + } + /** + * <code>bool pushFollow = 1035;</code> + * @return This builder for chaining. + */ + public Builder clearPushFollow() { + bitField3_ = (bitField3_ & ~0x00001000); + pushFollow_ = false; + onChanged(); + return this; + } + + private boolean pushFriendAction_ ; + /** + * <code>bool pushFriendAction = 1036;</code> + * @return The pushFriendAction. + */ + @java.lang.Override + public boolean getPushFriendAction() { + return pushFriendAction_; + } + /** + * <code>bool pushFriendAction = 1036;</code> + * @param value The pushFriendAction to set. + * @return This builder for chaining. + */ + public Builder setPushFriendAction(boolean value) { + + pushFriendAction_ = value; + bitField3_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>bool pushFriendAction = 1036;</code> + * @return This builder for chaining. + */ + public Builder clearPushFriendAction() { + bitField3_ = (bitField3_ & ~0x00002000); + pushFriendAction_ = false; + onChanged(); + return this; + } + + private boolean pushIchat_ ; + /** + * <code>bool pushIchat = 1037;</code> + * @return The pushIchat. + */ + @java.lang.Override + public boolean getPushIchat() { + return pushIchat_; + } + /** + * <code>bool pushIchat = 1037;</code> + * @param value The pushIchat to set. + * @return This builder for chaining. + */ + public Builder setPushIchat(boolean value) { + + pushIchat_ = value; + bitField3_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <code>bool pushIchat = 1037;</code> + * @return This builder for chaining. + */ + public Builder clearPushIchat() { + bitField3_ = (bitField3_ & ~0x00004000); + pushIchat_ = false; + onChanged(); + return this; + } + + private boolean pushStatus_ ; + /** + * <code>bool pushStatus = 1038;</code> + * @return The pushStatus. + */ + @java.lang.Override + public boolean getPushStatus() { + return pushStatus_; + } + /** + * <code>bool pushStatus = 1038;</code> + * @param value The pushStatus to set. + * @return This builder for chaining. + */ + public Builder setPushStatus(boolean value) { + + pushStatus_ = value; + bitField3_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>bool pushStatus = 1038;</code> + * @return This builder for chaining. + */ + public Builder clearPushStatus() { + bitField3_ = (bitField3_ & ~0x00008000); + pushStatus_ = false; + onChanged(); + return this; + } + + private boolean pushVideoPost_ ; + /** + * <code>bool pushVideoPost = 1039;</code> + * @return The pushVideoPost. + */ + @java.lang.Override + public boolean getPushVideoPost() { + return pushVideoPost_; + } + /** + * <code>bool pushVideoPost = 1039;</code> + * @param value The pushVideoPost to set. + * @return This builder for chaining. + */ + public Builder setPushVideoPost(boolean value) { + + pushVideoPost_ = value; + bitField3_ |= 0x00010000; + onChanged(); + return this; + } + /** + * <code>bool pushVideoPost = 1039;</code> + * @return This builder for chaining. + */ + public Builder clearPushVideoPost() { + bitField3_ = (bitField3_ & ~0x00010000); + pushVideoPost_ = false; + onChanged(); + return this; + } + + private boolean pushVideoRecommend_ ; + /** + * <code>bool pushVideoRecommend = 1040;</code> + * @return The pushVideoRecommend. + */ + @java.lang.Override + public boolean getPushVideoRecommend() { + return pushVideoRecommend_; + } + /** + * <code>bool pushVideoRecommend = 1040;</code> + * @param value The pushVideoRecommend to set. + * @return This builder for chaining. + */ + public Builder setPushVideoRecommend(boolean value) { + + pushVideoRecommend_ = value; + bitField3_ |= 0x00020000; + onChanged(); + return this; + } + /** + * <code>bool pushVideoRecommend = 1040;</code> + * @return This builder for chaining. + */ + public Builder clearPushVideoRecommend() { + bitField3_ = (bitField3_ & ~0x00020000); + pushVideoRecommend_ = false; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats stats_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStatsOrBuilder> statsBuilder_; + /** + * <code>.User.UserStats stats = 1041;</code> + * @return Whether the stats field is set. + */ + public boolean hasStats() { + return ((bitField3_ & 0x00040000) != 0); + } + /** + * <code>.User.UserStats stats = 1041;</code> + * @return The stats. + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats getStats() { + if (statsBuilder_ == null) { + return stats_ == null ? tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.getDefaultInstance() : stats_; + } else { + return statsBuilder_.getMessage(); + } + } + /** + * <code>.User.UserStats stats = 1041;</code> + */ + public Builder setStats(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats value) { + if (statsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stats_ = value; + } else { + statsBuilder_.setMessage(value); + } + bitField3_ |= 0x00040000; + onChanged(); + return this; + } + /** + * <code>.User.UserStats stats = 1041;</code> + */ + public Builder setStats( + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.Builder builderForValue) { + if (statsBuilder_ == null) { + stats_ = builderForValue.build(); + } else { + statsBuilder_.setMessage(builderForValue.build()); + } + bitField3_ |= 0x00040000; + onChanged(); + return this; + } + /** + * <code>.User.UserStats stats = 1041;</code> + */ + public Builder mergeStats(tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats value) { + if (statsBuilder_ == null) { + if (((bitField3_ & 0x00040000) != 0) && + stats_ != null && + stats_ != tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.getDefaultInstance()) { + getStatsBuilder().mergeFrom(value); + } else { + stats_ = value; + } + } else { + statsBuilder_.mergeFrom(value); + } + bitField3_ |= 0x00040000; + onChanged(); + return this; + } + /** + * <code>.User.UserStats stats = 1041;</code> + */ + public Builder clearStats() { + bitField3_ = (bitField3_ & ~0x00040000); + stats_ = null; + if (statsBuilder_ != null) { + statsBuilder_.dispose(); + statsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.User.UserStats stats = 1041;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.Builder getStatsBuilder() { + bitField3_ |= 0x00040000; + onChanged(); + return getStatsFieldBuilder().getBuilder(); + } + /** + * <code>.User.UserStats stats = 1041;</code> + */ + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStatsOrBuilder getStatsOrBuilder() { + if (statsBuilder_ != null) { + return statsBuilder_.getMessageOrBuilder(); + } else { + return stats_ == null ? + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.getDefaultInstance() : stats_; + } + } + /** + * <code>.User.UserStats stats = 1041;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStatsOrBuilder> + getStatsFieldBuilder() { + if (statsBuilder_ == null) { + statsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStats.Builder, tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User.UserStatsOrBuilder>( + getStats(), + getParentForChildren(), + isClean()); + stats_ = null; + } + return statsBuilder_; + } + + private boolean verifiedMobile_ ; + /** + * <code>bool verifiedMobile = 1042;</code> + * @return The verifiedMobile. + */ + @java.lang.Override + public boolean getVerifiedMobile() { + return verifiedMobile_; + } + /** + * <code>bool verifiedMobile = 1042;</code> + * @param value The verifiedMobile to set. + * @return This builder for chaining. + */ + public Builder setVerifiedMobile(boolean value) { + + verifiedMobile_ = value; + bitField3_ |= 0x00080000; + onChanged(); + return this; + } + /** + * <code>bool verifiedMobile = 1042;</code> + * @return This builder for chaining. + */ + public Builder clearVerifiedMobile() { + bitField3_ = (bitField3_ & ~0x00080000); + verifiedMobile_ = false; + onChanged(); + return this; + } + + private java.lang.Object verifiedReason_ = ""; + /** + * <code>string verifiedReason = 1043;</code> + * @return The verifiedReason. + */ + public java.lang.String getVerifiedReason() { + java.lang.Object ref = verifiedReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + verifiedReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string verifiedReason = 1043;</code> + * @return The bytes for verifiedReason. + */ + public com.google.protobuf.ByteString + getVerifiedReasonBytes() { + java.lang.Object ref = verifiedReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + verifiedReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string verifiedReason = 1043;</code> + * @param value The verifiedReason to set. + * @return This builder for chaining. + */ + public Builder setVerifiedReason( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + verifiedReason_ = value; + bitField3_ |= 0x00100000; + onChanged(); + return this; + } + /** + * <code>string verifiedReason = 1043;</code> + * @return This builder for chaining. + */ + public Builder clearVerifiedReason() { + verifiedReason_ = getDefaultInstance().getVerifiedReason(); + bitField3_ = (bitField3_ & ~0x00100000); + onChanged(); + return this; + } + /** + * <code>string verifiedReason = 1043;</code> + * @param value The bytes for verifiedReason to set. + * @return This builder for chaining. + */ + public Builder setVerifiedReasonBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + verifiedReason_ = value; + bitField3_ |= 0x00100000; + onChanged(); + return this; + } + + private boolean withCarManagementPermission_ ; + /** + * <code>bool withCarManagementPermission = 1044;</code> + * @return The withCarManagementPermission. + */ + @java.lang.Override + public boolean getWithCarManagementPermission() { + return withCarManagementPermission_; + } + /** + * <code>bool withCarManagementPermission = 1044;</code> + * @param value The withCarManagementPermission to set. + * @return This builder for chaining. + */ + public Builder setWithCarManagementPermission(boolean value) { + + withCarManagementPermission_ = value; + bitField3_ |= 0x00200000; + onChanged(); + return this; + } + /** + * <code>bool withCarManagementPermission = 1044;</code> + * @return This builder for chaining. + */ + public Builder clearWithCarManagementPermission() { + bitField3_ = (bitField3_ & ~0x00200000); + withCarManagementPermission_ = false; + onChanged(); + return this; + } + + private int ageRange_ ; + /** + * <code>int32 ageRange = 1045;</code> + * @return The ageRange. + */ + @java.lang.Override + public int getAgeRange() { + return ageRange_; + } + /** + * <code>int32 ageRange = 1045;</code> + * @param value The ageRange to set. + * @return This builder for chaining. + */ + public Builder setAgeRange(int value) { + + ageRange_ = value; + bitField3_ |= 0x00400000; + onChanged(); + return this; + } + /** + * <code>int32 ageRange = 1045;</code> + * @return This builder for chaining. + */ + public Builder clearAgeRange() { + bitField3_ = (bitField3_ & ~0x00400000); + ageRange_ = 0; + onChanged(); + return this; + } + + private long watchDurationMonth_ ; + /** + * <code>int64 watchDurationMonth = 1046;</code> + * @return The watchDurationMonth. + */ + @java.lang.Override + public long getWatchDurationMonth() { + return watchDurationMonth_; + } + /** + * <code>int64 watchDurationMonth = 1046;</code> + * @param value The watchDurationMonth to set. + * @return This builder for chaining. + */ + public Builder setWatchDurationMonth(long value) { + + watchDurationMonth_ = value; + bitField3_ |= 0x00800000; + onChanged(); + return this; + } + /** + * <code>int64 watchDurationMonth = 1046;</code> + * @return This builder for chaining. + */ + public Builder clearWatchDurationMonth() { + bitField3_ = (bitField3_ & ~0x00800000); + watchDurationMonth_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:User) + } + + // @@protoc_insertion_point(class_scope:User) + private static final tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User(); + } + + public static tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<User> + PARSER = new com.google.protobuf.AbstractParser<User>() { + @java.lang.Override + public User parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<User> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<User> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.UserOuterClass.User getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_ActivityInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_ActivityInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_AnchorInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_AnchorInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_AnchorLevel_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_AnchorLevel_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_AuthenticationInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_AuthenticationInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_AuthorStats_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_AuthorStats_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_Border_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_Border_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_BrotherhoodInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_BrotherhoodInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_FansClub_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_FansClub_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_FansClub_PreferDataEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_FansClub_PreferDataEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_FansClub_FansClubData_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_FansClub_FansClubData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_FansClub_FansClubData_UserBadge_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_FansClub_FansClubData_UserBadge_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_FansClub_FansClubData_UserBadge_IconsEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_FansClub_FansClubData_UserBadge_IconsEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_FansGroupInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_FansGroupInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_FollowInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_FollowInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_JAccreditInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_JAccreditInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_NobleLevelInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_NobleLevelInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_OwnRoom_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_OwnRoom_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_PayGrade_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_PayGrade_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_PayGrade_GradeIcon_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_PayGrade_GradeIcon_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_PoiInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_PoiInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_ProfileStyleParams_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_ProfileStyleParams_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_Subscribe_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_Subscribe_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_UserAttr_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_UserAttr_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_UserDressInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_UserDressInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_UserVIPInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_UserVIPInfo_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_UserStats_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_UserStats_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_User_XiguaParams_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_User_XiguaParams_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\nUser.proto\032\013Image.proto\"\366\'\n\004User\022\n\n\002id" + + "\030\001 \001(\004\022\017\n\007shortId\030\002 \001(\004\022\020\n\010nickname\030\003 \001(" + + "\t\022\016\n\006gender\030\004 \001(\r\022\021\n\tsignature\030\005 \001(\t\022\r\n\005" + + "level\030\006 \001(\r\022\020\n\010birthday\030\007 \001(\004\022\021\n\ttelepho" + + "ne\030\010 \001(\t\022\033\n\013avatarThumb\030\t \001(\0132\006.Image\022\034\n" + + "\014avatarMedium\030\n \001(\0132\006.Image\022\033\n\013avatarLar" + + "ge\030\013 \001(\0132\006.Image\022\020\n\010verified\030\014 \001(\010\022\022\n\nex" + + "perience\030\r \001(\005\022\014\n\004city\030\016 \001(\t\022\016\n\006status\030\017" + + " \001(\005\022\022\n\ncreateTime\030\020 \001(\003\022\022\n\nmodifyTime\030\021" + + " \001(\003\022\016\n\006secret\030\022 \001(\005\022\026\n\016shareQrcodeUri\030\023" + + " \001(\t\022\032\n\022incomeSharePercent\030\024 \001(\005\022\"\n\022badg" + + "eImageListList\030\025 \001(\0132\006.Image\022$\n\nfollowIn" + + "fo\030\026 \001(\0132\020.User.FollowInfo\022 \n\010payGrade\030\027" + + " \001(\0132\016.User.PayGrade\022 \n\010fansClub\030\030 \001(\0132\016" + + ".User.FansClub\022\034\n\006border\030\031 \001(\0132\014.User.Bo" + + "rder\022\021\n\tspecialId\030\032 \001(\t\022\034\n\014avatarBorder\030" + + "\033 \001(\0132\006.Image\022\025\n\005medal\030\034 \001(\0132\006.Image\022!\n\021" + + "realTimeIconsList\030\035 \003(\0132\006.Image\022$\n\024newRe" + + "alTimeIconsList\030\036 \003(\0132\006.Image\022\020\n\010topVipN" + + "o\030\037 \001(\003\022 \n\010userAttr\030 \001(\0132\016.User.UserAtt" + + "r\022\036\n\007ownRoom\030! \001(\0132\r.User.OwnRoom\022\020\n\010pay" + + "Score\030\" \001(\003\022\023\n\013ticketCount\030# \001(\003\022$\n\nanch" + + "orInfo\030$ \001(\0132\020.User.AnchorInfo\022\024\n\014linkMi" + + "cStats\030% \001(\005\022\021\n\tdisplayId\030& \001(\t\022\036\n\026withC" + + "ommercePermission\030\' \001(\010\022\033\n\023withFusionSho" + + "pEntry\030( \001(\010\022!\n\031totalRechargeDiamondCoun" + + "t\030) \001(\003\022-\n\022webcastAnchorLevel\030* \001(\0132\021.Us" + + "er.AnchorLevel\022\027\n\017verifiedContent\030+ \001(\t\022" + + "&\n\013authorStats\030, \001(\0132\021.User.AuthorStats\022" + + "\032\n\013topFansList\030- \003(\0132\005.User\022\016\n\006secUid\030. " + + "\001(\t\022\020\n\010userRole\030/ \001(\005\022$\n\txiguaInfo\0300 \001(\013" + + "2\021.User.XiguaParams\022*\n\016activityReward\0301 " + + "\001(\0132\022.User.ActivityInfo\022\'\n\tnobleInfo\0302 \001" + + "(\0132\024.User.NobleLevelInfo\022.\n\017brotherhoodI" + + "nfo\0303 \001(\0132\025.User.BrotherhoodInfo\022\034\n\014pers" + + "onalCard\0304 \001(\0132\006.Image\0224\n\022authentication" + + "Info\0305 \001(\0132\030.User.AuthenticationInfo\022\031\n\021" + + "authorizationInfo\0306 \001(\005\022\"\n\032adversaryAuth" + + "orizationInfo\0307 \001(\005\022\036\n\007poiInfo\0308 \001(\0132\r.U" + + "ser.PoiInfo\022\'\n\027mediaBadgeImageListList\0309" + + " \001(\0132\006.Image\022\033\n\023adversaryUserStatus\030: \001(" + + "\005\022&\n\013userVipInfo\030; \001(\0132\021.User.UserVIPInf" + + "o\022$\n\034commerceWebcastConfigIdsList\030< \003(\003\022" + + "$\n\024badgeImageListV2List\030= \001(\0132\006.Image\022\024\n" + + "\014locationCity\030? \001(\t\022*\n\rfansGroupInfo\030@ \001" + + "(\0132\023.User.FansGroupInfo\022\022\n\nremarkName\030A " + + "\001(\t\022\022\n\nmysteryMan\030B \001(\005\022\016\n\006webRid\030C \001(\t\022" + + "\034\n\024desensitizedNickname\030D \001(\t\022*\n\rjAccred" + + "itInfo\030E \001(\0132\023.User.JAccreditInfo\022\"\n\tsub" + + "scribe\030F \001(\0132\017.User.Subscribe\022\023\n\013isAnony" + + "mous\030G \001(\010\022\033\n\023consumeDiamondLevel\030H \001(\005\022" + + "\022\n\nwebcastUid\030I \001(\t\0224\n\022profileStyleParam" + + "s\030J \001(\0132\030.User.ProfileStyleParams\022*\n\ruse" + + "rDressInfo\030K \001(\0132\023.User.UserDressInfo\022\027\n" + + "\016allowBeLocated\030\351\007 \001(\010\022\034\n\023allowFindByCon" + + "tacts\030\352\007 \001(\010\022!\n\030allowOthersDownloadVideo" + + "\030\353\007 \001(\010\022,\n#allowOthersDownloadWhenSharin" + + "gVideo\030\354\007 \001(\010\022\036\n\025allowShareShowProfile\030\355" + + "\007 \001(\010\022\032\n\021allowShowInGossip\030\356\007 \001(\010\022\032\n\021all" + + "owShowMyAction\030\357\007 \001(\010\022\034\n\023allowStrangeCom" + + "ment\030\360\007 \001(\010\022\037\n\026allowUnfollowerComment\030\361\007" + + " \001(\010\022\030\n\017allowUseLinkmic\030\362\007 \001(\010\022\'\n\013anchor" + + "Level\030\363\007 \001(\0132\021.User.AnchorLevel\022\032\n\tavata" + + "rJpg\030\364\007 \001(\0132\006.Image\022\021\n\010bgImgUrl\030\365\007 \001(\t\022\034" + + "\n\023birthdayDescription\030\366\007 \001(\t\022\026\n\rbirthday" + + "Valid\030\367\007 \001(\010\022\024\n\013blockStatus\030\370\007 \001(\005\022\030\n\017co" + + "mmentRestrict\030\371\007 \001(\005\022\026\n\rconstellation\030\372\007" + + " \001(\t\022\025\n\014disableIchat\030\373\007 \001(\005\022\027\n\016enableIch" + + "atImg\030\374\007 \001(\003\022\014\n\003exp\030\375\007 \001(\005\022\027\n\016fanTicketC" + + "ount\030\376\007 \001(\003\022\031\n\020foldStrangerChat\030\377\007 \001(\010\022\025" + + "\n\014followStatus\030\200\010 \001(\003\022\030\n\017hotsoonVerified" + + "\030\201\010 \001(\010\022\036\n\025hotsoonVerifiedReason\030\202\010 \001(\t\022" + + "\032\n\021ichatRestrictType\030\203\010 \001(\005\022\016\n\005idStr\030\204\010 " + + "\001(\t\022\023\n\nisFollower\030\205\010 \001(\010\022\024\n\013isFollowing\030" + + "\206\010 \001(\010\022\031\n\020needProfileGuide\030\207\010 \001(\010\022\022\n\tpay" + + "Scores\030\210\010 \001(\003\022\032\n\021pushCommentStatus\030\211\010 \001(" + + "\010\022\021\n\010pushDigg\030\212\010 \001(\010\022\023\n\npushFollow\030\213\010 \001(" + + "\010\022\031\n\020pushFriendAction\030\214\010 \001(\010\022\022\n\tpushIcha" + + "t\030\215\010 \001(\010\022\023\n\npushStatus\030\216\010 \001(\010\022\026\n\rpushVid" + + "eoPost\030\217\010 \001(\010\022\033\n\022pushVideoRecommend\030\220\010 \001" + + "(\010\022\037\n\005stats\030\221\010 \001(\0132\017.User.UserStats\022\027\n\016v" + + "erifiedMobile\030\222\010 \001(\010\022\027\n\016verifiedReason\030\223" + + "\010 \001(\t\022$\n\033withCarManagementPermission\030\224\010 " + + "\001(\010\022\021\n\010ageRange\030\225\010 \001(\005\022\033\n\022watchDurationM" + + "onth\030\226\010 \001(\003\032\016\n\014ActivityInfo\032\014\n\nAnchorInf" + + "o\032\r\n\013AnchorLevel\032\024\n\022AuthenticationInfo\032\r" + + "\n\013AuthorStats\032\010\n\006Border\032\021\n\017BrotherhoodIn" + + "fo\032\375\003\n\010FansClub\022)\n\004data\030\001 \001(\0132\033.User.Fan" + + "sClub.FansClubData\0222\n\npreferData\030\002 \003(\0132\036" + + ".User.FansClub.PreferDataEntry\032N\n\017Prefer" + + "DataEntry\022\013\n\003key\030\001 \001(\005\022*\n\005value\030\002 \001(\0132\033." + + "User.FansClub.FansClubData:\0028\001\032\301\002\n\014FansC" + + "lubData\022\020\n\010clubName\030\001 \001(\t\022\r\n\005level\030\002 \001(\005" + + "\022\032\n\022userFansClubStatus\030\003 \001(\005\0224\n\005badge\030\004 " + + "\001(\0132%.User.FansClub.FansClubData.UserBad" + + "ge\022\030\n\020availableGiftIds\030\005 \003(\003\022\020\n\010anchorId" + + "\030\006 \001(\003\032\221\001\n\tUserBadge\022?\n\005icons\030\001 \003(\01320.Us" + + "er.FansClub.FansClubData.UserBadge.Icons" + + "Entry\022\r\n\005title\030\002 \001(\t\0324\n\nIconsEntry\022\013\n\003ke" + + "y\030\001 \001(\005\022\025\n\005value\030\002 \001(\0132\006.Image:\0028\001\032\017\n\rFa" + + "nsGroupInfo\032y\n\nFollowInfo\022\026\n\016followingCo" + + "unt\030\001 \001(\003\022\025\n\rfollowerCount\030\002 \001(\003\022\024\n\014foll" + + "owStatus\030\003 \001(\003\022\022\n\npushStatus\030\004 \001(\003\022\022\n\nre" + + "markName\030\005 \001(\t\032\017\n\rJAccreditInfo\032\020\n\016Noble" + + "LevelInfo\032\t\n\007OwnRoom\032\305\006\n\010PayGrade\022\031\n\021tot" + + "alDiamondCount\030\001 \001(\003\022\033\n\013diamondIcon\030\002 \001(" + + "\0132\006.Image\022\014\n\004name\030\003 \001(\t\022\024\n\004icon\030\004 \001(\0132\006." + + "Image\022\020\n\010nextName\030\005 \001(\t\022\r\n\005level\030\006 \001(\003\022\030" + + "\n\010nextIcon\030\007 \001(\0132\006.Image\022\023\n\013nextDiamond\030" + + "\010 \001(\003\022\022\n\nnowDiamond\030\t \001(\003\022\033\n\023thisGradeMi" + + "nDiamond\030\n \001(\003\022\033\n\023thisGradeMaxDiamond\030\013 " + + "\001(\003\022\025\n\rpayDiamondBak\030\014 \001(\003\022\025\n\rgradeDescr" + + "ibe\030\r \001(\t\022/\n\rgradeIconList\030\016 \003(\0132\030.User." + + "PayGrade.GradeIcon\022\026\n\016screenChatType\030\017 \001" + + "(\003\022\026\n\006imIcon\030\020 \001(\0132\006.Image\022\037\n\017imIconWith" + + "Level\030\021 \001(\0132\006.Image\022\030\n\010liveIcon\030\022 \001(\0132\006." + + "Image\022\"\n\022newImIconWithLevel\030\023 \001(\0132\006.Imag" + + "e\022\033\n\013newLiveIcon\030\024 \001(\0132\006.Image\022\032\n\022upgrad" + + "eNeedConsume\030\025 \001(\003\022\026\n\016nextPrivileges\030\026 \001" + + "(\t\022\032\n\nbackground\030\027 \001(\0132\006.Image\022\036\n\016backgr" + + "oundBack\030\030 \001(\0132\006.Image\022\r\n\005score\030\031 \001(\003\022\024\n" + + "\013gradeBanner\030\351\007 \001(\t\022 \n\017profileDialogBg\030\352" + + "\007 \001(\0132\006.Image\022$\n\023profileDialogBgBack\030\353\007 " + + "\001(\0132\006.Image\032W\n\tGradeIcon\022\024\n\004icon\030\001 \001(\0132\006" + + ".Image\022\023\n\013iconDiamond\030\002 \001(\003\022\r\n\005level\030\003 \001" + + "(\003\022\020\n\010levelStr\030\004 \001(\t\032\t\n\007PoiInfo\032\024\n\022Profi" + + "leStyleParams\032\013\n\tSubscribe\032\n\n\010UserAttr\032\017" + + "\n\rUserDressInfo\032\r\n\013UserVIPInfo\032\013\n\tUserSt" + + "ats\032\r\n\013XiguaParamsB8\n6tech.ordinaryroad." + + "live.chat.client.douyin.protobuf.dtob\006pr" + + "oto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor(), + }); + internal_static_User_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_User_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_descriptor, + new java.lang.String[] { "Id", "ShortId", "Nickname", "Gender", "Signature", "Level", "Birthday", "Telephone", "AvatarThumb", "AvatarMedium", "AvatarLarge", "Verified", "Experience", "City", "Status", "CreateTime", "ModifyTime", "Secret", "ShareQrcodeUri", "IncomeSharePercent", "BadgeImageListList", "FollowInfo", "PayGrade", "FansClub", "Border", "SpecialId", "AvatarBorder", "Medal", "RealTimeIconsList", "NewRealTimeIconsList", "TopVipNo", "UserAttr", "OwnRoom", "PayScore", "TicketCount", "AnchorInfo", "LinkMicStats", "DisplayId", "WithCommercePermission", "WithFusionShopEntry", "TotalRechargeDiamondCount", "WebcastAnchorLevel", "VerifiedContent", "AuthorStats", "TopFansList", "SecUid", "UserRole", "XiguaInfo", "ActivityReward", "NobleInfo", "BrotherhoodInfo", "PersonalCard", "AuthenticationInfo", "AuthorizationInfo", "AdversaryAuthorizationInfo", "PoiInfo", "MediaBadgeImageListList", "AdversaryUserStatus", "UserVipInfo", "CommerceWebcastConfigIdsList", "BadgeImageListV2List", "LocationCity", "FansGroupInfo", "RemarkName", "MysteryMan", "WebRid", "DesensitizedNickname", "JAccreditInfo", "Subscribe", "IsAnonymous", "ConsumeDiamondLevel", "WebcastUid", "ProfileStyleParams", "UserDressInfo", "AllowBeLocated", "AllowFindByContacts", "AllowOthersDownloadVideo", "AllowOthersDownloadWhenSharingVideo", "AllowShareShowProfile", "AllowShowInGossip", "AllowShowMyAction", "AllowStrangeComment", "AllowUnfollowerComment", "AllowUseLinkmic", "AnchorLevel", "AvatarJpg", "BgImgUrl", "BirthdayDescription", "BirthdayValid", "BlockStatus", "CommentRestrict", "Constellation", "DisableIchat", "EnableIchatImg", "Exp", "FanTicketCount", "FoldStrangerChat", "FollowStatus", "HotsoonVerified", "HotsoonVerifiedReason", "IchatRestrictType", "IdStr", "IsFollower", "IsFollowing", "NeedProfileGuide", "PayScores", "PushCommentStatus", "PushDigg", "PushFollow", "PushFriendAction", "PushIchat", "PushStatus", "PushVideoPost", "PushVideoRecommend", "Stats", "VerifiedMobile", "VerifiedReason", "WithCarManagementPermission", "AgeRange", "WatchDurationMonth", }); + internal_static_User_ActivityInfo_descriptor = + internal_static_User_descriptor.getNestedTypes().get(0); + internal_static_User_ActivityInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_ActivityInfo_descriptor, + new java.lang.String[] { }); + internal_static_User_AnchorInfo_descriptor = + internal_static_User_descriptor.getNestedTypes().get(1); + internal_static_User_AnchorInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_AnchorInfo_descriptor, + new java.lang.String[] { }); + internal_static_User_AnchorLevel_descriptor = + internal_static_User_descriptor.getNestedTypes().get(2); + internal_static_User_AnchorLevel_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_AnchorLevel_descriptor, + new java.lang.String[] { }); + internal_static_User_AuthenticationInfo_descriptor = + internal_static_User_descriptor.getNestedTypes().get(3); + internal_static_User_AuthenticationInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_AuthenticationInfo_descriptor, + new java.lang.String[] { }); + internal_static_User_AuthorStats_descriptor = + internal_static_User_descriptor.getNestedTypes().get(4); + internal_static_User_AuthorStats_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_AuthorStats_descriptor, + new java.lang.String[] { }); + internal_static_User_Border_descriptor = + internal_static_User_descriptor.getNestedTypes().get(5); + internal_static_User_Border_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_Border_descriptor, + new java.lang.String[] { }); + internal_static_User_BrotherhoodInfo_descriptor = + internal_static_User_descriptor.getNestedTypes().get(6); + internal_static_User_BrotherhoodInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_BrotherhoodInfo_descriptor, + new java.lang.String[] { }); + internal_static_User_FansClub_descriptor = + internal_static_User_descriptor.getNestedTypes().get(7); + internal_static_User_FansClub_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_FansClub_descriptor, + new java.lang.String[] { "Data", "PreferData", }); + internal_static_User_FansClub_PreferDataEntry_descriptor = + internal_static_User_FansClub_descriptor.getNestedTypes().get(0); + internal_static_User_FansClub_PreferDataEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_FansClub_PreferDataEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_User_FansClub_FansClubData_descriptor = + internal_static_User_FansClub_descriptor.getNestedTypes().get(1); + internal_static_User_FansClub_FansClubData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_FansClub_FansClubData_descriptor, + new java.lang.String[] { "ClubName", "Level", "UserFansClubStatus", "Badge", "AvailableGiftIds", "AnchorId", }); + internal_static_User_FansClub_FansClubData_UserBadge_descriptor = + internal_static_User_FansClub_FansClubData_descriptor.getNestedTypes().get(0); + internal_static_User_FansClub_FansClubData_UserBadge_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_FansClub_FansClubData_UserBadge_descriptor, + new java.lang.String[] { "Icons", "Title", }); + internal_static_User_FansClub_FansClubData_UserBadge_IconsEntry_descriptor = + internal_static_User_FansClub_FansClubData_UserBadge_descriptor.getNestedTypes().get(0); + internal_static_User_FansClub_FansClubData_UserBadge_IconsEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_FansClub_FansClubData_UserBadge_IconsEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_User_FansGroupInfo_descriptor = + internal_static_User_descriptor.getNestedTypes().get(8); + internal_static_User_FansGroupInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_FansGroupInfo_descriptor, + new java.lang.String[] { }); + internal_static_User_FollowInfo_descriptor = + internal_static_User_descriptor.getNestedTypes().get(9); + internal_static_User_FollowInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_FollowInfo_descriptor, + new java.lang.String[] { "FollowingCount", "FollowerCount", "FollowStatus", "PushStatus", "RemarkName", }); + internal_static_User_JAccreditInfo_descriptor = + internal_static_User_descriptor.getNestedTypes().get(10); + internal_static_User_JAccreditInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_JAccreditInfo_descriptor, + new java.lang.String[] { }); + internal_static_User_NobleLevelInfo_descriptor = + internal_static_User_descriptor.getNestedTypes().get(11); + internal_static_User_NobleLevelInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_NobleLevelInfo_descriptor, + new java.lang.String[] { }); + internal_static_User_OwnRoom_descriptor = + internal_static_User_descriptor.getNestedTypes().get(12); + internal_static_User_OwnRoom_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_OwnRoom_descriptor, + new java.lang.String[] { }); + internal_static_User_PayGrade_descriptor = + internal_static_User_descriptor.getNestedTypes().get(13); + internal_static_User_PayGrade_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_PayGrade_descriptor, + new java.lang.String[] { "TotalDiamondCount", "DiamondIcon", "Name", "Icon", "NextName", "Level", "NextIcon", "NextDiamond", "NowDiamond", "ThisGradeMinDiamond", "ThisGradeMaxDiamond", "PayDiamondBak", "GradeDescribe", "GradeIconList", "ScreenChatType", "ImIcon", "ImIconWithLevel", "LiveIcon", "NewImIconWithLevel", "NewLiveIcon", "UpgradeNeedConsume", "NextPrivileges", "Background", "BackgroundBack", "Score", "GradeBanner", "ProfileDialogBg", "ProfileDialogBgBack", }); + internal_static_User_PayGrade_GradeIcon_descriptor = + internal_static_User_PayGrade_descriptor.getNestedTypes().get(0); + internal_static_User_PayGrade_GradeIcon_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_PayGrade_GradeIcon_descriptor, + new java.lang.String[] { "Icon", "IconDiamond", "Level", "LevelStr", }); + internal_static_User_PoiInfo_descriptor = + internal_static_User_descriptor.getNestedTypes().get(14); + internal_static_User_PoiInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_PoiInfo_descriptor, + new java.lang.String[] { }); + internal_static_User_ProfileStyleParams_descriptor = + internal_static_User_descriptor.getNestedTypes().get(15); + internal_static_User_ProfileStyleParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_ProfileStyleParams_descriptor, + new java.lang.String[] { }); + internal_static_User_Subscribe_descriptor = + internal_static_User_descriptor.getNestedTypes().get(16); + internal_static_User_Subscribe_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_Subscribe_descriptor, + new java.lang.String[] { }); + internal_static_User_UserAttr_descriptor = + internal_static_User_descriptor.getNestedTypes().get(17); + internal_static_User_UserAttr_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_UserAttr_descriptor, + new java.lang.String[] { }); + internal_static_User_UserDressInfo_descriptor = + internal_static_User_descriptor.getNestedTypes().get(18); + internal_static_User_UserDressInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_UserDressInfo_descriptor, + new java.lang.String[] { }); + internal_static_User_UserVIPInfo_descriptor = + internal_static_User_descriptor.getNestedTypes().get(19); + internal_static_User_UserVIPInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_UserVIPInfo_descriptor, + new java.lang.String[] { }); + internal_static_User_UserStats_descriptor = + internal_static_User_descriptor.getNestedTypes().get(20); + internal_static_User_UserStats_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_UserStats_descriptor, + new java.lang.String[] { }); + internal_static_User_XiguaParams_descriptor = + internal_static_User_descriptor.getNestedTypes().get(21); + internal_static_User_XiguaParams_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_User_XiguaParams_descriptor, + new java.lang.String[] { }); + tech.ordinaryroad.live.chat.client.douyin.protobuf.dto.ImageOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/Common.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/Common.proto new file mode 100644 index 0000000..a09a395 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/Common.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +import "User.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message Common { + string method = 1; + uint64 msgId = 2; + uint64 roomId = 3; + uint64 createTime = 4; + uint32 monitor = 5; + bool isShowMsg = 6; + string describe = 7; + // DisplayText displayText = 8; + uint64 foldType = 9; + uint64 anchorFoldType = 10; + uint64 priorityScore = 11; + string logId = 12; + string msgProcessFilterK = 13; + string msgProcessFilterV = 14; + User user = 15; + // Room room = 16; + uint64 anchorFoldTypeV2 = 17; + uint64 processAtSeiTimeMs = 18; + uint64 randomDispatchMs = 19; + bool isDispatch = 20; + uint32 channelId = 21; + uint64 diffSei2absSecond = 22; + uint64 anchorFoldDuration = 23; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/DoubleLikeDetail.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/DoubleLikeDetail.proto new file mode 100644 index 0000000..de0b28a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/DoubleLikeDetail.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message DoubleLikeDetail { + bool doubleFlag = 1; + uint32 seqId = 2; + uint32 renewalsNum = 3; + uint32 triggersNum = 4; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/GiftIMPriority.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/GiftIMPriority.proto new file mode 100644 index 0000000..3b8db33 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/GiftIMPriority.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message GiftIMPriority { + repeated uint64 queue_sizes_list = 1; + uint64 self_queue_priority = 2; + uint64 priority = 3; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/GiftStruct.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/GiftStruct.proto new file mode 100644 index 0000000..3031acc --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/GiftStruct.proto @@ -0,0 +1,66 @@ +syntax = "proto3"; +import "Image.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message GiftStruct { + Image image = 1; + string describe = 2; + bool notify = 3; + uint64 duration = 4; + uint64 id = 5; + // GiftStructFansClubInfo fansclubInfo = 6; + bool for_linkmic = 7; + bool doodle = 8; + bool for_fansclub = 9; + bool combo = 10; + uint32 type = 11; + uint32 diamond_count = 12; + bool is_displayed_on_panel = 13; + uint64 primary_effect_id = 14; + Image gift_label_icon = 15; + string name = 16; + string region = 17; + string manual = 18; + bool for_custom = 19; + map<string, int64> specialEffectsMap = 20; + Image icon = 21; + uint32 action_type = 22; + int32 watermelonSeeds = 23; + string goldEffect = 24; + // repeated LuckyMoneyGiftMeta subs = 25; + int64 goldenBeans = 26; + int64 honorLevel = 27; + int32 itemType = 28; + string schemeUrl = 29; + // GiftPanelOperation giftOperation = 30; + string eventName = 31; + int64 nobleLevel = 32; + string guideUrl = 33; + bool punishMedicine = 34; + bool forPortal = 35; + string businessText = 36; + bool cnyGift = 37; + int64 appId = 38; + int64 vipLevel = 39; + bool isGray = 40; + string graySchemeUrl = 41; + int64 giftScene = 42; + // GiftBanner giftBanner = 43; + repeated string triggerWords = 44; + // repeated GiftBuffInfo giftBuffInfos = 45; + bool forFirstRecharge = 46; + Image dynamicImgForSelected = 47; + int32 afterSendAction = 48; + int64 giftOfflineTime = 49; + string topBarText = 50; + Image topRightAvatar = 51; + string bannerSchemeUrl = 52; + bool isLocked = 53; + int64 reqExtraType = 54; + repeated int64 assetIds = 55; + // GiftPreviewInfo giftPreviewInfo = 56; + // GiftTip giftTip = 57; + int32 needSweepLightCount = 58; + // repeated GiftGroupInfo groupInfo = 59; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/Image.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/Image.proto new file mode 100644 index 0000000..1f48729 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/Image.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message Image { + repeated string urlListList = 1; + string uri = 2; + int64 height = 3; + int64 width = 4; + string avgColor = 5; + int32 imageType = 6; + string openWebUrl = 7; + Content content = 8; + bool isAnimated = 9; + repeated NinePatchSetting flexSettingListList = 10; + repeated NinePatchSetting textSettingListList = 11; + + message Content { + string name = 1; + string fontColor = 2; + int64 level = 3; + string alternativeText = 4; + } + + message NinePatchSetting{ + + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/PatternRef.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/PatternRef.proto new file mode 100644 index 0000000..5caa0e4 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/PatternRef.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message PatternRef { + string key = 1; + string default_pattern = 2; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/PublicAreaCommon.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/PublicAreaCommon.proto new file mode 100644 index 0000000..01358fd --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/PublicAreaCommon.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; +import "Image.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message PublicAreaCommon { + Image user_label = 1; + uint64 user_consume_in_room = 2; + uint64 user_send_gift_cnt_in_room = 3; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/Text.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/Text.proto new file mode 100644 index 0000000..60f985c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/Text.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +import "TextFormat.proto"; +import "TextPiece.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message Text { + string key = 1; + string default_patter = 2; + TextFormat default_format = 3; + TextPiece pieces_list = 4; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextEffect.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextEffect.proto new file mode 100644 index 0000000..662e168 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextEffect.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +import "TextEffectDetail.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message TextEffect { + TextEffectDetail portrait = 1; + TextEffectDetail landscape = 2; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextEffectDetail.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextEffectDetail.proto new file mode 100644 index 0000000..6d1146a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextEffectDetail.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; +import "Image.proto"; +import "Text.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message TextEffectDetail { + Text text = 1; + uint32 text_font_size = 2; + Image background = 3; + uint32 start = 4; + uint32 duration = 5; + uint32 x = 6; + uint32 y = 7; + uint32 width = 8; + uint32 height = 9; + uint32 shadow_dx = 10; + uint32 shadow_dy = 11; + uint32 shadow_radius = 12; + string shadow_color = 13; + string stroke_color = 14; + uint32 stroke_width = 15; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextFormat.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextFormat.proto new file mode 100644 index 0000000..8ca8ab5 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextFormat.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message TextFormat { + string color = 1; + bool bold = 2; + bool italic = 3; + uint32 weight = 4; + uint32 italic_angle = 5; + uint32 font_size = 6; + bool use_heigh_light_color = 7; + bool use_remote_clor = 8; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPiece.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPiece.proto new file mode 100644 index 0000000..e76d1ce --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPiece.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; +import "TextFormat.proto"; +import "TextPieceImage.proto"; +import "TextPiecePatternRef.proto"; +import "TextPieceHeart.proto"; +import "TextPieceGift.proto"; +import "TextPieceUser.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message TextPiece { + bool type = 1; + TextFormat format = 2; + string string_value = 3; + TextPieceUser user_value = 4; + TextPieceGift gift_value = 5; + TextPieceHeart heart_value = 6; + TextPiecePatternRef pattern_ref_value = 7; + TextPieceImage image_value = 8; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPieceGift.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPieceGift.proto new file mode 100644 index 0000000..5ed59e2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPieceGift.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +import "PatternRef.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message TextPieceGift { + uint64 gift_id = 1; + PatternRef name_ref = 2; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPieceHeart.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPieceHeart.proto new file mode 100644 index 0000000..6528fd1 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPieceHeart.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message TextPieceHeart { + string color = 1; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPieceImage.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPieceImage.proto new file mode 100644 index 0000000..6f50714 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPieceImage.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +import "Image.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message TextPieceImage { + Image image = 1; + float scaling_rate = 2; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPiecePatternRef.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPiecePatternRef.proto new file mode 100644 index 0000000..c3a51aa --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPiecePatternRef.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message TextPiecePatternRef { + string key = 1; + string default_pattern = 2; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPieceUser.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPieceUser.proto new file mode 100644 index 0000000..c46ae9a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/TextPieceUser.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +import "User.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message TextPieceUser { + User user = 1; + bool with_colon = 2; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/User.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/User.proto new file mode 100644 index 0000000..4a29684 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/User.proto @@ -0,0 +1,272 @@ +syntax = "proto3"; +import "Image.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf.dto"; + +message User { + uint64 id = 1; + uint64 shortId = 2; + string nickname = 3; + uint32 gender = 4; + string signature = 5; + uint32 level = 6; + uint64 birthday = 7; + string telephone = 8; + Image avatarThumb = 9; + Image avatarMedium = 10; + Image avatarLarge = 11; + bool verified = 12; + int32 experience = 13; + string city = 14; + int32 status = 15; + int64 createTime = 16; + int64 modifyTime = 17; + int32 secret = 18; + string shareQrcodeUri = 19; + int32 incomeSharePercent = 20; + Image badgeImageListList = 21; + FollowInfo followInfo = 22; + PayGrade payGrade = 23; + FansClub fansClub = 24; + Border border = 25; + string specialId = 26; + Image avatarBorder = 27; + Image medal = 28; + repeated Image realTimeIconsList = 29; + repeated Image newRealTimeIconsList = 30; + int64 topVipNo = 31; + UserAttr userAttr = 32; + OwnRoom ownRoom = 33; + int64 payScore = 34; + int64 ticketCount = 35; + AnchorInfo anchorInfo = 36; + int32 linkMicStats = 37; + string displayId = 38; + bool withCommercePermission = 39; + bool withFusionShopEntry = 40; + int64 totalRechargeDiamondCount = 41; + AnchorLevel webcastAnchorLevel = 42; + string verifiedContent = 43; + AuthorStats authorStats = 44; + repeated User topFansList = 45; + string secUid = 46; + int32 userRole = 47; + XiguaParams xiguaInfo = 48; + ActivityInfo activityReward = 49; + NobleLevelInfo nobleInfo = 50; + BrotherhoodInfo brotherhoodInfo = 51; + Image personalCard = 52; + AuthenticationInfo authenticationInfo = 53; + int32 authorizationInfo = 54; + int32 adversaryAuthorizationInfo = 55; + PoiInfo poiInfo = 56; + Image mediaBadgeImageListList = 57; + int32 adversaryUserStatus = 58; + UserVIPInfo userVipInfo = 59; + repeated int64 commerceWebcastConfigIdsList = 60; + Image badgeImageListV2List = 61; + // IndustryCertification industryCertification = 62; + string locationCity = 63; + FansGroupInfo fansGroupInfo = 64; + string remarkName = 65; + int32 mysteryMan = 66; + string webRid = 67; + string desensitizedNickname = 68; + JAccreditInfo jAccreditInfo = 69; + Subscribe subscribe = 70; + bool isAnonymous = 71; + int32 consumeDiamondLevel = 72; + string webcastUid = 73; + ProfileStyleParams profileStyleParams = 74; + UserDressInfo userDressInfo = 75; + bool allowBeLocated = 1001; + bool allowFindByContacts = 1002; + bool allowOthersDownloadVideo = 1003; + bool allowOthersDownloadWhenSharingVideo = 1004; + bool allowShareShowProfile = 1005; + bool allowShowInGossip = 1006; + bool allowShowMyAction = 1007; + bool allowStrangeComment = 1008; + bool allowUnfollowerComment = 1009; + bool allowUseLinkmic = 1010; + AnchorLevel anchorLevel = 1011; + Image avatarJpg = 1012; + string bgImgUrl = 1013; + string birthdayDescription = 1014; + bool birthdayValid = 1015; + int32 blockStatus = 1016; + int32 commentRestrict = 1017; + string constellation = 1018; + int32 disableIchat = 1019; + int64 enableIchatImg = 1020; + int32 exp = 1021; + int64 fanTicketCount = 1022; + bool foldStrangerChat = 1023; + int64 followStatus = 1024; + bool hotsoonVerified = 1025; + string hotsoonVerifiedReason = 1026; + int32 ichatRestrictType = 1027; + string idStr = 1028; + bool isFollower = 1029; + bool isFollowing = 1030; + bool needProfileGuide = 1031; + int64 payScores = 1032; + bool pushCommentStatus = 1033; + bool pushDigg = 1034; + bool pushFollow = 1035; + bool pushFriendAction = 1036; + bool pushIchat = 1037; + bool pushStatus = 1038; + bool pushVideoPost = 1039; + bool pushVideoRecommend = 1040; + UserStats stats = 1041; + bool verifiedMobile = 1042; + string verifiedReason = 1043; + bool withCarManagementPermission = 1044; + int32 ageRange = 1045; + int64 watchDurationMonth = 1046; + + message ActivityInfo{ + + } + + message AnchorInfo { + + } + + message AnchorLevel{ + + } + + message AuthenticationInfo{ + + } + + message AuthorStats{ + + } + + message Border{ + + } + + message BrotherhoodInfo{ + + } + + message FansClub { + FansClubData data = 1; + map<int32, FansClubData> preferData = 2; + + message FansClubData { + string clubName = 1; + int32 level = 2; + int32 userFansClubStatus = 3; + UserBadge badge = 4; + repeated int64 availableGiftIds = 5; + int64 anchorId = 6; + + message UserBadge { + map<int32, Image> icons = 1; + string title = 2; + } + + } + } + + message FansGroupInfo{ + + } + + message FollowInfo { + int64 followingCount = 1; + int64 followerCount = 2; + int64 followStatus = 3; + int64 pushStatus = 4; + string remarkName = 5; + } + + message JAccreditInfo{ + + } + + message NobleLevelInfo{ + + } + + message OwnRoom { + + } + + message PayGrade { + int64 totalDiamondCount = 1; + Image diamondIcon = 2; + string name = 3; + Image icon = 4; + string nextName = 5; + int64 level = 6; + Image nextIcon = 7; + int64 nextDiamond = 8; + int64 nowDiamond = 9; + int64 thisGradeMinDiamond = 10; + int64 thisGradeMaxDiamond = 11; + int64 payDiamondBak = 12; + string gradeDescribe = 13; + repeated GradeIcon gradeIconList = 14; + int64 screenChatType = 15; + Image imIcon = 16; + Image imIconWithLevel = 17; + Image liveIcon = 18; + Image newImIconWithLevel = 19; + Image newLiveIcon = 20; + int64 upgradeNeedConsume = 21; + string nextPrivileges = 22; + Image background = 23; + Image backgroundBack = 24; + int64 score = 25; + // GradeBuffInfo buffInfo = 26; + string gradeBanner = 1001; + Image profileDialogBg = 1002; + Image profileDialogBgBack = 1003; + + message GradeIcon{ + Image icon = 1; + int64 iconDiamond = 2; + int64 level = 3; + string levelStr = 4; + } + + } + + message PoiInfo{ + + } + + message ProfileStyleParams{ + + } + + message Subscribe{ + + } + + message UserAttr{ + + } + + message UserDressInfo{ + + } + + message UserVIPInfo { + + } + + message UserStats{ + + } + + message XiguaParams{ + + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_cmd_msg.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_cmd_msg.proto new file mode 100644 index 0000000..41a71eb --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_cmd_msg.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf"; +option java_outer_classname = "Douyin_cmd_msgProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +message douyin_cmd_msg { + string method = 1; + bytes payload = 2; + int64 msg_id = 3; + int32 msg_type = 4; + int64 offset = 5; + bool need_wrds_store = 6; + int64 wrds_version = 7; + string wrds_sub_key = 8; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_webcast_chat_message_msg.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_webcast_chat_message_msg.proto new file mode 100644 index 0000000..4866a3b --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_webcast_chat_message_msg.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; +import "Common.proto"; +import "User.proto"; +import "Image.proto"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf"; +option java_outer_classname = "Douyin_webcast_chat_message_msgProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +message douyin_webcast_chat_message_msg { + Common common = 1; + User user = 2; + string content = 3; + bool visible_to_sender = 4; + Image background_image = 5; + string full_screen_text_color = 6; + Image background_image_v2 = 7; + // PublicAreaCommon public_area_common = 9; + Image gift_image = 10; + uint64 agree_msg_id = 11; + uint32 priority_level = 12; + // LandscapeAreaCommon landscape_area_common = 13; + uint64 event_time = 15; + bool send_review = 16; + bool from_intercom = 17; + bool intercom_hide_user_card = 18; + // repeated string chatTagsList = 19; + string chat_by = 20; + uint32 individual_chat_priority = 21; + // Text rtf_content = 22 ; +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_webcast_gift_message_msg.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_webcast_gift_message_msg.proto new file mode 100644 index 0000000..fcd1d78 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_webcast_gift_message_msg.proto @@ -0,0 +1,52 @@ +syntax = "proto3"; +import "Common.proto"; +import "User.proto"; +import "TextEffect.proto"; +import "Text.proto"; +import "GiftIMPriority.proto"; +import "GiftStruct.proto"; +import "PublicAreaCommon.proto"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf"; +option java_outer_classname = "Douyin_webcast_gift_message_msgProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +message douyin_webcast_gift_message_msg { + Common common = 1; + uint64 long_gift_id = 2; + uint64 fan_ticket_count = 3; + uint64 group_count = 4; + uint64 repeat_count = 5; + uint64 combo_count = 6; + User user = 7; + User to_user = 8 ; + uint32 repeat_end = 9 ; + TextEffect text_effect = 10 ; + uint64 group_id = 11 ; + uint64 income_taskgifts = 12 ; + uint64 room_fan_ticket_count = 13 ; + GiftIMPriority priority = 14 ; + GiftStruct gift = 15 ; + string log_id = 16 ; + uint64 send_type = 17 ; + PublicAreaCommon public_area_common = 18 ; + Text tray_display_text = 19 ; + uint64 banned_display_effects = 20 ; + // GiftTrayInfo trayInfo = 21; + // AssetEffectMixInfo assetEffectMixInfo = 22; + bool display_for_self = 25; + string interact_gift_info = 26; + string diy_item_info = 27; + repeated uint64 min_asset_set_list = 28; + uint64 total_count = 29; + uint32 client_gift_source = 30; + // AnchorGiftData anchorGift = 31; + repeated uint64 to_user_ids_list = 32; + uint64 send_timet = 33; + uint64 force_display_effectst = 34; + string trace_id = 35; + uint64 effect_display_ts = 36; +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_webcast_like_message_msg.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_webcast_like_message_msg.proto new file mode 100644 index 0000000..2a61739 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_webcast_like_message_msg.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +import "Common.proto"; +import "User.proto"; +import "DoubleLikeDetail.proto"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf"; +option java_outer_classname = "douyin_webcast_like_message_msgProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +message douyin_webcast_like_message_msg { + Common common = 1; + uint64 count = 2; + uint64 total = 3; + uint64 color = 4; + User user = 5; + string icon = 6; + DoubleLikeDetail doubleLikeDetail = 7; + // DisplayControlInfo displayControlInfo = 8; + uint64 linkmicGuestUid = 9; + string scene = 10; + // PicoDisplayInfo picoDisplayInfo = 11; + // = 12; +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_webcast_member_message_msg.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_webcast_member_message_msg.proto new file mode 100644 index 0000000..f892a74 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_webcast_member_message_msg.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; +import "Common.proto"; +import "User.proto"; +import "Image.proto"; +import "Text.proto"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf"; +option java_outer_classname = "Douyin_webcast_member_message_msgProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +message douyin_webcast_member_message_msg { + Common common = 1; + User user = 2; + uint64 memberCount = 3; + User operator = 4; + bool isSetToAdmin = 5; + bool isTopUser = 6; + int64 rankScore = 7; + int64 topUserNo = 8; + int64 enterType = 9; + int64 action = 10; + string actionDescription = 11; + int64 userId = 12; + // EffectConfig effectConfig = 13; + string popStr = 14; + // EffectConfig enterEffectConfig = 15; + Image backgroundImage = 16; + Image backgroundImageV2 = 17; + Text anchorDisplayText = 18; + // PublicAreaCommon publicAreaCommon = 19; + int64 userEnterTipType = 20; + int64 anchorEnterTipType = 21; + map<string, string> buriedPointMap = 22; +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_websocket_frame.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_websocket_frame.proto new file mode 100644 index 0000000..fe01e9a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_websocket_frame.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf"; +option java_outer_classname = "Douyin_websocket_frameProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +message douyin_websocket_frame { + uint64 seq_id = 1; + uint64 log_id = 2; + uint64 service = 3; + uint64 method = 4; + map<string, string> headers_list = 5; + string payload_encoding = 6; + string payload_type = 7; + bytes payload = 8; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_websocket_frame_msg.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_websocket_frame_msg.proto new file mode 100644 index 0000000..808bb2f --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/main/resources/proto/douyin_websocket_frame_msg.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +package tech.ordinaryroad.live.chat.client.douyin.protobuf; + +option java_package = "tech.ordinaryroad.live.chat.client.douyin.protobuf"; +option java_outer_classname = "douyin_websocket_frame_msgProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +import "douyin_cmd_msg.proto"; + +message douyin_websocket_frame_msg { + repeated douyin_cmd_msg messages_list = 1; + string cursor = 2; + uint64 fetch_interval = 3; + uint64 now = 4; + string internal_ext = 5; + uint32 fetch_type = 6; + map<string, string> route_params = 7; + uint64 heartbeat_duration = 8; + bool need_ack = 9; + string push_server = 10; + string live_cursor = 11; + bool history_no_more = 12; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/test/java/tech/ordinaryroad/live/chat/client/douyin/api/DouyinApisTest.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/test/java/tech/ordinaryroad/live/chat/client/douyin/api/DouyinApisTest.java new file mode 100644 index 0000000..fe217bc --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/test/java/tech/ordinaryroad/live/chat/client/douyin/api/DouyinApisTest.java @@ -0,0 +1,15 @@ +package tech.ordinaryroad.live.chat.client.douyin.api; + +import org.junit.jupiter.api.Test; + +/** + * @author mjz + * @date 2024/1/3 + */ +class DouyinApisTest { + + @Test + void roomInit() { + DouyinApis.roomInit("886419461662"); + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/test/java/tech/ordinaryroad/live/chat/client/douyin/client/DouyinLiveChatClientTest.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/test/java/tech/ordinaryroad/live/chat/client/douyin/client/DouyinLiveChatClientTest.java new file mode 100644 index 0000000..a80ec93 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyin/src/test/java/tech/ordinaryroad/live/chat/client/douyin/client/DouyinLiveChatClientTest.java @@ -0,0 +1,93 @@ +package tech.ordinaryroad.live.chat.client.douyin.client; + +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.douyin.config.DouyinLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyin.constant.DouyinCmdEnum; +import tech.ordinaryroad.live.chat.client.douyin.listener.IDouyinMsgListener; +import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinDanmuMsg; +import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinEnterRoomMsg; +import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinGiftMsg; +import tech.ordinaryroad.live.chat.client.douyin.msg.DouyinLikeMsg; +import tech.ordinaryroad.live.chat.client.douyin.netty.handler.DouyinBinaryFrameHandler; + +/** + * @author mjz + * @date 2024/1/2 + */ +@Slf4j +class DouyinLiveChatClientTest { + + static Object lock = new Object(); + DouyinLiveChatClient client; + + @Test + void example() throws InterruptedException { + String cookie = System.getenv("cookie"); + log.error("cookie: {}", cookie); + DouyinLiveChatClientConfig config = DouyinLiveChatClientConfig.builder() + // TODO 娴忚鍣–ookie + .cookie(cookie) + .roomId("renyixu1989") + .roomId("567789235524") + .roomId("166163409118") + .roomId("722266687616") + .roomId("o333") + .roomId("qilongmusic") + .roomId("yimei20210922") + .build(); + + client = new DouyinLiveChatClient(config, new IDouyinMsgListener() { + @Override + public void onMsg(IMsg msg) { + // log.debug("鏀跺埌{}娑堟伅 {}", msg.getClass(), msg); + } + + @Override + public void onCmdMsg(DouyinCmdEnum cmd, ICmdMsg<DouyinCmdEnum> cmdMsg) { + // log.debug("鏀跺埌CMD娑堟伅{} {}", cmd, cmdMsg); + } + + @Override + public void onOtherCmdMsg(DouyinCmdEnum cmd, ICmdMsg<DouyinCmdEnum> cmdMsg) { + log.debug("鏀跺埌鍏朵粬CMD娑堟伅 {}", cmd); + } + + @Override + public void onUnknownCmd(String cmdString, IMsg msg) { + log.debug("鏀跺埌鏈煡CMD娑堟伅 {}", cmdString); + } + + @Override + public void onDanmuMsg(DouyinBinaryFrameHandler binaryFrameHandler, DouyinDanmuMsg msg) { + log.info("{} 鏀跺埌寮瑰箷 {} {}({})锛歿}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onGiftMsg(DouyinBinaryFrameHandler binaryFrameHandler, DouyinGiftMsg msg) { + log.info("{} 鏀跺埌绀肩墿 {} {}({}) {} {}({})x{}({})", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), "璧犻��", msg.getGiftName(), msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice()); + } + + @Override + public void onLikeMsg(DouyinBinaryFrameHandler binaryFrameHandler, DouyinLikeMsg msg) { + log.info("{} 鏀跺埌鐐硅禐 [{}] {}({})", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + + @Override + public void onEnterRoomMsg(DouyinBinaryFrameHandler binaryFrameHandler, DouyinEnterRoomMsg msg) { + log.info("{} {}({}) 杩涘叆鐩存挱闂�", msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + }); + client.connect(); + + // 闃叉娴嬭瘯鏃剁洿鎺ラ��鍑� + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/README.md b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/README.md new file mode 100644 index 0000000..0b71bda --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/README.md @@ -0,0 +1,52 @@ +### 搴忓垪鍖� + +#### 搴忓垪鍖栧熀鏈暟鎹被鍨� + +1. escape(key) +2. escape(value) +3. key@=value/ + +#### 搴忓垪鍖朚ap + +1. escape(key) +2. value for each + 1. escape(key) + 2. escape(value) + 3. escape(key@=value/) +3. escape(value) +4. key@=value/ + +### 鍙嶅簭鍒楀寲 + +#### 鍙嶅簭鍒楀寲鍩烘湰鏁版嵁绫诲瀷 + +1. spilt("/"): + type@=chatmsg + +2. split("@="): + 1. key: unescape(key) = el + 2. unescape(value).endsWith("/") = false + 2.1 value = chatmsg + +#### 鍙嶅簭鍒楀寲Map + +1. spilt("/"): + el@=eid@AA=1@ASetp@AA=1@ASsc@AA=1@AS + +2. split("@="): + 1. key: unescape = el + 2. unescape(value).endsWith("/") = true + eid@A=1/etp@A=1/sc@A=1/ + 1. split("/") + eid@A=1 + etp@A=1 + sc@A=1 + 2. unescape: + eid@=1 + etp@=1 + sc@=1 + 3. for each + 1. split("@=") + 2. unescape(key) + 3. unescape(value) + 4. value: map \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/pom.xml b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/pom.xml new file mode 100644 index 0000000..d051f93 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/pom.xml @@ -0,0 +1,61 @@ +<!-- + ~ MIT License + ~ + ~ Copyright (c) 2023 OrdinaryRoad + ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy + ~ of this software and associated documentation files (the "Software"), to deal + ~ in the Software without restriction, including without limitation the rights + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + ~ copies of the Software, and to permit persons to whom the Software is + ~ furnished to do so, subject to the following conditions: + ~ + ~ The above copyright notice and this permission notice shall be included in all + ~ copies or substantial portions of the Software. + ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + ~ SOFTWARE. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-clients</artifactId> + <version>${revision}</version> + <relativePath>../pom.xml</relativePath> + </parent> + <packaging>jar</packaging> + + <artifactId>live-chat-client-douyu</artifactId> + <name>live-chat-client-douyu</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-servers-netty-client</artifactId> + </dependency> + + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + </dependency> + + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter</artifactId> + <version>${junit-jupiter.version}</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/api/DouyuApis.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/api/DouyuApis.java new file mode 100644 index 0000000..32c5366 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/api/DouyuApis.java @@ -0,0 +1,196 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.api; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.RandomUtil; +import cn.hutool.core.util.ReUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.digest.MD5; +import cn.hutool.http.*; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.Cleanup; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.msg.BaseMsg; +import tech.ordinaryroad.live.chat.client.commons.util.OrLocalDateTimeUtil; +import tech.ordinaryroad.live.chat.client.douyu.msg.dto.GiftPropSingle; + +import java.util.List; +import java.util.Map; + +/** + * API绠�鏄撶増 + * + * @author mjz + * @date 2023/5/5 + */ +@Slf4j +public class DouyuApis { + + public static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + public static final String PATTERN_BODY_ROOM_ID = "\\$ROOM\\.room_id\\D+(\\d+)"; + public static final String KEY_REDIRECT_LOCATION_RID = "rid"; + public static final String KEY_COOKIE_DY_DID = "dy_did"; + public static final String KEY_COOKIE_ACF_UID = "acf_uid"; + public static final String KEY_COOKIE_ACF_STK = "acf_stk"; + public static final String KEY_COOKIE_ACF_LTKID = "acf_ltkid"; + public static final String API_AVATAR = "https://apic.douyucdn.cn/upload/"; + // https://webconf.douyucdn.cn/resource/common/gift/flash/gift_effect.json + // https://webconf.douyucdn.cn/resource/common/gift/common_config_v2.json + // https://webconf.douyucdn.cn/resource/common/prop_gift_list/prop_gift_config.json + // 鐢≒ID鏌ヨ绀肩墿淇℃伅锛歨ttps://gift.douyucdn.cn/api/prop/v1/web/single?pid= + // 鏌ヨ鎴块棿绀肩墿鍒楄〃锛歨ttps://gift.douyucdn.cn/api/gift/v3/web/list?rid= + public static final String API_GIFT_LIST = "https://gift.douyucdn.cn/api/gift/v3/web/list?rid="; + public static final String API_PROP_SINGLE = "https://gift.douyucdn.cn/api/prop/v1/web/single?pid="; + public static final String API_AVATAR_PREFIX_SMALL = "_small.jpg"; + public static final String API_AVATAR_PREFIX_MIDDLE = "_middle.jpg"; + public static final String API_AVATAR_PREFIX_BIG = "_big.jpg"; + + public static String getAvatarUrl(List<String> list, String prefix) { + if (CollUtil.isEmpty(list) || list.size() < 3) { + return StrUtil.EMPTY; + } + return API_AVATAR + CollUtil.join(list, "/") + prefix; + } + + public static String getSmallAvatarUrl(List<String> list) { + return getAvatarUrl(list, API_AVATAR_PREFIX_SMALL); + } + + public static long getRealRoomId(long roomId, String cookie) { + String realRoomIdString = null; + @Cleanup + HttpResponse execute = createGetRequest("https://www.douyu.com/" + roomId, cookie).execute(); + if (execute.getStatus() == HttpStatus.HTTP_NOT_FOUND) { + throw new BaseException("鑾峰彇" + roomId + "鐪熷疄鎴块棿ID澶辫触"); + } + if (HttpStatus.isRedirected(execute.getStatus())) { + String location = execute.header(Header.LOCATION); + Map<String, String> paramMap = HttpUtil.decodeParamMap(location, null); + if (paramMap.containsKey(KEY_REDIRECT_LOCATION_RID)) { + realRoomIdString = paramMap.get(KEY_REDIRECT_LOCATION_RID); + } + } + if (StrUtil.isBlank(realRoomIdString)) { + String body = execute.body(); + String matchString = ReUtil.get(PATTERN_BODY_ROOM_ID, body, 1); + if (StrUtil.isNotBlank(matchString)) { + realRoomIdString = matchString; + } + } + long realRoomId = roomId; + if (!StrUtil.isBlank(realRoomIdString)) { + try { + realRoomId = NumberUtil.parseLong(realRoomIdString); + } catch (Exception e) { + throw new BaseException("鑾峰彇" + roomId + "鐪熷疄鎴块棿ID澶辫触"); + } + } + return realRoomId; + } + + public static long getRealRoomId(long roomId) { + return getRealRoomId(roomId, null); + } + + public static JsonNode getServerInfo(long roomId, String cookie) { + @Cleanup + HttpResponse execute = createPostRequest("https://www.douyu.com/lapi/live/gateway/web/" + roomId + "?isH5=1", cookie).execute(); + return responseInterceptor(execute.body()); + } + + public static JsonNode getServerInfo(long roomId) { + return getServerInfo(roomId, null); + } + + public static String getRandomWssUri(long roomId) { + JsonNode serverInfo = getServerInfo(roomId); + JsonNode wss = serverInfo.get("wss"); + JsonNode jsonNode = wss.get(RandomUtil.randomInt(0, wss.size())); + return "wss://" + jsonNode.get("domain").asText() + ":" + jsonNode.get("port").asInt(); + } + + public static JsonNode getGiftList(long roomId) { + @Cleanup + HttpResponse execute = createGetRequest(API_GIFT_LIST + roomId, null).execute(); + return responseInterceptor(execute.body()); + } + + @SneakyThrows + public static GiftPropSingle getGiftPropSingleByPid(String pid) { + @Cleanup + HttpResponse execute = createGetRequest(API_PROP_SINGLE + pid, null).execute(); + JsonNode jsonNode = responseInterceptor(execute.body()); + return BaseMsg.OBJECT_MAPPER.readValue(jsonNode.toString(), GiftPropSingle.class); + } + + public static final String vk_secret = "r5*^5;}2#${XF[h+;'./.Q'1;,-]f'p["; + + /** + * 鍙傝�冿細 <a href="https://cjting.me/2020/07/01/douyu-crawler-and-font-anti-crawling">鏂楅奔鍏虫敞浜烘暟鐖彇 鈹�鈹� 瀛椾綋鍙嶇埇鐨勬敾涓庨槻</a> + * + * @param currentTimeSecs + * @param did + * @return + */ + public static String generateVk(long currentTimeSecs, String did) { + return MD5.create().digestHex(currentTimeSecs + vk_secret + did); + } + + public static String generateVk(String did) { + return generateVk(OrLocalDateTimeUtil.zonedCurrentTimeSecs(), did); + } + + public static HttpRequest createGetRequest(String url, String cookie) { + return HttpUtil.createGet(url) + .cookie(cookie); + } + + public static HttpRequest createPostRequest(String url, String cookie) { + return HttpUtil.createPost(url) + .cookie(cookie); + } + + private static JsonNode responseInterceptor(String responseString) { + try { + JsonNode jsonNode = OBJECT_MAPPER.readTree(responseString); + int code = jsonNode.get("error").asInt(); + if (code == 0) { + // 鎴愬姛 + return jsonNode.get("data"); + } else { + throw new BaseException(jsonNode.get("msg").asText()); + } + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuDanmuLiveChatClient.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuDanmuLiveChatClient.java new file mode 100644 index 0000000..a780aca --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuDanmuLiveChatClient.java @@ -0,0 +1,117 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.client; + +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.handler.codec.http.DefaultHttpHeaders; +import io.netty.handler.codec.http.websocketx.WebSocketClientHandshakerFactory; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.douyu.client.base.BaseDouyuLiveChatClient; +import tech.ordinaryroad.live.chat.client.douyu.config.DouyuLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuClientModeEnum; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; +import tech.ordinaryroad.live.chat.client.douyu.msg.LoginresMsg; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuConnectionHandler; + +import java.util.List; + +/** + * 鐩存挱闂村脊骞曞鎴风{@link DouyuClientModeEnum#DANMU} + * + * @author mjz + * @date 2023/8/20 + */ +@Slf4j +public class DouyuDanmuLiveChatClient extends BaseDouyuLiveChatClient implements IDouyuMsgListener { + + public DouyuDanmuLiveChatClient(DouyuLiveChatClientConfig config, List<IDouyuMsgListener> msgListeners, IDouyuConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(DouyuClientModeEnum.DANMU, config, msgListeners, connectionListener, workerGroup); + addMsgListener(DouyuDanmuLiveChatClient.this); + } + + public DouyuDanmuLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener, IDouyuConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(DouyuClientModeEnum.DANMU, config, msgListener, connectionListener, workerGroup); + addMsgListener(DouyuDanmuLiveChatClient.this); + } + + public DouyuDanmuLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener, IDouyuConnectionListener connectionListener) { + this(config, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public DouyuDanmuLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener) { + this(config, msgListener, null); + } + + public DouyuDanmuLiveChatClient(DouyuLiveChatClientConfig config) { + this(config, null); + } + + @Override + public DouyuConnectionHandler initConnectionHandler(IBaseConnectionListener<DouyuConnectionHandler> clientConnectionListener) { + return new DouyuConnectionHandler(DouyuClientModeEnum.DANMU, + WebSocketClientHandshakerFactory.newHandshaker(getWebsocketUri(), WebSocketVersion.V13, null, true, new DefaultHttpHeaders(), getConfig().getMaxFramePayloadLength()), + DouyuDanmuLiveChatClient.this, clientConnectionListener + ); + } + + @Override + public DouyuBinaryFrameHandler initBinaryFrameHandler() { + return new DouyuBinaryFrameHandler(msgListeners, DouyuDanmuLiveChatClient.this); + } + + @Override + public void onMsg(DouyuBinaryFrameHandler binaryFrameHandler, IMsg msg) { + if (msg instanceof LoginresMsg) { + // 1 type@=joingroup/rid@=4615502/gid@=1/ + send(getWebSocketFrameFactory(getConfig().getRoomId()).createJoingroup(), () -> { + // 2 type@=mrkl/ + send(getWebSocketFrameFactory(getConfig().getRoomId()).createHeartbeat(), () -> { + // 3 type@=sub/mt@=dayrk/ + send(getWebSocketFrameFactory(getConfig().getRoomId()).createSub()); + }); + }); + } + } + + @Override + public boolean removeMsgListener(IDouyuMsgListener msgListener) { + if (msgListener == DouyuDanmuLiveChatClient.this) { + return false; + } + return super.removeMsgListener(msgListener); + } + + @Override + public void removeAllMsgListeners() { + super.removeAllMsgListeners(); + addMsgListener(DouyuDanmuLiveChatClient.this); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuLiveChatClient.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuLiveChatClient.java new file mode 100644 index 0000000..4e183a1 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuLiveChatClient.java @@ -0,0 +1,268 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.client; + +import cn.hutool.cache.impl.TimedCache; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import cn.hutool.core.util.RandomUtil; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.commons.base.msg.BaseCmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.BaseMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; +import tech.ordinaryroad.live.chat.client.douyu.api.DouyuApis; +import tech.ordinaryroad.live.chat.client.douyu.config.DouyuLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; +import tech.ordinaryroad.live.chat.client.douyu.msg.ChatmsgMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.DgbMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.MsgrepeaterproxylistMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.UenterMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.dto.GiftListInfo; +import tech.ordinaryroad.live.chat.client.douyu.msg.dto.GiftPropSingle; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuConnectionHandler; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +/** + * 鐩存挱闂村脊骞曞鎴风 + * + * @author mjz + * @date 2023/8/20 + */ +@Slf4j +public class DouyuLiveChatClient extends DouyuWsLiveChatClient implements IDouyuMsgListener { + + /** + * 閫氱敤绀肩墿缂撳瓨锛岃繃鏈熸椂闂�1澶� + * pid,Info + */ + public static final TimedCache<String, GiftPropSingle> giftMap = new TimedCache<>(TimeUnit.DAYS.toMillis(1)); + /** + * 鎴块棿绀肩墿缂撳瓨锛岃繃鏈熸椂闂�1澶� + * realRoomId,(giftId,Info) + */ + public static final TimedCache<String, Map<String, GiftListInfo>> roomGiftMap = new TimedCache<>(TimeUnit.DAYS.toMillis(1), new HashMap<>()); + private final DouyuWsLiveChatClient proxyClient = this; + private DouyuDanmuLiveChatClient danmuClient = null; + private DouyuConnectionHandler connectionHandler; + /** + * 缁熶竴绠$悊Ws銆丏anmu鐨勮繛鎺ョ姸鎬� + */ + private final IDouyuConnectionListener connectionListener; + + public DouyuLiveChatClient(DouyuLiveChatClientConfig config, List<IDouyuMsgListener> msgListeners, IDouyuConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, msgListeners, null, workerGroup); + this.connectionListener = connectionListener; + } + + public DouyuLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener, IDouyuConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, msgListener, null, workerGroup); + this.connectionListener = connectionListener; + } + + public DouyuLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener, IDouyuConnectionListener connectionListener) { + this(config, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public DouyuLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener) { + this(config, msgListener, null); + } + + public DouyuLiveChatClient(DouyuLiveChatClientConfig config) { + this(config, null); + } + + @Override + public void init() { + super.init(); + + // 鍒濆鍖栨埧闂寸ぜ鐗╁垪琛� + Map<String, GiftListInfo> map = new HashMap<>(); + DouyuApis.getGiftList(getConfig().getRoomId()) + .get("giftList") + .forEach(jsonNode -> { + try { + GiftListInfo giftListInfo = BaseMsg.OBJECT_MAPPER.readValue(jsonNode.toString(), GiftListInfo.class); + map.put(String.valueOf(giftListInfo.getId()), giftListInfo); + } catch (Exception e) { + if (log.isDebugEnabled()) { + log.debug("鑾峰彇鎴块棿绀肩墿鍒楄〃寮傚父", e); + } + // ignore + } + }); + roomGiftMap.put(String.valueOf(DouyuApis.getRealRoomId(getConfig().getRoomId())), map); + } + + @Override + public DouyuConnectionHandler initConnectionHandler(IBaseConnectionListener<DouyuConnectionHandler> clientConnectionListener) { + this.connectionHandler = super.initConnectionHandler(super.clientConnectionListener); + return connectionHandler; + } + + @Override + public void onMsg(DouyuBinaryFrameHandler binaryFrameHandler, IMsg msg) { + super.onMsg(binaryFrameHandler, msg); + if (msg instanceof MsgrepeaterproxylistMsg) { + MsgrepeaterproxylistMsg msgrepeaterproxylistMsg = (MsgrepeaterproxylistMsg) msg; + List<Map<String, String>> list = msgrepeaterproxylistMsg.getList(); + if (list.isEmpty()) { + log.error("寮瑰箷鏈嶅姟鍣ㄥ垪琛ㄤ负绌�"); + if (connectionListener != null) { + connectionListener.onConnectFailed(connectionHandler); + } + disconnect(); + } else { + // 鍒濆鍖杁anmuClient + int randomIndex = RandomUtil.randomInt(0, list.size()); + Map<String, String> randomMap = list.get(randomIndex); + DouyuLiveChatClientConfig danmuClientConfig = BeanUtil.toBean(getConfig(), DouyuLiveChatClientConfig.class, CopyOptions.create().ignoreNullValue()); + danmuClientConfig.setWebsocketUri(String.format("wss://%s:%s/", randomMap.get("ip"), randomMap.get("port"))); + destroyDanmuClient(); + this.danmuClient = new DouyuDanmuLiveChatClient(danmuClientConfig, new IDouyuMsgListener() { + @Override + public void onMsg(DouyuBinaryFrameHandler binaryFrameHandler, IMsg msg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onMsg(binaryFrameHandler, msg)); + } + + @Override + public void onDanmuMsg(DouyuBinaryFrameHandler binaryFrameHandler, ChatmsgMsg msg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onDanmuMsg(binaryFrameHandler, msg)); + } + + @Override + public void onGiftMsg(DouyuBinaryFrameHandler binaryFrameHandler, DgbMsg msg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onGiftMsg(binaryFrameHandler, msg)); + } + + @Override + public void onEnterRoomMsg(DouyuBinaryFrameHandler binaryFrameHandler, UenterMsg uenterMsg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onEnterRoomMsg(binaryFrameHandler, uenterMsg)); + } + + @Override + public void onCmdMsg(DouyuBinaryFrameHandler binaryFrameHandler, DouyuCmdEnum cmd, ICmdMsg<DouyuCmdEnum> cmdMsg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onCmdMsg(binaryFrameHandler, cmd, cmdMsg)); + } + + @Override + public void onOtherCmdMsg(DouyuBinaryFrameHandler binaryFrameHandler, DouyuCmdEnum cmd, ICmdMsg<DouyuCmdEnum> cmdMsg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onOtherCmdMsg(binaryFrameHandler, cmd, cmdMsg)); + } + + @Override + public void onUnknownCmd(DouyuBinaryFrameHandler binaryFrameHandler, String cmdString, IMsg msg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onUnknownCmd(binaryFrameHandler, cmdString, msg)); + } + + @Override + public void onCmdMsg(DouyuBinaryFrameHandler binaryFrameHandler, DouyuCmdEnum cmd, BaseCmdMsg<DouyuCmdEnum> cmdMsg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onCmdMsg(binaryFrameHandler, cmd, cmdMsg)); + } + + @Override + public void onOtherCmdMsg(DouyuBinaryFrameHandler binaryFrameHandler, DouyuCmdEnum cmd, BaseCmdMsg<DouyuCmdEnum> cmdMsg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onOtherCmdMsg(binaryFrameHandler, cmd, cmdMsg)); + } + + @Override + public void onUnknownCmd(DouyuBinaryFrameHandler binaryFrameHandler, String cmdString, BaseMsg msg) { + proxyClient.iteratorMsgListeners(msgListener -> msgListener.onUnknownCmd(binaryFrameHandler, cmdString, msg)); + } + }, new IDouyuConnectionListener() { + @Override + public void onConnected(DouyuConnectionHandler connectionHandler) { + if (connectionListener != null) { + connectionListener.onConnected(connectionHandler); + } + } + + @Override + public void onConnectFailed(DouyuConnectionHandler connectionHandler) { + if (connectionListener != null) { + connectionListener.onConnectFailed(connectionHandler); + } + } + + @Override + public void onDisconnected(DouyuConnectionHandler connectionHandler) { + if (connectionListener != null) { + connectionListener.onDisconnected(connectionHandler); + } + } + }); + this.danmuClient.addStatusChangeListener(evt -> { + ClientStatusEnums newStatus = (ClientStatusEnums) evt.getNewValue(); + switch (newStatus) { + case CONNECTED: + case RECONNECTING: + case CONNECT_FAILED: + case DISCONNECTED: + case CONNECTING: { + super.setStatus(newStatus); + break; + } + default: { + // ignore + } + } + + }); + this.danmuClient.connect(); + } + } + } + + @Override + protected void setStatus(ClientStatusEnums status) { + if (status == ClientStatusEnums.CONNECTED) { + return; + } + super.setStatus(status); + } + + @Override + public void destroy() { + destroyDanmuClient(); + super.destroy(); + } + + private void destroyDanmuClient() { + if (danmuClient != null) { + danmuClient.destroy(); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuWsLiveChatClient.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuWsLiveChatClient.java new file mode 100644 index 0000000..e6d5062 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuWsLiveChatClient.java @@ -0,0 +1,116 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.client; + +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.handler.codec.http.DefaultHttpHeaders; +import io.netty.handler.codec.http.websocketx.WebSocketClientHandshakerFactory; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.douyu.api.DouyuApis; +import tech.ordinaryroad.live.chat.client.douyu.client.base.BaseDouyuLiveChatClient; +import tech.ordinaryroad.live.chat.client.douyu.config.DouyuLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuClientModeEnum; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; +import tech.ordinaryroad.live.chat.client.douyu.msg.LoginresMsg; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuConnectionHandler; + +import java.util.List; + +/** + * 鐩存挱闂村脊骞曞鎴风{@link DouyuClientModeEnum#WS} + * + * @author mjz + * @date 2023/8/20 + */ +@Slf4j +public class DouyuWsLiveChatClient extends BaseDouyuLiveChatClient implements IDouyuMsgListener { + + public DouyuWsLiveChatClient(DouyuLiveChatClientConfig config, List<IDouyuMsgListener> msgListeners, IDouyuConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(DouyuClientModeEnum.WS, config, msgListeners, connectionListener, workerGroup); + addMsgListener(DouyuWsLiveChatClient.this); + } + + public DouyuWsLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener, IDouyuConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(DouyuClientModeEnum.WS, config, msgListener, connectionListener, workerGroup); + addMsgListener(DouyuWsLiveChatClient.this); + } + + public DouyuWsLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener, IDouyuConnectionListener connectionListener) { + this(config, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public DouyuWsLiveChatClient(DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener) { + this(config, msgListener, null); + } + + public DouyuWsLiveChatClient(DouyuLiveChatClientConfig config) { + this(config, null); + } + + @Override + protected String getWebSocketUriString() { + return DouyuApis.getRandomWssUri(getConfig().getRoomId()); + } + + @Override + public DouyuConnectionHandler initConnectionHandler(IBaseConnectionListener<DouyuConnectionHandler> clientConnectionListener) { + return new DouyuConnectionHandler(DouyuClientModeEnum.WS, + WebSocketClientHandshakerFactory.newHandshaker(getWebsocketUri(), WebSocketVersion.V13, null, true, new DefaultHttpHeaders(), getConfig().getMaxFramePayloadLength()), + DouyuWsLiveChatClient.this, clientConnectionListener + ); + } + + @Override + public DouyuBinaryFrameHandler initBinaryFrameHandler() { + return new DouyuBinaryFrameHandler(msgListeners, DouyuWsLiveChatClient.this); + } + + @Override + public void onMsg(DouyuBinaryFrameHandler binaryFrameHandler, IMsg msg) { + if (msg instanceof LoginresMsg) { + send(getWebSocketFrameFactory(getConfig().getRoomId()).createKeeplive(getConfig().getCookie())); + } + } + + @Override + public boolean removeMsgListener(IDouyuMsgListener msgListener) { + if (msgListener == DouyuWsLiveChatClient.this) { + return false; + } + return super.removeMsgListener(msgListener); + } + + @Override + public void removeAllMsgListeners() { + super.removeAllMsgListeners(); + addMsgListener(DouyuWsLiveChatClient.this); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/base/BaseDouyuLiveChatClient.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/base/BaseDouyuLiveChatClient.java new file mode 100644 index 0000000..799eab2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/client/base/BaseDouyuLiveChatClient.java @@ -0,0 +1,139 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.client.base; + +import cn.hutool.core.collection.CollUtil; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.handler.codec.http.websocketx.WebSocketFrame; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.douyu.config.DouyuLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuClientModeEnum; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.IDouyuMsg; +import tech.ordinaryroad.live.chat.client.douyu.netty.frame.factory.DouyuWebSocketFrameFactory; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuConnectionHandler; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; + +import java.util.List; +import java.util.function.Consumer; + +/** + * @author mjz + * @date 2023/9/15 + */ +@Slf4j +public abstract class BaseDouyuLiveChatClient extends BaseNettyClient< + DouyuLiveChatClientConfig, + DouyuCmdEnum, + IDouyuMsg, + IDouyuMsgListener, + DouyuConnectionHandler, + DouyuBinaryFrameHandler + > { + + private final DouyuClientModeEnum mode; + + public BaseDouyuLiveChatClient(DouyuClientModeEnum mode, DouyuLiveChatClientConfig config, List<IDouyuMsgListener> msgListeners, IDouyuConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + this.mode = mode; + addMsgListeners(msgListeners); + + // 鍒濆鍖� + this.init(); + } + + public BaseDouyuLiveChatClient(DouyuClientModeEnum mode, DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener, IDouyuConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + this.mode = mode; + addMsgListener(msgListener); + + // 鍒濆鍖� + this.init(); + } + + public BaseDouyuLiveChatClient(DouyuClientModeEnum mode, DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener, IDouyuConnectionListener connectionListener) { + this(mode, config, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public BaseDouyuLiveChatClient(DouyuClientModeEnum mode, DouyuLiveChatClientConfig config, IDouyuMsgListener msgListener) { + this(mode, config, msgListener, null, new NioEventLoopGroup()); + } + + public BaseDouyuLiveChatClient(DouyuClientModeEnum mode, DouyuLiveChatClientConfig config) { + this(mode, config, CollUtil.newArrayList(), null, new NioEventLoopGroup()); + } + + @Override + public void sendDanmu(Object danmu, Runnable success, Consumer<Throwable> failed) { + if (!checkCanSendDanmu()) { + return; + } + if (mode == DouyuClientModeEnum.WS && danmu instanceof String) { + String msg = (String) danmu; + if (log.isDebugEnabled()) { + log.debug("{} douyu鍙戦�佸脊骞� {}", getConfig().getRoomId(), danmu); + } + + WebSocketFrame webSocketFrame = null; + try { + webSocketFrame = getWebSocketFrameFactory(getConfig().getRoomId()).createDanmu(msg, getConfig().getCookie()); + } catch (Exception e) { + log.error("douyu寮瑰箷鍖呭垱寤哄け璐�", e); + if (failed != null) { + failed.accept(e); + } + } + if (webSocketFrame == null) { + return; + } + + send(webSocketFrame, () -> { + if (log.isDebugEnabled()) { + log.debug("douyu寮瑰箷鍙戦�佹垚鍔� {}", danmu); + } + if (success != null) { + success.run(); + } + finishSendDanmu(); + }, throwable -> { + log.error("douyu寮瑰箷鍙戦�佸け璐�", throwable); + if (failed != null) { + failed.accept(throwable); + } + }); + } else { + super.sendDanmu(danmu); + } + } + + protected static DouyuWebSocketFrameFactory getWebSocketFrameFactory(long roomId) { + return DouyuWebSocketFrameFactory.getInstance(roomId); + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/config/DouyuLiveChatClientConfig.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/config/DouyuLiveChatClientConfig.java new file mode 100644 index 0000000..685cd8d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/config/DouyuLiveChatClientConfig.java @@ -0,0 +1,69 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.config; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatNumberUtil; +import tech.ordinaryroad.live.chat.client.servers.netty.client.config.BaseNettyClientConfig; + +/** + * Douyu鐩存挱闂村脊骞曞鎴风閰嶇疆 + * + * @author mjz + * @date 2023/8/21 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@SuperBuilder(toBuilder = true) +public class DouyuLiveChatClientConfig extends BaseNettyClientConfig { + + @Builder.Default + private String ver = "20220825"; + + @Builder.Default + private String aver = "218101901"; + + @Override + public Long getRoomId() { + return OrLiveChatNumberUtil.parseLong(super.getRoomId()); + } + + public void setVer(String ver) { + String oldValue = this.ver; + this.ver = ver; + super.propertyChangeSupport.firePropertyChange("ver", oldValue, ver); + } + + public void setAver(String aver) { + String oldValue = this.aver; + this.aver = aver; + super.propertyChangeSupport.firePropertyChange("aver", oldValue, aver); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/constant/DouyuClientModeEnum.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/constant/DouyuClientModeEnum.java new file mode 100644 index 0000000..dbdc8b2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/constant/DouyuClientModeEnum.java @@ -0,0 +1,40 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.constant; + +/** + * @author mjz + * @date 2023/9/15 + */ +public enum DouyuClientModeEnum { + /** + * 鍙戦�佸脊骞曪紝鑾峰彇鍙敤鐨凞anmu鏈嶅姟鍣ㄩ摼鎺� + */ + WS, + /** + * 鎺ユ敹鐩存挱闂村脊骞� + */ + DANMU, +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/constant/DouyuCmdEnum.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/constant/DouyuCmdEnum.java new file mode 100644 index 0000000..9078fcd --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/constant/DouyuCmdEnum.java @@ -0,0 +1,199 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.constant; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import tech.ordinaryroad.live.chat.client.douyu.msg.*; + +/** + * <a href='https://open.douyu.com/source/api/63'>鏂囨。</a> + * + * @author mjz + * @date 2023/1/6 + */ +@Getter +@AllArgsConstructor +@RequiredArgsConstructor +public enum DouyuCmdEnum { + /** + * 鐧诲綍璇锋眰娑堟伅 + * <pre>{@code + * type@=loginreq/roomid@=7750753/dfl@=/username@=visitor10424697/uid@=1168052601/ver@=20220825/aver@=218101901/ct@=0/ + * type@=loginreq/roomid@=58839/aid@=yihanTest/token@=4c8421535f9639d8c1ad35d1fa421f36/time@=1574850339/auth@=45619bb990e6b76db06a66d5a8a446d7/ + * }</pre> + */ + loginreq(LoginreqMsg.class), + /** + * 鐧诲綍鍝嶅簲娑堟伅 + * <pre>{@code + * type@=loginres/userid@=1168052601/roomgroup@=0/pg@=0/sessionid@=0/username@=/nickname@=/live_stat@=0/is_illegal@=0/ill_ct@=/ill_ts@=0/now@=0/ps@=0/es@=0/it@=0/its@=0/npv@=0/best_dlev@=0/cur_lev@=0/nrc@=964715377/ih@=0/sid@=76494/sahf@=0/sceneid@=0/newrg@=0/regts@=0/ip@=112.43.93.229/rn@=0/rct@=0/ + * type@=loginresp/msg@=ok/rid@=77614265/ + * }</pre> + */ + loginres(LoginresMsg.class), + /** + * 鍏ョ粍 + * type@=joingroup/rid@=59872/aid@=yourapplicaitonID/token@=4c8421535f9639d8c1ad35d1fa421f36/time@=1574850339/auth@=xxxxxxxxxxxx/ + * Auth 鐢熸垚鏂瑰紡涓� md5({secret}_{aid}_{time}_{token}), secret涓篴id瀵瑰簲鐨勭閽� + */ + joingroup(JoingroupMsg.class), + /** + * 瀹㈡埛绔棫鐗堝績璺炽�佸績璺冲洖澶� + * <pre>{@code + * type@=keeplive/tick@=1439802131/ + * }</pre> + */ + keeplive(KeepliveMsg.class), + /** + * 瀹㈡埛绔柊鐗堝績璺炽�佸績璺冲洖澶� + * <pre>{@code + * type@=mrkl/ + * }</pre> + */ + mrkl, + /** + * 璁㈤槄璐垫棌鎺掕鍙樺姩 + * type@=sub/mt@=online_vip_list/ + */ + sub(SubMsg.class), + subres, + noble_num_info, + oni, + postLogin, + /** + * 寮瑰箷 + * type@=chatmsg/rid@=7750753/uid@=549977/nn@=涓�闂竴闂寒鍝佸搧/txt@=鍐烽棬姝屾墜鍝庯紝澹伴煶鐙壒鍝�/cid@=044c3bf3074b483275a44e0000000000/ic@=avatar@Sdefault@S08/level@=29/sahf@=0/nl@=7/cst@=1693107871294/bnn@=/bl@=0/brid@=0/hc@=/lk@=/dms@=8/pdg@=26/pdk@=86/ext@=/ + * type@=chatmsg/rid@=58839/ct@=8/hashid@=9LA18ePx4dqW/nn@=test/txt@=666/cid@=1111/ic@=icon/sahf@=0/level@=1/nl@=0/nc@=0/cmt@=0/gt@=0/col@=0/rg@=0/pg@=0/dlv@=0/dc@=0/bdlv@=0/gatin@=0/ chtin@=0/repin@=0/bnn@=test/bl@=0/brid@=58839/hc@=0/ol@=0/rev@=0/hl@=0/ifs@=0/p2p@=0/el@=eid@AA=1@ASetp@AA=1@ASsc@AA=1@AS/ + */ + chatmsg(ChatmsgMsg.class), + pingreq, + /** + * 鐧诲嚭 + * type@=logout/ + */ + logout, + /** + * 鐧诲綍鍝嶅簲 + * type@=loginresp/msg@=ok/rid@=77614265/ + */ + loginresp, + /** + * 绀肩墿 + * type@=dgb/gfid@=1/gs@=59872/gfcnt@=1/hashid@=1/rid@=1/nn@=someone/level@=1/dw@=1/ + */ + dgb(DgbMsg.class), + /** + * 鐢ㄦ埛杩涙埧閫氱煡娑堟伅 + * type@=uenter/rid@=1/ uid@=1/nn@=someone/str@=1/level@=1/el@=eid@AA=1@ASetp@AA=1@ASsc@AA=1@AS@S/ + */ + uenter(UenterMsg.class), + /** + * 鎴块棿寮�鍏虫挱鎻愰啋 + * type@=rss/rid@=1/ss@=1/code@=1/rt@=0/notify@=1/endtime@=1/ + */ + rss, + /** + * 瓒呯骇寮瑰箷娑堟伅 + * type@=ssd/rid@=1/trid@=1/content@=test/cli tp@=1/url@=test_url/jmptp@=1/ + */ + ssd, + /** + * 鎴块棿鍐呯ぜ鐗╁箍鎾� + * type@=spbc/rid@=1/gfid@=1/sn@=name/dn@=name/gn@=1/gc@=1/gb@=1/es@=1/ eid@=1/ + */ + spbc, + /** + * 鎴块棿瀹濈娑堟伅 + * type@=tsgs/rid@=1/gid@=1/gfid@=1/sn@=name/dn@=name/gn@=1/gc@=1/gb@=1/es@=1/gfid@=1/eid@=1/ + */ + tsgs, + /** + * 鎴块棿鍐� top10 鍙樺寲娑堟伅 + * type@=rankup/uid@=1/rn@=3/rid@=1/rkt@=1/gid@=-9999/rt@=0/ nk@=test/sz@=3/drid@=1/bt@=1/ + */ + rankup, + /** + * 涓绘挱绂诲紑鎻愰啋 + * type@=al/rid@=10111/aid@=3044114/ + */ + al, + /** + * 涓绘挱鍥炴潵缁х画鐩存挱鎻愰啋 + * type@=ab/rid@=10111/gid@=-9999/aid@=3044114/ + */ + ab, + /** + * 鐢ㄦ埛绛夌骇鎻愬崌娑堟伅 + * type@=upgrade/rid@=1/gid@=-9999/uid@=12001/nn@=test/level@=3/ic@=icon/ + */ + upgrade, + /** + * 涓绘挱绛夌骇鎻愬崌骞挎挱 + * type@=upbc/rid@=1/gid@=-9999/lev@=20/pu@=0/ + */ + upbc, + /** + * 绂佽█鎿嶄綔缁撴灉 + * type@=newblackres/rid@=1/gid@=-9999/ret@=0/otype@=2/sid@=10002/did@=10003/snic@=stest/dnic@=dtest/endtime@=1501920157/ + */ + newblackres, + /** + * 寰界珷绛夌骇鎻愬崌閫氱煡 + * type@=blab/rid@=1/gid@=-9999/uid@=10002/nn@=test/lbl@=2/bl@=3/ba@=1/bnn@=ttt/ + */ + blab, + /** + * 鐢ㄦ埛鍒嗕韩浜嗙洿鎾棿閫氱煡 + * type@=srres/rid@=1/gid@=-9999/uid@=12001/nickname@=test/exp@=3/ + */ + srres, + /** + * 鏍忕洰鎺掕姒滃彉鏇撮�氱煡 + * type@=rri/rid@=1/rn@=cate_rank/cate_id@=5/uid@=10005/sc@=100 00/idx@=10/bcr@=1/ibc@=1/an@=test/rktype@=1/tag_id@=1200/gif t_id@=100/ + */ + rri, + mapkb(MapkbMsg.class), + /** + * 鍙戦�佸脊骞� + */ + chatmessage(ChatmessageMsg.class), + h5ckreq(H5ckreqMsg.class), + h5gkcreq(H5gkcreqMsg.class), + h5cs(H5csMsg.class), + msgrepeaterproxylist(MsgrepeaterproxylistMsg.class), + ; + + private Class<?> tClass; + + public static DouyuCmdEnum getByString(String cmd) { + try { + return DouyuCmdEnum.valueOf(cmd); + } catch (Exception e) { + return null; + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/IDouyuConnectionListener.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/IDouyuConnectionListener.java new file mode 100644 index 0000000..cc3d33d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/IDouyuConnectionListener.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.listener; + + +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuConnectionHandler; + +/** + * 杩炴帴鍥炶皟 + * + * @author mjz + * @date 2023/8/21 + */ +public interface IDouyuConnectionListener extends IBaseConnectionListener<DouyuConnectionHandler> { +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/IDouyuMsgListener.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/IDouyuMsgListener.java new file mode 100644 index 0000000..782c884 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/listener/IDouyuMsgListener.java @@ -0,0 +1,45 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.listener; + +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IDanmuMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IEnterRoomMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IGiftMsgListener; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.ChatmsgMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.DgbMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.UenterMsg; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuBinaryFrameHandler; + +/** + * @author mjz + * @date 2023/1/7 + */ +public interface IDouyuMsgListener extends IBaseMsgListener<DouyuBinaryFrameHandler, DouyuCmdEnum>, + IDanmuMsgListener<DouyuBinaryFrameHandler, ChatmsgMsg>, + IGiftMsgListener<DouyuBinaryFrameHandler, DgbMsg>, + IEnterRoomMsgListener<DouyuBinaryFrameHandler, UenterMsg> { +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/ChatmessageMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/ChatmessageMsg.java new file mode 100644 index 0000000..1e801ce --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/ChatmessageMsg.java @@ -0,0 +1,86 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import cn.hutool.core.util.RandomUtil; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.util.OrLocalDateTimeUtil; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/9/7 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class ChatmessageMsg extends BaseDouyuCmdMsg { + + private String pe = "0"; + /** + * 寮瑰箷鍐呭 + */ + private String content; + private String col = "0"; + /** + * Cookie涓殑dy_did + */ + private String dy; + /** + * Cookie涓殑acf_uid + */ + private String sender; + private String ifs = "0"; + private String nc = "0"; + private String dat = "0"; + private String rev = "0"; + /** + * 褰撳墠鏃堕棿鎴筹紙绉掞級 + */ + private String tts; + private String admzq = "0"; + /** + * tts寰�鍚庡姞鍑犵鐨勬椂闂存埑锛堟绉掞級 + */ + private String cst; + + public ChatmessageMsg(String content, String dy, String sender) { + this.content = content; + this.dy = dy; + this.sender = sender; + this.tts = String.valueOf(OrLocalDateTimeUtil.zonedCurrentTimeSecs()); + this.cst = String.valueOf(OrLocalDateTimeUtil.zonedCurrentTimeMillis() + RandomUtil.randomLong(8000, 10000)); + } + + @Override + public String getType() { + return DouyuCmdEnum.chatmessage.name(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/ChatmsgMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/ChatmsgMsg.java new file mode 100644 index 0000000..052954e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/ChatmsgMsg.java @@ -0,0 +1,125 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IDanmuMsg; +import tech.ordinaryroad.live.chat.client.douyu.api.DouyuApis; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; + +import java.util.List; + +/** + * <pre>{@code + * { + * "type": "chatmsg", + * "cmdEnum": "chatmsg", + * "cmd": "chatmsg", + * "nn": "瀹嬭�佷簩929", + * "ext": null, + * "bnn": null, + * "level": "1", + * "cst": "1693213418102", + * "brid": "0", + * "bl": "0", + * "dms": "5", + * "rid": "3168536", + * "uid": "396023456", + * "txt": "666", + * "pdg": "47", + * "pdk": "89", + * "sahf": "0", + * "ic": ["avatar_v3", "202101", "45daf5ceb475414293e3da4559552655"], + * "hb": ["2719"], + * "hc": null, + * "cid": "0b37e26cccd54f7c4d73590000000000", + * "lk": null + * } + * }</pre> + * + * @author mjz + * @date 2023/8/28 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class ChatmsgMsg extends BaseDouyuCmdMsg implements IDanmuMsg { + + private String nn; + private String ext; + private String bnn; + private String level; + private String cst; + private String brid; + private byte bl; + private String dms; + private long rid; + private String uid; + private String txt; + private String pdg; + private String pdk; + private String sahf; + private List<String> ic; + private List<String> hb; + private String hc; + private String cid; + private JsonNode lk; + + @Override + public String getType() { + return DouyuCmdEnum.chatmsg.name(); + } + + @Override + public String getBadgeName() { + return this.bnn; + } + + @Override + public byte getBadgeLevel() { + return this.bl; + } + + @Override + public String getUsername() { + return this.nn; + } + + @Override + public String getUserAvatar() { + return DouyuApis.getSmallAvatarUrl(ic); + } + + @Override + public String getContent() { + return this.txt; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/DgbMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/DgbMsg.java new file mode 100644 index 0000000..a8c5416 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/DgbMsg.java @@ -0,0 +1,233 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IGiftMsg; +import tech.ordinaryroad.live.chat.client.douyu.api.DouyuApis; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.dto.GiftListInfo; +import tech.ordinaryroad.live.chat.client.douyu.msg.dto.GiftPropSingle; + +import java.util.List; + +/** + * 鏀跺埌绀肩墿娑堟伅 + * <pre>{@code + * { + * "type": "dgb", + * "nn": "鐢ㄦ埛鍚�", + * "eid": "0", + * "bst": "32", + * "brid": "0", + * "pma": "186963537", + * "bnid": "1", + * "gfid": "824", + * "bl": "0", + * "pid": "268", + * "rid": "290935", + * "mss": "186963457", + * "bcst": "2", + * "uid": "鐢ㄦ埛id", + * "receive_uid": "鎺ュ彈鐢ㄦ埛id", + * "ic": ["avatar_v3", "201912", "d031765fbe764a49887083bcf200da0b"], + * "from": "2", + * "gpf": "1", + * "bnl": "1", + * "ce": "1", + * "bnn": null, + * "receive_nn": "鎺ュ彈鐢ㄦ埛鐢ㄦ埛鍚�", + * "level": "43", + * "bcnt": "1", + * "gs": "0", + * "hits": "249", + * "gfcnt": "249", + * "ct": "0", + * "pfm": "27585", + * "sahf": "0", + * "hc": null, + * "fc": "0", + * "eic": "0" + * } + * }</pre> + * + * @author mjz + * @date 2023/9/8 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DgbMsg extends BaseDouyuCmdMsg implements IGiftMsg { + + /** + * 鐢ㄦ埛鍚� + */ + private String nn; + private String eid; + private String bst; + private String brid; + private String pma; + private String bnid; + private long gfid; + private byte bl; + private String pid; + private String rid; + private String mss; + private String bcst; + /** + * 鐢ㄦ埛id + */ + private String uid; + /** + * 鏀剁ぜ鐗╃敤鎴穒d + */ + private long receive_uid; + private List<String> ic; + private String from; + private String gpf; + private String bnl; + private String ce; + private String bnn; + /** + * 鏀剁ぜ鐗╃敤鎴峰悕 + */ + private String receive_nn; + private String level; + private String bcnt; + private String gs; + /** + * 杩炲嚮 + */ + private String hits; + /** + * 绀肩墿涓暟 + */ + private int gfcnt; + private String ct; + private String pfm; + private String sahf; + private String hc; + private String fc; + private String eic; + private String bsfl; + private String skinid; + + // region 棰濆灞炴�� + private GiftPropSingle giftInfo = GiftPropSingle.DEFAULT_GIFT; + private GiftListInfo roomGiftInfo = GiftListInfo.DEFAULT_GIFT; + // endregion + + @Override + public String getType() { + return DouyuCmdEnum.dgb.name(); + } + + @Override + public String getBadgeName() { + return this.bnn; + } + + @Override + public byte getBadgeLevel() { + return this.bl; + } + + @Override + public String getUsername() { + return this.nn; + } + + @Override + public String getUserAvatar() { + return DouyuApis.getSmallAvatarUrl(ic); + } + + @Override + public String getGiftName() { + if (this.roomGiftInfo != null && this.roomGiftInfo != GiftListInfo.DEFAULT_GIFT) { + return this.roomGiftInfo.getName(); + } + + if (this.giftInfo == null) { + return "鏈煡绀肩墿"; + } + + return this.giftInfo.getName(); + } + + @Override + public String getGiftImg() { + if (this.roomGiftInfo != null && this.roomGiftInfo != GiftListInfo.DEFAULT_GIFT && this.roomGiftInfo.getBasicInfo() != null) { + return this.roomGiftInfo.getPicUrlPrefix() + this.roomGiftInfo.getBasicInfo().getChatPic(); + } + + if (this.giftInfo == null) { + return ""; + } + + return this.giftInfo.getPicUrlPrefix() + this.giftInfo.getChatPic(); + } + + @Override + public String getGiftId() { + return Long.toString(this.gfid); + } + + @Override + public int getGiftCount() { + return this.gfcnt; + } + + /** + * 100 => 1楸肩繀 + */ + @Override + public int getGiftPrice() { + if (this.roomGiftInfo != null && this.roomGiftInfo != GiftListInfo.DEFAULT_GIFT && this.roomGiftInfo.getPriceInfo() != null) { + return this.roomGiftInfo.getPriceInfo().getPrice(); + } + + if (this.giftInfo == null) { + return -1; + } + + return this.giftInfo.getPrice(); + } + + @Override + public String getReceiveUid() { + return Long.toString(this.receive_uid); + } + + @Override + public String getReceiveUsername() { + return this.receive_nn; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/DouyuCmdMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/DouyuCmdMsg.java new file mode 100644 index 0000000..dcef880 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/DouyuCmdMsg.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * type@=chatmsg/rid@=7750753/uid@=549977/nn@=涓�闂竴闂寒鍝佸搧/txt@=鍐烽棬姝屾墜鍝庯紝澹伴煶鐙壒鍝�/cid@=044c3bf3074b483275a44e0000000000/ic@=avatar@Sdefault@S08/level@=29/sahf@=0/nl@=7/cst@=1693107871294/bnn@=/bl@=0/brid@=0/hc@=/lk@=/dms@=8/pdg@=26/pdk@=86/ext@=/ + * + * @see tech.ordinaryroad.live.chat.client.douyu.util.DouyuCodecUtil#getDouyuMsgClassByType(DouyuCmdEnum, short) + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DouyuCmdMsg extends BaseDouyuCmdMsg { + + private String tick; + + private String res; + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/H5ckreqMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/H5ckreqMsg.java new file mode 100644 index 0000000..3736591 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/H5ckreqMsg.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/9/8 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class H5ckreqMsg extends BaseDouyuCmdMsg { + + private String rid; + private String ti; + + @Override + public String getType() { + return DouyuCmdEnum.h5ckreq.name(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/H5csMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/H5csMsg.java new file mode 100644 index 0000000..29b0957 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/H5csMsg.java @@ -0,0 +1,50 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/9/8 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class H5csMsg extends BaseDouyuCmdMsg { + + private String result; + + @Override + public String getType() { + return DouyuCmdEnum.h5cs.name(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/H5gkcreqMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/H5gkcreqMsg.java new file mode 100644 index 0000000..7e5a8b9 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/H5gkcreqMsg.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/9/8 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class H5gkcreqMsg extends BaseDouyuCmdMsg { + + private String rid; + private String ti; + + @Override + public String getType() { + return DouyuCmdEnum.h5gkcreq.name(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/HeartbeatMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/HeartbeatMsg.java new file mode 100644 index 0000000..934e953 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/HeartbeatMsg.java @@ -0,0 +1,45 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +public class HeartbeatMsg extends BaseDouyuCmdMsg { + + @Override + public String getType() { + return DouyuCmdEnum.mrkl.name(); + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/HeartbeatReplyMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/HeartbeatReplyMsg.java new file mode 100644 index 0000000..37eaa90 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/HeartbeatReplyMsg.java @@ -0,0 +1,45 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/1/6 + */ +public class HeartbeatReplyMsg extends BaseDouyuCmdMsg { + + @Override + public String getType() { + return DouyuCmdEnum.mrkl.name(); + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/JoingroupMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/JoingroupMsg.java new file mode 100644 index 0000000..9d2694f --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/JoingroupMsg.java @@ -0,0 +1,52 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/8/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class JoingroupMsg extends BaseDouyuCmdMsg { + + private long rid; + private long gid = -9999; + + @Override + public String getType() { + return DouyuCmdEnum.joingroup.name(); + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/KeepliveMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/KeepliveMsg.java new file mode 100644 index 0000000..e7a0ff3 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/KeepliveMsg.java @@ -0,0 +1,62 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.util.OrLocalDateTimeUtil; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * <pre>{@code + * type@=keeplive/vbw@=0/cdn@=hs-h5/tick@=1694099389/kd@=da9c384371b4552ac94e1237d2596262/ + * }</pre> + * + * @author mjz + * @date 2023/9/7 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class KeepliveMsg extends BaseDouyuCmdMsg { + + private String vbw = "0"; + private String cnd; + private long tick = OrLocalDateTimeUtil.zonedCurrentTimeSecs(); + private String kd = ""; + + public KeepliveMsg(String cnd) { + this.cnd = cnd; + } + + @Override + public String getType() { + return DouyuCmdEnum.keeplive.name(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/LoginreqMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/LoginreqMsg.java new file mode 100644 index 0000000..f180e8c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/LoginreqMsg.java @@ -0,0 +1,107 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.util.OrLocalDateTimeUtil; +import tech.ordinaryroad.live.chat.client.douyu.api.DouyuApis; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; + +import java.util.Arrays; +import java.util.List; + +/** + * @author mjz + * @date 2023/8/27 + */ +@Getter +@Setter +@RequiredArgsConstructor +public class LoginreqMsg extends BaseDouyuCmdMsg { + + public static List<String> SHOULD_IGNORE_NEW_LOGIN_PROPERTIES = Arrays.asList("roomid", "dfl", "username", "uid", "ver", "aver", "ct", "type"); + public static List<String> SHOULD_IGNORE_OLD_LOGIN_PROPERTIES = Arrays.asList("type", "roomid", "dfl", "username", "password", "ltkid", "biz", "stk", "devid", "ct", "pt", "cvr", "tvr", "apd", "rt", "vk", "ver", "aver", "dmbt", "dmbv"); + + private long roomid; + private String dfl; + private String username; + private long uid; + private String ver; + private String aver; + private int ct = 0; + + private String password; + /** + * Cookie涓殑acf_ltkid + */ + private String ltkid; + private String biz; + /** + * Cookie涓殑acf_stk + */ + private String stk; + /** + * Cookie涓殑dy_did + */ + private String devid; + private String pt = "2"; + private String cvr = "0"; + private String tvr = "7"; + private String apd = ""; + private long rt = OrLocalDateTimeUtil.zonedCurrentTimeSecs(); + private String vk; + private String dmbt = "chrome"; + private String dmbv = "116"; + + public LoginreqMsg(long roomid, String dfl, String username, long uid, String ver, String aver) { + this.roomid = roomid; + this.dfl = dfl; + this.username = username; + this.uid = uid; + this.ver = ver; + this.aver = aver; + } + + public LoginreqMsg(long roomid, String dfl, String username, String ver, String aver, String ltkid, String biz, String stk, String devid) { + this.roomid = roomid; + this.dfl = dfl; + this.username = username; + this.ver = ver; + this.aver = aver; + this.ltkid = ltkid; + this.biz = biz; + this.stk = stk; + this.devid = devid; + this.vk = DouyuApis.generateVk(devid); + } + + @Override + public String getType() { + return DouyuCmdEnum.loginreq.name(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/LoginresMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/LoginresMsg.java new file mode 100644 index 0000000..8db0f3c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/LoginresMsg.java @@ -0,0 +1,77 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/8/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class LoginresMsg extends BaseDouyuCmdMsg { + + private long userid; + private int roomgroup; + private int pg; + private long sessionid; + private String username; + private String nickname; + private int live_stat; + private boolean is_illegal; + private String ill_ct; + private String ill_ts; + private String now; + private String ps; + private String es; + private String it; + private String its; + private String npv; + private String best_dlev; + private String cur_lev; + private String nrc; + private String ih; + private String sid; + private String sahf; + private String sceneid; + private String newrg; + private String regts; + private String ip; + private String rn; + private String rct; + + @Override + public String getType() { + return DouyuCmdEnum.loginres.name(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/MapkbMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/MapkbMsg.java new file mode 100644 index 0000000..e81b764 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/MapkbMsg.java @@ -0,0 +1,53 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; + +import java.util.List; + +/** + * @author mjz + * @date 2023/8/28 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class MapkbMsg extends BaseDouyuCmdMsg { + + private long pk_time; + private List<Object> teams; + + @Override + public String getType() { + return DouyuCmdEnum.mapkb.name(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/MsgrepeaterproxylistMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/MsgrepeaterproxylistMsg.java new file mode 100644 index 0000000..0bfdb5f --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/MsgrepeaterproxylistMsg.java @@ -0,0 +1,96 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; + +import java.util.List; +import java.util.Map; + +/** + * @author mjz + * @date 2023/9/8 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class MsgrepeaterproxylistMsg extends BaseDouyuCmdMsg { + + private String rid; + + /** + * <pre>{@code + * [{ + * "nr": "0", + * "port": "8501", + * "ip": "danmuproxy.douyu.com", + * "id": "0", + * "ml": "10000" + * }, { + * "nr": "0", + * "port": "8502", + * "ip": "danmuproxy.douyu.com", + * "id": "0", + * "ml": "10000" + * }, { + * "nr": "0", + * "port": "8503", + * "ip": "danmuproxy.douyu.com", + * "id": "0", + * "ml": "10000" + * }, { + * "nr": "0", + * "port": "8504", + * "ip": "danmuproxy.douyu.com", + * "id": "0", + * "ml": "10000" + * }, { + * "nr": "0", + * "port": "8505", + * "ip": "danmuproxy.douyu.com", + * "id": "0", + * "ml": "10000" + * }, { + * "nr": "0", + * "port": "8506", + * "ip": "danmuproxy.douyu.com", + * "id": "0", + * "ml": "10000" + * }] + * }</pre> + */ + private List<Map<String, String>> list; + + @Override + public String getType() { + return DouyuCmdEnum.msgrepeaterproxylist.name(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/SubMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/SubMsg.java new file mode 100644 index 0000000..c642c28 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/SubMsg.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; + +/** + * @author mjz + * @date 2023/8/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SubMsg extends BaseDouyuCmdMsg { + + private String mt = "dayrk"; + + @Override + public String getType() { + return DouyuCmdEnum.sub.name(); + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/UenterMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/UenterMsg.java new file mode 100644 index 0000000..91b6b2e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/UenterMsg.java @@ -0,0 +1,78 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IEnterRoomMsg; +import tech.ordinaryroad.live.chat.client.douyu.api.DouyuApis; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; + +import java.util.List; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class UenterMsg extends BaseDouyuCmdMsg implements IEnterRoomMsg { + + private String nn; + private long uid; + private int level; + private String sahf; + private List<String> ic; + private String rid; + + @Override + public String getBadgeName() { + return null; + } + + @Override + public byte getBadgeLevel() { + return 0; + } + + @Override + public String getUid() { + return Long.toString(uid); + } + + @Override + public String getUsername() { + return nn; + } + + @Override + public String getUserAvatar() { + return DouyuApis.getSmallAvatarUrl(ic); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/base/BaseDouyuCmdMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/base/BaseDouyuCmdMsg.java new file mode 100644 index 0000000..90e7478 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/base/BaseDouyuCmdMsg.java @@ -0,0 +1,62 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg.base; + + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.base.msg.BaseCmdMsg; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; + +/** + * @author mjz + * @date 2023/1/6 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public abstract class BaseDouyuCmdMsg extends BaseCmdMsg<DouyuCmdEnum> implements IDouyuMsg { + + private String type; + + @Override + public String getCmd() { + return type; + } + + @Override + public void setCmd(String cmd) { + type = cmd; + } + + @Override + public DouyuCmdEnum getCmdEnum() { + return DouyuCmdEnum.getByString(type); + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/base/IDouyuMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/base/IDouyuMsg.java new file mode 100644 index 0000000..dac7d08 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/base/IDouyuMsg.java @@ -0,0 +1,36 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.msg.base; + +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +/** + * @author mjz + * @date 2023/8/26 + */ +public interface IDouyuMsg extends IMsg { + + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/dto/GiftListInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/dto/GiftListInfo.java new file mode 100644 index 0000000..03f2ee3 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/dto/GiftListInfo.java @@ -0,0 +1,136 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package tech.ordinaryroad.live.chat.client.douyu.msg.dto; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.*; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class GiftListInfo { + + public static final GiftListInfo DEFAULT_GIFT = new GiftListInfo(); + + private BasicInfo basicInfo; + private JsonNode batchInfo; + private int batchInfoFlag; + private int countLimit; + private int defaultSkinId; + private int donateStatus; + private JsonNode effectInfo; + private int effectStatus; + private int endTime; + private JsonNode growthInfo; + private long hitInterval; + private int id; + private int isBatchLimited; + private int isFace; + private String name = "鏈煡绀肩墿"; + private String picUrlPrefix; + private PriceInfo priceInfo = new PriceInfo(); + private int showStatus; + private List<String> skinIds; + private int startTime; + private List<Integer> tabIds; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + + @Data + public static class BasicInfo { + private String bizTag; + private String borderColor; + private String chatPic; + private String culture; + private String desc1; + private String desc2; + private String focusPic; + private String giftPic; + private int giftType; + private int guardLevel; + private String sendPic; + private String subscriptColor; + private String subscriptText; + private String webSubscriptBigPic; + private String webSubscriptSmallPic; + private String webSubscriptText; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } + + @Data + public static class PriceInfo { + private int price = -1; + private String priceType; + private int returnNum; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/dto/GiftPropInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/dto/GiftPropInfo.java new file mode 100644 index 0000000..64e3e28 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/dto/GiftPropInfo.java @@ -0,0 +1,99 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package tech.ordinaryroad.live.chat.client.douyu.msg.dto; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class GiftPropInfo { + + public static final GiftPropInfo DEFAULT_GIFT = new GiftPropInfo(); + + private String name = "鏈煡绀肩墿"; + private String bimg; + private String himg; + private String cimg; + private int stay_time; + private int show_combo; + private String batch_preset; + private List<String> hit; + private int type; + private int style; + private int pc; + private int ry; + private int ef; + private int effect; + private int is_syn_fs; + private int is_stay; + private String drgb; + private String urgb; + private String grgb; + private String brgb; + private String small_effect_icon; + private String big_effect_icon; + private String effect_icon; + private String gift_icon; + private String gift_open_icon; + private int bonus; + private String web_flash; + private String hit_interval; + private int devote; + private int attack; + private int exp; + private int active_type; + private String pc_full_icon; + private String pc_full_bg_icon; + private int pc_show_combo; + private String pc_urgb; + private String pc_grgb; + private int index; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/dto/GiftPropSingle.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/dto/GiftPropSingle.java new file mode 100644 index 0000000..de9ebe6 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/msg/dto/GiftPropSingle.java @@ -0,0 +1,97 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +package tech.ordinaryroad.live.chat.client.douyu.msg.dto; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.databind.JsonNode; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.HashMap; +import java.util.Map; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class GiftPropSingle { + + public static final GiftPropSingle DEFAULT_GIFT = new GiftPropSingle(); + + // key,value + private JsonNode batchInfo; + private String bizTag; + private String borderColor; + private String chatPic; + private int count; + private String description; + private String description2; + private int devote; + // key,value + private JsonNode effectInfo; + private int exp; + private int expiry; + private String focusPic; + private int hitInterval; + private long id; + private int intimate; + private String intro; + private int isClick; + private int isFace; + private int isValuable; + private int level; + private int levelTime; + private int met; + private String name = "鏈煡绀肩墿"; + private String picUrlPrefix; + private int price = -1; + private int priceType; + private String propPic; + private int propType; + private int returnNum; + private String sendPic; + private String subscriptColor; + private String subscriptText; + private String webSubscriptBigPic; + private String webSubscriptSmallPic; + private String webSubscriptText; + + /** + * 鏈煡灞炴�ч兘鏀惧湪杩� + */ + private final Map<String, JsonNode> unknownProperties = new HashMap<>(); + + @JsonAnyGetter + public Map<String, JsonNode> getUnknownProperties() { + return unknownProperties; + } + + @JsonAnySetter + public void setOther(String key, JsonNode value) { + this.unknownProperties.put(key, value); + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/AuthWebSocketFrame.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/AuthWebSocketFrame.java new file mode 100644 index 0000000..6293b94 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/AuthWebSocketFrame.java @@ -0,0 +1,40 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.netty.frame; + +import io.netty.buffer.ByteBuf; +import tech.ordinaryroad.live.chat.client.douyu.netty.frame.base.BaseDouyuWebSocketFrame; + +/** + * @author mjz + * @date 2023/1/5 + */ +public class AuthWebSocketFrame extends BaseDouyuWebSocketFrame { + + public AuthWebSocketFrame(ByteBuf byteBuf) { + super(byteBuf); + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/HeartbeatWebSocketFrame.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/HeartbeatWebSocketFrame.java new file mode 100644 index 0000000..1dd882e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/HeartbeatWebSocketFrame.java @@ -0,0 +1,40 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.netty.frame; + +import io.netty.buffer.ByteBuf; +import tech.ordinaryroad.live.chat.client.douyu.netty.frame.base.BaseDouyuWebSocketFrame; + +/** + * @author mjz + * @date 2023/1/5 + */ +public class HeartbeatWebSocketFrame extends BaseDouyuWebSocketFrame { + + public HeartbeatWebSocketFrame(ByteBuf byteBuf) { + super(byteBuf); + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/KeepliveWebSocketFrame.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/KeepliveWebSocketFrame.java new file mode 100644 index 0000000..43e88af --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/KeepliveWebSocketFrame.java @@ -0,0 +1,40 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.netty.frame; + +import io.netty.buffer.ByteBuf; +import tech.ordinaryroad.live.chat.client.douyu.netty.frame.base.BaseDouyuWebSocketFrame; + +/** + * @author mjz + * @date 2023/9/8 + */ +public class KeepliveWebSocketFrame extends BaseDouyuWebSocketFrame { + + public KeepliveWebSocketFrame(ByteBuf byteBuf) { + super(byteBuf); + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/base/BaseDouyuWebSocketFrame.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/base/BaseDouyuWebSocketFrame.java new file mode 100644 index 0000000..da484fe --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/base/BaseDouyuWebSocketFrame.java @@ -0,0 +1,39 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.netty.frame.base; + +import io.netty.buffer.ByteBuf; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; + +/** + * @author mjz + * @date 2023/8/27 + */ +public abstract class BaseDouyuWebSocketFrame extends BinaryWebSocketFrame { + + public BaseDouyuWebSocketFrame(ByteBuf byteBuf) { + super(byteBuf); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/factory/DouyuWebSocketFrameFactory.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/factory/DouyuWebSocketFrameFactory.java new file mode 100644 index 0000000..64bf90b --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/frame/factory/DouyuWebSocketFrameFactory.java @@ -0,0 +1,181 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.netty.frame.factory; + +import cn.hutool.core.lang.UUID; +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.RandomUtil; +import cn.hutool.core.util.StrUtil; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocketFrame; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatCookieUtil; +import tech.ordinaryroad.live.chat.client.douyu.api.DouyuApis; +import tech.ordinaryroad.live.chat.client.douyu.config.DouyuLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuClientModeEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.*; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.douyu.netty.frame.AuthWebSocketFrame; +import tech.ordinaryroad.live.chat.client.douyu.netty.frame.HeartbeatWebSocketFrame; +import tech.ordinaryroad.live.chat.client.douyu.netty.frame.KeepliveWebSocketFrame; +import tech.ordinaryroad.live.chat.client.douyu.util.DouyuCodecUtil; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * @author mjz + * @date 2023/1/5 + */ +public class DouyuWebSocketFrameFactory { + + private static final ConcurrentHashMap<Long, DouyuWebSocketFrameFactory> CACHE = new ConcurrentHashMap<>(); + /** + * 娴忚鍣ㄥ湴鍧�涓殑鎴块棿id锛屾殏涓嶆敮鎸佺煭id + */ + private final long roomId; + private volatile static HeartbeatMsg heartbeatMsg; + + public DouyuWebSocketFrameFactory(long roomId) { + this.roomId = roomId; + } + + public synchronized static DouyuWebSocketFrameFactory getInstance(long roomId) { + return CACHE.computeIfAbsent(roomId, aLong -> new DouyuWebSocketFrameFactory(roomId)); + } + + /** + * 鍒涘缓璁よ瘉鍖� + * + * @param mode {@link DouyuClientModeEnum#DANMU}, {@link DouyuClientModeEnum#WS} + * @param ver {@link DouyuLiveChatClientConfig#getVer()} + * @param aver {@link DouyuLiveChatClientConfig#getAver()} + * @param cookie 娴忚鍣–ookie锛屽彂閫佸脊骞曟椂蹇呬紶 + * @return AuthWebSocketFrame + */ + public AuthWebSocketFrame createAuth(DouyuClientModeEnum mode, String ver, String aver, String cookie) { + try { + // type@=loginreq/roomid@=7750753/dfl@=/username@=visitor10424697/uid@=1168052601/ver@=20220825/aver@=218101901/ct@=0/ + LoginreqMsg loginreqMsg; + long realRoomId = DouyuApis.getRealRoomId(roomId); + long uid; + String username; + Map<String, String> cookieMap = OrLiveChatCookieUtil.parseCookieString(cookie); + + if (cookieMap.isEmpty()) { + // 瑙嗕负鏈櫥褰� + if (mode == DouyuClientModeEnum.DANMU) { + uid = RandomUtil.randomLong(10000000, 19999999); + username = "visitor" + RandomUtil.randomLong(10000000, 19999999); + loginreqMsg = new LoginreqMsg(realRoomId, "", username, uid, ver, aver); + return new AuthWebSocketFrame(DouyuCodecUtil.encode(loginreqMsg, LoginreqMsg.SHOULD_IGNORE_NEW_LOGIN_PROPERTIES)); + } else { + loginreqMsg = new LoginreqMsg(realRoomId, "", "", ver, aver, "", "", "", UUID.fastUUID().toString(true)); + return new AuthWebSocketFrame(DouyuCodecUtil.encode(loginreqMsg, LoginreqMsg.SHOULD_IGNORE_OLD_LOGIN_PROPERTIES)); + } + } + // 瑙嗕负鐧诲綍 + else { + String acfUid = OrLiveChatCookieUtil.getCookieByName(cookieMap, DouyuApis.KEY_COOKIE_ACF_UID, () -> { + throw new BaseException("Cookie涓己灏戝瓧娈�" + DouyuApis.KEY_COOKIE_ACF_UID); + }); + uid = NumberUtil.parseLong(acfUid); + username = acfUid; + String dfl = "sn@A=105@Sss@A=1"; + if (mode == DouyuClientModeEnum.DANMU) { + loginreqMsg = new LoginreqMsg(realRoomId, dfl, username, uid, ver, aver); + return new AuthWebSocketFrame(DouyuCodecUtil.encode(loginreqMsg, LoginreqMsg.SHOULD_IGNORE_NEW_LOGIN_PROPERTIES)); + } else { + String acfLtkid = OrLiveChatCookieUtil.getCookieByName(cookieMap, DouyuApis.KEY_COOKIE_ACF_LTKID, () -> { + throw new BaseException("Cookie涓己灏戝瓧娈�" + DouyuApis.KEY_COOKIE_ACF_LTKID); + }); + String acfStk = OrLiveChatCookieUtil.getCookieByName(cookieMap, DouyuApis.KEY_COOKIE_ACF_STK, () -> { + throw new BaseException("Cookie涓己灏戝瓧娈�" + DouyuApis.KEY_COOKIE_ACF_STK); + }); + String dyDid = OrLiveChatCookieUtil.getCookieByName(cookieMap, DouyuApis.KEY_COOKIE_DY_DID, () -> { + throw new BaseException("Cookie涓己灏戝瓧娈�" + DouyuApis.KEY_COOKIE_DY_DID); + }); + loginreqMsg = new LoginreqMsg(realRoomId, dfl, username, ver, aver, acfLtkid, "1", acfStk, dyDid); + return new AuthWebSocketFrame(DouyuCodecUtil.encode(loginreqMsg, LoginreqMsg.SHOULD_IGNORE_OLD_LOGIN_PROPERTIES)); + } + } + } catch (Exception e) { + throw new BaseException(String.format("璁よ瘉鍖呭垱寤哄け璐ワ紝璇锋鏌ユ埧闂村彿鏄惁姝g‘銆俽oomId: %d, msg: %s", roomId, e.getMessage())); + } + } + + public AuthWebSocketFrame createAuth(DouyuClientModeEnum mode, String ver, String aver) { + return this.createAuth(mode, ver, aver, null); + } + + public HeartbeatWebSocketFrame createHeartbeat() { + return new HeartbeatWebSocketFrame(DouyuCodecUtil.encode(this.getHeartbeatMsg())); + } + + public KeepliveWebSocketFrame createKeeplive(String cookie) { + return new KeepliveWebSocketFrame(DouyuCodecUtil.encode(this.getKeepliveMsg(StrUtil.isNotBlank(cookie) ? "hs-h5" : ""))); + } + + /** + * 蹇冭烦鍖呭崟渚嬫ā寮� + * + * @return HeartbeatWebSocketFrame + */ + public HeartbeatMsg getHeartbeatMsg() { + if (heartbeatMsg == null) { + synchronized (DouyuWebSocketFrameFactory.this) { + if (heartbeatMsg == null) { + heartbeatMsg = new HeartbeatMsg(); + } + } + } + return heartbeatMsg; + } + + private BaseDouyuCmdMsg getKeepliveMsg(String cnd) { + return new KeepliveMsg(cnd); + } + + public WebSocketFrame createJoingroup() { + JoingroupMsg joingroupMsg = new JoingroupMsg(); + joingroupMsg.setRid(roomId); + return new BinaryWebSocketFrame(DouyuCodecUtil.encode(joingroupMsg)); + } + + public WebSocketFrame createSub() { + return new BinaryWebSocketFrame(DouyuCodecUtil.encode(new SubMsg())); + } + + public WebSocketFrame createDanmu(String msg, String cookie) { + String dyDid = OrLiveChatCookieUtil.getCookieByName(cookie, DouyuApis.KEY_COOKIE_DY_DID, () -> { + throw new BaseException("cookie涓己灏戝弬鏁�" + DouyuApis.KEY_COOKIE_DY_DID); + }); + String acfUid = OrLiveChatCookieUtil.getCookieByName(cookie, DouyuApis.KEY_COOKIE_ACF_UID, () -> { + throw new BaseException("cookie涓己灏戝弬鏁�" + DouyuApis.KEY_COOKIE_ACF_UID); + }); + ChatmessageMsg chatmessageMsg = new ChatmessageMsg(msg, dyDid, acfUid); + return new BinaryWebSocketFrame(DouyuCodecUtil.encode(chatmessageMsg)); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuBinaryFrameHandler.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuBinaryFrameHandler.java new file mode 100644 index 0000000..f7d3e55 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuBinaryFrameHandler.java @@ -0,0 +1,98 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.netty.handler; + +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandler; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.douyu.client.base.BaseDouyuLiveChatClient; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; +import tech.ordinaryroad.live.chat.client.douyu.msg.ChatmsgMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.DgbMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.DouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.UenterMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.IDouyuMsg; +import tech.ordinaryroad.live.chat.client.douyu.util.DouyuCodecUtil; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientBinaryFrameHandler; + +import java.util.List; + + +/** + * 娑堟伅澶勭悊鍣� + * + * @author mjz + * @date 2023/1/4 + */ +@Slf4j +@ChannelHandler.Sharable +public class DouyuBinaryFrameHandler extends BaseNettyClientBinaryFrameHandler<BaseDouyuLiveChatClient, DouyuBinaryFrameHandler, DouyuCmdEnum, IDouyuMsg, IDouyuMsgListener> { + + public DouyuBinaryFrameHandler(List<IDouyuMsgListener> msgListeners, BaseDouyuLiveChatClient client) { + super(msgListeners, client); + } + + public DouyuBinaryFrameHandler(List<IDouyuMsgListener> msgListeners, long roomId) { + super(msgListeners, roomId); + } + + @Override + public void onCmdMsg(DouyuCmdEnum cmd, ICmdMsg<DouyuCmdEnum> cmdMsg) { + if (super.msgListeners.isEmpty()) { + return; + } + + switch (cmd) { + case chatmsg: { + iteratorMsgListeners(msgListener -> msgListener.onDanmuMsg(DouyuBinaryFrameHandler.this, (ChatmsgMsg) cmdMsg)); + break; + } + case dgb: { + iteratorMsgListeners(msgListener -> msgListener.onGiftMsg(DouyuBinaryFrameHandler.this, (DgbMsg) cmdMsg)); + break; + } + case uenter: { + iteratorMsgListeners(msgListener -> msgListener.onEnterRoomMsg(DouyuBinaryFrameHandler.this, (UenterMsg) cmdMsg)); + break; + } + default: { + if (!(cmdMsg instanceof DouyuCmdMsg)) { + if (log.isDebugEnabled()) { + log.debug("闈濪ouyuCmdMsg {}", cmdMsg.getClass()); + } + return; + } + iteratorMsgListeners(msgListener -> msgListener.onOtherCmdMsg(DouyuBinaryFrameHandler.this, cmd, cmdMsg)); + } + } + } + + @Override + protected List<IDouyuMsg> decode(ByteBuf byteBuf) { + return DouyuCodecUtil.decode(byteBuf); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuConnectionHandler.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuConnectionHandler.java new file mode 100644 index 0000000..e878c2b --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/netty/handler/DouyuConnectionHandler.java @@ -0,0 +1,173 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.netty.handler; + +import io.netty.channel.Channel; +import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker; +import io.netty.handler.codec.http.websocketx.WebSocketFrame; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.client.base.BaseDouyuLiveChatClient; +import tech.ordinaryroad.live.chat.client.douyu.config.DouyuLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuClientModeEnum; +import tech.ordinaryroad.live.chat.client.douyu.netty.frame.factory.DouyuWebSocketFrameFactory; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientConnectionHandler; + + +/** + * 杩炴帴澶勭悊鍣� + * + * @author mjz + * @date 2023/8/21 + */ +@Slf4j +@ChannelHandler.Sharable +public class DouyuConnectionHandler extends BaseNettyClientConnectionHandler<BaseDouyuLiveChatClient, DouyuConnectionHandler> { + + @Getter + private final DouyuClientModeEnum mode; + /** + * 浠lientConfig涓轰富 + */ + private final long roomId; + /** + * 浠lientConfig涓轰富 + */ + private final String ver; + /** + * 浠lientConfig涓轰富 + */ + private final String aver; + /** + * 浠lientConfig涓轰富 + */ + private String cookie; + + public DouyuConnectionHandler(DouyuClientModeEnum mode, WebSocketClientHandshaker handshaker, BaseDouyuLiveChatClient client, IBaseConnectionListener<DouyuConnectionHandler> listener) { + super(handshaker, client, listener); + this.mode = mode; + this.roomId = client.getConfig().getRoomId(); + this.ver = client.getConfig().getVer(); + this.aver = client.getConfig().getAver(); + this.cookie = client.getConfig().getCookie(); + } + + public DouyuConnectionHandler(DouyuClientModeEnum mode, WebSocketClientHandshaker handshaker, BaseDouyuLiveChatClient client) { + this(mode, handshaker, client, null); + } + + public DouyuConnectionHandler(DouyuClientModeEnum mode, WebSocketClientHandshaker handshaker, long roomId, String ver, String aver, IBaseConnectionListener<DouyuConnectionHandler> listener, String cookie) { + super(handshaker, listener); + this.mode = mode; + this.roomId = roomId; + this.ver = ver; + this.aver = aver; + this.cookie = cookie; + } + + public DouyuConnectionHandler(DouyuClientModeEnum mode, WebSocketClientHandshaker handshaker, long roomId, String ver, String aver, IBaseConnectionListener<DouyuConnectionHandler> listener) { + this(mode, handshaker, roomId, ver, aver, listener, null); + } + + public DouyuConnectionHandler(DouyuClientModeEnum mode, WebSocketClientHandshaker handshaker, long roomId, String ver, String aver, String cookie) { + this(mode, handshaker, roomId, ver, aver, null, cookie); + } + + public DouyuConnectionHandler(DouyuClientModeEnum mode, WebSocketClientHandshaker handshaker, long roomId, String ver, String aver) { + this(mode, handshaker, roomId, ver, aver, null, null); + } + + @Override + protected void sendHeartbeat(ChannelHandlerContext ctx) { + if (log.isDebugEnabled()) { + log.debug("鍙戦�佸績璺冲寘"); + } + WebSocketFrame webSocketFrame; + if (mode == DouyuClientModeEnum.DANMU) { + webSocketFrame = getWebSocketFrameFactory(getRoomId()).createHeartbeat(); + } else { + webSocketFrame = getWebSocketFrameFactory(getRoomId()).createKeeplive(getCookie()); + } + ctx.writeAndFlush(webSocketFrame).addListener((ChannelFutureListener) future -> { + if (future.isSuccess()) { + if (log.isDebugEnabled()) { + log.debug("蹇冭烦鍖呭彂閫佸畬鎴�"); + } + } else { + log.error("蹇冭烦鍖呭彂閫佸け璐�", future.cause()); + } + }); + } + + @Override + public void sendAuthRequest(Channel channel) { + if (log.isDebugEnabled()) { + log.debug("鍙戦�佽璇佸寘"); + } + channel.writeAndFlush(getWebSocketFrameFactory(getRoomId()).createAuth(mode, getVer(), getAver(), getCookie())); + } + + private DouyuWebSocketFrameFactory getWebSocketFrameFactory(long roomId) { + return DouyuWebSocketFrameFactory.getInstance(roomId); + } + + public long getRoomId() { + return client != null ? client.getConfig().getRoomId() : roomId; + } + + private String getVer() { + return client != null ? client.getConfig().getVer() : ver; + } + + private String getAver() { + return client != null ? client.getConfig().getAver() : aver; + } + + private String getCookie() { + return client != null ? client.getConfig().getCookie() : cookie; + } + + @Override + protected long getHeartbeatPeriod() { + if (client == null) { + return DouyuLiveChatClientConfig.DEFAULT_HEARTBEAT_PERIOD; + } else { + return client.getConfig().getHeartbeatPeriod(); + } + } + + @Override + protected long getHeartbeatInitialDelay() { + if (client == null) { + return DouyuLiveChatClientConfig.DEFAULT_HEARTBEAT_INITIAL_DELAY; + } else { + return client.getConfig().getHeartbeatInitialDelay(); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/util/DouyuCodecUtil.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/util/DouyuCodecUtil.java new file mode 100644 index 0000000..dad8a58 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/main/java/tech/ordinaryroad/live/chat/client/douyu/util/DouyuCodecUtil.java @@ -0,0 +1,329 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.util; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.util.ReflectUtil; +import cn.hutool.core.util.StrUtil; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatReflectUtil; +import tech.ordinaryroad.live.chat.client.douyu.api.DouyuApis; +import tech.ordinaryroad.live.chat.client.douyu.client.DouyuLiveChatClient; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.msg.DgbMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.DouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.HeartbeatMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.HeartbeatReplyMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.IDouyuMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.dto.GiftListInfo; +import tech.ordinaryroad.live.chat.client.douyu.msg.dto.GiftPropSingle; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.nio.charset.StandardCharsets; +import java.util.*; + +/** + * 鍙傝�冿細https://open.douyu.com/source/api/63 + * + * @author mjz + * @date 2023/1/6 + */ +@Slf4j +public class DouyuCodecUtil { + + public static final String[] IGNORE_PROPERTIES = {"OBJECT_MAPPER", "unknownProperties"}; + /** + * 浠HOULD_IGNORE寮�澶寸殑鎴愬憳鍙橀噺灏嗕笉浼氬簭鍒楀寲 + */ + public static final String SHOULD_IGNORE_PROPERTIES_PREFIX = "SHOULD_IGNORE"; + + public static final short MSG_TYPE_SEND = 689; + public static final short MSG_TYPE_RECEIVE = 690; + public static final short FRAME_HEADER_LENGTH = 8; + + public static ByteBuf encode(BaseDouyuCmdMsg msg, List<String> containProperties) { + ByteBuf out = Unpooled.buffer(FRAME_HEADER_LENGTH); + String bodyDouyuSttString = StrUtil.nullToEmpty(toDouyuSttString(msg, containProperties)) + SUFFIX; + byte[] bodyBytes = bodyDouyuSttString.getBytes(StandardCharsets.UTF_8); + int length = bodyBytes.length + FRAME_HEADER_LENGTH; + out.writeIntLE(length); + out.writeIntLE(length); + out.writeShortLE(MSG_TYPE_SEND); + out.writeByte(0); + out.writeByte(0); + out.writeBytes(bodyBytes); + return out; + } + + public static ByteBuf encode(BaseDouyuCmdMsg msg) { + return encode(msg, null); + } + + public static List<IDouyuMsg> decode(ByteBuf in) { + List<IDouyuMsg> msgList = new ArrayList<>(); + Queue<ByteBuf> pendingByteBuf = new LinkedList<>(); + + do { + Optional<IDouyuMsg> msg = doDecode(in, pendingByteBuf); + msg.ifPresent(msgList::add); + in = pendingByteBuf.poll(); + } while (in != null); + + return msgList; + } + + /** + * 鎵ц瑙g爜鎿嶄綔 + * + * @param in handler鏀跺埌鐨勪竴鏉℃秷鎭� + * @param pendingByteBuf 鐢ㄤ簬瀛樻斁鏈鍙栧畬鐨凚yteBuf + * @return Optional<IDouyuMsg> 浣曟椂涓虹┖鍊硷細涓嶆敮鎸佺殑{@link DouyuCmdEnum}锛寋@link #parseDouyuSttString(String, short)}鍙嶅簭鍒楀寲澶辫触 + */ + private static Optional<IDouyuMsg> doDecode(ByteBuf in, Queue<ByteBuf> pendingByteBuf) { + int length = in.readIntLE(); + in.readIntLE(); + // MSG_TYPE_RECEIVE + short msgType = in.readShortLE(); + if (msgType != MSG_TYPE_RECEIVE) { + log.error("decode娑堟伅绫诲瀷 闈� 鏀跺埌鐨勬秷鎭�"); + } + in.readByte(); + in.readByte(); + int contentLength = length - FRAME_HEADER_LENGTH; + byte[] inputBytes = new byte[contentLength]; + in.readBytes(inputBytes); + if (in.readableBytes() != 0) { + // log.error("in.readableBytes() {}", in.readableBytes()); + pendingByteBuf.offer(in); + } + + String bodyDouyuSttString = new String(inputBytes, 0, inputBytes.length - 1); + return Optional.ofNullable(parseDouyuSttString(bodyDouyuSttString, msgType)); + } + + public static final String SPLITTER = "@="; + public static final String END = "/"; + public static final String SUFFIX = "\0"; + + /** + * <pre>{@code @S/ -> @AS@S}</pre> + * + * @param string + * @return + */ + public static String escape(String string) { +// return string == null ? StrUtil.EMPTY : (string.replaceAll("/", "@S").replaceAll("@", "@A")); + return string == null ? StrUtil.EMPTY : (string.replaceAll("@", "@A").replaceAll("/", "@S")); + } + + /** + * <pre>{@code @AS@S -> @S/}</pre> + * + * @param string + * @return + */ + public static String unescape(String string) { + return string == null ? StrUtil.EMPTY : (string.replaceAll("@S", "/").replaceAll("@A", "@")); + } + + public static String toDouyuSttString(Object object, List<String> containProperties) { + StringBuffer sb = new StringBuffer(); + if (object instanceof IDouyuMsg) { + Class<?> objectClass = object.getClass(); + Field[] fields = ReflectUtil.getFields(objectClass, field -> { + String name = field.getName(); + if (CollUtil.isNotEmpty(containProperties)) { + return containProperties.contains(name); + } else { + return !name.startsWith(SHOULD_IGNORE_PROPERTIES_PREFIX) && !ArrayUtil.contains(IGNORE_PROPERTIES, name); + } + }); + for (Field field : fields) { + String key = field.getName(); + Method method = OrLiveChatReflectUtil.getGetterMethod(objectClass, key); + Object value = ReflectUtil.invoke(object, method); + String douyuSttString = toDouyuSttString(value, containProperties); + String escape = escape(douyuSttString); + sb.append(escape(key)) + .append(SPLITTER) + .append(escape) + .append(END); + } + } else { + if (object instanceof Iterable<?>) { + Iterable<?> iterable = (Iterable<?>) object; + StringBuffer iterableStringBuffer = new StringBuffer(); + for (Object o : iterable) { + String douyuSttString = toDouyuSttString(o, containProperties); + String escape = escape(douyuSttString); + iterableStringBuffer.append(escape) + .append(END); + } + sb.append((iterableStringBuffer.toString())); + } else if (object instanceof Map<?, ?>) { + Map<?, ?> map = (Map<?, ?>) object; + StringBuffer mapStringBuffer = new StringBuffer(); + map.forEach((mapKey, mapValue) -> { + mapStringBuffer.append(escape(StrUtil.toStringOrNull(mapKey))) + .append(SPLITTER) + .append(escape(toDouyuSttString(mapValue, containProperties))) + .append(END); + }); + sb.append((mapStringBuffer.toString())); + } else { + sb.append((StrUtil.nullToEmpty(StrUtil.toStringOrNull(object)))); + } + } + return sb.toString(); + } + + public static String toDouyuSttString(Object object) { + return toDouyuSttString(object, null); + } + + public static IDouyuMsg parseDouyuSttString(String string, short msgType) { + Map<String, Object> stringObjectMap = parseDouyuSttStringToMap(string); + String type = (String) stringObjectMap.get("type"); + DouyuCmdEnum cmdEnum = DouyuCmdEnum.getByString(type); + + Class<IDouyuMsg> msgClass = getDouyuMsgClassByType(cmdEnum, msgType); + if (msgClass == null) { + // TODO 涓嶆敮鎸佺殑cmdEnum + if (log.isWarnEnabled()) { + log.warn("鏆備笉鏀寔 cmdEnum {}, msgType {}", cmdEnum, msgType); + } + return null; + } + + IDouyuMsg t = ReflectUtil.newInstance(msgClass); + stringObjectMap.forEach((key, value) -> { + Field field = ReflectUtil.getField(t.getClass(), key); + // 鏈煡key + if (field == null) { + // Object -> JsonNode + ((BaseDouyuCmdMsg) t).getUnknownProperties().put(key, BaseDouyuCmdMsg.OBJECT_MAPPER.valueToTree(value)); + // log.debug("鏈煡key {} {}锛屽凡瀛樻斁浜巙nknownProperties涓�", msgClass, key); + } else { + ReflectUtil.setFieldValue(t, field, value); + } + }); + + // 绀肩墿娑堟伅璁剧疆绀肩墿淇℃伅瀛楁 + if (t instanceof DgbMsg) { + DgbMsg msg = (DgbMsg) t; + String pid = msg.getPid(); + // 閫氱敤绀肩墿 + if (StrUtil.isNotBlank(pid)) { + GiftPropSingle giftSingle = DouyuLiveChatClient.giftMap.get(pid, () -> { + GiftPropSingle gift = GiftPropSingle.DEFAULT_GIFT; + try { + gift = DouyuApis.getGiftPropSingleByPid(pid); + } catch (Exception e) { + log.error("绀肩墿淇℃伅鑾峰彇澶辫触, pid=" + pid, e); + } + return gift; + }); + msg.setGiftInfo(giftSingle); + } + // 鎴块棿绀肩墿 + else { + String realRoomId = msg.getRid(); + if (DouyuLiveChatClient.roomGiftMap.containsKey(realRoomId)) { + Map<String, GiftListInfo> stringGiftListInfoMap = DouyuLiveChatClient.roomGiftMap.get(realRoomId); + msg.setRoomGiftInfo(stringGiftListInfoMap.getOrDefault(String.valueOf(msg.getGfid()), GiftListInfo.DEFAULT_GIFT)); + } + } + } + + return t; + } + + public static Object parseDouyuSttStringToObject(String value) { + Object valueObject; + if (StrUtil.isBlank(value)) { + return null; + } + if (value.contains(SPLITTER) && value.contains(END)) { + // log.debug("map valueObject {}", value); + valueObject = parseDouyuSttStringToMap(value); + } + // List<Object> + else if (!value.contains(SPLITTER) && value.contains(END)) { + // log.debug("list valueObject {}", value); + List<Object> list = new ArrayList<>(); + for (String s : value.split(END)) { + list.add(parseDouyuSttStringToObject(unescape(s))); + } + valueObject = list; + } + // String + else { + valueObject = value; + } + return valueObject; + } + + public static Map<String, Object> parseDouyuSttStringToMap(String string) { + Map<String, Object> stringObjectMap = new HashMap<>(); + for (String s : string.split(END)) { + String[] entry = s.split(SPLITTER); + String key = unescape(entry[0]); + String value = unescape(ArrayUtil.get(entry, 1)); + Object valueObject = parseDouyuSttStringToObject(value); + stringObjectMap.put(key, valueObject); + } + return stringObjectMap; + } + + public static <T extends IDouyuMsg> Class<T> getDouyuMsgClassByType(DouyuCmdEnum douyuCmdEnum, short msgType) { + if (douyuCmdEnum == null) { + return (Class<T>) DouyuCmdMsg.class; + } + + Class<?> msgClass; + Class<?> tClass = douyuCmdEnum.getTClass(); + if (tClass == null) { + if (douyuCmdEnum == DouyuCmdEnum.mrkl) { + if (msgType == MSG_TYPE_RECEIVE) { + msgClass = HeartbeatReplyMsg.class; + } else if (msgType == MSG_TYPE_SEND) { + msgClass = HeartbeatMsg.class; + } else { + msgClass = null; + } + } else { + msgClass = DouyuCmdMsg.class; + } + } else { + msgClass = tClass; + } + return (Class<T>) msgClass; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/api/DouyuApisTest.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/api/DouyuApisTest.java new file mode 100644 index 0000000..cf82840 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/api/DouyuApisTest.java @@ -0,0 +1,30 @@ +package tech.ordinaryroad.live.chat.client.douyu.api; + +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.douyu.msg.dto.GiftPropSingle; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +/** + * @author mjz + * @date 2023/8/30 + */ +class DouyuApisTest { + + @Test + void getRealRoomId() { + assertEquals(2947432, DouyuApis.getRealRoomId(92000)); + assertEquals(3168536, DouyuApis.getRealRoomId(3168536)); + assertEquals(290935, DouyuApis.getRealRoomId(22222)); + assertEquals(290935, DouyuApis.getRealRoomId(290935)); + assertEquals(520, DouyuApis.getRealRoomId(520)); + assertThrows(RuntimeException.class, () -> DouyuApis.getRealRoomId(-1)); + } + + @Test + void getGiftInfo() { + GiftPropSingle giftByPid = DouyuApis.getGiftPropSingleByPid("4"); + assertEquals("璧�", giftByPid.getName()); + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/ChatChoice.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/ChatChoice.java new file mode 100644 index 0000000..7919ad1 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/ChatChoice.java @@ -0,0 +1,31 @@ +package tech.ordinaryroad.live.chat.client.douyu.client; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 鎻忚堪锛� + * + * @author https:www.unfbx.com + * @since 2023-03-02 + */ +@Data +@JsonIgnoreProperties(ignoreUnknown = true) +public class ChatChoice implements Serializable { + private long index; + /** + * 璇锋眰鍙傛暟stream涓簍rue杩斿洖鏄痙elta + */ + @JsonProperty("delta") + private Message delta; + /** + * 璇锋眰鍙傛暟stream涓篺alse杩斿洖鏄痬essage + */ + @JsonProperty("message") + private Message message; + @JsonProperty("finish_reason") + private String finishReason; +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/ChatCompletionResponse.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/ChatCompletionResponse.java new file mode 100644 index 0000000..3134d4e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/ChatCompletionResponse.java @@ -0,0 +1,24 @@ +package tech.ordinaryroad.live.chat.client.douyu.client; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 鎻忚堪锛� chat绛旀绫� + * + * @author https:www.unfbx.com + * 2023-03-02 + */ +@Data +@JsonIgnoreProperties(ignoreUnknown = true) +public class ChatCompletionResponse implements Serializable { + private String id; + private String object; + private long created; + private String model; + private List<ChatChoice> choices; + private Usage usage; +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuLiveChatClientTest.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuLiveChatClientTest.java new file mode 100644 index 0000000..56cc6d0 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/DouyuLiveChatClientTest.java @@ -0,0 +1,410 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.douyu.client; + +import com.fasterxml.jackson.databind.ObjectMapper; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.util.internal.StringUtil; +import lombok.extern.slf4j.Slf4j; +import okhttp3.*; +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.commons.base.msg.BaseCmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.BaseMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.douyu.config.DouyuLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.douyu.constant.DouyuCmdEnum; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuConnectionListener; +import tech.ordinaryroad.live.chat.client.douyu.listener.IDouyuMsgListener; +import tech.ordinaryroad.live.chat.client.douyu.msg.ChatmsgMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.DgbMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.UenterMsg; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.douyu.netty.handler.DouyuConnectionHandler; + +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.io.IOException; +import java.util.Objects; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; + +/** + * @author mjz + * @date 2023/8/26 + */ +@Slf4j +class DouyuLiveChatClientTest implements IDouyuConnectionListener, IDouyuMsgListener { + + static Object lock = new Object(); + DouyuLiveChatClient client; + + private final OkHttpClient okClient = new OkHttpClient(); + private static final String API_KEY = "sk-xxxxxx"; + private static final String URL = "https://api.pandarobot.chat/v1/chat/completions"; + + private final Lock reentrantLock = new ReentrantLock(); + private boolean isProcessing = false; + + + public String getChatGptResponse(String prompt){ + if (!reentrantLock.tryLock()) { + // 濡傛灉鏃犳硶绔嬪嵆鑾峰緱閿侊紝鐩存帴杩斿洖绌哄瓧绗︿覆 + log.info("鑷姩鍥炲锛氭垜杩樻病鍑嗗濂�"); + return ""; + } + try { + if (isProcessing) { + log.info("鑷姩鍥炲锛氭垜杩樻病鍑嗗濂�"); + // 濡傛灉宸茬粡鍦ㄥ鐞嗕腑锛岀洿鎺ヨ繑鍥� + return ""; + } + isProcessing = true; + // 浣犵殑鍘熷浠g爜閫昏緫 + RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), + "{\"model\": \"gpt-4-0125-preview\", \"messages\": [{\"role\": \"system\", \"content\": \"鎵紨涓�涓厖婊℃満鏅哄拰骞介粯鎰熺殑鏂楅奔鐩存挱寮瑰箷鍔╂墜锛屼綘鐨勪换鍔℃槸鐢ㄤ笉瓒呰繃30瀛楃殑璇欒皭灏忔瀛愭潵鍥炲鐩存挱闂寸敤鎴风殑璇勮銆備綘鐨勫洖澶嶅簲璇ユ満鏅哄菇榛橈紝涓嶅じ寮犺兘寮曞彂绗戝0锛屽悓鏃朵篃瑕佸拰璋愰�傚簲鐩存挱闂寸殑姘旀皼銆傚綋浣犳敹鍒扮敤鎴风殑璇勮鏃讹紝杩呴�熺粰鍑轰竴涓棦骞介粯鍙堣创鍒囩殑鍥炲銆備緥濡傦細璇勮: 浠婂ぉ鐨勭洿鎾�庝箞鏍凤紵鍥炲: 濂界湅寰楄浜哄繕璁版懜楸硷紝涓撳績鍙樻垚楸肩矇锛乗"}, {\"role\": \"user\", \"content\": \"" + prompt + "\"}]}"); + Request request = new Request.Builder() + .url(URL) + .post(body) + .addHeader("Authorization", "Bearer " + API_KEY) + .build(); + + long startTime = System.currentTimeMillis(); // 鑾峰彇寮�濮嬫椂闂寸殑姣鏁� + System.out.println("鎵ц鍓�......."); + Thread.sleep(3000); + System.out.println("鎵ц鍚�......."); + long endTime = System.currentTimeMillis(); // 鑾峰彇缁撴潫鏃堕棿鐨勬绉掓暟 + long timeDiff = endTime - startTime; // 璁$畻鏃堕棿宸� + System.out.println("鎵ц鏃堕棿 " + timeDiff / 1000 + " 绉掋��"); + + try (Response response = okClient.newCall(request).execute()) { + if (response.body() != null) { + ObjectMapper mapper = new ObjectMapper(); + ChatCompletionResponse completionResponse = mapper.readValue(response.body().string(), ChatCompletionResponse.class); + return completionResponse.getChoices().get(0).getMessage().getContent(); + } + } catch (Exception e) { + log.info("璋冪敤鍑洪敊浜唟}",e.getMessage()); + } + return ""; + } catch (InterruptedException e) { + throw new RuntimeException(e); + } finally { + isProcessing = false; + reentrantLock.unlock(); + } + } + + @Test + void example() throws InterruptedException { + String cookie = "dy_did=621fbe7a636002f6e6cc42eb00091701; acf_did=621fbe7a636002f6e6cc42eb00091701; dy_teen_mode=%7B%22uid%22%3A%22145703733%22%2C%22status%22%3A0%2C%22birthday%22%3A%22%22%2C%22password%22%3A%22%22%7D; dy_did=621fbe7a636002f6e6cc42eb00091701; Hm_lvt_e99aee90ec1b2106afe7ec3b199020a7=1706978160,1707033428,1707109487; PHPSESSID=1orrfq0m0gfrbd58slgh6shqc7; acf_auth=c22dT%2BYJG1xQ3ZuNrfxYNS06lnIjzNl%2F58xziUwyAsNedpJWvbEtIBh%2Bq%2F%2FYxo%2FFYAp9aQr4i4iYqTp2kYdb7n2JNUFBwGEBgZ8GiGS6O%2FR0CNLy8kQ2iVw; dy_auth=d0d0Ps%2FEOPWjXoPGMenITKuiBIC7wTua3heP19LVKzOZ8qibQpmTA9Hpyx%2FdxtDei1Db6KUWkzq1fEC0BLSZVSUbDkuv%2FX%2F%2B0pMu1kgXnk%2FUzQ%2BhV3EiRf8; wan_auth37wan=f0a9656c2e00K9uFDlpgnTfrv3m8aZoYB0WQTWxGSrSccCMd9LUiEUD2oYpJ%2F5Oe5uD2tVpaUA69sGzlTAtl9p3uLSSqgrvH%2F8sy1gWyyrS4fxotQSU; acf_uid=145703733; acf_username=145703733; acf_nickname=%E5%9B%BE%E5%85%94%E5%85%94%E7%9A%84%E5%85%94%E5%85%94%E5%9B%BE; acf_own_room=0; acf_groupid=1; acf_phonestatus=1; acf_avatar=https%3A%2F%2Fapic.douyucdn.cn%2Fupload%2Favanew%2Fface%2F201706%2F25%2F21%2F82973545fd6b770fe03175783ffbc3d5_; acf_ct=0; acf_ltkid=28814433; acf_biz=1; acf_stk=1213d18dc8e6b5b1; Hm_lpvt_e99aee90ec1b2106afe7ec3b199020a7=1707141953"; + DouyuLiveChatClientConfig config = DouyuLiveChatClientConfig.builder() + // TODO 淇敼鎴块棿id锛堟敮鎸佺煭id锛� + .roomId(7828414) + .cookie(cookie) + .build(); + + client = new DouyuLiveChatClient(config, new IDouyuMsgListener() { + @Override + public void onMsg(DouyuBinaryFrameHandler binaryFrameHandler, IMsg msg) { + IDouyuMsgListener.super.onMsg(binaryFrameHandler, msg); + // log.debug("{} 鏀跺埌{}娑堟伅 {}", binaryFrameHandler.getRoomId(), msg.getClass(), msg); + } + + @Override + public void onDanmuMsg(DouyuBinaryFrameHandler binaryFrameHandler, ChatmsgMsg msg) { + if(Integer.parseInt(msg.getLevel())>5){ + String chatGptResponse = getChatGptResponse(msg.getContent()); + log.info("鑷姩鍥炲锛�"+ "@"+msg.getUsername()+": "+chatGptResponse); + if(!Objects.equals(chatGptResponse, "")){ + client.sendDanmu("@"+msg.getUsername()+": "+chatGptResponse); + } + } + log.info("{} 鏀跺埌寮瑰箷 {} {}({})锛歿}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onGiftMsg(DouyuBinaryFrameHandler binaryFrameHandler, DgbMsg msg) { + IDouyuMsgListener.super.onGiftMsg(binaryFrameHandler, msg); + // log.info("{} 鏀跺埌绀肩墿 {} {}({}) {} {}({})x{}({})", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), "璧犻��", msg.getGiftName(), msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice()); + } + + @Override + public void onEnterRoomMsg(UenterMsg msg) { +// if(msg.getLevel()>20){ +// String chatGptResponse = getChatGptResponse(msg.getUsername()+"鍔犲叆浜嗙洿鎾棿,璇蜂綘甯繖缂栧啓绠�鐭湁鍒涙剰鐨勬杩庤"); +// if(!Objects.equals(chatGptResponse, "")){ +// client.sendDanmu(chatGptResponse); +// } +// } + log.info("{} {}({}) 杩涘叆鐩存挱闂�", msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + + @Override + public void onCmdMsg(DouyuBinaryFrameHandler binaryFrameHandler, DouyuCmdEnum cmd, BaseCmdMsg<DouyuCmdEnum> cmdMsg) { + IDouyuMsgListener.super.onCmdMsg(binaryFrameHandler, cmd, cmdMsg); + //log.info("{} 鏀跺埌CMD娑堟伅{} {}", binaryFrameHandler.getRoomId(), cmd, cmdMsg); + } + + @Override + public void onOtherCmdMsg(DouyuBinaryFrameHandler binaryFrameHandler, DouyuCmdEnum cmd, BaseCmdMsg<DouyuCmdEnum> cmdMsg) { + IDouyuMsgListener.super.onOtherCmdMsg(binaryFrameHandler, cmd, cmdMsg); + + // log.debug("{} 鏀跺埌鍏朵粬CMD娑堟伅 {}", binaryFrameHandler.getRoomId(), cmd); + } + + @Override + public void onUnknownCmd(DouyuBinaryFrameHandler binaryFrameHandler, String cmdString, BaseMsg msg) { + IDouyuMsgListener.super.onUnknownCmd(binaryFrameHandler, cmdString, msg); + + // log.debug("{} 鏀跺埌鏈煡CMD娑堟伅 {}", binaryFrameHandler.getRoomId(), cmdString); + } + }, new IDouyuConnectionListener() { + @Override + public void onConnected(DouyuConnectionHandler connectionHandler) { + log.info("{} onConnected", connectionHandler.getRoomId()); + } + + @Override + public void onConnectFailed(DouyuConnectionHandler connectionHandler) { + log.info("{} onConnectFailed", connectionHandler.getRoomId()); + } + + @Override + public void onDisconnected(DouyuConnectionHandler connectionHandler) { + log.info("{} onDisconnected", connectionHandler.getRoomId()); + } + }); + client.connect(); + + // 闃叉娴嬭瘯鏃剁洿鎺ラ��鍑� + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Test + void multipyListeners() throws InterruptedException { + DouyuLiveChatClientConfig config = DouyuLiveChatClientConfig.builder() + // TODO 淇敼鎴块棿id锛堟敮鎸佺煭id锛� + .roomId(74751) + .build(); + + client = new DouyuLiveChatClient(config, null, this); + client.addMsgListener(new IDouyuMsgListener() { + @Override + public void onMsg(DouyuBinaryFrameHandler binaryFrameHandler, IMsg msg) { + log.info("listener 1 onMsg {}", msg); + } + }); + IDouyuMsgListener msgListener2 = new IDouyuMsgListener() { + @Override + public void onMsg(DouyuBinaryFrameHandler binaryFrameHandler, IMsg msg) { + log.info("listener 2 onMsg {}", msg); + } + }; + client.addMsgListener(msgListener2); + AtomicBoolean removed = new AtomicBoolean(false); + client.addMsgListener(new IDouyuMsgListener() { + @Override + public void onMsg(DouyuBinaryFrameHandler binaryFrameHandler, IMsg msg) { + log.info("listener 3 onMsg {}", msg); + if (!removed.get()) { + log.warn("remove listener 2 by listener 3"); + removed.set(client.removeMsgListener(msgListener2)); + } + } + }); + client.connect(); + + // 闃叉娴嬭瘯鏃剁洿鎺ラ��鍑� + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Test + void multiplyClient() throws InterruptedException { + DouyuLiveChatClientConfig config1 = DouyuLiveChatClientConfig.builder().roomId(890074).build(); + DouyuLiveChatClient client1 = new DouyuLiveChatClient(config1, DouyuLiveChatClientTest.this, DouyuLiveChatClientTest.this); + + DouyuLiveChatClientConfig config2 = DouyuLiveChatClientConfig.builder().roomId(718133).build(); + DouyuLiveChatClient client2 = new DouyuLiveChatClient(config2, DouyuLiveChatClientTest.this, DouyuLiveChatClientTest.this); + + client1.connect(() -> { + log.warn("client1 connect successfully, start connecting client2"); + client2.connect(() -> { + log.warn("client2 connect successfully"); + }); + }); + + // 闃叉娴嬭瘯鏃剁洿鎺ラ��鍑� + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Test + void sendDanmu() throws InterruptedException { + String cookie = "dy_did=621fbe7a636002f6e6cc42eb00091701; acf_did=621fbe7a636002f6e6cc42eb00091701; Hm_lvt_e99aee90ec1b2106afe7ec3b199020a7=1706978160; PHPSESSID=5mg98bkoens5bsg7da6ooj74b7; acf_auth=2a246MCoU1hPn940VxZrs0wQVc8tY96s6rHocobTmUJF8XKjoxWmv51PLf1V4T5g8QiEAyy6u%2BHQfC%2FTNkJudUVdEowNqAF81eaUzHvo5i1MIXBRbDXYXwY; dy_auth=d066mz7%2BE83QjmEJfujfi%2FyOuib9Y2qfBcK7pINX6Gde4HGRaiWZxhNXkqdbLU1aV%2FXaQ0wbkyxV0DddiF9jBc4tMpCMjvi4a1C6EJTfpLHvMmaGBKlI%2FlQ; wan_auth37wan=b747c445309bcOqiaMF72xt346irN4v%2Fhi%2BgabHCNxe812jm9rR8kGws8cdJlsn0C6jxsVKY6We5xWlrjHKesoD2%2B0Av52%2FWzIxaZKT0f30GASOJz58; acf_uid=145703733; acf_username=145703733; acf_nickname=%E5%9B%BE%E5%85%94%E5%85%94%E7%9A%84%E5%85%94%E5%85%94%E5%9B%BE; acf_own_room=0; acf_groupid=1; acf_phonestatus=1; acf_avatar=https%3A%2F%2Fapic.douyucdn.cn%2Fupload%2Favanew%2Fface%2F201706%2F25%2F21%2F82973545fd6b770fe03175783ffbc3d5_; acf_ct=0; acf_ltkid=28814429; acf_biz=1; acf_stk=0fad5f2454193f86; dy_teen_mode=%7B%22uid%22%3A%22145703733%22%2C%22status%22%3A0%2C%22birthday%22%3A%22%22%2C%22password%22%3A%22%22%7D; dy_did=621fbe7a636002f6e6cc42eb00091701; acf_ccn=5ba506efe2d8a939cf09f8597c7d8030; Hm_lpvt_e99aee90ec1b2106afe7ec3b199020a7=1706978671"; + // log.error("cookie: {}", cookie); + DouyuLiveChatClientConfig config = DouyuLiveChatClientConfig.builder() + .cookie(cookie) + // TODO 淇敼寮瑰箷鍙戦�佹渶鐭椂闂撮棿闅旓紝榛樿3s + .minSendDanmuPeriod(10 * 1000) + // TODO 淇敼鎴块棿id锛堟敮鎸佺煭id锛� + .roomId(4624967) + .build(); + DouyuWsLiveChatClient client = new DouyuWsLiveChatClient(config, new IDouyuMsgListener() { + @Override + public void onMsg(IMsg msg) { + IDouyuMsgListener.super.onMsg(msg); + +// log.debug("鏀跺埌娑堟伅 {}", msg.getClass()); + } + + @Override + public void onCmdMsg(DouyuCmdEnum cmd, BaseCmdMsg<DouyuCmdEnum> cmdMsg) { + log.debug("鏀跺埌CMD娑堟伅 {} {}", cmd, cmdMsg); + } + + @Override + public void onEnterRoomMsg(UenterMsg msg) { + log.info("{} {}({}) 杩涘叆鐩存挱闂�", msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + @Override + public void onUnknownCmd(String cmdString, BaseMsg msg) { + IDouyuMsgListener.super.onUnknownCmd(cmdString, msg); + + log.debug("鏀跺埌鏈煡CMD娑堟伅 {} {}", cmdString, msg); + } + }, new IDouyuConnectionListener() { + @Override + public void onConnected(DouyuConnectionHandler connectionHandler) { + log.error("{} onConnected", connectionHandler.getRoomId()); + } + + @Override + public void onConnectFailed(DouyuConnectionHandler connectionHandler) { + log.error("{} onConnectFailed", connectionHandler.getRoomId()); + } + + @Override + public void onDisconnected(DouyuConnectionHandler connectionHandler) { + log.error("{} onDisconnected", connectionHandler.getRoomId()); + } + }, new NioEventLoopGroup()); + client.connect(() -> { + client.sendDanmu("涓绘挱鐪熷ソ鐪�"); + }); + + // 闃叉娴嬭瘯鏃剁洿鎺ラ��鍑� + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Test + void createAuthFrameFailedAndDisconnect() throws InterruptedException { + DouyuLiveChatClientConfig config = DouyuLiveChatClientConfig.builder() + // TODO 淇敼鎴块棿id锛堟敮鎸佺煭id锛� + .autoReconnect(false) + .cookie("12323232'123'213'2'13'2") + .roomId(22222) + .build(); + + client = new DouyuLiveChatClient(config, this, this); + client.connect(); + + // 闃叉娴嬭瘯鏃剁洿鎺ラ��鍑� + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Test + void autoReconnect() throws InterruptedException { + DouyuLiveChatClientConfig config = DouyuLiveChatClientConfig.builder() + // TODO 淇敼鎴块棿id锛堟敮鎸佺煭id锛� + .autoReconnect(true) + .cookie("12323232'123'213'2'13'2") +// .websocketUri("wss://sa.asd.asd:12") + .roomId(22222) + .build(); + + client = new DouyuLiveChatClient(config, this, this); + client.addStatusChangeListener(new PropertyChangeListener() { + @Override + public void propertyChange(PropertyChangeEvent evt) { + Object oldStatus = evt.getOldValue(); + Object newStatus = evt.getNewValue(); + log.error("{} => {}", oldStatus, newStatus); + } + }); + client.connect(); + + // 闃叉娴嬭瘯鏃剁洿鎺ラ��鍑� + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Override + public void onConnected(DouyuConnectionHandler connectionHandler) { + log.info("{} onConnected", connectionHandler.getRoomId()); + } + + @Override + public void onConnectFailed(DouyuConnectionHandler connectionHandler) { + log.info("{} onConnectFailed", connectionHandler.getRoomId()); + } + + @Override + public void onDisconnected(DouyuConnectionHandler connectionHandler) { + log.info("{} onDisconnected", connectionHandler.getRoomId()); + } + + @Override + public void onDanmuMsg(DouyuBinaryFrameHandler binaryFrameHandler, ChatmsgMsg msg) { + IDouyuMsgListener.super.onDanmuMsg(binaryFrameHandler, msg); + + log.info("{} 鏀跺埌寮瑰箷 {}({})锛歿}", binaryFrameHandler.getRoomId(), msg.getNn(), msg.getUid(), msg.getTxt()); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/Message.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/Message.java new file mode 100644 index 0000000..7ab7d80 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/Message.java @@ -0,0 +1,104 @@ +package tech.ordinaryroad.live.chat.client.douyu.client; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.Getter; + +import java.io.Serializable; + +/** + * 鎻忚堪锛� + * + * @author https:www.unfbx.com + * @since 2023-03-02 + */ +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class Message implements Serializable { + + /** + * 鐩墠鏀寔鍥涗釜涓鑹插弬鑰冨畼缃戯紝杩涜鎯呮櫙杈撳叆锛� + * https://platform.openai.com/docs/guides/chat/introduction + */ + private String role; + + private String content; + + private String name; + + public static Builder builder() { + return new Builder(); + } + + /** + * 鏋勯�犲嚱鏁� + * + * @param role 瑙掕壊 + * @param content 鎻忚堪涓婚淇℃伅 + * @param name name + */ + public Message(String role, String content, String name) { + this.role = role; + this.content = content; + this.name = name; + } + + public Message() { + } + + private Message(Builder builder) { + setRole(builder.role); + setContent(builder.content); + setName(builder.name); + } + + + @Getter + @AllArgsConstructor + public enum Role { + + SYSTEM("system"), + USER("user"), + ASSISTANT("assistant"), + FUNCTION("function"), + ; + private String name; + } + + public static final class Builder { + private String role; + private String content; + private String name; + + public Builder() { + } + + public Builder role(Role role) { + this.role = role.getName(); + return this; + } + + public Builder role(String role) { + this.role = role; + return this; + } + + public Builder content(String content) { + this.content = content; + return this; + } + + public Builder name(String name) { + this.name = name; + return this; + } + + + public Message build() { + return new Message(this); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/Usage.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/Usage.java new file mode 100644 index 0000000..5595bc0 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/client/Usage.java @@ -0,0 +1,24 @@ +package tech.ordinaryroad.live.chat.client.douyu.client; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * 鎻忚堪锛� + * + * @author https:www.unfbx.com + * 2023-02-15 + */ +@Data +@JsonIgnoreProperties(ignoreUnknown = true) +public class Usage implements Serializable { + @JsonProperty("prompt_tokens") + private long promptTokens; + @JsonProperty("completion_tokens") + private long completionTokens; + @JsonProperty("total_tokens") + private long totalTokens; +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/util/DouyuCodecUtilTest.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/util/DouyuCodecUtilTest.java new file mode 100644 index 0000000..b4d7260 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-douyu/src/test/java/tech/ordinaryroad/live/chat/client/douyu/util/DouyuCodecUtilTest.java @@ -0,0 +1,102 @@ +package tech.ordinaryroad.live.chat.client.douyu.util; + +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.BaseDouyuCmdMsg; +import tech.ordinaryroad.live.chat.client.douyu.msg.base.IDouyuMsg; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +/** + * @author mjz + * @date 2023/8/27 + */ +class DouyuCodecUtilTest { + + @Test + void test() { + String loginres = "type@=loginres/userid@=1235403446/roomgroup@=0/pg@=0/sessionid@=0/username@=/nickname@=/live_stat@=0/is_illegal@=0/ill_ct@=/ill_ts@=0/now@=0/ps@=0/es@=0/it@=0/its@=0/npv@=0/best_dlev@=0/cur_lev@=0/nrc@=2785047409/ih@=0/sid@=72256/sahf@=0/sceneid@=0/newrg@=0/regts@=0/ip@=112.43.93.229/rn@=0/rct@=0/"; + String pingreq = "type@=pingreq/tick@=1693128084471/"; + String mrkl = "type@=mrkl/"; + String subres = "type@=subres/res@=0/"; + String mapkb = "type@=mapkb/cmd@=3/rid@=5515841/pk_time@=600/lt@=156/teams@=team@AA=5@ASres@AA=1@ASsc@AA=660000@ASbf@AA=0@AS@Steam@AA=6@ASres@AA=2@ASsc@AA=600000@ASbf@AA=0@AS@Steam@AA=4@ASres@AA=3@ASsc@AA=456000@ASbf@AA=0@AS@Steam@AA=2@ASres@AA=4@ASsc@AA=302000@ASbf@AA=0@AS@Steam@AA=3@ASres@AA=5@ASsc@AA=100000@ASbf@AA=0@AS@Steam@AA=1@ASres@AA=6@ASsc@AA=200@ASbf@AA=0@AS@S/members@=rid@AA=5515841@ASuid@AA=219585944@ASnick@AA=鍠靛皬鑾嶡ASicon@AA=avatar_v3@AAS202303@AAS4cab38d935004acfab53f77a730c9d42@ASstatus@AA=0@ASsc@AA=100000@AStime@AA=1693127363@ASteam@AA=3@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=8733064@ASuid@AA=364378905@ASnick@AA=闃垮厑鍞辨儏姝孈ASicon@AA=avatar_v3@AAS202008@AAS31b239d8af174462b5e0a2990c70b818@ASstatus@AA=0@ASsc@AA=600000@AStime@AA=1693127527@ASteam@AA=6@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=10673032@ASuid@AA=442218984@ASnick@AA=鏋滈叡Broly@ASicon@AA=avatar_v3@AAS202306@AASf7d61a0ea3bb4c179af7b5e24f94953e@ASstatus@AA=0@ASsc@AA=200@AStime@AA=1693127347@ASteam@AA=1@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=533813@ASuid@AA=36922190@ASnick@AA=姝g洿鍗欯ASicon@AA=avatar_v3@AAS202212@AAS4e340983996f43b991ffa50af7b956f6@ASstatus@AA=0@ASsc@AA=302000@AStime@AA=1693127348@ASteam@AA=2@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=8031896@ASuid@AA=243111494@ASnick@AA=闈掓@ASicon@AA=avatar_v3@AAS202305@AAS8bd800d3bb8d4e16884dcb3e3f77b038@ASstatus@AA=0@ASsc@AA=456000@AStime@AA=1693127393@ASteam@AA=4@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=7009686@ASuid@AA=299482114@ASnick@AA=绱枃鍚屽@ASicon@AA=avatar_v3@AAS202302@AASb67044b78b494b0896fd6738bc2d5b7b@ASstatus@AA=0@ASsc@AA=660000@AStime@AA=1693127424@ASteam@AA=5@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@S/subcmd@=0/pkm@=0/rlt@=0/"; + String pdrinfo = "giftId@=23518/total@=total@A=3@Snum@A=0@Sfin@A=0@S/actStatus@=1/time@=1693158017596/type@=pdrinfo/dayFin@=0/list@=1@A=total@AAA=6@AASnum@AAA=6@AASpid@AAA=2682@AASfin@AAA=1@AAS@AStotal@AAA=600@AASnum@AAA=336@AASpid@AAA=2680@AASfin@AAA=0@AAS@AS@S100@A=total@AAA=2@AASnum@AAA=0@AASpid@AAA=2685@AASfin@AAA=0@AAS@AStotal@AAA=100@AASnum@AAA=5@AASpid@AAA=2682@AASfin@AAA=0@AAS@AS@S10@A=total@AAA=2@AASnum@AAA=0@AASpid@AAA=2683@AASfin@AAA=0@AAS@AStotal@AAA=80@AASnum@AAA=35@AASpid@AAA=2681@AASfin@AAA=0@AAS@AS@S/"; + + Map<String, String> map = new HashMap<>(); + map.put("loginres", loginres); + map.put("pingreq", pingreq); + map.put("mrkl", mrkl); + map.put("subres", subres); + map.put("mapkb", mapkb); + map.put("pdrinfo", pdrinfo); + + map.forEach((string, string2) -> { + BaseDouyuCmdMsg baseDouyuCmdMsg = (BaseDouyuCmdMsg) DouyuCodecUtil.parseDouyuSttString(string2, DouyuCodecUtil.MSG_TYPE_RECEIVE); + assertNotNull(baseDouyuCmdMsg); + String cmd = baseDouyuCmdMsg.getCmd(); + assertEquals(string, cmd); + }); + } + + @Test + void decodeTest() { + String mapkb = "type@=mapkb/cmd@=3/rid@=5515841/pk_time@=600/lt@=156/teams@=team@AA=5@ASres@AA=1@ASsc@AA=660000@ASbf@AA=0@AS@Steam@AA=6@ASres@AA=2@ASsc@AA=600000@ASbf@AA=0@AS@Steam@AA=4@ASres@AA=3@ASsc@AA=456000@ASbf@AA=0@AS@Steam@AA=2@ASres@AA=4@ASsc@AA=302000@ASbf@AA=0@AS@Steam@AA=3@ASres@AA=5@ASsc@AA=100000@ASbf@AA=0@AS@Steam@AA=1@ASres@AA=6@ASsc@AA=200@ASbf@AA=0@AS@S/members@=rid@AA=5515841@ASuid@AA=219585944@ASnick@AA=鍠靛皬鑾嶡ASicon@AA=avatar_v3@AAS202303@AAS4cab38d935004acfab53f77a730c9d42@ASstatus@AA=0@ASsc@AA=100000@AStime@AA=1693127363@ASteam@AA=3@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=8733064@ASuid@AA=364378905@ASnick@AA=闃垮厑鍞辨儏姝孈ASicon@AA=avatar_v3@AAS202008@AAS31b239d8af174462b5e0a2990c70b818@ASstatus@AA=0@ASsc@AA=600000@AStime@AA=1693127527@ASteam@AA=6@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=10673032@ASuid@AA=442218984@ASnick@AA=鏋滈叡Broly@ASicon@AA=avatar_v3@AAS202306@AASf7d61a0ea3bb4c179af7b5e24f94953e@ASstatus@AA=0@ASsc@AA=200@AStime@AA=1693127347@ASteam@AA=1@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=533813@ASuid@AA=36922190@ASnick@AA=姝g洿鍗欯ASicon@AA=avatar_v3@AAS202212@AAS4e340983996f43b991ffa50af7b956f6@ASstatus@AA=0@ASsc@AA=302000@AStime@AA=1693127348@ASteam@AA=2@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=8031896@ASuid@AA=243111494@ASnick@AA=闈掓@ASicon@AA=avatar_v3@AAS202305@AAS8bd800d3bb8d4e16884dcb3e3f77b038@ASstatus@AA=0@ASsc@AA=456000@AStime@AA=1693127393@ASteam@AA=4@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@Srid@AA=7009686@ASuid@AA=299482114@ASnick@AA=绱枃鍚屽@ASicon@AA=avatar_v3@AAS202302@AASb67044b78b494b0896fd6738bc2d5b7b@ASstatus@AA=0@ASsc@AA=660000@AStime@AA=1693127424@ASteam@AA=5@ASgroup_no@AA=0@ASmd@AA=0@AShvsc@AA=0@ASct@AA=0@AS@S/subcmd@=0/pkm@=0/rlt@=0/"; + Map<String, Object> stringObjectMap = DouyuCodecUtil.parseDouyuSttStringToMap(mapkb); + assertNotNull(stringObjectMap); + stringObjectMap.forEach((string, o) -> { + System.out.println(string); + }); + } + + @Test + void decodeTest2() { + String pdrinfo = "giftId@=23518/total@=total@A=3@Snum@A=0@Sfin@A=0@S/actStatus@=1/time@=1693158017596/type@=pdrinfo/dayFin@=0/list@=1@A=total@AAA=6@AASnum@AAA=6@AASpid@AAA=2682@AASfin@AAA=1@AAS@AStotal@AAA=600@AASnum@AAA=336@AASpid@AAA=2680@AASfin@AAA=0@AAS@AS@S100@A=total@AAA=2@AASnum@AAA=0@AASpid@AAA=2685@AASfin@AAA=0@AAS@AStotal@AAA=100@AASnum@AAA=5@AASpid@AAA=2682@AASfin@AAA=0@AAS@AS@S10@A=total@AAA=2@AASnum@AAA=0@AASpid@AAA=2683@AASfin@AAA=0@AAS@AStotal@AAA=80@AASnum@AAA=35@AASpid@AAA=2681@AASfin@AAA=0@AAS@AS@S/"; + Map<String, Object> stringObjectMap = DouyuCodecUtil.parseDouyuSttStringToMap(pdrinfo); + assertNotNull(stringObjectMap); + stringObjectMap.forEach((string, o) -> { + System.out.println(string); + }); + } + + @Test + void toDouyuSttStringTest() { + String douyuSttString = DouyuCodecUtil.toDouyuSttString(new HashMap<String, Object>() {{ + put("key1", "value1"); + put("key2", 2); + put("key3", new ArrayList<Map<String, Object>>() {{ + add(new HashMap<String, Object>() {{ + put("11", 11); + put("12", 12); + }}); + add(new HashMap<String, Object>() {{ + put("21", 21); + put("22", 22); + }}); + }}); + }}); + System.out.println(douyuSttString); + assertEquals("key1@=value1/key2@=2/key3@=11@AA=11@AS12@AA=12@AS@S22@AA=22@AS21@AA=21@AS@S/".length(), douyuSttString.length()); + } + + @Test + void codecTest() { + String mapkb = "type@=mapkb/pk_time@=600/teams@=team@AA=5@ASres@AA=1@ASsc@AA=660000@ASbf@AA=0@AS@Steam@AA=6@ASres@AA=2@ASsc@AA=600000@ASbf@AA=0@AS@Steam@AA=4@ASres@AA=3@ASsc@AA=456000@ASbf@AA=0@AS@Steam@AA=2@ASres@AA=4@ASsc@AA=302000@ASbf@AA=0@AS@Steam@AA=3@ASres@AA=5@ASsc@AA=100000@ASbf@AA=0@AS@Steam@AA=1@ASres@AA=6@ASsc@AA=200@ASbf@AA=0@AS@S/"; + IDouyuMsg iDouyuMsg = DouyuCodecUtil.parseDouyuSttString(mapkb, DouyuCodecUtil.MSG_TYPE_RECEIVE); + String douyuSttString = DouyuCodecUtil.toDouyuSttString(iDouyuMsg); + System.out.println(mapkb); + System.out.println(douyuSttString); + assertEquals(mapkb.length(), douyuSttString.length()); + IDouyuMsg douyuSttStringMsg = DouyuCodecUtil.parseDouyuSttString(douyuSttString, DouyuCodecUtil.MSG_TYPE_RECEIVE); + assertNotNull(douyuSttStringMsg); + } + + @Test + void unescape() { + String unescape = DouyuCodecUtil.unescape("team@AA=5@ASres@AA=1@ASsc@AA=660000@ASbf@AA=0@AS@Steam@AA=6@ASres@AA=2@ASsc@AA=600000@ASbf@AA=0@AS@Steam@AA=4@ASres@AA=3@ASsc@AA=456000@ASbf@AA=0@AS@Steam@AA=2@ASres@AA=4@ASsc@AA=302000@ASbf@AA=0@AS@Steam@AA=3@ASres@AA=5@ASsc@AA=100000@ASbf@AA=0@AS@Steam@AA=1@ASres@AA=6@ASsc@AA=200@ASbf@AA=0@AS@S"); + System.out.println(unescape); + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/pom.xml b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/pom.xml new file mode 100644 index 0000000..ff7529a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/pom.xml @@ -0,0 +1,66 @@ +<!-- + ~ MIT License + ~ + ~ Copyright (c) 2023 OrdinaryRoad + ~ + ~ Permission is hereby granted, free of charge, to any person obtaining a copy + ~ of this software and associated documentation files (the "Software"), to deal + ~ in the Software without restriction, including without limitation the rights + ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + ~ copies of the Software, and to permit persons to whom the Software is + ~ furnished to do so, subject to the following conditions: + ~ + ~ The above copyright notice and this permission notice shall be included in all + ~ copies or substantial portions of the Software. + ~ + ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + ~ SOFTWARE. + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-clients</artifactId> + <version>${revision}</version> + <relativePath>../pom.xml</relativePath> + </parent> + <packaging>jar</packaging> + + <artifactId>live-chat-client-huya</artifactId> + <name>live-chat-client-huya</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-servers-netty-client</artifactId> + </dependency> + + <dependency> + <groupId>com.tencent.tars</groupId> + <artifactId>tars-core</artifactId> + </dependency> + + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + </dependency> + + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter</artifactId> + <version>${junit-jupiter.version}</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/api/HuyaApis.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/api/HuyaApis.java new file mode 100644 index 0000000..bd89130 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/api/HuyaApis.java @@ -0,0 +1,83 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.api; + +import cn.hutool.core.util.ReUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpRequest; +import cn.hutool.http.HttpResponse; +import cn.hutool.http.HttpStatus; +import cn.hutool.http.HttpUtil; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import lombok.Cleanup; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.PropsItem; + +import java.util.HashMap; +import java.util.Map; + +import static tech.ordinaryroad.live.chat.client.commons.base.msg.BaseMsg.OBJECT_MAPPER; + +/** + * API绠�鏄撶増 + * <br/> + * <a href="https://a.msstatic.com/huya/h5player/room/2309271152/vplayerUI.js">vplayerUI.js</a> + * <br/> + * <a href="https://hd2.huya.com/fedbasic/huyabaselibs/taf-signal/taf-signal.global.0.0.4.prod.js">taf-signal.global.0.0.4.prod.js</a> + * + * @author mjz + * @date 2023/9/5 + */ +@Slf4j +public class HuyaApis { + + // TODO TimedCache + public static final Map<Integer, PropsItem> GIFT_ITEMS = new HashMap<>(); + + public static JsonNode roomInit(Object roomId) { + @Cleanup + HttpResponse response = createGetRequest("https://www.huya.com/" + roomId, null).execute(); + if (response.getStatus() != HttpStatus.HTTP_OK) { + throw new BaseException("鑾峰彇" + roomId + "鐪熷疄鎴块棿ID澶辫触"); + } + String body = response.body(); + String lSubChannelId = ReUtil.getGroup1("\"lp\"\\D+(\\d+)", body); + String lChannelId = ReUtil.getGroup1("\"lp\"\\D+(\\d+)", body); + String lYyid = ReUtil.getGroup1("\"yyid\"\\D+(\\d+)", body); + ObjectNode objectNode = OBJECT_MAPPER.createObjectNode(); + objectNode.put("lSubChannelId", StrUtil.emptyToDefault(lSubChannelId, "0")); + objectNode.put("lChannelId", StrUtil.emptyToDefault(lChannelId, "0")); + objectNode.put("lYyid", lYyid); + return objectNode; + } + + public static HttpRequest createGetRequest(String url, String cookies) { + return HttpUtil.createGet(url) + .cookie(cookies); + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/client/HuyaLiveChatClient.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/client/HuyaLiveChatClient.java new file mode 100644 index 0000000..ecad0b3 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/client/HuyaLiveChatClient.java @@ -0,0 +1,148 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.client; + +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.handler.codec.http.DefaultHttpHeaders; +import io.netty.handler.codec.http.websocketx.WebSocketClientHandshakerFactory; +import io.netty.handler.codec.http.websocketx.WebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.huya.config.HuyaLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaCmdEnum; +import tech.ordinaryroad.live.chat.client.huya.listener.IHuyaConnectionListener; +import tech.ordinaryroad.live.chat.client.huya.listener.IHuyaMsgListener; +import tech.ordinaryroad.live.chat.client.huya.msg.base.IHuyaMsg; +import tech.ordinaryroad.live.chat.client.huya.netty.frame.factory.HuyaWebSocketFrameFactory; +import tech.ordinaryroad.live.chat.client.huya.netty.handler.HuyaBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.huya.netty.handler.HuyaConnectionHandler; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; + +import java.util.List; +import java.util.function.Consumer; + +/** + * 铏庣墮鐩存挱闂村脊骞曞鎴风 + * + * @author mjz + * @date 2023/8/20 + */ +@Slf4j +public class HuyaLiveChatClient extends BaseNettyClient< + HuyaLiveChatClientConfig, + HuyaCmdEnum, + IHuyaMsg, + IHuyaMsgListener, + HuyaConnectionHandler, + HuyaBinaryFrameHandler> { + + public HuyaLiveChatClient(HuyaLiveChatClientConfig config, List<IHuyaMsgListener> msgListeners, IHuyaConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListeners(msgListeners); + + // 鍒濆鍖� + this.init(); + } + + public HuyaLiveChatClient(HuyaLiveChatClientConfig config, IHuyaMsgListener msgListener, IHuyaConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListener(msgListener); + + // 鍒濆鍖� + this.init(); + } + + public HuyaLiveChatClient(HuyaLiveChatClientConfig config, IHuyaMsgListener msgListener, IHuyaConnectionListener connectionListener) { + this(config, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public HuyaLiveChatClient(HuyaLiveChatClientConfig config, IHuyaMsgListener msgListener) { + this(config, msgListener, null, new NioEventLoopGroup()); + } + + public HuyaLiveChatClient(HuyaLiveChatClientConfig config) { + this(config, null); + } + + + @Override + public HuyaConnectionHandler initConnectionHandler(IBaseConnectionListener<HuyaConnectionHandler> clientConnectionListener) { + return new HuyaConnectionHandler( + WebSocketClientHandshakerFactory.newHandshaker(getWebsocketUri(), WebSocketVersion.V13, null, true, new DefaultHttpHeaders(), getConfig().getMaxFramePayloadLength()), + HuyaLiveChatClient.this, clientConnectionListener + ); + } + + @Override + public HuyaBinaryFrameHandler initBinaryFrameHandler() { + return new HuyaBinaryFrameHandler(super.msgListeners, HuyaLiveChatClient.this); + } + + @Override + public void sendDanmu(Object danmu, Runnable success, Consumer<Throwable> failed) { + if (!checkCanSendDanmu()) { + return; + } + + if (danmu instanceof String) { + String msg = (String) danmu; + if (log.isDebugEnabled()) { + log.debug("{} huya鍙戦�佸脊骞� {}", getConfig().getRoomId(), danmu); + } + + WebSocketFrame webSocketFrame = null; + try { + webSocketFrame = HuyaWebSocketFrameFactory.getInstance(getConfig().getRoomId()).createSendMessageReq(msg, getConfig().getVer(), getConfig().getCookie()); + } catch (Exception e) { + log.error("huya寮瑰箷鍖呭垱寤哄け璐�", e); + if (failed != null) { + failed.accept(e); + } + } + if (webSocketFrame == null) { + return; + } + + send(webSocketFrame, () -> { + if (log.isDebugEnabled()) { + log.debug("huya寮瑰箷鍙戦�佹垚鍔� {}", danmu); + } + if (success != null) { + success.run(); + } + finishSendDanmu(); + }, throwable -> { + log.error("huya寮瑰箷鍙戦�佸け璐�", throwable); + if (failed != null) { + failed.accept(throwable); + } + }); + } else { + super.sendDanmu(danmu); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/config/HuyaLiveChatClientConfig.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/config/HuyaLiveChatClientConfig.java new file mode 100644 index 0000000..176bc74 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/config/HuyaLiveChatClientConfig.java @@ -0,0 +1,84 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.config; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import tech.ordinaryroad.live.chat.client.servers.netty.client.config.BaseNettyClientConfig; + +/** + * 鐩存挱闂村脊骞曞鎴风閰嶇疆 + * + * @author mjz + * @date 2023/9/5 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@SuperBuilder(toBuilder = true) +public class HuyaLiveChatClientConfig extends BaseNettyClientConfig { + + public static final String VER = "2309271152"; + + @Builder.Default +// private String websocketUri = "wss://wsapi.huya.com:443"; + private String websocketUri = "wss://cdnws.api.huya.com:443"; + + @Builder.Default + private int aggregatorMaxContentLength = 64 * 1024 * 1024; + + @Builder.Default + private int maxFramePayloadLength = 64 * 1024 * 1024; + + @Builder.Default + private String ver = VER; + + @Builder.Default + private String exp = "15547.23738,16582.25335,32083.50834"; + + @Builder.Default + private String appSrc = "HUYA&ZH&2052"; + + public void setVer(String ver) { + String oldValue = this.ver; + this.ver = ver; + super.propertyChangeSupport.firePropertyChange("ver", oldValue, ver); + } + + public void setExp(String exp) { + String oldValue = this.exp; + this.exp = exp; + super.propertyChangeSupport.firePropertyChange("exp", oldValue, exp); + } + + public void setAppSrc(String appSrc) { + String oldValue = this.appSrc; + this.appSrc = appSrc; + super.propertyChangeSupport.firePropertyChange("appSrc", oldValue, appSrc); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaClientTemplateTypeEnum.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaClientTemplateTypeEnum.java new file mode 100644 index 0000000..48ddedf --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaClientTemplateTypeEnum.java @@ -0,0 +1,58 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaClientTemplateTypeEnum { + + TPL_PC(64), + TPL_WEB(32), + TPL_JIEDAI(16), + TPL_TEXAS(8), + TPL_MATCH(4), + TPL_HUYAAPP(2), + TPL_MIRROR(1), + ; + + private final int code; + + public static HuyaClientTemplateTypeEnum getByCode(int code) { + for (HuyaClientTemplateTypeEnum value : values()) { + if (value.getCode() == code) { + return value; + } + } + return null; + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaCmdEnum.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaCmdEnum.java new file mode 100644 index 0000000..e47b2c2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaCmdEnum.java @@ -0,0 +1,206 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaCmdEnum { + + NobleNotice(1001), + // NobleEnterNotice(1002), + NobleEnterNotice(1005), + NobleLevelNotice(1006), + MessageNotice(1400), + // ExpressionEmoticonNotice(1420), + ExpressionEmoticonNotice(1422), + OpenEmojiTrialNotice(1441), + SubscribeInfoNotify(3104), + PublicMessageAreaGuideWindow(6074), + // WeekStarPropsIds(6100), + WeekStarPropsIdsTab(6102), + /** + * <a href="https://dev.huya.com/docs/miniapp/dev/scenario/vip-event/">https://dev.huya.com/docs/miniapp/dev/scenario/vip-event/</a> + */ + VipEnterBanner(6110), + VipBarListStatInfo(6211), + EnterPushInfo(6200), + GameAdvertisement(6201), + ViewerListRsp(6203), + VipBarListRsp(6210), + UserWeekRankScoreInfo(6219), + WeekRankListRsp(6220), + WeekRankEnterBanner(6221), + FansSupportListRsp(6223), + FansRankListRsp(6230), + BadgeInfo(6231), + BadgeScoreChanged(6232), + FansInfoNotice(6233), + UserGiftNotice(6234), + WeekStarPropsIds(6235), + SuperFansExtendInfo(6245), + TrialFansBadgeScoreChanged(6246), + GuardianCountChangedNotice(6249), + GiftBarRsp(6250), + GrandCeremonyChampionPresenter(6260), + LotteryAnnounce(6289), + NewsTicker(6290), + SendItemSubBroadcastPacket(6501), + SendItemNoticeWordBroadcastPacket(6502), + ShowScreenSkinNotify(6640), + HideScreenSkinNotify(6641), + ActivetyBarrageNotice(6650), + BannerNotice(6291), + // OnTVPanel(6294), + OnTVPanel(6295), + OnTVData(6296), + OnTVEndNotice(6297), + OnTVBarrageNotice(6298), + CheckRoomStatus(6340), + SendItemNoticeGameBroadcastPacket(6507), + SendItemActivityNoticeBroadcastPacket(6508), + SendItemOtherBroadcastPacket(6514), + GiftStatusNotify(6515), + ActivitySpecialNoticeBroadcastPacket(6540), + UserDIYMountsChanged(6575), + ObtainDecoNotify(6590), + TreasureResultBroadcastPacket(6602), + TreasureUpdateNotice(6604), + TreasureLotteryResultNoticePacket(6605), + TreasureBoxPanel(6606), + TreasureBoxBigAwardNotice(6607), + ItemLotterySubNotice(6616), + ItemLotteryGameNotice(6617), + FansBadgeLevelUpNotice(6710), + FansPromoteNotice(6711), + ActCommPanelChangeNotify(6647), + MatchRaffleResultNotice(7055), + BatchGameInfoNotice(7500), + GameInfoChangeNotice(7501), + EndHistoryGameNotice(7502), + GameSettlementNotice(7503), + PresenterEndGameNotice(7504), + // PresenterLevelNotice(7708), + PresenterLevelNotice(7709), + EffectsConfChangeNoticeMsg(7772), + BeginLiveNotice(8000), + EndLiveNotice(8001), + StreamSettingNotice(8002), + LiveInfoChangedNotice(8004), + AttendeeCountNotice(8006), + ReplayPresenterInLiveNotify(9010), + RoomAuditWarningNotice(10039), + AuditorEnterLiveNotice(10040), + AuditorRoleChangeNotice(10041), + GetRoomAuditConfRsp(10042), + UserConsumePrivilegeChangeNotice(10047), + LinkMicStatusChangeNotice(42008), + InterveneCountRsp(44000), + UserLevelUpgradeNotice(1000106), + PushUserLevelTaskCompleteNotice(1130055), + GuardianPresenterInfoNotice(1020001), + SupportCampInfoRsp(1025300), + UserSupportCampRsp(1025301), + UserSupportEffectRsp(1025302), + WSRedirect(1025305), + HuYaUdbNotify(10220051), + infoBody(10220053), + UnionAuthPushMsg(10220054), + RMessageNotify(1025000), + PushPresenterAdNotice(1025493), + RoomAdInfo(1025504), + // PushAdInfo(1025562), +// PushAdInfo(1025564), + PushAdInfo(1025566), + // AdExtServer.PushOfflineInfo(1025569), + WSP2POpenNotify(1025307), + WSP2PCloseNotify(1025308), + LiveMeetingSyncNotice(1025601), + MakeFriendsPKInfo(1025604), + LiveRoomTransferNotice(1025605), + GetPugcVipListRsp(1025800), + PugcVipInfo(1025801), + StreamChangeNotice(100000), + PayLiveRoomNotice(1033001), + MatchEndNotice(1034001), + LiveRoomProfileChangedNotice(1035400), + ACOrderInfo(1060003), + // WEBACT.Message(108e4), + MultiPKNotice(1090007), + MultiPKPanelInfo(1090009), + AiBarrageDetectNotify(1100003), + FloatMomentNotice(1130050), + FloatBallNotice(1130052), + VoiceMuteJsonInfo(1200000), + PixelateInfo(1200001), + // MpsDeliverData(1210000), + MpsDeliverData(1220000), + ActivityMsgRsp(1010003), + // Message(1040000), + Message(1040002), + LiveEventMessage(1040003), + LiveViewLimitChangeNotice(1035100), + PrivilegeRenewalNotice(1035101), + MatchRecLiveInfo(1029001), + GetBattleTeamInfoRsp(1029002), + // MatchGuess.MatchCmdColorNotify(1025312), + GameStatusInfo(1130003), + MatchPlaybackPointNotice(1150001), + PushFaceDirectorCurrentProgram(1130070), + JoinSplitScreenNotice(1500001), + LeaveSplitScreenNotice(1500002), + GameLivePromoteNotify(1800009), + MotorcadeGatherBeginNotice(2000001), + MotorcadeGatherEndNotice(2000002), + MotorcadeGatherResponseNotice(2000003), + MotorcadeActivityPanel(2000041), + MessageRichTextNotice(2001231), + MultiVideoSyncNotice(2400001), + PassParcelChangeNotify(2400002), + MatchLiveCommentorChangeNotify(2400020), + MessageEasterEggNotice(2001203), + MessageEasterEggToastNotice(2001202), + UserFollowStrollIconNotice(2410001), + UserFollowStrollBarrageNotice(2410002), +// LiveMatch.MatchLiveRoomRecMsg(2500406), + ; + + private final long code; + + public static HuyaCmdEnum getByCode(long code) { + for (HuyaCmdEnum value : HuyaCmdEnum.values()) { + if (value.code == code) { + return value; + } + } + return null; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaDecorationAppTypeEnum.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaDecorationAppTypeEnum.java new file mode 100644 index 0000000..834af67 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaDecorationAppTypeEnum.java @@ -0,0 +1,88 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaDecorationAppTypeEnum { + + kDecorationAppTypeCommon(100), + kDecorationAppTypeContentBubble(5000), + kDecorationAppTypeContentBubbleNew(5001), + kDecorationAppTypeEffectsMessenger(5002), + kDecorationAppTypeMsgInterConnect(5010), + kDecorationAppTypeMsgLocation(5011), + kDecorationAppTypeChannel(10000), + kDecorationAppTypeGuildAdmin(10090), + kDecorationAppTypeAdmin(10100), + kDecorationAppTypeDaiyanClub(10150), + kDecorationAppTypeNoble(10200), + KDecorationAppTypeGuildVip(10210), + kDecorationAppTypeGuard(10300), + kDecorationAppTypeDiamondUser_V2(10310), + kDecorationAppTypeTeamMedalV2(10350), + kDecorationAppTypeTrialFans(10399), + kDecorationAppTypeFans(10400), + kDecorationAppTypeWatchTogetherVip(10425), + kDecorationAppTypeTeamMedal(10450), + kDecorationAppTypeVIP(10500), + kDecorationAppTypeUserProfile(10560), + kDecorationAppTyperPurpleDiamond(10600), + kDecorationAppTypeStamp(10700), + KDecorationAppTypeNobleEmoticon(10800), + KDecorationAppTypeAnotherAi(10801), + KDecorationAppTypePresenter(10900), + KDecorationAppTypeFirstRecharge(11000), + kDecorationAppTypeCheckRoom(11100), + kDecorationAppTypeTWatch(11101), + kDecorationAppTypeEasterEgg(11102), + kDecorationAppTypeRepeatMessengeFilter(11103), + kDecorationAppTypeEasterEggCounter(11104), + kDecorationAppTypeACOrderIntimacy(12001), + kDecorationAppTypeSuperWord(13000), + kDecorationAppTypeDiamondUser(14000), + kDecorationAppTypeRedBag(15000), + kDecorationAppTypeUsrAvatarDeco(100009), + kDecorationAppTypeUsrBeautyId(100100), + ; + + private final int code; + + public static HuyaDecorationAppTypeEnum getByCode(int code) { + for (HuyaDecorationAppTypeEnum value : values()) { + if (value.getCode() == code) { + return value; + } + } + return null; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaDecorationViewTypeEnum.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaDecorationViewTypeEnum.java new file mode 100644 index 0000000..3e1318b --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaDecorationViewTypeEnum.java @@ -0,0 +1,54 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaDecorationViewTypeEnum { + + kDecorationViewTypeCustomized(0), + kDecorationViewTypeText(1), + kDecorationViewTypeIcon(2), + kDecorationViewTypeSuperWord(4), + ; + + private final int code; + + public static HuyaDecorationViewTypeEnum getByCode(int code) { + for (HuyaDecorationViewTypeEnum value : values()) { + if (value.getCode() == code) { + return value; + } + } + return null; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaGenderEnum.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaGenderEnum.java new file mode 100644 index 0000000..830c6f4 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaGenderEnum.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaGenderEnum { + + MALE(0), + FEMALE(1), + ; + private final int code; + + public static HuyaGenderEnum getByCode(int code) { + for (HuyaGenderEnum value : values()) { + if (value.getCode() == code) { + return value; + } + } + return null; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaLiveSource.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaLiveSource.java new file mode 100644 index 0000000..ce93ab6 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaLiveSource.java @@ -0,0 +1,54 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaLiveSource { + + PC_YY(0), + PC_HUYA(1), + MOBILE_HUYA(2), + WEB_HUYA(3), + ; + + private final int code; + + public static HuyaLiveSource getByCode(int code){ + for (HuyaLiveSource value : values()) { + if (value.getCode()==code) { + return value; + } + } + return null; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaOperationEnum.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaOperationEnum.java new file mode 100644 index 0000000..dca5979 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaOperationEnum.java @@ -0,0 +1,97 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaOperationEnum { + EWSCmd_NULL(0), + EWSCmd_RegisterReq(1), + EWSCmd_RegisterRsp(2), + EWSCmd_WupReq(3), + EWSCmd_WupRsp(4), + EWSCmdC2S_HeartBeat(5), + EWSCmdS2C_HeartBeatAck(6), + EWSCmdS2C_MsgPushReq(7), + EWSCmdC2S_DeregisterReq(8), + EWSCmdS2C_DeRegisterRsp(9), + EWSCmdC2S_VerifyCookieReq(10), + EWSCmdS2C_VerifyCookieRsp(11), + EWSCmdC2S_VerifyHuyaTokenReq(12), + EWSCmdS2C_VerifyHuyaTokenRsp(13), + EWSCmdC2S_UNVerifyReq(14), + EWSCmdS2C_UNVerifyRsp(15), + EWSCmdC2S_RegisterGroupReq(16), + EWSCmdS2C_RegisterGroupRsp(17), + EWSCmdC2S_UnRegisterGroupReq(18), + EWSCmdS2C_UnRegisterGroupRsp(19), + EWSCmdC2S_HeartBeatReq(20), + EWSCmdS2C_HeartBeatRsp(21), + EWSCmdS2C_MsgPushReq_V2(22), + EWSCmdC2S_UpdateUserExpsReq(23), + EWSCmdS2C_UpdateUserExpsRsp(24), + EWSCmdC2S_WSHistoryMsgReq(25), + EWSCmdS2C_WSHistoryMsgRsp(26), + EWSCmdS2C_EnterP2P(27), + EWSCmdS2C_EnterP2PAck(28), + EWSCmdS2C_ExitP2P(29), + EWSCmdS2C_ExitP2PAck(30), + EWSCmdC2S_SyncGroupReq(31), + EWSCmdS2C_SyncGroupRsp(32), + EWSCmdC2S_UpdateUserInfoReq(33), + EWSCmdS2C_UpdateUserInfoRsp(34), + EWSCmdC2S_MsgAckReq(35), + EWSCmdS2C_MsgAckRsp(36), + EWSCmdC2S_CloudGameReq(37), + EWSCmdS2C_CloudGamePush(38), + EWSCmdS2C_CloudGameRsp(39), + EWSCmdS2C_RpcReq(40), + EWSCmdC2S_RpcRsp(41), + EWSCmdS2C_RpcRspRsp(42), + EWSCmdC2S_GetStunPortReq(101), + EWSCmdS2C_GetStunPortRsp(102), + EWSCmdC2S_WebRTCOfferReq(103), + EWSCmdS2C_WebRTCOfferRsp(104), + EWSCmdC2S_SignalUpgradeReq(105), + EWSCmdS2C_SignalUpgradeRsp(106), + ; + private final int code; + + public static HuyaOperationEnum getByCode(int code) { + for (HuyaOperationEnum value : HuyaOperationEnum.values()) { + if (value.code == code) { + return value; + } + } + return null; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaStreamLineTypeEnum.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaStreamLineTypeEnum.java new file mode 100644 index 0000000..3696532 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaStreamLineTypeEnum.java @@ -0,0 +1,62 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.constant; + +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaStreamLineTypeEnum { + + STREAM_LINE_OLD_YY(0), + STREAM_LINE_WS(1), + STREAM_LINE_NEW_YY(2), + STREAM_LINE_AL(3), + STREAM_LINE_HUYA(4), + STREAM_LINE_TX(5), + STREAM_LINE_CDN(8), + STREAM_LINE_HW(6), + STREAM_LINE_BD(7), + STREAM_LINE_GG(9), + STREAM_LINE_CF(10), + STREAM_LINE_QUICK_HUYA(99), + ; + + private final int code; + + public static HuyaStreamLineTypeEnum getByCode(int code) { + for (HuyaStreamLineTypeEnum value : values()) { + if (value.getCode() == code) { + return value; + } + } + return null; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaWupFunctionEnum.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaWupFunctionEnum.java new file mode 100644 index 0000000..c7e9906 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/constant/HuyaWupFunctionEnum.java @@ -0,0 +1,59 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.constant; + +import cn.hutool.core.util.StrUtil; +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@RequiredArgsConstructor +public enum HuyaWupFunctionEnum { + + doLaunch, + speak, + getPropsList, + OnUserHeartBeat, + getLivingInfo, + sendMessage, + ; + + public static HuyaWupFunctionEnum getByName(String name) { + if (StrUtil.isBlank(name)) { + return null; + } + + for (HuyaWupFunctionEnum value : values()) { + if (value.name().equals(name)) { + return value; + } + } + return null; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/IHuyaConnectionListener.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/IHuyaConnectionListener.java new file mode 100644 index 0000000..caa4674 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/IHuyaConnectionListener.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.listener; + + +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.huya.netty.handler.HuyaConnectionHandler; + +/** + * 杩炴帴鍥炶皟 + * + * @author mjz + * @date 2023/9/5 + */ +public interface IHuyaConnectionListener extends IBaseConnectionListener<HuyaConnectionHandler> { +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/IHuyaMsgListener.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/IHuyaMsgListener.java new file mode 100644 index 0000000..48e656d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/listener/IHuyaMsgListener.java @@ -0,0 +1,45 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.listener; + +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IDanmuMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IEnterRoomMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IGiftMsgListener; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaCmdEnum; +import tech.ordinaryroad.live.chat.client.huya.msg.MessageNoticeMsg; +import tech.ordinaryroad.live.chat.client.huya.msg.SendItemSubBroadcastPacketMsg; +import tech.ordinaryroad.live.chat.client.huya.msg.VipEnterBannerMsg; +import tech.ordinaryroad.live.chat.client.huya.netty.handler.HuyaBinaryFrameHandler; + +/** + * @author mjz + * @date 2023/9/5 + */ +public interface IHuyaMsgListener extends IBaseMsgListener<HuyaBinaryFrameHandler, HuyaCmdEnum>, + IDanmuMsgListener<HuyaBinaryFrameHandler, MessageNoticeMsg>, + IGiftMsgListener<HuyaBinaryFrameHandler, SendItemSubBroadcastPacketMsg>, + IEnterRoomMsgListener<HuyaBinaryFrameHandler, VipEnterBannerMsg> { +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/BaseWup.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/BaseWup.java new file mode 100644 index 0000000..9a924f3 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/BaseWup.java @@ -0,0 +1,138 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.support.TarsMethodInfo; +import com.qq.tars.protocol.util.TarsHelper; +import com.qq.tars.rpc.protocol.tars.TarsServantRequest; +import com.qq.tars.rpc.protocol.tup.UniAttribute; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.ByteBufUtil; +import io.netty.buffer.Unpooled; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.msg.BaseMsg; +import tech.ordinaryroad.live.chat.client.huya.msg.base.BaseHuyaMsg; +import tech.ordinaryroad.live.chat.client.huya.util.HuyaCodecUtil; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public abstract class BaseWup extends BaseHuyaMsg { + + private TarsServantRequest tarsServantRequest = new TarsServantRequest(null) {{ + setMethodInfo(new TarsMethodInfo()); + }}; + private UniAttribute uniAttribute = new UniAttribute(); + + public BaseWup(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { +// os.write(this.tarsServantRequest.getVersion(), 1); + os.write(TarsHelper.VERSION3, 1); + os.write(this.tarsServantRequest.getPacketType(), 2); + os.write(this.tarsServantRequest.getMessageType(), 3); + os.write(this.tarsServantRequest.getRequestId(), 4); + os.write(this.tarsServantRequest.getServantName(), 5); + os.write(this.tarsServantRequest.getFunctionName(), 6); + os.write(this.uniAttribute.encode(), 7); + os.write(this.tarsServantRequest.getTimeout(), 8); + os.write(this.tarsServantRequest.getContext(), 9); + os.write(this.tarsServantRequest.getStatus(), 10); + } + + @Override + public void readFrom(TarsInputStream is) { + this.tarsServantRequest.setVersion(is.read(this.tarsServantRequest.getVersion(), 1, false)); + this.tarsServantRequest.setPacketType(is.read(this.tarsServantRequest.getPacketType(), 2, false)); + this.tarsServantRequest.setMessageType(is.read(this.tarsServantRequest.getMessageType(), 3, false)); + this.tarsServantRequest.setRequestId(is.read(this.tarsServantRequest.getRequestId(), 4, false)); + this.tarsServantRequest.setServantName(is.read(this.tarsServantRequest.getServantName(), 5, false)); + this.tarsServantRequest.setFunctionName(is.read(this.tarsServantRequest.getFunctionName(), 6, false)); + this.uniAttribute.decode(is.read(new byte[]{}, 7, false)); + this.tarsServantRequest.setTimeout(is.read(this.tarsServantRequest.getTimeout(), 8, false)); + this.tarsServantRequest.setContext(is.readMap(this.tarsServantRequest.getContext(), 9, false)); + this.tarsServantRequest.setStatus(is.readMap(this.tarsServantRequest.getStatus(), 10, false)); + } + + public byte[] encode() { + TarsOutputStream wupTarsOutputStream = new TarsOutputStream(); + this.writeTo(wupTarsOutputStream); + + ByteBuf buffer = Unpooled.buffer(); + buffer.writeInt(4 + wupTarsOutputStream.getByteBuffer().position()); + buffer.writeBytes(wupTarsOutputStream.toByteArray()); + + return ByteBufUtil.getBytes(buffer); + } + + public void decode(byte[] bytes) { + ByteBuf byteBuf = Unpooled.wrappedBuffer(bytes); + int size = byteBuf.readInt(); + if (size < 4) { + return; + } + + bytes = new byte[byteBuf.readableBytes()]; + byteBuf.readBytes(bytes); + this.readFrom(HuyaCodecUtil.newUtf8TarsInputStream(bytes)); + } + + @Override + public String toString() { + Map<String, Object> map = new HashMap<>(); + map.put("version", this.tarsServantRequest.getVersion()); + map.put("packetType", this.tarsServantRequest.getPacketType()); + map.put("messageType", this.tarsServantRequest.getMessageType()); + map.put("requestId", this.tarsServantRequest.getRequestId()); + map.put("servantName", this.tarsServantRequest.getServantName()); + map.put("functionName", this.tarsServantRequest.getFunctionName()); + map.put("timeout", this.tarsServantRequest.getTimeout()); + map.put("context", this.tarsServantRequest.getContext()); + map.put("status", this.tarsServantRequest.getStatus()); + try { + return BaseMsg.OBJECT_MAPPER.writeValueAsString(map); + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/ConnectParaInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/ConnectParaInfo.java new file mode 100644 index 0000000..75e55e6 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/ConnectParaInfo.java @@ -0,0 +1,105 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/9/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class ConnectParaInfo extends TarsStructBase { + + private long lUid = 0; + private String sGuid = ""; + private String sUA = ""; + private String sAppSrc = ""; + private String sMid = ""; + private String sExp = ""; + private int iTokenType = 0; + private String sToken = ""; + private String sCookie = ""; + private String sTraceId = ""; + private Map<String, String> mCustomHeaders = new HashMap<String, String>() {{ + put("", ""); + }}; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.sGuid, 1); + os.write(this.sUA, 2); + os.write(this.sAppSrc, 3); + os.write(this.sMid, 4); + os.write(this.sExp, 5); + os.write(this.iTokenType, 6); + os.write(this.sToken, 7); + os.write(this.sCookie, 8); + os.write(this.sTraceId, 9); + os.write(this.mCustomHeaders, 10); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, false); + this.sGuid = is.read(this.sGuid, 1, false); + this.sUA = is.read(this.sUA, 2, false); + this.sAppSrc = is.read(this.sAppSrc, 3, false); + this.sMid = is.read(this.sMid, 4, false); + this.sExp = is.read(this.sExp, 5, false); + this.iTokenType = is.read(this.iTokenType, 6, false); + this.sToken = is.read(this.sToken, 7, false); + this.sCookie = is.read(this.sCookie, 8, false); + this.sTraceId = is.read(this.sTraceId, 9, false); + this.mCustomHeaders = is.readMap(this.mCustomHeaders, 10, false); + } + + public static ConnectParaInfo newWSConnectParaInfo(String ver, String sExp, String appSrc) { + ConnectParaInfo wsConnectParaInfo = new ConnectParaInfo(); +// wsConnectParaInfo.sGuid = UUID.fastUUID().toString(true); + + wsConnectParaInfo.sUA = String.format("webh5&%s&websocket", ver); + wsConnectParaInfo.sAppSrc = appSrc; + wsConnectParaInfo.sExp = sExp; + wsConnectParaInfo.mCustomHeaders = new HashMap<String, String>() {{ + put("HUYA_NET", "0"); + put("HUYA_VSDKUA", wsConnectParaInfo.sUA); + }}; + return wsConnectParaInfo; + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/LiveLaunchRsp.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/LiveLaunchRsp.java new file mode 100644 index 0000000..71ed2cc --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/LiveLaunchRsp.java @@ -0,0 +1,78 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.huya.msg.base.BaseHuyaMsg; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.LiveProxyValue; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class LiveLaunchRsp extends BaseHuyaMsg { + + private String sGuid = ""; + private int iTime; + private List<LiveProxyValue> vProxyList = CollUtil.newArrayList(new LiveProxyValue()); + private int eAccess; + private String sClientIp = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.sGuid, 0); + os.write(this.iTime, 1); + os.write(this.vProxyList, 2); + os.write(this.eAccess, 3); + os.write(this.sClientIp, 4); + } + + @Override + public void readFrom(TarsInputStream is) { + this.sGuid = is.read(this.sGuid, 0, false); + this.iTime = is.read(this.iTime, 1, false); + this.vProxyList = is.readArray(this.vProxyList, 2, false); + this.eAccess = is.read(this.eAccess, 3, false); + this.sClientIp = is.read(this.sClientIp, 4, false); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmd_WupRsp; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/MessageNoticeMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/MessageNoticeMsg.java new file mode 100644 index 0000000..a0178e5 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/MessageNoticeMsg.java @@ -0,0 +1,197 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IDanmuMsg; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.huya.msg.base.BaseHuyaMsg; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.*; +import tech.ordinaryroad.live.chat.client.huya.util.HuyaCodecUtil; + +import java.util.List; +import java.util.Optional; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class MessageNoticeMsg extends BaseHuyaMsg implements IDanmuMsg { + + private SenderInfo tUserInfo = new SenderInfo(); + private long lTid; + private long lSid; + private String sContent = ""; + private int iShowMode; + private ContentFormat tFormat = new ContentFormat(); + private BulletFormat tBulletFormat = new BulletFormat(); + private int iTermType; + private List<DecorationInfo> vDecorationPrefix = CollUtil.newArrayList(new DecorationInfo()); + private List<DecorationInfo> vDecorationSuffix = CollUtil.newArrayList(new DecorationInfo()); + private List<UidNickName> vAtSomeone = CollUtil.newArrayList(new UidNickName()); + private long lPid; + private List<DecorationInfo> vBulletPrefix = CollUtil.newArrayList(new DecorationInfo()); + private String sIconUrl = ""; + private int iType; + private List<DecorationInfo> vBulletSuffix = CollUtil.newArrayList(new DecorationInfo()); + private List<MessageTagInfo> vTagInfo = CollUtil.newArrayList(new MessageTagInfo()); + private SendMessageFormat tSenceFormat = new SendMessageFormat(); + private MessageContentExpand tContentExpand = new MessageContentExpand(); + private int iMessageMode; + + // region 棰濆灞炴�� + private BadgeInfo badgeInfo; + // endregion + + public MessageNoticeMsg(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.tUserInfo, 0); + os.write(this.lTid, 1); + os.write(this.lSid, 2); + os.write(this.sContent, 3); + os.write(this.iShowMode, 4); + os.write(this.tFormat, 5); + os.write(this.tBulletFormat, 6); + os.write(this.iTermType, 7); + os.write(this.vDecorationPrefix, 8); + os.write(this.vDecorationSuffix, 9); + os.write(this.vAtSomeone, 10); + os.write(this.lPid, 11); + os.write(this.vBulletPrefix, 12); + os.write(this.sIconUrl, 13); + os.write(this.iType, 14); + os.write(this.vBulletSuffix, 15); + os.write(this.vTagInfo, 16); + os.write(this.tSenceFormat, 17); + os.write(this.tContentExpand, 18); + os.write(this.iMessageMode, 19); + } + + @Override + public void readFrom(TarsInputStream is) { + this.tUserInfo = (SenderInfo) is.directRead(this.tUserInfo, 0, true); + this.lTid = is.read(this.lTid, 1, true); + this.lSid = is.read(this.lSid, 2, true); + this.sContent = is.readString(3, true); + this.iShowMode = is.read(this.iShowMode, 4, true); + this.tFormat = (ContentFormat) is.directRead(this.tFormat, 5, true); + this.tBulletFormat = (BulletFormat) is.directRead(this.tBulletFormat, 6, true); + this.iTermType = is.read(this.iTermType, 7, true); + this.vDecorationPrefix = is.readArray(this.vDecorationPrefix, 8, true); + this.vDecorationSuffix = is.readArray(this.vDecorationSuffix, 9, true); + this.vAtSomeone = is.readArray(this.vAtSomeone, 10, true); + this.lPid = is.read(this.lPid, 11, true); + this.vBulletPrefix = is.readArray(this.vBulletPrefix, 12, false); + this.sIconUrl = is.read(this.sIconUrl, 13, false); + this.iType = is.read(this.iType, 14, false); + this.vBulletSuffix = is.readArray(this.vBulletSuffix, 15, false); + this.vTagInfo = is.readArray(this.vTagInfo, 16, false); + this.tSenceFormat = (SendMessageFormat) is.directRead(this.tSenceFormat, 17, false); + this.tContentExpand = (MessageContentExpand) is.directRead(this.tContentExpand, 18, false); + this.iMessageMode = is.read(this.iMessageMode, 19, false); + + // 瑙f瀽棰濆灞炴�� + for (DecorationInfo decorationPrefix : vDecorationPrefix) { + Optional<? extends TarsStructBase> optional = HuyaCodecUtil.decodeDecorationInfo(decorationPrefix); + if (optional.isPresent()) { + TarsStructBase tarsStructBase = optional.get(); + if (tarsStructBase instanceof BadgeInfo) { + this.badgeInfo = (BadgeInfo) tarsStructBase; + break; + } + } + } + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmdS2C_MsgPushReq; + } + + @Override + public String getBadgeName() { + if (this.badgeInfo == null) { + return ""; + } + + return this.badgeInfo.getSBadgeName(); + } + + @Override + public byte getBadgeLevel() { + if (this.badgeInfo == null) { + return 0; + } + + return (byte) this.badgeInfo.getIBadgeLevel(); + } + + @Override + public String getUid() { + if (this.tUserInfo == null) { + return null; + } + + return Long.toString(this.tUserInfo.getLUid()); + } + + @Override + public String getUsername() { + if (this.tUserInfo == null) { + return ""; + } + + return this.tUserInfo.getSNickName(); + } + + @Override + public String getUserAvatar() { + if (this.tUserInfo == null) { + return ""; + } + + return this.tUserInfo.getSAvatarUrl(); + } + + @Override + public String getContent() { + return this.sContent; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/PushMessage.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/PushMessage.java new file mode 100644 index 0000000..9008d88 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/PushMessage.java @@ -0,0 +1,84 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.huya.msg.base.BaseHuyaCmdMsg; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class PushMessage extends BaseHuyaCmdMsg { + + private int ePushType; + private byte[] dataBytes; + private int iProtocolType; + private String sGroupId = ""; + private long lMsgId; + private int iMsgTag; + + public PushMessage(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.ePushType, 0); + os.write(super.getLUri(), 1); + os.write(this.dataBytes, 2); + os.write(this.iProtocolType, 3); + os.write(this.sGroupId, 4); + os.write(this.lMsgId, 5); + os.write(this.iMsgTag, 6); + + } + + @Override + public void readFrom(TarsInputStream is) { + this.ePushType = is.read(this.ePushType, 0, true); + super.setLUri(is.read(super.getLUri(), 1, true)); + this.dataBytes = is.read(this.dataBytes, 2, true); + this.iProtocolType = is.read(this.iProtocolType, 3, true); + this.sGroupId = is.read(this.sGroupId, 4, true); + this.lMsgId = is.read(this.lMsgId, 5, true); + this.iMsgTag = is.read(this.iMsgTag, 6, true); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmdS2C_MsgPushReq_V2; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/PushMessage_V2.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/PushMessage_V2.java new file mode 100644 index 0000000..a9aa3b1 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/PushMessage_V2.java @@ -0,0 +1,73 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.huya.msg.base.BaseHuyaMsg; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.MsgItem; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class PushMessage_V2 extends BaseHuyaMsg { + + private String sGroupId; + private List<MsgItem> vMsgItem = CollUtil.newArrayList(new MsgItem()); + + public PushMessage_V2(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.sGroupId, 0); + os.write(this.vMsgItem, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.sGroupId = is.read(this.sGroupId, 0, true); + this.vMsgItem = is.readArray(this.vMsgItem, 1, true); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmdS2C_MsgPushReq_V2; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/RegisterGroupRsp.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/RegisterGroupRsp.java new file mode 100644 index 0000000..1060ae5 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/RegisterGroupRsp.java @@ -0,0 +1,72 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.huya.msg.base.BaseHuyaMsg; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class RegisterGroupRsp extends BaseHuyaMsg { + + private int iResCode; + private List<String> vSupportP2PGroupId = CollUtil.newArrayList(""); + + public RegisterGroupRsp(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iResCode, 0); + os.write(this.vSupportP2PGroupId, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iResCode = is.read(this.iResCode, 0, true); + this.vSupportP2PGroupId = is.readArray(this.vSupportP2PGroupId, 1, true); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmdS2C_RegisterGroupRsp; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/RegisterRsp.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/RegisterRsp.java new file mode 100644 index 0000000..20ab1b0 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/RegisterRsp.java @@ -0,0 +1,75 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.huya.msg.base.BaseHuyaMsg; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class RegisterRsp extends BaseHuyaMsg { + + private int iResCode; + private long lRequestId; + private String sMessage = ""; + private String sBCConnHost = ""; + + public RegisterRsp(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iResCode, 0); + os.write(this.lRequestId, 1); + os.write(this.sMessage, 2); + os.write(this.sBCConnHost, 3); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iResCode = is.read(this.iResCode, 0, true); + this.lRequestId = is.read(this.lRequestId, 1, true); + this.sMessage = is.read(this.sMessage, 2, true); + this.sBCConnHost = is.read(this.sBCConnHost, 3, true); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmd_RegisterRsp; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/SendItemSubBroadcastPacketMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/SendItemSubBroadcastPacketMsg.java new file mode 100644 index 0000000..0fd0375 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/SendItemSubBroadcastPacketMsg.java @@ -0,0 +1,283 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IGiftMsg; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.huya.msg.base.BaseHuyaMsg; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.*; +import tech.ordinaryroad.live.chat.client.huya.util.HuyaCodecUtil; + +import java.util.List; +import java.util.Optional; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SendItemSubBroadcastPacketMsg extends BaseHuyaMsg implements IGiftMsg { + + private int iItemType; + private String strPayId = ""; + private int iItemCount; + private long lPresenterUid; + private long lSenderUid; + private String sPresenterNick = ""; + private String sSenderNick = ""; + private String sSendContent = ""; + private int iItemCountByGroup; + private int iItemGroup; + private int iSuperPupleLevel; + private int iComboScore; + private int iDisplayInfo; + private int iEffectType; + private String iSenderIcon = ""; + private String iPresenterIcon = ""; + private int iTemplateType; + private String sExpand = ""; + private boolean bBusi; + private int iColorEffectType; + private String sPropsName = ""; + private short iAccpet = 0; + private short iEventType = 0; + private UserIdentityInfo userInfo = new UserIdentityInfo(); + private long lRoomId = 0; + private long lHomeOwnerUid = 0; + // private int streamerInfo = new D.StreamerNode; + private int iPayType = -1; + private int iNobleLevel = 0; + private NobleLevelInfo tNobleLevel = new NobleLevelInfo(); + private ItemEffectInfo tEffectInfo = new ItemEffectInfo(); + private List<Long> vExUid = CollUtil.newArrayList(-1L); + private int iComboStatus = 0; + private int iPidColorType = 0; + private int iMultiSend = 0; + private int iVFanLevel = 0; + private int iUpgradeLevel = 0; + private String sCustomText = ""; + private DIYBigGiftEffect tDIYEffect = new DIYBigGiftEffect(); + private long lComboSeqId = 0; + private long lPayTotal = 0; +// private int vBizData = new V.Vector(new D.ItemEffectBizData); + + // region 棰濆灞炴�� + private BadgeInfo badgeInfo; + private PropsItem propsItem = PropsItem.DEFAULT; + // endregion + + public SendItemSubBroadcastPacketMsg(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iItemType, 0); + os.write(this.strPayId, 1); + os.write(this.iItemCount, 2); + os.write(this.lPresenterUid, 3); + os.write(this.lSenderUid, 4); + os.write(this.sPresenterNick, 5); + os.write(this.sSenderNick, 6); + os.write(this.sSendContent, 7); + os.write(this.iItemCountByGroup, 8); + os.write(this.iItemGroup, 9); + os.write(this.iSuperPupleLevel, 10); + os.write(this.iComboScore, 11); + os.write(this.iDisplayInfo, 12); + os.write(this.iEffectType, 13); + os.write(this.iSenderIcon, 14); + os.write(this.iPresenterIcon, 15); + os.write(this.iTemplateType, 16); + os.write(this.sExpand, 17); + os.write(this.bBusi, 18); + os.write(this.iColorEffectType, 19); + os.write(this.sPropsName, 20); + os.write(this.iAccpet, 21); + os.write(this.iEventType, 22); + os.write(this.userInfo, 23); + os.write(this.lRoomId, 24); + os.write(this.lHomeOwnerUid, 25); +// os.write(this.streamerInfo, 26); + os.write(this.iPayType, 27); + os.write(this.iNobleLevel, 28); + os.write(this.tNobleLevel, 29); + os.write(this.tEffectInfo, 30); + os.write(this.vExUid, 31); + os.write(this.iComboStatus, 32); + os.write(this.iPidColorType, 33); + os.write(this.iMultiSend, 34); + os.write(this.iVFanLevel, 35); + os.write(this.iUpgradeLevel, 36); + os.write(this.sCustomText, 37); + os.write(this.tDIYEffect, 38); + os.write(this.lComboSeqId, 39); + os.write(this.lPayTotal, 41); +// os.write(this.vBizData, 42); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iItemType = is.read(this.iItemType, 0, true); + this.strPayId = is.read(this.strPayId, 1, true); + this.iItemCount = is.read(this.iItemCount, 2, true); + this.lPresenterUid = is.read(this.lPresenterUid, 3, true); + this.lSenderUid = is.read(this.lSenderUid, 4, true); + this.sPresenterNick = is.read(this.sPresenterNick, 5, true); + this.sSenderNick = is.read(this.sSenderNick, 6, true); + this.sSendContent = is.read(this.sSendContent, 7, true); + this.iItemCountByGroup = is.read(this.iItemCountByGroup, 8, true); + this.iItemGroup = is.read(this.iItemGroup, 9, true); + this.iSuperPupleLevel = is.read(this.iSuperPupleLevel, 10, true); + this.iComboScore = is.read(this.iComboScore, 11, true); + this.iDisplayInfo = is.read(this.iDisplayInfo, 12, true); + this.iEffectType = is.read(this.iEffectType, 13, true); + this.iSenderIcon = is.read(this.iSenderIcon, 14, true); + this.iPresenterIcon = is.read(this.iPresenterIcon, 15, true); + this.iTemplateType = is.read(this.iTemplateType, 16, true); + this.sExpand = is.read(this.sExpand, 17, true); + this.bBusi = is.read(this.bBusi, 18, true); + this.iColorEffectType = is.read(this.iColorEffectType, 19, true); + this.sPropsName = is.read(this.sPropsName, 20, true); + this.iAccpet = is.read(this.iAccpet, 21, true); + this.iEventType = is.read(this.iEventType, 22, true); + this.userInfo = (UserIdentityInfo) is.directRead(this.userInfo, 23, true); + this.lRoomId = is.read(this.lRoomId, 24, true); + this.lHomeOwnerUid = is.read(this.lHomeOwnerUid, 25, true); +// this.streamerInfo = is.read(this.streamerInfo, 26, true); + this.iPayType = is.read(this.iPayType, 27, true); + this.iNobleLevel = is.read(this.iNobleLevel, 28, true); + this.tNobleLevel = (NobleLevelInfo) is.directRead(this.tNobleLevel, 29, true); + this.tEffectInfo = (ItemEffectInfo) is.directRead(this.tEffectInfo, 30, true); + this.vExUid = is.readArray(this.vExUid, 31, true); + this.iComboStatus = is.read(this.iComboStatus, 32, true); + this.iPidColorType = is.read(this.iPidColorType, 33, true); + this.iMultiSend = is.read(this.iMultiSend, 34, true); + this.iVFanLevel = is.read(this.iVFanLevel, 35, true); + this.iUpgradeLevel = is.read(this.iUpgradeLevel, 36, true); + this.sCustomText = is.read(this.sCustomText, 37, true); + this.tDIYEffect = (DIYBigGiftEffect) is.directRead(this.tDIYEffect, 38, true); + this.lComboSeqId = is.read(this.lComboSeqId, 39, true); + this.lPayTotal = is.read(this.lPayTotal, 41, true); +// this.vBizData = is.read(this.vBizData, 42, true); + + // 瑙f瀽棰濆灞炴�� + for (DecorationInfo decorationPrefix : userInfo.getVDecorationPrefix()) { + Optional<? extends TarsStructBase> optional = HuyaCodecUtil.decodeDecorationInfo(decorationPrefix); + if (optional.isPresent()) { + TarsStructBase tarsStructBase = optional.get(); + if (tarsStructBase instanceof BadgeInfo) { + this.badgeInfo = (BadgeInfo) tarsStructBase; + break; + } + } + } + } + + @Override + public String getUid() { + return Long.toString(this.lSenderUid); + } + + @Override + public String getUsername() { + return this.sSenderNick; + } + + @Override + public String getUserAvatar() { + return this.iSenderIcon; + } + + @Override + public String getGiftName() { + return this.sPropsName; + } + + @Override + public String getGiftImg() { + if (this.propsItem == null) { + return ""; + } + + List<PropsIdentity> vPropsIdentity = this.propsItem.getVPropsIdentity(); + if (vPropsIdentity.isEmpty()) { + return ""; + } + + PropsIdentity propsIdentity = vPropsIdentity.get(0); + String sPropsWeb = propsIdentity.getSPropsWeb(); + if (StrUtil.isBlank(sPropsWeb)) { + return ""; + } + + return sPropsWeb.substring(0, sPropsWeb.indexOf("&")); + } + + @Override + public String getGiftId() { + return Long.toString(this.iItemType); + } + + @Override + public int getGiftCount() { + return this.iItemCount; + } + + /** + * 100 瀵瑰簲 1铏庣墮甯� + */ + @Override + public int getGiftPrice() { + return (int) (this.lPayTotal / this.iItemCount); + } + + @Override + public String getReceiveUid() { + return Long.toString(this.lPresenterUid); + } + + @Override + public String getReceiveUsername() { + return this.sPresenterNick; + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmdS2C_MsgPushReq; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/UserInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/UserInfo.java new file mode 100644 index 0000000..b8ef2ab --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/UserInfo.java @@ -0,0 +1,88 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class UserInfo extends TarsStructBase { + + private long lUid = 0; + private boolean bAnonymous = true; + private String sGuid = ""; + private String sToken = ""; + private long lTid = 0; + private long lSid = 0; + private long lGroupId = 0; + private long lGroupType = 0; + private String sAppId = ""; + private String sUA = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.bAnonymous, 1); + os.write(this.sGuid, 2); + os.write(this.sToken, 3); + os.write(this.lTid, 4); + os.write(this.lSid, 5); + os.write(this.lGroupId, 6); + os.write(this.lGroupType, 7); + os.write(this.sAppId, 8); + os.write(this.sUA, 9); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, true); + this.bAnonymous = is.read(this.bAnonymous, 1, true); + this.sGuid = is.read(this.sGuid, 2, true); + this.sToken = is.read(this.sToken, 3, true); + this.lTid = is.read(this.lTid, 4, true); + this.lSid = is.read(this.lSid, 5, true); + this.lGroupId = is.read(this.lGroupId, 6, true); + this.lGroupType = is.read(this.lGroupType, 7, true); + this.sAppId = is.read(this.sAppId, 8, true); + this.sUA = is.read(this.sUA, 9, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/VerifyCookieRsp.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/VerifyCookieRsp.java new file mode 100644 index 0000000..c080d6e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/VerifyCookieRsp.java @@ -0,0 +1,66 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.huya.msg.base.BaseHuyaMsg; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class VerifyCookieRsp extends BaseHuyaMsg { + + private int iValidate; + + public VerifyCookieRsp(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(0, this.iValidate); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iValidate = is.read(this.iValidate, 0, true); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmdS2C_VerifyCookieRsp; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/VipEnterBannerMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/VipEnterBannerMsg.java new file mode 100644 index 0000000..7fbfe94 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/VipEnterBannerMsg.java @@ -0,0 +1,144 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IEnterRoomMsg; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.huya.msg.base.BaseHuyaMsg; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.*; + +import java.util.List; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class VipEnterBannerMsg extends BaseHuyaMsg implements IEnterRoomMsg { + + private long lUid; + private String sNickName = ""; + private long lPid; + private NobleInfo tNobleInfo = new NobleInfo(); + private GuardInfo tGuardInfo = new GuardInfo(); + private WeekRankInfo tWeekRankInfo = new WeekRankInfo(); + private String sLogoURL = ""; + private boolean bFromNearby; + private String sLocation = ""; + private DecorationInfoRsp tDecorationInfo = new DecorationInfoRsp(); + private WeekRankInfo tWeekHeartStirRankInfo = new WeekRankInfo(); + private WeekRankInfo tWeekHeartBlockRankInfo = new WeekRankInfo(); + private int iMasterRank; + private ACEnterBanner tACInfo = new ACEnterBanner(); + private List<CommEnterBanner> vCommEnterBanner = CollUtil.newArrayList(new CommEnterBanner()); + private UserRidePetInfo tRidePetInfo = new UserRidePetInfo(); + + public VipEnterBannerMsg(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.sNickName, 1); + os.write(this.lPid, 2); + os.write(this.tNobleInfo, 3); + os.write(this.tGuardInfo, 4); + os.write(this.tWeekRankInfo, 5); + os.write(this.sLogoURL, 6); + os.write(this.bFromNearby, 7); + os.write(this.sLocation, 8); + os.write(this.tDecorationInfo, 9); + os.write(this.tWeekHeartStirRankInfo, 10); + os.write(this.tWeekHeartBlockRankInfo, 11); + os.write(this.iMasterRank, 12); + os.write(this.tACInfo, 13); + os.write(this.vCommEnterBanner, 14); + os.write(this.tRidePetInfo, 15); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, false); + this.sNickName = is.read(this.sNickName, 1, false); + this.lPid = is.read(this.lPid, 2, false); + this.tNobleInfo = (NobleInfo) is.directRead(this.tNobleInfo, 3, false); + this.tGuardInfo = (GuardInfo) is.directRead(this.tGuardInfo, 4, false); + this.tWeekRankInfo = (WeekRankInfo) is.directRead(this.tWeekRankInfo, 5, false); + this.sLogoURL = is.read(this.sLogoURL, 6, false); + this.bFromNearby = is.read(this.bFromNearby, 7, false); + this.sLocation = is.read(this.sLocation, 8, false); + this.tDecorationInfo = (DecorationInfoRsp) is.directRead(this.tDecorationInfo, 9, false); + this.tWeekHeartStirRankInfo = (WeekRankInfo) is.directRead(this.tWeekHeartStirRankInfo, 10, false); + this.tWeekHeartBlockRankInfo = (WeekRankInfo) is.directRead(this.tWeekHeartBlockRankInfo, 11, false); + this.iMasterRank = is.read(this.iMasterRank, 12, false); + this.tACInfo = (ACEnterBanner) is.directRead(this.tACInfo, 13, false); + this.vCommEnterBanner = is.readArray(this.vCommEnterBanner, 14, false); + this.tRidePetInfo = (UserRidePetInfo) is.directRead(this.tRidePetInfo, 15, false); + } + + @Override + public String getBadgeName() { + // TODO + return null; + } + + @Override + public byte getBadgeLevel() { + // TODO + return 0; + } + + @Override + public String getUid() { + return Long.toString(lUid); + } + + @Override + public String getUsername() { + return sNickName; + } + + @Override + public String getUserAvatar() { + // TODO + return IEnterRoomMsg.super.getUserAvatar(); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmdS2C_MsgPushReq; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/WebSocketCommand.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/WebSocketCommand.java new file mode 100644 index 0000000..6c71ae5 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/WebSocketCommand.java @@ -0,0 +1,84 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.huya.msg.base.BaseHuyaMsg; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class WebSocketCommand extends BaseHuyaMsg { + + private int operation; + private byte[] vData; + private long lRequestId; + private String traceId = ""; + private int iEncryptType; + private long lTime; + private String sMD5 = ""; + + public WebSocketCommand(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.operation, 0); + os.write(this.vData, 1); + os.write(this.lRequestId, 2); + os.write(this.traceId, 3); + os.write(this.iEncryptType, 4); + os.write(this.lTime, 5); + os.write(this.sMD5, 6); + } + + @Override + public void readFrom(TarsInputStream is) { + this.operation = is.read(this.operation, 0, true); + this.vData = is.read(this.vData, 1, true); + this.lRequestId = is.read(this.lRequestId, 2, true); + this.traceId = is.read(this.traceId, 3, true); + this.iEncryptType = is.read(this.iEncryptType, 4, true); + this.lTime = is.read(this.lTime, 5, true); + this.sMD5 = is.read(this.sMD5, 6, true); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.getByCode(operation); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/WupRsp.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/WupRsp.java new file mode 100644 index 0000000..443866c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/WupRsp.java @@ -0,0 +1,45 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg; + +import lombok.NoArgsConstructor; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; + +/** + * @author mjz + * @date 2023/10/3 + */ +@NoArgsConstructor +public class WupRsp extends BaseWup { + + public WupRsp(byte[] vData) { + super.decode(vData); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmd_WupRsp; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/base/BaseHuyaCmdMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/base/BaseHuyaCmdMsg.java new file mode 100644 index 0000000..2b5c1cf --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/base/BaseHuyaCmdMsg.java @@ -0,0 +1,79 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.base; + +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.StrUtil; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.msg.BaseMsg; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaCmdEnum; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public abstract class BaseHuyaCmdMsg extends TarsStructBase implements IHuyaCmdMsg { + + private long lUri; + + @Override + public String getCmd() { + return StrUtil.nullToEmpty(StrUtil.toStringOrNull(this.lUri)); + } + + @Override + public void setCmd(String cmd) { + this.lUri = NumberUtil.parseLong(cmd); + } + + @Override + public HuyaCmdEnum getCmdEnum() { + return HuyaCmdEnum.getByCode(this.lUri); + } + + @Override + public TarsStructBase newInit() { + return this; + } + + @Override + public String toString() { + try { + return BaseMsg.OBJECT_MAPPER.writeValueAsString(this); + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/base/BaseHuyaMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/base/BaseHuyaMsg.java new file mode 100644 index 0000000..b0dd169 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/base/BaseHuyaMsg.java @@ -0,0 +1,51 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.base; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.qq.tars.protocol.tars.TarsStructBase; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.msg.BaseMsg; + +/** + * @author mjz + * @date 2023/10/2 + */ +public abstract class BaseHuyaMsg extends TarsStructBase implements IHuyaMsg { + + @Override + public TarsStructBase newInit() { + return this; + } + + @Override + public String toString() { + try { + return BaseMsg.OBJECT_MAPPER.writeValueAsString(this); + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/base/IHuyaCmdMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/base/IHuyaCmdMsg.java new file mode 100644 index 0000000..41ab6e2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/base/IHuyaCmdMsg.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.base; + +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaCmdEnum; + +/** + * @author mjz + * @date 2023/10/2 + */ +public interface IHuyaCmdMsg extends IHuyaMsg, ICmdMsg<HuyaCmdEnum> { +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/base/IHuyaMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/base/IHuyaMsg.java new file mode 100644 index 0000000..0fc8aa0 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/base/IHuyaMsg.java @@ -0,0 +1,38 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.base; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; + +/** + * @author mjz + * @date 2023/8/26 + */ +public interface IHuyaMsg extends IMsg { + @JsonIgnore + HuyaOperationEnum getOperationEnum(); +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/ACEnterBanner.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/ACEnterBanner.java new file mode 100644 index 0000000..e907675 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/ACEnterBanner.java @@ -0,0 +1,70 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class ACEnterBanner extends TarsStructBase { + + private int iWeekHeartStirRank; + private int iWeekHeartBlockRank; + private int iMasterRank; + private int iACWeekRank; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iWeekHeartStirRank, 0); + os.write(this.iWeekHeartBlockRank, 1); + os.write(this.iMasterRank, 2); + os.write(this.iACWeekRank, 3); + } + + @Override + public void readFrom(TarsInputStream is) { + is.read(this.iWeekHeartStirRank, 0, false); + is.read(this.iWeekHeartBlockRank, 1, false); + is.read(this.iMasterRank, 2, false); + is.read(this.iACWeekRank, 3, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/BadgeInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/BadgeInfo.java new file mode 100644 index 0000000..e9233b0 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/BadgeInfo.java @@ -0,0 +1,119 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class BadgeInfo extends TarsStructBase { + + private long lUid; + private long lBadgeId; + private String sPresenterNickName = ""; + private String sBadgeName = ""; + private int iBadgeLevel; + private int iRank; + private int iScore; + private int iNextScore; + private int iQuotaUsed; + private int iQuota; + private long lQuotaTS; + private long lOpenTS; + private int iVFlag; + private String sVLogo = ""; + private PresenterChannelInfo tChannelInfo = new PresenterChannelInfo(); + private String sPresenterLogo = ""; + private long lVExpiredTS; + private int iBadgeType; + private FaithInfo tFaithInfo = new FaithInfo(); + private SuperFansInfo tSuperFansInfo = new SuperFansInfo(); + private int iBaseQuota; + private long lVConsumRank; + private int iCustomBadgeFlag; + private int iAgingDays; + private int iDayScore; + private CustomBadgeDynamicExternal tExternal = new CustomBadgeDynamicExternal(); + private int iExtinguished; + private int iExtinguishDays; + private int iBadgeCate; + private int iLiveFlag; + + @Override + public void writeTo(TarsOutputStream os) { + + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, false); + this.lBadgeId = is.read(this.lBadgeId, 1, false); + this.sPresenterNickName = is.read(this.sPresenterNickName, 2, false); + this.sBadgeName = is.read(this.sBadgeName, 3, false); + this.iBadgeLevel = is.read(this.iBadgeLevel, 4, false); + this.iRank = is.read(this.iRank, 5, false); + this.iScore = is.read(this.iScore, 6, false); + this.iNextScore = is.read(this.iNextScore, 7, false); + this.iQuotaUsed = is.read(this.iQuotaUsed, 8, false); + this.iQuota = is.read(this.iQuota, 9, false); + this.lQuotaTS = is.read(this.lQuotaTS, 10, false); + this.lOpenTS = is.read(this.lOpenTS, 11, false); + this.iVFlag = is.read(this.iVFlag, 12, false); + this.sVLogo = is.read(this.sVLogo, 13, false); + this.tChannelInfo = (PresenterChannelInfo) is.directRead(this.tChannelInfo, 14, false); + this.sPresenterLogo = is.read(this.sPresenterLogo, 15, false); + this.lVExpiredTS = is.read(this.lVExpiredTS, 16, false); + this.iBadgeType = is.read(this.iBadgeType, 17, false); + this.tFaithInfo = (FaithInfo) is.directRead(this.tFaithInfo, 18, false); + this.tSuperFansInfo = (SuperFansInfo) is.directRead(this.tSuperFansInfo, 19, false); + this.iBaseQuota = is.read(this.iBaseQuota, 20, false); + this.lVConsumRank = is.read(this.lVConsumRank, 21, false); + this.iCustomBadgeFlag = is.read(this.iCustomBadgeFlag, 22, false); + this.iAgingDays = is.read(this.iAgingDays, 23, false); + this.iDayScore = is.read(this.iDayScore, 24, false); + this.tExternal = (CustomBadgeDynamicExternal) is.directRead(this.tExternal, 25, false); + this.iExtinguished = is.read(this.iExtinguished, 26, false); + this.iExtinguishDays = is.read(this.iExtinguishDays, 27, false); + this.iBadgeCate = is.read(this.iBadgeCate, 28, false); + this.iLiveFlag = is.read(this.iLiveFlag, 29, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/BulletBorderGroundFormat.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/BulletBorderGroundFormat.java new file mode 100644 index 0000000..61fabb2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/BulletBorderGroundFormat.java @@ -0,0 +1,85 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class BulletBorderGroundFormat extends TarsStructBase { + + private int iEnableUse; + private int iBorderThickness; + private int iBorderColour = -1; + private int iBorderDiaphaneity = 100; + private int iGroundColour = -1; + private int iGroundColourDiaphaneity = 100; + private String sAvatarDecorationUrl = ""; + private int iFontColor = -1; + private int iTerminalFlag = -1; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iEnableUse, 0); + os.write(this.iBorderThickness, 1); + os.write(this.iBorderColour, 2); + os.write(this.iBorderDiaphaneity, 3); + os.write(this.iGroundColour, 4); + os.write(this.iGroundColourDiaphaneity, 5); + os.write(this.sAvatarDecorationUrl, 6); + os.write(this.iFontColor, 7); + os.write(this.iTerminalFlag, 8); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iEnableUse = is.read(this.iEnableUse, 0, false); + this.iBorderThickness = is.read(this.iBorderThickness, 1, false); + this.iBorderColour = is.read(this.iBorderColour, 2, false); + this.iBorderDiaphaneity = is.read(this.iBorderDiaphaneity, 3, false); + this.iGroundColour = is.read(this.iGroundColour, 4, false); + this.iGroundColourDiaphaneity = is.read(this.iGroundColourDiaphaneity, 5, false); + this.sAvatarDecorationUrl = is.read(this.sAvatarDecorationUrl, 6, false); + this.iFontColor = is.read(this.iFontColor, 7, false); + this.iTerminalFlag = is.read(this.iTerminalFlag, 8, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/BulletFormat.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/BulletFormat.java new file mode 100644 index 0000000..5f81da9 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/BulletFormat.java @@ -0,0 +1,89 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class BulletFormat extends TarsStructBase { + + private int iFontColor = -1; + private int iFontSize = 4; + private int iTextSpeed = 0; + private int iTransitionType = 1; + private int iPopupStyle = 0; + private BulletBorderGroundFormat tBorderGroundFormat = new BulletBorderGroundFormat(); + private List<Integer> vGraduatedColor = CollUtil.newArrayList(0); + private int iAvatarFlag = 0; + private int iAvatarTerminalFlag = -1; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iFontColor, 0); + os.write(this.iFontSize, 1); + os.write(this.iTextSpeed, 2); + os.write(this.iTransitionType, 3); + os.write(this.iPopupStyle, 4); + os.write(this.tBorderGroundFormat, 5); + os.write(this.vGraduatedColor, 6); + os.write(this.iAvatarFlag, 7); + os.write(this.iAvatarTerminalFlag, 8); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iFontColor = is.read(this.iFontColor, 0, false); + this.iFontSize = is.read(this.iFontSize, 1, false); + this.iTextSpeed = is.read(this.iTextSpeed, 2, false); + this.iTransitionType = is.read(this.iTransitionType, 3, false); + this.iPopupStyle = is.read(this.iPopupStyle, 4, false); + this.tBorderGroundFormat = (BulletBorderGroundFormat) is.directRead(this.tBorderGroundFormat, 5, false); + this.vGraduatedColor = is.readArray(this.vGraduatedColor, 6, false); + this.iAvatarFlag = is.read(this.iAvatarFlag, 7, false); + this.iAvatarTerminalFlag = is.read(this.iAvatarTerminalFlag, 8, false); + + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/ChannelPair.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/ChannelPair.java new file mode 100644 index 0000000..4bb796a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/ChannelPair.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class ChannelPair extends TarsStructBase { + + private long lTid; + private long lSid; + private long lPid; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lTid, 0); + os.write(this.lSid, 1); + os.write(this.lPid, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lTid = is.read(this.lTid, 0, false); + this.lSid = is.read(this.lSid, 1, false); + this.lPid = is.read(this.lPid, 2, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/CommEnterBanner.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/CommEnterBanner.java new file mode 100644 index 0000000..900178d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/CommEnterBanner.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class CommEnterBanner extends TarsStructBase { + + private int iBannerUri; + private int iViewType; + private byte[] vData; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iBannerUri, 0); + os.write(this.iViewType, 1); + os.write(this.vData, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iBannerUri = is.read(this.iBannerUri, 0, false); + this.iViewType = is.read(this.iViewType, 1, false); + this.vData = is.read(this.vData, 2, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/ContentFormat.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/ContentFormat.java new file mode 100644 index 0000000..594baf1 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/ContentFormat.java @@ -0,0 +1,76 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class ContentFormat extends TarsStructBase { + + private int iFontColor = -1; + private int iFontSize = 4; + private int iPopupStyle = 0; + private int iNickNameFontColor = -1; + private int iDarkFontColor = -1; + private int iDarkNickNameFontColor = -1; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iFontColor, 0); + os.write(this.iFontSize, 1); + os.write(this.iPopupStyle, 2); + os.write(this.iNickNameFontColor, 3); + os.write(this.iDarkFontColor, 4); + os.write(this.iDarkNickNameFontColor, 5); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iFontColor = is.read(this.iFontColor, 0, false); + this.iFontSize = is.read(this.iFontSize, 1, false); + this.iPopupStyle = is.read(this.iPopupStyle, 2, false); + this.iNickNameFontColor = is.read(this.iNickNameFontColor, 3, false); + this.iDarkFontColor = is.read(this.iDarkFontColor, 4, false); + this.iDarkNickNameFontColor = is.read(this.iDarkNickNameFontColor, 5, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/CustomBadgeDynamicExternal.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/CustomBadgeDynamicExternal.java new file mode 100644 index 0000000..bb8d5aa --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/CustomBadgeDynamicExternal.java @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class CustomBadgeDynamicExternal extends TarsStructBase { + + private String sFloorExter = ""; + private int iFansIdentity; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.sFloorExter, 0); + os.write(this.iFansIdentity, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.sFloorExter = is.read(this.sFloorExter, 0, false); + this.iFansIdentity = is.read(this.iFansIdentity, 1, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DIYBigGiftEffect.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DIYBigGiftEffect.java new file mode 100644 index 0000000..b93da5a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DIYBigGiftEffect.java @@ -0,0 +1,70 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DIYBigGiftEffect extends TarsStructBase { + + private String sResourceUrl = ""; + private String sResourceAttr = ""; + private String sWebResourceUrl = ""; + private String sPCResourceUrl = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.sResourceUrl, 0); + os.write(this.sResourceAttr, 1); + os.write(this.sWebResourceUrl, 2); + os.write(this.sPCResourceUrl, 3); + } + + @Override + public void readFrom(TarsInputStream is) { + this.sResourceUrl = is.read(this.sResourceUrl, 0, false); + this.sResourceAttr = is.read(this.sResourceAttr, 1, false); + this.sWebResourceUrl = is.read(this.sWebResourceUrl, 2, false); + this.sPCResourceUrl = is.read(this.sPCResourceUrl, 3, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DecorationInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DecorationInfo.java new file mode 100644 index 0000000..747518d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DecorationInfo.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DecorationInfo extends TarsStructBase { + + private int iAppId = 0; + private int iViewType = 0; + private byte[] vData; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iAppId, 0); + os.write(this.iViewType, 1); + os.write(this.vData, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iAppId = is.read(this.iAppId, 0, true); + this.iViewType = is.read(this.iViewType, 1, true); + this.vData = is.read(this.vData, 2, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DecorationInfoRsp.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DecorationInfoRsp.java new file mode 100644 index 0000000..9c93cc4 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DecorationInfoRsp.java @@ -0,0 +1,88 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.List; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DecorationInfoRsp extends TarsStructBase { + + private List<DecorationInfo> vDecorationPrefix = CollUtil.newArrayList(new DecorationInfo()); + private List<DecorationInfo> vDecorationSuffix = CollUtil.newArrayList(new DecorationInfo()); + private ContentFormat tFormat = new ContentFormat(); + private BulletFormat tBulletFormat = new BulletFormat(); + private List<ChannelPair> vForwardChannels = CollUtil.newArrayList(new ChannelPair()); + private int iModifyMask; + private List<DecorationInfo> vBulletPrefix = CollUtil.newArrayList(new DecorationInfo()); + private SenderInfo tUserInfo = new SenderInfo(); + private List<DecorationInfo> vBulletSuffix = CollUtil.newArrayList(new DecorationInfo()); + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.vDecorationPrefix, 0); + os.write(this.vDecorationSuffix, 1); + os.write(this.tFormat, 2); + os.write(this.tBulletFormat, 3); + os.write(this.vForwardChannels, 4); + os.write(this.iModifyMask, 5); + os.write(this.vBulletPrefix, 6); + os.write(this.tUserInfo, 7); + os.write(this.vBulletSuffix, 8); + } + + @Override + public void readFrom(TarsInputStream is) { + this.vDecorationPrefix = is.readArray(this.vDecorationPrefix, 0, false); + this.vDecorationSuffix = is.readArray(this.vDecorationSuffix, 1, false); + this.tFormat = (ContentFormat) is.directRead(this.tFormat, 2, false); + this.tBulletFormat = (BulletFormat) is.directRead(this.tBulletFormat, 3, false); + this.vForwardChannels = is.readArray(this.vForwardChannels, 4, false); + this.iModifyMask = is.read(this.iModifyMask, 5, false); + this.vBulletPrefix = is.readArray(this.vBulletPrefix, 6, false); + this.tUserInfo = (SenderInfo) is.directRead(this.tUserInfo, 7, false); + this.vBulletSuffix = is.readArray(this.vBulletSuffix, 8, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DeviceInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DeviceInfo.java new file mode 100644 index 0000000..8e8d93b --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DeviceInfo.java @@ -0,0 +1,73 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DeviceInfo extends TarsStructBase { + + private String sIMEI = ""; + private String sAPN = ""; + private String sNetType = ""; + private String sDeviceId = ""; + private String sMId = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.sIMEI, 0); + os.write(this.sAPN, 1); + os.write(this.sNetType, 2); + os.write(this.sDeviceId, 3); + os.write(this.sMId, 4); + } + + @Override + public void readFrom(TarsInputStream is) { + this.sIMEI = is.read(this.sIMEI, 0, false); + this.sAPN = is.read(this.sAPN, 1, false); + this.sNetType = is.read(this.sNetType, 2, false); + this.sDeviceId = is.read(this.sDeviceId, 3, false); + this.sMId = is.read(this.sMId, 4, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DisplayInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DisplayInfo.java new file mode 100644 index 0000000..1a23b3f --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/DisplayInfo.java @@ -0,0 +1,91 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class DisplayInfo extends TarsStructBase { + + private int iMarqueeScopeMin = 0; + private int iMarqueeScopeMax = 0; + private int iCurrentVideoNum = 0; + private int iCurrentVideoMin = 0; + private int iCurrentVideoMax = 0; + private int iAllVideoNum = 0; + private int iAllVideoMin = 0; + private int iAllVideoMax = 0; + private int iCurrentScreenNum = 0; + private int iCurrentScreenMin = 0; + private int iCurrentScreenMax = 0; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iMarqueeScopeMin, 1); + os.write(this.iMarqueeScopeMax, 2); + os.write(this.iCurrentVideoNum, 3); + os.write(this.iCurrentVideoMin, 4); + os.write(this.iCurrentVideoMax, 5); + os.write(this.iAllVideoNum, 6); + os.write(this.iAllVideoMin, 7); + os.write(this.iAllVideoMax, 8); + os.write(this.iCurrentScreenNum, 9); + os.write(this.iCurrentScreenMin, 10); + os.write(this.iCurrentScreenMax, 11); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iMarqueeScopeMin = is.read(this.iMarqueeScopeMin, 1, true); + this.iMarqueeScopeMax = is.read(this.iMarqueeScopeMax, 2, true); + this.iCurrentVideoNum = is.read(this.iCurrentVideoNum, 3, true); + this.iCurrentVideoMin = is.read(this.iCurrentVideoMin, 4, true); + this.iCurrentVideoMax = is.read(this.iCurrentVideoMax, 5, true); + this.iAllVideoNum = is.read(this.iAllVideoNum, 6, true); + this.iAllVideoMin = is.read(this.iAllVideoMin, 7, true); + this.iAllVideoMax = is.read(this.iAllVideoMax, 8, true); + this.iCurrentScreenNum = is.read(this.iCurrentScreenNum, 9, true); + this.iCurrentScreenMin = is.read(this.iCurrentScreenMin, 10, true); + this.iCurrentScreenMax = is.read(this.iCurrentScreenMax, 11, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/FaithInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/FaithInfo.java new file mode 100644 index 0000000..1faa752 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/FaithInfo.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class FaithInfo extends TarsStructBase { + + private String sFaithName = ""; + private List<FaithPresenter> vPresenter = CollUtil.newArrayList(new FaithPresenter()); + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.sFaithName, 0); + os.write(this.vPresenter, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.sFaithName = is.read(this.sFaithName, 0, false); + this.vPresenter = is.readArray(this.vPresenter, 1, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/FaithPresenter.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/FaithPresenter.java new file mode 100644 index 0000000..ad78b3d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/FaithPresenter.java @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class FaithPresenter extends TarsStructBase { + + private long lPid; + private String sLogo = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lPid, 0); + os.write(this.sLogo, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lPid = is.read(this.lPid, 0, false); + this.sLogo = is.read(this.sLogo, 1, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/GuardInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/GuardInfo.java new file mode 100644 index 0000000..badff46 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/GuardInfo.java @@ -0,0 +1,94 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class GuardInfo extends TarsStructBase { + + private long lUid; + private long lPid; + private int iGuardLevel; + private long lEndTime; + private String sAttr = ""; + private String sIcon = ""; + private int iGuardType; + private long lStartTime; + private long lCommemorateDay; + private int iAccompanyDay; + private String sNewAttr = ""; + private String sEnterText = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.lPid, 1); + os.write(this.iGuardLevel, 2); + os.write(this.lEndTime, 3); + os.write(this.sAttr, 4); + os.write(this.sIcon, 5); + os.write(this.iGuardType, 6); + os.write(this.lStartTime, 7); + os.write(this.lCommemorateDay, 8); + os.write(this.iAccompanyDay, 9); + os.write(this.sNewAttr, 10); + os.write(this.sEnterText, 11); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, false); + this.lPid = is.read(this.lPid, 1, false); + this.iGuardLevel = is.read(this.iGuardLevel, 2, false); + this.lEndTime = is.read(this.lEndTime, 3, false); + this.sAttr = is.read(this.sAttr, 4, false); + this.sIcon = is.read(this.sIcon, 5, false); + this.iGuardType = is.read(this.iGuardType, 6, false); + this.lStartTime = is.read(this.lStartTime, 7, false); + this.lCommemorateDay = is.read(this.lCommemorateDay, 8, false); + this.iAccompanyDay = is.read(this.iAccompanyDay, 9, false); + this.sNewAttr = is.read(this.sNewAttr, 10, false); + this.sEnterText = is.read(this.sEnterText, 11, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/ItemEffectInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/ItemEffectInfo.java new file mode 100644 index 0000000..4a4478f --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/ItemEffectInfo.java @@ -0,0 +1,70 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class ItemEffectInfo extends TarsStructBase { + + private int iPriceLevel; + private int iStreamDuration; + private int iShowType; + private int iStreamId; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iPriceLevel, 0); + os.write(this.iStreamDuration, 1); + os.write(this.iShowType, 2); + os.write(this.iStreamId, 3); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iPriceLevel = is.read(this.iPriceLevel, 0, false); + this.iStreamDuration = is.read(this.iStreamDuration, 1, false); + this.iShowType = is.read(this.iShowType, 2, false); + this.iStreamId = is.read(this.iStreamId, 3, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/LiveAppUAEx.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/LiveAppUAEx.java new file mode 100644 index 0000000..b7b9b83 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/LiveAppUAEx.java @@ -0,0 +1,73 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class LiveAppUAEx extends TarsStructBase { + + private String sIMEI = ""; + private String sAPN = ""; + private String sNetType = ""; + private String sDeviceId = ""; + private String sMId = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.sIMEI, 1); + os.write(this.sAPN, 2); + os.write(this.sNetType, 3); + os.write(this.sDeviceId, 4); + os.write(this.sMId, 5); + } + + @Override + public void readFrom(TarsInputStream is) { + this.sIMEI = is.read(this.sIMEI, 1, false); + this.sAPN = is.read(this.sAPN, 2, false); + this.sNetType = is.read(this.sNetType, 3, false); + this.sDeviceId = is.read(this.sDeviceId, 4, false); + this.sMId = is.read(this.sMId, 5, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/LiveProxyValue.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/LiveProxyValue.java new file mode 100644 index 0000000..619eb18 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/LiveProxyValue.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class LiveProxyValue extends TarsStructBase { + + private int eProxyType; + private List<String> sProxy = CollUtil.newArrayList(""); + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.eProxyType, 0); + os.write(this.sProxy, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.eProxyType = is.read(this.eProxyType, 0, false); + this.sProxy = is.readArray(this.sProxy, 1, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/LiveUserbase.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/LiveUserbase.java new file mode 100644 index 0000000..b6595a2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/LiveUserbase.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class LiveUserbase extends TarsStructBase { + + private int eSource; + private int eType; + private LiveAppUAEx tUAEx = new LiveAppUAEx(); + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.eSource, 0); + os.write(this.eType, 1); + os.write(this.tUAEx, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + this.eSource = is.read(this.eSource, 0, false); + this.eType = is.read(this.eType, 1, false); + this.tUAEx = (LiveAppUAEx) is.directRead(this.tUAEx, 2, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/MessageContentExpand.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/MessageContentExpand.java new file mode 100644 index 0000000..4afd6c5 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/MessageContentExpand.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class MessageContentExpand extends TarsStructBase { + + private int iAppId = 0; + private String sToast = ""; + private byte[] vData; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iAppId, 0); + os.write(this.sToast, 1); + os.write(this.vData, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iAppId = is.read(this.iAppId, 0, false); + this.sToast = is.read(this.sToast, 1, false); + this.vData = is.read(this.vData, 2, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/MessageTagInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/MessageTagInfo.java new file mode 100644 index 0000000..bb8c0e7 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/MessageTagInfo.java @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class MessageTagInfo extends TarsStructBase { + + private int iAppId = 0; + private String sTag = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iAppId, 0); + os.write(this.sTag, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iAppId = is.read(this.iAppId, 0, false); + this.sTag = is.read(this.sTag, 1, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/MsgItem.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/MsgItem.java new file mode 100644 index 0000000..22f85aa --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/MsgItem.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.huya.msg.base.BaseHuyaCmdMsg; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class MsgItem extends BaseHuyaCmdMsg { + + private byte[] sMsg; + private long lMsgId; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(super.getLUri(), 0); + os.write(this.sMsg, 1); + os.write(this.lMsgId, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + super.setLUri(is.read(super.getLUri(), 0, true)); + this.sMsg = is.read(this.sMsg, 1, true); + this.lMsgId = is.read(this.lMsgId, 2, true); + } + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmdS2C_MsgPushReq_V2; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/MsgStatInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/MsgStatInfo.java new file mode 100644 index 0000000..d4d229e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/MsgStatInfo.java @@ -0,0 +1,70 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class MsgStatInfo extends TarsStructBase { + + private Map<String, Map<Long, Integer>> mSignalPushUriCount = new HashMap<>(); + private Map<String, Map<Long, Integer>> mP2pPushUriCount = new HashMap<>(); + private int iSupportAckMsgStat; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.mSignalPushUriCount, 0); + os.write(this.mP2pPushUriCount, 1); + os.write(this.iSupportAckMsgStat, 3); + } + + @Override + public void readFrom(TarsInputStream is) { + this.mSignalPushUriCount = is.readMap(this.mSignalPushUriCount, 0, false); + this.mP2pPushUriCount = is.readMap(this.mP2pPushUriCount, 1, false); + this.iSupportAckMsgStat = is.read(this.iSupportAckMsgStat, 3, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/NobleInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/NobleInfo.java new file mode 100644 index 0000000..db8adc1 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/NobleInfo.java @@ -0,0 +1,94 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class NobleInfo extends TarsStructBase { + + private long lUid; + private long lPid; + private long lValidDate; + private String sNobleName = ""; + private int iNobleLevel; + private int iNoblePet; + private int iNobleStatus; + private int iNobleType; + private int iRemainDays; + private NobleLevelAttr tLevelAttr = new NobleLevelAttr(); + private NoblePetAttr tPetAttr = new NoblePetAttr(); + private long lOpenTime; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.lPid, 1); + os.write(this.lValidDate, 2); + os.write(this.sNobleName, 3); + os.write(this.iNobleLevel, 4); + os.write(this.iNoblePet, 5); + os.write(this.iNobleStatus, 6); + os.write(this.iNobleType, 7); + os.write(this.iRemainDays, 8); + os.write(this.tLevelAttr, 9); + os.write(this.tPetAttr, 10); + os.write(this.lOpenTime, 11); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, false); + this.lPid = is.read(this.lPid, 1, false); + this.lValidDate = is.read(this.lValidDate, 2, false); + this.sNobleName = is.read(this.sNobleName, 3, false); + this.iNobleLevel = is.read(this.iNobleLevel, 4, false); + this.iNoblePet = is.read(this.iNoblePet, 5, false); + this.iNobleStatus = is.read(this.iNobleStatus, 6, false); + this.iNobleType = is.read(this.iNobleType, 7, false); + this.iRemainDays = is.read(this.iRemainDays, 8, false); + this.tLevelAttr = (NobleLevelAttr) is.directRead(this.tLevelAttr, 9, false); + this.tPetAttr = (NoblePetAttr) is.directRead(this.tPetAttr, 10, false); + this.lOpenTime = is.read(this.lOpenTime, 11, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/NobleLevelAttr.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/NobleLevelAttr.java new file mode 100644 index 0000000..e9199af --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/NobleLevelAttr.java @@ -0,0 +1,79 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class NobleLevelAttr extends TarsStructBase { + + private int iAttrType; + private long lValidDate; + private int iAttrStatus; + private int iProgress; + private int iTask; + private int iRemainDays; + private String sReserve = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iAttrType, 0); + os.write(this.lValidDate, 1); + os.write(this.iAttrStatus, 2); + os.write(this.iProgress, 3); + os.write(this.iTask, 4); + os.write(this.iRemainDays, 5); + os.write(this.sReserve, 6); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iAttrType = is.read(this.iAttrType, 0, false); + this.lValidDate = is.read(this.lValidDate, 1, false); + this.iAttrStatus = is.read(this.iAttrStatus, 2, false); + this.iProgress = is.read(this.iProgress, 3, false); + this.iTask = is.read(this.iTask, 4, false); + this.iRemainDays = is.read(this.iRemainDays, 5, false); + this.sReserve = is.read(this.sReserve, 6, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/NobleLevelInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/NobleLevelInfo.java new file mode 100644 index 0000000..0555b65 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/NobleLevelInfo.java @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class NobleLevelInfo extends TarsStructBase { + + private int iNobleLevel; + private int iAttrType; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iNobleLevel, 0); + os.write(this.iAttrType, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iNobleLevel = is.read(this.iNobleLevel, 0, true); + this.iAttrType = is.read(this.iAttrType, 1, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/NoblePetAttr.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/NoblePetAttr.java new file mode 100644 index 0000000..a9d2618 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/NoblePetAttr.java @@ -0,0 +1,77 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class NoblePetAttr extends TarsStructBase { + + private int iPetId; + private String sPetName = ""; + private String sPetAction = ""; + private int iFrame; + private int iBeginTime; + private int iEndTime; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iPetId, 0); + os.write(this.sPetName, 1); + os.write(this.sPetAction, 2); + os.write(this.iFrame, 3); + os.write(this.iBeginTime, 4); + os.write(this.iEndTime, 5); + + } + + @Override + public void readFrom(TarsInputStream is) { + this.iPetId = is.read(this.iPetId, 0, false); + this.sPetName = is.read(this.sPetName, 1, false); + this.sPetAction = is.read(this.sPetAction, 2, false); + this.iFrame = is.read(this.iFrame, 3, false); + this.iBeginTime = is.read(this.iBeginTime, 4, false); + this.iEndTime = is.read(this.iEndTime, 5, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/PresenterChannelInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/PresenterChannelInfo.java new file mode 100644 index 0000000..0204bca --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/PresenterChannelInfo.java @@ -0,0 +1,82 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class PresenterChannelInfo extends TarsStructBase { + + private long lYYId; + private long lTid; + private long lSid; + private int iSourceType; + private int iScreenType; + private long lUid; + private int iGameId; + private int iRoomId; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lYYId, 0); + os.write(this.lTid, 1); + os.write(this.lSid, 3); + os.write(this.iSourceType, 4); + os.write(this.iScreenType, 5); + os.write(this.lUid, 6); + os.write(this.iGameId, 7); + os.write(this.iRoomId, 8); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lYYId = is.read(this.lYYId, 0, false); + this.lTid = is.read(this.lTid, 1, false); + this.lSid = is.read(this.lSid, 3, false); + this.iSourceType = is.read(this.iSourceType, 4, false); + this.iScreenType = is.read(this.iScreenType, 5, false); + this.lUid = is.read(this.lUid, 6, false); + this.iGameId = is.read(this.iGameId, 7, false); + this.iRoomId = is.read(this.iRoomId, 8, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/PropView.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/PropView.java new file mode 100644 index 0000000..d017b79 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/PropView.java @@ -0,0 +1,70 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class PropView extends TarsStructBase { + + private int id = 0; + private String name = ""; + private Map<Long, Short> uids = new HashMap<Long, Short>() {{ + put(-1L, (short) -1); + }}; + private String tips = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.id, 0); + os.write(this.name, 1); + os.write(this.uids, 2); + os.write(this.tips, 3); + } + + @Override + public void readFrom(TarsInputStream is) { + this.id = is.read(this.id, 0, true); + this.name = is.read(this.name, 1, true); + this.uids = is.readMap(this.uids, 2, true); + this.tips = is.read(this.tips, 3, true); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/PropsIdentity.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/PropsIdentity.java new file mode 100644 index 0000000..ee1dba6 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/PropsIdentity.java @@ -0,0 +1,125 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class PropsIdentity extends TarsStructBase { + + private int iPropsIdType = 0; + private String sPropsPic18 = ""; + private String sPropsPic24 = ""; + private String sPropsPicGif = ""; + private String sPropsBannerResource = ""; + private String sPropsBannerSize = ""; + private String sPropsBannerMaxTime = ""; + private String sPropsChatBannerResource = ""; + private String sPropsChatBannerSize = ""; + private String sPropsChatBannerMaxTime = ""; + private int iPropsChatBannerPos = 0; + private int iPropsChatBannerIsCombo = 0; + private String sPropsRollContent = ""; + private int iPropsBannerAnimationstyle = 0; + private String sPropFaceu = ""; + private String sPropH5Resource = ""; + private String sPropsWeb = ""; + private int sWitch = 0; + private String sCornerMark = ""; + private int iPropViewId = 0; + private String sPropStreamerResource = ""; + private short iStreamerFrameRate = 0; + private String sPropsPic108 = ""; + private String sPcBannerResource = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iPropsIdType, 1); + os.write(this.sPropsPic18, 2); + os.write(this.sPropsPic24, 3); + os.write(this.sPropsPicGif, 4); + os.write(this.sPropsBannerResource, 5); + os.write(this.sPropsBannerSize, 6); + os.write(this.sPropsBannerMaxTime, 7); + os.write(this.sPropsChatBannerResource, 8); + os.write(this.sPropsChatBannerSize, 9); + os.write(this.sPropsChatBannerMaxTime, 10); + os.write(this.iPropsChatBannerPos, 11); + os.write(this.iPropsChatBannerIsCombo, 12); + os.write(this.sPropsRollContent, 13); + os.write(this.iPropsBannerAnimationstyle, 14); + os.write(this.sPropFaceu, 15); + os.write(this.sPropH5Resource, 16); + os.write(this.sPropsWeb, 17); + os.write(this.sWitch, 18); + os.write(this.sCornerMark, 19); + os.write(this.iPropViewId, 20); + os.write(this.sPropStreamerResource, 21); + os.write(this.iStreamerFrameRate, 22); + os.write(this.sPropsPic108, 23); + os.write(this.sPcBannerResource, 24); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iPropsIdType = is.read(this.iPropsIdType, 1, true); + this.sPropsPic18 = is.read(this.sPropsPic18, 2, true); + this.sPropsPic24 = is.read(this.sPropsPic24, 3, true); + this.sPropsPicGif = is.read(this.sPropsPicGif, 4, true); + this.sPropsBannerResource = is.read(this.sPropsBannerResource, 5, true); + this.sPropsBannerSize = is.read(this.sPropsBannerSize, 6, true); + this.sPropsBannerMaxTime = is.read(this.sPropsBannerMaxTime, 7, true); + this.sPropsChatBannerResource = is.read(this.sPropsChatBannerResource, 8, true); + this.sPropsChatBannerSize = is.read(this.sPropsChatBannerSize, 9, true); + this.sPropsChatBannerMaxTime = is.read(this.sPropsChatBannerMaxTime, 10, true); + this.iPropsChatBannerPos = is.read(this.iPropsChatBannerPos, 11, true); + this.iPropsChatBannerIsCombo = is.read(this.iPropsChatBannerIsCombo, 12, true); + this.sPropsRollContent = is.read(this.sPropsRollContent, 13, true); + this.iPropsBannerAnimationstyle = is.read(this.iPropsBannerAnimationstyle, 14, true); + this.sPropFaceu = is.read(this.sPropFaceu, 15, true); + this.sPropH5Resource = is.read(this.sPropH5Resource, 16, true); + this.sPropsWeb = is.read(this.sPropsWeb, 17, true); + this.sWitch = is.read(this.sWitch, 18, true); + this.sCornerMark = is.read(this.sCornerMark, 19, true); + this.iPropViewId = is.read(this.iPropViewId, 20, true); + this.sPropStreamerResource = is.read(this.sPropStreamerResource, 21, true); + this.iStreamerFrameRate = is.read(this.iStreamerFrameRate, 22, true); + this.sPropsPic108 = is.read(this.sPropsPic108, 23, true); + this.sPcBannerResource = is.read(this.sPcBannerResource, 24, true); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/PropsItem.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/PropsItem.java new file mode 100644 index 0000000..0c53ad4 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/PropsItem.java @@ -0,0 +1,181 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class PropsItem extends TarsStructBase { + + public static final PropsItem DEFAULT = new PropsItem() {{ + setSPropsName("鏈煡绀肩墿"); + setIPropsYb(-1); + }}; + + private int iPropsId = 0; + private String sPropsName = ""; + private int iPropsYb = 0; + private int iPropsGreenBean = 0; + private int iPropsWhiteBean = 0; + private int iPropsGoldenBean = 0; + private int iPropsRed = 0; + private int iPropsPopular = 0; + private int iPropsExpendNum = -1; + private int iPropsFansValue = -1; + private List<Integer> vPropsNum = new ArrayList<Integer>() {{ + add(-1); + }}; + private int iPropsMaxNum = 0; + private int iPropsBatterFlag = 0; + private List<Integer> vPropsChannel = new ArrayList<Integer>() {{ + add(-1); + }}; + private String sPropsToolTip = ""; + private List<PropsIdentity> vPropsIdentity = new ArrayList<PropsIdentity>() {{ + add(new PropsIdentity()); + }}; + private int iPropsWeights = 0; + private int iPropsLevel = 0; + private DisplayInfo tDisplayInfo = new DisplayInfo(); + private SpecialInfo tSpecialInfo = new SpecialInfo(); + private int iPropsGrade = 0; + private int iPropsGroupNum = 0; + private String sPropsCommBannerResource = ""; + private String sPropsOwnBannerResource = ""; + private int iPropsShowFlag = 0; + private int iTemplateType = 0; + private int iShelfStatus = 0; + private String sAndroidLogo = ""; + private String sIpadLogo = ""; + private String sIphoneLogo = ""; + private String sPropsCommBannerResourceEx = ""; + private String sPropsOwnBannerResourceEx = ""; + private List<Long> vPresenterUid = new ArrayList<Long>() {{ + add(-1L); + }}; + private List<PropView> vPropView = new ArrayList<PropView>() {{ + add(new PropView()); + }}; + private short iFaceUSwitch = 0; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iPropsId, 1); + os.write(this.sPropsName, 2); + os.write(this.iPropsYb, 3); + os.write(this.iPropsGreenBean, 4); + os.write(this.iPropsWhiteBean, 5); + os.write(this.iPropsGoldenBean, 6); + os.write(this.iPropsRed, 7); + os.write(this.iPropsPopular, 8); + os.write(this.iPropsExpendNum, 9); + os.write(this.iPropsFansValue, 10); + os.write(this.vPropsNum, 11); + os.write(this.iPropsMaxNum, 12); + os.write(this.iPropsBatterFlag, 13); + os.write(this.vPropsChannel, 14); + os.write(this.sPropsToolTip, 15); + os.write(this.vPropsIdentity, 16); + os.write(this.iPropsWeights, 17); + os.write(this.iPropsLevel, 18); + os.write(this.tDisplayInfo, 19); + os.write(this.tSpecialInfo, 20); + os.write(this.iPropsGrade, 21); + os.write(this.iPropsGroupNum, 22); + os.write(this.sPropsCommBannerResource, 23); + os.write(this.sPropsOwnBannerResource, 24); + os.write(this.iPropsShowFlag, 25); + os.write(this.iTemplateType, 26); + os.write(this.iShelfStatus, 27); + os.write(this.sAndroidLogo, 28); + os.write(this.sIpadLogo, 29); + os.write(this.sIphoneLogo, 30); + os.write(this.sPropsCommBannerResourceEx, 31); + os.write(this.sPropsOwnBannerResourceEx, 32); + os.write(this.vPresenterUid, 33); + os.write(this.vPropView, 34); + os.write(this.iFaceUSwitch, 35); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iPropsId = is.read(this.iPropsId, 1, true); + this.sPropsName = is.read(this.sPropsName, 2, true); + this.iPropsYb = is.read(this.iPropsYb, 3, true); + this.iPropsGreenBean = is.read(this.iPropsGreenBean, 4, true); + this.iPropsWhiteBean = is.read(this.iPropsWhiteBean, 5, true); + this.iPropsGoldenBean = is.read(this.iPropsGoldenBean, 6, true); + this.iPropsRed = is.read(this.iPropsRed, 7, true); + this.iPropsPopular = is.read(this.iPropsPopular, 8, true); + this.iPropsExpendNum = is.read(this.iPropsExpendNum, 9, true); + this.iPropsFansValue = is.read(this.iPropsFansValue, 10, true); + this.vPropsNum = is.readArray(this.vPropsNum, 11, true); + this.iPropsMaxNum = is.read(this.iPropsMaxNum, 12, true); + this.iPropsBatterFlag = is.read(this.iPropsBatterFlag, 13, true); + this.vPropsChannel = is.readArray(this.vPropsChannel, 14, true); + this.sPropsToolTip = is.read(this.sPropsToolTip, 15, true); + this.vPropsIdentity = is.readArray(this.vPropsIdentity, 16, true); + this.iPropsWeights = is.read(this.iPropsWeights, 17, true); + this.iPropsLevel = is.read(this.iPropsLevel, 18, true); + this.tDisplayInfo = (DisplayInfo) is.directRead(this.tDisplayInfo, 19, true); + this.tSpecialInfo = (SpecialInfo) is.directRead(this.tSpecialInfo, 20, true); + this.iPropsGrade = is.read(this.iPropsGrade, 21, true); + this.iPropsGroupNum = is.read(this.iPropsGroupNum, 22, true); + this.sPropsCommBannerResource = is.read(this.sPropsCommBannerResource, 23, true); + this.sPropsOwnBannerResource = is.read(this.sPropsOwnBannerResource, 24, true); + this.iPropsShowFlag = is.read(this.iPropsShowFlag, 25, true); + this.iTemplateType = is.read(this.iTemplateType, 26, true); + this.iShelfStatus = is.read(this.iShelfStatus, 27, true); + this.sAndroidLogo = is.read(this.sAndroidLogo, 28, true); + this.sIpadLogo = is.read(this.sIpadLogo, 29, true); + this.sIphoneLogo = is.read(this.sIphoneLogo, 30, true); + this.sPropsCommBannerResourceEx = is.read(this.sPropsCommBannerResourceEx, 31, true); + this.sPropsOwnBannerResourceEx = is.read(this.sPropsOwnBannerResourceEx, 32, true); + this.vPresenterUid = is.readArray(this.vPresenterUid, 33, true); + this.vPropView = is.readArray(this.vPropView, 34, true); + this.iFaceUSwitch = is.read(this.iFaceUSwitch, 35, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/SendMessageFormat.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/SendMessageFormat.java new file mode 100644 index 0000000..a35a686 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/SendMessageFormat.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SendMessageFormat extends TarsStructBase { + + private int iSenceType; + private long lFormatId; + private long lSizeTemplateId; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iSenceType, 0); + os.write(this.lFormatId, 1); + os.write(this.lSizeTemplateId, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iSenceType = is.read(this.iSenceType, 0, false); + this.lFormatId = is.read(this.lFormatId, 1, false); + this.lSizeTemplateId = is.read(this.lSizeTemplateId, 2, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/SenderInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/SenderInfo.java new file mode 100644 index 0000000..79ef4a5 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/SenderInfo.java @@ -0,0 +1,85 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SenderInfo extends TarsStructBase { + + private long lUid; + private long lImid; + private String sNickName = ""; + private int iGender; + private String sAvatarUrl; + private int iNobleLevel; + private NobleLevelInfo tNobleLevelInfo = new NobleLevelInfo(); + private String sGuid; + private String sHuYaUA; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.lImid, 1); + os.write(this.sNickName, 2); + os.write(this.iGender, 3); + os.write(this.sAvatarUrl, 4); + os.write(this.iNobleLevel, 5); + os.write(this.tNobleLevelInfo, 6); + os.write(this.sGuid, 7); + os.write(this.sHuYaUA, 8); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, true); + this.lImid = is.read(this.lImid, 1, true); + this.sNickName = is.read(this.sNickName, 2, true); + this.iGender = is.read(this.iGender, 3, true); + this.sAvatarUrl = is.read(this.sAvatarUrl, 4, true); + this.iNobleLevel = is.read(this.iNobleLevel, 5, true); + this.tNobleLevelInfo = (NobleLevelInfo) is.directRead(this.tNobleLevelInfo, 6, true); + this.sGuid = is.read(this.sGuid, 7, true); + this.sHuYaUA = is.read(this.sHuYaUA, 8, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/SpecialInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/SpecialInfo.java new file mode 100644 index 0000000..055914c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/SpecialInfo.java @@ -0,0 +1,91 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SpecialInfo extends TarsStructBase { + + private int iFirstSingle = 0; + private int iFirstGroup = 0; + private String sFirstTips = ""; + private int iSecondSingle = 0; + private int iSecondGroup = 0; + private String sSecondTips = ""; + private int iThirdSingle = 0; + private int iThirdGroup = 0; + private String sThirdTips = ""; + private int iWorldSingle = 0; + private int iWorldGroup = 0; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.iFirstSingle, 1); + os.write(this.iFirstGroup, 2); + os.write(this.sFirstTips, 3); + os.write(this.iSecondSingle, 4); + os.write(this.iSecondGroup, 5); + os.write(this.sSecondTips, 6); + os.write(this.iThirdSingle, 7); + os.write(this.iThirdGroup, 8); + os.write(this.sThirdTips, 9); + os.write(this.iWorldSingle, 10); + os.write(this.iWorldGroup, 11); + } + + @Override + public void readFrom(TarsInputStream is) { + this.iFirstSingle = is.read(this.iFirstSingle, 1, true); + this.iFirstGroup = is.read(this.iFirstGroup, 2, true); + this.sFirstTips = is.read(this.sFirstTips, 3, true); + this.iSecondSingle = is.read(this.iSecondSingle, 4, true); + this.iSecondGroup = is.read(this.iSecondGroup, 5, true); + this.sSecondTips = is.read(this.sSecondTips, 6, true); + this.iThirdSingle = is.read(this.iThirdSingle, 7, true); + this.iThirdGroup = is.read(this.iThirdGroup, 8, true); + this.sThirdTips = is.read(this.sThirdTips, 9, true); + this.iWorldSingle = is.read(this.iWorldSingle, 10, true); + this.iWorldGroup = is.read(this.iWorldGroup, 11, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/SuperFansInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/SuperFansInfo.java new file mode 100644 index 0000000..cd1bd7a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/SuperFansInfo.java @@ -0,0 +1,76 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SuperFansInfo extends TarsStructBase { + + private long lSFExpiredTS; + private int iSFFlag; + private long lSFAnnualTS; + private int iSFVariety; + private long lOpenTS; + private long lMemoryDay; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lSFExpiredTS, 0); + os.write(this.iSFFlag, 1); + os.write(this.lSFAnnualTS, 2); + os.write(this.iSFVariety, 3); + os.write(this.lOpenTS, 4); + os.write(this.lMemoryDay, 5); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lSFExpiredTS = is.read(this.lSFExpiredTS, 0, false); + this.iSFFlag = is.read(this.iSFFlag, 1, false); + this.lSFAnnualTS = is.read(this.lSFAnnualTS, 2, false); + this.iSFVariety = is.read(this.iSFVariety, 3, false); + this.lOpenTS = is.read(this.lOpenTS, 4, false); + this.lMemoryDay = is.read(this.lMemoryDay, 5, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/UidNickName.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/UidNickName.java new file mode 100644 index 0000000..8f36cc1 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/UidNickName.java @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class UidNickName extends TarsStructBase { + + private long lUid = 0; + private String sNickName = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.sNickName, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, true); + this.sNickName = is.read(this.sNickName, 1, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/UserId.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/UserId.java new file mode 100644 index 0000000..56faee8 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/UserId.java @@ -0,0 +1,80 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class UserId extends TarsStructBase { + + private long lUid; + private String sGuid = ""; + private String sToken = ""; + private String sHuYaUA = ""; + private String sCookie = ""; + private int iTokenType; + private String sDeviceInfo = ""; + + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.sGuid, 1); + os.write(this.sToken, 2); + os.write(this.sHuYaUA, 3); + os.write(this.sCookie, 4); + os.write(this.iTokenType, 5); + os.write(this.sDeviceInfo, 6); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, true); + this.sGuid = is.read(this.sGuid, 1, true); + this.sToken = is.read(this.sToken, 2, true); + this.sHuYaUA = is.read(this.sHuYaUA, 3, true); + this.sCookie = is.read(this.sCookie, 4, true); + this.iTokenType = is.read(this.iTokenType, 5, true); + this.sDeviceInfo = is.read(this.sDeviceInfo, 6, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/UserIdentityInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/UserIdentityInfo.java new file mode 100644 index 0000000..813943d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/UserIdentityInfo.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/10 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class UserIdentityInfo extends TarsStructBase { + + private List<DecorationInfo> vDecorationPrefix = CollUtil.newArrayList(new DecorationInfo()); + private List<DecorationInfo> vDecorationSuffix = CollUtil.newArrayList(new DecorationInfo()); + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.vDecorationPrefix, 0); + os.write(this.vDecorationSuffix, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.vDecorationPrefix = is.readArray(this.vDecorationPrefix, 0, false); + this.vDecorationSuffix = is.readArray(this.vDecorationSuffix, 1, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/UserRidePetInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/UserRidePetInfo.java new file mode 100644 index 0000000..f74bb5a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/UserRidePetInfo.java @@ -0,0 +1,94 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class UserRidePetInfo extends TarsStructBase { + + private long lPetId; + private String sPetName = ""; + private String sPetAction = ""; + private int iPetFlag; + private int iWeight; + private int iRideFlag; + private long lBeginTs; + private long lEndTs; + private int iSourceType; + private int iPetType; + private Map<String, String> mPetDetail = new HashMap<>(); + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lPetId, 0); + os.write(this.sPetName, 1); + os.write(this.sPetAction, 2); + os.write(this.iPetFlag, 3); + os.write(this.iWeight, 4); + os.write(this.iRideFlag, 5); + os.write(this.lBeginTs, 6); + os.write(this.lEndTs, 7); + os.write(this.iSourceType, 8); + os.write(this.iPetType, 9); + os.write(this.mPetDetail, 10); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lPetId = is.read(this.lPetId, 0, false); + this.sPetName = is.read(this.sPetName, 1, false); + this.sPetAction = is.read(this.sPetAction, 2, false); + this.iPetFlag = is.read(this.iPetFlag, 3, false); + this.iWeight = is.read(this.iWeight, 4, false); + this.iRideFlag = is.read(this.iRideFlag, 5, false); + this.lBeginTs = is.read(this.lBeginTs, 6, false); + this.lEndTs = is.read(this.lEndTs, 7, false); + this.iSourceType = is.read(this.iSourceType, 8, false); + this.iPetType = is.read(this.iPetType, 9, false); + this.mPetDetail = is.readMap(this.mPetDetail, 10, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/WeekRankInfo.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/WeekRankInfo.java new file mode 100644 index 0000000..501273d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/dto/WeekRankInfo.java @@ -0,0 +1,64 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.dto; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/12/27 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class WeekRankInfo extends TarsStructBase { + + private long lUid; + private int iRank; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.iRank, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, false); + this.iRank = is.read(this.iRank, 1, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/GetLivingInfoReq.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/GetLivingInfoReq.java new file mode 100644 index 0000000..81a7b3c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/GetLivingInfoReq.java @@ -0,0 +1,86 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.req; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.UserId; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class GetLivingInfoReq extends TarsStructBase { + + private UserId tId = new UserId(); + private long lTopSid; + private long lSubSid; + private long lPresenterUid; + private String sTraceSource = ""; + private String sPassword = ""; + private long iRoomId; + private int iFreeFlowFlag; + private int iIpStack; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.tId, 0); + os.write(this.lTopSid, 1); + os.write(this.lSubSid, 2); + os.write(this.lPresenterUid, 3); + os.write(this.sTraceSource, 4); + os.write(this.sPassword, 5); + os.write(this.iRoomId, 6); + os.write(this.iFreeFlowFlag, 7); + os.write(this.iIpStack, 8); + } + + @Override + public void readFrom(TarsInputStream is) { + this.tId = (UserId) is.directRead(this.tId, 0, false); + this.lTopSid = is.read(this.lTopSid, 1, false); + this.lSubSid = is.read(this.lSubSid, 2, false); + this.lPresenterUid = is.read(this.lPresenterUid, 3, false); + this.sTraceSource = is.read(this.sTraceSource, 4, false); + this.sPassword = is.read(this.sPassword, 5, false); + this.iRoomId = is.read(this.iRoomId, 6, false); + this.iFreeFlowFlag = is.read(this.iFreeFlowFlag, 7, false); + this.iIpStack = is.read(this.iIpStack, 8, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/GetPropsListReq.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/GetPropsListReq.java new file mode 100644 index 0000000..e619dc3 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/GetPropsListReq.java @@ -0,0 +1,83 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.req; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.UserId; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class GetPropsListReq extends TarsStructBase { + + private UserId tUserId = new UserId(); + private String sMd5 = ""; + private int iTemplateType; + private String sVersion = ""; + private int iAppId; + private long lPresenterUid; + private long lSid; + private long lSubSid; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.tUserId, 1); + os.write(this.sMd5, 2); + os.write(this.iTemplateType, 3); + os.write(this.sVersion, 4); + os.write(this.iAppId, 5); + os.write(this.lPresenterUid, 6); + os.write(this.lSid, 7); + os.write(this.lSubSid, 8); + } + + @Override + public void readFrom(TarsInputStream is) { + is.read(this.tUserId, 1, true); + is.read(this.sMd5, 2, true); + is.read(this.iTemplateType, 3, true); + is.read(this.sVersion, 4, true); + is.read(this.iAppId, 5, true); + is.read(this.lPresenterUid, 6, true); + is.read(this.lSid, 7, true); + is.read(this.lSubSid, 8, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/GetPropsListRsp.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/GetPropsListRsp.java new file mode 100644 index 0000000..afc55ed --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/GetPropsListRsp.java @@ -0,0 +1,79 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.req; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.PropsItem; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author mjz + * @date 2023/10/3 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class GetPropsListRsp extends TarsStructBase { + + private List<PropsItem> vPropsItemList = new ArrayList<PropsItem>() {{ + add(new PropsItem()); + }}; + private String sMd5 = ""; + private short iNewEffectSwitch = 0; + private short iMirrorRoomShowNum = 0; + private short iGameRoomShowNum = 0; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.vPropsItemList, 1); + os.write(this.sMd5, 2); + os.write(this.iNewEffectSwitch, 3); + os.write(this.iMirrorRoomShowNum, 4); + os.write(this.iGameRoomShowNum, 5); + } + + @Override + public void readFrom(TarsInputStream is) { + this.vPropsItemList = is.readArray(this.vPropsItemList, 1, true); + this.sMd5 = is.read(this.sMd5, 2, true); + this.iNewEffectSwitch = is.read(this.iNewEffectSwitch, 3, true); + this.iMirrorRoomShowNum = is.read(this.iMirrorRoomShowNum, 4, true); + this.iGameRoomShowNum = is.read(this.iGameRoomShowNum, 5, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/LaunchReq.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/LaunchReq.java new file mode 100644 index 0000000..eaad983 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/LaunchReq.java @@ -0,0 +1,74 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.req; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.DeviceInfo; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class LaunchReq extends TarsStructBase { + + private long lUid; + private String sGuid = ""; + private String sUA = ""; + private String sAppSrc = ""; + private DeviceInfo tDeviceInfo = new DeviceInfo(); + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.sGuid, 1); + os.write(this.sUA, 2); + os.write(this.sAppSrc, 3); + os.write(this.tDeviceInfo, 4); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, false); + this.sGuid = is.read(this.sGuid, 1, false); + this.sUA = is.read(this.sUA, 2, false); + this.sAppSrc = is.read(this.sAppSrc, 3, false); + this.tDeviceInfo = (DeviceInfo) is.directRead(this.tDeviceInfo, 4, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/LiveLaunchReq.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/LiveLaunchReq.java new file mode 100644 index 0000000..1c4ccd8 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/LiveLaunchReq.java @@ -0,0 +1,69 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.req; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.LiveUserbase; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.UserId; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class LiveLaunchReq extends TarsStructBase { + + private UserId tId = new UserId(); + private LiveUserbase tLiveUB = new LiveUserbase(); + private boolean bSupportDomain; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.tId, 0); + os.write(this.tLiveUB, 1); + os.write(this.bSupportDomain, 2); + } + + @Override + public void readFrom(TarsInputStream is) { + this.tId = (UserId) is.directRead(this.tId, 0, false); + this.tLiveUB = (LiveUserbase) is.directRead(this.tLiveUB, 1, false); + this.bSupportDomain = is.read(this.bSupportDomain, 2, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/RegisterGroupReq.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/RegisterGroupReq.java new file mode 100644 index 0000000..bcb5b24 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/RegisterGroupReq.java @@ -0,0 +1,67 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.req; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class RegisterGroupReq extends TarsStructBase { + + private List<String> vGroupId = CollUtil.newArrayList(""); + private String sToken = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.vGroupId, 0); + os.write(this.sToken, 1); + } + + @Override + public void readFrom(TarsInputStream is) { + this.vGroupId = is.readArray(this.vGroupId, 0, true); + this.sToken = is.read(this.sToken, 1, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/SendMessageReq.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/SendMessageReq.java new file mode 100644 index 0000000..d21ebbd --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/SendMessageReq.java @@ -0,0 +1,99 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.req; + +import cn.hutool.core.collection.CollUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.*; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class SendMessageReq extends TarsStructBase { + + private UserId tUserId = new UserId(); + private long lTid; + private long lSid; + private String sContent = ""; + private int iShowMode; + private ContentFormat tFormat = new ContentFormat(); + private BulletFormat tBulletFormat = new BulletFormat(); + private List<UidNickName> vAtSomeone; + private long lPid; + private List<MessageTagInfo> vTagInfo = CollUtil.newArrayList(new MessageTagInfo()); + private SendMessageFormat tSenceFormat = new SendMessageFormat(); + private int iMessageMode; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.tUserId, 0); + os.write(this.lTid, 1); + os.write(this.lSid, 2); + os.write(this.sContent, 3); + os.write(this.iShowMode, 4); + os.write(this.tFormat, 5); + os.write(this.tBulletFormat, 6); + os.write(this.vAtSomeone, 7); + os.write(this.lPid, 8); + os.write(this.vTagInfo, 9); + os.write(this.tSenceFormat, 10); + os.write(this.iMessageMode, 11); + + } + + @Override + public void readFrom(TarsInputStream is) { + this.tUserId = (UserId) is.directRead(this.tUserId, 0, false); + this.lTid = is.read(this.lTid, 1, false); + this.lSid = is.read(this.lSid, 2, false); + this.sContent = is.read(this.sContent, 3, false); + this.iShowMode = is.read(this.iShowMode, 4, false); + this.tFormat = (ContentFormat) is.directRead(this.tFormat, 5, false); + this.tBulletFormat = (BulletFormat) is.directRead(this.tBulletFormat, 6, false); + this.vAtSomeone = is.readArray(this.vAtSomeone, 7, false); + this.lPid = is.read(this.lPid, 8, false); + this.vTagInfo = is.readArray(this.vTagInfo, 9, false); + this.tSenceFormat = (SendMessageFormat) is.directRead(this.tSenceFormat, 10, false); + this.iMessageMode = is.read(this.iMessageMode, 11, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/UpdateUserInfoReq.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/UpdateUserInfoReq.java new file mode 100644 index 0000000..0a621f9 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/UpdateUserInfoReq.java @@ -0,0 +1,87 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.req; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.MsgStatInfo; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class UpdateUserInfoReq extends TarsStructBase { + + private String sAppSrc = ""; + private String sGuid = ""; + private int iReportMsgIdRatio; + private int iSupportAck; + private MsgStatInfo tWSMsgStatInfo = new MsgStatInfo(); + private Map<String, String> mCustomHeader = new HashMap<>(); + private int iMsgDegradeLevel; + + public UpdateUserInfoReq(TarsInputStream is) { + this.readFrom(is); + } + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.sAppSrc, 0); + os.write(this.sGuid, 1); + os.write(this.iReportMsgIdRatio, 2); + os.write(this.iSupportAck, 3); + os.write(this.tWSMsgStatInfo, 6); + os.write(this.mCustomHeader, 7); + os.write(this.iMsgDegradeLevel, 8); + } + + @Override + public void readFrom(TarsInputStream is) { + this.sAppSrc = is.read(this.sAppSrc, 0, true); + this.sGuid = is.read(this.sGuid, 1, true); + this.iReportMsgIdRatio = is.read(this.iReportMsgIdRatio, 2, true); + this.iSupportAck = is.read(this.iSupportAck, 3, true); + this.tWSMsgStatInfo = (MsgStatInfo) is.directRead(this.tWSMsgStatInfo, 6, true); + this.mCustomHeader = is.readStringMap( 7, true); + this.iMsgDegradeLevel = is.read(this.iMsgDegradeLevel, 8, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/UserHeartBeatReq.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/UserHeartBeatReq.java new file mode 100644 index 0000000..a029366 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/UserHeartBeatReq.java @@ -0,0 +1,90 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.req; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.UserId; + +/** + * @author mjz + * @date 2023/10/2 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class UserHeartBeatReq extends TarsStructBase { + + private UserId tId = new UserId(); + private long lTid; + private long lSid; + private long lPid; + private boolean bWatchVideo; + private int eLineType; + private int iFps; + private int iAttendee; + private int iBandwidth; + private int iLastHeartElapseTime; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.tId, 0); + os.write(this.lTid, 1); + os.write(this.lSid, 2); + os.write(this.lPid, 4); + os.write(this.bWatchVideo, 5); + os.write(this.eLineType, 6); + os.write(this.iFps, 7); + os.write(this.iAttendee, 8); + os.write(this.iBandwidth, 9); + os.write(this.iLastHeartElapseTime, 10); + + } + + @Override + public void readFrom(TarsInputStream is) { + this.tId = (UserId) is.directRead(this.tId, 0, false); + this.lTid = is.read(this.lTid, 1, false); + this.lSid = is.read(this.lSid, 2, false); + this.lPid = is.read(this.lPid, 4, false); + this.bWatchVideo = is.read(this.bWatchVideo, 5, false); + this.eLineType = is.read(this.eLineType, 6, false); + this.iFps = is.read(this.iFps, 7, false); + this.iAttendee = is.read(this.iAttendee, 8, false); + this.iBandwidth = is.read(this.iBandwidth, 9, false); + this.iLastHeartElapseTime = is.read(this.iLastHeartElapseTime, 10, false); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/VerifyCookieReq.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/VerifyCookieReq.java new file mode 100644 index 0000000..cea49cc --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/VerifyCookieReq.java @@ -0,0 +1,76 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.req; + +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsOutputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @author mjz + * @date 2023/10/5 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class VerifyCookieReq extends TarsStructBase { + + private long lUid; + private String sUA = ""; + private String sCookie = ""; + private String sGuid = ""; + private int bAutoRegisterUid; + private String sAppSrc = ""; + + @Override + public void writeTo(TarsOutputStream os) { + os.write(this.lUid, 0); + os.write(this.sUA, 1); + os.write(this.sCookie, 2); + os.write(this.sGuid, 3); + os.write(this.bAutoRegisterUid, 4); + os.write(this.sAppSrc, 5); + } + + @Override + public void readFrom(TarsInputStream is) { + this.lUid = is.read(this.lUid, 0, true); + this.sUA = is.read(this.sUA, 1, true); + this.sCookie = is.read(this.sCookie, 2, true); + this.sGuid = is.read(this.sGuid, 3, true); + this.bAutoRegisterUid = is.read(this.bAutoRegisterUid, 4, true); + this.sAppSrc = is.read(this.sAppSrc, 5, true); + } + + @Override + public TarsStructBase newInit() { + return this; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/WupReq.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/WupReq.java new file mode 100644 index 0000000..90fe256 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/msg/req/WupReq.java @@ -0,0 +1,42 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.msg.req; + +import lombok.NoArgsConstructor; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.huya.msg.BaseWup; + +/** + * @author mjz + * @date 2023/10/3 + */ +@NoArgsConstructor +public class WupReq extends BaseWup { + + @Override + public HuyaOperationEnum getOperationEnum() { + return HuyaOperationEnum.EWSCmd_WupReq; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/frame/factory/HuyaWebSocketFrameFactory.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/frame/factory/HuyaWebSocketFrameFactory.java new file mode 100644 index 0000000..2c21b34 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/frame/factory/HuyaWebSocketFrameFactory.java @@ -0,0 +1,271 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.netty.frame.factory; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.StrUtil; +import com.fasterxml.jackson.databind.JsonNode; +import io.netty.buffer.Unpooled; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatCookieUtil; +import tech.ordinaryroad.live.chat.client.huya.api.HuyaApis; +import tech.ordinaryroad.live.chat.client.huya.config.HuyaLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaClientTemplateTypeEnum; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaLiveSource; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaWupFunctionEnum; +import tech.ordinaryroad.live.chat.client.huya.msg.WebSocketCommand; +import tech.ordinaryroad.live.chat.client.huya.msg.req.*; +import tech.ordinaryroad.live.chat.client.huya.util.HuyaCodecUtil; + +import java.util.concurrent.ConcurrentHashMap; + +/** + * @author mjz + * @date 2023/1/5 + */ +public class HuyaWebSocketFrameFactory { + + private static final ConcurrentHashMap<Object, HuyaWebSocketFrameFactory> CACHE = new ConcurrentHashMap<>(); + public static final String KEY_COOKIE_GUID = "guid"; + public static final String KEY_COOKIE_YYUID = "yyuid"; + + /** + * 娴忚鍣ㄥ湴鍧�涓殑鎴块棿id锛屾敮鎸佺煭id + */ + private final Object roomId; + private final JsonNode roomInfo; + private volatile static byte[] heartbeatMsg; + private volatile static byte[] giftListReqMsg; + + public HuyaWebSocketFrameFactory(Object roomId) { + this.roomId = roomId; + this.roomInfo = HuyaApis.roomInit(roomId); + } + + public synchronized static HuyaWebSocketFrameFactory getInstance(Object roomId) { + return CACHE.computeIfAbsent(roomId, aLong -> new HuyaWebSocketFrameFactory(roomId)); + } + + /** + * 鍒涘缓寮瑰箷鍖� + * + * @param msg 寮瑰箷鍐呭 + * @param ver {@link HuyaLiveChatClientConfig#getVer()} + * @param cookie {@link HuyaLiveChatClientConfig#getCookie()} ()} + * @return BinaryWebSocketFrame + */ + public BinaryWebSocketFrame createSendMessageReq(String msg, String ver, String cookie) { + String yyuid = OrLiveChatCookieUtil.getCookieByName(cookie, KEY_COOKIE_YYUID, () -> { + throw new BaseException("cookie涓己灏戝弬鏁�" + KEY_COOKIE_YYUID); + }); + String guid = OrLiveChatCookieUtil.getCookieByName(cookie, KEY_COOKIE_GUID, () -> { + throw new BaseException("cookie涓己灏戝弬鏁�" + KEY_COOKIE_GUID); + }); + SendMessageReq sendMessageReq = new SendMessageReq(); + sendMessageReq.getTUserId().setLUid(NumberUtil.parseLong(yyuid)); + sendMessageReq.getTUserId().setSGuid(guid); + sendMessageReq.getTUserId().setSHuYaUA("webh5&" + ver + "&websocket"); + sendMessageReq.getTUserId().setSCookie(cookie); + sendMessageReq.getTUserId().setSDeviceInfo("chrome"); + sendMessageReq.setSContent(msg); + sendMessageReq.setLPid(roomInfo.get("lChannelId").asLong()); + + WupReq wupReq = new WupReq(); + wupReq.getTarsServantRequest().setServantName("liveui"); + wupReq.getTarsServantRequest().setFunctionName("sendMessage"); + wupReq.getUniAttribute().put("tReq", sendMessageReq); + + WebSocketCommand webSocketCommand = new WebSocketCommand(); + webSocketCommand.setOperation(HuyaOperationEnum.EWSCmd_WupReq.getCode()); + webSocketCommand.setVData(wupReq.encode()); + return new BinaryWebSocketFrame(Unpooled.wrappedBuffer(webSocketCommand.toByteArray())); + } + + /** + * 鍒涘缓璁よ瘉鍖� + * 1. doLaunch + * 2. registerGroup + * 3. updateUserInfo + * + * @return AuthWebSocketFrame + */ + public BinaryWebSocketFrame createAuth(String ver, String cookie) { + // sFuncName + // getLivingInfo, huyaliveui + // getPresenterLiveScheduleInfo, presenterui + // doLaunch, liveui + // chat:1724691, live:1724691 + // getWebdbUserInfo, liveui + // OnUserHeartBeat, onlineuif +// try { +// UserInfo wsUserInfo = new UserInfo(); +// wsUserInfo.setLUid(roomInfo.get("lYyid").asLong()); +// wsUserInfo.setBAnonymous(roomInfo.get("lYyid").asLong() == 0); +// wsUserInfo.setLTid(roomInfo.get("lChannelId").asLong()); +// wsUserInfo.setLSid(roomInfo.get("lSubChannelId").asLong()); +// wsUserInfo.setLGroupId(roomInfo.get("lYyid").asLong()); +// wsUserInfo.setLGroupType(3); +// wsUserInfo.setSAppId(""); +// wsUserInfo.setSUA("webh5&%s&websocket".formatted(HuyaLiveChatClientConfig.VER)); +// +// WebSocketCommand webSocketCommand = new WebSocketCommand(); +// webSocketCommand.setOperation(HuyaOperationEnum.EWSCmd_RegisterReq.getCode()); +// webSocketCommand.setVData(wsUserInfo.toByteArray()); +// return new AuthWebSocketFrame(Unpooled.wrappedBuffer(webSocketCommand.toByteArray())); +// } catch (Exception e) { +// throw new BaseException("璁よ瘉鍖呭垱寤哄け璐ワ紝璇锋鏌ユ埧闂村彿鏄惁姝g‘銆俽oomId: %d, msg: %s".formatted(roomId, e.getMessage())); +// } + return createLiveLaunchReq(ver, cookie); + } + + public BinaryWebSocketFrame createGetLivingInfoReq(String ver, String cookie) { + GetLivingInfoReq getLivingInfoReq = new GetLivingInfoReq(); +// getLivingInfoReq.getTId().setSGuid("0a7dca72a3ce1b654001dd2ade2ae857"); + getLivingInfoReq.getTId().setSHuYaUA("webh5&" + ver + "&websocket"); + getLivingInfoReq.getTId().setSDeviceInfo("chrome"); + getLivingInfoReq.getTId().setSCookie(StrUtil.nullToEmpty(cookie)); +// getLivingInfoReq.getTId().setSCookie("vplayer_sbanner_1724691_1724691=1; SoundValue=0.50; alphaValue=0.80; game_did=R24J2g0mBzvdXJf7a9nheSl3zIci2BOp0-t; isInLiveRoom=true; guid=0a7dca72a3ce1b654001dd2ade2ae857; __yamid_tt1=0.8029935065011269; __yamid_new=CA75D4CD5C100001165B82B52140C900; guid=0a7dca72a3ce1b654001dd2ade2ae857; udb_guiddata=af5dbdbf76254a6e8a0a293ccae9b688; udb_deviceid=w_761623483861815296; udb_passdata=3; __yasmid=0.8029935065011269; _yasids=__rootsid%3DCA767045C1100001EC5A145C1E90FE00; Hm_lvt_51700b6c722f5bb4cf39906a596ea41f=1696473760,1696476745,1696483565,1696484212; Hm_lpvt_51700b6c722f5bb4cf39906a596ea41f=1696484212; huya_ua=webh5&0.0.1&activity; _rep_cnt=2; sdid=0UnHUgv0/qmfD4KAKlwzhqX98QrnPCcck6fN494iawS5Kmymgreu89o7gYta/QvQsBDeSeSRp4/grQ5fEuFAYrL59coAKuxuukiwgTLjfjEDWVkn9LtfFJw/Qo4kgKr8OZHDqNnuwg612sGyflFn1dkUeZYTToCzzl4GCHq7MUDahxGuPR8mUddfImFtjccs1; huya_flash_rep_cnt=74; huya_web_rep_cnt=125; rep_cnt=44"); + getLivingInfoReq.setLPresenterUid(roomInfo.get("lChannelId").asLong()); + + WupReq wupReq = new WupReq(); + wupReq.getTarsServantRequest().setServantName("huyaliveui"); + wupReq.getTarsServantRequest().setFunctionName("getLivingInfo"); + wupReq.getUniAttribute().put("tReq", getLivingInfoReq); + + WebSocketCommand webSocketCommand = new WebSocketCommand(); + webSocketCommand.setOperation(HuyaOperationEnum.EWSCmd_WupReq.getCode()); + webSocketCommand.setVData(wupReq.encode()); + return new BinaryWebSocketFrame(Unpooled.wrappedBuffer(webSocketCommand.toByteArray())); + } + + public BinaryWebSocketFrame createLiveLaunchReq(String ver, String cookie) { + LiveLaunchReq liveLaunchReq = new LiveLaunchReq(); + liveLaunchReq.setBSupportDomain(true); +// liveLaunchReq.getTId().setSGuid(UUID.fastUUID().toString(true)); + liveLaunchReq.getTId().setSHuYaUA("webh5&" + ver + "&websocket"); + liveLaunchReq.getTId().setSDeviceInfo("chrome"); + liveLaunchReq.getTId().setSCookie(StrUtil.nullToEmpty(cookie)); + liveLaunchReq.getTLiveUB().setESource(HuyaLiveSource.WEB_HUYA.getCode()); + + WupReq wupReq = new WupReq(); + wupReq.getTarsServantRequest().setServantName("liveui"); + wupReq.getTarsServantRequest().setFunctionName("doLaunch"); + wupReq.getUniAttribute().put("tReq", liveLaunchReq); + + WebSocketCommand webSocketCommand = new WebSocketCommand(); + webSocketCommand.setOperation(HuyaOperationEnum.EWSCmd_WupReq.getCode()); + webSocketCommand.setVData(wupReq.encode()); + return new BinaryWebSocketFrame(Unpooled.wrappedBuffer(webSocketCommand.toByteArray())); + } + + public BinaryWebSocketFrame createRegisterGroupReq() { + String lYyid = roomInfo.get("lChannelId").asText(); + + RegisterGroupReq registerGroupReq = new RegisterGroupReq(); + registerGroupReq.setVGroupId(CollUtil.newArrayList("live:" + lYyid, "chat:" + lYyid)); + + WebSocketCommand webSocketCommand = new WebSocketCommand(); + webSocketCommand.setOperation(HuyaOperationEnum.EWSCmdC2S_RegisterGroupReq.getCode()); + webSocketCommand.setVData(registerGroupReq.toByteArray()); + return new BinaryWebSocketFrame(Unpooled.wrappedBuffer(webSocketCommand.toByteArray())); + } + + public BinaryWebSocketFrame createUpdateUserInfoReq() { + UpdateUserInfoReq updateUserInfoReq = new UpdateUserInfoReq(); + updateUserInfoReq.setSAppSrc("HUYA&ZH&2052"); + updateUserInfoReq.getTWSMsgStatInfo().setISupportAckMsgStat(1); + + WebSocketCommand webSocketCommand = new WebSocketCommand(); + webSocketCommand.setOperation(HuyaOperationEnum.EWSCmdC2S_UpdateUserInfoReq.getCode()); + webSocketCommand.setVData(updateUserInfoReq.toByteArray()); + return new BinaryWebSocketFrame(Unpooled.wrappedBuffer(webSocketCommand.toByteArray())); + } + + /** + * 鍒涘缓鑾峰彇绀肩墿鍒楄〃璇锋眰鍖� + * + * @return BinaryWebSocketFrame + */ + public BinaryWebSocketFrame createGiftListReq(String ver) { + WebSocketCommand webSocketCommand = new WebSocketCommand(); + webSocketCommand.setOperation(HuyaOperationEnum.EWSCmd_WupReq.getCode()); + webSocketCommand.setVData(this.getGiftListReqMsg(ver)); + return new BinaryWebSocketFrame(Unpooled.wrappedBuffer(webSocketCommand.toByteArray())); + } + + public BinaryWebSocketFrame createHeartbeat(String ver, String cookie) { + WebSocketCommand webSocketCommand = new WebSocketCommand(); + webSocketCommand.setOperation(HuyaOperationEnum.EWSCmdC2S_HeartBeatReq.getCode()); + webSocketCommand.setVData(this.getHeartbeatMsg(ver, cookie)); + return new BinaryWebSocketFrame(Unpooled.wrappedBuffer(webSocketCommand.toByteArray())); + } + + /** + * 蹇冭烦鍖呭崟渚嬫ā寮� + */ + public byte[] getHeartbeatMsg(String ver, String cookie) { + if (heartbeatMsg == null) { + synchronized (HuyaWebSocketFrameFactory.this) { + if (heartbeatMsg == null) { + UserHeartBeatReq userHeartBeatReq = new UserHeartBeatReq(); +// userHeartBeatReq.getTId().setSGuid(""); + userHeartBeatReq.getTId().setSHuYaUA("webh5&" + ver + "&websocket"); + userHeartBeatReq.getTId().setSDeviceInfo("chrome"); + userHeartBeatReq.getTId().setSCookie(StrUtil.nullToEmpty(cookie)); +// userHeartBeatReq.setLSid(roomInfo.get("lSubChannelId").asLong()); + userHeartBeatReq.setLPid(roomInfo.get("lChannelId").asLong()); +// userHeartBeatReq.setELineType(HuyaStreamLineTypeEnum.STREAM_LINE_WS.getCode()); + userHeartBeatReq.setELineType(-1); + + heartbeatMsg = HuyaCodecUtil.encode("onlineui", HuyaWupFunctionEnum.OnUserHeartBeat, userHeartBeatReq); + } + } + } + return heartbeatMsg; + } + + /** + * 绀肩墿鍒楄〃璇锋眰鍖呭崟渚嬫ā寮� + */ + public byte[] getGiftListReqMsg(String ver) { + if (giftListReqMsg == null) { + synchronized (HuyaWebSocketFrameFactory.this) { + if (giftListReqMsg == null) { + GetPropsListReq getPropsListReq = new GetPropsListReq(); + getPropsListReq.getTUserId().setLUid(roomInfo.get("lYyid").asLong()); + getPropsListReq.getTUserId().setSHuYaUA("webh5&" + ver + "&websocket"); + getPropsListReq.setITemplateType(HuyaClientTemplateTypeEnum.TPL_MIRROR.getCode()); + + giftListReqMsg = HuyaCodecUtil.encode("PropsUIServer", HuyaWupFunctionEnum.getPropsList, getPropsListReq); + } + } + } + return giftListReqMsg; + } + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaBinaryFrameHandler.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaBinaryFrameHandler.java new file mode 100644 index 0000000..81a4f43 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaBinaryFrameHandler.java @@ -0,0 +1,199 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.netty.handler; + +import com.qq.tars.protocol.tars.TarsInputStream; +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.huya.api.HuyaApis; +import tech.ordinaryroad.live.chat.client.huya.client.HuyaLiveChatClient; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaCmdEnum; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaWupFunctionEnum; +import tech.ordinaryroad.live.chat.client.huya.listener.IHuyaMsgListener; +import tech.ordinaryroad.live.chat.client.huya.msg.*; +import tech.ordinaryroad.live.chat.client.huya.msg.base.IHuyaMsg; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.MsgItem; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.PropsItem; +import tech.ordinaryroad.live.chat.client.huya.msg.req.GetPropsListRsp; +import tech.ordinaryroad.live.chat.client.huya.netty.frame.factory.HuyaWebSocketFrameFactory; +import tech.ordinaryroad.live.chat.client.huya.util.HuyaCodecUtil; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientBinaryFrameHandler; + +import java.util.List; + + +/** + * 娑堟伅澶勭悊鍣� + * + * @author mjz + * @date 2023/9/5 + */ +@Slf4j +@ChannelHandler.Sharable +public class HuyaBinaryFrameHandler extends BaseNettyClientBinaryFrameHandler<HuyaLiveChatClient, HuyaBinaryFrameHandler, HuyaCmdEnum, IHuyaMsg, IHuyaMsgListener> { + + /** + * 浠lientConfig涓轰富 + */ + private final String ver; + private ChannelHandlerContext channelHandlerContext; + + public HuyaBinaryFrameHandler(List<IHuyaMsgListener> iHuyaMsgListeners, HuyaLiveChatClient client, long roomId) { + super(iHuyaMsgListeners, client, roomId); + this.ver = client.getConfig().getVer(); + } + + public HuyaBinaryFrameHandler(List<IHuyaMsgListener> iHuyaMsgListeners, HuyaLiveChatClient client) { + super(iHuyaMsgListeners, client); + this.ver = client.getConfig().getVer(); + } + + public HuyaBinaryFrameHandler(List<IHuyaMsgListener> iHuyaMsgListeners, long roomId, String ver) { + super(iHuyaMsgListeners, roomId); + this.ver = ver; + } + + @Override + public void handlerAdded(ChannelHandlerContext ctx) throws Exception { + super.handlerAdded(ctx); + channelHandlerContext = ctx; + } + + @Override + public void handlerRemoved(ChannelHandlerContext ctx) throws Exception { + super.handlerRemoved(ctx); + channelHandlerContext = null; + } + + @Override + public void onMsg(IMsg msg) { + IHuyaMsg iHuyaMsg = (IHuyaMsg) msg; + HuyaOperationEnum operationEnum = iHuyaMsg.getOperationEnum(); + if (operationEnum == HuyaOperationEnum.EWSCmdS2C_RegisterGroupRsp) { +// channelHandlerContext.writeAndFlush(HuyaWebSocketFrameFactory.getInstance(getRoomId()).createUpdateUserInfoReq()); + // 鑾峰彇绀肩墿鍒楄〃 +// if (channelHandlerContext == null) { +// log.error("channelHandlerContext is null, cannot get gift list"); +// return; +// } +// if (log.isDebugEnabled()) { +// log.debug("鑾峰彇绀肩墿鍒楄〃"); +// } + channelHandlerContext.writeAndFlush(HuyaWebSocketFrameFactory.getInstance(getRoomId()).createGiftListReq(getVer())); + } else if (operationEnum == HuyaOperationEnum.EWSCmd_WupRsp) { + WupRsp wupRsp = (WupRsp) msg; + String functionName = wupRsp.getTarsServantRequest().getFunctionName(); + HuyaWupFunctionEnum wupFunctionEnum = HuyaWupFunctionEnum.getByName(functionName); + if (wupFunctionEnum == null) { + if (log.isWarnEnabled()) { + log.warn("鏈煡 function {}", functionName); + } + return; + } + + switch (wupFunctionEnum) { + case doLaunch: { +// LiveLaunchRsp liveLaunchRsp = new LiveLaunchRsp(); +// liveLaunchRsp = wupRsp.getUniAttribute().getByClass("tRsp", liveLaunchRsp); + channelHandlerContext.writeAndFlush(HuyaWebSocketFrameFactory.getInstance(getRoomId()).createRegisterGroupReq()); + break; + } + case getPropsList: { + GetPropsListRsp getPropsListRsp = new GetPropsListRsp(); + getPropsListRsp = wupRsp.getUniAttribute().getByClass("tRsp", getPropsListRsp); + for (PropsItem propsItem : getPropsListRsp.getVPropsItemList()) { + HuyaApis.GIFT_ITEMS.put(propsItem.getIPropsId(), propsItem); + } + break; + } + default: { + if (log.isDebugEnabled()) { + log.debug("鏆備笉鏀寔 function {}", wupFunctionEnum); + } + } + } + } else { + // ignore + } + } + + @Override + public void onCmdMsg(HuyaCmdEnum cmd, ICmdMsg<HuyaCmdEnum> cmdMsg) { + if (super.msgListeners.isEmpty()) { + return; + } + + byte[] dataBytes; + if (cmdMsg instanceof PushMessage) { + PushMessage pushMessage = (PushMessage) cmdMsg; + dataBytes = pushMessage.getDataBytes(); + } else if (cmdMsg instanceof MsgItem) { + MsgItem msgItem = (MsgItem) cmdMsg; + dataBytes = msgItem.getSMsg(); + } else { + if (log.isDebugEnabled()) { + log.debug("闈濰uyaCmdMsg {}", cmdMsg.getClass()); + } + return; + } + TarsInputStream tarsInputStream = HuyaCodecUtil.newUtf8TarsInputStream(dataBytes); + + switch (cmd) { + case MessageNotice: { + MessageNoticeMsg messageNoticeMsg = new MessageNoticeMsg(tarsInputStream); + iteratorMsgListeners(msgListener -> msgListener.onDanmuMsg(HuyaBinaryFrameHandler.this, messageNoticeMsg)); + break; + } + case SendItemSubBroadcastPacket: { + SendItemSubBroadcastPacketMsg sendItemSubBroadcastPacketMsg = new SendItemSubBroadcastPacketMsg(tarsInputStream); + sendItemSubBroadcastPacketMsg.setPropsItem(HuyaApis.GIFT_ITEMS.getOrDefault(sendItemSubBroadcastPacketMsg.getIItemType(), PropsItem.DEFAULT)); + iteratorMsgListeners(msgListener -> msgListener.onGiftMsg(HuyaBinaryFrameHandler.this, sendItemSubBroadcastPacketMsg)); + break; + } + case VipEnterBanner: { + VipEnterBannerMsg vipEnterBannerMsg = new VipEnterBannerMsg(tarsInputStream); + iteratorMsgListeners(msgListener -> msgListener.onEnterRoomMsg(HuyaBinaryFrameHandler.this, vipEnterBannerMsg)); + break; + } + default: { + iteratorMsgListeners(msgListener -> msgListener.onOtherCmdMsg(HuyaBinaryFrameHandler.this, cmd, cmdMsg)); + } + } + } + + public String getVer() { + return client != null ? client.getConfig().getVer() : ver; + } + + @Override + protected List<IHuyaMsg> decode(ByteBuf byteBuf) { + return HuyaCodecUtil.decode(byteBuf); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaConnectionHandler.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaConnectionHandler.java new file mode 100644 index 0000000..ad052fc --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/netty/handler/HuyaConnectionHandler.java @@ -0,0 +1,152 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.netty.handler; + +import io.netty.channel.Channel; +import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.huya.client.HuyaLiveChatClient; +import tech.ordinaryroad.live.chat.client.huya.config.HuyaLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.huya.netty.frame.factory.HuyaWebSocketFrameFactory; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientConnectionHandler; + + +/** + * 杩炴帴澶勭悊鍣� + * + * @author mjz + * @date 2023/8/21 + */ +@Slf4j +@ChannelHandler.Sharable +public class HuyaConnectionHandler extends BaseNettyClientConnectionHandler<HuyaLiveChatClient, HuyaConnectionHandler> { + + /** + * 浠lientConfig涓轰富 + */ + private final Object roomId; + /** + * 浠lientConfig涓轰富 + */ + private final String ver; + /** + * 浠lientConfig涓轰富 + */ + private String cookie; + + public HuyaConnectionHandler(WebSocketClientHandshaker handshaker, HuyaLiveChatClient client, IBaseConnectionListener<HuyaConnectionHandler> listener) { + super(handshaker, client, listener); + this.roomId = client.getConfig().getRoomId(); + this.ver = client.getConfig().getVer(); + this.cookie = client.getConfig().getCookie(); + } + + public HuyaConnectionHandler(WebSocketClientHandshaker handshaker, HuyaLiveChatClient client) { + this(handshaker, client, null); + } + + public HuyaConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, String ver, IBaseConnectionListener<HuyaConnectionHandler> listener, String cookie) { + super(handshaker, listener); + this.roomId = roomId; + this.ver = ver; + this.cookie = cookie; + } + + public HuyaConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, String ver, IBaseConnectionListener<HuyaConnectionHandler> listener) { + this(handshaker, roomId, ver, listener, null); + } + + public HuyaConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, String ver, String cookie) { + this(handshaker, roomId, ver, null, cookie); + } + + public HuyaConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, String ver) { + this(handshaker, roomId, ver, null, null); + } + + @Override + protected void sendHeartbeat(ChannelHandlerContext ctx) { + if (log.isDebugEnabled()) { + log.debug("鍙戦�佸績璺冲寘"); + } + ctx.writeAndFlush( + getWebSocketFrameFactory(getRoomId()).createHeartbeat(getVer(), getCookie()) + ).addListener((ChannelFutureListener) future -> { + if (future.isSuccess()) { + if (log.isDebugEnabled()) { + log.debug("蹇冭烦鍖呭彂閫佸畬鎴�"); + } + } else { + log.error("蹇冭烦鍖呭彂閫佸け璐�", future.cause()); + } + }); + } + + private static HuyaWebSocketFrameFactory getWebSocketFrameFactory(Object roomId) { + return HuyaWebSocketFrameFactory.getInstance(roomId); + } + + @Override + public void sendAuthRequest(Channel channel) { + if (log.isDebugEnabled()) { + log.debug("鍙戦�佽璇佸寘"); + } + channel.writeAndFlush(getWebSocketFrameFactory(getRoomId()).createAuth(getVer(), getCookie())); + } + + public Object getRoomId() { + return client != null ? client.getConfig().getRoomId() : roomId; + } + + public String getVer() { + return client != null ? client.getConfig().getVer() : ver; + } + + private String getCookie() { + return client != null ? client.getConfig().getCookie() : cookie; + } + + @Override + protected long getHeartbeatPeriod() { + if (client == null) { + return HuyaLiveChatClientConfig.DEFAULT_HEARTBEAT_PERIOD; + } else { + return client.getConfig().getHeartbeatPeriod(); + } + } + + @Override + protected long getHeartbeatInitialDelay() { + if (client == null) { + return HuyaLiveChatClientConfig.DEFAULT_HEARTBEAT_INITIAL_DELAY; + } else { + return client.getConfig().getHeartbeatInitialDelay(); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/util/HuyaCodecUtil.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/util/HuyaCodecUtil.java new file mode 100644 index 0000000..e5b479e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/main/java/tech/ordinaryroad/live/chat/client/huya/util/HuyaCodecUtil.java @@ -0,0 +1,167 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.util; + +import cn.hutool.core.codec.Base64; +import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.util.ByteUtil; +import com.qq.tars.protocol.tars.TarsInputStream; +import com.qq.tars.protocol.tars.TarsStructBase; +import io.netty.buffer.ByteBuf; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaDecorationAppTypeEnum; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaDecorationViewTypeEnum; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaOperationEnum; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaWupFunctionEnum; +import tech.ordinaryroad.live.chat.client.huya.msg.*; +import tech.ordinaryroad.live.chat.client.huya.msg.base.IHuyaMsg; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.BadgeInfo; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.DecorationInfo; +import tech.ordinaryroad.live.chat.client.huya.msg.req.WupReq; + +import java.nio.charset.StandardCharsets; +import java.util.*; + +/** + * @author mjz + * @date 2023/9/5 + */ +@Slf4j +public class HuyaCodecUtil { + + public static List<IHuyaMsg> decode(ByteBuf in) { + List<IHuyaMsg> msgList = new ArrayList<>(); + Queue<ByteBuf> pendingByteBuf = new LinkedList<>(); + + do { + msgList.addAll(doDecode(in, pendingByteBuf)); + in = pendingByteBuf.poll(); + } while (in != null); + + return msgList; + } + + /** + * 鎵ц瑙g爜鎿嶄綔锛屾湁鍘嬬缉鍒欏厛瑙e帇锛岃В鍘嬪悗鍙兘寰楀埌澶氭潯娑堟伅 + * + * @param in handler鏀跺埌鐨勪竴鏉℃秷鎭� + * @param pendingByteBuf 鐢ㄤ簬瀛樻斁鏈鍙栧畬鐨凚yteBuf + */ + private static List<? extends IHuyaMsg> doDecode(ByteBuf in, Queue<ByteBuf> pendingByteBuf) { + byte[] bytes = new byte[in.readableBytes()]; + in.readBytes(bytes); + + WebSocketCommand webSocketCommand = new WebSocketCommand(newUtf8TarsInputStream(bytes)); + HuyaOperationEnum operationEnum = webSocketCommand.getOperationEnum(); + if (operationEnum == null) { + throw new BaseException(String.format("鏈煡operation: %d", webSocketCommand.getOperation())); + } + + switch (operationEnum) { + case EWSCmd_RegisterRsp: { + return Collections.singletonList(new RegisterRsp(newUtf8TarsInputStream(webSocketCommand.getVData()))); + } + case EWSCmdS2C_RegisterGroupRsp: { + return Collections.singletonList(new RegisterGroupRsp(newUtf8TarsInputStream(webSocketCommand.getVData()))); + } + case EWSCmd_WupRsp: { + return Collections.singletonList(new WupRsp(webSocketCommand.getVData())); + } + case EWSCmdS2C_MsgPushReq: { + return Collections.singletonList(new PushMessage(newUtf8TarsInputStream(webSocketCommand.getVData()))); + } + case EWSCmdS2C_VerifyCookieRsp: { + return Collections.singletonList(new VerifyCookieRsp(newUtf8TarsInputStream(webSocketCommand.getVData()))); + } + case EWSCmdS2C_MsgPushReq_V2: { + PushMessage_V2 pushMessageV2 = new PushMessage_V2(newUtf8TarsInputStream(webSocketCommand.getVData())); + return pushMessageV2.getVMsgItem(); + } + default: { + return Collections.singletonList(webSocketCommand); + } + } + } + + public static byte[] encode(String servantName, HuyaWupFunctionEnum function, TarsStructBase req) { + WupReq wupReq = new WupReq(); + wupReq.getTarsServantRequest().setServantName(servantName); + wupReq.getTarsServantRequest().setFunctionName(function.name()); + wupReq.getUniAttribute().put("tReq", req); + return wupReq.encode(); + } + + public static TarsInputStream newUtf8TarsInputStream(byte[] bytes) { + TarsInputStream tarsInputStream = new TarsInputStream(bytes); + tarsInputStream.setServerEncoding(StandardCharsets.UTF_8.name()); + return tarsInputStream; + } + + public static Optional<? extends TarsStructBase> decodeDecorationInfo(DecorationInfo decorationInfo) { + int iViewType = decorationInfo.getIViewType(); + HuyaDecorationViewTypeEnum huyaDecorationViewTypeEnum = HuyaDecorationViewTypeEnum.getByCode(iViewType); + if (huyaDecorationViewTypeEnum == null) { + return Optional.empty(); + } + + switch (huyaDecorationViewTypeEnum) { + case kDecorationViewTypeCustomized: { + int iAppId = decorationInfo.getIAppId(); + HuyaDecorationAppTypeEnum huyaDecorationAppTypeEnum = HuyaDecorationAppTypeEnum.getByCode(iAppId); + if (huyaDecorationAppTypeEnum == null) { + return Optional.empty(); + } + + switch (huyaDecorationAppTypeEnum) { + case kDecorationAppTypeFans: { + BadgeInfo badgeInfo = new BadgeInfo(); + badgeInfo.readFrom(HuyaCodecUtil.newUtf8TarsInputStream(decorationInfo.getVData())); + return Optional.of(badgeInfo); + } + default: { + return Optional.empty(); + } + } + } + default: { + return Optional.empty(); + } + } + } + + public static String ab2str(byte[] bytes) { + char[] chars = new char[bytes.length]; + for (int i = 0; i < bytes.length; i++) { + int unsignedInt = ByteUtil.byteToUnsignedInt(bytes[i]); + chars[i] = (char) unsignedInt; + } + return ArrayUtil.join(chars, ""); + } + + public static String btoa(String string) { + return Base64.encode(string); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/test/java/tech/ordinaryroad/live/chat/client/huya/api/HuyaApisTest.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/test/java/tech/ordinaryroad/live/chat/client/huya/api/HuyaApisTest.java new file mode 100644 index 0000000..3de00e2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/test/java/tech/ordinaryroad/live/chat/client/huya/api/HuyaApisTest.java @@ -0,0 +1,20 @@ +package tech.ordinaryroad.live.chat.client.huya.api; + +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +/** + * @author mjz + * @date 2023/10/1 + */ +class HuyaApisTest { + + @Test + void roomInit() { + assertEquals(HuyaApis.roomInit(189201).size(), 3); + assertThrows(BaseException.class, () -> HuyaApis.roomInit(-1)); + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/test/java/tech/ordinaryroad/live/chat/client/huya/client/HuyaLiveChatClientTest.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/test/java/tech/ordinaryroad/live/chat/client/huya/client/HuyaLiveChatClientTest.java new file mode 100644 index 0000000..e8b8389 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/test/java/tech/ordinaryroad/live/chat/client/huya/client/HuyaLiveChatClientTest.java @@ -0,0 +1,150 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.huya.client; + +import cn.hutool.core.thread.ThreadUtil; +import cn.hutool.core.util.RandomUtil; +import cn.hutool.core.util.StrUtil; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.huya.config.HuyaLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.huya.constant.HuyaCmdEnum; +import tech.ordinaryroad.live.chat.client.huya.listener.IHuyaMsgListener; +import tech.ordinaryroad.live.chat.client.huya.msg.MessageNoticeMsg; +import tech.ordinaryroad.live.chat.client.huya.msg.SendItemSubBroadcastPacketMsg; +import tech.ordinaryroad.live.chat.client.huya.msg.VipEnterBannerMsg; +import tech.ordinaryroad.live.chat.client.huya.netty.handler.HuyaBinaryFrameHandler; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * @author mjz + * @date 2023/9/5 + */ +@Slf4j +class HuyaLiveChatClientTest { + + static Object lock = new Object(); + HuyaLiveChatClient client; + + @Test + void example() throws InterruptedException { + HuyaLiveChatClientConfig config = HuyaLiveChatClientConfig.builder() + .roomId(353322) + .roomId(390001) + .roomId(527988) + .roomId(1995) + .roomId(116) + // bagea + .roomId(189201) + .build(); + + client = new HuyaLiveChatClient(config, new IHuyaMsgListener() { + @Override + public void onDanmuMsg(HuyaBinaryFrameHandler binaryFrameHandler, MessageNoticeMsg msg) { + log.info("{} 鏀跺埌寮瑰箷 {} {}({})锛歿}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onGiftMsg(HuyaBinaryFrameHandler binaryFrameHandler, SendItemSubBroadcastPacketMsg msg) { + long lPayTotal = msg.getLPayTotal(); + if (lPayTotal != 0) { + int giftPrice = msg.getGiftPrice(); + } + log.info("{} 鏀跺埌绀肩墿 {}({}) {} {}({})x{}({})", binaryFrameHandler.getRoomId(), msg.getUsername(), msg.getUid(), "璧犻��", msg.getGiftName(), msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice()); + } + + @Override + public void onEnterRoomMsg(HuyaBinaryFrameHandler binaryFrameHandler, VipEnterBannerMsg msg) { + // 铏庣墮鐩墠鍙敮鎸佺洃鍚琕IP鐢ㄦ埛鐨勫叆鎴挎秷鎭� + log.info("{} {}({}) 杩涘叆鐩存挱闂�", msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + + @Override + public void onMsg(HuyaBinaryFrameHandler binaryFrameHandler, IMsg msg) { + log.debug("{} 鏀跺埌{}娑堟伅 {}", binaryFrameHandler.getRoomId(), msg.getClass(), msg); + } + + @Override + public void onCmdMsg(HuyaBinaryFrameHandler binaryFrameHandler, HuyaCmdEnum cmd, ICmdMsg<HuyaCmdEnum> cmdMsg) { + log.info("{} 鏀跺埌CMD娑堟伅{} {}", binaryFrameHandler.getRoomId(), cmd, cmdMsg); + } + + @Override + public void onOtherCmdMsg(HuyaBinaryFrameHandler binaryFrameHandler, HuyaCmdEnum cmd, ICmdMsg<HuyaCmdEnum> cmdMsg) { + log.debug("{} 鏀跺埌鍏朵粬CMD娑堟伅 {}", binaryFrameHandler.getRoomId(), cmd); + } + + @Override + public void onUnknownCmd(HuyaBinaryFrameHandler binaryFrameHandler, String cmdString, IMsg msg) { + log.debug("{} 鏀跺埌鏈煡CMD娑堟伅 {}", binaryFrameHandler.getRoomId(), cmdString); + } + }); + client.connect(); + + // 闃叉娴嬭瘯鏃剁洿鎺ラ��鍑� + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Test + void sendDanmuTest() throws InterruptedException { + String cookie = System.getenv("cookie"); + assertTrue(StrUtil.isNotBlank(cookie)); + log.error("cookie: {}", cookie); + + HuyaLiveChatClientConfig config = HuyaLiveChatClientConfig.builder() + .cookie(cookie) + .roomId(189201) + .build(); + + client = new HuyaLiveChatClient(config); + client.connect(() -> { + String danmu = "66666" + RandomUtil.randomNumber(); + log.info("杩炴帴鎴愬姛锛�5s鍚庡彂閫佸脊骞晎}", danmu); + ThreadUtil.sleep(5000); + client.sendDanmu(danmu); + }); + client.addMsgListener(new IHuyaMsgListener() { + @Override + public void onMsg(IMsg msg) { + log.info("鏀跺埌娑堟伅{}", msg); + } + }); + + // 闃叉娴嬭瘯鏃剁洿鎺ラ��鍑� + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/test/java/tech/ordinaryroad/live/chat/client/huya/util/HuyaCodecUtilTest.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/test/java/tech/ordinaryroad/live/chat/client/huya/util/HuyaCodecUtilTest.java new file mode 100644 index 0000000..aabfed7 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-huya/src/test/java/tech/ordinaryroad/live/chat/client/huya/util/HuyaCodecUtilTest.java @@ -0,0 +1,99 @@ +package tech.ordinaryroad.live.chat.client.huya.util; + +import cn.hutool.core.codec.Base64; +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.huya.msg.ConnectParaInfo; +import tech.ordinaryroad.live.chat.client.huya.msg.LiveLaunchRsp; +import tech.ordinaryroad.live.chat.client.huya.msg.WebSocketCommand; +import tech.ordinaryroad.live.chat.client.huya.msg.WupRsp; +import tech.ordinaryroad.live.chat.client.huya.msg.dto.UserId; +import tech.ordinaryroad.live.chat.client.huya.msg.req.*; + +import java.util.List; + +/** + * @author mjz + * @date 2023/10/3 + */ +class HuyaCodecUtilTest { + + private String ver = "2309271152"; + private String exp = "15547.23738,16582.25335,32083.50834"; + private String appSrc = "HUYA&ZH&2052"; + + @Test + void ab2str() { + ConnectParaInfo wsConnectParaInfo = ConnectParaInfo.newWSConnectParaInfo(ver, exp, appSrc); + byte[] byteArray = wsConnectParaInfo.toByteArray(); + String s = HuyaCodecUtil.ab2str(byteArray); + System.out.println(s); + } + + @Test + void btoa() { + ConnectParaInfo wsConnectParaInfo = ConnectParaInfo.newWSConnectParaInfo(ver, exp, appSrc); + byte[] byteArray = wsConnectParaInfo.toByteArray(); + String s = HuyaCodecUtil.ab2str(byteArray); + + String btoa = HuyaCodecUtil.btoa(s); + System.out.println(btoa); + } + + @Test + void decodeHeartbeatTest() { + byte[] decode = Base64.decode("AAMdAAEEKAAABCgQAyw8QAFWCG9ubGluZXVpZg9PblVzZXJIZWFydEJlYXR9AAED+QgAAQYEdFJlcR0AAQPrCgoMFiAwYTdkY2E3MmEzY2UxYjY1NDAwMWRkMmFkZTJhZTg1NyYANhp3ZWJoNSYyMzA5MjcxMTUyJndlYnNvY2tldEcAAAOKdnBsYXllcl9zYmFubmVyXzE3MjQ2OTFfMTcyNDY5MT0xOyBTb3VuZFZhbHVlPTAuNTA7IGFscGhhVmFsdWU9MC44MDsgZ2FtZV9kaWQ9UjI0SjJnMG1CenZkWEpmN2E5bmhlU2wzekljaTJCT3AwLXQ7IGlzSW5MaXZlUm9vbT10cnVlOyBndWlkPTBhN2RjYTcyYTNjZTFiNjU0MDAxZGQyYWRlMmFlODU3OyBfX3lhbWlkX3R0MT0wLjgwMjk5MzUwNjUwMTEyNjk7IF9feWFtaWRfbmV3PUNBNzVENENENUMxMDAwMDExNjVCODJCNTIxNDBDOTAwOyBndWlkPTBhN2RjYTcyYTNjZTFiNjU0MDAxZGQyYWRlMmFlODU3OyB1ZGJfZ3VpZGRhdGE9YWY1ZGJkYmY3NjI1NGE2ZThhMGEyOTNjY2FlOWI2ODg7IHVkYl9kZXZpY2VpZD13Xzc2MTYyMzQ4Mzg2MTgxNTI5NjsgdWRiX3Bhc3NkYXRhPTM7IF9feWFzbWlkPTAuODAyOTkzNTA2NTAxMTI2OTsgSG1fbHZ0XzUxNzAwYjZjNzIyZjViYjRjZjM5OTA2YTU5NmVhNDFmPTE2OTY0MDk0MjAsMTY5NjQxMTgwNiwxNjk2NDczNzYwLDE2OTY0NzY3NDU7IF95YXNpZHM9X19yb290c2lkJTNEQ0E3NjY5MjcwM0IwMDAwMTNGRkJCRkVBNjY4Nzk5RDA7IEhtX2xwdnRfNTE3MDBiNmM3MjJmNWJiNGNmMzk5MDZhNTk2ZWE0MWY9MTY5NjQ3Njg4MDsgaHV5YV91YT13ZWJoNSYwLjAuMSZhY3Rpdml0eTsgX3JlcF9jbnQ9Mzsgc2RpZD0wVW5IVWd2MC9xbWZENEtBS2x3emhxU1drU1d3a3RzZXhQSWNsTnQzUGJ3TVFha1dOTmZrMlc4KzFkNlFNZzVZYnU1bC9GcDRpaHRUTDdCd0Q2bTQ0MENHUUNkU0htZW1kOUNNLzVKRVZkanJXVmtuOUx0ZkZKdy9RbzRrZ0tyOE9aSERxTm51d2c2MTJzR3lmbEZuMWRrVWVaWVRUb0N6emw0R0NIcTdNVURhaHhHdVBSOG1VZGRmSW1GdGpjY3MxOyBodXlhX2ZsYXNoX3JlcF9jbnQ9NTc7IHJlcF9jbnQ9NDA7IGh1eWFfd2ViX3JlcF9jbnQ9MTY2XGYGY2hyb21lCxwsQgAaURNcYP98jJysC4yYDKgMLDYlYTgzMDdmMWM0YzRmNGVmMDphODMwN2YxYzRjNGY0ZWYwOjA6MExcZiAyYmZlZjAzNmEwMzBkOTgyN2ZjYmQwMmU5ZmM0NzY1OQ=="); + WupReq wupReq = new WupReq(); + wupReq.decode(decode); + UserHeartBeatReq userHeartBeatReq = new UserHeartBeatReq(); + userHeartBeatReq = wupReq.getUniAttribute().getByClass("tReq", userHeartBeatReq); + long lPid = userHeartBeatReq.getLPid(); + } + + @Test + void decodeRegisterGroupReq() { + byte[] decode = Base64.decode("ABAdAAAhCQACBgxsaXZlOjE3MjQ2OTEGDGNoYXQ6MTcyNDY5MRYAIAE2AExcZgA="); + WebSocketCommand webSocketCommand = new WebSocketCommand(HuyaCodecUtil.newUtf8TarsInputStream(decode)); + byte[] vData = webSocketCommand.getVData(); + RegisterGroupReq registerGroupReq = new RegisterGroupReq(); + registerGroupReq.readFrom(HuyaCodecUtil.newUtf8TarsInputStream(vData)); + List<String> vGroupId = registerGroupReq.getVGroupId(); + } + + @Test + void decodeLiveLaunchReq() { + byte[] decode = Base64.decode("AAMdAAEEJAAABCQQAyw8QARWBmxpdmV1aWYIZG9MYXVuY2h9AAED/ggAAQYEdFJlcR0AAQPwCgoMFiAwYTdkY2E3MmEzY2UxYjY1NDAwMWRkMmFkZTJhZTg1NyYANhp3ZWJoNSYyMzA5MjcxMTUyJndlYnNvY2tldEcAAAOKdnBsYXllcl9zYmFubmVyXzE3MjQ2OTFfMTcyNDY5MT0xOyBTb3VuZFZhbHVlPTAuNTA7IGFscGhhVmFsdWU9MC44MDsgZ2FtZV9kaWQ9UjI0SjJnMG1CenZkWEpmN2E5bmhlU2wzekljaTJCT3AwLXQ7IGlzSW5MaXZlUm9vbT10cnVlOyBndWlkPTBhN2RjYTcyYTNjZTFiNjU0MDAxZGQyYWRlMmFlODU3OyBfX3lhbWlkX3R0MT0wLjgwMjk5MzUwNjUwMTEyNjk7IF9feWFtaWRfbmV3PUNBNzVENENENUMxMDAwMDExNjVCODJCNTIxNDBDOTAwOyBndWlkPTBhN2RjYTcyYTNjZTFiNjU0MDAxZGQyYWRlMmFlODU3OyB1ZGJfZ3VpZGRhdGE9YWY1ZGJkYmY3NjI1NGE2ZThhMGEyOTNjY2FlOWI2ODg7IHVkYl9kZXZpY2VpZD13Xzc2MTYyMzQ4Mzg2MTgxNTI5NjsgdWRiX3Bhc3NkYXRhPTM7IF9feWFzbWlkPTAuODAyOTkzNTA2NTAxMTI2OTsgSG1fbHZ0XzUxNzAwYjZjNzIyZjViYjRjZjM5OTA2YTU5NmVhNDFmPTE2OTY0MDk0MjAsMTY5NjQxMTgwNiwxNjk2NDczNzYwLDE2OTY0NzY3NDU7IF95YXNpZHM9X19yb290c2lkJTNEQ0E3NjY5MjcwM0IwMDAwMTNGRkJCRkVBNjY4Nzk5RDA7IEhtX2xwdnRfNTE3MDBiNmM3MjJmNWJiNGNmMzk5MDZhNTk2ZWE0MWY9MTY5NjQ3Njg4MDsgaHV5YV91YT13ZWJoNSYwLjAuMSZhY3Rpdml0eTsgX3JlcF9jbnQ9Mzsgc2RpZD0wVW5IVWd2MC9xbWZENEtBS2x3emhxU1drU1d3a3RzZXhQSWNsTnQzUGJ3TVFha1dOTmZrMlc4KzFkNlFNZzVZYnU1bC9GcDRpaHRUTDdCd0Q2bTQ0MENHUUNkU0htZW1kOUNNLzVKRVZkanJXVmtuOUx0ZkZKdy9RbzRrZ0tyOE9aSERxTm51d2c2MTJzR3lmbEZuMWRrVWVaWVRUb0N6emw0R0NIcTdNVURhaHhHdVBSOG1VZGRmSW1GdGpjY3MxOyBodXlhX2ZsYXNoX3JlcF9jbnQ9NTc7IHJlcF9jbnQ9NDA7IGh1eWFfd2ViX3JlcF9jbnQ9MTY2XGYGY2hyb21lCxoAAxwqFgAmADYARgBWAAsLIAELjJgMqAwsNiU5N2Q5NzQ4NTYyMzdiMWZiOjk3ZDk3NDg1NjIzN2IxZmI6MDowTFxmIGU2OTYzZjMwMTRmYzZlY2U2M2ExNmU3ZTlhMzMzOWVl"); + WupReq wupReq = new WupReq(); + wupReq.decode(decode); + LiveLaunchReq liveLaunchReq = new LiveLaunchReq(); + liveLaunchReq = wupReq.getUniAttribute().getByClass("tReq", liveLaunchReq); + UserId tId = liveLaunchReq.getTId(); + System.out.println(wupReq.getTarsServantRequest().getVersion()); + } + + @Test + void decodeLiveLaunchRsp() { + byte[] decode = Base64.decode("AAQdAAECXAAAAlwQAyw8QARWBmxpdmV1aWYIZG9MYXVuY2h9AAECNggAAgYAHQAAAQwGBHRSc3AdAAECIQoGIDBhN2RjYTcyYTNjZTFiNjU0MDAxZGQyYWRlMmFlODU3EmUeNXopAAUKAAEZAAQGETExMS4xOS4yMzkuMTExOjgwBhAxMTEuMTkuMjI1LjIzOjgwBhAxMTEuNjMuMTgwLjk4OjgwBhExMTEuNjMuMTgwLjEwMDo4MAsKAAUZAAQGFzZmMTNlZjZmLXdzLnZhLmh1eWEuY29tBhc2ZjEzZTExNy13cy52YS5odXlhLmNvbQYXNmYzZmI0NjItd3MudmEuaHV5YS5jb20GFzZmM2ZiNDY0LXdzLnZhLmh1eWEuY29tCwoABhkABAYRMTExLjE5LjIzOS4xMTE6ODAGEDExMS4xOS4yMjUuMjM6ODAGEDExMS42My4xODAuOTg6ODAGETExMS42My4xODAuMTAwOjgwCwoABxkABAYRMTExLjE5LjIzOS4xMTE6ODAGEDExMS4xOS4yMjUuMjM6ODAGEDExMS42My4xODAuOTg6ODAGETExMS42My4xODAuMTAwOjgwCwoACRkACAYOMTIwLjE5NS4xNTguNDYGDzExMy4xMDcuMjM2LjE5NQYMMTQuMTcuMTA5LjY2Bg8xMDMuMjI3LjEyMS4xMDAGDzExNS4yMzguMTg5LjIyNQYPMTgzLjIzMi4xMzYuMTMwBg4yMjEuMjI4Ljc5LjIyNQYMNjAuMjE3LjI1MC4xCzxGDTExMi40My45Mi4xMTgLjJgMqAwsNiU5N2Q5NzQ4NTYyMzdiMWZiOjk3ZDk3NDg1NjIzN2IxZmI6MDowTFxmAA=="); + WupRsp wupRsp = new WupRsp(); + wupRsp.decode(decode); + LiveLaunchRsp liveLaunchRsp = new LiveLaunchRsp(); + liveLaunchRsp = wupRsp.getUniAttribute().getByClass("tRsp", liveLaunchRsp); + int eAccess = liveLaunchRsp.getEAccess(); + } + + @Test + void decodeGetLivingInfoReq() { + byte[] decode = Base64.decode("AAMdAAEEKAAABCgQAyw8QAFWCmh1eWFsaXZldWlmDWdldExpdmluZ0luZm99AAED+QgAAQYEdFJlcR0AAQPrCgoMFiAwYTdkY2E3MmEzY2UxYjY1NDAwMWRkMmFkZTJhZTg1NyYANhp3ZWJoNSYyMzA5MjcxMTUyJndlYnNvY2tldEcAAAOKdnBsYXllcl9zYmFubmVyXzE3MjQ2OTFfMTcyNDY5MT0xOyBTb3VuZFZhbHVlPTAuNTA7IGFscGhhVmFsdWU9MC44MDsgZ2FtZV9kaWQ9UjI0SjJnMG1CenZkWEpmN2E5bmhlU2wzekljaTJCT3AwLXQ7IGlzSW5MaXZlUm9vbT10cnVlOyBndWlkPTBhN2RjYTcyYTNjZTFiNjU0MDAxZGQyYWRlMmFlODU3OyBfX3lhbWlkX3R0MT0wLjgwMjk5MzUwNjUwMTEyNjk7IF9feWFtaWRfbmV3PUNBNzVENENENUMxMDAwMDExNjVCODJCNTIxNDBDOTAwOyBndWlkPTBhN2RjYTcyYTNjZTFiNjU0MDAxZGQyYWRlMmFlODU3OyB1ZGJfZ3VpZGRhdGE9YWY1ZGJkYmY3NjI1NGE2ZThhMGEyOTNjY2FlOWI2ODg7IHVkYl9kZXZpY2VpZD13Xzc2MTYyMzQ4Mzg2MTgxNTI5NjsgdWRiX3Bhc3NkYXRhPTM7IF9feWFzbWlkPTAuODAyOTkzNTA2NTAxMTI2OTsgX3lhc2lkcz1fX3Jvb3RzaWQlM0RDQTc2NzA0NUMxMTAwMDAxRUM1QTE0NUMxRTkwRkUwMDsgSG1fbHZ0XzUxNzAwYjZjNzIyZjViYjRjZjM5OTA2YTU5NmVhNDFmPTE2OTY0NzM3NjAsMTY5NjQ3Njc0NSwxNjk2NDgzNTY1LDE2OTY0ODQyMTI7IEhtX2xwdnRfNTE3MDBiNmM3MjJmNWJiNGNmMzk5MDZhNTk2ZWE0MWY9MTY5NjQ4NDIxMjsgaHV5YV91YT13ZWJoNSYwLjAuMSZhY3Rpdml0eTsgX3JlcF9jbnQ9Mjsgc2RpZD0wVW5IVWd2MC9xbWZENEtBS2x3emhxWDk4UXJuUENjY2s2Zk40OTRpYXdTNUtteW1ncmV1ODlvN2dZdGEvUXZRc0JEZVNlU1JwNC9nclE1ZkV1RkFZckw1OWNvQUt1eHV1a2l3Z1RMamZqRURXVmtuOUx0ZkZKdy9RbzRrZ0tyOE9aSERxTm51d2c2MTJzR3lmbEZuMWRrVWVaWVRUb0N6emw0R0NIcTdNVURhaHhHdVBSOG1VZGRmSW1GdGpjY3MxOyBodXlhX2ZsYXNoX3JlcF9jbnQ9NzQ7IGh1eWFfd2ViX3JlcF9jbnQ9MTI1OyByZXBfY250PTQ0XGYGY2hyb21lCxwsMgAaURNGAFYAbHyMC4yYDKgMLDYlZTcxMDQ2OTExYzk2N2JjNDplNzEwNDY5MTFjOTY3YmM0OjA6MExcZiBjNTRlM2NkYmIyNGJjYzcyYmU1MjU5NTY4ZGVmY2Q1Ng=="); + WupReq wupReq = new WupReq(); + wupReq.decode(decode); + GetLivingInfoReq getLivingInfoReq = new GetLivingInfoReq(); + getLivingInfoReq = wupReq.getUniAttribute().getByClass("tReq", getLivingInfoReq); + + byte[] decode2 = Base64.decode("AAAEJxwsPEABVgpodXlhbGl2ZXVpZg1nZXRMaXZpbmdJbmZvfQABA/kIAAEGBHRSZXEdAAED6woKDBYgMGE3ZGNhNzJhM2NlMWI2NTQwMDFkZDJhZGUyYWU4NTcmADYad2ViaDUmMjMwOTI3MTE1MiZ3ZWJzb2NrZXRHAAADinZwbGF5ZXJfc2Jhbm5lcl8xNzI0NjkxXzE3MjQ2OTE9MTsgU291bmRWYWx1ZT0wLjUwOyBhbHBoYVZhbHVlPTAuODA7IGdhbWVfZGlkPVIyNEoyZzBtQnp2ZFhKZjdhOW5oZVNsM3pJY2kyQk9wMC10OyBpc0luTGl2ZVJvb209dHJ1ZTsgZ3VpZD0wYTdkY2E3MmEzY2UxYjY1NDAwMWRkMmFkZTJhZTg1NzsgX195YW1pZF90dDE9MC44MDI5OTM1MDY1MDExMjY5OyBfX3lhbWlkX25ldz1DQTc1RDRDRDVDMTAwMDAxMTY1QjgyQjUyMTQwQzkwMDsgZ3VpZD0wYTdkY2E3MmEzY2UxYjY1NDAwMWRkMmFkZTJhZTg1NzsgdWRiX2d1aWRkYXRhPWFmNWRiZGJmNzYyNTRhNmU4YTBhMjkzY2NhZTliNjg4OyB1ZGJfZGV2aWNlaWQ9d183NjE2MjM0ODM4NjE4MTUyOTY7IHVkYl9wYXNzZGF0YT0zOyBfX3lhc21pZD0wLjgwMjk5MzUwNjUwMTEyNjk7IF95YXNpZHM9X19yb290c2lkJTNEQ0E3NjcwNDVDMTEwMDAwMUVDNUExNDVDMUU5MEZFMDA7IEhtX2x2dF81MTcwMGI2YzcyMmY1YmI0Y2YzOTkwNmE1OTZlYTQxZj0xNjk2NDczNzYwLDE2OTY0NzY3NDUsMTY5NjQ4MzU2NSwxNjk2NDg0MjEyOyBIbV9scHZ0XzUxNzAwYjZjNzIyZjViYjRjZjM5OTA2YTU5NmVhNDFmPTE2OTY0ODQyMTI7IGh1eWFfdWE9d2ViaDUmMC4wLjEmYWN0aXZpdHk7IF9yZXBfY250PTI7IHNkaWQ9MFVuSFVndjAvcW1mRDRLQUtsd3pocVg5OFFyblBDY2NrNmZONDk0aWF3UzVLbXltZ3JldTg5bzdnWXRhL1F2UXNCRGVTZVNScDQvZ3JRNWZFdUZBWXJMNTljb0FLdXh1dWtpd2dUTGpmakVEV1ZrbjlMdGZGSncvUW80a2dLcjhPWkhEcU5udXdnNjEyc0d5ZmxGbjFka1VlWllUVG9DenpsNEdDSHE3TVVEYWh4R3VQUjhtVWRkZkltRnRqY2NzMTsgaHV5YV9mbGFzaF9yZXBfY250PTc0OyBodXlhX3dlYl9yZXBfY250PTEyNTsgcmVwX2NudD00NFxmBmNocm9tZQscLDIAGlETRgBWAGx8jAuMmAyoDA=="); + WupReq wupReq2 = new WupReq(); + wupReq2.decode(decode2); + GetLivingInfoReq getLivingInfoReq2 = new GetLivingInfoReq(); + getLivingInfoReq2 = wupReq2.getUniAttribute().getByClass("tReq", getLivingInfoReq2); + + UserId tId = getLivingInfoReq.getTId(); + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/pom.xml b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/pom.xml new file mode 100644 index 0000000..5522cff --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/pom.xml @@ -0,0 +1,42 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-clients</artifactId> + <version>${revision}</version> + <relativePath>../pom.xml</relativePath> + </parent> + <packaging>jar</packaging> + + <artifactId>live-chat-client-kuaishou</artifactId> + <name>live-chat-client-kuaishou</name> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-servers-netty-client</artifactId> + </dependency> + + <dependency> + <groupId>com.google.protobuf</groupId> + <artifactId>protobuf-java-util</artifactId> + </dependency> + + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + </dependency> + + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter</artifactId> + <version>${junit-jupiter.version}</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/ClientModeExample.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/ClientModeExample.java new file mode 100644 index 0000000..7809fda --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/ClientModeExample.java @@ -0,0 +1,99 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou; + +import cn.hutool.core.util.RandomUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; +import tech.ordinaryroad.live.chat.client.kuaishou.client.KuaishouLiveChatClient; +import tech.ordinaryroad.live.chat.client.kuaishou.config.KuaishouLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.kuaishou.listener.IKuaishouMsgListener; +import tech.ordinaryroad.live.chat.client.kuaishou.msg.KuaishouDanmuMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.msg.KuaishouGiftMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.netty.handler.KuaishouBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass; + +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; + +public class ClientModeExample { + static Logger log = LoggerFactory.getLogger(ClientModeExample.class); + + public static void main(String[] args) { + // 1. 鍒涘缓閰嶇疆 + KuaishouLiveChatClientConfig config = KuaishouLiveChatClientConfig.builder() + // TODO 娴忚鍣–ookie + .cookie("did=web_6c4ac2a8ef8855d35df4d564baeaa8e8; kuaishou.live.bfb1s=7206d814e5c089a58c910ed8bf52ace5; clientid=3; did=web_6c4ac2a8ef8855d35df4d564baeaa8e8; client_key=65890b29; kpn=GAME_ZONE; userId=3941614875; kuaishou.live.web_st=ChRrdWFpc2hvdS5saXZlLndlYi5zdBKgAbRhgemDxM_Z_lBn7EZ_-5unvtslsh7ci5VY_eg80qqjxy5yb7oBFrdcWSPlz6jMIBz9h_yoLzATE3ngj2WawpxvbJhmq0EnRYIHv308kTBmg4KN2JQf7w2mfrsp1vusFbZ3NkfsEO4PrGQfX0L6mJRbgXeBqyz4tUM5O0q2Jte_NzWkaOnezvIGRAG8Y6yA1dxGUmiA9syTrPrdnSOzZvAaEoJNhwQ4OUDtgURWN6k9Xgm8PSIgAfV-ZvahtgaYhopZno6OuS2pkaFZjrz4ymoEZ1DSnj0oBTAB; kuaishou.live.web_ph=a287be6ab01dce264c0554eed94c2d6ac991; userId=3941614875") + // TODO 鐩存挱闂磇d锛堟敮鎸佺煭id锛� + .roomId("tianci666") + .build(); + + // 2. 鍒涘缓Client骞朵紶鍏ラ厤缃�佹坊鍔犳秷鎭洖璋� + KuaishouLiveChatClient client = new KuaishouLiveChatClient(config, new IKuaishouMsgListener() { + @Override + public void onMsg(IMsg msg) { + log.debug("鏀跺埌{}娑堟伅 {}", msg.getClass(), msg); + } + + @Override + public void onCmdMsg(PayloadTypeOuterClass.PayloadType cmd, ICmdMsg<PayloadTypeOuterClass.PayloadType> cmdMsg) { + log.debug("鏀跺埌CMD娑堟伅{} {}", cmd, cmdMsg); + } + + @Override + public void onOtherCmdMsg(PayloadTypeOuterClass.PayloadType cmd, ICmdMsg<PayloadTypeOuterClass.PayloadType> cmdMsg) { + log.debug("鏀跺埌鍏朵粬CMD娑堟伅 {}", cmd); + } + + @Override + public void onUnknownCmd(String cmdString, IMsg msg) { + log.debug("鏀跺埌鏈煡CMD娑堟伅 {}", cmdString); + } + + @Override + public void onDanmuMsg(KuaishouBinaryFrameHandler binaryFrameHandler, KuaishouDanmuMsg msg) { + log.info("{} 鏀跺埌寮瑰箷 [{}] {}({})锛歿}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onGiftMsg(KuaishouBinaryFrameHandler binaryFrameHandler, KuaishouGiftMsg msg) { + log.info("{} 鏀跺埌绀肩墿 [{}] {}({}) {} {}({})x{}({}) mergeKey:{},comboCount:{}, batchSize:{}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), "璧犻��", msg.getGiftName(), msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice(), msg.getMsg().getMergeKey(), msg.getMsg().getComboCount(), msg.getMsg().getBatchSize()); + } + }); + // 3. 寮�濮嬬洃鍚洿鎾棿 + client.connect(); + + // 瀹㈡埛绔繛鎺ョ姸鎬佸洖璋� + client.addStatusChangeListener(evt -> { + if (evt.getNewValue().equals(ClientStatusEnums.CONNECTED)) { + // TODO 瑕佸彂閫佺殑寮瑰箷鍐呭锛岃娉ㄦ剰鎺у埗鍙戦�侀鐜囷紱妗嗘灦鍐呯疆鏀寔璁剧疆鍙戦�佸脊骞曠殑鏈�灏戞椂闂撮棿闅旓紝灏忎簬鏃跺皢蹇界暐璇ユ鍙戦�� + client.sendDanmu("666666" + RandomUtil.randomNumbers(1)); + } + }); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/api/KuaishouApis.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/api/KuaishouApis.java new file mode 100644 index 0000000..114f697 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/api/KuaishouApis.java @@ -0,0 +1,235 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.api; + +import cn.hutool.cache.impl.TimedCache; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ReUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.core.util.URLUtil; +import cn.hutool.http.*; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ArrayNode; +import lombok.*; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.util.OrLiveChatCookieUtil; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import java.util.function.Consumer; + +import static tech.ordinaryroad.live.chat.client.commons.base.msg.BaseMsg.OBJECT_MAPPER; + +/** + * @author mjz + * @date 2024/1/5 + */ +public class KuaishouApis { + + /** + * 鎺ュ彛杩斿洖缁撴灉缂撳瓨 + * {@link #KEY_RESULT_CACHE_GIFT_ITEMS}锛氭墍鏈夌ぜ鐗╀俊鎭� + */ + public static final TimedCache<String, Map<String, GiftInfo>> RESULT_CACHE = new TimedCache<>(TimeUnit.DAYS.toMillis(1)); + public static final String KEY_RESULT_CACHE_GIFT_ITEMS = "GIFT_ITEMS"; + + public static final String PATTERN_LIVE_STREAM_ID = "\"liveStream\":\\{\"id\":\"([\\w\\d-_]+)\""; + public static final String USER_AGENT = GlobalHeaders.INSTANCE.header(Header.USER_AGENT).replace("Hutool", ""); + + public static RoomInitResult roomInit(Object roomId, String cookie) { + @Cleanup + HttpResponse response = createGetRequest("https://live.kuaishou.com/u/" + roomId, cookie) + .execute(); + + if (StrUtil.isBlank(cookie)) { + cookie = OrLiveChatCookieUtil.toString(response.getCookies()); + } + + String body = response.body(); + String liveStreamId = ReUtil.getGroup1(PATTERN_LIVE_STREAM_ID, body); + JsonNode websocketinfo = websocketinfo(roomId, liveStreamId, cookie); + if (!websocketinfo.has("token")) { + throwExceptionWithTip("涓绘挱鏈紑鎾紝token鑾峰彇澶辫触 " + websocketinfo); + } + ArrayNode websocketUrls = websocketinfo.withArray("websocketUrls"); + ArrayList<String> websocketUrlList = CollUtil.newArrayList(); + for (JsonNode websocketUrl : websocketUrls) { + websocketUrlList.add(websocketUrl.asText()); + } + return RoomInitResult.builder() + .token(websocketinfo.required("token").asText()) + .websocketUrls(websocketUrlList) + .liveStreamId(liveStreamId) + .build(); + } + + public static RoomInitResult roomInit(Object roomId) { + return roomInit(roomId, null); + } + + public static JsonNode websocketinfo(Object roomId, String liveStreamId, String cookie) { + if (StrUtil.isBlank(liveStreamId)) { + throwExceptionWithTip("涓绘挱鏈紑鎾紝liveStreamId涓虹┖"); + } + @Cleanup + HttpResponse response = createGetRequest("https://live.kuaishou.com/live_api/liveroom/websocketinfo?liveStreamId=" + liveStreamId, cookie) + .header(Header.REFERER, "https://live.kuaishou.com/u/" + roomId) + .execute(); + return responseInterceptor(response.body()); + } + + public static Map<String, GiftInfo> allgifts() { + Map<String, GiftInfo> map = new HashMap<>(); + @Cleanup + HttpResponse response = createGetRequest("https://live.kuaishou.com/live_api/emoji/allgifts", null).execute(); + JsonNode jsonNode = responseInterceptor(response.body()); + jsonNode.fields().forEachRemaining(new Consumer<Map.Entry<String, JsonNode>>() { + @Override + public void accept(Map.Entry<String, JsonNode> stringJsonNodeEntry) { + map.put(stringJsonNodeEntry.getKey(), OBJECT_MAPPER.convertValue(stringJsonNodeEntry.getValue(), GiftInfo.class)); + } + }); + return map; + } + + /** + * 鏍规嵁绀肩墿ID鑾峰彇绀肩墿淇℃伅 + * + * @param id 绀肩墿ID + * @return 绀肩墿淇℃伅 + */ + public static GiftInfo getGiftInfoById(String id) { + if (!RESULT_CACHE.containsKey(KEY_RESULT_CACHE_GIFT_ITEMS)) { + RESULT_CACHE.put(KEY_RESULT_CACHE_GIFT_ITEMS, allgifts()); + } + return RESULT_CACHE.get(KEY_RESULT_CACHE_GIFT_ITEMS).get(id); + } + + @SneakyThrows + public static JsonNode sendComment(String cookie, Object roomId, SendCommentRequest request) { + @Cleanup + HttpResponse response = createPostRequest("https://live.kuaishou.com/live_api/liveroom/sendComment", cookie) + .body(OBJECT_MAPPER.writeValueAsString(request), ContentType.JSON.getValue()) + .header(Header.REFERER, "https://live.kuaishou.com/u/" + roomId) + .execute(); + return responseInterceptor(response.body()); + } + + @SneakyThrows + public static JsonNode clickLike(String cookie, Object roomId, String liveStreamId, int count) { + @Cleanup + HttpResponse response = createPostRequest("https://live.kuaishou.com/live_api/liveroom/like", cookie) + .body(OBJECT_MAPPER.createObjectNode() + .put("liveStreamId", liveStreamId) + .put("count", count) + .toString(), ContentType.JSON.getValue() + ) + .header(Header.ORIGIN, "https://live.kuaishou.com") + .header(Header.REFERER, "https://live.kuaishou.com/u/" + roomId) + .execute(); + return responseInterceptor(response.body()); + } + + public static HttpRequest createRequest(Method method, String url, String cookie) { + return HttpUtil.createRequest(method, url) + .cookie(cookie) + .header(Header.HOST, URLUtil.url(url).getHost()) + .header(Header.USER_AGENT, USER_AGENT); + } + + public static HttpRequest createGetRequest(String url, String cookie) { + return createRequest(Method.GET, url, cookie); + } + + public static HttpRequest createPostRequest(String url, String cookie) { + return createRequest(Method.POST, url, cookie); + } + + private static JsonNode responseInterceptor(String responseString) { + try { + JsonNode jsonNode = OBJECT_MAPPER.readTree(responseString); + JsonNode data = jsonNode.required("data"); + if (data.has("result")) { + int result = data.get("result").asInt(); + if (result != 1) { + String message = ""; + switch (result) { + case 2: { + message = "璇锋眰杩囧揩锛岃绋嶅悗閲嶈瘯"; + break; + } + case 400002: { + message = "闇�瑕佽繘琛岄獙璇�"; + break; + } + default: { + message = ""; + } + } + throwExceptionWithTip("鎺ュ彛璁块棶澶辫触锛�" + message + "锛岃繑鍥炵粨鏋滐細" + jsonNode); + } + } + return data; + } catch (JsonProcessingException e) { + throw new BaseException(e); + } + } + + private static void throwExceptionWithTip(String message) { + throw new BaseException("銆庡彲鑳藉凡瑙﹀彂婊戝潡楠岃瘉锛屽缓璁厤缃瓹ookie鎴栨墦寮�娴忚鍣ㄨ繘琛屾粦鍧楅獙璇佸悗閲嶈瘯銆�" + message); + } + + @Data + @AllArgsConstructor + @NoArgsConstructor + @Builder + public static class SendCommentRequest { + private String liveStreamId; + private String content; + private String color; + } + + @Data + @AllArgsConstructor + @NoArgsConstructor + @Builder + public static class RoomInitResult { + private String token; + private String liveStreamId; + private List<String> websocketUrls; + } + + @Data + @AllArgsConstructor + @NoArgsConstructor + public static class GiftInfo { + private String giftName; + private String giftUrl; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/client/KuaishouLiveChatClient.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/client/KuaishouLiveChatClient.java new file mode 100644 index 0000000..7c52bdc --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/client/KuaishouLiveChatClient.java @@ -0,0 +1,201 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.client; + + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.RandomUtil; +import com.fasterxml.jackson.databind.JsonNode; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.handler.codec.http.DefaultHttpHeaders; +import io.netty.handler.codec.http.websocketx.WebSocketClientHandshakerFactory; +import io.netty.handler.codec.http.websocketx.WebSocketVersion; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.kuaishou.api.KuaishouApis; +import tech.ordinaryroad.live.chat.client.kuaishou.config.KuaishouLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.kuaishou.listener.IKuaishouConnectionListener; +import tech.ordinaryroad.live.chat.client.kuaishou.listener.IKuaishouMsgListener; +import tech.ordinaryroad.live.chat.client.kuaishou.msg.base.IKuaishouMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.netty.handler.KuaishouBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.kuaishou.netty.handler.KuaishouConnectionHandler; +import tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass; +import tech.ordinaryroad.live.chat.client.servers.netty.client.base.BaseNettyClient; + +import java.util.List; +import java.util.function.Consumer; + +/** + * @author mjz + * @date 2024/1/5 + */ +@Slf4j +public class KuaishouLiveChatClient extends BaseNettyClient< + KuaishouLiveChatClientConfig, + PayloadTypeOuterClass.PayloadType, + IKuaishouMsg, + IKuaishouMsgListener, + KuaishouConnectionHandler, + KuaishouBinaryFrameHandler> { + + @Getter + KuaishouApis.RoomInitResult roomInitResult = new KuaishouApis.RoomInitResult(); + + public KuaishouLiveChatClient(KuaishouLiveChatClientConfig config, List<IKuaishouMsgListener> msgListeners, IKuaishouConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListeners(msgListeners); + + // 鍒濆鍖� + this.init(); + } + + public KuaishouLiveChatClient(KuaishouLiveChatClientConfig config, IKuaishouMsgListener msgListener, IKuaishouConnectionListener connectionListener, EventLoopGroup workerGroup) { + super(config, workerGroup, connectionListener); + addMsgListener(msgListener); + + // 鍒濆鍖� + this.init(); + } + + public KuaishouLiveChatClient(KuaishouLiveChatClientConfig config, IKuaishouMsgListener msgListener, IKuaishouConnectionListener connectionListener) { + this(config, msgListener, connectionListener, new NioEventLoopGroup()); + } + + public KuaishouLiveChatClient(KuaishouLiveChatClientConfig config, IKuaishouMsgListener msgListener) { + this(config, msgListener, null, new NioEventLoopGroup()); + } + + public KuaishouLiveChatClient(KuaishouLiveChatClientConfig config) { + this(config, null); + } + + @Override + public void init() { + roomInitResult = KuaishouApis.roomInit(getConfig().getRoomId(), getConfig().getCookie()); + super.init(); + } + + @Override + protected String getWebSocketUriString() { + List<String> websocketUrls = roomInitResult.getWebsocketUrls(); + return CollUtil.get(websocketUrls, RandomUtil.randomInt(0, websocketUrls.size())); + } + + @Override + public KuaishouConnectionHandler initConnectionHandler(IBaseConnectionListener<KuaishouConnectionHandler> clientConnectionListener) { + return new KuaishouConnectionHandler( + WebSocketClientHandshakerFactory.newHandshaker(getWebsocketUri(), WebSocketVersion.V13, null, true, new DefaultHttpHeaders(), getConfig().getMaxFramePayloadLength()), + KuaishouLiveChatClient.this, clientConnectionListener + ); + } + + @Override + public KuaishouBinaryFrameHandler initBinaryFrameHandler() { + return new KuaishouBinaryFrameHandler(super.msgListeners, KuaishouLiveChatClient.this); + } + + @Override + public void sendDanmu(Object danmu, Runnable success, Consumer<Throwable> failed) { + if (!checkCanSendDanmu()) { + return; + } + if (danmu instanceof String) { + String msg = (String) danmu; + try { + if (log.isDebugEnabled()) { + log.debug("{} kuaishou鍙戦�佸脊骞� {}", getConfig().getRoomId(), danmu); + } + + boolean sendSuccess = false; + try { + KuaishouApis.sendComment(getConfig().getCookie(), + getConfig().getRoomId(), + KuaishouApis.SendCommentRequest.builder() + .liveStreamId(roomInitResult.getLiveStreamId()) + .content(msg) + .build() + ); + sendSuccess = true; + } catch (Exception e) { + log.error("kuaishou寮瑰箷鍙戦�佸け璐�", e); + if (failed != null) { + failed.accept(e); + } + } + if (!sendSuccess) { + return; + } + + if (log.isDebugEnabled()) { + log.debug("kuaishou寮瑰箷鍙戦�佹垚鍔� {}", danmu); + } + if (success != null) { + success.run(); + } + finishSendDanmu(); + } catch (Exception e) { + log.error("kuaishou寮瑰箷鍙戦�佸け璐�", e); + if (failed != null) { + failed.accept(e); + } + } + } else { + super.sendDanmu(danmu, success, failed); + } + } + + @Override + public void clickLike(int count, Runnable success, Consumer<Throwable> failed) { + if (count <= 0) { + throw new BaseException("鐐硅禐娆℃暟蹇呴』澶т簬0"); + } + + boolean successfullyClicked = false; + try { + JsonNode jsonNode = KuaishouApis.clickLike(getConfig().getCookie(), getConfig().getRoomId(), roomInitResult.getLiveStreamId(), count); + if (jsonNode.asBoolean()) { + successfullyClicked = true; + } + } catch (Exception e) { + log.error("kuaishou涓虹洿鎾棿鐐硅禐澶辫触", e); + if (failed != null) { + failed.accept(e); + } + } + if (!successfullyClicked) { + return; + } + + if (log.isDebugEnabled()) { + log.debug("kuaishou涓虹洿鎾棿鐐硅禐鎴愬姛"); + } + if (success != null) { + success.run(); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/config/KuaishouLiveChatClientConfig.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/config/KuaishouLiveChatClientConfig.java new file mode 100644 index 0000000..d46ad21 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/config/KuaishouLiveChatClientConfig.java @@ -0,0 +1,47 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.config; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import tech.ordinaryroad.live.chat.client.servers.netty.client.config.BaseNettyClientConfig; + +/** + * @author mjz + * @date 2024/1/5 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@SuperBuilder(toBuilder = true) +public class KuaishouLiveChatClientConfig extends BaseNettyClientConfig { + + @Builder.Default + private long heartbeatPeriod = 20; + +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/IKuaishouConnectionListener.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/IKuaishouConnectionListener.java new file mode 100644 index 0000000..56a7342 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/IKuaishouConnectionListener.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.listener; + +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.kuaishou.netty.handler.KuaishouConnectionHandler; + +/** + * @author mjz + * @date 2024/1/5 + */ +public interface IKuaishouConnectionListener extends IBaseConnectionListener<KuaishouConnectionHandler> { +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/IKuaishouMsgListener.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/IKuaishouMsgListener.java new file mode 100644 index 0000000..d280e06 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/listener/IKuaishouMsgListener.java @@ -0,0 +1,45 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.listener; + +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IDanmuMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IGiftMsgListener; +import tech.ordinaryroad.live.chat.client.commons.base.listener.ILikeMsgListener; +import tech.ordinaryroad.live.chat.client.kuaishou.msg.KuaishouDanmuMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.msg.KuaishouGiftMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.msg.KuaishouLikeMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.netty.handler.KuaishouBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass; + +/** + * @author mjz + * @date 2024/1/5 + */ +public interface IKuaishouMsgListener extends IBaseMsgListener<KuaishouBinaryFrameHandler, PayloadTypeOuterClass.PayloadType>, + IDanmuMsgListener<KuaishouBinaryFrameHandler, KuaishouDanmuMsg>, + IGiftMsgListener<KuaishouBinaryFrameHandler, KuaishouGiftMsg>, + ILikeMsgListener<KuaishouBinaryFrameHandler, KuaishouLikeMsg> { +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/KuaishouDanmuMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/KuaishouDanmuMsg.java new file mode 100644 index 0000000..fe4dabd --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/KuaishouDanmuMsg.java @@ -0,0 +1,100 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.msg; + +import com.google.protobuf.ByteString; +import com.google.protobuf.UnknownFieldSet; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IDanmuMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.msg.base.IKuaishouMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass; + +import java.util.List; + +/** + * @author mjz + * @date 2024/1/9 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class KuaishouDanmuMsg implements IKuaishouMsg, IDanmuMsg { + + private WebCommentFeedOuterClass.WebCommentFeed msg; + + @Override + public String getBadgeName() { + String badgeName = null; + try { + UnknownFieldSet.Field field21 = msg.getSenderState().getUnknownFields().asMap().get(21); + List<ByteString> lengthDelimitedList = field21.getLengthDelimitedList(); + if (!lengthDelimitedList.isEmpty()) { + UnknownFieldSet.Field field21_1 = UnknownFieldSet.parseFrom( + lengthDelimitedList.size() > 1 ? lengthDelimitedList.get(1) : lengthDelimitedList.get(0) + ).getField(1); + List<ByteString> lengthDelimitedList1 = field21_1.getLengthDelimitedList(); + if (!lengthDelimitedList1.isEmpty()) { + UnknownFieldSet.Field field21_1_4 = UnknownFieldSet.parseFrom((lengthDelimitedList1.get(0))).getField(4); + List<ByteString> lengthDelimitedList2 = field21_1_4.getLengthDelimitedList(); + if (!lengthDelimitedList2.isEmpty()) { + badgeName = lengthDelimitedList2.get(0).toStringUtf8(); + } + } + } + } catch (Exception e) { + // ignore + } + return badgeName; + } + + @Override + public byte getBadgeLevel() { + return (byte) msg.getSenderState().getLiveFansGroupState().getIntimacyLevel(); + } + + @Override + public String getUid() { + return msg.getUser().getPrincipalId(); + } + + @Override + public String getUsername() { + return msg.getUser().getUserName(); + } + + @Override + public String getUserAvatar() { + return msg.getUser().getHeadUrl(); + } + + @Override + public String getContent() { + return msg.getContent(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/KuaishouGiftMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/KuaishouGiftMsg.java new file mode 100644 index 0000000..5ac39d9 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/KuaishouGiftMsg.java @@ -0,0 +1,108 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IGiftMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.api.KuaishouApis; +import tech.ordinaryroad.live.chat.client.kuaishou.msg.base.IKuaishouMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass; + +/** + * @author mjz + * @date 2024/1/9 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class KuaishouGiftMsg implements IKuaishouMsg, IGiftMsg { + + private WebGiftFeedOuterClass.WebGiftFeed msg; + + @Override + public String getBadgeName() { + return IGiftMsg.super.getBadgeName(); + } + + @Override + public byte getBadgeLevel() { + return IGiftMsg.super.getBadgeLevel(); + } + + @Override + public String getUid() { + return msg.getUser().getPrincipalId(); + } + + @Override + public String getUsername() { + return msg.getUser().getUserName(); + } + + @Override + public String getUserAvatar() { + return msg.getUser().getHeadUrl(); + } + + @Override + public String getGiftName() { + return KuaishouApis.getGiftInfoById(this.getGiftId()).getGiftName(); + } + + @Override + public String getGiftImg() { + return KuaishouApis.getGiftInfoById(this.getGiftId()).getGiftUrl(); + } + + @Override + public String getGiftId() { + return Integer.toString(msg.getIntGiftId()); + } + + @Override + public int getGiftCount() { + // TODO 绀肩墿涓暟锛熺綉椤典笂鍙樉绀鸿禒閫佷簡浠�涔堜笢瑗匡紝涓嶆樉绀轰釜鏁帮紝鍙細鏄剧ず杩炲嚮 + return 0; + } + + @Override + public int getGiftPrice() { + return 0; + } + + @Override + public String getReceiveUid() { + return null; + } + + @Override + public String getReceiveUsername() { + return null; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/KuaishouLikeMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/KuaishouLikeMsg.java new file mode 100644 index 0000000..01bcefb --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/KuaishouLikeMsg.java @@ -0,0 +1,61 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.msg; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ILikeMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.msg.base.IKuaishouMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass; + +/** + * @author mjz + * @date 2024/1/9 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class KuaishouLikeMsg implements IKuaishouMsg, ILikeMsg { + + private WebLikeFeedOuterClass.WebLikeFeed msg; + + @Override + public String getUid() { + return msg.getUser().getPrincipalId(); + } + + @Override + public String getUsername() { + return msg.getUser().getUserName(); + } + + @Override + public String getUserAvatar() { + return msg.getUser().getHeadUrl(); + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/base/IKuaishouCmdMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/base/IKuaishouCmdMsg.java new file mode 100644 index 0000000..eaaa8bc --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/base/IKuaishouCmdMsg.java @@ -0,0 +1,35 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.msg.base; + +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass; + +/** + * @author mjz + * @date 2024/1/5 + */ +public interface IKuaishouCmdMsg extends IKuaishouMsg, ICmdMsg<PayloadTypeOuterClass.PayloadType> { +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/base/IKuaishouMsg.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/base/IKuaishouMsg.java new file mode 100644 index 0000000..12ae6cd --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/msg/base/IKuaishouMsg.java @@ -0,0 +1,34 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.msg.base; + +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; + +/** + * @author mjz + * @date 2024/1/5 + */ +public interface IKuaishouMsg extends IMsg { +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouBinaryFrameHandler.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouBinaryFrameHandler.java new file mode 100644 index 0000000..d6bcb6d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouBinaryFrameHandler.java @@ -0,0 +1,127 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.netty.handler; + +import cn.hutool.core.util.ZipUtil; +import com.google.protobuf.ByteString; +import com.google.protobuf.InvalidProtocolBufferException; +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandler; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.exception.BaseException; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.client.KuaishouLiveChatClient; +import tech.ordinaryroad.live.chat.client.kuaishou.listener.IKuaishouMsgListener; +import tech.ordinaryroad.live.chat.client.kuaishou.msg.KuaishouDanmuMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.msg.KuaishouGiftMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.msg.KuaishouLikeMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.msg.base.IKuaishouMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.protobuf.*; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientBinaryFrameHandler; + +import java.util.Collections; +import java.util.List; + +/** + * @author mjz + * @date 2024/1/5 + */ +@Slf4j +@ChannelHandler.Sharable +public class KuaishouBinaryFrameHandler extends BaseNettyClientBinaryFrameHandler<KuaishouLiveChatClient, KuaishouBinaryFrameHandler, PayloadTypeOuterClass.PayloadType, IKuaishouMsg, IKuaishouMsgListener> { + + public KuaishouBinaryFrameHandler(List<IKuaishouMsgListener> iKuaishouMsgListeners, KuaishouLiveChatClient client) { + super(iKuaishouMsgListeners, client); + } + + public KuaishouBinaryFrameHandler(List<IKuaishouMsgListener> iKuaishouMsgListeners, long roomId) { + super(iKuaishouMsgListeners, roomId); + } + + @SneakyThrows + @Override + public void onCmdMsg(PayloadTypeOuterClass.PayloadType cmd, ICmdMsg<PayloadTypeOuterClass.PayloadType> cmdMsg) { + if (super.msgListeners.isEmpty()) { + return; + } + + SocketMessageOuterClass.SocketMessage socketMessage = (SocketMessageOuterClass.SocketMessage) cmdMsg; + ByteString payloadByteString = socketMessage.getPayload(); + switch (socketMessage.getPayloadType()) { + case SC_FEED_PUSH: { + SCWebFeedPushOuterClass.SCWebFeedPush scWebFeedPush = SCWebFeedPushOuterClass.SCWebFeedPush.parseFrom(payloadByteString); + if (scWebFeedPush.getCommentFeedsCount() > 0) { + for (WebCommentFeedOuterClass.WebCommentFeed webCommentFeed : scWebFeedPush.getCommentFeedsList()) { + iteratorMsgListeners(msgListener -> msgListener.onDanmuMsg(KuaishouBinaryFrameHandler.this, new KuaishouDanmuMsg(webCommentFeed))); + } + } + if (scWebFeedPush.getGiftFeedsCount() > 0) { + for (WebGiftFeedOuterClass.WebGiftFeed webGiftFeed : scWebFeedPush.getGiftFeedsList()) { + iteratorMsgListeners(msgListener -> msgListener.onGiftMsg(KuaishouBinaryFrameHandler.this, new KuaishouGiftMsg(webGiftFeed))); + } + } + if (scWebFeedPush.getLikeFeedsCount() > 0) { + for (WebLikeFeedOuterClass.WebLikeFeed webLikeFeed : scWebFeedPush.getLikeFeedsList()) { + iteratorMsgListeners(msgListener -> msgListener.onLikeMsg(KuaishouBinaryFrameHandler.this, new KuaishouLikeMsg(webLikeFeed))); + } + } + break; + } + default: { + iteratorMsgListeners(msgListener -> msgListener.onOtherCmdMsg(KuaishouBinaryFrameHandler.this, cmd, socketMessage)); + } + } + } + + @Override + protected List<IKuaishouMsg> decode(ByteBuf byteBuf) { + try { + SocketMessageOuterClass.SocketMessage socketMessage = SocketMessageOuterClass.SocketMessage.parseFrom(byteBuf.nioBuffer()); + SocketMessageOuterClass.SocketMessage.CompressionType compressionType = socketMessage.getCompressionType(); + ByteString payloadByteString = socketMessage.getPayload(); + byte[] payload; + switch (compressionType) { + case NONE: { + payload = payloadByteString.toByteArray(); + break; + } + case GZIP: { + payload = ZipUtil.unGzip(payloadByteString.newInput()); + break; + } + default: { + if (log.isWarnEnabled()) { + log.warn("鏆備笉鏀寔鐨勫帇缂╂柟寮� " + compressionType); + } + return Collections.emptyList(); + } + } + return Collections.singletonList(socketMessage.toBuilder().setPayload(ByteString.copyFrom(payload)).build()); + } catch (InvalidProtocolBufferException e) { + throw new BaseException(e); + } + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouConnectionHandler.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouConnectionHandler.java new file mode 100644 index 0000000..977710d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/netty/handler/KuaishouConnectionHandler.java @@ -0,0 +1,158 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package tech.ordinaryroad.live.chat.client.kuaishou.netty.handler; + +import cn.hutool.core.util.RandomUtil; +import io.netty.buffer.Unpooled; +import io.netty.channel.Channel; +import io.netty.channel.ChannelHandler; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; +import io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker; +import lombok.extern.slf4j.Slf4j; +import tech.ordinaryroad.live.chat.client.commons.base.listener.IBaseConnectionListener; +import tech.ordinaryroad.live.chat.client.kuaishou.api.KuaishouApis; +import tech.ordinaryroad.live.chat.client.kuaishou.client.KuaishouLiveChatClient; +import tech.ordinaryroad.live.chat.client.kuaishou.config.KuaishouLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass; +import tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass; +import tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass; +import tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass; +import tech.ordinaryroad.live.chat.client.servers.netty.client.handler.BaseNettyClientConnectionHandler; + +/** + * @author mjz + * @date 2024/1/5 + */ +@Slf4j +@ChannelHandler.Sharable +public class KuaishouConnectionHandler extends BaseNettyClientConnectionHandler<KuaishouLiveChatClient, KuaishouConnectionHandler> { + + /** + * 浠lientConfig涓轰富 + */ + private final Object roomId; + /** + * 浠lientConfig涓轰富 + */ + private String cookie; + private final KuaishouApis.RoomInitResult roomInitResult; + + public KuaishouConnectionHandler(WebSocketClientHandshaker handshaker, KuaishouLiveChatClient client, IBaseConnectionListener<KuaishouConnectionHandler> listener) { + super(handshaker, client, listener); + this.roomId = client.getConfig().getRoomId(); + this.cookie = client.getConfig().getCookie(); + this.roomInitResult = client.getRoomInitResult(); + } + + public KuaishouConnectionHandler(WebSocketClientHandshaker handshaker, KuaishouLiveChatClient client) { + this(handshaker, client, null); + } + + public KuaishouConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, KuaishouApis.RoomInitResult roomInitResult, IBaseConnectionListener<KuaishouConnectionHandler> listener, String cookie) { + super(handshaker, listener); + this.roomId = roomId; + this.cookie = cookie; + this.roomInitResult = roomInitResult; + } + + public KuaishouConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, KuaishouApis.RoomInitResult roomInitResult, IBaseConnectionListener<KuaishouConnectionHandler> listener) { + this(handshaker, roomId, roomInitResult, listener, null); + } + + public KuaishouConnectionHandler(WebSocketClientHandshaker handshaker, long roomId, KuaishouApis.RoomInitResult roomInitResult, String cookie) { + this(handshaker, roomId, roomInitResult, null, cookie); + } + + public KuaishouConnectionHandler(WebSocketClientHandshaker handshaker, KuaishouApis.RoomInitResult roomInitResult, long roomId) { + this(handshaker, roomId, roomInitResult, null, null); + } + + @Override + protected void sendHeartbeat(ChannelHandlerContext ctx) { + ctx.writeAndFlush( + new BinaryWebSocketFrame( + Unpooled.wrappedBuffer(SocketMessageOuterClass.SocketMessage.newBuilder() + .setPayloadType(PayloadTypeOuterClass.PayloadType.CS_HEARTBEAT) + .setPayload( + CSHeartbeatOuterClass.CSHeartbeat.newBuilder() + .setTimestamp(System.currentTimeMillis()) + .build() + .toByteString() + ) + .build() + .toByteArray() + ) + ) + ); + } + + @Override + public void sendAuthRequest(Channel channel) { + channel.writeAndFlush( + new BinaryWebSocketFrame( + Unpooled.wrappedBuffer(SocketMessageOuterClass.SocketMessage.newBuilder() + .setPayloadType(PayloadTypeOuterClass.PayloadType.CS_ENTER_ROOM) + .setPayload( + CSWebEnterRoomOuterClass.CSWebEnterRoom.newBuilder() + .setToken(roomInitResult.getToken()) + .setLiveStreamId(roomInitResult.getLiveStreamId()) + .setPageId(RandomUtil.randomString(16) + System.currentTimeMillis()) + .build() + .toByteString() + ) + .build() + .toByteArray() + ) + ) + ); + } + + @Override + protected long getHeartbeatPeriod() { + if (client == null) { + return KuaishouLiveChatClientConfig.DEFAULT_HEARTBEAT_PERIOD; + } else { + return client.getConfig().getHeartbeatPeriod(); + } + } + + @Override + protected long getHeartbeatInitialDelay() { + if (client == null) { + return KuaishouLiveChatClientConfig.DEFAULT_HEARTBEAT_INITIAL_DELAY; + } else { + return client.getConfig().getHeartbeatInitialDelay(); + } + } + + public Object getRoomId() { + return client != null ? client.getConfig().getRoomId() : roomId; + } + + private String getCookie() { + return client != null ? client.getConfig().getCookie() : cookie; + } +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/AuditAudienceMaskOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/AuditAudienceMaskOuterClass.java new file mode 100644 index 0000000..7030eae --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/AuditAudienceMaskOuterClass.java @@ -0,0 +1,1155 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: AuditAudienceMask.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class AuditAudienceMaskOuterClass { + private AuditAudienceMaskOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface AuditAudienceMaskOrBuilder extends + // @@protoc_insertion_point(interface_extends:AuditAudienceMask) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView> + getIconCdnNodeViewList(); + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView getIconCdnNodeView(int index); + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + int getIconCdnNodeViewCount(); + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder> + getIconCdnNodeViewOrBuilderList(); + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder getIconCdnNodeViewOrBuilder( + int index); + + /** + * <code>string title = 2;</code> + * @return The title. + */ + java.lang.String getTitle(); + /** + * <code>string title = 2;</code> + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + * <code>string detail = 3;</code> + * @return The detail. + */ + java.lang.String getDetail(); + /** + * <code>string detail = 3;</code> + * @return The bytes for detail. + */ + com.google.protobuf.ByteString + getDetailBytes(); + } + /** + * Protobuf type {@code AuditAudienceMask} + */ + public static final class AuditAudienceMask extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:AuditAudienceMask) + AuditAudienceMaskOrBuilder { + private static final long serialVersionUID = 0L; + // Use AuditAudienceMask.newBuilder() to construct. + private AuditAudienceMask(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private AuditAudienceMask() { + iconCdnNodeView_ = java.util.Collections.emptyList(); + title_ = ""; + detail_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AuditAudienceMask(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.internal_static_AuditAudienceMask_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.internal_static_AuditAudienceMask_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.Builder.class); + } + + public static final int ICONCDNNODEVIEW_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView> iconCdnNodeView_; + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView> getIconCdnNodeViewList() { + return iconCdnNodeView_; + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder> + getIconCdnNodeViewOrBuilderList() { + return iconCdnNodeView_; + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + @java.lang.Override + public int getIconCdnNodeViewCount() { + return iconCdnNodeView_.size(); + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView getIconCdnNodeView(int index) { + return iconCdnNodeView_.get(index); + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder getIconCdnNodeViewOrBuilder( + int index) { + return iconCdnNodeView_.get(index); + } + + public static final int TITLE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + * <code>string title = 2;</code> + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + * <code>string title = 2;</code> + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DETAIL_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object detail_ = ""; + /** + * <code>string detail = 3;</code> + * @return The detail. + */ + @java.lang.Override + public java.lang.String getDetail() { + java.lang.Object ref = detail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detail_ = s; + return s; + } + } + /** + * <code>string detail = 3;</code> + * @return The bytes for detail. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDetailBytes() { + java.lang.Object ref = detail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + detail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < iconCdnNodeView_.size(); i++) { + output.writeMessage(1, iconCdnNodeView_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, detail_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < iconCdnNodeView_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, iconCdnNodeView_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, detail_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask) obj; + + if (!getIconCdnNodeViewList() + .equals(other.getIconCdnNodeViewList())) return false; + if (!getTitle() + .equals(other.getTitle())) return false; + if (!getDetail() + .equals(other.getDetail())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getIconCdnNodeViewCount() > 0) { + hash = (37 * hash) + ICONCDNNODEVIEW_FIELD_NUMBER; + hash = (53 * hash) + getIconCdnNodeViewList().hashCode(); + } + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getDetail().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code AuditAudienceMask} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:AuditAudienceMask) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMaskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.internal_static_AuditAudienceMask_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.internal_static_AuditAudienceMask_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (iconCdnNodeViewBuilder_ == null) { + iconCdnNodeView_ = java.util.Collections.emptyList(); + } else { + iconCdnNodeView_ = null; + iconCdnNodeViewBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + title_ = ""; + detail_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.internal_static_AuditAudienceMask_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask result) { + if (iconCdnNodeViewBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + iconCdnNodeView_ = java.util.Collections.unmodifiableList(iconCdnNodeView_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.iconCdnNodeView_ = iconCdnNodeView_; + } else { + result.iconCdnNodeView_ = iconCdnNodeViewBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.detail_ = detail_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.getDefaultInstance()) return this; + if (iconCdnNodeViewBuilder_ == null) { + if (!other.iconCdnNodeView_.isEmpty()) { + if (iconCdnNodeView_.isEmpty()) { + iconCdnNodeView_ = other.iconCdnNodeView_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.addAll(other.iconCdnNodeView_); + } + onChanged(); + } + } else { + if (!other.iconCdnNodeView_.isEmpty()) { + if (iconCdnNodeViewBuilder_.isEmpty()) { + iconCdnNodeViewBuilder_.dispose(); + iconCdnNodeViewBuilder_ = null; + iconCdnNodeView_ = other.iconCdnNodeView_; + bitField0_ = (bitField0_ & ~0x00000001); + iconCdnNodeViewBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getIconCdnNodeViewFieldBuilder() : null; + } else { + iconCdnNodeViewBuilder_.addAllMessages(other.iconCdnNodeView_); + } + } + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getDetail().isEmpty()) { + detail_ = other.detail_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView m = + input.readMessage( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.parser(), + extensionRegistry); + if (iconCdnNodeViewBuilder_ == null) { + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.add(m); + } else { + iconCdnNodeViewBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + detail_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView> iconCdnNodeView_ = + java.util.Collections.emptyList(); + private void ensureIconCdnNodeViewIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + iconCdnNodeView_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView>(iconCdnNodeView_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder> iconCdnNodeViewBuilder_; + + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView> getIconCdnNodeViewList() { + if (iconCdnNodeViewBuilder_ == null) { + return java.util.Collections.unmodifiableList(iconCdnNodeView_); + } else { + return iconCdnNodeViewBuilder_.getMessageList(); + } + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public int getIconCdnNodeViewCount() { + if (iconCdnNodeViewBuilder_ == null) { + return iconCdnNodeView_.size(); + } else { + return iconCdnNodeViewBuilder_.getCount(); + } + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView getIconCdnNodeView(int index) { + if (iconCdnNodeViewBuilder_ == null) { + return iconCdnNodeView_.get(index); + } else { + return iconCdnNodeViewBuilder_.getMessage(index); + } + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public Builder setIconCdnNodeView( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView value) { + if (iconCdnNodeViewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.set(index, value); + onChanged(); + } else { + iconCdnNodeViewBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public Builder setIconCdnNodeView( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder builderForValue) { + if (iconCdnNodeViewBuilder_ == null) { + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.set(index, builderForValue.build()); + onChanged(); + } else { + iconCdnNodeViewBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public Builder addIconCdnNodeView(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView value) { + if (iconCdnNodeViewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.add(value); + onChanged(); + } else { + iconCdnNodeViewBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public Builder addIconCdnNodeView( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView value) { + if (iconCdnNodeViewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.add(index, value); + onChanged(); + } else { + iconCdnNodeViewBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public Builder addIconCdnNodeView( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder builderForValue) { + if (iconCdnNodeViewBuilder_ == null) { + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.add(builderForValue.build()); + onChanged(); + } else { + iconCdnNodeViewBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public Builder addIconCdnNodeView( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder builderForValue) { + if (iconCdnNodeViewBuilder_ == null) { + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.add(index, builderForValue.build()); + onChanged(); + } else { + iconCdnNodeViewBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public Builder addAllIconCdnNodeView( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView> values) { + if (iconCdnNodeViewBuilder_ == null) { + ensureIconCdnNodeViewIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, iconCdnNodeView_); + onChanged(); + } else { + iconCdnNodeViewBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public Builder clearIconCdnNodeView() { + if (iconCdnNodeViewBuilder_ == null) { + iconCdnNodeView_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + iconCdnNodeViewBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public Builder removeIconCdnNodeView(int index) { + if (iconCdnNodeViewBuilder_ == null) { + ensureIconCdnNodeViewIsMutable(); + iconCdnNodeView_.remove(index); + onChanged(); + } else { + iconCdnNodeViewBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder getIconCdnNodeViewBuilder( + int index) { + return getIconCdnNodeViewFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder getIconCdnNodeViewOrBuilder( + int index) { + if (iconCdnNodeViewBuilder_ == null) { + return iconCdnNodeView_.get(index); } else { + return iconCdnNodeViewBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder> + getIconCdnNodeViewOrBuilderList() { + if (iconCdnNodeViewBuilder_ != null) { + return iconCdnNodeViewBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(iconCdnNodeView_); + } + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder addIconCdnNodeViewBuilder() { + return getIconCdnNodeViewFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.getDefaultInstance()); + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder addIconCdnNodeViewBuilder( + int index) { + return getIconCdnNodeViewFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.getDefaultInstance()); + } + /** + * <code>repeated .LiveCdnNodeView iconCdnNodeView = 1;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder> + getIconCdnNodeViewBuilderList() { + return getIconCdnNodeViewFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder> + getIconCdnNodeViewFieldBuilder() { + if (iconCdnNodeViewBuilder_ == null) { + iconCdnNodeViewBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder>( + iconCdnNodeView_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + iconCdnNodeView_ = null; + } + return iconCdnNodeViewBuilder_; + } + + private java.lang.Object title_ = ""; + /** + * <code>string title = 2;</code> + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string title = 2;</code> + * @return The bytes for title. + */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string title = 2;</code> + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string title = 2;</code> + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string title = 2;</code> + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object detail_ = ""; + /** + * <code>string detail = 3;</code> + * @return The detail. + */ + public java.lang.String getDetail() { + java.lang.Object ref = detail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string detail = 3;</code> + * @return The bytes for detail. + */ + public com.google.protobuf.ByteString + getDetailBytes() { + java.lang.Object ref = detail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + detail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string detail = 3;</code> + * @param value The detail to set. + * @return This builder for chaining. + */ + public Builder setDetail( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + detail_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>string detail = 3;</code> + * @return This builder for chaining. + */ + public Builder clearDetail() { + detail_ = getDefaultInstance().getDetail(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * <code>string detail = 3;</code> + * @param value The bytes for detail to set. + * @return This builder for chaining. + */ + public Builder setDetailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + detail_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:AuditAudienceMask) + } + + // @@protoc_insertion_point(class_scope:AuditAudienceMask) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<AuditAudienceMask> + PARSER = new com.google.protobuf.AbstractParser<AuditAudienceMask>() { + @java.lang.Override + public AuditAudienceMask parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<AuditAudienceMask> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<AuditAudienceMask> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_AuditAudienceMask_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_AuditAudienceMask_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\027AuditAudienceMask.proto\032\025LiveCdnNodeVi" + + "ew.proto\"]\n\021AuditAudienceMask\022)\n\017iconCdn" + + "NodeView\030\001 \003(\0132\020.LiveCdnNodeView\022\r\n\005titl" + + "e\030\002 \001(\t\022\016\n\006detail\030\003 \001(\tB6\n4tech.ordinary" + + "road.live.chat.client.kuaishou.protobufb" + + "\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.getDescriptor(), + }); + internal_static_AuditAudienceMask_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_AuditAudienceMask_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_AuditAudienceMask_descriptor, + new java.lang.String[] { "IconCdnNodeView", "Title", "Detail", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSErrorOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSErrorOuterClass.java new file mode 100644 index 0000000..d172708 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSErrorOuterClass.java @@ -0,0 +1,548 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CSError.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class CSErrorOuterClass { + private CSErrorOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface CSErrorOrBuilder extends + // @@protoc_insertion_point(interface_extends:CSError) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint32 code = 1;</code> + * @return The code. + */ + int getCode(); + } + /** + * Protobuf type {@code CSError} + */ + public static final class CSError extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:CSError) + CSErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use CSError.newBuilder() to construct. + private CSError(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private CSError() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CSError(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.internal_static_CSError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.internal_static_CSError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + /** + * <code>uint32 code = 1;</code> + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (code_ != 0) { + output.writeUInt32(1, code_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, code_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError) obj; + + if (getCode() + != other.getCode()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code CSError} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:CSError) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.internal_static_CSError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.internal_static_CSError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.internal_static_CSError_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError.getDefaultInstance()) return this; + if (other.getCode() != 0) { + setCode(other.getCode()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + code_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int code_ ; + /** + * <code>uint32 code = 1;</code> + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + /** + * <code>uint32 code = 1;</code> + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(int value) { + + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint32 code = 1;</code> + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:CSError) + } + + // @@protoc_insertion_point(class_scope:CSError) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<CSError> + PARSER = new com.google.protobuf.AbstractParser<CSError>() { + @java.lang.Override + public CSError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<CSError> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<CSError> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSErrorOuterClass.CSError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_CSError_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_CSError_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\rCSError.proto\"\027\n\007CSError\022\014\n\004code\030\001 \001(\r" + + "B6\n4tech.ordinaryroad.live.chat.client.k" + + "uaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_CSError_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CSError_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_CSError_descriptor, + new java.lang.String[] { "Code", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSHeartbeatOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSHeartbeatOuterClass.java new file mode 100644 index 0000000..635a577 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSHeartbeatOuterClass.java @@ -0,0 +1,549 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CSHeartbeat.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class CSHeartbeatOuterClass { + private CSHeartbeatOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface CSHeartbeatOrBuilder extends + // @@protoc_insertion_point(interface_extends:CSHeartbeat) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 timestamp = 1;</code> + * @return The timestamp. + */ + long getTimestamp(); + } + /** + * Protobuf type {@code CSHeartbeat} + */ + public static final class CSHeartbeat extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:CSHeartbeat) + CSHeartbeatOrBuilder { + private static final long serialVersionUID = 0L; + // Use CSHeartbeat.newBuilder() to construct. + private CSHeartbeat(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private CSHeartbeat() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CSHeartbeat(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.internal_static_CSHeartbeat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.internal_static_CSHeartbeat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat.Builder.class); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 1; + private long timestamp_ = 0L; + /** + * <code>uint64 timestamp = 1;</code> + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (timestamp_ != 0L) { + output.writeUInt64(1, timestamp_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, timestamp_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat) obj; + + if (getTimestamp() + != other.getTimestamp()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTimestamp()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code CSHeartbeat} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:CSHeartbeat) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.internal_static_CSHeartbeat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.internal_static_CSHeartbeat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + timestamp_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.internal_static_CSHeartbeat_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.timestamp_ = timestamp_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat.getDefaultInstance()) return this; + if (other.getTimestamp() != 0L) { + setTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + timestamp_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long timestamp_ ; + /** + * <code>uint64 timestamp = 1;</code> + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + /** + * <code>uint64 timestamp = 1;</code> + * @param value The timestamp to set. + * @return This builder for chaining. + */ + public Builder setTimestamp(long value) { + + timestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 timestamp = 1;</code> + * @return This builder for chaining. + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + timestamp_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:CSHeartbeat) + } + + // @@protoc_insertion_point(class_scope:CSHeartbeat) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<CSHeartbeat> + PARSER = new com.google.protobuf.AbstractParser<CSHeartbeat>() { + @java.lang.Override + public CSHeartbeat parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<CSHeartbeat> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<CSHeartbeat> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSHeartbeatOuterClass.CSHeartbeat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_CSHeartbeat_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_CSHeartbeat_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021CSHeartbeat.proto\" \n\013CSHeartbeat\022\021\n\tti" + + "mestamp\030\001 \001(\004B6\n4tech.ordinaryroad.live." + + "chat.client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_CSHeartbeat_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CSHeartbeat_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_CSHeartbeat_descriptor, + new java.lang.String[] { "Timestamp", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSPingOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSPingOuterClass.java new file mode 100644 index 0000000..1062bdc --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSPingOuterClass.java @@ -0,0 +1,1029 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CSPing.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class CSPingOuterClass { + private CSPingOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface CSPingOrBuilder extends + // @@protoc_insertion_point(interface_extends:CSPing) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string echoData = 1;</code> + * @return The echoData. + */ + java.lang.String getEchoData(); + /** + * <code>string echoData = 1;</code> + * @return The bytes for echoData. + */ + com.google.protobuf.ByteString + getEchoDataBytes(); + + /** + * <code>.ClientId clientId = 2;</code> + * @return The enum numeric value on the wire for clientId. + */ + int getClientIdValue(); + /** + * <code>.ClientId clientId = 2;</code> + * @return The clientId. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ClientIdOuterClass.ClientId getClientId(); + + /** + * <code>string deviceId = 3;</code> + * @return The deviceId. + */ + java.lang.String getDeviceId(); + /** + * <code>string deviceId = 3;</code> + * @return The bytes for deviceId. + */ + com.google.protobuf.ByteString + getDeviceIdBytes(); + + /** + * <code>string appVer = 4;</code> + * @return The appVer. + */ + java.lang.String getAppVer(); + /** + * <code>string appVer = 4;</code> + * @return The bytes for appVer. + */ + com.google.protobuf.ByteString + getAppVerBytes(); + } + /** + * Protobuf type {@code CSPing} + */ + public static final class CSPing extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:CSPing) + CSPingOrBuilder { + private static final long serialVersionUID = 0L; + // Use CSPing.newBuilder() to construct. + private CSPing(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private CSPing() { + echoData_ = ""; + clientId_ = 0; + deviceId_ = ""; + appVer_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CSPing(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.internal_static_CSPing_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.internal_static_CSPing_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing.Builder.class); + } + + public static final int ECHODATA_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object echoData_ = ""; + /** + * <code>string echoData = 1;</code> + * @return The echoData. + */ + @java.lang.Override + public java.lang.String getEchoData() { + java.lang.Object ref = echoData_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + echoData_ = s; + return s; + } + } + /** + * <code>string echoData = 1;</code> + * @return The bytes for echoData. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEchoDataBytes() { + java.lang.Object ref = echoData_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + echoData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLIENTID_FIELD_NUMBER = 2; + private int clientId_ = 0; + /** + * <code>.ClientId clientId = 2;</code> + * @return The enum numeric value on the wire for clientId. + */ + @java.lang.Override public int getClientIdValue() { + return clientId_; + } + /** + * <code>.ClientId clientId = 2;</code> + * @return The clientId. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ClientIdOuterClass.ClientId getClientId() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ClientIdOuterClass.ClientId result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ClientIdOuterClass.ClientId.forNumber(clientId_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ClientIdOuterClass.ClientId.UNRECOGNIZED : result; + } + + public static final int DEVICEID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object deviceId_ = ""; + /** + * <code>string deviceId = 3;</code> + * @return The deviceId. + */ + @java.lang.Override + public java.lang.String getDeviceId() { + java.lang.Object ref = deviceId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceId_ = s; + return s; + } + } + /** + * <code>string deviceId = 3;</code> + * @return The bytes for deviceId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDeviceIdBytes() { + java.lang.Object ref = deviceId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPVER_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object appVer_ = ""; + /** + * <code>string appVer = 4;</code> + * @return The appVer. + */ + @java.lang.Override + public java.lang.String getAppVer() { + java.lang.Object ref = appVer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appVer_ = s; + return s; + } + } + /** + * <code>string appVer = 4;</code> + * @return The bytes for appVer. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAppVerBytes() { + java.lang.Object ref = appVer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + appVer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(echoData_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, echoData_); + } + if (clientId_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ClientIdOuterClass.ClientId.NONE.getNumber()) { + output.writeEnum(2, clientId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deviceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appVer_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, appVer_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(echoData_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, echoData_); + } + if (clientId_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ClientIdOuterClass.ClientId.NONE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, clientId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deviceId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appVer_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, appVer_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing) obj; + + if (!getEchoData() + .equals(other.getEchoData())) return false; + if (clientId_ != other.clientId_) return false; + if (!getDeviceId() + .equals(other.getDeviceId())) return false; + if (!getAppVer() + .equals(other.getAppVer())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ECHODATA_FIELD_NUMBER; + hash = (53 * hash) + getEchoData().hashCode(); + hash = (37 * hash) + CLIENTID_FIELD_NUMBER; + hash = (53 * hash) + clientId_; + hash = (37 * hash) + DEVICEID_FIELD_NUMBER; + hash = (53 * hash) + getDeviceId().hashCode(); + hash = (37 * hash) + APPVER_FIELD_NUMBER; + hash = (53 * hash) + getAppVer().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code CSPing} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:CSPing) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.internal_static_CSPing_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.internal_static_CSPing_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + echoData_ = ""; + clientId_ = 0; + deviceId_ = ""; + appVer_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.internal_static_CSPing_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.echoData_ = echoData_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clientId_ = clientId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.deviceId_ = deviceId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.appVer_ = appVer_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing.getDefaultInstance()) return this; + if (!other.getEchoData().isEmpty()) { + echoData_ = other.echoData_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.clientId_ != 0) { + setClientIdValue(other.getClientIdValue()); + } + if (!other.getDeviceId().isEmpty()) { + deviceId_ = other.deviceId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getAppVer().isEmpty()) { + appVer_ = other.appVer_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + echoData_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + clientId_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + deviceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + appVer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object echoData_ = ""; + /** + * <code>string echoData = 1;</code> + * @return The echoData. + */ + public java.lang.String getEchoData() { + java.lang.Object ref = echoData_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + echoData_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string echoData = 1;</code> + * @return The bytes for echoData. + */ + public com.google.protobuf.ByteString + getEchoDataBytes() { + java.lang.Object ref = echoData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + echoData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string echoData = 1;</code> + * @param value The echoData to set. + * @return This builder for chaining. + */ + public Builder setEchoData( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + echoData_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string echoData = 1;</code> + * @return This builder for chaining. + */ + public Builder clearEchoData() { + echoData_ = getDefaultInstance().getEchoData(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string echoData = 1;</code> + * @param value The bytes for echoData to set. + * @return This builder for chaining. + */ + public Builder setEchoDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + echoData_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int clientId_ = 0; + /** + * <code>.ClientId clientId = 2;</code> + * @return The enum numeric value on the wire for clientId. + */ + @java.lang.Override public int getClientIdValue() { + return clientId_; + } + /** + * <code>.ClientId clientId = 2;</code> + * @param value The enum numeric value on the wire for clientId to set. + * @return This builder for chaining. + */ + public Builder setClientIdValue(int value) { + clientId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.ClientId clientId = 2;</code> + * @return The clientId. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ClientIdOuterClass.ClientId getClientId() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ClientIdOuterClass.ClientId result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ClientIdOuterClass.ClientId.forNumber(clientId_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ClientIdOuterClass.ClientId.UNRECOGNIZED : result; + } + /** + * <code>.ClientId clientId = 2;</code> + * @param value The clientId to set. + * @return This builder for chaining. + */ + public Builder setClientId(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ClientIdOuterClass.ClientId value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + clientId_ = value.getNumber(); + onChanged(); + return this; + } + /** + * <code>.ClientId clientId = 2;</code> + * @return This builder for chaining. + */ + public Builder clearClientId() { + bitField0_ = (bitField0_ & ~0x00000002); + clientId_ = 0; + onChanged(); + return this; + } + + private java.lang.Object deviceId_ = ""; + /** + * <code>string deviceId = 3;</code> + * @return The deviceId. + */ + public java.lang.String getDeviceId() { + java.lang.Object ref = deviceId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string deviceId = 3;</code> + * @return The bytes for deviceId. + */ + public com.google.protobuf.ByteString + getDeviceIdBytes() { + java.lang.Object ref = deviceId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string deviceId = 3;</code> + * @param value The deviceId to set. + * @return This builder for chaining. + */ + public Builder setDeviceId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + deviceId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>string deviceId = 3;</code> + * @return This builder for chaining. + */ + public Builder clearDeviceId() { + deviceId_ = getDefaultInstance().getDeviceId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * <code>string deviceId = 3;</code> + * @param value The bytes for deviceId to set. + * @return This builder for chaining. + */ + public Builder setDeviceIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + deviceId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object appVer_ = ""; + /** + * <code>string appVer = 4;</code> + * @return The appVer. + */ + public java.lang.String getAppVer() { + java.lang.Object ref = appVer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appVer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string appVer = 4;</code> + * @return The bytes for appVer. + */ + public com.google.protobuf.ByteString + getAppVerBytes() { + java.lang.Object ref = appVer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + appVer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string appVer = 4;</code> + * @param value The appVer to set. + * @return This builder for chaining. + */ + public Builder setAppVer( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + appVer_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>string appVer = 4;</code> + * @return This builder for chaining. + */ + public Builder clearAppVer() { + appVer_ = getDefaultInstance().getAppVer(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * <code>string appVer = 4;</code> + * @param value The bytes for appVer to set. + * @return This builder for chaining. + */ + public Builder setAppVerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + appVer_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:CSPing) + } + + // @@protoc_insertion_point(class_scope:CSPing) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<CSPing> + PARSER = new com.google.protobuf.AbstractParser<CSPing>() { + @java.lang.Override + public CSPing parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<CSPing> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<CSPing> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSPingOuterClass.CSPing getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_CSPing_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_CSPing_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\014CSPing.proto\032\016ClientId.proto\"Y\n\006CSPing" + + "\022\020\n\010echoData\030\001 \001(\t\022\033\n\010clientId\030\002 \001(\0162\t.C" + + "lientId\022\020\n\010deviceId\030\003 \001(\t\022\016\n\006appVer\030\004 \001(" + + "\tB6\n4tech.ordinaryroad.live.chat.client." + + "kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ClientIdOuterClass.getDescriptor(), + }); + internal_static_CSPing_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CSPing_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_CSPing_descriptor, + new java.lang.String[] { "EchoData", "ClientId", "DeviceId", "AppVer", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ClientIdOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebEnterRoomOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebEnterRoomOuterClass.java new file mode 100644 index 0000000..8a6b155 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebEnterRoomOuterClass.java @@ -0,0 +1,1363 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CSWebEnterRoom.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class CSWebEnterRoomOuterClass { + private CSWebEnterRoomOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface CSWebEnterRoomOrBuilder extends + // @@protoc_insertion_point(interface_extends:CSWebEnterRoom) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string token = 1;</code> + * @return The token. + */ + java.lang.String getToken(); + /** + * <code>string token = 1;</code> + * @return The bytes for token. + */ + com.google.protobuf.ByteString + getTokenBytes(); + + /** + * <code>string liveStreamId = 2;</code> + * @return The liveStreamId. + */ + java.lang.String getLiveStreamId(); + /** + * <code>string liveStreamId = 2;</code> + * @return The bytes for liveStreamId. + */ + com.google.protobuf.ByteString + getLiveStreamIdBytes(); + + /** + * <code>uint32 reconnectCount = 3;</code> + * @return The reconnectCount. + */ + int getReconnectCount(); + + /** + * <code>uint32 lastErrorCode = 4;</code> + * @return The lastErrorCode. + */ + int getLastErrorCode(); + + /** + * <code>string expTag = 5;</code> + * @return The expTag. + */ + java.lang.String getExpTag(); + /** + * <code>string expTag = 5;</code> + * @return The bytes for expTag. + */ + com.google.protobuf.ByteString + getExpTagBytes(); + + /** + * <code>string attach = 6;</code> + * @return The attach. + */ + java.lang.String getAttach(); + /** + * <code>string attach = 6;</code> + * @return The bytes for attach. + */ + com.google.protobuf.ByteString + getAttachBytes(); + + /** + * <code>string pageId = 7;</code> + * @return The pageId. + */ + java.lang.String getPageId(); + /** + * <code>string pageId = 7;</code> + * @return The bytes for pageId. + */ + com.google.protobuf.ByteString + getPageIdBytes(); + } + /** + * Protobuf type {@code CSWebEnterRoom} + */ + public static final class CSWebEnterRoom extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:CSWebEnterRoom) + CSWebEnterRoomOrBuilder { + private static final long serialVersionUID = 0L; + // Use CSWebEnterRoom.newBuilder() to construct. + private CSWebEnterRoom(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private CSWebEnterRoom() { + token_ = ""; + liveStreamId_ = ""; + expTag_ = ""; + attach_ = ""; + pageId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CSWebEnterRoom(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.internal_static_CSWebEnterRoom_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.internal_static_CSWebEnterRoom_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom.Builder.class); + } + + public static final int TOKEN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object token_ = ""; + /** + * <code>string token = 1;</code> + * @return The token. + */ + @java.lang.Override + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } + } + /** + * <code>string token = 1;</code> + * @return The bytes for token. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LIVESTREAMID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object liveStreamId_ = ""; + /** + * <code>string liveStreamId = 2;</code> + * @return The liveStreamId. + */ + @java.lang.Override + public java.lang.String getLiveStreamId() { + java.lang.Object ref = liveStreamId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + liveStreamId_ = s; + return s; + } + } + /** + * <code>string liveStreamId = 2;</code> + * @return The bytes for liveStreamId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLiveStreamIdBytes() { + java.lang.Object ref = liveStreamId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + liveStreamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RECONNECTCOUNT_FIELD_NUMBER = 3; + private int reconnectCount_ = 0; + /** + * <code>uint32 reconnectCount = 3;</code> + * @return The reconnectCount. + */ + @java.lang.Override + public int getReconnectCount() { + return reconnectCount_; + } + + public static final int LASTERRORCODE_FIELD_NUMBER = 4; + private int lastErrorCode_ = 0; + /** + * <code>uint32 lastErrorCode = 4;</code> + * @return The lastErrorCode. + */ + @java.lang.Override + public int getLastErrorCode() { + return lastErrorCode_; + } + + public static final int EXPTAG_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object expTag_ = ""; + /** + * <code>string expTag = 5;</code> + * @return The expTag. + */ + @java.lang.Override + public java.lang.String getExpTag() { + java.lang.Object ref = expTag_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + expTag_ = s; + return s; + } + } + /** + * <code>string expTag = 5;</code> + * @return The bytes for expTag. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExpTagBytes() { + java.lang.Object ref = expTag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + expTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTACH_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object attach_ = ""; + /** + * <code>string attach = 6;</code> + * @return The attach. + */ + @java.lang.Override + public java.lang.String getAttach() { + java.lang.Object ref = attach_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attach_ = s; + return s; + } + } + /** + * <code>string attach = 6;</code> + * @return The bytes for attach. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAttachBytes() { + java.lang.Object ref = attach_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attach_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGEID_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object pageId_ = ""; + /** + * <code>string pageId = 7;</code> + * @return The pageId. + */ + @java.lang.Override + public java.lang.String getPageId() { + java.lang.Object ref = pageId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageId_ = s; + return s; + } + } + /** + * <code>string pageId = 7;</code> + * @return The bytes for pageId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPageIdBytes() { + java.lang.Object ref = pageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, token_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(liveStreamId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, liveStreamId_); + } + if (reconnectCount_ != 0) { + output.writeUInt32(3, reconnectCount_); + } + if (lastErrorCode_ != 0) { + output.writeUInt32(4, lastErrorCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expTag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, expTag_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attach_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, attach_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, pageId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, token_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(liveStreamId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, liveStreamId_); + } + if (reconnectCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, reconnectCount_); + } + if (lastErrorCode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, lastErrorCode_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(expTag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, expTag_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attach_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, attach_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, pageId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom) obj; + + if (!getToken() + .equals(other.getToken())) return false; + if (!getLiveStreamId() + .equals(other.getLiveStreamId())) return false; + if (getReconnectCount() + != other.getReconnectCount()) return false; + if (getLastErrorCode() + != other.getLastErrorCode()) return false; + if (!getExpTag() + .equals(other.getExpTag())) return false; + if (!getAttach() + .equals(other.getAttach())) return false; + if (!getPageId() + .equals(other.getPageId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getToken().hashCode(); + hash = (37 * hash) + LIVESTREAMID_FIELD_NUMBER; + hash = (53 * hash) + getLiveStreamId().hashCode(); + hash = (37 * hash) + RECONNECTCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getReconnectCount(); + hash = (37 * hash) + LASTERRORCODE_FIELD_NUMBER; + hash = (53 * hash) + getLastErrorCode(); + hash = (37 * hash) + EXPTAG_FIELD_NUMBER; + hash = (53 * hash) + getExpTag().hashCode(); + hash = (37 * hash) + ATTACH_FIELD_NUMBER; + hash = (53 * hash) + getAttach().hashCode(); + hash = (37 * hash) + PAGEID_FIELD_NUMBER; + hash = (53 * hash) + getPageId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code CSWebEnterRoom} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:CSWebEnterRoom) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoomOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.internal_static_CSWebEnterRoom_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.internal_static_CSWebEnterRoom_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + token_ = ""; + liveStreamId_ = ""; + reconnectCount_ = 0; + lastErrorCode_ = 0; + expTag_ = ""; + attach_ = ""; + pageId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.internal_static_CSWebEnterRoom_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.token_ = token_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.liveStreamId_ = liveStreamId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.reconnectCount_ = reconnectCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.lastErrorCode_ = lastErrorCode_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.expTag_ = expTag_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.attach_ = attach_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.pageId_ = pageId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom.getDefaultInstance()) return this; + if (!other.getToken().isEmpty()) { + token_ = other.token_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getLiveStreamId().isEmpty()) { + liveStreamId_ = other.liveStreamId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getReconnectCount() != 0) { + setReconnectCount(other.getReconnectCount()); + } + if (other.getLastErrorCode() != 0) { + setLastErrorCode(other.getLastErrorCode()); + } + if (!other.getExpTag().isEmpty()) { + expTag_ = other.expTag_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getAttach().isEmpty()) { + attach_ = other.attach_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getPageId().isEmpty()) { + pageId_ = other.pageId_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + token_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + liveStreamId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + reconnectCount_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + lastErrorCode_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + expTag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + attach_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + pageId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object token_ = ""; + /** + * <code>string token = 1;</code> + * @return The token. + */ + public java.lang.String getToken() { + java.lang.Object ref = token_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + token_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string token = 1;</code> + * @return The bytes for token. + */ + public com.google.protobuf.ByteString + getTokenBytes() { + java.lang.Object ref = token_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + token_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string token = 1;</code> + * @param value The token to set. + * @return This builder for chaining. + */ + public Builder setToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string token = 1;</code> + * @return This builder for chaining. + */ + public Builder clearToken() { + token_ = getDefaultInstance().getToken(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string token = 1;</code> + * @param value The bytes for token to set. + * @return This builder for chaining. + */ + public Builder setTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + token_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object liveStreamId_ = ""; + /** + * <code>string liveStreamId = 2;</code> + * @return The liveStreamId. + */ + public java.lang.String getLiveStreamId() { + java.lang.Object ref = liveStreamId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + liveStreamId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string liveStreamId = 2;</code> + * @return The bytes for liveStreamId. + */ + public com.google.protobuf.ByteString + getLiveStreamIdBytes() { + java.lang.Object ref = liveStreamId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + liveStreamId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string liveStreamId = 2;</code> + * @param value The liveStreamId to set. + * @return This builder for chaining. + */ + public Builder setLiveStreamId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + liveStreamId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string liveStreamId = 2;</code> + * @return This builder for chaining. + */ + public Builder clearLiveStreamId() { + liveStreamId_ = getDefaultInstance().getLiveStreamId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string liveStreamId = 2;</code> + * @param value The bytes for liveStreamId to set. + * @return This builder for chaining. + */ + public Builder setLiveStreamIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + liveStreamId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int reconnectCount_ ; + /** + * <code>uint32 reconnectCount = 3;</code> + * @return The reconnectCount. + */ + @java.lang.Override + public int getReconnectCount() { + return reconnectCount_; + } + /** + * <code>uint32 reconnectCount = 3;</code> + * @param value The reconnectCount to set. + * @return This builder for chaining. + */ + public Builder setReconnectCount(int value) { + + reconnectCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint32 reconnectCount = 3;</code> + * @return This builder for chaining. + */ + public Builder clearReconnectCount() { + bitField0_ = (bitField0_ & ~0x00000004); + reconnectCount_ = 0; + onChanged(); + return this; + } + + private int lastErrorCode_ ; + /** + * <code>uint32 lastErrorCode = 4;</code> + * @return The lastErrorCode. + */ + @java.lang.Override + public int getLastErrorCode() { + return lastErrorCode_; + } + /** + * <code>uint32 lastErrorCode = 4;</code> + * @param value The lastErrorCode to set. + * @return This builder for chaining. + */ + public Builder setLastErrorCode(int value) { + + lastErrorCode_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint32 lastErrorCode = 4;</code> + * @return This builder for chaining. + */ + public Builder clearLastErrorCode() { + bitField0_ = (bitField0_ & ~0x00000008); + lastErrorCode_ = 0; + onChanged(); + return this; + } + + private java.lang.Object expTag_ = ""; + /** + * <code>string expTag = 5;</code> + * @return The expTag. + */ + public java.lang.String getExpTag() { + java.lang.Object ref = expTag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + expTag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string expTag = 5;</code> + * @return The bytes for expTag. + */ + public com.google.protobuf.ByteString + getExpTagBytes() { + java.lang.Object ref = expTag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + expTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string expTag = 5;</code> + * @param value The expTag to set. + * @return This builder for chaining. + */ + public Builder setExpTag( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + expTag_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>string expTag = 5;</code> + * @return This builder for chaining. + */ + public Builder clearExpTag() { + expTag_ = getDefaultInstance().getExpTag(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * <code>string expTag = 5;</code> + * @param value The bytes for expTag to set. + * @return This builder for chaining. + */ + public Builder setExpTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + expTag_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object attach_ = ""; + /** + * <code>string attach = 6;</code> + * @return The attach. + */ + public java.lang.String getAttach() { + java.lang.Object ref = attach_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attach_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string attach = 6;</code> + * @return The bytes for attach. + */ + public com.google.protobuf.ByteString + getAttachBytes() { + java.lang.Object ref = attach_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attach_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string attach = 6;</code> + * @param value The attach to set. + * @return This builder for chaining. + */ + public Builder setAttach( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + attach_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>string attach = 6;</code> + * @return This builder for chaining. + */ + public Builder clearAttach() { + attach_ = getDefaultInstance().getAttach(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * <code>string attach = 6;</code> + * @param value The bytes for attach to set. + * @return This builder for chaining. + */ + public Builder setAttachBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + attach_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object pageId_ = ""; + /** + * <code>string pageId = 7;</code> + * @return The pageId. + */ + public java.lang.String getPageId() { + java.lang.Object ref = pageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string pageId = 7;</code> + * @return The bytes for pageId. + */ + public com.google.protobuf.ByteString + getPageIdBytes() { + java.lang.Object ref = pageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string pageId = 7;</code> + * @param value The pageId to set. + * @return This builder for chaining. + */ + public Builder setPageId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + pageId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>string pageId = 7;</code> + * @return This builder for chaining. + */ + public Builder clearPageId() { + pageId_ = getDefaultInstance().getPageId(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * <code>string pageId = 7;</code> + * @param value The bytes for pageId to set. + * @return This builder for chaining. + */ + public Builder setPageIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + pageId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:CSWebEnterRoom) + } + + // @@protoc_insertion_point(class_scope:CSWebEnterRoom) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<CSWebEnterRoom> + PARSER = new com.google.protobuf.AbstractParser<CSWebEnterRoom>() { + @java.lang.Override + public CSWebEnterRoom parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<CSWebEnterRoom> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<CSWebEnterRoom> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebEnterRoomOuterClass.CSWebEnterRoom getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_CSWebEnterRoom_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_CSWebEnterRoom_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024CSWebEnterRoom.proto\"\224\001\n\016CSWebEnterRoo" + + "m\022\r\n\005token\030\001 \001(\t\022\024\n\014liveStreamId\030\002 \001(\t\022\026" + + "\n\016reconnectCount\030\003 \001(\r\022\025\n\rlastErrorCode\030" + + "\004 \001(\r\022\016\n\006expTag\030\005 \001(\t\022\016\n\006attach\030\006 \001(\t\022\016\n" + + "\006pageId\030\007 \001(\tB6\n4tech.ordinaryroad.live." + + "chat.client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_CSWebEnterRoom_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CSWebEnterRoom_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_CSWebEnterRoom_descriptor, + new java.lang.String[] { "Token", "LiveStreamId", "ReconnectCount", "LastErrorCode", "ExpTag", "Attach", "PageId", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebErrorOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebErrorOuterClass.java new file mode 100644 index 0000000..7eacbd5 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebErrorOuterClass.java @@ -0,0 +1,697 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CSWebError.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class CSWebErrorOuterClass { + private CSWebErrorOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface CSWebErrorOrBuilder extends + // @@protoc_insertion_point(interface_extends:CSWebError) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint32 code = 1;</code> + * @return The code. + */ + int getCode(); + + /** + * <code>string msg = 2;</code> + * @return The msg. + */ + java.lang.String getMsg(); + /** + * <code>string msg = 2;</code> + * @return The bytes for msg. + */ + com.google.protobuf.ByteString + getMsgBytes(); + } + /** + * Protobuf type {@code CSWebError} + */ + public static final class CSWebError extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:CSWebError) + CSWebErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use CSWebError.newBuilder() to construct. + private CSWebError(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private CSWebError() { + msg_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CSWebError(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.internal_static_CSWebError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.internal_static_CSWebError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + /** + * <code>uint32 code = 1;</code> + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + + public static final int MSG_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object msg_ = ""; + /** + * <code>string msg = 2;</code> + * @return The msg. + */ + @java.lang.Override + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } + } + /** + * <code>string msg = 2;</code> + * @return The bytes for msg. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (code_ != 0) { + output.writeUInt32(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, msg_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, msg_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError) obj; + + if (getCode() + != other.getCode()) return false; + if (!getMsg() + .equals(other.getMsg())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode(); + hash = (37 * hash) + MSG_FIELD_NUMBER; + hash = (53 * hash) + getMsg().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code CSWebError} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:CSWebError) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.internal_static_CSWebError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.internal_static_CSWebError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + msg_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.internal_static_CSWebError_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.msg_ = msg_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError.getDefaultInstance()) return this; + if (other.getCode() != 0) { + setCode(other.getCode()); + } + if (!other.getMsg().isEmpty()) { + msg_ = other.msg_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + code_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + msg_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int code_ ; + /** + * <code>uint32 code = 1;</code> + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + /** + * <code>uint32 code = 1;</code> + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(int value) { + + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint32 code = 1;</code> + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object msg_ = ""; + /** + * <code>string msg = 2;</code> + * @return The msg. + */ + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string msg = 2;</code> + * @return The bytes for msg. + */ + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string msg = 2;</code> + * @param value The msg to set. + * @return This builder for chaining. + */ + public Builder setMsg( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string msg = 2;</code> + * @return This builder for chaining. + */ + public Builder clearMsg() { + msg_ = getDefaultInstance().getMsg(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string msg = 2;</code> + * @param value The bytes for msg to set. + * @return This builder for chaining. + */ + public Builder setMsgBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:CSWebError) + } + + // @@protoc_insertion_point(class_scope:CSWebError) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<CSWebError> + PARSER = new com.google.protobuf.AbstractParser<CSWebError>() { + @java.lang.Override + public CSWebError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<CSWebError> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<CSWebError> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebErrorOuterClass.CSWebError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_CSWebError_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_CSWebError_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\020CSWebError.proto\"\'\n\nCSWebError\022\014\n\004code" + + "\030\001 \001(\r\022\013\n\003msg\030\002 \001(\tB6\n4tech.ordinaryroad" + + ".live.chat.client.kuaishou.protobufb\006pro" + + "to3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_CSWebError_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CSWebError_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_CSWebError_descriptor, + new java.lang.String[] { "Code", "Msg", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebHeartbeatOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebHeartbeatOuterClass.java new file mode 100644 index 0000000..f2c5d4e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebHeartbeatOuterClass.java @@ -0,0 +1,550 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CSWebHeartbeat.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class CSWebHeartbeatOuterClass { + private CSWebHeartbeatOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface CSWebHeartbeatOrBuilder extends + // @@protoc_insertion_point(interface_extends:CSWebHeartbeat) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 timestamp = 1;</code> + * @return The timestamp. + */ + long getTimestamp(); + } + /** + * Protobuf type {@code CSWebHeartbeat} + */ + public static final class CSWebHeartbeat extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:CSWebHeartbeat) + CSWebHeartbeatOrBuilder { + private static final long serialVersionUID = 0L; + // Use CSWebHeartbeat.newBuilder() to construct. + private CSWebHeartbeat(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private CSWebHeartbeat() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CSWebHeartbeat(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.internal_static_CSWebHeartbeat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.internal_static_CSWebHeartbeat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat.Builder.class); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 1; + private long timestamp_ = 0L; + /** + * <code>uint64 timestamp = 1;</code> + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (timestamp_ != 0L) { + output.writeUInt64(1, timestamp_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, timestamp_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat) obj; + + if (getTimestamp() + != other.getTimestamp()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTimestamp()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code CSWebHeartbeat} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:CSWebHeartbeat) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeatOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.internal_static_CSWebHeartbeat_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.internal_static_CSWebHeartbeat_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + timestamp_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.internal_static_CSWebHeartbeat_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.timestamp_ = timestamp_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat.getDefaultInstance()) return this; + if (other.getTimestamp() != 0L) { + setTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + timestamp_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long timestamp_ ; + /** + * <code>uint64 timestamp = 1;</code> + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + /** + * <code>uint64 timestamp = 1;</code> + * @param value The timestamp to set. + * @return This builder for chaining. + */ + public Builder setTimestamp(long value) { + + timestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 timestamp = 1;</code> + * @return This builder for chaining. + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + timestamp_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:CSWebHeartbeat) + } + + // @@protoc_insertion_point(class_scope:CSWebHeartbeat) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<CSWebHeartbeat> + PARSER = new com.google.protobuf.AbstractParser<CSWebHeartbeat>() { + @java.lang.Override + public CSWebHeartbeat parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<CSWebHeartbeat> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<CSWebHeartbeat> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebHeartbeatOuterClass.CSWebHeartbeat getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_CSWebHeartbeat_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_CSWebHeartbeat_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024CSWebHeartbeat.proto\"#\n\016CSWebHeartbeat" + + "\022\021\n\ttimestamp\030\001 \001(\004B6\n4tech.ordinaryroad" + + ".live.chat.client.kuaishou.protobufb\006pro" + + "to3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_CSWebHeartbeat_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CSWebHeartbeat_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_CSWebHeartbeat_descriptor, + new java.lang.String[] { "Timestamp", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebUserExitOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebUserExitOuterClass.java new file mode 100644 index 0000000..ebd72e5 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebUserExitOuterClass.java @@ -0,0 +1,549 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CSWebUserExit.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class CSWebUserExitOuterClass { + private CSWebUserExitOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface CSWebUserExitOrBuilder extends + // @@protoc_insertion_point(interface_extends:CSWebUserExit) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + long getTime(); + } + /** + * Protobuf type {@code CSWebUserExit} + */ + public static final class CSWebUserExit extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:CSWebUserExit) + CSWebUserExitOrBuilder { + private static final long serialVersionUID = 0L; + // Use CSWebUserExit.newBuilder() to construct. + private CSWebUserExit(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private CSWebUserExit() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CSWebUserExit(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.internal_static_CSWebUserExit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.internal_static_CSWebUserExit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_ = 0L; + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit) obj; + + if (getTime() + != other.getTime()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code CSWebUserExit} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:CSWebUserExit) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExitOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.internal_static_CSWebUserExit_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.internal_static_CSWebUserExit_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + time_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.internal_static_CSWebUserExit_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.time_ = time_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long time_ ; + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * <code>uint64 time = 1;</code> + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 time = 1;</code> + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:CSWebUserExit) + } + + // @@protoc_insertion_point(class_scope:CSWebUserExit) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<CSWebUserExit> + PARSER = new com.google.protobuf.AbstractParser<CSWebUserExit>() { + @java.lang.Override + public CSWebUserExit parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<CSWebUserExit> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<CSWebUserExit> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserExitOuterClass.CSWebUserExit getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_CSWebUserExit_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_CSWebUserExit_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\023CSWebUserExit.proto\"\035\n\rCSWebUserExit\022\014" + + "\n\004time\030\001 \001(\004B6\n4tech.ordinaryroad.live.c" + + "hat.client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_CSWebUserExit_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CSWebUserExit_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_CSWebUserExit_descriptor, + new java.lang.String[] { "Time", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebUserPauseOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebUserPauseOuterClass.java new file mode 100644 index 0000000..a5527f1 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/CSWebUserPauseOuterClass.java @@ -0,0 +1,658 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: CSWebUserPause.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class CSWebUserPauseOuterClass { + private CSWebUserPauseOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface CSWebUserPauseOrBuilder extends + // @@protoc_insertion_point(interface_extends:CSWebUserPause) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + long getTime(); + + /** + * <code>.WebUserPauseType pauseType = 2;</code> + * @return The enum numeric value on the wire for pauseType. + */ + int getPauseTypeValue(); + /** + * <code>.WebUserPauseType pauseType = 2;</code> + * @return The pauseType. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType getPauseType(); + } + /** + * Protobuf type {@code CSWebUserPause} + */ + public static final class CSWebUserPause extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:CSWebUserPause) + CSWebUserPauseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CSWebUserPause.newBuilder() to construct. + private CSWebUserPause(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private CSWebUserPause() { + pauseType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CSWebUserPause(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.internal_static_CSWebUserPause_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.internal_static_CSWebUserPause_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_ = 0L; + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + public static final int PAUSETYPE_FIELD_NUMBER = 2; + private int pauseType_ = 0; + /** + * <code>.WebUserPauseType pauseType = 2;</code> + * @return The enum numeric value on the wire for pauseType. + */ + @java.lang.Override public int getPauseTypeValue() { + return pauseType_; + } + /** + * <code>.WebUserPauseType pauseType = 2;</code> + * @return The pauseType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType getPauseType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType.forNumber(pauseType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + if (pauseType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType.UNKNOWN_USER_PAUSE_TYPE.getNumber()) { + output.writeEnum(2, pauseType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + if (pauseType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType.UNKNOWN_USER_PAUSE_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, pauseType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause) obj; + + if (getTime() + != other.getTime()) return false; + if (pauseType_ != other.pauseType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + PAUSETYPE_FIELD_NUMBER; + hash = (53 * hash) + pauseType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code CSWebUserPause} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:CSWebUserPause) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPauseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.internal_static_CSWebUserPause_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.internal_static_CSWebUserPause_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + time_ = 0L; + pauseType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.internal_static_CSWebUserPause_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.time_ = time_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pauseType_ = pauseType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (other.pauseType_ != 0) { + setPauseTypeValue(other.getPauseTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + pauseType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long time_ ; + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * <code>uint64 time = 1;</code> + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 time = 1;</code> + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0L; + onChanged(); + return this; + } + + private int pauseType_ = 0; + /** + * <code>.WebUserPauseType pauseType = 2;</code> + * @return The enum numeric value on the wire for pauseType. + */ + @java.lang.Override public int getPauseTypeValue() { + return pauseType_; + } + /** + * <code>.WebUserPauseType pauseType = 2;</code> + * @param value The enum numeric value on the wire for pauseType to set. + * @return This builder for chaining. + */ + public Builder setPauseTypeValue(int value) { + pauseType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.WebUserPauseType pauseType = 2;</code> + * @return The pauseType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType getPauseType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType.forNumber(pauseType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType.UNRECOGNIZED : result; + } + /** + * <code>.WebUserPauseType pauseType = 2;</code> + * @param value The pauseType to set. + * @return This builder for chaining. + */ + public Builder setPauseType(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebUserPauseTypeOuterClass.WebUserPauseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + pauseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * <code>.WebUserPauseType pauseType = 2;</code> + * @return This builder for chaining. + */ + public Builder clearPauseType() { + bitField0_ = (bitField0_ & ~0x00000002); + pauseType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:CSWebUserPause) + } + + // @@protoc_insertion_point(class_scope:CSWebUserPause) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<CSWebUserPause> + PARSER = new com.google.protobuf.AbstractParser<CSWebUserPause>() { + @java.lang.Override + public CSWebUserPause parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<CSWebUserPause> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<CSWebUserPause> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.CSWebUserPauseOuterClass.CSWebUserPause getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_CSWebUserPause_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_CSWebUserPause_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024CSWebUserPause.proto\032\026WebUserPauseType" + + ".proto\"D\n\016CSWebUserPause\022\014\n\004time\030\001 \001(\004\022$" + + "\n\tpauseType\030\002 \001(\0162\021.WebUserPauseTypeB6\n4" + + "tech.ordinaryroad.live.chat.client.kuais" + + "hou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebUserPauseTypeOuterClass.getDescriptor(), + }); + internal_static_CSWebUserPause_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CSWebUserPause_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_CSWebUserPause_descriptor, + new java.lang.String[] { "Time", "PauseType", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebUserPauseTypeOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/ClientIdOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/ClientIdOuterClass.java new file mode 100644 index 0000000..41434de --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/ClientIdOuterClass.java @@ -0,0 +1,216 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ClientId.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class ClientIdOuterClass { + private ClientIdOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code ClientId} + */ + public enum ClientId + implements com.google.protobuf.ProtocolMessageEnum { + /** + * <code>NONE = 0;</code> + */ + NONE(0), + /** + * <code>IPHONE = 1;</code> + */ + IPHONE(1), + /** + * <code>ANDROID = 2;</code> + */ + ANDROID(2), + /** + * <code>WEB = 3;</code> + */ + WEB(3), + /** + * <code>PC = 6;</code> + */ + PC(6), + /** + * <code>IPHONE_LIVE_MATE = 8;</code> + */ + IPHONE_LIVE_MATE(8), + /** + * <code>ANDROID_LIVE_MATE = 9;</code> + */ + ANDROID_LIVE_MATE(9), + UNRECOGNIZED(-1), + ; + + /** + * <code>NONE = 0;</code> + */ + public static final int NONE_VALUE = 0; + /** + * <code>IPHONE = 1;</code> + */ + public static final int IPHONE_VALUE = 1; + /** + * <code>ANDROID = 2;</code> + */ + public static final int ANDROID_VALUE = 2; + /** + * <code>WEB = 3;</code> + */ + public static final int WEB_VALUE = 3; + /** + * <code>PC = 6;</code> + */ + public static final int PC_VALUE = 6; + /** + * <code>IPHONE_LIVE_MATE = 8;</code> + */ + public static final int IPHONE_LIVE_MATE_VALUE = 8; + /** + * <code>ANDROID_LIVE_MATE = 9;</code> + */ + public static final int ANDROID_LIVE_MATE_VALUE = 9; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ClientId valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ClientId forNumber(int value) { + switch (value) { + case 0: return NONE; + case 1: return IPHONE; + case 2: return ANDROID; + case 3: return WEB; + case 6: return PC; + case 8: return IPHONE_LIVE_MATE; + case 9: return ANDROID_LIVE_MATE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap<ClientId> + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ClientId> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap<ClientId>() { + public ClientId findValueByNumber(int number) { + return ClientId.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ClientIdOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final ClientId[] VALUES = values(); + + public static ClientId valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ClientId(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:ClientId) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\016ClientId.proto*k\n\010ClientId\022\010\n\004NONE\020\000\022\n" + + "\n\006IPHONE\020\001\022\013\n\007ANDROID\020\002\022\007\n\003WEB\020\003\022\006\n\002PC\020\006" + + "\022\024\n\020IPHONE_LIVE_MATE\020\010\022\025\n\021ANDROID_LIVE_M" + + "ATE\020\tB6\n4tech.ordinaryroad.live.chat.cli" + + "ent.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/ConfigSwitchItemOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/ConfigSwitchItemOuterClass.java new file mode 100644 index 0000000..f73716d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/ConfigSwitchItemOuterClass.java @@ -0,0 +1,658 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ConfigSwitchItem.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class ConfigSwitchItemOuterClass { + private ConfigSwitchItemOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ConfigSwitchItemOrBuilder extends + // @@protoc_insertion_point(interface_extends:ConfigSwitchItem) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.ConfigSwitchType configSwitchType = 1;</code> + * @return The enum numeric value on the wire for configSwitchType. + */ + int getConfigSwitchTypeValue(); + /** + * <code>.ConfigSwitchType configSwitchType = 1;</code> + * @return The configSwitchType. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType getConfigSwitchType(); + + /** + * <code>bool value = 2;</code> + * @return The value. + */ + boolean getValue(); + } + /** + * Protobuf type {@code ConfigSwitchItem} + */ + public static final class ConfigSwitchItem extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:ConfigSwitchItem) + ConfigSwitchItemOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConfigSwitchItem.newBuilder() to construct. + private ConfigSwitchItem(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private ConfigSwitchItem() { + configSwitchType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ConfigSwitchItem(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.internal_static_ConfigSwitchItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.internal_static_ConfigSwitchItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder.class); + } + + public static final int CONFIGSWITCHTYPE_FIELD_NUMBER = 1; + private int configSwitchType_ = 0; + /** + * <code>.ConfigSwitchType configSwitchType = 1;</code> + * @return The enum numeric value on the wire for configSwitchType. + */ + @java.lang.Override public int getConfigSwitchTypeValue() { + return configSwitchType_; + } + /** + * <code>.ConfigSwitchType configSwitchType = 1;</code> + * @return The configSwitchType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType getConfigSwitchType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType.forNumber(configSwitchType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType.UNRECOGNIZED : result; + } + + public static final int VALUE_FIELD_NUMBER = 2; + private boolean value_ = false; + /** + * <code>bool value = 2;</code> + * @return The value. + */ + @java.lang.Override + public boolean getValue() { + return value_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (configSwitchType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType.UNKNOWN.getNumber()) { + output.writeEnum(1, configSwitchType_); + } + if (value_ != false) { + output.writeBool(2, value_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (configSwitchType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, configSwitchType_); + } + if (value_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem) obj; + + if (configSwitchType_ != other.configSwitchType_) return false; + if (getValue() + != other.getValue()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONFIGSWITCHTYPE_FIELD_NUMBER; + hash = (53 * hash) + configSwitchType_; + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getValue()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code ConfigSwitchItem} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:ConfigSwitchItem) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.internal_static_ConfigSwitchItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.internal_static_ConfigSwitchItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + configSwitchType_ = 0; + value_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.internal_static_ConfigSwitchItem_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.configSwitchType_ = configSwitchType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.getDefaultInstance()) return this; + if (other.configSwitchType_ != 0) { + setConfigSwitchTypeValue(other.getConfigSwitchTypeValue()); + } + if (other.getValue() != false) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + configSwitchType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + value_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int configSwitchType_ = 0; + /** + * <code>.ConfigSwitchType configSwitchType = 1;</code> + * @return The enum numeric value on the wire for configSwitchType. + */ + @java.lang.Override public int getConfigSwitchTypeValue() { + return configSwitchType_; + } + /** + * <code>.ConfigSwitchType configSwitchType = 1;</code> + * @param value The enum numeric value on the wire for configSwitchType to set. + * @return This builder for chaining. + */ + public Builder setConfigSwitchTypeValue(int value) { + configSwitchType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.ConfigSwitchType configSwitchType = 1;</code> + * @return The configSwitchType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType getConfigSwitchType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType.forNumber(configSwitchType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType.UNRECOGNIZED : result; + } + /** + * <code>.ConfigSwitchType configSwitchType = 1;</code> + * @param value The configSwitchType to set. + * @return This builder for chaining. + */ + public Builder setConfigSwitchType(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchTypeOuterClass.ConfigSwitchType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + configSwitchType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * <code>.ConfigSwitchType configSwitchType = 1;</code> + * @return This builder for chaining. + */ + public Builder clearConfigSwitchType() { + bitField0_ = (bitField0_ & ~0x00000001); + configSwitchType_ = 0; + onChanged(); + return this; + } + + private boolean value_ ; + /** + * <code>bool value = 2;</code> + * @return The value. + */ + @java.lang.Override + public boolean getValue() { + return value_; + } + /** + * <code>bool value = 2;</code> + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(boolean value) { + + value_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>bool value = 2;</code> + * @return This builder for chaining. + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:ConfigSwitchItem) + } + + // @@protoc_insertion_point(class_scope:ConfigSwitchItem) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<ConfigSwitchItem> + PARSER = new com.google.protobuf.AbstractParser<ConfigSwitchItem>() { + @java.lang.Override + public ConfigSwitchItem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<ConfigSwitchItem> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<ConfigSwitchItem> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_ConfigSwitchItem_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_ConfigSwitchItem_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026ConfigSwitchItem.proto\032\026ConfigSwitchTy" + + "pe.proto\"N\n\020ConfigSwitchItem\022+\n\020configSw" + + "itchType\030\001 \001(\0162\021.ConfigSwitchType\022\r\n\005val" + + "ue\030\002 \001(\010B6\n4tech.ordinaryroad.live.chat." + + "client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchTypeOuterClass.getDescriptor(), + }); + internal_static_ConfigSwitchItem_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_ConfigSwitchItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_ConfigSwitchItem_descriptor, + new java.lang.String[] { "ConfigSwitchType", "Value", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchTypeOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/ConfigSwitchTypeOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/ConfigSwitchTypeOuterClass.java new file mode 100644 index 0000000..0a53ef2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/ConfigSwitchTypeOuterClass.java @@ -0,0 +1,180 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ConfigSwitchType.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class ConfigSwitchTypeOuterClass { + private ConfigSwitchTypeOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code ConfigSwitchType} + */ + public enum ConfigSwitchType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * <code>UNKNOWN = 0;</code> + */ + UNKNOWN(0), + /** + * <code>HIDE_BARRAGE = 1;</code> + */ + HIDE_BARRAGE(1), + /** + * <code>HIDE_SPECIAL_EFFECT = 2;</code> + */ + HIDE_SPECIAL_EFFECT(2), + UNRECOGNIZED(-1), + ; + + /** + * <code>UNKNOWN = 0;</code> + */ + public static final int UNKNOWN_VALUE = 0; + /** + * <code>HIDE_BARRAGE = 1;</code> + */ + public static final int HIDE_BARRAGE_VALUE = 1; + /** + * <code>HIDE_SPECIAL_EFFECT = 2;</code> + */ + public static final int HIDE_SPECIAL_EFFECT_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ConfigSwitchType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static ConfigSwitchType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return HIDE_BARRAGE; + case 2: return HIDE_SPECIAL_EFFECT; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap<ConfigSwitchType> + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ConfigSwitchType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap<ConfigSwitchType>() { + public ConfigSwitchType findValueByNumber(int number) { + return ConfigSwitchType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchTypeOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final ConfigSwitchType[] VALUES = values(); + + public static ConfigSwitchType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private ConfigSwitchType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:ConfigSwitchType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026ConfigSwitchType.proto*J\n\020ConfigSwitch" + + "Type\022\013\n\007UNKNOWN\020\000\022\020\n\014HIDE_BARRAGE\020\001\022\027\n\023H" + + "IDE_SPECIAL_EFFECT\020\002B6\n4tech.ordinaryroa" + + "d.live.chat.client.kuaishou.protobufb\006pr" + + "oto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/GzoneNameplateOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/GzoneNameplateOuterClass.java new file mode 100644 index 0000000..318cd1d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/GzoneNameplateOuterClass.java @@ -0,0 +1,1079 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: GzoneNameplate.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class GzoneNameplateOuterClass { + private GzoneNameplateOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface GzoneNameplateOrBuilder extends + // @@protoc_insertion_point(interface_extends:GzoneNameplate) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>int64 id = 1;</code> + * @return The id. + */ + long getId(); + + /** + * <code>string name = 2;</code> + * @return The name. + */ + java.lang.String getName(); + /** + * <code>string name = 2;</code> + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> + getUrlsList(); + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl getUrls(int index); + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + int getUrlsCount(); + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> + getUrlsOrBuilderList(); + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getUrlsOrBuilder( + int index); + } + /** + * Protobuf type {@code GzoneNameplate} + */ + public static final class GzoneNameplate extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:GzoneNameplate) + GzoneNameplateOrBuilder { + private static final long serialVersionUID = 0L; + // Use GzoneNameplate.newBuilder() to construct. + private GzoneNameplate(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private GzoneNameplate() { + name_ = ""; + urls_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GzoneNameplate(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.internal_static_GzoneNameplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.internal_static_GzoneNameplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private long id_ = 0L; + /** + * <code>int64 id = 1;</code> + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + + public static final int NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * <code>string name = 2;</code> + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * <code>string name = 2;</code> + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URLS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> urls_; + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> getUrlsList() { + return urls_; + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> + getUrlsOrBuilderList() { + return urls_; + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + @java.lang.Override + public int getUrlsCount() { + return urls_.size(); + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl getUrls(int index) { + return urls_.get(index); + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getUrlsOrBuilder( + int index) { + return urls_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (id_ != 0L) { + output.writeInt64(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + for (int i = 0; i < urls_.size(); i++) { + output.writeMessage(3, urls_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (id_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + for (int i = 0; i < urls_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, urls_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate) obj; + + if (getId() + != other.getId()) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getUrlsList() + .equals(other.getUrlsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getId()); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getUrlsCount() > 0) { + hash = (37 * hash) + URLS_FIELD_NUMBER; + hash = (53 * hash) + getUrlsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code GzoneNameplate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:GzoneNameplate) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.internal_static_GzoneNameplate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.internal_static_GzoneNameplate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = 0L; + name_ = ""; + if (urlsBuilder_ == null) { + urls_ = java.util.Collections.emptyList(); + } else { + urls_ = null; + urlsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.internal_static_GzoneNameplate_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate result) { + if (urlsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + urls_ = java.util.Collections.unmodifiableList(urls_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.urls_ = urls_; + } else { + result.urls_ = urlsBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.getDefaultInstance()) return this; + if (other.getId() != 0L) { + setId(other.getId()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (urlsBuilder_ == null) { + if (!other.urls_.isEmpty()) { + if (urls_.isEmpty()) { + urls_ = other.urls_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUrlsIsMutable(); + urls_.addAll(other.urls_); + } + onChanged(); + } + } else { + if (!other.urls_.isEmpty()) { + if (urlsBuilder_.isEmpty()) { + urlsBuilder_.dispose(); + urlsBuilder_ = null; + urls_ = other.urls_; + bitField0_ = (bitField0_ & ~0x00000004); + urlsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getUrlsFieldBuilder() : null; + } else { + urlsBuilder_.addAllMessages(other.urls_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + id_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl m = + input.readMessage( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.parser(), + extensionRegistry); + if (urlsBuilder_ == null) { + ensureUrlsIsMutable(); + urls_.add(m); + } else { + urlsBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long id_ ; + /** + * <code>int64 id = 1;</code> + * @return The id. + */ + @java.lang.Override + public long getId() { + return id_; + } + /** + * <code>int64 id = 1;</code> + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(long value) { + + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>int64 id = 1;</code> + * @return This builder for chaining. + */ + public Builder clearId() { + bitField0_ = (bitField0_ & ~0x00000001); + id_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * <code>string name = 2;</code> + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string name = 2;</code> + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string name = 2;</code> + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string name = 2;</code> + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string name = 2;</code> + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> urls_ = + java.util.Collections.emptyList(); + private void ensureUrlsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + urls_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl>(urls_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> urlsBuilder_; + + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> getUrlsList() { + if (urlsBuilder_ == null) { + return java.util.Collections.unmodifiableList(urls_); + } else { + return urlsBuilder_.getMessageList(); + } + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public int getUrlsCount() { + if (urlsBuilder_ == null) { + return urls_.size(); + } else { + return urlsBuilder_.getCount(); + } + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl getUrls(int index) { + if (urlsBuilder_ == null) { + return urls_.get(index); + } else { + return urlsBuilder_.getMessage(index); + } + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public Builder setUrls( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (urlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrlsIsMutable(); + urls_.set(index, value); + onChanged(); + } else { + urlsBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public Builder setUrls( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (urlsBuilder_ == null) { + ensureUrlsIsMutable(); + urls_.set(index, builderForValue.build()); + onChanged(); + } else { + urlsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public Builder addUrls(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (urlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrlsIsMutable(); + urls_.add(value); + onChanged(); + } else { + urlsBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public Builder addUrls( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (urlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUrlsIsMutable(); + urls_.add(index, value); + onChanged(); + } else { + urlsBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public Builder addUrls( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (urlsBuilder_ == null) { + ensureUrlsIsMutable(); + urls_.add(builderForValue.build()); + onChanged(); + } else { + urlsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public Builder addUrls( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (urlsBuilder_ == null) { + ensureUrlsIsMutable(); + urls_.add(index, builderForValue.build()); + onChanged(); + } else { + urlsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public Builder addAllUrls( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> values) { + if (urlsBuilder_ == null) { + ensureUrlsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, urls_); + onChanged(); + } else { + urlsBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public Builder clearUrls() { + if (urlsBuilder_ == null) { + urls_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + urlsBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public Builder removeUrls(int index) { + if (urlsBuilder_ == null) { + ensureUrlsIsMutable(); + urls_.remove(index); + onChanged(); + } else { + urlsBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder getUrlsBuilder( + int index) { + return getUrlsFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getUrlsOrBuilder( + int index) { + if (urlsBuilder_ == null) { + return urls_.get(index); } else { + return urlsBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> + getUrlsOrBuilderList() { + if (urlsBuilder_ != null) { + return urlsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(urls_); + } + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder addUrlsBuilder() { + return getUrlsFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.getDefaultInstance()); + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder addUrlsBuilder( + int index) { + return getUrlsFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.getDefaultInstance()); + } + /** + * <code>repeated .PicUrl urls = 3;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder> + getUrlsBuilderList() { + return getUrlsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> + getUrlsFieldBuilder() { + if (urlsBuilder_ == null) { + urlsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder>( + urls_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + urls_ = null; + } + return urlsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:GzoneNameplate) + } + + // @@protoc_insertion_point(class_scope:GzoneNameplate) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<GzoneNameplate> + PARSER = new com.google.protobuf.AbstractParser<GzoneNameplate>() { + @java.lang.Override + public GzoneNameplate parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<GzoneNameplate> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<GzoneNameplate> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GzoneNameplate_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_GzoneNameplate_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024GzoneNameplate.proto\032\014PicUrl.proto\"A\n\016" + + "GzoneNameplate\022\n\n\002id\030\001 \001(\003\022\014\n\004name\030\002 \001(\t" + + "\022\025\n\004urls\030\003 \003(\0132\007.PicUrlB6\n4tech.ordinary" + + "road.live.chat.client.kuaishou.protobufb" + + "\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.getDescriptor(), + }); + internal_static_GzoneNameplate_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_GzoneNameplate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_GzoneNameplate_descriptor, + new java.lang.String[] { "Id", "Name", "Urls", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/LiveAudienceStateOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/LiveAudienceStateOuterClass.java new file mode 100644 index 0000000..b5f94ec --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/LiveAudienceStateOuterClass.java @@ -0,0 +1,1541 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: LiveAudienceState.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class LiveAudienceStateOuterClass { + private LiveAudienceStateOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface LiveAudienceStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:LiveAudienceState) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>bool isFromFansTop = 1;</code> + * @return The isFromFansTop. + */ + boolean getIsFromFansTop(); + + /** + * <code>bool isKoi = 2;</code> + * @return The isKoi. + */ + boolean getIsKoi(); + + /** + * <code>.LiveAudienceState.AssistantType assistantType = 3;</code> + * @return The enum numeric value on the wire for assistantType. + */ + int getAssistantTypeValue(); + /** + * <code>.LiveAudienceState.AssistantType assistantType = 3;</code> + * @return The assistantType. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType getAssistantType(); + + /** + * <code>uint32 fansGroupIntimacyLevel = 4;</code> + * @return The fansGroupIntimacyLevel. + */ + int getFansGroupIntimacyLevel(); + + /** + * <code>.GzoneNameplate nameplate = 5;</code> + * @return Whether the nameplate field is set. + */ + boolean hasNameplate(); + /** + * <code>.GzoneNameplate nameplate = 5;</code> + * @return The nameplate. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate getNameplate(); + /** + * <code>.GzoneNameplate nameplate = 5;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplateOrBuilder getNameplateOrBuilder(); + + /** + * <code>.LiveFansGroupState liveFansGroupState = 6;</code> + * @return Whether the liveFansGroupState field is set. + */ + boolean hasLiveFansGroupState(); + /** + * <code>.LiveFansGroupState liveFansGroupState = 6;</code> + * @return The liveFansGroupState. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState getLiveFansGroupState(); + /** + * <code>.LiveFansGroupState liveFansGroupState = 6;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupStateOrBuilder getLiveFansGroupStateOrBuilder(); + + /** + * <code>uint32 wealthGrade = 7;</code> + * @return The wealthGrade. + */ + int getWealthGrade(); + + /** + * <code>string badgeKey = 8;</code> + * @return The badgeKey. + */ + java.lang.String getBadgeKey(); + /** + * <code>string badgeKey = 8;</code> + * @return The bytes for badgeKey. + */ + com.google.protobuf.ByteString + getBadgeKeyBytes(); + } + /** + * Protobuf type {@code LiveAudienceState} + */ + public static final class LiveAudienceState extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:LiveAudienceState) + LiveAudienceStateOrBuilder { + private static final long serialVersionUID = 0L; + // Use LiveAudienceState.newBuilder() to construct. + private LiveAudienceState(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private LiveAudienceState() { + assistantType_ = 0; + badgeKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LiveAudienceState(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder.class); + } + + /** + * Protobuf enum {@code LiveAudienceState.AssistantType} + */ + public enum AssistantType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * <code>UNKNOWN_ASSISTANT_TYPE = 0;</code> + */ + UNKNOWN_ASSISTANT_TYPE(0), + /** + * <code>SUPER = 1;</code> + */ + SUPER(1), + /** + * <code>JUNIOR = 2;</code> + */ + JUNIOR(2), + UNRECOGNIZED(-1), + ; + + /** + * <code>UNKNOWN_ASSISTANT_TYPE = 0;</code> + */ + public static final int UNKNOWN_ASSISTANT_TYPE_VALUE = 0; + /** + * <code>SUPER = 1;</code> + */ + public static final int SUPER_VALUE = 1; + /** + * <code>JUNIOR = 2;</code> + */ + public static final int JUNIOR_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AssistantType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AssistantType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_ASSISTANT_TYPE; + case 1: return SUPER; + case 2: return JUNIOR; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap<AssistantType> + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + AssistantType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap<AssistantType>() { + public AssistantType findValueByNumber(int number) { + return AssistantType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDescriptor().getEnumTypes().get(0); + } + + private static final AssistantType[] VALUES = values(); + + public static AssistantType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AssistantType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:LiveAudienceState.AssistantType) + } + + public static final int ISFROMFANSTOP_FIELD_NUMBER = 1; + private boolean isFromFansTop_ = false; + /** + * <code>bool isFromFansTop = 1;</code> + * @return The isFromFansTop. + */ + @java.lang.Override + public boolean getIsFromFansTop() { + return isFromFansTop_; + } + + public static final int ISKOI_FIELD_NUMBER = 2; + private boolean isKoi_ = false; + /** + * <code>bool isKoi = 2;</code> + * @return The isKoi. + */ + @java.lang.Override + public boolean getIsKoi() { + return isKoi_; + } + + public static final int ASSISTANTTYPE_FIELD_NUMBER = 3; + private int assistantType_ = 0; + /** + * <code>.LiveAudienceState.AssistantType assistantType = 3;</code> + * @return The enum numeric value on the wire for assistantType. + */ + @java.lang.Override public int getAssistantTypeValue() { + return assistantType_; + } + /** + * <code>.LiveAudienceState.AssistantType assistantType = 3;</code> + * @return The assistantType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType getAssistantType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType.forNumber(assistantType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType.UNRECOGNIZED : result; + } + + public static final int FANSGROUPINTIMACYLEVEL_FIELD_NUMBER = 4; + private int fansGroupIntimacyLevel_ = 0; + /** + * <code>uint32 fansGroupIntimacyLevel = 4;</code> + * @return The fansGroupIntimacyLevel. + */ + @java.lang.Override + public int getFansGroupIntimacyLevel() { + return fansGroupIntimacyLevel_; + } + + public static final int NAMEPLATE_FIELD_NUMBER = 5; + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate nameplate_; + /** + * <code>.GzoneNameplate nameplate = 5;</code> + * @return Whether the nameplate field is set. + */ + @java.lang.Override + public boolean hasNameplate() { + return nameplate_ != null; + } + /** + * <code>.GzoneNameplate nameplate = 5;</code> + * @return The nameplate. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate getNameplate() { + return nameplate_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.getDefaultInstance() : nameplate_; + } + /** + * <code>.GzoneNameplate nameplate = 5;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplateOrBuilder getNameplateOrBuilder() { + return nameplate_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.getDefaultInstance() : nameplate_; + } + + public static final int LIVEFANSGROUPSTATE_FIELD_NUMBER = 6; + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState liveFansGroupState_; + /** + * <code>.LiveFansGroupState liveFansGroupState = 6;</code> + * @return Whether the liveFansGroupState field is set. + */ + @java.lang.Override + public boolean hasLiveFansGroupState() { + return liveFansGroupState_ != null; + } + /** + * <code>.LiveFansGroupState liveFansGroupState = 6;</code> + * @return The liveFansGroupState. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState getLiveFansGroupState() { + return liveFansGroupState_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.getDefaultInstance() : liveFansGroupState_; + } + /** + * <code>.LiveFansGroupState liveFansGroupState = 6;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupStateOrBuilder getLiveFansGroupStateOrBuilder() { + return liveFansGroupState_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.getDefaultInstance() : liveFansGroupState_; + } + + public static final int WEALTHGRADE_FIELD_NUMBER = 7; + private int wealthGrade_ = 0; + /** + * <code>uint32 wealthGrade = 7;</code> + * @return The wealthGrade. + */ + @java.lang.Override + public int getWealthGrade() { + return wealthGrade_; + } + + public static final int BADGEKEY_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private volatile java.lang.Object badgeKey_ = ""; + /** + * <code>string badgeKey = 8;</code> + * @return The badgeKey. + */ + @java.lang.Override + public java.lang.String getBadgeKey() { + java.lang.Object ref = badgeKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + badgeKey_ = s; + return s; + } + } + /** + * <code>string badgeKey = 8;</code> + * @return The bytes for badgeKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getBadgeKeyBytes() { + java.lang.Object ref = badgeKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + badgeKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (isFromFansTop_ != false) { + output.writeBool(1, isFromFansTop_); + } + if (isKoi_ != false) { + output.writeBool(2, isKoi_); + } + if (assistantType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType.UNKNOWN_ASSISTANT_TYPE.getNumber()) { + output.writeEnum(3, assistantType_); + } + if (fansGroupIntimacyLevel_ != 0) { + output.writeUInt32(4, fansGroupIntimacyLevel_); + } + if (nameplate_ != null) { + output.writeMessage(5, getNameplate()); + } + if (liveFansGroupState_ != null) { + output.writeMessage(6, getLiveFansGroupState()); + } + if (wealthGrade_ != 0) { + output.writeUInt32(7, wealthGrade_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(badgeKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, badgeKey_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (isFromFansTop_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, isFromFansTop_); + } + if (isKoi_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, isKoi_); + } + if (assistantType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType.UNKNOWN_ASSISTANT_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, assistantType_); + } + if (fansGroupIntimacyLevel_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, fansGroupIntimacyLevel_); + } + if (nameplate_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getNameplate()); + } + if (liveFansGroupState_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getLiveFansGroupState()); + } + if (wealthGrade_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, wealthGrade_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(badgeKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, badgeKey_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState) obj; + + if (getIsFromFansTop() + != other.getIsFromFansTop()) return false; + if (getIsKoi() + != other.getIsKoi()) return false; + if (assistantType_ != other.assistantType_) return false; + if (getFansGroupIntimacyLevel() + != other.getFansGroupIntimacyLevel()) return false; + if (hasNameplate() != other.hasNameplate()) return false; + if (hasNameplate()) { + if (!getNameplate() + .equals(other.getNameplate())) return false; + } + if (hasLiveFansGroupState() != other.hasLiveFansGroupState()) return false; + if (hasLiveFansGroupState()) { + if (!getLiveFansGroupState() + .equals(other.getLiveFansGroupState())) return false; + } + if (getWealthGrade() + != other.getWealthGrade()) return false; + if (!getBadgeKey() + .equals(other.getBadgeKey())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ISFROMFANSTOP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsFromFansTop()); + hash = (37 * hash) + ISKOI_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsKoi()); + hash = (37 * hash) + ASSISTANTTYPE_FIELD_NUMBER; + hash = (53 * hash) + assistantType_; + hash = (37 * hash) + FANSGROUPINTIMACYLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getFansGroupIntimacyLevel(); + if (hasNameplate()) { + hash = (37 * hash) + NAMEPLATE_FIELD_NUMBER; + hash = (53 * hash) + getNameplate().hashCode(); + } + if (hasLiveFansGroupState()) { + hash = (37 * hash) + LIVEFANSGROUPSTATE_FIELD_NUMBER; + hash = (53 * hash) + getLiveFansGroupState().hashCode(); + } + hash = (37 * hash) + WEALTHGRADE_FIELD_NUMBER; + hash = (53 * hash) + getWealthGrade(); + hash = (37 * hash) + BADGEKEY_FIELD_NUMBER; + hash = (53 * hash) + getBadgeKey().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code LiveAudienceState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:LiveAudienceState) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + isFromFansTop_ = false; + isKoi_ = false; + assistantType_ = 0; + fansGroupIntimacyLevel_ = 0; + nameplate_ = null; + if (nameplateBuilder_ != null) { + nameplateBuilder_.dispose(); + nameplateBuilder_ = null; + } + liveFansGroupState_ = null; + if (liveFansGroupStateBuilder_ != null) { + liveFansGroupStateBuilder_.dispose(); + liveFansGroupStateBuilder_ = null; + } + wealthGrade_ = 0; + badgeKey_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.internal_static_LiveAudienceState_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.isFromFansTop_ = isFromFansTop_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.isKoi_ = isKoi_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.assistantType_ = assistantType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.fansGroupIntimacyLevel_ = fansGroupIntimacyLevel_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.nameplate_ = nameplateBuilder_ == null + ? nameplate_ + : nameplateBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.liveFansGroupState_ = liveFansGroupStateBuilder_ == null + ? liveFansGroupState_ + : liveFansGroupStateBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.wealthGrade_ = wealthGrade_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.badgeKey_ = badgeKey_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance()) return this; + if (other.getIsFromFansTop() != false) { + setIsFromFansTop(other.getIsFromFansTop()); + } + if (other.getIsKoi() != false) { + setIsKoi(other.getIsKoi()); + } + if (other.assistantType_ != 0) { + setAssistantTypeValue(other.getAssistantTypeValue()); + } + if (other.getFansGroupIntimacyLevel() != 0) { + setFansGroupIntimacyLevel(other.getFansGroupIntimacyLevel()); + } + if (other.hasNameplate()) { + mergeNameplate(other.getNameplate()); + } + if (other.hasLiveFansGroupState()) { + mergeLiveFansGroupState(other.getLiveFansGroupState()); + } + if (other.getWealthGrade() != 0) { + setWealthGrade(other.getWealthGrade()); + } + if (!other.getBadgeKey().isEmpty()) { + badgeKey_ = other.badgeKey_; + bitField0_ |= 0x00000080; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + isFromFansTop_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + isKoi_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + assistantType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + fansGroupIntimacyLevel_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + input.readMessage( + getNameplateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: { + input.readMessage( + getLiveFansGroupStateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + wealthGrade_ = input.readUInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: { + badgeKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean isFromFansTop_ ; + /** + * <code>bool isFromFansTop = 1;</code> + * @return The isFromFansTop. + */ + @java.lang.Override + public boolean getIsFromFansTop() { + return isFromFansTop_; + } + /** + * <code>bool isFromFansTop = 1;</code> + * @param value The isFromFansTop to set. + * @return This builder for chaining. + */ + public Builder setIsFromFansTop(boolean value) { + + isFromFansTop_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>bool isFromFansTop = 1;</code> + * @return This builder for chaining. + */ + public Builder clearIsFromFansTop() { + bitField0_ = (bitField0_ & ~0x00000001); + isFromFansTop_ = false; + onChanged(); + return this; + } + + private boolean isKoi_ ; + /** + * <code>bool isKoi = 2;</code> + * @return The isKoi. + */ + @java.lang.Override + public boolean getIsKoi() { + return isKoi_; + } + /** + * <code>bool isKoi = 2;</code> + * @param value The isKoi to set. + * @return This builder for chaining. + */ + public Builder setIsKoi(boolean value) { + + isKoi_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>bool isKoi = 2;</code> + * @return This builder for chaining. + */ + public Builder clearIsKoi() { + bitField0_ = (bitField0_ & ~0x00000002); + isKoi_ = false; + onChanged(); + return this; + } + + private int assistantType_ = 0; + /** + * <code>.LiveAudienceState.AssistantType assistantType = 3;</code> + * @return The enum numeric value on the wire for assistantType. + */ + @java.lang.Override public int getAssistantTypeValue() { + return assistantType_; + } + /** + * <code>.LiveAudienceState.AssistantType assistantType = 3;</code> + * @param value The enum numeric value on the wire for assistantType to set. + * @return This builder for chaining. + */ + public Builder setAssistantTypeValue(int value) { + assistantType_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>.LiveAudienceState.AssistantType assistantType = 3;</code> + * @return The assistantType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType getAssistantType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType.forNumber(assistantType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType.UNRECOGNIZED : result; + } + /** + * <code>.LiveAudienceState.AssistantType assistantType = 3;</code> + * @param value The assistantType to set. + * @return This builder for chaining. + */ + public Builder setAssistantType(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.AssistantType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + assistantType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * <code>.LiveAudienceState.AssistantType assistantType = 3;</code> + * @return This builder for chaining. + */ + public Builder clearAssistantType() { + bitField0_ = (bitField0_ & ~0x00000004); + assistantType_ = 0; + onChanged(); + return this; + } + + private int fansGroupIntimacyLevel_ ; + /** + * <code>uint32 fansGroupIntimacyLevel = 4;</code> + * @return The fansGroupIntimacyLevel. + */ + @java.lang.Override + public int getFansGroupIntimacyLevel() { + return fansGroupIntimacyLevel_; + } + /** + * <code>uint32 fansGroupIntimacyLevel = 4;</code> + * @param value The fansGroupIntimacyLevel to set. + * @return This builder for chaining. + */ + public Builder setFansGroupIntimacyLevel(int value) { + + fansGroupIntimacyLevel_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint32 fansGroupIntimacyLevel = 4;</code> + * @return This builder for chaining. + */ + public Builder clearFansGroupIntimacyLevel() { + bitField0_ = (bitField0_ & ~0x00000008); + fansGroupIntimacyLevel_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate nameplate_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplateOrBuilder> nameplateBuilder_; + /** + * <code>.GzoneNameplate nameplate = 5;</code> + * @return Whether the nameplate field is set. + */ + public boolean hasNameplate() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * <code>.GzoneNameplate nameplate = 5;</code> + * @return The nameplate. + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate getNameplate() { + if (nameplateBuilder_ == null) { + return nameplate_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.getDefaultInstance() : nameplate_; + } else { + return nameplateBuilder_.getMessage(); + } + } + /** + * <code>.GzoneNameplate nameplate = 5;</code> + */ + public Builder setNameplate(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate value) { + if (nameplateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nameplate_ = value; + } else { + nameplateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>.GzoneNameplate nameplate = 5;</code> + */ + public Builder setNameplate( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.Builder builderForValue) { + if (nameplateBuilder_ == null) { + nameplate_ = builderForValue.build(); + } else { + nameplateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>.GzoneNameplate nameplate = 5;</code> + */ + public Builder mergeNameplate(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate value) { + if (nameplateBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + nameplate_ != null && + nameplate_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.getDefaultInstance()) { + getNameplateBuilder().mergeFrom(value); + } else { + nameplate_ = value; + } + } else { + nameplateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>.GzoneNameplate nameplate = 5;</code> + */ + public Builder clearNameplate() { + bitField0_ = (bitField0_ & ~0x00000010); + nameplate_ = null; + if (nameplateBuilder_ != null) { + nameplateBuilder_.dispose(); + nameplateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.GzoneNameplate nameplate = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.Builder getNameplateBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getNameplateFieldBuilder().getBuilder(); + } + /** + * <code>.GzoneNameplate nameplate = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplateOrBuilder getNameplateOrBuilder() { + if (nameplateBuilder_ != null) { + return nameplateBuilder_.getMessageOrBuilder(); + } else { + return nameplate_ == null ? + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.getDefaultInstance() : nameplate_; + } + } + /** + * <code>.GzoneNameplate nameplate = 5;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplateOrBuilder> + getNameplateFieldBuilder() { + if (nameplateBuilder_ == null) { + nameplateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplate.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.GzoneNameplateOrBuilder>( + getNameplate(), + getParentForChildren(), + isClean()); + nameplate_ = null; + } + return nameplateBuilder_; + } + + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState liveFansGroupState_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupStateOrBuilder> liveFansGroupStateBuilder_; + /** + * <code>.LiveFansGroupState liveFansGroupState = 6;</code> + * @return Whether the liveFansGroupState field is set. + */ + public boolean hasLiveFansGroupState() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * <code>.LiveFansGroupState liveFansGroupState = 6;</code> + * @return The liveFansGroupState. + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState getLiveFansGroupState() { + if (liveFansGroupStateBuilder_ == null) { + return liveFansGroupState_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.getDefaultInstance() : liveFansGroupState_; + } else { + return liveFansGroupStateBuilder_.getMessage(); + } + } + /** + * <code>.LiveFansGroupState liveFansGroupState = 6;</code> + */ + public Builder setLiveFansGroupState(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState value) { + if (liveFansGroupStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + liveFansGroupState_ = value; + } else { + liveFansGroupStateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>.LiveFansGroupState liveFansGroupState = 6;</code> + */ + public Builder setLiveFansGroupState( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.Builder builderForValue) { + if (liveFansGroupStateBuilder_ == null) { + liveFansGroupState_ = builderForValue.build(); + } else { + liveFansGroupStateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>.LiveFansGroupState liveFansGroupState = 6;</code> + */ + public Builder mergeLiveFansGroupState(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState value) { + if (liveFansGroupStateBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) && + liveFansGroupState_ != null && + liveFansGroupState_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.getDefaultInstance()) { + getLiveFansGroupStateBuilder().mergeFrom(value); + } else { + liveFansGroupState_ = value; + } + } else { + liveFansGroupStateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>.LiveFansGroupState liveFansGroupState = 6;</code> + */ + public Builder clearLiveFansGroupState() { + bitField0_ = (bitField0_ & ~0x00000020); + liveFansGroupState_ = null; + if (liveFansGroupStateBuilder_ != null) { + liveFansGroupStateBuilder_.dispose(); + liveFansGroupStateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.LiveFansGroupState liveFansGroupState = 6;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.Builder getLiveFansGroupStateBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getLiveFansGroupStateFieldBuilder().getBuilder(); + } + /** + * <code>.LiveFansGroupState liveFansGroupState = 6;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupStateOrBuilder getLiveFansGroupStateOrBuilder() { + if (liveFansGroupStateBuilder_ != null) { + return liveFansGroupStateBuilder_.getMessageOrBuilder(); + } else { + return liveFansGroupState_ == null ? + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.getDefaultInstance() : liveFansGroupState_; + } + } + /** + * <code>.LiveFansGroupState liveFansGroupState = 6;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupStateOrBuilder> + getLiveFansGroupStateFieldBuilder() { + if (liveFansGroupStateBuilder_ == null) { + liveFansGroupStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupStateOrBuilder>( + getLiveFansGroupState(), + getParentForChildren(), + isClean()); + liveFansGroupState_ = null; + } + return liveFansGroupStateBuilder_; + } + + private int wealthGrade_ ; + /** + * <code>uint32 wealthGrade = 7;</code> + * @return The wealthGrade. + */ + @java.lang.Override + public int getWealthGrade() { + return wealthGrade_; + } + /** + * <code>uint32 wealthGrade = 7;</code> + * @param value The wealthGrade to set. + * @return This builder for chaining. + */ + public Builder setWealthGrade(int value) { + + wealthGrade_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>uint32 wealthGrade = 7;</code> + * @return This builder for chaining. + */ + public Builder clearWealthGrade() { + bitField0_ = (bitField0_ & ~0x00000040); + wealthGrade_ = 0; + onChanged(); + return this; + } + + private java.lang.Object badgeKey_ = ""; + /** + * <code>string badgeKey = 8;</code> + * @return The badgeKey. + */ + public java.lang.String getBadgeKey() { + java.lang.Object ref = badgeKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + badgeKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string badgeKey = 8;</code> + * @return The bytes for badgeKey. + */ + public com.google.protobuf.ByteString + getBadgeKeyBytes() { + java.lang.Object ref = badgeKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + badgeKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string badgeKey = 8;</code> + * @param value The badgeKey to set. + * @return This builder for chaining. + */ + public Builder setBadgeKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + badgeKey_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>string badgeKey = 8;</code> + * @return This builder for chaining. + */ + public Builder clearBadgeKey() { + badgeKey_ = getDefaultInstance().getBadgeKey(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * <code>string badgeKey = 8;</code> + * @param value The bytes for badgeKey to set. + * @return This builder for chaining. + */ + public Builder setBadgeKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + badgeKey_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:LiveAudienceState) + } + + // @@protoc_insertion_point(class_scope:LiveAudienceState) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<LiveAudienceState> + PARSER = new com.google.protobuf.AbstractParser<LiveAudienceState>() { + @java.lang.Override + public LiveAudienceState parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<LiveAudienceState> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<LiveAudienceState> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_LiveAudienceState_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_LiveAudienceState_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\027LiveAudienceState.proto\032\024GzoneNameplat" + + "e.proto\032\030LiveFansGroupState.proto\"\322\002\n\021Li" + + "veAudienceState\022\025\n\risFromFansTop\030\001 \001(\010\022\r" + + "\n\005isKoi\030\002 \001(\010\0227\n\rassistantType\030\003 \001(\0162 .L" + + "iveAudienceState.AssistantType\022\036\n\026fansGr" + + "oupIntimacyLevel\030\004 \001(\r\022\"\n\tnameplate\030\005 \001(" + + "\0132\017.GzoneNameplate\022/\n\022liveFansGroupState" + + "\030\006 \001(\0132\023.LiveFansGroupState\022\023\n\013wealthGra" + + "de\030\007 \001(\r\022\020\n\010badgeKey\030\010 \001(\t\"B\n\rAssistantT" + + "ype\022\032\n\026UNKNOWN_ASSISTANT_TYPE\020\000\022\t\n\005SUPER" + + "\020\001\022\n\n\006JUNIOR\020\002B6\n4tech.ordinaryroad.live" + + ".chat.client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.getDescriptor(), + }); + internal_static_LiveAudienceState_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_LiveAudienceState_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_LiveAudienceState_descriptor, + new java.lang.String[] { "IsFromFansTop", "IsKoi", "AssistantType", "FansGroupIntimacyLevel", "Nameplate", "LiveFansGroupState", "WealthGrade", "BadgeKey", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.GzoneNameplateOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/LiveCdnNodeViewOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/LiveCdnNodeViewOuterClass.java new file mode 100644 index 0000000..683bf82 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/LiveCdnNodeViewOuterClass.java @@ -0,0 +1,846 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: LiveCdnNodeView.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class LiveCdnNodeViewOuterClass { + private LiveCdnNodeViewOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface LiveCdnNodeViewOrBuilder extends + // @@protoc_insertion_point(interface_extends:LiveCdnNodeView) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string cdn = 1;</code> + * @return The cdn. + */ + java.lang.String getCdn(); + /** + * <code>string cdn = 1;</code> + * @return The bytes for cdn. + */ + com.google.protobuf.ByteString + getCdnBytes(); + + /** + * <code>string url = 2;</code> + * @return The url. + */ + java.lang.String getUrl(); + /** + * <code>string url = 2;</code> + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + * <code>bool freeTraffic = 3;</code> + * @return The freeTraffic. + */ + boolean getFreeTraffic(); + } + /** + * Protobuf type {@code LiveCdnNodeView} + */ + public static final class LiveCdnNodeView extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:LiveCdnNodeView) + LiveCdnNodeViewOrBuilder { + private static final long serialVersionUID = 0L; + // Use LiveCdnNodeView.newBuilder() to construct. + private LiveCdnNodeView(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private LiveCdnNodeView() { + cdn_ = ""; + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LiveCdnNodeView(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.internal_static_LiveCdnNodeView_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.internal_static_LiveCdnNodeView_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder.class); + } + + public static final int CDN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cdn_ = ""; + /** + * <code>string cdn = 1;</code> + * @return The cdn. + */ + @java.lang.Override + public java.lang.String getCdn() { + java.lang.Object ref = cdn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cdn_ = s; + return s; + } + } + /** + * <code>string cdn = 1;</code> + * @return The bytes for cdn. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCdnBytes() { + java.lang.Object ref = cdn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cdn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + * <code>string url = 2;</code> + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + * <code>string url = 2;</code> + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FREETRAFFIC_FIELD_NUMBER = 3; + private boolean freeTraffic_ = false; + /** + * <code>bool freeTraffic = 3;</code> + * @return The freeTraffic. + */ + @java.lang.Override + public boolean getFreeTraffic() { + return freeTraffic_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cdn_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cdn_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); + } + if (freeTraffic_ != false) { + output.writeBool(3, freeTraffic_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cdn_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cdn_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); + } + if (freeTraffic_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, freeTraffic_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView) obj; + + if (!getCdn() + .equals(other.getCdn())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (getFreeTraffic() + != other.getFreeTraffic()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CDN_FIELD_NUMBER; + hash = (53 * hash) + getCdn().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + FREETRAFFIC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getFreeTraffic()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code LiveCdnNodeView} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:LiveCdnNodeView) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeViewOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.internal_static_LiveCdnNodeView_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.internal_static_LiveCdnNodeView_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cdn_ = ""; + url_ = ""; + freeTraffic_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.internal_static_LiveCdnNodeView_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cdn_ = cdn_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.url_ = url_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.freeTraffic_ = freeTraffic_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView.getDefaultInstance()) return this; + if (!other.getCdn().isEmpty()) { + cdn_ = other.cdn_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getFreeTraffic() != false) { + setFreeTraffic(other.getFreeTraffic()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cdn_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + freeTraffic_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object cdn_ = ""; + /** + * <code>string cdn = 1;</code> + * @return The cdn. + */ + public java.lang.String getCdn() { + java.lang.Object ref = cdn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cdn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string cdn = 1;</code> + * @return The bytes for cdn. + */ + public com.google.protobuf.ByteString + getCdnBytes() { + java.lang.Object ref = cdn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cdn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string cdn = 1;</code> + * @param value The cdn to set. + * @return This builder for chaining. + */ + public Builder setCdn( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cdn_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string cdn = 1;</code> + * @return This builder for chaining. + */ + public Builder clearCdn() { + cdn_ = getDefaultInstance().getCdn(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string cdn = 1;</code> + * @param value The bytes for cdn to set. + * @return This builder for chaining. + */ + public Builder setCdnBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cdn_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + * <code>string url = 2;</code> + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string url = 2;</code> + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string url = 2;</code> + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string url = 2;</code> + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string url = 2;</code> + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private boolean freeTraffic_ ; + /** + * <code>bool freeTraffic = 3;</code> + * @return The freeTraffic. + */ + @java.lang.Override + public boolean getFreeTraffic() { + return freeTraffic_; + } + /** + * <code>bool freeTraffic = 3;</code> + * @param value The freeTraffic to set. + * @return This builder for chaining. + */ + public Builder setFreeTraffic(boolean value) { + + freeTraffic_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>bool freeTraffic = 3;</code> + * @return This builder for chaining. + */ + public Builder clearFreeTraffic() { + bitField0_ = (bitField0_ & ~0x00000004); + freeTraffic_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:LiveCdnNodeView) + } + + // @@protoc_insertion_point(class_scope:LiveCdnNodeView) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<LiveCdnNodeView> + PARSER = new com.google.protobuf.AbstractParser<LiveCdnNodeView>() { + @java.lang.Override + public LiveCdnNodeView parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<LiveCdnNodeView> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<LiveCdnNodeView> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveCdnNodeViewOuterClass.LiveCdnNodeView getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_LiveCdnNodeView_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_LiveCdnNodeView_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\025LiveCdnNodeView.proto\"@\n\017LiveCdnNodeVi" + + "ew\022\013\n\003cdn\030\001 \001(\t\022\013\n\003url\030\002 \001(\t\022\023\n\013freeTraf" + + "fic\030\003 \001(\010B6\n4tech.ordinaryroad.live.chat" + + ".client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_LiveCdnNodeView_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_LiveCdnNodeView_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_LiveCdnNodeView_descriptor, + new java.lang.String[] { "Cdn", "Url", "FreeTraffic", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/LiveFansGroupStateOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/LiveFansGroupStateOuterClass.java new file mode 100644 index 0000000..6ba076f --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/LiveFansGroupStateOuterClass.java @@ -0,0 +1,622 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: LiveFansGroupState.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class LiveFansGroupStateOuterClass { + private LiveFansGroupStateOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface LiveFansGroupStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:LiveFansGroupState) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint32 intimacyLevel = 1;</code> + * @return The intimacyLevel. + */ + int getIntimacyLevel(); + + /** + * <code>uint32 enterRoomSpecialEffect = 2;</code> + * @return The enterRoomSpecialEffect. + */ + int getEnterRoomSpecialEffect(); + } + /** + * Protobuf type {@code LiveFansGroupState} + */ + public static final class LiveFansGroupState extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:LiveFansGroupState) + LiveFansGroupStateOrBuilder { + private static final long serialVersionUID = 0L; + // Use LiveFansGroupState.newBuilder() to construct. + private LiveFansGroupState(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private LiveFansGroupState() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LiveFansGroupState(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.internal_static_LiveFansGroupState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.internal_static_LiveFansGroupState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.Builder.class); + } + + public static final int INTIMACYLEVEL_FIELD_NUMBER = 1; + private int intimacyLevel_ = 0; + /** + * <code>uint32 intimacyLevel = 1;</code> + * @return The intimacyLevel. + */ + @java.lang.Override + public int getIntimacyLevel() { + return intimacyLevel_; + } + + public static final int ENTERROOMSPECIALEFFECT_FIELD_NUMBER = 2; + private int enterRoomSpecialEffect_ = 0; + /** + * <code>uint32 enterRoomSpecialEffect = 2;</code> + * @return The enterRoomSpecialEffect. + */ + @java.lang.Override + public int getEnterRoomSpecialEffect() { + return enterRoomSpecialEffect_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (intimacyLevel_ != 0) { + output.writeUInt32(1, intimacyLevel_); + } + if (enterRoomSpecialEffect_ != 0) { + output.writeUInt32(2, enterRoomSpecialEffect_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (intimacyLevel_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, intimacyLevel_); + } + if (enterRoomSpecialEffect_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, enterRoomSpecialEffect_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState) obj; + + if (getIntimacyLevel() + != other.getIntimacyLevel()) return false; + if (getEnterRoomSpecialEffect() + != other.getEnterRoomSpecialEffect()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INTIMACYLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getIntimacyLevel(); + hash = (37 * hash) + ENTERROOMSPECIALEFFECT_FIELD_NUMBER; + hash = (53 * hash) + getEnterRoomSpecialEffect(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code LiveFansGroupState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:LiveFansGroupState) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupStateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.internal_static_LiveFansGroupState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.internal_static_LiveFansGroupState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + intimacyLevel_ = 0; + enterRoomSpecialEffect_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.internal_static_LiveFansGroupState_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.intimacyLevel_ = intimacyLevel_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.enterRoomSpecialEffect_ = enterRoomSpecialEffect_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState.getDefaultInstance()) return this; + if (other.getIntimacyLevel() != 0) { + setIntimacyLevel(other.getIntimacyLevel()); + } + if (other.getEnterRoomSpecialEffect() != 0) { + setEnterRoomSpecialEffect(other.getEnterRoomSpecialEffect()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + intimacyLevel_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + enterRoomSpecialEffect_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int intimacyLevel_ ; + /** + * <code>uint32 intimacyLevel = 1;</code> + * @return The intimacyLevel. + */ + @java.lang.Override + public int getIntimacyLevel() { + return intimacyLevel_; + } + /** + * <code>uint32 intimacyLevel = 1;</code> + * @param value The intimacyLevel to set. + * @return This builder for chaining. + */ + public Builder setIntimacyLevel(int value) { + + intimacyLevel_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint32 intimacyLevel = 1;</code> + * @return This builder for chaining. + */ + public Builder clearIntimacyLevel() { + bitField0_ = (bitField0_ & ~0x00000001); + intimacyLevel_ = 0; + onChanged(); + return this; + } + + private int enterRoomSpecialEffect_ ; + /** + * <code>uint32 enterRoomSpecialEffect = 2;</code> + * @return The enterRoomSpecialEffect. + */ + @java.lang.Override + public int getEnterRoomSpecialEffect() { + return enterRoomSpecialEffect_; + } + /** + * <code>uint32 enterRoomSpecialEffect = 2;</code> + * @param value The enterRoomSpecialEffect to set. + * @return This builder for chaining. + */ + public Builder setEnterRoomSpecialEffect(int value) { + + enterRoomSpecialEffect_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>uint32 enterRoomSpecialEffect = 2;</code> + * @return This builder for chaining. + */ + public Builder clearEnterRoomSpecialEffect() { + bitField0_ = (bitField0_ & ~0x00000002); + enterRoomSpecialEffect_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:LiveFansGroupState) + } + + // @@protoc_insertion_point(class_scope:LiveFansGroupState) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<LiveFansGroupState> + PARSER = new com.google.protobuf.AbstractParser<LiveFansGroupState>() { + @java.lang.Override + public LiveFansGroupState parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<LiveFansGroupState> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<LiveFansGroupState> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveFansGroupStateOuterClass.LiveFansGroupState getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_LiveFansGroupState_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_LiveFansGroupState_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\030LiveFansGroupState.proto\"K\n\022LiveFansGr" + + "oupState\022\025\n\rintimacyLevel\030\001 \001(\r\022\036\n\026enter" + + "RoomSpecialEffect\030\002 \001(\rB6\n4tech.ordinary" + + "road.live.chat.client.kuaishou.protobufb" + + "\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_LiveFansGroupState_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_LiveFansGroupState_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_LiveFansGroupState_descriptor, + new java.lang.String[] { "IntimacyLevel", "EnterRoomSpecialEffect", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/PSHostInfoOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/PSHostInfoOuterClass.java new file mode 100644 index 0000000..73bc328 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/PSHostInfoOuterClass.java @@ -0,0 +1,697 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: PSHostInfo.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class PSHostInfoOuterClass { + private PSHostInfoOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PSHostInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:PSHostInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string ip = 1;</code> + * @return The ip. + */ + java.lang.String getIp(); + /** + * <code>string ip = 1;</code> + * @return The bytes for ip. + */ + com.google.protobuf.ByteString + getIpBytes(); + + /** + * <code>int32 port = 2;</code> + * @return The port. + */ + int getPort(); + } + /** + * Protobuf type {@code PSHostInfo} + */ + public static final class PSHostInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:PSHostInfo) + PSHostInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use PSHostInfo.newBuilder() to construct. + private PSHostInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private PSHostInfo() { + ip_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PSHostInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.internal_static_PSHostInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.internal_static_PSHostInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo.Builder.class); + } + + public static final int IP_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object ip_ = ""; + /** + * <code>string ip = 1;</code> + * @return The ip. + */ + @java.lang.Override + public java.lang.String getIp() { + java.lang.Object ref = ip_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ip_ = s; + return s; + } + } + /** + * <code>string ip = 1;</code> + * @return The bytes for ip. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIpBytes() { + java.lang.Object ref = ip_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ip_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 2; + private int port_ = 0; + /** + * <code>int32 port = 2;</code> + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ip_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ip_); + } + if (port_ != 0) { + output.writeInt32(2, port_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ip_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ip_); + } + if (port_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, port_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo) obj; + + if (!getIp() + .equals(other.getIp())) return false; + if (getPort() + != other.getPort()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IP_FIELD_NUMBER; + hash = (53 * hash) + getIp().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code PSHostInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:PSHostInfo) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.internal_static_PSHostInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.internal_static_PSHostInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + ip_ = ""; + port_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.internal_static_PSHostInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ip_ = ip_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.port_ = port_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo.getDefaultInstance()) return this; + if (!other.getIp().isEmpty()) { + ip_ = other.ip_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPort() != 0) { + setPort(other.getPort()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + ip_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + port_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object ip_ = ""; + /** + * <code>string ip = 1;</code> + * @return The ip. + */ + public java.lang.String getIp() { + java.lang.Object ref = ip_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ip_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string ip = 1;</code> + * @return The bytes for ip. + */ + public com.google.protobuf.ByteString + getIpBytes() { + java.lang.Object ref = ip_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ip_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string ip = 1;</code> + * @param value The ip to set. + * @return This builder for chaining. + */ + public Builder setIp( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ip_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string ip = 1;</code> + * @return This builder for chaining. + */ + public Builder clearIp() { + ip_ = getDefaultInstance().getIp(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string ip = 1;</code> + * @param value The bytes for ip to set. + * @return This builder for chaining. + */ + public Builder setIpBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ip_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int port_ ; + /** + * <code>int32 port = 2;</code> + * @return The port. + */ + @java.lang.Override + public int getPort() { + return port_; + } + /** + * <code>int32 port = 2;</code> + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort(int value) { + + port_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>int32 port = 2;</code> + * @return This builder for chaining. + */ + public Builder clearPort() { + bitField0_ = (bitField0_ & ~0x00000002); + port_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:PSHostInfo) + } + + // @@protoc_insertion_point(class_scope:PSHostInfo) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<PSHostInfo> + PARSER = new com.google.protobuf.AbstractParser<PSHostInfo>() { + @java.lang.Override + public PSHostInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<PSHostInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<PSHostInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PSHostInfoOuterClass.PSHostInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_PSHostInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_PSHostInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\020PSHostInfo.proto\"&\n\nPSHostInfo\022\n\n\002ip\030\001" + + " \001(\t\022\014\n\004port\030\002 \001(\005B6\n4tech.ordinaryroad." + + "live.chat.client.kuaishou.protobufb\006prot" + + "o3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_PSHostInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_PSHostInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_PSHostInfo_descriptor, + new java.lang.String[] { "Ip", "Port", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/PayloadTypeOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/PayloadTypeOuterClass.java new file mode 100644 index 0000000..5711bf4 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/PayloadTypeOuterClass.java @@ -0,0 +1,708 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: PayloadType.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class PayloadTypeOuterClass { + private PayloadTypeOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code PayloadType} + */ + public enum PayloadType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * <code>UNKNOWN = 0;</code> + */ + UNKNOWN(0), + /** + * <code>CS_HEARTBEAT = 1;</code> + */ + CS_HEARTBEAT(1), + /** + * <code>CS_ERROR = 3;</code> + */ + CS_ERROR(3), + /** + * <code>CS_PING = 4;</code> + */ + CS_PING(4), + /** + * <code>PS_HOST_INFO = 51;</code> + */ + PS_HOST_INFO(51), + /** + * <code>SC_HEARTBEAT_ACK = 101;</code> + */ + SC_HEARTBEAT_ACK(101), + /** + * <code>SC_ECHO = 102;</code> + */ + SC_ECHO(102), + /** + * <code>SC_ERROR = 103;</code> + */ + SC_ERROR(103), + /** + * <code>SC_PING_ACK = 104;</code> + */ + SC_PING_ACK(104), + /** + * <code>SC_INFO = 105;</code> + */ + SC_INFO(105), + /** + * <code>CS_ENTER_ROOM = 200;</code> + */ + CS_ENTER_ROOM(200), + /** + * <code>CS_USER_PAUSE = 201;</code> + */ + CS_USER_PAUSE(201), + /** + * <code>CS_USER_EXIT = 202;</code> + */ + CS_USER_EXIT(202), + /** + * <code>CS_AUTHOR_PUSH_TRAFFIC_ZERO = 203;</code> + */ + CS_AUTHOR_PUSH_TRAFFIC_ZERO(203), + /** + * <code>CS_HORSE_RACING = 204;</code> + */ + CS_HORSE_RACING(204), + /** + * <code>CS_RACE_LOSE = 205;</code> + */ + CS_RACE_LOSE(205), + /** + * <code>CS_VOIP_SIGNAL = 206;</code> + */ + CS_VOIP_SIGNAL(206), + /** + * <code>SC_ENTER_ROOM_ACK = 300;</code> + */ + SC_ENTER_ROOM_ACK(300), + /** + * <code>SC_AUTHOR_PAUSE = 301;</code> + */ + SC_AUTHOR_PAUSE(301), + /** + * <code>SC_AUTHOR_RESUME = 302;</code> + */ + SC_AUTHOR_RESUME(302), + /** + * <code>SC_AUTHOR_PUSH_TRAFFIC_ZERO = 303;</code> + */ + SC_AUTHOR_PUSH_TRAFFIC_ZERO(303), + /** + * <code>SC_AUTHOR_HEARTBEAT_MISS = 304;</code> + */ + SC_AUTHOR_HEARTBEAT_MISS(304), + /** + * <code>SC_PIP_STARTED = 305;</code> + */ + SC_PIP_STARTED(305), + /** + * <code>SC_PIP_ENDED = 306;</code> + */ + SC_PIP_ENDED(306), + /** + * <code>SC_HORSE_RACING_ACK = 307;</code> + */ + SC_HORSE_RACING_ACK(307), + /** + * <code>SC_VOIP_SIGNAL = 308;</code> + */ + SC_VOIP_SIGNAL(308), + /** + * <code>SC_FEED_PUSH = 310;</code> + */ + SC_FEED_PUSH(310), + /** + * <code>SC_ASSISTANT_STATUS = 311;</code> + */ + SC_ASSISTANT_STATUS(311), + /** + * <code>SC_REFRESH_WALLET = 312;</code> + */ + SC_REFRESH_WALLET(312), + /** + * <code>SC_LIVE_CHAT_CALL = 320;</code> + */ + SC_LIVE_CHAT_CALL(320), + /** + * <code>SC_LIVE_CHAT_CALL_ACCEPTED = 321;</code> + */ + SC_LIVE_CHAT_CALL_ACCEPTED(321), + /** + * <code>SC_LIVE_CHAT_CALL_REJECTED = 322;</code> + */ + SC_LIVE_CHAT_CALL_REJECTED(322), + /** + * <code>SC_LIVE_CHAT_READY = 323;</code> + */ + SC_LIVE_CHAT_READY(323), + /** + * <code>SC_LIVE_CHAT_GUEST_END = 324;</code> + */ + SC_LIVE_CHAT_GUEST_END(324), + /** + * <code>SC_LIVE_CHAT_ENDED = 325;</code> + */ + SC_LIVE_CHAT_ENDED(325), + /** + * <code>SC_RENDERING_MAGIC_FACE_DISABLE = 326;</code> + */ + SC_RENDERING_MAGIC_FACE_DISABLE(326), + /** + * <code>SC_RENDERING_MAGIC_FACE_ENABLE = 327;</code> + */ + SC_RENDERING_MAGIC_FACE_ENABLE(327), + /** + * <code>SC_RED_PACK_FEED = 330;</code> + */ + SC_RED_PACK_FEED(330), + /** + * <code>SC_LIVE_WATCHING_LIST = 340;</code> + */ + SC_LIVE_WATCHING_LIST(340), + /** + * <code>SC_LIVE_QUIZ_QUESTION_ASKED = 350;</code> + */ + SC_LIVE_QUIZ_QUESTION_ASKED(350), + /** + * <code>SC_LIVE_QUIZ_QUESTION_REVIEWED = 351;</code> + */ + SC_LIVE_QUIZ_QUESTION_REVIEWED(351), + /** + * <code>SC_LIVE_QUIZ_SYNC = 352;</code> + */ + SC_LIVE_QUIZ_SYNC(352), + /** + * <code>SC_LIVE_QUIZ_ENDED = 353;</code> + */ + SC_LIVE_QUIZ_ENDED(353), + /** + * <code>SC_LIVE_QUIZ_WINNERS = 354;</code> + */ + SC_LIVE_QUIZ_WINNERS(354), + /** + * <code>SC_SUSPECTED_VIOLATION = 355;</code> + */ + SC_SUSPECTED_VIOLATION(355), + /** + * <code>SC_SHOP_OPENED = 360;</code> + */ + SC_SHOP_OPENED(360), + /** + * <code>SC_SHOP_CLOSED = 361;</code> + */ + SC_SHOP_CLOSED(361), + /** + * <code>SC_GUESS_OPENED = 370;</code> + */ + SC_GUESS_OPENED(370), + /** + * <code>SC_GUESS_CLOSED = 371;</code> + */ + SC_GUESS_CLOSED(371), + /** + * <code>SC_PK_INVITATION = 380;</code> + */ + SC_PK_INVITATION(380), + /** + * <code>SC_PK_STATISTIC = 381;</code> + */ + SC_PK_STATISTIC(381), + /** + * <code>SC_RIDDLE_OPENED = 390;</code> + */ + SC_RIDDLE_OPENED(390), + /** + * <code>SC_RIDDLE_CLOESED = 391;</code> + */ + SC_RIDDLE_CLOESED(391), + /** + * <code>SC_RIDE_CHANGED = 412;</code> + */ + SC_RIDE_CHANGED(412), + /** + * <code>SC_BET_CHANGED = 441;</code> + */ + SC_BET_CHANGED(441), + /** + * <code>SC_BET_CLOSED = 442;</code> + */ + SC_BET_CLOSED(442), + /** + * <code>SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE = 645;</code> + */ + SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE(645), + /** + * <code>SC_LIVE_WARNING_MASK_STATUS_CHANGED_AUDIENCE = 758;</code> + */ + SC_LIVE_WARNING_MASK_STATUS_CHANGED_AUDIENCE(758), + UNRECOGNIZED(-1), + ; + + /** + * <code>UNKNOWN = 0;</code> + */ + public static final int UNKNOWN_VALUE = 0; + /** + * <code>CS_HEARTBEAT = 1;</code> + */ + public static final int CS_HEARTBEAT_VALUE = 1; + /** + * <code>CS_ERROR = 3;</code> + */ + public static final int CS_ERROR_VALUE = 3; + /** + * <code>CS_PING = 4;</code> + */ + public static final int CS_PING_VALUE = 4; + /** + * <code>PS_HOST_INFO = 51;</code> + */ + public static final int PS_HOST_INFO_VALUE = 51; + /** + * <code>SC_HEARTBEAT_ACK = 101;</code> + */ + public static final int SC_HEARTBEAT_ACK_VALUE = 101; + /** + * <code>SC_ECHO = 102;</code> + */ + public static final int SC_ECHO_VALUE = 102; + /** + * <code>SC_ERROR = 103;</code> + */ + public static final int SC_ERROR_VALUE = 103; + /** + * <code>SC_PING_ACK = 104;</code> + */ + public static final int SC_PING_ACK_VALUE = 104; + /** + * <code>SC_INFO = 105;</code> + */ + public static final int SC_INFO_VALUE = 105; + /** + * <code>CS_ENTER_ROOM = 200;</code> + */ + public static final int CS_ENTER_ROOM_VALUE = 200; + /** + * <code>CS_USER_PAUSE = 201;</code> + */ + public static final int CS_USER_PAUSE_VALUE = 201; + /** + * <code>CS_USER_EXIT = 202;</code> + */ + public static final int CS_USER_EXIT_VALUE = 202; + /** + * <code>CS_AUTHOR_PUSH_TRAFFIC_ZERO = 203;</code> + */ + public static final int CS_AUTHOR_PUSH_TRAFFIC_ZERO_VALUE = 203; + /** + * <code>CS_HORSE_RACING = 204;</code> + */ + public static final int CS_HORSE_RACING_VALUE = 204; + /** + * <code>CS_RACE_LOSE = 205;</code> + */ + public static final int CS_RACE_LOSE_VALUE = 205; + /** + * <code>CS_VOIP_SIGNAL = 206;</code> + */ + public static final int CS_VOIP_SIGNAL_VALUE = 206; + /** + * <code>SC_ENTER_ROOM_ACK = 300;</code> + */ + public static final int SC_ENTER_ROOM_ACK_VALUE = 300; + /** + * <code>SC_AUTHOR_PAUSE = 301;</code> + */ + public static final int SC_AUTHOR_PAUSE_VALUE = 301; + /** + * <code>SC_AUTHOR_RESUME = 302;</code> + */ + public static final int SC_AUTHOR_RESUME_VALUE = 302; + /** + * <code>SC_AUTHOR_PUSH_TRAFFIC_ZERO = 303;</code> + */ + public static final int SC_AUTHOR_PUSH_TRAFFIC_ZERO_VALUE = 303; + /** + * <code>SC_AUTHOR_HEARTBEAT_MISS = 304;</code> + */ + public static final int SC_AUTHOR_HEARTBEAT_MISS_VALUE = 304; + /** + * <code>SC_PIP_STARTED = 305;</code> + */ + public static final int SC_PIP_STARTED_VALUE = 305; + /** + * <code>SC_PIP_ENDED = 306;</code> + */ + public static final int SC_PIP_ENDED_VALUE = 306; + /** + * <code>SC_HORSE_RACING_ACK = 307;</code> + */ + public static final int SC_HORSE_RACING_ACK_VALUE = 307; + /** + * <code>SC_VOIP_SIGNAL = 308;</code> + */ + public static final int SC_VOIP_SIGNAL_VALUE = 308; + /** + * <code>SC_FEED_PUSH = 310;</code> + */ + public static final int SC_FEED_PUSH_VALUE = 310; + /** + * <code>SC_ASSISTANT_STATUS = 311;</code> + */ + public static final int SC_ASSISTANT_STATUS_VALUE = 311; + /** + * <code>SC_REFRESH_WALLET = 312;</code> + */ + public static final int SC_REFRESH_WALLET_VALUE = 312; + /** + * <code>SC_LIVE_CHAT_CALL = 320;</code> + */ + public static final int SC_LIVE_CHAT_CALL_VALUE = 320; + /** + * <code>SC_LIVE_CHAT_CALL_ACCEPTED = 321;</code> + */ + public static final int SC_LIVE_CHAT_CALL_ACCEPTED_VALUE = 321; + /** + * <code>SC_LIVE_CHAT_CALL_REJECTED = 322;</code> + */ + public static final int SC_LIVE_CHAT_CALL_REJECTED_VALUE = 322; + /** + * <code>SC_LIVE_CHAT_READY = 323;</code> + */ + public static final int SC_LIVE_CHAT_READY_VALUE = 323; + /** + * <code>SC_LIVE_CHAT_GUEST_END = 324;</code> + */ + public static final int SC_LIVE_CHAT_GUEST_END_VALUE = 324; + /** + * <code>SC_LIVE_CHAT_ENDED = 325;</code> + */ + public static final int SC_LIVE_CHAT_ENDED_VALUE = 325; + /** + * <code>SC_RENDERING_MAGIC_FACE_DISABLE = 326;</code> + */ + public static final int SC_RENDERING_MAGIC_FACE_DISABLE_VALUE = 326; + /** + * <code>SC_RENDERING_MAGIC_FACE_ENABLE = 327;</code> + */ + public static final int SC_RENDERING_MAGIC_FACE_ENABLE_VALUE = 327; + /** + * <code>SC_RED_PACK_FEED = 330;</code> + */ + public static final int SC_RED_PACK_FEED_VALUE = 330; + /** + * <code>SC_LIVE_WATCHING_LIST = 340;</code> + */ + public static final int SC_LIVE_WATCHING_LIST_VALUE = 340; + /** + * <code>SC_LIVE_QUIZ_QUESTION_ASKED = 350;</code> + */ + public static final int SC_LIVE_QUIZ_QUESTION_ASKED_VALUE = 350; + /** + * <code>SC_LIVE_QUIZ_QUESTION_REVIEWED = 351;</code> + */ + public static final int SC_LIVE_QUIZ_QUESTION_REVIEWED_VALUE = 351; + /** + * <code>SC_LIVE_QUIZ_SYNC = 352;</code> + */ + public static final int SC_LIVE_QUIZ_SYNC_VALUE = 352; + /** + * <code>SC_LIVE_QUIZ_ENDED = 353;</code> + */ + public static final int SC_LIVE_QUIZ_ENDED_VALUE = 353; + /** + * <code>SC_LIVE_QUIZ_WINNERS = 354;</code> + */ + public static final int SC_LIVE_QUIZ_WINNERS_VALUE = 354; + /** + * <code>SC_SUSPECTED_VIOLATION = 355;</code> + */ + public static final int SC_SUSPECTED_VIOLATION_VALUE = 355; + /** + * <code>SC_SHOP_OPENED = 360;</code> + */ + public static final int SC_SHOP_OPENED_VALUE = 360; + /** + * <code>SC_SHOP_CLOSED = 361;</code> + */ + public static final int SC_SHOP_CLOSED_VALUE = 361; + /** + * <code>SC_GUESS_OPENED = 370;</code> + */ + public static final int SC_GUESS_OPENED_VALUE = 370; + /** + * <code>SC_GUESS_CLOSED = 371;</code> + */ + public static final int SC_GUESS_CLOSED_VALUE = 371; + /** + * <code>SC_PK_INVITATION = 380;</code> + */ + public static final int SC_PK_INVITATION_VALUE = 380; + /** + * <code>SC_PK_STATISTIC = 381;</code> + */ + public static final int SC_PK_STATISTIC_VALUE = 381; + /** + * <code>SC_RIDDLE_OPENED = 390;</code> + */ + public static final int SC_RIDDLE_OPENED_VALUE = 390; + /** + * <code>SC_RIDDLE_CLOESED = 391;</code> + */ + public static final int SC_RIDDLE_CLOESED_VALUE = 391; + /** + * <code>SC_RIDE_CHANGED = 412;</code> + */ + public static final int SC_RIDE_CHANGED_VALUE = 412; + /** + * <code>SC_BET_CHANGED = 441;</code> + */ + public static final int SC_BET_CHANGED_VALUE = 441; + /** + * <code>SC_BET_CLOSED = 442;</code> + */ + public static final int SC_BET_CLOSED_VALUE = 442; + /** + * <code>SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE = 645;</code> + */ + public static final int SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE_VALUE = 645; + /** + * <code>SC_LIVE_WARNING_MASK_STATUS_CHANGED_AUDIENCE = 758;</code> + */ + public static final int SC_LIVE_WARNING_MASK_STATUS_CHANGED_AUDIENCE_VALUE = 758; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PayloadType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PayloadType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return CS_HEARTBEAT; + case 3: return CS_ERROR; + case 4: return CS_PING; + case 51: return PS_HOST_INFO; + case 101: return SC_HEARTBEAT_ACK; + case 102: return SC_ECHO; + case 103: return SC_ERROR; + case 104: return SC_PING_ACK; + case 105: return SC_INFO; + case 200: return CS_ENTER_ROOM; + case 201: return CS_USER_PAUSE; + case 202: return CS_USER_EXIT; + case 203: return CS_AUTHOR_PUSH_TRAFFIC_ZERO; + case 204: return CS_HORSE_RACING; + case 205: return CS_RACE_LOSE; + case 206: return CS_VOIP_SIGNAL; + case 300: return SC_ENTER_ROOM_ACK; + case 301: return SC_AUTHOR_PAUSE; + case 302: return SC_AUTHOR_RESUME; + case 303: return SC_AUTHOR_PUSH_TRAFFIC_ZERO; + case 304: return SC_AUTHOR_HEARTBEAT_MISS; + case 305: return SC_PIP_STARTED; + case 306: return SC_PIP_ENDED; + case 307: return SC_HORSE_RACING_ACK; + case 308: return SC_VOIP_SIGNAL; + case 310: return SC_FEED_PUSH; + case 311: return SC_ASSISTANT_STATUS; + case 312: return SC_REFRESH_WALLET; + case 320: return SC_LIVE_CHAT_CALL; + case 321: return SC_LIVE_CHAT_CALL_ACCEPTED; + case 322: return SC_LIVE_CHAT_CALL_REJECTED; + case 323: return SC_LIVE_CHAT_READY; + case 324: return SC_LIVE_CHAT_GUEST_END; + case 325: return SC_LIVE_CHAT_ENDED; + case 326: return SC_RENDERING_MAGIC_FACE_DISABLE; + case 327: return SC_RENDERING_MAGIC_FACE_ENABLE; + case 330: return SC_RED_PACK_FEED; + case 340: return SC_LIVE_WATCHING_LIST; + case 350: return SC_LIVE_QUIZ_QUESTION_ASKED; + case 351: return SC_LIVE_QUIZ_QUESTION_REVIEWED; + case 352: return SC_LIVE_QUIZ_SYNC; + case 353: return SC_LIVE_QUIZ_ENDED; + case 354: return SC_LIVE_QUIZ_WINNERS; + case 355: return SC_SUSPECTED_VIOLATION; + case 360: return SC_SHOP_OPENED; + case 361: return SC_SHOP_CLOSED; + case 370: return SC_GUESS_OPENED; + case 371: return SC_GUESS_CLOSED; + case 380: return SC_PK_INVITATION; + case 381: return SC_PK_STATISTIC; + case 390: return SC_RIDDLE_OPENED; + case 391: return SC_RIDDLE_CLOESED; + case 412: return SC_RIDE_CHANGED; + case 441: return SC_BET_CHANGED; + case 442: return SC_BET_CLOSED; + case 645: return SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE; + case 758: return SC_LIVE_WARNING_MASK_STATUS_CHANGED_AUDIENCE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap<PayloadType> + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + PayloadType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap<PayloadType>() { + public PayloadType findValueByNumber(int number) { + return PayloadType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final PayloadType[] VALUES = values(); + + public static PayloadType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PayloadType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:PayloadType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021PayloadType.proto*\213\013\n\013PayloadType\022\013\n\007U" + + "NKNOWN\020\000\022\020\n\014CS_HEARTBEAT\020\001\022\014\n\010CS_ERROR\020\003" + + "\022\013\n\007CS_PING\020\004\022\020\n\014PS_HOST_INFO\0203\022\024\n\020SC_HE" + + "ARTBEAT_ACK\020e\022\013\n\007SC_ECHO\020f\022\014\n\010SC_ERROR\020g" + + "\022\017\n\013SC_PING_ACK\020h\022\013\n\007SC_INFO\020i\022\022\n\rCS_ENT" + + "ER_ROOM\020\310\001\022\022\n\rCS_USER_PAUSE\020\311\001\022\021\n\014CS_USE" + + "R_EXIT\020\312\001\022 \n\033CS_AUTHOR_PUSH_TRAFFIC_ZERO" + + "\020\313\001\022\024\n\017CS_HORSE_RACING\020\314\001\022\021\n\014CS_RACE_LOS" + + "E\020\315\001\022\023\n\016CS_VOIP_SIGNAL\020\316\001\022\026\n\021SC_ENTER_RO" + + "OM_ACK\020\254\002\022\024\n\017SC_AUTHOR_PAUSE\020\255\002\022\025\n\020SC_AU" + + "THOR_RESUME\020\256\002\022 \n\033SC_AUTHOR_PUSH_TRAFFIC" + + "_ZERO\020\257\002\022\035\n\030SC_AUTHOR_HEARTBEAT_MISS\020\260\002\022" + + "\023\n\016SC_PIP_STARTED\020\261\002\022\021\n\014SC_PIP_ENDED\020\262\002\022" + + "\030\n\023SC_HORSE_RACING_ACK\020\263\002\022\023\n\016SC_VOIP_SIG" + + "NAL\020\264\002\022\021\n\014SC_FEED_PUSH\020\266\002\022\030\n\023SC_ASSISTAN" + + "T_STATUS\020\267\002\022\026\n\021SC_REFRESH_WALLET\020\270\002\022\026\n\021S" + + "C_LIVE_CHAT_CALL\020\300\002\022\037\n\032SC_LIVE_CHAT_CALL" + + "_ACCEPTED\020\301\002\022\037\n\032SC_LIVE_CHAT_CALL_REJECT" + + "ED\020\302\002\022\027\n\022SC_LIVE_CHAT_READY\020\303\002\022\033\n\026SC_LIV" + + "E_CHAT_GUEST_END\020\304\002\022\027\n\022SC_LIVE_CHAT_ENDE" + + "D\020\305\002\022$\n\037SC_RENDERING_MAGIC_FACE_DISABLE\020" + + "\306\002\022#\n\036SC_RENDERING_MAGIC_FACE_ENABLE\020\307\002\022" + + "\025\n\020SC_RED_PACK_FEED\020\312\002\022\032\n\025SC_LIVE_WATCHI" + + "NG_LIST\020\324\002\022 \n\033SC_LIVE_QUIZ_QUESTION_ASKE" + + "D\020\336\002\022#\n\036SC_LIVE_QUIZ_QUESTION_REVIEWED\020\337" + + "\002\022\026\n\021SC_LIVE_QUIZ_SYNC\020\340\002\022\027\n\022SC_LIVE_QUI" + + "Z_ENDED\020\341\002\022\031\n\024SC_LIVE_QUIZ_WINNERS\020\342\002\022\033\n" + + "\026SC_SUSPECTED_VIOLATION\020\343\002\022\023\n\016SC_SHOP_OP" + + "ENED\020\350\002\022\023\n\016SC_SHOP_CLOSED\020\351\002\022\024\n\017SC_GUESS" + + "_OPENED\020\362\002\022\024\n\017SC_GUESS_CLOSED\020\363\002\022\025\n\020SC_P" + + "K_INVITATION\020\374\002\022\024\n\017SC_PK_STATISTIC\020\375\002\022\025\n" + + "\020SC_RIDDLE_OPENED\020\206\003\022\026\n\021SC_RIDDLE_CLOESE" + + "D\020\207\003\022\024\n\017SC_RIDE_CHANGED\020\234\003\022\023\n\016SC_BET_CHA" + + "NGED\020\271\003\022\022\n\rSC_BET_CLOSED\020\272\003\022)\n$SC_LIVE_S" + + "PECIAL_ACCOUNT_CONFIG_STATE\020\205\005\0221\n,SC_LIV" + + "E_WARNING_MASK_STATUS_CHANGED_AUDIENCE\020\366" + + "\005B6\n4tech.ordinaryroad.live.chat.client." + + "kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/PicUrlOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/PicUrlOuterClass.java new file mode 100644 index 0000000..935c3bb --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/PicUrlOuterClass.java @@ -0,0 +1,1069 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: PicUrl.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class PicUrlOuterClass { + private PicUrlOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PicUrlOrBuilder extends + // @@protoc_insertion_point(interface_extends:PicUrl) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string cdn = 1;</code> + * @return The cdn. + */ + java.lang.String getCdn(); + /** + * <code>string cdn = 1;</code> + * @return The bytes for cdn. + */ + com.google.protobuf.ByteString + getCdnBytes(); + + /** + * <code>string url = 2;</code> + * @return The url. + */ + java.lang.String getUrl(); + /** + * <code>string url = 2;</code> + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + * <code>string urlPattern = 3;</code> + * @return The urlPattern. + */ + java.lang.String getUrlPattern(); + /** + * <code>string urlPattern = 3;</code> + * @return The bytes for urlPattern. + */ + com.google.protobuf.ByteString + getUrlPatternBytes(); + + /** + * <code>string ip = 4;</code> + * @return The ip. + */ + java.lang.String getIp(); + /** + * <code>string ip = 4;</code> + * @return The bytes for ip. + */ + com.google.protobuf.ByteString + getIpBytes(); + } + /** + * Protobuf type {@code PicUrl} + */ + public static final class PicUrl extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:PicUrl) + PicUrlOrBuilder { + private static final long serialVersionUID = 0L; + // Use PicUrl.newBuilder() to construct. + private PicUrl(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private PicUrl() { + cdn_ = ""; + url_ = ""; + urlPattern_ = ""; + ip_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PicUrl(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.internal_static_PicUrl_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.internal_static_PicUrl_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder.class); + } + + public static final int CDN_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object cdn_ = ""; + /** + * <code>string cdn = 1;</code> + * @return The cdn. + */ + @java.lang.Override + public java.lang.String getCdn() { + java.lang.Object ref = cdn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cdn_ = s; + return s; + } + } + /** + * <code>string cdn = 1;</code> + * @return The bytes for cdn. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCdnBytes() { + java.lang.Object ref = cdn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cdn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object url_ = ""; + /** + * <code>string url = 2;</code> + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + * <code>string url = 2;</code> + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URLPATTERN_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object urlPattern_ = ""; + /** + * <code>string urlPattern = 3;</code> + * @return The urlPattern. + */ + @java.lang.Override + public java.lang.String getUrlPattern() { + java.lang.Object ref = urlPattern_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + urlPattern_ = s; + return s; + } + } + /** + * <code>string urlPattern = 3;</code> + * @return The bytes for urlPattern. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUrlPatternBytes() { + java.lang.Object ref = urlPattern_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + urlPattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IP_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object ip_ = ""; + /** + * <code>string ip = 4;</code> + * @return The ip. + */ + @java.lang.Override + public java.lang.String getIp() { + java.lang.Object ref = ip_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ip_ = s; + return s; + } + } + /** + * <code>string ip = 4;</code> + * @return The bytes for ip. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIpBytes() { + java.lang.Object ref = ip_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ip_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cdn_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, cdn_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlPattern_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, urlPattern_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ip_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ip_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cdn_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, cdn_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlPattern_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, urlPattern_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ip_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, ip_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl) obj; + + if (!getCdn() + .equals(other.getCdn())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getUrlPattern() + .equals(other.getUrlPattern())) return false; + if (!getIp() + .equals(other.getIp())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CDN_FIELD_NUMBER; + hash = (53 * hash) + getCdn().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + URLPATTERN_FIELD_NUMBER; + hash = (53 * hash) + getUrlPattern().hashCode(); + hash = (37 * hash) + IP_FIELD_NUMBER; + hash = (53 * hash) + getIp().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code PicUrl} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:PicUrl) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.internal_static_PicUrl_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.internal_static_PicUrl_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + cdn_ = ""; + url_ = ""; + urlPattern_ = ""; + ip_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.internal_static_PicUrl_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.cdn_ = cdn_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.url_ = url_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.urlPattern_ = urlPattern_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ip_ = ip_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.getDefaultInstance()) return this; + if (!other.getCdn().isEmpty()) { + cdn_ = other.cdn_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getUrlPattern().isEmpty()) { + urlPattern_ = other.urlPattern_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getIp().isEmpty()) { + ip_ = other.ip_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cdn_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + urlPattern_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + ip_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object cdn_ = ""; + /** + * <code>string cdn = 1;</code> + * @return The cdn. + */ + public java.lang.String getCdn() { + java.lang.Object ref = cdn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cdn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string cdn = 1;</code> + * @return The bytes for cdn. + */ + public com.google.protobuf.ByteString + getCdnBytes() { + java.lang.Object ref = cdn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cdn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string cdn = 1;</code> + * @param value The cdn to set. + * @return This builder for chaining. + */ + public Builder setCdn( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + cdn_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string cdn = 1;</code> + * @return This builder for chaining. + */ + public Builder clearCdn() { + cdn_ = getDefaultInstance().getCdn(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string cdn = 1;</code> + * @param value The bytes for cdn to set. + * @return This builder for chaining. + */ + public Builder setCdnBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + cdn_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + * <code>string url = 2;</code> + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string url = 2;</code> + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string url = 2;</code> + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string url = 2;</code> + * @return This builder for chaining. + */ + public Builder clearUrl() { + url_ = getDefaultInstance().getUrl(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string url = 2;</code> + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + url_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object urlPattern_ = ""; + /** + * <code>string urlPattern = 3;</code> + * @return The urlPattern. + */ + public java.lang.String getUrlPattern() { + java.lang.Object ref = urlPattern_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + urlPattern_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string urlPattern = 3;</code> + * @return The bytes for urlPattern. + */ + public com.google.protobuf.ByteString + getUrlPatternBytes() { + java.lang.Object ref = urlPattern_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + urlPattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string urlPattern = 3;</code> + * @param value The urlPattern to set. + * @return This builder for chaining. + */ + public Builder setUrlPattern( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + urlPattern_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>string urlPattern = 3;</code> + * @return This builder for chaining. + */ + public Builder clearUrlPattern() { + urlPattern_ = getDefaultInstance().getUrlPattern(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * <code>string urlPattern = 3;</code> + * @param value The bytes for urlPattern to set. + * @return This builder for chaining. + */ + public Builder setUrlPatternBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + urlPattern_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object ip_ = ""; + /** + * <code>string ip = 4;</code> + * @return The ip. + */ + public java.lang.String getIp() { + java.lang.Object ref = ip_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ip_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string ip = 4;</code> + * @return The bytes for ip. + */ + public com.google.protobuf.ByteString + getIpBytes() { + java.lang.Object ref = ip_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ip_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string ip = 4;</code> + * @param value The ip to set. + * @return This builder for chaining. + */ + public Builder setIp( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ip_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>string ip = 4;</code> + * @return This builder for chaining. + */ + public Builder clearIp() { + ip_ = getDefaultInstance().getIp(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * <code>string ip = 4;</code> + * @param value The bytes for ip to set. + * @return This builder for chaining. + */ + public Builder setIpBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ip_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:PicUrl) + } + + // @@protoc_insertion_point(class_scope:PicUrl) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<PicUrl> + PARSER = new com.google.protobuf.AbstractParser<PicUrl>() { + @java.lang.Override + public PicUrl parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<PicUrl> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<PicUrl> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_PicUrl_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_PicUrl_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\014PicUrl.proto\"B\n\006PicUrl\022\013\n\003cdn\030\001 \001(\t\022\013\n" + + "\003url\030\002 \001(\t\022\022\n\nurlPattern\030\003 \001(\t\022\n\n\002ip\030\004 \001" + + "(\tB6\n4tech.ordinaryroad.live.chat.client" + + ".kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_PicUrl_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_PicUrl_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_PicUrl_descriptor, + new java.lang.String[] { "Cdn", "Url", "UrlPattern", "Ip", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCEchoOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCEchoOuterClass.java new file mode 100644 index 0000000..c39aa9c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCEchoOuterClass.java @@ -0,0 +1,624 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCEcho.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCEchoOuterClass { + private SCEchoOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCEchoOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCEcho) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string content = 1;</code> + * @return The content. + */ + java.lang.String getContent(); + /** + * <code>string content = 1;</code> + * @return The bytes for content. + */ + com.google.protobuf.ByteString + getContentBytes(); + } + /** + * Protobuf type {@code SCEcho} + */ + public static final class SCEcho extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCEcho) + SCEchoOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCEcho.newBuilder() to construct. + private SCEcho(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCEcho() { + content_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCEcho(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.internal_static_SCEcho_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.internal_static_SCEcho_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho.Builder.class); + } + + public static final int CONTENT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * <code>string content = 1;</code> + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + /** + * <code>string content = 1;</code> + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, content_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, content_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho) obj; + + if (!getContent() + .equals(other.getContent())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCEcho} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCEcho) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEchoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.internal_static_SCEcho_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.internal_static_SCEcho_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + content_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.internal_static_SCEcho_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.content_ = content_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho.getDefaultInstance()) return this; + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object content_ = ""; + /** + * <code>string content = 1;</code> + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string content = 1;</code> + * @return The bytes for content. + */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string content = 1;</code> + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string content = 1;</code> + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string content = 1;</code> + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCEcho) + } + + // @@protoc_insertion_point(class_scope:SCEcho) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCEcho> + PARSER = new com.google.protobuf.AbstractParser<SCEcho>() { + @java.lang.Override + public SCEcho parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCEcho> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCEcho> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCEchoOuterClass.SCEcho getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCEcho_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCEcho_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\014SCEcho.proto\"\031\n\006SCEcho\022\017\n\007content\030\001 \001(" + + "\tB6\n4tech.ordinaryroad.live.chat.client." + + "kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCEcho_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCEcho_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCEcho_descriptor, + new java.lang.String[] { "Content", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCErrorOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCErrorOuterClass.java new file mode 100644 index 0000000..4bb004e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCErrorOuterClass.java @@ -0,0 +1,769 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCError.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCErrorOuterClass { + private SCErrorOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCErrorOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCError) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint32 code = 1;</code> + * @return The code. + */ + int getCode(); + + /** + * <code>string msg = 2;</code> + * @return The msg. + */ + java.lang.String getMsg(); + /** + * <code>string msg = 2;</code> + * @return The bytes for msg. + */ + com.google.protobuf.ByteString + getMsgBytes(); + + /** + * <code>uint32 subCode = 3;</code> + * @return The subCode. + */ + int getSubCode(); + } + /** + * Protobuf type {@code SCError} + */ + public static final class SCError extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCError) + SCErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCError.newBuilder() to construct. + private SCError(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCError() { + msg_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCError(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.internal_static_SCError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.internal_static_SCError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + /** + * <code>uint32 code = 1;</code> + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + + public static final int MSG_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object msg_ = ""; + /** + * <code>string msg = 2;</code> + * @return The msg. + */ + @java.lang.Override + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } + } + /** + * <code>string msg = 2;</code> + * @return The bytes for msg. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBCODE_FIELD_NUMBER = 3; + private int subCode_ = 0; + /** + * <code>uint32 subCode = 3;</code> + * @return The subCode. + */ + @java.lang.Override + public int getSubCode() { + return subCode_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (code_ != 0) { + output.writeUInt32(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, msg_); + } + if (subCode_ != 0) { + output.writeUInt32(3, subCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, msg_); + } + if (subCode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, subCode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError) obj; + + if (getCode() + != other.getCode()) return false; + if (!getMsg() + .equals(other.getMsg())) return false; + if (getSubCode() + != other.getSubCode()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode(); + hash = (37 * hash) + MSG_FIELD_NUMBER; + hash = (53 * hash) + getMsg().hashCode(); + hash = (37 * hash) + SUBCODE_FIELD_NUMBER; + hash = (53 * hash) + getSubCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCError} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCError) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.internal_static_SCError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.internal_static_SCError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + msg_ = ""; + subCode_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.internal_static_SCError_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.msg_ = msg_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subCode_ = subCode_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError.getDefaultInstance()) return this; + if (other.getCode() != 0) { + setCode(other.getCode()); + } + if (!other.getMsg().isEmpty()) { + msg_ = other.msg_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getSubCode() != 0) { + setSubCode(other.getSubCode()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + code_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + msg_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + subCode_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int code_ ; + /** + * <code>uint32 code = 1;</code> + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + /** + * <code>uint32 code = 1;</code> + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(int value) { + + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint32 code = 1;</code> + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object msg_ = ""; + /** + * <code>string msg = 2;</code> + * @return The msg. + */ + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string msg = 2;</code> + * @return The bytes for msg. + */ + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string msg = 2;</code> + * @param value The msg to set. + * @return This builder for chaining. + */ + public Builder setMsg( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string msg = 2;</code> + * @return This builder for chaining. + */ + public Builder clearMsg() { + msg_ = getDefaultInstance().getMsg(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string msg = 2;</code> + * @param value The bytes for msg to set. + * @return This builder for chaining. + */ + public Builder setMsgBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int subCode_ ; + /** + * <code>uint32 subCode = 3;</code> + * @return The subCode. + */ + @java.lang.Override + public int getSubCode() { + return subCode_; + } + /** + * <code>uint32 subCode = 3;</code> + * @param value The subCode to set. + * @return This builder for chaining. + */ + public Builder setSubCode(int value) { + + subCode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint32 subCode = 3;</code> + * @return This builder for chaining. + */ + public Builder clearSubCode() { + bitField0_ = (bitField0_ & ~0x00000004); + subCode_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCError) + } + + // @@protoc_insertion_point(class_scope:SCError) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCError> + PARSER = new com.google.protobuf.AbstractParser<SCError>() { + @java.lang.Override + public SCError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCError> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCError> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCErrorOuterClass.SCError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCError_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCError_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\rSCError.proto\"5\n\007SCError\022\014\n\004code\030\001 \001(\r" + + "\022\013\n\003msg\030\002 \001(\t\022\017\n\007subCode\030\003 \001(\rB6\n4tech.o" + + "rdinaryroad.live.chat.client.kuaishou.pr" + + "otobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCError_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCError_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCError_descriptor, + new java.lang.String[] { "Code", "Msg", "SubCode", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCHeartbeatAckOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCHeartbeatAckOuterClass.java new file mode 100644 index 0000000..c2f9a23 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCHeartbeatAckOuterClass.java @@ -0,0 +1,623 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCHeartbeatAck.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCHeartbeatAckOuterClass { + private SCHeartbeatAckOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCHeartbeatAckOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCHeartbeatAck) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 timestamp = 1;</code> + * @return The timestamp. + */ + long getTimestamp(); + + /** + * <code>uint64 clientTimestamp = 2;</code> + * @return The clientTimestamp. + */ + long getClientTimestamp(); + } + /** + * Protobuf type {@code SCHeartbeatAck} + */ + public static final class SCHeartbeatAck extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCHeartbeatAck) + SCHeartbeatAckOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCHeartbeatAck.newBuilder() to construct. + private SCHeartbeatAck(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCHeartbeatAck() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCHeartbeatAck(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.internal_static_SCHeartbeatAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.internal_static_SCHeartbeatAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck.Builder.class); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 1; + private long timestamp_ = 0L; + /** + * <code>uint64 timestamp = 1;</code> + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + + public static final int CLIENTTIMESTAMP_FIELD_NUMBER = 2; + private long clientTimestamp_ = 0L; + /** + * <code>uint64 clientTimestamp = 2;</code> + * @return The clientTimestamp. + */ + @java.lang.Override + public long getClientTimestamp() { + return clientTimestamp_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (timestamp_ != 0L) { + output.writeUInt64(1, timestamp_); + } + if (clientTimestamp_ != 0L) { + output.writeUInt64(2, clientTimestamp_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, timestamp_); + } + if (clientTimestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, clientTimestamp_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck) obj; + + if (getTimestamp() + != other.getTimestamp()) return false; + if (getClientTimestamp() + != other.getClientTimestamp()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTimestamp()); + hash = (37 * hash) + CLIENTTIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getClientTimestamp()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCHeartbeatAck} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCHeartbeatAck) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAckOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.internal_static_SCHeartbeatAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.internal_static_SCHeartbeatAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + timestamp_ = 0L; + clientTimestamp_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.internal_static_SCHeartbeatAck_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.timestamp_ = timestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clientTimestamp_ = clientTimestamp_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck.getDefaultInstance()) return this; + if (other.getTimestamp() != 0L) { + setTimestamp(other.getTimestamp()); + } + if (other.getClientTimestamp() != 0L) { + setClientTimestamp(other.getClientTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + timestamp_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + clientTimestamp_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long timestamp_ ; + /** + * <code>uint64 timestamp = 1;</code> + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + /** + * <code>uint64 timestamp = 1;</code> + * @param value The timestamp to set. + * @return This builder for chaining. + */ + public Builder setTimestamp(long value) { + + timestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 timestamp = 1;</code> + * @return This builder for chaining. + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + timestamp_ = 0L; + onChanged(); + return this; + } + + private long clientTimestamp_ ; + /** + * <code>uint64 clientTimestamp = 2;</code> + * @return The clientTimestamp. + */ + @java.lang.Override + public long getClientTimestamp() { + return clientTimestamp_; + } + /** + * <code>uint64 clientTimestamp = 2;</code> + * @param value The clientTimestamp to set. + * @return This builder for chaining. + */ + public Builder setClientTimestamp(long value) { + + clientTimestamp_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>uint64 clientTimestamp = 2;</code> + * @return This builder for chaining. + */ + public Builder clearClientTimestamp() { + bitField0_ = (bitField0_ & ~0x00000002); + clientTimestamp_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCHeartbeatAck) + } + + // @@protoc_insertion_point(class_scope:SCHeartbeatAck) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCHeartbeatAck> + PARSER = new com.google.protobuf.AbstractParser<SCHeartbeatAck>() { + @java.lang.Override + public SCHeartbeatAck parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCHeartbeatAck> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCHeartbeatAck> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCHeartbeatAckOuterClass.SCHeartbeatAck getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCHeartbeatAck_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCHeartbeatAck_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024SCHeartbeatAck.proto\"<\n\016SCHeartbeatAck" + + "\022\021\n\ttimestamp\030\001 \001(\004\022\027\n\017clientTimestamp\030\002" + + " \001(\004B6\n4tech.ordinaryroad.live.chat.clie" + + "nt.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCHeartbeatAck_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCHeartbeatAck_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCHeartbeatAck_descriptor, + new java.lang.String[] { "Timestamp", "ClientTimestamp", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCInfoOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCInfoOuterClass.java new file mode 100644 index 0000000..8191432 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCInfoOuterClass.java @@ -0,0 +1,696 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCInfo.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCInfoOuterClass { + private SCInfoOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint32 code = 1;</code> + * @return The code. + */ + int getCode(); + + /** + * <code>string msg = 2;</code> + * @return The msg. + */ + java.lang.String getMsg(); + /** + * <code>string msg = 2;</code> + * @return The bytes for msg. + */ + com.google.protobuf.ByteString + getMsgBytes(); + } + /** + * Protobuf type {@code SCInfo} + */ + public static final class SCInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCInfo) + SCInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCInfo.newBuilder() to construct. + private SCInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCInfo() { + msg_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.internal_static_SCInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.internal_static_SCInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + /** + * <code>uint32 code = 1;</code> + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + + public static final int MSG_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object msg_ = ""; + /** + * <code>string msg = 2;</code> + * @return The msg. + */ + @java.lang.Override + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } + } + /** + * <code>string msg = 2;</code> + * @return The bytes for msg. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (code_ != 0) { + output.writeUInt32(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, msg_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, msg_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo) obj; + + if (getCode() + != other.getCode()) return false; + if (!getMsg() + .equals(other.getMsg())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode(); + hash = (37 * hash) + MSG_FIELD_NUMBER; + hash = (53 * hash) + getMsg().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCInfo) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.internal_static_SCInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.internal_static_SCInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + msg_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.internal_static_SCInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.msg_ = msg_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo.getDefaultInstance()) return this; + if (other.getCode() != 0) { + setCode(other.getCode()); + } + if (!other.getMsg().isEmpty()) { + msg_ = other.msg_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + code_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + msg_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int code_ ; + /** + * <code>uint32 code = 1;</code> + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + /** + * <code>uint32 code = 1;</code> + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(int value) { + + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint32 code = 1;</code> + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object msg_ = ""; + /** + * <code>string msg = 2;</code> + * @return The msg. + */ + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string msg = 2;</code> + * @return The bytes for msg. + */ + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string msg = 2;</code> + * @param value The msg to set. + * @return This builder for chaining. + */ + public Builder setMsg( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string msg = 2;</code> + * @return This builder for chaining. + */ + public Builder clearMsg() { + msg_ = getDefaultInstance().getMsg(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string msg = 2;</code> + * @param value The bytes for msg to set. + * @return This builder for chaining. + */ + public Builder setMsgBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCInfo) + } + + // @@protoc_insertion_point(class_scope:SCInfo) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCInfo> + PARSER = new com.google.protobuf.AbstractParser<SCInfo>() { + @java.lang.Override + public SCInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCInfoOuterClass.SCInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\014SCInfo.proto\"#\n\006SCInfo\022\014\n\004code\030\001 \001(\r\022\013" + + "\n\003msg\030\002 \001(\tB6\n4tech.ordinaryroad.live.ch" + + "at.client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCInfo_descriptor, + new java.lang.String[] { "Code", "Msg", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCLiveWarningMaskStatusChangedAudienceOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCLiveWarningMaskStatusChangedAudienceOuterClass.java new file mode 100644 index 0000000..507aad2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCLiveWarningMaskStatusChangedAudienceOuterClass.java @@ -0,0 +1,750 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCLiveWarningMaskStatusChangedAudience.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCLiveWarningMaskStatusChangedAudienceOuterClass { + private SCLiveWarningMaskStatusChangedAudienceOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCLiveWarningMaskStatusChangedAudienceOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCLiveWarningMaskStatusChangedAudience) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>bool displayMask = 1;</code> + * @return The displayMask. + */ + boolean getDisplayMask(); + + /** + * <code>.AuditAudienceMask warningMask = 2;</code> + * @return Whether the warningMask field is set. + */ + boolean hasWarningMask(); + /** + * <code>.AuditAudienceMask warningMask = 2;</code> + * @return The warningMask. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask getWarningMask(); + /** + * <code>.AuditAudienceMask warningMask = 2;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMaskOrBuilder getWarningMaskOrBuilder(); + } + /** + * Protobuf type {@code SCLiveWarningMaskStatusChangedAudience} + */ + public static final class SCLiveWarningMaskStatusChangedAudience extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCLiveWarningMaskStatusChangedAudience) + SCLiveWarningMaskStatusChangedAudienceOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCLiveWarningMaskStatusChangedAudience.newBuilder() to construct. + private SCLiveWarningMaskStatusChangedAudience(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCLiveWarningMaskStatusChangedAudience() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCLiveWarningMaskStatusChangedAudience(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.internal_static_SCLiveWarningMaskStatusChangedAudience_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.internal_static_SCLiveWarningMaskStatusChangedAudience_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience.Builder.class); + } + + public static final int DISPLAYMASK_FIELD_NUMBER = 1; + private boolean displayMask_ = false; + /** + * <code>bool displayMask = 1;</code> + * @return The displayMask. + */ + @java.lang.Override + public boolean getDisplayMask() { + return displayMask_; + } + + public static final int WARNINGMASK_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask warningMask_; + /** + * <code>.AuditAudienceMask warningMask = 2;</code> + * @return Whether the warningMask field is set. + */ + @java.lang.Override + public boolean hasWarningMask() { + return warningMask_ != null; + } + /** + * <code>.AuditAudienceMask warningMask = 2;</code> + * @return The warningMask. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask getWarningMask() { + return warningMask_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.getDefaultInstance() : warningMask_; + } + /** + * <code>.AuditAudienceMask warningMask = 2;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMaskOrBuilder getWarningMaskOrBuilder() { + return warningMask_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.getDefaultInstance() : warningMask_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (displayMask_ != false) { + output.writeBool(1, displayMask_); + } + if (warningMask_ != null) { + output.writeMessage(2, getWarningMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (displayMask_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, displayMask_); + } + if (warningMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getWarningMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience) obj; + + if (getDisplayMask() + != other.getDisplayMask()) return false; + if (hasWarningMask() != other.hasWarningMask()) return false; + if (hasWarningMask()) { + if (!getWarningMask() + .equals(other.getWarningMask())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAYMASK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDisplayMask()); + if (hasWarningMask()) { + hash = (37 * hash) + WARNINGMASK_FIELD_NUMBER; + hash = (53 * hash) + getWarningMask().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCLiveWarningMaskStatusChangedAudience} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCLiveWarningMaskStatusChangedAudience) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudienceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.internal_static_SCLiveWarningMaskStatusChangedAudience_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.internal_static_SCLiveWarningMaskStatusChangedAudience_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayMask_ = false; + warningMask_ = null; + if (warningMaskBuilder_ != null) { + warningMaskBuilder_.dispose(); + warningMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.internal_static_SCLiveWarningMaskStatusChangedAudience_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayMask_ = displayMask_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.warningMask_ = warningMaskBuilder_ == null + ? warningMask_ + : warningMaskBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience.getDefaultInstance()) return this; + if (other.getDisplayMask() != false) { + setDisplayMask(other.getDisplayMask()); + } + if (other.hasWarningMask()) { + mergeWarningMask(other.getWarningMask()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + displayMask_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getWarningMaskFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean displayMask_ ; + /** + * <code>bool displayMask = 1;</code> + * @return The displayMask. + */ + @java.lang.Override + public boolean getDisplayMask() { + return displayMask_; + } + /** + * <code>bool displayMask = 1;</code> + * @param value The displayMask to set. + * @return This builder for chaining. + */ + public Builder setDisplayMask(boolean value) { + + displayMask_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>bool displayMask = 1;</code> + * @return This builder for chaining. + */ + public Builder clearDisplayMask() { + bitField0_ = (bitField0_ & ~0x00000001); + displayMask_ = false; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask warningMask_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMaskOrBuilder> warningMaskBuilder_; + /** + * <code>.AuditAudienceMask warningMask = 2;</code> + * @return Whether the warningMask field is set. + */ + public boolean hasWarningMask() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * <code>.AuditAudienceMask warningMask = 2;</code> + * @return The warningMask. + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask getWarningMask() { + if (warningMaskBuilder_ == null) { + return warningMask_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.getDefaultInstance() : warningMask_; + } else { + return warningMaskBuilder_.getMessage(); + } + } + /** + * <code>.AuditAudienceMask warningMask = 2;</code> + */ + public Builder setWarningMask(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask value) { + if (warningMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + warningMask_ = value; + } else { + warningMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.AuditAudienceMask warningMask = 2;</code> + */ + public Builder setWarningMask( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.Builder builderForValue) { + if (warningMaskBuilder_ == null) { + warningMask_ = builderForValue.build(); + } else { + warningMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.AuditAudienceMask warningMask = 2;</code> + */ + public Builder mergeWarningMask(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask value) { + if (warningMaskBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + warningMask_ != null && + warningMask_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.getDefaultInstance()) { + getWarningMaskBuilder().mergeFrom(value); + } else { + warningMask_ = value; + } + } else { + warningMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.AuditAudienceMask warningMask = 2;</code> + */ + public Builder clearWarningMask() { + bitField0_ = (bitField0_ & ~0x00000002); + warningMask_ = null; + if (warningMaskBuilder_ != null) { + warningMaskBuilder_.dispose(); + warningMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.AuditAudienceMask warningMask = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.Builder getWarningMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getWarningMaskFieldBuilder().getBuilder(); + } + /** + * <code>.AuditAudienceMask warningMask = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMaskOrBuilder getWarningMaskOrBuilder() { + if (warningMaskBuilder_ != null) { + return warningMaskBuilder_.getMessageOrBuilder(); + } else { + return warningMask_ == null ? + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.getDefaultInstance() : warningMask_; + } + } + /** + * <code>.AuditAudienceMask warningMask = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMaskOrBuilder> + getWarningMaskFieldBuilder() { + if (warningMaskBuilder_ == null) { + warningMaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMask.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.AuditAudienceMaskOrBuilder>( + getWarningMask(), + getParentForChildren(), + isClean()); + warningMask_ = null; + } + return warningMaskBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCLiveWarningMaskStatusChangedAudience) + } + + // @@protoc_insertion_point(class_scope:SCLiveWarningMaskStatusChangedAudience) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCLiveWarningMaskStatusChangedAudience> + PARSER = new com.google.protobuf.AbstractParser<SCLiveWarningMaskStatusChangedAudience>() { + @java.lang.Override + public SCLiveWarningMaskStatusChangedAudience parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCLiveWarningMaskStatusChangedAudience> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCLiveWarningMaskStatusChangedAudience> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCLiveWarningMaskStatusChangedAudienceOuterClass.SCLiveWarningMaskStatusChangedAudience getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCLiveWarningMaskStatusChangedAudience_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCLiveWarningMaskStatusChangedAudience_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n,SCLiveWarningMaskStatusChangedAudience" + + ".proto\032\027AuditAudienceMask.proto\"f\n&SCLiv" + + "eWarningMaskStatusChangedAudience\022\023\n\013dis" + + "playMask\030\001 \001(\010\022\'\n\013warningMask\030\002 \001(\0132\022.Au" + + "ditAudienceMaskB6\n4tech.ordinaryroad.liv" + + "e.chat.client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.getDescriptor(), + }); + internal_static_SCLiveWarningMaskStatusChangedAudience_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCLiveWarningMaskStatusChangedAudience_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCLiveWarningMaskStatusChangedAudience_descriptor, + new java.lang.String[] { "DisplayMask", "WarningMask", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.AuditAudienceMaskOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCPingAckOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCPingAckOuterClass.java new file mode 100644 index 0000000..68e4df3 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCPingAckOuterClass.java @@ -0,0 +1,624 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCPingAck.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCPingAckOuterClass { + private SCPingAckOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCPingAckOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCPingAck) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string echoData = 1;</code> + * @return The echoData. + */ + java.lang.String getEchoData(); + /** + * <code>string echoData = 1;</code> + * @return The bytes for echoData. + */ + com.google.protobuf.ByteString + getEchoDataBytes(); + } + /** + * Protobuf type {@code SCPingAck} + */ + public static final class SCPingAck extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCPingAck) + SCPingAckOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCPingAck.newBuilder() to construct. + private SCPingAck(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCPingAck() { + echoData_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCPingAck(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.internal_static_SCPingAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.internal_static_SCPingAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck.Builder.class); + } + + public static final int ECHODATA_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object echoData_ = ""; + /** + * <code>string echoData = 1;</code> + * @return The echoData. + */ + @java.lang.Override + public java.lang.String getEchoData() { + java.lang.Object ref = echoData_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + echoData_ = s; + return s; + } + } + /** + * <code>string echoData = 1;</code> + * @return The bytes for echoData. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getEchoDataBytes() { + java.lang.Object ref = echoData_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + echoData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(echoData_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, echoData_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(echoData_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, echoData_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck) obj; + + if (!getEchoData() + .equals(other.getEchoData())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ECHODATA_FIELD_NUMBER; + hash = (53 * hash) + getEchoData().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCPingAck} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCPingAck) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAckOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.internal_static_SCPingAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.internal_static_SCPingAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + echoData_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.internal_static_SCPingAck_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.echoData_ = echoData_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck.getDefaultInstance()) return this; + if (!other.getEchoData().isEmpty()) { + echoData_ = other.echoData_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + echoData_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object echoData_ = ""; + /** + * <code>string echoData = 1;</code> + * @return The echoData. + */ + public java.lang.String getEchoData() { + java.lang.Object ref = echoData_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + echoData_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string echoData = 1;</code> + * @return The bytes for echoData. + */ + public com.google.protobuf.ByteString + getEchoDataBytes() { + java.lang.Object ref = echoData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + echoData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string echoData = 1;</code> + * @param value The echoData to set. + * @return This builder for chaining. + */ + public Builder setEchoData( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + echoData_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string echoData = 1;</code> + * @return This builder for chaining. + */ + public Builder clearEchoData() { + echoData_ = getDefaultInstance().getEchoData(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string echoData = 1;</code> + * @param value The bytes for echoData to set. + * @return This builder for chaining. + */ + public Builder setEchoDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + echoData_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCPingAck) + } + + // @@protoc_insertion_point(class_scope:SCPingAck) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCPingAck> + PARSER = new com.google.protobuf.AbstractParser<SCPingAck>() { + @java.lang.Override + public SCPingAck parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCPingAck> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCPingAck> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCPingAckOuterClass.SCPingAck getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCPingAck_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCPingAck_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\017SCPingAck.proto\"\035\n\tSCPingAck\022\020\n\010echoDa" + + "ta\030\001 \001(\tB6\n4tech.ordinaryroad.live.chat." + + "client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCPingAck_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCPingAck_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCPingAck_descriptor, + new java.lang.String[] { "EchoData", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebAuthorPauseOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebAuthorPauseOuterClass.java new file mode 100644 index 0000000..c2e6f94 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebAuthorPauseOuterClass.java @@ -0,0 +1,658 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebAuthorPause.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebAuthorPauseOuterClass { + private SCWebAuthorPauseOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebAuthorPauseOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebAuthorPause) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + long getTime(); + + /** + * <code>.WebPauseType pauseType = 2;</code> + * @return The enum numeric value on the wire for pauseType. + */ + int getPauseTypeValue(); + /** + * <code>.WebPauseType pauseType = 2;</code> + * @return The pauseType. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType getPauseType(); + } + /** + * Protobuf type {@code SCWebAuthorPause} + */ + public static final class SCWebAuthorPause extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebAuthorPause) + SCWebAuthorPauseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebAuthorPause.newBuilder() to construct. + private SCWebAuthorPause(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebAuthorPause() { + pauseType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebAuthorPause(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.internal_static_SCWebAuthorPause_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.internal_static_SCWebAuthorPause_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_ = 0L; + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + public static final int PAUSETYPE_FIELD_NUMBER = 2; + private int pauseType_ = 0; + /** + * <code>.WebPauseType pauseType = 2;</code> + * @return The enum numeric value on the wire for pauseType. + */ + @java.lang.Override public int getPauseTypeValue() { + return pauseType_; + } + /** + * <code>.WebPauseType pauseType = 2;</code> + * @return The pauseType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType getPauseType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType.forNumber(pauseType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + if (pauseType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType.UNKNOWN_PAUSE_TYPE.getNumber()) { + output.writeEnum(2, pauseType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + if (pauseType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType.UNKNOWN_PAUSE_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, pauseType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause) obj; + + if (getTime() + != other.getTime()) return false; + if (pauseType_ != other.pauseType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + PAUSETYPE_FIELD_NUMBER; + hash = (53 * hash) + pauseType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebAuthorPause} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebAuthorPause) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPauseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.internal_static_SCWebAuthorPause_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.internal_static_SCWebAuthorPause_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + time_ = 0L; + pauseType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.internal_static_SCWebAuthorPause_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.time_ = time_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pauseType_ = pauseType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (other.pauseType_ != 0) { + setPauseTypeValue(other.getPauseTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + pauseType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long time_ ; + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * <code>uint64 time = 1;</code> + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 time = 1;</code> + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0L; + onChanged(); + return this; + } + + private int pauseType_ = 0; + /** + * <code>.WebPauseType pauseType = 2;</code> + * @return The enum numeric value on the wire for pauseType. + */ + @java.lang.Override public int getPauseTypeValue() { + return pauseType_; + } + /** + * <code>.WebPauseType pauseType = 2;</code> + * @param value The enum numeric value on the wire for pauseType to set. + * @return This builder for chaining. + */ + public Builder setPauseTypeValue(int value) { + pauseType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.WebPauseType pauseType = 2;</code> + * @return The pauseType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType getPauseType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType.forNumber(pauseType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType.UNRECOGNIZED : result; + } + /** + * <code>.WebPauseType pauseType = 2;</code> + * @param value The pauseType to set. + * @return This builder for chaining. + */ + public Builder setPauseType(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebPauseTypeOuterClass.WebPauseType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + pauseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * <code>.WebPauseType pauseType = 2;</code> + * @return This builder for chaining. + */ + public Builder clearPauseType() { + bitField0_ = (bitField0_ & ~0x00000002); + pauseType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebAuthorPause) + } + + // @@protoc_insertion_point(class_scope:SCWebAuthorPause) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebAuthorPause> + PARSER = new com.google.protobuf.AbstractParser<SCWebAuthorPause>() { + @java.lang.Override + public SCWebAuthorPause parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebAuthorPause> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebAuthorPause> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorPauseOuterClass.SCWebAuthorPause getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebAuthorPause_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebAuthorPause_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026SCWebAuthorPause.proto\032\022WebPauseType.p" + + "roto\"B\n\020SCWebAuthorPause\022\014\n\004time\030\001 \001(\004\022 " + + "\n\tpauseType\030\002 \001(\0162\r.WebPauseTypeB6\n4tech" + + ".ordinaryroad.live.chat.client.kuaishou." + + "protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebPauseTypeOuterClass.getDescriptor(), + }); + internal_static_SCWebAuthorPause_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebAuthorPause_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebAuthorPause_descriptor, + new java.lang.String[] { "Time", "PauseType", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebPauseTypeOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebAuthorResumeOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebAuthorResumeOuterClass.java new file mode 100644 index 0000000..77e3c12 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebAuthorResumeOuterClass.java @@ -0,0 +1,550 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebAuthorResume.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebAuthorResumeOuterClass { + private SCWebAuthorResumeOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebAuthorResumeOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebAuthorResume) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + long getTime(); + } + /** + * Protobuf type {@code SCWebAuthorResume} + */ + public static final class SCWebAuthorResume extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebAuthorResume) + SCWebAuthorResumeOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebAuthorResume.newBuilder() to construct. + private SCWebAuthorResume(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebAuthorResume() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebAuthorResume(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.internal_static_SCWebAuthorResume_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.internal_static_SCWebAuthorResume_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_ = 0L; + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume) obj; + + if (getTime() + != other.getTime()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebAuthorResume} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebAuthorResume) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResumeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.internal_static_SCWebAuthorResume_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.internal_static_SCWebAuthorResume_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + time_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.internal_static_SCWebAuthorResume_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.time_ = time_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long time_ ; + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * <code>uint64 time = 1;</code> + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 time = 1;</code> + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebAuthorResume) + } + + // @@protoc_insertion_point(class_scope:SCWebAuthorResume) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebAuthorResume> + PARSER = new com.google.protobuf.AbstractParser<SCWebAuthorResume>() { + @java.lang.Override + public SCWebAuthorResume parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebAuthorResume> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebAuthorResume> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebAuthorResumeOuterClass.SCWebAuthorResume getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebAuthorResume_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebAuthorResume_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\027SCWebAuthorResume.proto\"!\n\021SCWebAuthor" + + "Resume\022\014\n\004time\030\001 \001(\004B6\n4tech.ordinaryroa" + + "d.live.chat.client.kuaishou.protobufb\006pr" + + "oto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebAuthorResume_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebAuthorResume_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebAuthorResume_descriptor, + new java.lang.String[] { "Time", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebBetChangedOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebBetChangedOuterClass.java new file mode 100644 index 0000000..2aa5e58 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebBetChangedOuterClass.java @@ -0,0 +1,550 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebBetChanged.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebBetChangedOuterClass { + private SCWebBetChangedOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebBetChangedOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebBetChanged) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 maxDelayMillis = 1;</code> + * @return The maxDelayMillis. + */ + long getMaxDelayMillis(); + } + /** + * Protobuf type {@code SCWebBetChanged} + */ + public static final class SCWebBetChanged extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebBetChanged) + SCWebBetChangedOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebBetChanged.newBuilder() to construct. + private SCWebBetChanged(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebBetChanged() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebBetChanged(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.internal_static_SCWebBetChanged_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.internal_static_SCWebBetChanged_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged.Builder.class); + } + + public static final int MAXDELAYMILLIS_FIELD_NUMBER = 1; + private long maxDelayMillis_ = 0L; + /** + * <code>uint64 maxDelayMillis = 1;</code> + * @return The maxDelayMillis. + */ + @java.lang.Override + public long getMaxDelayMillis() { + return maxDelayMillis_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (maxDelayMillis_ != 0L) { + output.writeUInt64(1, maxDelayMillis_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (maxDelayMillis_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, maxDelayMillis_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged) obj; + + if (getMaxDelayMillis() + != other.getMaxDelayMillis()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MAXDELAYMILLIS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMaxDelayMillis()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebBetChanged} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebBetChanged) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChangedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.internal_static_SCWebBetChanged_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.internal_static_SCWebBetChanged_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + maxDelayMillis_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.internal_static_SCWebBetChanged_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.maxDelayMillis_ = maxDelayMillis_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged.getDefaultInstance()) return this; + if (other.getMaxDelayMillis() != 0L) { + setMaxDelayMillis(other.getMaxDelayMillis()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + maxDelayMillis_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long maxDelayMillis_ ; + /** + * <code>uint64 maxDelayMillis = 1;</code> + * @return The maxDelayMillis. + */ + @java.lang.Override + public long getMaxDelayMillis() { + return maxDelayMillis_; + } + /** + * <code>uint64 maxDelayMillis = 1;</code> + * @param value The maxDelayMillis to set. + * @return This builder for chaining. + */ + public Builder setMaxDelayMillis(long value) { + + maxDelayMillis_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 maxDelayMillis = 1;</code> + * @return This builder for chaining. + */ + public Builder clearMaxDelayMillis() { + bitField0_ = (bitField0_ & ~0x00000001); + maxDelayMillis_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebBetChanged) + } + + // @@protoc_insertion_point(class_scope:SCWebBetChanged) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebBetChanged> + PARSER = new com.google.protobuf.AbstractParser<SCWebBetChanged>() { + @java.lang.Override + public SCWebBetChanged parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebBetChanged> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebBetChanged> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetChangedOuterClass.SCWebBetChanged getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebBetChanged_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebBetChanged_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\025SCWebBetChanged.proto\")\n\017SCWebBetChang" + + "ed\022\026\n\016maxDelayMillis\030\001 \001(\004B6\n4tech.ordin" + + "aryroad.live.chat.client.kuaishou.protob" + + "ufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebBetChanged_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebBetChanged_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebBetChanged_descriptor, + new java.lang.String[] { "MaxDelayMillis", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebBetClosedOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebBetClosedOuterClass.java new file mode 100644 index 0000000..5fa5356 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebBetClosedOuterClass.java @@ -0,0 +1,550 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebBetClosed.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebBetClosedOuterClass { + private SCWebBetClosedOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebBetClosedOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebBetClosed) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 maxDelayMillis = 1;</code> + * @return The maxDelayMillis. + */ + long getMaxDelayMillis(); + } + /** + * Protobuf type {@code SCWebBetClosed} + */ + public static final class SCWebBetClosed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebBetClosed) + SCWebBetClosedOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebBetClosed.newBuilder() to construct. + private SCWebBetClosed(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebBetClosed() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebBetClosed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.internal_static_SCWebBetClosed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.internal_static_SCWebBetClosed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed.Builder.class); + } + + public static final int MAXDELAYMILLIS_FIELD_NUMBER = 1; + private long maxDelayMillis_ = 0L; + /** + * <code>uint64 maxDelayMillis = 1;</code> + * @return The maxDelayMillis. + */ + @java.lang.Override + public long getMaxDelayMillis() { + return maxDelayMillis_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (maxDelayMillis_ != 0L) { + output.writeUInt64(1, maxDelayMillis_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (maxDelayMillis_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, maxDelayMillis_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed) obj; + + if (getMaxDelayMillis() + != other.getMaxDelayMillis()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MAXDELAYMILLIS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMaxDelayMillis()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebBetClosed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebBetClosed) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.internal_static_SCWebBetClosed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.internal_static_SCWebBetClosed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + maxDelayMillis_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.internal_static_SCWebBetClosed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.maxDelayMillis_ = maxDelayMillis_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed.getDefaultInstance()) return this; + if (other.getMaxDelayMillis() != 0L) { + setMaxDelayMillis(other.getMaxDelayMillis()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + maxDelayMillis_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long maxDelayMillis_ ; + /** + * <code>uint64 maxDelayMillis = 1;</code> + * @return The maxDelayMillis. + */ + @java.lang.Override + public long getMaxDelayMillis() { + return maxDelayMillis_; + } + /** + * <code>uint64 maxDelayMillis = 1;</code> + * @param value The maxDelayMillis to set. + * @return This builder for chaining. + */ + public Builder setMaxDelayMillis(long value) { + + maxDelayMillis_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 maxDelayMillis = 1;</code> + * @return This builder for chaining. + */ + public Builder clearMaxDelayMillis() { + bitField0_ = (bitField0_ & ~0x00000001); + maxDelayMillis_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebBetClosed) + } + + // @@protoc_insertion_point(class_scope:SCWebBetClosed) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebBetClosed> + PARSER = new com.google.protobuf.AbstractParser<SCWebBetClosed>() { + @java.lang.Override + public SCWebBetClosed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebBetClosed> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebBetClosed> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebBetClosedOuterClass.SCWebBetClosed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebBetClosed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebBetClosed_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024SCWebBetClosed.proto\"(\n\016SCWebBetClosed" + + "\022\026\n\016maxDelayMillis\030\001 \001(\004B6\n4tech.ordinar" + + "yroad.live.chat.client.kuaishou.protobuf" + + "b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebBetClosed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebBetClosed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebBetClosed_descriptor, + new java.lang.String[] { "MaxDelayMillis", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebCurrentRedPackFeedOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebCurrentRedPackFeedOuterClass.java new file mode 100644 index 0000000..fc3d24a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebCurrentRedPackFeedOuterClass.java @@ -0,0 +1,858 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebCurrentRedPackFeed.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebCurrentRedPackFeedOuterClass { + private SCWebCurrentRedPackFeedOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebCurrentRedPackFeedOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebCurrentRedPackFeed) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo> + getRedPackList(); + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo getRedPack(int index); + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + int getRedPackCount(); + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder> + getRedPackOrBuilderList(); + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder getRedPackOrBuilder( + int index); + } + /** + * Protobuf type {@code SCWebCurrentRedPackFeed} + */ + public static final class SCWebCurrentRedPackFeed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebCurrentRedPackFeed) + SCWebCurrentRedPackFeedOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebCurrentRedPackFeed.newBuilder() to construct. + private SCWebCurrentRedPackFeed(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebCurrentRedPackFeed() { + redPack_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebCurrentRedPackFeed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.internal_static_SCWebCurrentRedPackFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.internal_static_SCWebCurrentRedPackFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed.Builder.class); + } + + public static final int REDPACK_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo> redPack_; + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo> getRedPackList() { + return redPack_; + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder> + getRedPackOrBuilderList() { + return redPack_; + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + @java.lang.Override + public int getRedPackCount() { + return redPack_.size(); + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo getRedPack(int index) { + return redPack_.get(index); + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder getRedPackOrBuilder( + int index) { + return redPack_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < redPack_.size(); i++) { + output.writeMessage(1, redPack_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < redPack_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, redPack_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed) obj; + + if (!getRedPackList() + .equals(other.getRedPackList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRedPackCount() > 0) { + hash = (37 * hash) + REDPACK_FIELD_NUMBER; + hash = (53 * hash) + getRedPackList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebCurrentRedPackFeed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebCurrentRedPackFeed) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.internal_static_SCWebCurrentRedPackFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.internal_static_SCWebCurrentRedPackFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (redPackBuilder_ == null) { + redPack_ = java.util.Collections.emptyList(); + } else { + redPack_ = null; + redPackBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.internal_static_SCWebCurrentRedPackFeed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed result) { + if (redPackBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + redPack_ = java.util.Collections.unmodifiableList(redPack_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.redPack_ = redPack_; + } else { + result.redPack_ = redPackBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed result) { + int from_bitField0_ = bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed.getDefaultInstance()) return this; + if (redPackBuilder_ == null) { + if (!other.redPack_.isEmpty()) { + if (redPack_.isEmpty()) { + redPack_ = other.redPack_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRedPackIsMutable(); + redPack_.addAll(other.redPack_); + } + onChanged(); + } + } else { + if (!other.redPack_.isEmpty()) { + if (redPackBuilder_.isEmpty()) { + redPackBuilder_.dispose(); + redPackBuilder_ = null; + redPack_ = other.redPack_; + bitField0_ = (bitField0_ & ~0x00000001); + redPackBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getRedPackFieldBuilder() : null; + } else { + redPackBuilder_.addAllMessages(other.redPack_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo m = + input.readMessage( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.parser(), + extensionRegistry); + if (redPackBuilder_ == null) { + ensureRedPackIsMutable(); + redPack_.add(m); + } else { + redPackBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo> redPack_ = + java.util.Collections.emptyList(); + private void ensureRedPackIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + redPack_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo>(redPack_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder> redPackBuilder_; + + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo> getRedPackList() { + if (redPackBuilder_ == null) { + return java.util.Collections.unmodifiableList(redPack_); + } else { + return redPackBuilder_.getMessageList(); + } + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public int getRedPackCount() { + if (redPackBuilder_ == null) { + return redPack_.size(); + } else { + return redPackBuilder_.getCount(); + } + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo getRedPack(int index) { + if (redPackBuilder_ == null) { + return redPack_.get(index); + } else { + return redPackBuilder_.getMessage(index); + } + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public Builder setRedPack( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo value) { + if (redPackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRedPackIsMutable(); + redPack_.set(index, value); + onChanged(); + } else { + redPackBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public Builder setRedPack( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder builderForValue) { + if (redPackBuilder_ == null) { + ensureRedPackIsMutable(); + redPack_.set(index, builderForValue.build()); + onChanged(); + } else { + redPackBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public Builder addRedPack(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo value) { + if (redPackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRedPackIsMutable(); + redPack_.add(value); + onChanged(); + } else { + redPackBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public Builder addRedPack( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo value) { + if (redPackBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRedPackIsMutable(); + redPack_.add(index, value); + onChanged(); + } else { + redPackBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public Builder addRedPack( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder builderForValue) { + if (redPackBuilder_ == null) { + ensureRedPackIsMutable(); + redPack_.add(builderForValue.build()); + onChanged(); + } else { + redPackBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public Builder addRedPack( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder builderForValue) { + if (redPackBuilder_ == null) { + ensureRedPackIsMutable(); + redPack_.add(index, builderForValue.build()); + onChanged(); + } else { + redPackBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public Builder addAllRedPack( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo> values) { + if (redPackBuilder_ == null) { + ensureRedPackIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, redPack_); + onChanged(); + } else { + redPackBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public Builder clearRedPack() { + if (redPackBuilder_ == null) { + redPack_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + redPackBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public Builder removeRedPack(int index) { + if (redPackBuilder_ == null) { + ensureRedPackIsMutable(); + redPack_.remove(index); + onChanged(); + } else { + redPackBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder getRedPackBuilder( + int index) { + return getRedPackFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder getRedPackOrBuilder( + int index) { + if (redPackBuilder_ == null) { + return redPack_.get(index); } else { + return redPackBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder> + getRedPackOrBuilderList() { + if (redPackBuilder_ != null) { + return redPackBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(redPack_); + } + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder addRedPackBuilder() { + return getRedPackFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.getDefaultInstance()); + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder addRedPackBuilder( + int index) { + return getRedPackFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.getDefaultInstance()); + } + /** + * <code>repeated .WebRedPackInfo redPack = 1;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder> + getRedPackBuilderList() { + return getRedPackFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder> + getRedPackFieldBuilder() { + if (redPackBuilder_ == null) { + redPackBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder>( + redPack_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + redPack_ = null; + } + return redPackBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebCurrentRedPackFeed) + } + + // @@protoc_insertion_point(class_scope:SCWebCurrentRedPackFeed) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebCurrentRedPackFeed> + PARSER = new com.google.protobuf.AbstractParser<SCWebCurrentRedPackFeed>() { + @java.lang.Override + public SCWebCurrentRedPackFeed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebCurrentRedPackFeed> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebCurrentRedPackFeed> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebCurrentRedPackFeedOuterClass.SCWebCurrentRedPackFeed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebCurrentRedPackFeed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebCurrentRedPackFeed_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\035SCWebCurrentRedPackFeed.proto\032\024WebRedP" + + "ackInfo.proto\";\n\027SCWebCurrentRedPackFeed" + + "\022 \n\007redPack\030\001 \003(\0132\017.WebRedPackInfoB6\n4te" + + "ch.ordinaryroad.live.chat.client.kuaisho" + + "u.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.getDescriptor(), + }); + internal_static_SCWebCurrentRedPackFeed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebCurrentRedPackFeed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebCurrentRedPackFeed_descriptor, + new java.lang.String[] { "RedPack", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebEnterRoomAckOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebEnterRoomAckOuterClass.java new file mode 100644 index 0000000..bc9092d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebEnterRoomAckOuterClass.java @@ -0,0 +1,697 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebEnterRoomAck.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebEnterRoomAckOuterClass { + private SCWebEnterRoomAckOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebEnterRoomAckOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebEnterRoomAck) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 minReconnectMs = 1;</code> + * @return The minReconnectMs. + */ + long getMinReconnectMs(); + + /** + * <code>uint64 maxReconnectMs = 2;</code> + * @return The maxReconnectMs. + */ + long getMaxReconnectMs(); + + /** + * <code>uint64 heartbeatIntervalMs = 3;</code> + * @return The heartbeatIntervalMs. + */ + long getHeartbeatIntervalMs(); + } + /** + * Protobuf type {@code SCWebEnterRoomAck} + */ + public static final class SCWebEnterRoomAck extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebEnterRoomAck) + SCWebEnterRoomAckOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebEnterRoomAck.newBuilder() to construct. + private SCWebEnterRoomAck(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebEnterRoomAck() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebEnterRoomAck(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.internal_static_SCWebEnterRoomAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.internal_static_SCWebEnterRoomAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck.Builder.class); + } + + public static final int MINRECONNECTMS_FIELD_NUMBER = 1; + private long minReconnectMs_ = 0L; + /** + * <code>uint64 minReconnectMs = 1;</code> + * @return The minReconnectMs. + */ + @java.lang.Override + public long getMinReconnectMs() { + return minReconnectMs_; + } + + public static final int MAXRECONNECTMS_FIELD_NUMBER = 2; + private long maxReconnectMs_ = 0L; + /** + * <code>uint64 maxReconnectMs = 2;</code> + * @return The maxReconnectMs. + */ + @java.lang.Override + public long getMaxReconnectMs() { + return maxReconnectMs_; + } + + public static final int HEARTBEATINTERVALMS_FIELD_NUMBER = 3; + private long heartbeatIntervalMs_ = 0L; + /** + * <code>uint64 heartbeatIntervalMs = 3;</code> + * @return The heartbeatIntervalMs. + */ + @java.lang.Override + public long getHeartbeatIntervalMs() { + return heartbeatIntervalMs_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (minReconnectMs_ != 0L) { + output.writeUInt64(1, minReconnectMs_); + } + if (maxReconnectMs_ != 0L) { + output.writeUInt64(2, maxReconnectMs_); + } + if (heartbeatIntervalMs_ != 0L) { + output.writeUInt64(3, heartbeatIntervalMs_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minReconnectMs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, minReconnectMs_); + } + if (maxReconnectMs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, maxReconnectMs_); + } + if (heartbeatIntervalMs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, heartbeatIntervalMs_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck) obj; + + if (getMinReconnectMs() + != other.getMinReconnectMs()) return false; + if (getMaxReconnectMs() + != other.getMaxReconnectMs()) return false; + if (getHeartbeatIntervalMs() + != other.getHeartbeatIntervalMs()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MINRECONNECTMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMinReconnectMs()); + hash = (37 * hash) + MAXRECONNECTMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMaxReconnectMs()); + hash = (37 * hash) + HEARTBEATINTERVALMS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getHeartbeatIntervalMs()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebEnterRoomAck} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebEnterRoomAck) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAckOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.internal_static_SCWebEnterRoomAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.internal_static_SCWebEnterRoomAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + minReconnectMs_ = 0L; + maxReconnectMs_ = 0L; + heartbeatIntervalMs_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.internal_static_SCWebEnterRoomAck_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.minReconnectMs_ = minReconnectMs_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxReconnectMs_ = maxReconnectMs_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.heartbeatIntervalMs_ = heartbeatIntervalMs_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck.getDefaultInstance()) return this; + if (other.getMinReconnectMs() != 0L) { + setMinReconnectMs(other.getMinReconnectMs()); + } + if (other.getMaxReconnectMs() != 0L) { + setMaxReconnectMs(other.getMaxReconnectMs()); + } + if (other.getHeartbeatIntervalMs() != 0L) { + setHeartbeatIntervalMs(other.getHeartbeatIntervalMs()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + minReconnectMs_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + maxReconnectMs_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + heartbeatIntervalMs_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long minReconnectMs_ ; + /** + * <code>uint64 minReconnectMs = 1;</code> + * @return The minReconnectMs. + */ + @java.lang.Override + public long getMinReconnectMs() { + return minReconnectMs_; + } + /** + * <code>uint64 minReconnectMs = 1;</code> + * @param value The minReconnectMs to set. + * @return This builder for chaining. + */ + public Builder setMinReconnectMs(long value) { + + minReconnectMs_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 minReconnectMs = 1;</code> + * @return This builder for chaining. + */ + public Builder clearMinReconnectMs() { + bitField0_ = (bitField0_ & ~0x00000001); + minReconnectMs_ = 0L; + onChanged(); + return this; + } + + private long maxReconnectMs_ ; + /** + * <code>uint64 maxReconnectMs = 2;</code> + * @return The maxReconnectMs. + */ + @java.lang.Override + public long getMaxReconnectMs() { + return maxReconnectMs_; + } + /** + * <code>uint64 maxReconnectMs = 2;</code> + * @param value The maxReconnectMs to set. + * @return This builder for chaining. + */ + public Builder setMaxReconnectMs(long value) { + + maxReconnectMs_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>uint64 maxReconnectMs = 2;</code> + * @return This builder for chaining. + */ + public Builder clearMaxReconnectMs() { + bitField0_ = (bitField0_ & ~0x00000002); + maxReconnectMs_ = 0L; + onChanged(); + return this; + } + + private long heartbeatIntervalMs_ ; + /** + * <code>uint64 heartbeatIntervalMs = 3;</code> + * @return The heartbeatIntervalMs. + */ + @java.lang.Override + public long getHeartbeatIntervalMs() { + return heartbeatIntervalMs_; + } + /** + * <code>uint64 heartbeatIntervalMs = 3;</code> + * @param value The heartbeatIntervalMs to set. + * @return This builder for chaining. + */ + public Builder setHeartbeatIntervalMs(long value) { + + heartbeatIntervalMs_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 heartbeatIntervalMs = 3;</code> + * @return This builder for chaining. + */ + public Builder clearHeartbeatIntervalMs() { + bitField0_ = (bitField0_ & ~0x00000004); + heartbeatIntervalMs_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebEnterRoomAck) + } + + // @@protoc_insertion_point(class_scope:SCWebEnterRoomAck) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebEnterRoomAck> + PARSER = new com.google.protobuf.AbstractParser<SCWebEnterRoomAck>() { + @java.lang.Override + public SCWebEnterRoomAck parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebEnterRoomAck> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebEnterRoomAck> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebEnterRoomAckOuterClass.SCWebEnterRoomAck getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebEnterRoomAck_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebEnterRoomAck_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\027SCWebEnterRoomAck.proto\"`\n\021SCWebEnterR" + + "oomAck\022\026\n\016minReconnectMs\030\001 \001(\004\022\026\n\016maxRec" + + "onnectMs\030\002 \001(\004\022\033\n\023heartbeatIntervalMs\030\003 " + + "\001(\004B6\n4tech.ordinaryroad.live.chat.clien" + + "t.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebEnterRoomAck_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebEnterRoomAck_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebEnterRoomAck_descriptor, + new java.lang.String[] { "MinReconnectMs", "MaxReconnectMs", "HeartbeatIntervalMs", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebErrorOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebErrorOuterClass.java new file mode 100644 index 0000000..e033d81 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebErrorOuterClass.java @@ -0,0 +1,769 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebError.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebErrorOuterClass { + private SCWebErrorOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebErrorOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebError) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint32 code = 1;</code> + * @return The code. + */ + int getCode(); + + /** + * <code>string msg = 2;</code> + * @return The msg. + */ + java.lang.String getMsg(); + /** + * <code>string msg = 2;</code> + * @return The bytes for msg. + */ + com.google.protobuf.ByteString + getMsgBytes(); + + /** + * <code>uint32 subCode = 3;</code> + * @return The subCode. + */ + int getSubCode(); + } + /** + * Protobuf type {@code SCWebError} + */ + public static final class SCWebError extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebError) + SCWebErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebError.newBuilder() to construct. + private SCWebError(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebError() { + msg_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebError(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.internal_static_SCWebError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.internal_static_SCWebError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_ = 0; + /** + * <code>uint32 code = 1;</code> + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + + public static final int MSG_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object msg_ = ""; + /** + * <code>string msg = 2;</code> + * @return The msg. + */ + @java.lang.Override + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } + } + /** + * <code>string msg = 2;</code> + * @return The bytes for msg. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBCODE_FIELD_NUMBER = 3; + private int subCode_ = 0; + /** + * <code>uint32 subCode = 3;</code> + * @return The subCode. + */ + @java.lang.Override + public int getSubCode() { + return subCode_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (code_ != 0) { + output.writeUInt32(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, msg_); + } + if (subCode_ != 0) { + output.writeUInt32(3, subCode_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, code_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(msg_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, msg_); + } + if (subCode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, subCode_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError) obj; + + if (getCode() + != other.getCode()) return false; + if (!getMsg() + .equals(other.getMsg())) return false; + if (getSubCode() + != other.getSubCode()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode(); + hash = (37 * hash) + MSG_FIELD_NUMBER; + hash = (53 * hash) + getMsg().hashCode(); + hash = (37 * hash) + SUBCODE_FIELD_NUMBER; + hash = (53 * hash) + getSubCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebError} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebError) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.internal_static_SCWebError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.internal_static_SCWebError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = 0; + msg_ = ""; + subCode_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.internal_static_SCWebError_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.msg_ = msg_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subCode_ = subCode_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError.getDefaultInstance()) return this; + if (other.getCode() != 0) { + setCode(other.getCode()); + } + if (!other.getMsg().isEmpty()) { + msg_ = other.msg_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getSubCode() != 0) { + setSubCode(other.getSubCode()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + code_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + msg_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + subCode_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int code_ ; + /** + * <code>uint32 code = 1;</code> + * @return The code. + */ + @java.lang.Override + public int getCode() { + return code_; + } + /** + * <code>uint32 code = 1;</code> + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(int value) { + + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint32 code = 1;</code> + * @return This builder for chaining. + */ + public Builder clearCode() { + bitField0_ = (bitField0_ & ~0x00000001); + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object msg_ = ""; + /** + * <code>string msg = 2;</code> + * @return The msg. + */ + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + msg_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string msg = 2;</code> + * @return The bytes for msg. + */ + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string msg = 2;</code> + * @param value The msg to set. + * @return This builder for chaining. + */ + public Builder setMsg( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string msg = 2;</code> + * @return This builder for chaining. + */ + public Builder clearMsg() { + msg_ = getDefaultInstance().getMsg(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string msg = 2;</code> + * @param value The bytes for msg to set. + * @return This builder for chaining. + */ + public Builder setMsgBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + msg_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int subCode_ ; + /** + * <code>uint32 subCode = 3;</code> + * @return The subCode. + */ + @java.lang.Override + public int getSubCode() { + return subCode_; + } + /** + * <code>uint32 subCode = 3;</code> + * @param value The subCode to set. + * @return This builder for chaining. + */ + public Builder setSubCode(int value) { + + subCode_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint32 subCode = 3;</code> + * @return This builder for chaining. + */ + public Builder clearSubCode() { + bitField0_ = (bitField0_ & ~0x00000004); + subCode_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebError) + } + + // @@protoc_insertion_point(class_scope:SCWebError) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebError> + PARSER = new com.google.protobuf.AbstractParser<SCWebError>() { + @java.lang.Override + public SCWebError parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebError> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebError> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebErrorOuterClass.SCWebError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebError_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebError_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\020SCWebError.proto\"8\n\nSCWebError\022\014\n\004code" + + "\030\001 \001(\r\022\013\n\003msg\030\002 \001(\t\022\017\n\007subCode\030\003 \001(\rB6\n4" + + "tech.ordinaryroad.live.chat.client.kuais" + + "hou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebError_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebError_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebError_descriptor, + new java.lang.String[] { "Code", "Msg", "SubCode", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebFeedPushOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebFeedPushOuterClass.java new file mode 100644 index 0000000..ab940c6 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebFeedPushOuterClass.java @@ -0,0 +1,3487 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebFeedPush.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebFeedPushOuterClass { + private SCWebFeedPushOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebFeedPushOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebFeedPush) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string displayWatchingCount = 1;</code> + * @return The displayWatchingCount. + */ + java.lang.String getDisplayWatchingCount(); + /** + * <code>string displayWatchingCount = 1;</code> + * @return The bytes for displayWatchingCount. + */ + com.google.protobuf.ByteString + getDisplayWatchingCountBytes(); + + /** + * <code>string displayLikeCount = 2;</code> + * @return The displayLikeCount. + */ + java.lang.String getDisplayLikeCount(); + /** + * <code>string displayLikeCount = 2;</code> + * @return The bytes for displayLikeCount. + */ + com.google.protobuf.ByteString + getDisplayLikeCountBytes(); + + /** + * <code>uint64 pendingLikeCount = 3;</code> + * @return The pendingLikeCount. + */ + long getPendingLikeCount(); + + /** + * <code>uint64 pushInterval = 4;</code> + * @return The pushInterval. + */ + long getPushInterval(); + + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed> + getCommentFeedsList(); + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed getCommentFeeds(int index); + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + int getCommentFeedsCount(); + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder> + getCommentFeedsOrBuilderList(); + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder getCommentFeedsOrBuilder( + int index); + + /** + * <code>string commentCursor = 6;</code> + * @return The commentCursor. + */ + java.lang.String getCommentCursor(); + /** + * <code>string commentCursor = 6;</code> + * @return The bytes for commentCursor. + */ + com.google.protobuf.ByteString + getCommentCursorBytes(); + + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed> + getComboCommentFeedList(); + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed getComboCommentFeed(int index); + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + int getComboCommentFeedCount(); + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder> + getComboCommentFeedOrBuilderList(); + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder getComboCommentFeedOrBuilder( + int index); + + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed> + getLikeFeedsList(); + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed getLikeFeeds(int index); + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + int getLikeFeedsCount(); + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder> + getLikeFeedsOrBuilderList(); + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder getLikeFeedsOrBuilder( + int index); + + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed> + getGiftFeedsList(); + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed getGiftFeeds(int index); + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + int getGiftFeedsCount(); + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder> + getGiftFeedsOrBuilderList(); + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder getGiftFeedsOrBuilder( + int index); + + /** + * <code>string giftCursor = 10;</code> + * @return The giftCursor. + */ + java.lang.String getGiftCursor(); + /** + * <code>string giftCursor = 10;</code> + * @return The bytes for giftCursor. + */ + com.google.protobuf.ByteString + getGiftCursorBytes(); + + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed> + getSystemNoticeFeedsList(); + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed getSystemNoticeFeeds(int index); + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + int getSystemNoticeFeedsCount(); + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder> + getSystemNoticeFeedsOrBuilderList(); + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder getSystemNoticeFeedsOrBuilder( + int index); + + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed> + getShareFeedsList(); + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed getShareFeeds(int index); + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + int getShareFeedsCount(); + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder> + getShareFeedsOrBuilderList(); + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder getShareFeedsOrBuilder( + int index); + } + /** + * Protobuf type {@code SCWebFeedPush} + */ + public static final class SCWebFeedPush extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebFeedPush) + SCWebFeedPushOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebFeedPush.newBuilder() to construct. + private SCWebFeedPush(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebFeedPush() { + displayWatchingCount_ = ""; + displayLikeCount_ = ""; + commentFeeds_ = java.util.Collections.emptyList(); + commentCursor_ = ""; + comboCommentFeed_ = java.util.Collections.emptyList(); + likeFeeds_ = java.util.Collections.emptyList(); + giftFeeds_ = java.util.Collections.emptyList(); + giftCursor_ = ""; + systemNoticeFeeds_ = java.util.Collections.emptyList(); + shareFeeds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebFeedPush(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.internal_static_SCWebFeedPush_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.internal_static_SCWebFeedPush_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush.Builder.class); + } + + public static final int DISPLAYWATCHINGCOUNT_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object displayWatchingCount_ = ""; + /** + * <code>string displayWatchingCount = 1;</code> + * @return The displayWatchingCount. + */ + @java.lang.Override + public java.lang.String getDisplayWatchingCount() { + java.lang.Object ref = displayWatchingCount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayWatchingCount_ = s; + return s; + } + } + /** + * <code>string displayWatchingCount = 1;</code> + * @return The bytes for displayWatchingCount. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayWatchingCountBytes() { + java.lang.Object ref = displayWatchingCount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayWatchingCount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAYLIKECOUNT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object displayLikeCount_ = ""; + /** + * <code>string displayLikeCount = 2;</code> + * @return The displayLikeCount. + */ + @java.lang.Override + public java.lang.String getDisplayLikeCount() { + java.lang.Object ref = displayLikeCount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayLikeCount_ = s; + return s; + } + } + /** + * <code>string displayLikeCount = 2;</code> + * @return The bytes for displayLikeCount. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayLikeCountBytes() { + java.lang.Object ref = displayLikeCount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayLikeCount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PENDINGLIKECOUNT_FIELD_NUMBER = 3; + private long pendingLikeCount_ = 0L; + /** + * <code>uint64 pendingLikeCount = 3;</code> + * @return The pendingLikeCount. + */ + @java.lang.Override + public long getPendingLikeCount() { + return pendingLikeCount_; + } + + public static final int PUSHINTERVAL_FIELD_NUMBER = 4; + private long pushInterval_ = 0L; + /** + * <code>uint64 pushInterval = 4;</code> + * @return The pushInterval. + */ + @java.lang.Override + public long getPushInterval() { + return pushInterval_; + } + + public static final int COMMENTFEEDS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed> commentFeeds_; + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed> getCommentFeedsList() { + return commentFeeds_; + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder> + getCommentFeedsOrBuilderList() { + return commentFeeds_; + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + @java.lang.Override + public int getCommentFeedsCount() { + return commentFeeds_.size(); + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed getCommentFeeds(int index) { + return commentFeeds_.get(index); + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder getCommentFeedsOrBuilder( + int index) { + return commentFeeds_.get(index); + } + + public static final int COMMENTCURSOR_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object commentCursor_ = ""; + /** + * <code>string commentCursor = 6;</code> + * @return The commentCursor. + */ + @java.lang.Override + public java.lang.String getCommentCursor() { + java.lang.Object ref = commentCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + commentCursor_ = s; + return s; + } + } + /** + * <code>string commentCursor = 6;</code> + * @return The bytes for commentCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCommentCursorBytes() { + java.lang.Object ref = commentCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + commentCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMBOCOMMENTFEED_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed> comboCommentFeed_; + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed> getComboCommentFeedList() { + return comboCommentFeed_; + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder> + getComboCommentFeedOrBuilderList() { + return comboCommentFeed_; + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + @java.lang.Override + public int getComboCommentFeedCount() { + return comboCommentFeed_.size(); + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed getComboCommentFeed(int index) { + return comboCommentFeed_.get(index); + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder getComboCommentFeedOrBuilder( + int index) { + return comboCommentFeed_.get(index); + } + + public static final int LIKEFEEDS_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed> likeFeeds_; + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed> getLikeFeedsList() { + return likeFeeds_; + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder> + getLikeFeedsOrBuilderList() { + return likeFeeds_; + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + @java.lang.Override + public int getLikeFeedsCount() { + return likeFeeds_.size(); + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed getLikeFeeds(int index) { + return likeFeeds_.get(index); + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder getLikeFeedsOrBuilder( + int index) { + return likeFeeds_.get(index); + } + + public static final int GIFTFEEDS_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed> giftFeeds_; + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed> getGiftFeedsList() { + return giftFeeds_; + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder> + getGiftFeedsOrBuilderList() { + return giftFeeds_; + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + @java.lang.Override + public int getGiftFeedsCount() { + return giftFeeds_.size(); + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed getGiftFeeds(int index) { + return giftFeeds_.get(index); + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder getGiftFeedsOrBuilder( + int index) { + return giftFeeds_.get(index); + } + + public static final int GIFTCURSOR_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private volatile java.lang.Object giftCursor_ = ""; + /** + * <code>string giftCursor = 10;</code> + * @return The giftCursor. + */ + @java.lang.Override + public java.lang.String getGiftCursor() { + java.lang.Object ref = giftCursor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + giftCursor_ = s; + return s; + } + } + /** + * <code>string giftCursor = 10;</code> + * @return The bytes for giftCursor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGiftCursorBytes() { + java.lang.Object ref = giftCursor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + giftCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SYSTEMNOTICEFEEDS_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed> systemNoticeFeeds_; + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed> getSystemNoticeFeedsList() { + return systemNoticeFeeds_; + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder> + getSystemNoticeFeedsOrBuilderList() { + return systemNoticeFeeds_; + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + @java.lang.Override + public int getSystemNoticeFeedsCount() { + return systemNoticeFeeds_.size(); + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed getSystemNoticeFeeds(int index) { + return systemNoticeFeeds_.get(index); + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder getSystemNoticeFeedsOrBuilder( + int index) { + return systemNoticeFeeds_.get(index); + } + + public static final int SHAREFEEDS_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed> shareFeeds_; + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed> getShareFeedsList() { + return shareFeeds_; + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder> + getShareFeedsOrBuilderList() { + return shareFeeds_; + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + @java.lang.Override + public int getShareFeedsCount() { + return shareFeeds_.size(); + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed getShareFeeds(int index) { + return shareFeeds_.get(index); + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder getShareFeedsOrBuilder( + int index) { + return shareFeeds_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayWatchingCount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayWatchingCount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayLikeCount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayLikeCount_); + } + if (pendingLikeCount_ != 0L) { + output.writeUInt64(3, pendingLikeCount_); + } + if (pushInterval_ != 0L) { + output.writeUInt64(4, pushInterval_); + } + for (int i = 0; i < commentFeeds_.size(); i++) { + output.writeMessage(5, commentFeeds_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(commentCursor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, commentCursor_); + } + for (int i = 0; i < comboCommentFeed_.size(); i++) { + output.writeMessage(7, comboCommentFeed_.get(i)); + } + for (int i = 0; i < likeFeeds_.size(); i++) { + output.writeMessage(8, likeFeeds_.get(i)); + } + for (int i = 0; i < giftFeeds_.size(); i++) { + output.writeMessage(9, giftFeeds_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(giftCursor_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, giftCursor_); + } + for (int i = 0; i < systemNoticeFeeds_.size(); i++) { + output.writeMessage(11, systemNoticeFeeds_.get(i)); + } + for (int i = 0; i < shareFeeds_.size(); i++) { + output.writeMessage(12, shareFeeds_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayWatchingCount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayWatchingCount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayLikeCount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayLikeCount_); + } + if (pendingLikeCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, pendingLikeCount_); + } + if (pushInterval_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, pushInterval_); + } + for (int i = 0; i < commentFeeds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, commentFeeds_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(commentCursor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, commentCursor_); + } + for (int i = 0; i < comboCommentFeed_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, comboCommentFeed_.get(i)); + } + for (int i = 0; i < likeFeeds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, likeFeeds_.get(i)); + } + for (int i = 0; i < giftFeeds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, giftFeeds_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(giftCursor_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, giftCursor_); + } + for (int i = 0; i < systemNoticeFeeds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, systemNoticeFeeds_.get(i)); + } + for (int i = 0; i < shareFeeds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, shareFeeds_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush) obj; + + if (!getDisplayWatchingCount() + .equals(other.getDisplayWatchingCount())) return false; + if (!getDisplayLikeCount() + .equals(other.getDisplayLikeCount())) return false; + if (getPendingLikeCount() + != other.getPendingLikeCount()) return false; + if (getPushInterval() + != other.getPushInterval()) return false; + if (!getCommentFeedsList() + .equals(other.getCommentFeedsList())) return false; + if (!getCommentCursor() + .equals(other.getCommentCursor())) return false; + if (!getComboCommentFeedList() + .equals(other.getComboCommentFeedList())) return false; + if (!getLikeFeedsList() + .equals(other.getLikeFeedsList())) return false; + if (!getGiftFeedsList() + .equals(other.getGiftFeedsList())) return false; + if (!getGiftCursor() + .equals(other.getGiftCursor())) return false; + if (!getSystemNoticeFeedsList() + .equals(other.getSystemNoticeFeedsList())) return false; + if (!getShareFeedsList() + .equals(other.getShareFeedsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAYWATCHINGCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getDisplayWatchingCount().hashCode(); + hash = (37 * hash) + DISPLAYLIKECOUNT_FIELD_NUMBER; + hash = (53 * hash) + getDisplayLikeCount().hashCode(); + hash = (37 * hash) + PENDINGLIKECOUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPendingLikeCount()); + hash = (37 * hash) + PUSHINTERVAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPushInterval()); + if (getCommentFeedsCount() > 0) { + hash = (37 * hash) + COMMENTFEEDS_FIELD_NUMBER; + hash = (53 * hash) + getCommentFeedsList().hashCode(); + } + hash = (37 * hash) + COMMENTCURSOR_FIELD_NUMBER; + hash = (53 * hash) + getCommentCursor().hashCode(); + if (getComboCommentFeedCount() > 0) { + hash = (37 * hash) + COMBOCOMMENTFEED_FIELD_NUMBER; + hash = (53 * hash) + getComboCommentFeedList().hashCode(); + } + if (getLikeFeedsCount() > 0) { + hash = (37 * hash) + LIKEFEEDS_FIELD_NUMBER; + hash = (53 * hash) + getLikeFeedsList().hashCode(); + } + if (getGiftFeedsCount() > 0) { + hash = (37 * hash) + GIFTFEEDS_FIELD_NUMBER; + hash = (53 * hash) + getGiftFeedsList().hashCode(); + } + hash = (37 * hash) + GIFTCURSOR_FIELD_NUMBER; + hash = (53 * hash) + getGiftCursor().hashCode(); + if (getSystemNoticeFeedsCount() > 0) { + hash = (37 * hash) + SYSTEMNOTICEFEEDS_FIELD_NUMBER; + hash = (53 * hash) + getSystemNoticeFeedsList().hashCode(); + } + if (getShareFeedsCount() > 0) { + hash = (37 * hash) + SHAREFEEDS_FIELD_NUMBER; + hash = (53 * hash) + getShareFeedsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebFeedPush} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebFeedPush) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPushOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.internal_static_SCWebFeedPush_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.internal_static_SCWebFeedPush_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + displayWatchingCount_ = ""; + displayLikeCount_ = ""; + pendingLikeCount_ = 0L; + pushInterval_ = 0L; + if (commentFeedsBuilder_ == null) { + commentFeeds_ = java.util.Collections.emptyList(); + } else { + commentFeeds_ = null; + commentFeedsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + commentCursor_ = ""; + if (comboCommentFeedBuilder_ == null) { + comboCommentFeed_ = java.util.Collections.emptyList(); + } else { + comboCommentFeed_ = null; + comboCommentFeedBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + if (likeFeedsBuilder_ == null) { + likeFeeds_ = java.util.Collections.emptyList(); + } else { + likeFeeds_ = null; + likeFeedsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + if (giftFeedsBuilder_ == null) { + giftFeeds_ = java.util.Collections.emptyList(); + } else { + giftFeeds_ = null; + giftFeedsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + giftCursor_ = ""; + if (systemNoticeFeedsBuilder_ == null) { + systemNoticeFeeds_ = java.util.Collections.emptyList(); + } else { + systemNoticeFeeds_ = null; + systemNoticeFeedsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + if (shareFeedsBuilder_ == null) { + shareFeeds_ = java.util.Collections.emptyList(); + } else { + shareFeeds_ = null; + shareFeedsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.internal_static_SCWebFeedPush_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush result) { + if (commentFeedsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + commentFeeds_ = java.util.Collections.unmodifiableList(commentFeeds_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.commentFeeds_ = commentFeeds_; + } else { + result.commentFeeds_ = commentFeedsBuilder_.build(); + } + if (comboCommentFeedBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + comboCommentFeed_ = java.util.Collections.unmodifiableList(comboCommentFeed_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.comboCommentFeed_ = comboCommentFeed_; + } else { + result.comboCommentFeed_ = comboCommentFeedBuilder_.build(); + } + if (likeFeedsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + likeFeeds_ = java.util.Collections.unmodifiableList(likeFeeds_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.likeFeeds_ = likeFeeds_; + } else { + result.likeFeeds_ = likeFeedsBuilder_.build(); + } + if (giftFeedsBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + giftFeeds_ = java.util.Collections.unmodifiableList(giftFeeds_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.giftFeeds_ = giftFeeds_; + } else { + result.giftFeeds_ = giftFeedsBuilder_.build(); + } + if (systemNoticeFeedsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + systemNoticeFeeds_ = java.util.Collections.unmodifiableList(systemNoticeFeeds_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.systemNoticeFeeds_ = systemNoticeFeeds_; + } else { + result.systemNoticeFeeds_ = systemNoticeFeedsBuilder_.build(); + } + if (shareFeedsBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0)) { + shareFeeds_ = java.util.Collections.unmodifiableList(shareFeeds_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.shareFeeds_ = shareFeeds_; + } else { + result.shareFeeds_ = shareFeedsBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.displayWatchingCount_ = displayWatchingCount_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayLikeCount_ = displayLikeCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pendingLikeCount_ = pendingLikeCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.pushInterval_ = pushInterval_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.commentCursor_ = commentCursor_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.giftCursor_ = giftCursor_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush.getDefaultInstance()) return this; + if (!other.getDisplayWatchingCount().isEmpty()) { + displayWatchingCount_ = other.displayWatchingCount_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayLikeCount().isEmpty()) { + displayLikeCount_ = other.displayLikeCount_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPendingLikeCount() != 0L) { + setPendingLikeCount(other.getPendingLikeCount()); + } + if (other.getPushInterval() != 0L) { + setPushInterval(other.getPushInterval()); + } + if (commentFeedsBuilder_ == null) { + if (!other.commentFeeds_.isEmpty()) { + if (commentFeeds_.isEmpty()) { + commentFeeds_ = other.commentFeeds_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureCommentFeedsIsMutable(); + commentFeeds_.addAll(other.commentFeeds_); + } + onChanged(); + } + } else { + if (!other.commentFeeds_.isEmpty()) { + if (commentFeedsBuilder_.isEmpty()) { + commentFeedsBuilder_.dispose(); + commentFeedsBuilder_ = null; + commentFeeds_ = other.commentFeeds_; + bitField0_ = (bitField0_ & ~0x00000010); + commentFeedsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getCommentFeedsFieldBuilder() : null; + } else { + commentFeedsBuilder_.addAllMessages(other.commentFeeds_); + } + } + } + if (!other.getCommentCursor().isEmpty()) { + commentCursor_ = other.commentCursor_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (comboCommentFeedBuilder_ == null) { + if (!other.comboCommentFeed_.isEmpty()) { + if (comboCommentFeed_.isEmpty()) { + comboCommentFeed_ = other.comboCommentFeed_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.addAll(other.comboCommentFeed_); + } + onChanged(); + } + } else { + if (!other.comboCommentFeed_.isEmpty()) { + if (comboCommentFeedBuilder_.isEmpty()) { + comboCommentFeedBuilder_.dispose(); + comboCommentFeedBuilder_ = null; + comboCommentFeed_ = other.comboCommentFeed_; + bitField0_ = (bitField0_ & ~0x00000040); + comboCommentFeedBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getComboCommentFeedFieldBuilder() : null; + } else { + comboCommentFeedBuilder_.addAllMessages(other.comboCommentFeed_); + } + } + } + if (likeFeedsBuilder_ == null) { + if (!other.likeFeeds_.isEmpty()) { + if (likeFeeds_.isEmpty()) { + likeFeeds_ = other.likeFeeds_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureLikeFeedsIsMutable(); + likeFeeds_.addAll(other.likeFeeds_); + } + onChanged(); + } + } else { + if (!other.likeFeeds_.isEmpty()) { + if (likeFeedsBuilder_.isEmpty()) { + likeFeedsBuilder_.dispose(); + likeFeedsBuilder_ = null; + likeFeeds_ = other.likeFeeds_; + bitField0_ = (bitField0_ & ~0x00000080); + likeFeedsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLikeFeedsFieldBuilder() : null; + } else { + likeFeedsBuilder_.addAllMessages(other.likeFeeds_); + } + } + } + if (giftFeedsBuilder_ == null) { + if (!other.giftFeeds_.isEmpty()) { + if (giftFeeds_.isEmpty()) { + giftFeeds_ = other.giftFeeds_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureGiftFeedsIsMutable(); + giftFeeds_.addAll(other.giftFeeds_); + } + onChanged(); + } + } else { + if (!other.giftFeeds_.isEmpty()) { + if (giftFeedsBuilder_.isEmpty()) { + giftFeedsBuilder_.dispose(); + giftFeedsBuilder_ = null; + giftFeeds_ = other.giftFeeds_; + bitField0_ = (bitField0_ & ~0x00000100); + giftFeedsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getGiftFeedsFieldBuilder() : null; + } else { + giftFeedsBuilder_.addAllMessages(other.giftFeeds_); + } + } + } + if (!other.getGiftCursor().isEmpty()) { + giftCursor_ = other.giftCursor_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (systemNoticeFeedsBuilder_ == null) { + if (!other.systemNoticeFeeds_.isEmpty()) { + if (systemNoticeFeeds_.isEmpty()) { + systemNoticeFeeds_ = other.systemNoticeFeeds_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.addAll(other.systemNoticeFeeds_); + } + onChanged(); + } + } else { + if (!other.systemNoticeFeeds_.isEmpty()) { + if (systemNoticeFeedsBuilder_.isEmpty()) { + systemNoticeFeedsBuilder_.dispose(); + systemNoticeFeedsBuilder_ = null; + systemNoticeFeeds_ = other.systemNoticeFeeds_; + bitField0_ = (bitField0_ & ~0x00000400); + systemNoticeFeedsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSystemNoticeFeedsFieldBuilder() : null; + } else { + systemNoticeFeedsBuilder_.addAllMessages(other.systemNoticeFeeds_); + } + } + } + if (shareFeedsBuilder_ == null) { + if (!other.shareFeeds_.isEmpty()) { + if (shareFeeds_.isEmpty()) { + shareFeeds_ = other.shareFeeds_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensureShareFeedsIsMutable(); + shareFeeds_.addAll(other.shareFeeds_); + } + onChanged(); + } + } else { + if (!other.shareFeeds_.isEmpty()) { + if (shareFeedsBuilder_.isEmpty()) { + shareFeedsBuilder_.dispose(); + shareFeedsBuilder_ = null; + shareFeeds_ = other.shareFeeds_; + bitField0_ = (bitField0_ & ~0x00000800); + shareFeedsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getShareFeedsFieldBuilder() : null; + } else { + shareFeedsBuilder_.addAllMessages(other.shareFeeds_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + displayWatchingCount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + displayLikeCount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + pendingLikeCount_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + pushInterval_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed m = + input.readMessage( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.parser(), + extensionRegistry); + if (commentFeedsBuilder_ == null) { + ensureCommentFeedsIsMutable(); + commentFeeds_.add(m); + } else { + commentFeedsBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: { + commentCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed m = + input.readMessage( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.parser(), + extensionRegistry); + if (comboCommentFeedBuilder_ == null) { + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.add(m); + } else { + comboCommentFeedBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed m = + input.readMessage( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.parser(), + extensionRegistry); + if (likeFeedsBuilder_ == null) { + ensureLikeFeedsIsMutable(); + likeFeeds_.add(m); + } else { + likeFeedsBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed m = + input.readMessage( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.parser(), + extensionRegistry); + if (giftFeedsBuilder_ == null) { + ensureGiftFeedsIsMutable(); + giftFeeds_.add(m); + } else { + giftFeedsBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: { + giftCursor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed m = + input.readMessage( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.parser(), + extensionRegistry); + if (systemNoticeFeedsBuilder_ == null) { + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.add(m); + } else { + systemNoticeFeedsBuilder_.addMessage(m); + } + break; + } // case 90 + case 98: { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed m = + input.readMessage( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.parser(), + extensionRegistry); + if (shareFeedsBuilder_ == null) { + ensureShareFeedsIsMutable(); + shareFeeds_.add(m); + } else { + shareFeedsBuilder_.addMessage(m); + } + break; + } // case 98 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object displayWatchingCount_ = ""; + /** + * <code>string displayWatchingCount = 1;</code> + * @return The displayWatchingCount. + */ + public java.lang.String getDisplayWatchingCount() { + java.lang.Object ref = displayWatchingCount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayWatchingCount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string displayWatchingCount = 1;</code> + * @return The bytes for displayWatchingCount. + */ + public com.google.protobuf.ByteString + getDisplayWatchingCountBytes() { + java.lang.Object ref = displayWatchingCount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayWatchingCount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string displayWatchingCount = 1;</code> + * @param value The displayWatchingCount to set. + * @return This builder for chaining. + */ + public Builder setDisplayWatchingCount( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + displayWatchingCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string displayWatchingCount = 1;</code> + * @return This builder for chaining. + */ + public Builder clearDisplayWatchingCount() { + displayWatchingCount_ = getDefaultInstance().getDisplayWatchingCount(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string displayWatchingCount = 1;</code> + * @param value The bytes for displayWatchingCount to set. + * @return This builder for chaining. + */ + public Builder setDisplayWatchingCountBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + displayWatchingCount_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayLikeCount_ = ""; + /** + * <code>string displayLikeCount = 2;</code> + * @return The displayLikeCount. + */ + public java.lang.String getDisplayLikeCount() { + java.lang.Object ref = displayLikeCount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayLikeCount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string displayLikeCount = 2;</code> + * @return The bytes for displayLikeCount. + */ + public com.google.protobuf.ByteString + getDisplayLikeCountBytes() { + java.lang.Object ref = displayLikeCount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayLikeCount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string displayLikeCount = 2;</code> + * @param value The displayLikeCount to set. + * @return This builder for chaining. + */ + public Builder setDisplayLikeCount( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + displayLikeCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string displayLikeCount = 2;</code> + * @return This builder for chaining. + */ + public Builder clearDisplayLikeCount() { + displayLikeCount_ = getDefaultInstance().getDisplayLikeCount(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string displayLikeCount = 2;</code> + * @param value The bytes for displayLikeCount to set. + * @return This builder for chaining. + */ + public Builder setDisplayLikeCountBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + displayLikeCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long pendingLikeCount_ ; + /** + * <code>uint64 pendingLikeCount = 3;</code> + * @return The pendingLikeCount. + */ + @java.lang.Override + public long getPendingLikeCount() { + return pendingLikeCount_; + } + /** + * <code>uint64 pendingLikeCount = 3;</code> + * @param value The pendingLikeCount to set. + * @return This builder for chaining. + */ + public Builder setPendingLikeCount(long value) { + + pendingLikeCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 pendingLikeCount = 3;</code> + * @return This builder for chaining. + */ + public Builder clearPendingLikeCount() { + bitField0_ = (bitField0_ & ~0x00000004); + pendingLikeCount_ = 0L; + onChanged(); + return this; + } + + private long pushInterval_ ; + /** + * <code>uint64 pushInterval = 4;</code> + * @return The pushInterval. + */ + @java.lang.Override + public long getPushInterval() { + return pushInterval_; + } + /** + * <code>uint64 pushInterval = 4;</code> + * @param value The pushInterval to set. + * @return This builder for chaining. + */ + public Builder setPushInterval(long value) { + + pushInterval_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint64 pushInterval = 4;</code> + * @return This builder for chaining. + */ + public Builder clearPushInterval() { + bitField0_ = (bitField0_ & ~0x00000008); + pushInterval_ = 0L; + onChanged(); + return this; + } + + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed> commentFeeds_ = + java.util.Collections.emptyList(); + private void ensureCommentFeedsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + commentFeeds_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed>(commentFeeds_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder> commentFeedsBuilder_; + + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed> getCommentFeedsList() { + if (commentFeedsBuilder_ == null) { + return java.util.Collections.unmodifiableList(commentFeeds_); + } else { + return commentFeedsBuilder_.getMessageList(); + } + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public int getCommentFeedsCount() { + if (commentFeedsBuilder_ == null) { + return commentFeeds_.size(); + } else { + return commentFeedsBuilder_.getCount(); + } + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed getCommentFeeds(int index) { + if (commentFeedsBuilder_ == null) { + return commentFeeds_.get(index); + } else { + return commentFeedsBuilder_.getMessage(index); + } + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public Builder setCommentFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed value) { + if (commentFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommentFeedsIsMutable(); + commentFeeds_.set(index, value); + onChanged(); + } else { + commentFeedsBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public Builder setCommentFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder builderForValue) { + if (commentFeedsBuilder_ == null) { + ensureCommentFeedsIsMutable(); + commentFeeds_.set(index, builderForValue.build()); + onChanged(); + } else { + commentFeedsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public Builder addCommentFeeds(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed value) { + if (commentFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommentFeedsIsMutable(); + commentFeeds_.add(value); + onChanged(); + } else { + commentFeedsBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public Builder addCommentFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed value) { + if (commentFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommentFeedsIsMutable(); + commentFeeds_.add(index, value); + onChanged(); + } else { + commentFeedsBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public Builder addCommentFeeds( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder builderForValue) { + if (commentFeedsBuilder_ == null) { + ensureCommentFeedsIsMutable(); + commentFeeds_.add(builderForValue.build()); + onChanged(); + } else { + commentFeedsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public Builder addCommentFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder builderForValue) { + if (commentFeedsBuilder_ == null) { + ensureCommentFeedsIsMutable(); + commentFeeds_.add(index, builderForValue.build()); + onChanged(); + } else { + commentFeedsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public Builder addAllCommentFeeds( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed> values) { + if (commentFeedsBuilder_ == null) { + ensureCommentFeedsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, commentFeeds_); + onChanged(); + } else { + commentFeedsBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public Builder clearCommentFeeds() { + if (commentFeedsBuilder_ == null) { + commentFeeds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + commentFeedsBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public Builder removeCommentFeeds(int index) { + if (commentFeedsBuilder_ == null) { + ensureCommentFeedsIsMutable(); + commentFeeds_.remove(index); + onChanged(); + } else { + commentFeedsBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder getCommentFeedsBuilder( + int index) { + return getCommentFeedsFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder getCommentFeedsOrBuilder( + int index) { + if (commentFeedsBuilder_ == null) { + return commentFeeds_.get(index); } else { + return commentFeedsBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder> + getCommentFeedsOrBuilderList() { + if (commentFeedsBuilder_ != null) { + return commentFeedsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(commentFeeds_); + } + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder addCommentFeedsBuilder() { + return getCommentFeedsFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.getDefaultInstance()); + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder addCommentFeedsBuilder( + int index) { + return getCommentFeedsFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.getDefaultInstance()); + } + /** + * <code>repeated .WebCommentFeed commentFeeds = 5;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder> + getCommentFeedsBuilderList() { + return getCommentFeedsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder> + getCommentFeedsFieldBuilder() { + if (commentFeedsBuilder_ == null) { + commentFeedsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder>( + commentFeeds_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + commentFeeds_ = null; + } + return commentFeedsBuilder_; + } + + private java.lang.Object commentCursor_ = ""; + /** + * <code>string commentCursor = 6;</code> + * @return The commentCursor. + */ + public java.lang.String getCommentCursor() { + java.lang.Object ref = commentCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + commentCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string commentCursor = 6;</code> + * @return The bytes for commentCursor. + */ + public com.google.protobuf.ByteString + getCommentCursorBytes() { + java.lang.Object ref = commentCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + commentCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string commentCursor = 6;</code> + * @param value The commentCursor to set. + * @return This builder for chaining. + */ + public Builder setCommentCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + commentCursor_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>string commentCursor = 6;</code> + * @return This builder for chaining. + */ + public Builder clearCommentCursor() { + commentCursor_ = getDefaultInstance().getCommentCursor(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * <code>string commentCursor = 6;</code> + * @param value The bytes for commentCursor to set. + * @return This builder for chaining. + */ + public Builder setCommentCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + commentCursor_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed> comboCommentFeed_ = + java.util.Collections.emptyList(); + private void ensureComboCommentFeedIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + comboCommentFeed_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed>(comboCommentFeed_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder> comboCommentFeedBuilder_; + + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed> getComboCommentFeedList() { + if (comboCommentFeedBuilder_ == null) { + return java.util.Collections.unmodifiableList(comboCommentFeed_); + } else { + return comboCommentFeedBuilder_.getMessageList(); + } + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public int getComboCommentFeedCount() { + if (comboCommentFeedBuilder_ == null) { + return comboCommentFeed_.size(); + } else { + return comboCommentFeedBuilder_.getCount(); + } + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed getComboCommentFeed(int index) { + if (comboCommentFeedBuilder_ == null) { + return comboCommentFeed_.get(index); + } else { + return comboCommentFeedBuilder_.getMessage(index); + } + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public Builder setComboCommentFeed( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed value) { + if (comboCommentFeedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.set(index, value); + onChanged(); + } else { + comboCommentFeedBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public Builder setComboCommentFeed( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder builderForValue) { + if (comboCommentFeedBuilder_ == null) { + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.set(index, builderForValue.build()); + onChanged(); + } else { + comboCommentFeedBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public Builder addComboCommentFeed(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed value) { + if (comboCommentFeedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.add(value); + onChanged(); + } else { + comboCommentFeedBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public Builder addComboCommentFeed( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed value) { + if (comboCommentFeedBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.add(index, value); + onChanged(); + } else { + comboCommentFeedBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public Builder addComboCommentFeed( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder builderForValue) { + if (comboCommentFeedBuilder_ == null) { + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.add(builderForValue.build()); + onChanged(); + } else { + comboCommentFeedBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public Builder addComboCommentFeed( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder builderForValue) { + if (comboCommentFeedBuilder_ == null) { + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.add(index, builderForValue.build()); + onChanged(); + } else { + comboCommentFeedBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public Builder addAllComboCommentFeed( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed> values) { + if (comboCommentFeedBuilder_ == null) { + ensureComboCommentFeedIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, comboCommentFeed_); + onChanged(); + } else { + comboCommentFeedBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public Builder clearComboCommentFeed() { + if (comboCommentFeedBuilder_ == null) { + comboCommentFeed_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + comboCommentFeedBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public Builder removeComboCommentFeed(int index) { + if (comboCommentFeedBuilder_ == null) { + ensureComboCommentFeedIsMutable(); + comboCommentFeed_.remove(index); + onChanged(); + } else { + comboCommentFeedBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder getComboCommentFeedBuilder( + int index) { + return getComboCommentFeedFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder getComboCommentFeedOrBuilder( + int index) { + if (comboCommentFeedBuilder_ == null) { + return comboCommentFeed_.get(index); } else { + return comboCommentFeedBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder> + getComboCommentFeedOrBuilderList() { + if (comboCommentFeedBuilder_ != null) { + return comboCommentFeedBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(comboCommentFeed_); + } + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder addComboCommentFeedBuilder() { + return getComboCommentFeedFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.getDefaultInstance()); + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder addComboCommentFeedBuilder( + int index) { + return getComboCommentFeedFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.getDefaultInstance()); + } + /** + * <code>repeated .WebComboCommentFeed comboCommentFeed = 7;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder> + getComboCommentFeedBuilderList() { + return getComboCommentFeedFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder> + getComboCommentFeedFieldBuilder() { + if (comboCommentFeedBuilder_ == null) { + comboCommentFeedBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder>( + comboCommentFeed_, + ((bitField0_ & 0x00000040) != 0), + getParentForChildren(), + isClean()); + comboCommentFeed_ = null; + } + return comboCommentFeedBuilder_; + } + + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed> likeFeeds_ = + java.util.Collections.emptyList(); + private void ensureLikeFeedsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + likeFeeds_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed>(likeFeeds_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder> likeFeedsBuilder_; + + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed> getLikeFeedsList() { + if (likeFeedsBuilder_ == null) { + return java.util.Collections.unmodifiableList(likeFeeds_); + } else { + return likeFeedsBuilder_.getMessageList(); + } + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public int getLikeFeedsCount() { + if (likeFeedsBuilder_ == null) { + return likeFeeds_.size(); + } else { + return likeFeedsBuilder_.getCount(); + } + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed getLikeFeeds(int index) { + if (likeFeedsBuilder_ == null) { + return likeFeeds_.get(index); + } else { + return likeFeedsBuilder_.getMessage(index); + } + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public Builder setLikeFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed value) { + if (likeFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLikeFeedsIsMutable(); + likeFeeds_.set(index, value); + onChanged(); + } else { + likeFeedsBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public Builder setLikeFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder builderForValue) { + if (likeFeedsBuilder_ == null) { + ensureLikeFeedsIsMutable(); + likeFeeds_.set(index, builderForValue.build()); + onChanged(); + } else { + likeFeedsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public Builder addLikeFeeds(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed value) { + if (likeFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLikeFeedsIsMutable(); + likeFeeds_.add(value); + onChanged(); + } else { + likeFeedsBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public Builder addLikeFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed value) { + if (likeFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLikeFeedsIsMutable(); + likeFeeds_.add(index, value); + onChanged(); + } else { + likeFeedsBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public Builder addLikeFeeds( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder builderForValue) { + if (likeFeedsBuilder_ == null) { + ensureLikeFeedsIsMutable(); + likeFeeds_.add(builderForValue.build()); + onChanged(); + } else { + likeFeedsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public Builder addLikeFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder builderForValue) { + if (likeFeedsBuilder_ == null) { + ensureLikeFeedsIsMutable(); + likeFeeds_.add(index, builderForValue.build()); + onChanged(); + } else { + likeFeedsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public Builder addAllLikeFeeds( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed> values) { + if (likeFeedsBuilder_ == null) { + ensureLikeFeedsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, likeFeeds_); + onChanged(); + } else { + likeFeedsBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public Builder clearLikeFeeds() { + if (likeFeedsBuilder_ == null) { + likeFeeds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + likeFeedsBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public Builder removeLikeFeeds(int index) { + if (likeFeedsBuilder_ == null) { + ensureLikeFeedsIsMutable(); + likeFeeds_.remove(index); + onChanged(); + } else { + likeFeedsBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder getLikeFeedsBuilder( + int index) { + return getLikeFeedsFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder getLikeFeedsOrBuilder( + int index) { + if (likeFeedsBuilder_ == null) { + return likeFeeds_.get(index); } else { + return likeFeedsBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder> + getLikeFeedsOrBuilderList() { + if (likeFeedsBuilder_ != null) { + return likeFeedsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(likeFeeds_); + } + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder addLikeFeedsBuilder() { + return getLikeFeedsFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.getDefaultInstance()); + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder addLikeFeedsBuilder( + int index) { + return getLikeFeedsFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.getDefaultInstance()); + } + /** + * <code>repeated .WebLikeFeed likeFeeds = 8;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder> + getLikeFeedsBuilderList() { + return getLikeFeedsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder> + getLikeFeedsFieldBuilder() { + if (likeFeedsBuilder_ == null) { + likeFeedsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder>( + likeFeeds_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + likeFeeds_ = null; + } + return likeFeedsBuilder_; + } + + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed> giftFeeds_ = + java.util.Collections.emptyList(); + private void ensureGiftFeedsIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + giftFeeds_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed>(giftFeeds_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder> giftFeedsBuilder_; + + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed> getGiftFeedsList() { + if (giftFeedsBuilder_ == null) { + return java.util.Collections.unmodifiableList(giftFeeds_); + } else { + return giftFeedsBuilder_.getMessageList(); + } + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public int getGiftFeedsCount() { + if (giftFeedsBuilder_ == null) { + return giftFeeds_.size(); + } else { + return giftFeedsBuilder_.getCount(); + } + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed getGiftFeeds(int index) { + if (giftFeedsBuilder_ == null) { + return giftFeeds_.get(index); + } else { + return giftFeedsBuilder_.getMessage(index); + } + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public Builder setGiftFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed value) { + if (giftFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGiftFeedsIsMutable(); + giftFeeds_.set(index, value); + onChanged(); + } else { + giftFeedsBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public Builder setGiftFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder builderForValue) { + if (giftFeedsBuilder_ == null) { + ensureGiftFeedsIsMutable(); + giftFeeds_.set(index, builderForValue.build()); + onChanged(); + } else { + giftFeedsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public Builder addGiftFeeds(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed value) { + if (giftFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGiftFeedsIsMutable(); + giftFeeds_.add(value); + onChanged(); + } else { + giftFeedsBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public Builder addGiftFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed value) { + if (giftFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGiftFeedsIsMutable(); + giftFeeds_.add(index, value); + onChanged(); + } else { + giftFeedsBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public Builder addGiftFeeds( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder builderForValue) { + if (giftFeedsBuilder_ == null) { + ensureGiftFeedsIsMutable(); + giftFeeds_.add(builderForValue.build()); + onChanged(); + } else { + giftFeedsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public Builder addGiftFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder builderForValue) { + if (giftFeedsBuilder_ == null) { + ensureGiftFeedsIsMutable(); + giftFeeds_.add(index, builderForValue.build()); + onChanged(); + } else { + giftFeedsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public Builder addAllGiftFeeds( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed> values) { + if (giftFeedsBuilder_ == null) { + ensureGiftFeedsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, giftFeeds_); + onChanged(); + } else { + giftFeedsBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public Builder clearGiftFeeds() { + if (giftFeedsBuilder_ == null) { + giftFeeds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + giftFeedsBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public Builder removeGiftFeeds(int index) { + if (giftFeedsBuilder_ == null) { + ensureGiftFeedsIsMutable(); + giftFeeds_.remove(index); + onChanged(); + } else { + giftFeedsBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder getGiftFeedsBuilder( + int index) { + return getGiftFeedsFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder getGiftFeedsOrBuilder( + int index) { + if (giftFeedsBuilder_ == null) { + return giftFeeds_.get(index); } else { + return giftFeedsBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder> + getGiftFeedsOrBuilderList() { + if (giftFeedsBuilder_ != null) { + return giftFeedsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(giftFeeds_); + } + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder addGiftFeedsBuilder() { + return getGiftFeedsFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.getDefaultInstance()); + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder addGiftFeedsBuilder( + int index) { + return getGiftFeedsFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.getDefaultInstance()); + } + /** + * <code>repeated .WebGiftFeed giftFeeds = 9;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder> + getGiftFeedsBuilderList() { + return getGiftFeedsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder> + getGiftFeedsFieldBuilder() { + if (giftFeedsBuilder_ == null) { + giftFeedsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder>( + giftFeeds_, + ((bitField0_ & 0x00000100) != 0), + getParentForChildren(), + isClean()); + giftFeeds_ = null; + } + return giftFeedsBuilder_; + } + + private java.lang.Object giftCursor_ = ""; + /** + * <code>string giftCursor = 10;</code> + * @return The giftCursor. + */ + public java.lang.String getGiftCursor() { + java.lang.Object ref = giftCursor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + giftCursor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string giftCursor = 10;</code> + * @return The bytes for giftCursor. + */ + public com.google.protobuf.ByteString + getGiftCursorBytes() { + java.lang.Object ref = giftCursor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + giftCursor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string giftCursor = 10;</code> + * @param value The giftCursor to set. + * @return This builder for chaining. + */ + public Builder setGiftCursor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + giftCursor_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>string giftCursor = 10;</code> + * @return This builder for chaining. + */ + public Builder clearGiftCursor() { + giftCursor_ = getDefaultInstance().getGiftCursor(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * <code>string giftCursor = 10;</code> + * @param value The bytes for giftCursor to set. + * @return This builder for chaining. + */ + public Builder setGiftCursorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + giftCursor_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed> systemNoticeFeeds_ = + java.util.Collections.emptyList(); + private void ensureSystemNoticeFeedsIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + systemNoticeFeeds_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed>(systemNoticeFeeds_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder> systemNoticeFeedsBuilder_; + + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed> getSystemNoticeFeedsList() { + if (systemNoticeFeedsBuilder_ == null) { + return java.util.Collections.unmodifiableList(systemNoticeFeeds_); + } else { + return systemNoticeFeedsBuilder_.getMessageList(); + } + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public int getSystemNoticeFeedsCount() { + if (systemNoticeFeedsBuilder_ == null) { + return systemNoticeFeeds_.size(); + } else { + return systemNoticeFeedsBuilder_.getCount(); + } + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed getSystemNoticeFeeds(int index) { + if (systemNoticeFeedsBuilder_ == null) { + return systemNoticeFeeds_.get(index); + } else { + return systemNoticeFeedsBuilder_.getMessage(index); + } + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public Builder setSystemNoticeFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed value) { + if (systemNoticeFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.set(index, value); + onChanged(); + } else { + systemNoticeFeedsBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public Builder setSystemNoticeFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder builderForValue) { + if (systemNoticeFeedsBuilder_ == null) { + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.set(index, builderForValue.build()); + onChanged(); + } else { + systemNoticeFeedsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public Builder addSystemNoticeFeeds(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed value) { + if (systemNoticeFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.add(value); + onChanged(); + } else { + systemNoticeFeedsBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public Builder addSystemNoticeFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed value) { + if (systemNoticeFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.add(index, value); + onChanged(); + } else { + systemNoticeFeedsBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public Builder addSystemNoticeFeeds( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder builderForValue) { + if (systemNoticeFeedsBuilder_ == null) { + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.add(builderForValue.build()); + onChanged(); + } else { + systemNoticeFeedsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public Builder addSystemNoticeFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder builderForValue) { + if (systemNoticeFeedsBuilder_ == null) { + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.add(index, builderForValue.build()); + onChanged(); + } else { + systemNoticeFeedsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public Builder addAllSystemNoticeFeeds( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed> values) { + if (systemNoticeFeedsBuilder_ == null) { + ensureSystemNoticeFeedsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, systemNoticeFeeds_); + onChanged(); + } else { + systemNoticeFeedsBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public Builder clearSystemNoticeFeeds() { + if (systemNoticeFeedsBuilder_ == null) { + systemNoticeFeeds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + systemNoticeFeedsBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public Builder removeSystemNoticeFeeds(int index) { + if (systemNoticeFeedsBuilder_ == null) { + ensureSystemNoticeFeedsIsMutable(); + systemNoticeFeeds_.remove(index); + onChanged(); + } else { + systemNoticeFeedsBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder getSystemNoticeFeedsBuilder( + int index) { + return getSystemNoticeFeedsFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder getSystemNoticeFeedsOrBuilder( + int index) { + if (systemNoticeFeedsBuilder_ == null) { + return systemNoticeFeeds_.get(index); } else { + return systemNoticeFeedsBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder> + getSystemNoticeFeedsOrBuilderList() { + if (systemNoticeFeedsBuilder_ != null) { + return systemNoticeFeedsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(systemNoticeFeeds_); + } + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder addSystemNoticeFeedsBuilder() { + return getSystemNoticeFeedsFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.getDefaultInstance()); + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder addSystemNoticeFeedsBuilder( + int index) { + return getSystemNoticeFeedsFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.getDefaultInstance()); + } + /** + * <code>repeated .WebSystemNoticeFeed systemNoticeFeeds = 11;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder> + getSystemNoticeFeedsBuilderList() { + return getSystemNoticeFeedsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder> + getSystemNoticeFeedsFieldBuilder() { + if (systemNoticeFeedsBuilder_ == null) { + systemNoticeFeedsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder>( + systemNoticeFeeds_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + systemNoticeFeeds_ = null; + } + return systemNoticeFeedsBuilder_; + } + + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed> shareFeeds_ = + java.util.Collections.emptyList(); + private void ensureShareFeedsIsMutable() { + if (!((bitField0_ & 0x00000800) != 0)) { + shareFeeds_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed>(shareFeeds_); + bitField0_ |= 0x00000800; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder> shareFeedsBuilder_; + + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed> getShareFeedsList() { + if (shareFeedsBuilder_ == null) { + return java.util.Collections.unmodifiableList(shareFeeds_); + } else { + return shareFeedsBuilder_.getMessageList(); + } + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public int getShareFeedsCount() { + if (shareFeedsBuilder_ == null) { + return shareFeeds_.size(); + } else { + return shareFeedsBuilder_.getCount(); + } + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed getShareFeeds(int index) { + if (shareFeedsBuilder_ == null) { + return shareFeeds_.get(index); + } else { + return shareFeedsBuilder_.getMessage(index); + } + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public Builder setShareFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed value) { + if (shareFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShareFeedsIsMutable(); + shareFeeds_.set(index, value); + onChanged(); + } else { + shareFeedsBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public Builder setShareFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder builderForValue) { + if (shareFeedsBuilder_ == null) { + ensureShareFeedsIsMutable(); + shareFeeds_.set(index, builderForValue.build()); + onChanged(); + } else { + shareFeedsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public Builder addShareFeeds(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed value) { + if (shareFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShareFeedsIsMutable(); + shareFeeds_.add(value); + onChanged(); + } else { + shareFeedsBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public Builder addShareFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed value) { + if (shareFeedsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureShareFeedsIsMutable(); + shareFeeds_.add(index, value); + onChanged(); + } else { + shareFeedsBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public Builder addShareFeeds( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder builderForValue) { + if (shareFeedsBuilder_ == null) { + ensureShareFeedsIsMutable(); + shareFeeds_.add(builderForValue.build()); + onChanged(); + } else { + shareFeedsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public Builder addShareFeeds( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder builderForValue) { + if (shareFeedsBuilder_ == null) { + ensureShareFeedsIsMutable(); + shareFeeds_.add(index, builderForValue.build()); + onChanged(); + } else { + shareFeedsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public Builder addAllShareFeeds( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed> values) { + if (shareFeedsBuilder_ == null) { + ensureShareFeedsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, shareFeeds_); + onChanged(); + } else { + shareFeedsBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public Builder clearShareFeeds() { + if (shareFeedsBuilder_ == null) { + shareFeeds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + } else { + shareFeedsBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public Builder removeShareFeeds(int index) { + if (shareFeedsBuilder_ == null) { + ensureShareFeedsIsMutable(); + shareFeeds_.remove(index); + onChanged(); + } else { + shareFeedsBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder getShareFeedsBuilder( + int index) { + return getShareFeedsFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder getShareFeedsOrBuilder( + int index) { + if (shareFeedsBuilder_ == null) { + return shareFeeds_.get(index); } else { + return shareFeedsBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder> + getShareFeedsOrBuilderList() { + if (shareFeedsBuilder_ != null) { + return shareFeedsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(shareFeeds_); + } + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder addShareFeedsBuilder() { + return getShareFeedsFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.getDefaultInstance()); + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder addShareFeedsBuilder( + int index) { + return getShareFeedsFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.getDefaultInstance()); + } + /** + * <code>repeated .WebShareFeed shareFeeds = 12;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder> + getShareFeedsBuilderList() { + return getShareFeedsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder> + getShareFeedsFieldBuilder() { + if (shareFeedsBuilder_ == null) { + shareFeedsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder>( + shareFeeds_, + ((bitField0_ & 0x00000800) != 0), + getParentForChildren(), + isClean()); + shareFeeds_ = null; + } + return shareFeedsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebFeedPush) + } + + // @@protoc_insertion_point(class_scope:SCWebFeedPush) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebFeedPush> + PARSER = new com.google.protobuf.AbstractParser<SCWebFeedPush>() { + @java.lang.Override + public SCWebFeedPush parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebFeedPush> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebFeedPush> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebFeedPushOuterClass.SCWebFeedPush getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebFeedPush_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebFeedPush_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\023SCWebFeedPush.proto\032\024WebCommentFeed.pr" + + "oto\032\031WebComboCommentFeed.proto\032\021WebLikeF" + + "eed.proto\032\021WebGiftFeed.proto\032\031WebSystemN" + + "oticeFeed.proto\032\022WebShareFeed.proto\"\217\003\n\r" + + "SCWebFeedPush\022\034\n\024displayWatchingCount\030\001 " + + "\001(\t\022\030\n\020displayLikeCount\030\002 \001(\t\022\030\n\020pending" + + "LikeCount\030\003 \001(\004\022\024\n\014pushInterval\030\004 \001(\004\022%\n" + + "\014commentFeeds\030\005 \003(\0132\017.WebCommentFeed\022\025\n\r" + + "commentCursor\030\006 \001(\t\022.\n\020comboCommentFeed\030" + + "\007 \003(\0132\024.WebComboCommentFeed\022\037\n\tlikeFeeds" + + "\030\010 \003(\0132\014.WebLikeFeed\022\037\n\tgiftFeeds\030\t \003(\0132" + + "\014.WebGiftFeed\022\022\n\ngiftCursor\030\n \001(\t\022/\n\021sys" + + "temNoticeFeeds\030\013 \003(\0132\024.WebSystemNoticeFe" + + "ed\022!\n\nshareFeeds\030\014 \003(\0132\r.WebShareFeedB6\n" + + "4tech.ordinaryroad.live.chat.client.kuai" + + "shou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.getDescriptor(), + }); + internal_static_SCWebFeedPush_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebFeedPush_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebFeedPush_descriptor, + new java.lang.String[] { "DisplayWatchingCount", "DisplayLikeCount", "PendingLikeCount", "PushInterval", "CommentFeeds", "CommentCursor", "ComboCommentFeed", "LikeFeeds", "GiftFeeds", "GiftCursor", "SystemNoticeFeeds", "ShareFeeds", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebGuessClosedOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebGuessClosedOuterClass.java new file mode 100644 index 0000000..7ee548d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebGuessClosedOuterClass.java @@ -0,0 +1,772 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebGuessClosed.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebGuessClosedOuterClass { + private SCWebGuessClosedOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebGuessClosedOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebGuessClosed) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + long getTime(); + + /** + * <code>string guessId = 2;</code> + * @return The guessId. + */ + java.lang.String getGuessId(); + /** + * <code>string guessId = 2;</code> + * @return The bytes for guessId. + */ + com.google.protobuf.ByteString + getGuessIdBytes(); + + /** + * <code>uint64 displayMaxDelayMillis = 3;</code> + * @return The displayMaxDelayMillis. + */ + long getDisplayMaxDelayMillis(); + } + /** + * Protobuf type {@code SCWebGuessClosed} + */ + public static final class SCWebGuessClosed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebGuessClosed) + SCWebGuessClosedOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebGuessClosed.newBuilder() to construct. + private SCWebGuessClosed(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebGuessClosed() { + guessId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebGuessClosed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.internal_static_SCWebGuessClosed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.internal_static_SCWebGuessClosed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_ = 0L; + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + public static final int GUESSID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object guessId_ = ""; + /** + * <code>string guessId = 2;</code> + * @return The guessId. + */ + @java.lang.Override + public java.lang.String getGuessId() { + java.lang.Object ref = guessId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + guessId_ = s; + return s; + } + } + /** + * <code>string guessId = 2;</code> + * @return The bytes for guessId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGuessIdBytes() { + java.lang.Object ref = guessId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + guessId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAYMAXDELAYMILLIS_FIELD_NUMBER = 3; + private long displayMaxDelayMillis_ = 0L; + /** + * <code>uint64 displayMaxDelayMillis = 3;</code> + * @return The displayMaxDelayMillis. + */ + @java.lang.Override + public long getDisplayMaxDelayMillis() { + return displayMaxDelayMillis_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(guessId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, guessId_); + } + if (displayMaxDelayMillis_ != 0L) { + output.writeUInt64(3, displayMaxDelayMillis_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(guessId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, guessId_); + } + if (displayMaxDelayMillis_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, displayMaxDelayMillis_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed) obj; + + if (getTime() + != other.getTime()) return false; + if (!getGuessId() + .equals(other.getGuessId())) return false; + if (getDisplayMaxDelayMillis() + != other.getDisplayMaxDelayMillis()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + GUESSID_FIELD_NUMBER; + hash = (53 * hash) + getGuessId().hashCode(); + hash = (37 * hash) + DISPLAYMAXDELAYMILLIS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDisplayMaxDelayMillis()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebGuessClosed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebGuessClosed) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.internal_static_SCWebGuessClosed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.internal_static_SCWebGuessClosed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + time_ = 0L; + guessId_ = ""; + displayMaxDelayMillis_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.internal_static_SCWebGuessClosed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.time_ = time_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.guessId_ = guessId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.displayMaxDelayMillis_ = displayMaxDelayMillis_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (!other.getGuessId().isEmpty()) { + guessId_ = other.guessId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getDisplayMaxDelayMillis() != 0L) { + setDisplayMaxDelayMillis(other.getDisplayMaxDelayMillis()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + guessId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + displayMaxDelayMillis_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long time_ ; + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * <code>uint64 time = 1;</code> + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 time = 1;</code> + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object guessId_ = ""; + /** + * <code>string guessId = 2;</code> + * @return The guessId. + */ + public java.lang.String getGuessId() { + java.lang.Object ref = guessId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + guessId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string guessId = 2;</code> + * @return The bytes for guessId. + */ + public com.google.protobuf.ByteString + getGuessIdBytes() { + java.lang.Object ref = guessId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + guessId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string guessId = 2;</code> + * @param value The guessId to set. + * @return This builder for chaining. + */ + public Builder setGuessId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + guessId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string guessId = 2;</code> + * @return This builder for chaining. + */ + public Builder clearGuessId() { + guessId_ = getDefaultInstance().getGuessId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string guessId = 2;</code> + * @param value The bytes for guessId to set. + * @return This builder for chaining. + */ + public Builder setGuessIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + guessId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long displayMaxDelayMillis_ ; + /** + * <code>uint64 displayMaxDelayMillis = 3;</code> + * @return The displayMaxDelayMillis. + */ + @java.lang.Override + public long getDisplayMaxDelayMillis() { + return displayMaxDelayMillis_; + } + /** + * <code>uint64 displayMaxDelayMillis = 3;</code> + * @param value The displayMaxDelayMillis to set. + * @return This builder for chaining. + */ + public Builder setDisplayMaxDelayMillis(long value) { + + displayMaxDelayMillis_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 displayMaxDelayMillis = 3;</code> + * @return This builder for chaining. + */ + public Builder clearDisplayMaxDelayMillis() { + bitField0_ = (bitField0_ & ~0x00000004); + displayMaxDelayMillis_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebGuessClosed) + } + + // @@protoc_insertion_point(class_scope:SCWebGuessClosed) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebGuessClosed> + PARSER = new com.google.protobuf.AbstractParser<SCWebGuessClosed>() { + @java.lang.Override + public SCWebGuessClosed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebGuessClosed> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebGuessClosed> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessClosedOuterClass.SCWebGuessClosed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebGuessClosed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebGuessClosed_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026SCWebGuessClosed.proto\"P\n\020SCWebGuessCl" + + "osed\022\014\n\004time\030\001 \001(\004\022\017\n\007guessId\030\002 \001(\t\022\035\n\025d" + + "isplayMaxDelayMillis\030\003 \001(\004B6\n4tech.ordin" + + "aryroad.live.chat.client.kuaishou.protob" + + "ufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebGuessClosed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebGuessClosed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebGuessClosed_descriptor, + new java.lang.String[] { "Time", "GuessId", "DisplayMaxDelayMillis", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebGuessOpenedOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebGuessOpenedOuterClass.java new file mode 100644 index 0000000..952322d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebGuessOpenedOuterClass.java @@ -0,0 +1,845 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebGuessOpened.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebGuessOpenedOuterClass { + private SCWebGuessOpenedOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebGuessOpenedOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebGuessOpened) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + long getTime(); + + /** + * <code>string guessId = 2;</code> + * @return The guessId. + */ + java.lang.String getGuessId(); + /** + * <code>string guessId = 2;</code> + * @return The bytes for guessId. + */ + com.google.protobuf.ByteString + getGuessIdBytes(); + + /** + * <code>uint64 submitDeadline = 3;</code> + * @return The submitDeadline. + */ + long getSubmitDeadline(); + + /** + * <code>uint64 displayMaxDelayMillis = 4;</code> + * @return The displayMaxDelayMillis. + */ + long getDisplayMaxDelayMillis(); + } + /** + * Protobuf type {@code SCWebGuessOpened} + */ + public static final class SCWebGuessOpened extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebGuessOpened) + SCWebGuessOpenedOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebGuessOpened.newBuilder() to construct. + private SCWebGuessOpened(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebGuessOpened() { + guessId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebGuessOpened(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.internal_static_SCWebGuessOpened_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.internal_static_SCWebGuessOpened_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_ = 0L; + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + public static final int GUESSID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object guessId_ = ""; + /** + * <code>string guessId = 2;</code> + * @return The guessId. + */ + @java.lang.Override + public java.lang.String getGuessId() { + java.lang.Object ref = guessId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + guessId_ = s; + return s; + } + } + /** + * <code>string guessId = 2;</code> + * @return The bytes for guessId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGuessIdBytes() { + java.lang.Object ref = guessId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + guessId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBMITDEADLINE_FIELD_NUMBER = 3; + private long submitDeadline_ = 0L; + /** + * <code>uint64 submitDeadline = 3;</code> + * @return The submitDeadline. + */ + @java.lang.Override + public long getSubmitDeadline() { + return submitDeadline_; + } + + public static final int DISPLAYMAXDELAYMILLIS_FIELD_NUMBER = 4; + private long displayMaxDelayMillis_ = 0L; + /** + * <code>uint64 displayMaxDelayMillis = 4;</code> + * @return The displayMaxDelayMillis. + */ + @java.lang.Override + public long getDisplayMaxDelayMillis() { + return displayMaxDelayMillis_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(guessId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, guessId_); + } + if (submitDeadline_ != 0L) { + output.writeUInt64(3, submitDeadline_); + } + if (displayMaxDelayMillis_ != 0L) { + output.writeUInt64(4, displayMaxDelayMillis_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(guessId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, guessId_); + } + if (submitDeadline_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, submitDeadline_); + } + if (displayMaxDelayMillis_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, displayMaxDelayMillis_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened) obj; + + if (getTime() + != other.getTime()) return false; + if (!getGuessId() + .equals(other.getGuessId())) return false; + if (getSubmitDeadline() + != other.getSubmitDeadline()) return false; + if (getDisplayMaxDelayMillis() + != other.getDisplayMaxDelayMillis()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + GUESSID_FIELD_NUMBER; + hash = (53 * hash) + getGuessId().hashCode(); + hash = (37 * hash) + SUBMITDEADLINE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSubmitDeadline()); + hash = (37 * hash) + DISPLAYMAXDELAYMILLIS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDisplayMaxDelayMillis()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebGuessOpened} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebGuessOpened) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpenedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.internal_static_SCWebGuessOpened_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.internal_static_SCWebGuessOpened_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + time_ = 0L; + guessId_ = ""; + submitDeadline_ = 0L; + displayMaxDelayMillis_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.internal_static_SCWebGuessOpened_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.time_ = time_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.guessId_ = guessId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.submitDeadline_ = submitDeadline_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.displayMaxDelayMillis_ = displayMaxDelayMillis_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (!other.getGuessId().isEmpty()) { + guessId_ = other.guessId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getSubmitDeadline() != 0L) { + setSubmitDeadline(other.getSubmitDeadline()); + } + if (other.getDisplayMaxDelayMillis() != 0L) { + setDisplayMaxDelayMillis(other.getDisplayMaxDelayMillis()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + guessId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + submitDeadline_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + displayMaxDelayMillis_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long time_ ; + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * <code>uint64 time = 1;</code> + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 time = 1;</code> + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object guessId_ = ""; + /** + * <code>string guessId = 2;</code> + * @return The guessId. + */ + public java.lang.String getGuessId() { + java.lang.Object ref = guessId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + guessId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string guessId = 2;</code> + * @return The bytes for guessId. + */ + public com.google.protobuf.ByteString + getGuessIdBytes() { + java.lang.Object ref = guessId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + guessId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string guessId = 2;</code> + * @param value The guessId to set. + * @return This builder for chaining. + */ + public Builder setGuessId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + guessId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string guessId = 2;</code> + * @return This builder for chaining. + */ + public Builder clearGuessId() { + guessId_ = getDefaultInstance().getGuessId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string guessId = 2;</code> + * @param value The bytes for guessId to set. + * @return This builder for chaining. + */ + public Builder setGuessIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + guessId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long submitDeadline_ ; + /** + * <code>uint64 submitDeadline = 3;</code> + * @return The submitDeadline. + */ + @java.lang.Override + public long getSubmitDeadline() { + return submitDeadline_; + } + /** + * <code>uint64 submitDeadline = 3;</code> + * @param value The submitDeadline to set. + * @return This builder for chaining. + */ + public Builder setSubmitDeadline(long value) { + + submitDeadline_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 submitDeadline = 3;</code> + * @return This builder for chaining. + */ + public Builder clearSubmitDeadline() { + bitField0_ = (bitField0_ & ~0x00000004); + submitDeadline_ = 0L; + onChanged(); + return this; + } + + private long displayMaxDelayMillis_ ; + /** + * <code>uint64 displayMaxDelayMillis = 4;</code> + * @return The displayMaxDelayMillis. + */ + @java.lang.Override + public long getDisplayMaxDelayMillis() { + return displayMaxDelayMillis_; + } + /** + * <code>uint64 displayMaxDelayMillis = 4;</code> + * @param value The displayMaxDelayMillis to set. + * @return This builder for chaining. + */ + public Builder setDisplayMaxDelayMillis(long value) { + + displayMaxDelayMillis_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint64 displayMaxDelayMillis = 4;</code> + * @return This builder for chaining. + */ + public Builder clearDisplayMaxDelayMillis() { + bitField0_ = (bitField0_ & ~0x00000008); + displayMaxDelayMillis_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebGuessOpened) + } + + // @@protoc_insertion_point(class_scope:SCWebGuessOpened) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebGuessOpened> + PARSER = new com.google.protobuf.AbstractParser<SCWebGuessOpened>() { + @java.lang.Override + public SCWebGuessOpened parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebGuessOpened> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebGuessOpened> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebGuessOpenedOuterClass.SCWebGuessOpened getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebGuessOpened_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebGuessOpened_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026SCWebGuessOpened.proto\"h\n\020SCWebGuessOp" + + "ened\022\014\n\004time\030\001 \001(\004\022\017\n\007guessId\030\002 \001(\t\022\026\n\016s" + + "ubmitDeadline\030\003 \001(\004\022\035\n\025displayMaxDelayMi" + + "llis\030\004 \001(\004B6\n4tech.ordinaryroad.live.cha" + + "t.client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebGuessOpened_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebGuessOpened_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebGuessOpened_descriptor, + new java.lang.String[] { "Time", "GuessId", "SubmitDeadline", "DisplayMaxDelayMillis", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebHeartbeatAckOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebHeartbeatAckOuterClass.java new file mode 100644 index 0000000..2493292 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebHeartbeatAckOuterClass.java @@ -0,0 +1,623 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebHeartbeatAck.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebHeartbeatAckOuterClass { + private SCWebHeartbeatAckOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebHeartbeatAckOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebHeartbeatAck) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 timestamp = 1;</code> + * @return The timestamp. + */ + long getTimestamp(); + + /** + * <code>uint64 clientTimestamp = 2;</code> + * @return The clientTimestamp. + */ + long getClientTimestamp(); + } + /** + * Protobuf type {@code SCWebHeartbeatAck} + */ + public static final class SCWebHeartbeatAck extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebHeartbeatAck) + SCWebHeartbeatAckOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebHeartbeatAck.newBuilder() to construct. + private SCWebHeartbeatAck(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebHeartbeatAck() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebHeartbeatAck(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.internal_static_SCWebHeartbeatAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.internal_static_SCWebHeartbeatAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck.Builder.class); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 1; + private long timestamp_ = 0L; + /** + * <code>uint64 timestamp = 1;</code> + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + + public static final int CLIENTTIMESTAMP_FIELD_NUMBER = 2; + private long clientTimestamp_ = 0L; + /** + * <code>uint64 clientTimestamp = 2;</code> + * @return The clientTimestamp. + */ + @java.lang.Override + public long getClientTimestamp() { + return clientTimestamp_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (timestamp_ != 0L) { + output.writeUInt64(1, timestamp_); + } + if (clientTimestamp_ != 0L) { + output.writeUInt64(2, clientTimestamp_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, timestamp_); + } + if (clientTimestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, clientTimestamp_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck) obj; + + if (getTimestamp() + != other.getTimestamp()) return false; + if (getClientTimestamp() + != other.getClientTimestamp()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTimestamp()); + hash = (37 * hash) + CLIENTTIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getClientTimestamp()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebHeartbeatAck} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebHeartbeatAck) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAckOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.internal_static_SCWebHeartbeatAck_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.internal_static_SCWebHeartbeatAck_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + timestamp_ = 0L; + clientTimestamp_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.internal_static_SCWebHeartbeatAck_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.timestamp_ = timestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.clientTimestamp_ = clientTimestamp_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck.getDefaultInstance()) return this; + if (other.getTimestamp() != 0L) { + setTimestamp(other.getTimestamp()); + } + if (other.getClientTimestamp() != 0L) { + setClientTimestamp(other.getClientTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + timestamp_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + clientTimestamp_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long timestamp_ ; + /** + * <code>uint64 timestamp = 1;</code> + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + /** + * <code>uint64 timestamp = 1;</code> + * @param value The timestamp to set. + * @return This builder for chaining. + */ + public Builder setTimestamp(long value) { + + timestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 timestamp = 1;</code> + * @return This builder for chaining. + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + timestamp_ = 0L; + onChanged(); + return this; + } + + private long clientTimestamp_ ; + /** + * <code>uint64 clientTimestamp = 2;</code> + * @return The clientTimestamp. + */ + @java.lang.Override + public long getClientTimestamp() { + return clientTimestamp_; + } + /** + * <code>uint64 clientTimestamp = 2;</code> + * @param value The clientTimestamp to set. + * @return This builder for chaining. + */ + public Builder setClientTimestamp(long value) { + + clientTimestamp_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>uint64 clientTimestamp = 2;</code> + * @return This builder for chaining. + */ + public Builder clearClientTimestamp() { + bitField0_ = (bitField0_ & ~0x00000002); + clientTimestamp_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebHeartbeatAck) + } + + // @@protoc_insertion_point(class_scope:SCWebHeartbeatAck) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebHeartbeatAck> + PARSER = new com.google.protobuf.AbstractParser<SCWebHeartbeatAck>() { + @java.lang.Override + public SCWebHeartbeatAck parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebHeartbeatAck> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebHeartbeatAck> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebHeartbeatAckOuterClass.SCWebHeartbeatAck getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebHeartbeatAck_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebHeartbeatAck_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\027SCWebHeartbeatAck.proto\"?\n\021SCWebHeartb" + + "eatAck\022\021\n\ttimestamp\030\001 \001(\004\022\027\n\017clientTimes" + + "tamp\030\002 \001(\004B6\n4tech.ordinaryroad.live.cha" + + "t.client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebHeartbeatAck_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebHeartbeatAck_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebHeartbeatAck_descriptor, + new java.lang.String[] { "Timestamp", "ClientTimestamp", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebLiveSpecialAccountConfigStateOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebLiveSpecialAccountConfigStateOuterClass.java new file mode 100644 index 0000000..3aa0095 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebLiveSpecialAccountConfigStateOuterClass.java @@ -0,0 +1,932 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebLiveSpecialAccountConfigState.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebLiveSpecialAccountConfigStateOuterClass { + private SCWebLiveSpecialAccountConfigStateOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebLiveSpecialAccountConfigStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebLiveSpecialAccountConfigState) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem> + getConfigSwitchItemList(); + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem getConfigSwitchItem(int index); + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + int getConfigSwitchItemCount(); + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder> + getConfigSwitchItemOrBuilderList(); + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder getConfigSwitchItemOrBuilder( + int index); + + /** + * <code>uint64 timestamp = 2;</code> + * @return The timestamp. + */ + long getTimestamp(); + } + /** + * Protobuf type {@code SCWebLiveSpecialAccountConfigState} + */ + public static final class SCWebLiveSpecialAccountConfigState extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebLiveSpecialAccountConfigState) + SCWebLiveSpecialAccountConfigStateOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebLiveSpecialAccountConfigState.newBuilder() to construct. + private SCWebLiveSpecialAccountConfigState(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebLiveSpecialAccountConfigState() { + configSwitchItem_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebLiveSpecialAccountConfigState(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.internal_static_SCWebLiveSpecialAccountConfigState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.internal_static_SCWebLiveSpecialAccountConfigState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState.Builder.class); + } + + public static final int CONFIGSWITCHITEM_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem> configSwitchItem_; + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem> getConfigSwitchItemList() { + return configSwitchItem_; + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder> + getConfigSwitchItemOrBuilderList() { + return configSwitchItem_; + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + @java.lang.Override + public int getConfigSwitchItemCount() { + return configSwitchItem_.size(); + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem getConfigSwitchItem(int index) { + return configSwitchItem_.get(index); + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder getConfigSwitchItemOrBuilder( + int index) { + return configSwitchItem_.get(index); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 2; + private long timestamp_ = 0L; + /** + * <code>uint64 timestamp = 2;</code> + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < configSwitchItem_.size(); i++) { + output.writeMessage(1, configSwitchItem_.get(i)); + } + if (timestamp_ != 0L) { + output.writeUInt64(2, timestamp_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < configSwitchItem_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, configSwitchItem_.get(i)); + } + if (timestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, timestamp_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState) obj; + + if (!getConfigSwitchItemList() + .equals(other.getConfigSwitchItemList())) return false; + if (getTimestamp() + != other.getTimestamp()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConfigSwitchItemCount() > 0) { + hash = (37 * hash) + CONFIGSWITCHITEM_FIELD_NUMBER; + hash = (53 * hash) + getConfigSwitchItemList().hashCode(); + } + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTimestamp()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebLiveSpecialAccountConfigState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebLiveSpecialAccountConfigState) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigStateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.internal_static_SCWebLiveSpecialAccountConfigState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.internal_static_SCWebLiveSpecialAccountConfigState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (configSwitchItemBuilder_ == null) { + configSwitchItem_ = java.util.Collections.emptyList(); + } else { + configSwitchItem_ = null; + configSwitchItemBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + timestamp_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.internal_static_SCWebLiveSpecialAccountConfigState_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState result) { + if (configSwitchItemBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + configSwitchItem_ = java.util.Collections.unmodifiableList(configSwitchItem_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.configSwitchItem_ = configSwitchItem_; + } else { + result.configSwitchItem_ = configSwitchItemBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.timestamp_ = timestamp_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState.getDefaultInstance()) return this; + if (configSwitchItemBuilder_ == null) { + if (!other.configSwitchItem_.isEmpty()) { + if (configSwitchItem_.isEmpty()) { + configSwitchItem_ = other.configSwitchItem_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.addAll(other.configSwitchItem_); + } + onChanged(); + } + } else { + if (!other.configSwitchItem_.isEmpty()) { + if (configSwitchItemBuilder_.isEmpty()) { + configSwitchItemBuilder_.dispose(); + configSwitchItemBuilder_ = null; + configSwitchItem_ = other.configSwitchItem_; + bitField0_ = (bitField0_ & ~0x00000001); + configSwitchItemBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getConfigSwitchItemFieldBuilder() : null; + } else { + configSwitchItemBuilder_.addAllMessages(other.configSwitchItem_); + } + } + } + if (other.getTimestamp() != 0L) { + setTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem m = + input.readMessage( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.parser(), + extensionRegistry); + if (configSwitchItemBuilder_ == null) { + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.add(m); + } else { + configSwitchItemBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: { + timestamp_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem> configSwitchItem_ = + java.util.Collections.emptyList(); + private void ensureConfigSwitchItemIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + configSwitchItem_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem>(configSwitchItem_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder> configSwitchItemBuilder_; + + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem> getConfigSwitchItemList() { + if (configSwitchItemBuilder_ == null) { + return java.util.Collections.unmodifiableList(configSwitchItem_); + } else { + return configSwitchItemBuilder_.getMessageList(); + } + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public int getConfigSwitchItemCount() { + if (configSwitchItemBuilder_ == null) { + return configSwitchItem_.size(); + } else { + return configSwitchItemBuilder_.getCount(); + } + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem getConfigSwitchItem(int index) { + if (configSwitchItemBuilder_ == null) { + return configSwitchItem_.get(index); + } else { + return configSwitchItemBuilder_.getMessage(index); + } + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public Builder setConfigSwitchItem( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem value) { + if (configSwitchItemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.set(index, value); + onChanged(); + } else { + configSwitchItemBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public Builder setConfigSwitchItem( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder builderForValue) { + if (configSwitchItemBuilder_ == null) { + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.set(index, builderForValue.build()); + onChanged(); + } else { + configSwitchItemBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public Builder addConfigSwitchItem(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem value) { + if (configSwitchItemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.add(value); + onChanged(); + } else { + configSwitchItemBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public Builder addConfigSwitchItem( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem value) { + if (configSwitchItemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.add(index, value); + onChanged(); + } else { + configSwitchItemBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public Builder addConfigSwitchItem( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder builderForValue) { + if (configSwitchItemBuilder_ == null) { + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.add(builderForValue.build()); + onChanged(); + } else { + configSwitchItemBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public Builder addConfigSwitchItem( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder builderForValue) { + if (configSwitchItemBuilder_ == null) { + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.add(index, builderForValue.build()); + onChanged(); + } else { + configSwitchItemBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public Builder addAllConfigSwitchItem( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem> values) { + if (configSwitchItemBuilder_ == null) { + ensureConfigSwitchItemIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, configSwitchItem_); + onChanged(); + } else { + configSwitchItemBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public Builder clearConfigSwitchItem() { + if (configSwitchItemBuilder_ == null) { + configSwitchItem_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + configSwitchItemBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public Builder removeConfigSwitchItem(int index) { + if (configSwitchItemBuilder_ == null) { + ensureConfigSwitchItemIsMutable(); + configSwitchItem_.remove(index); + onChanged(); + } else { + configSwitchItemBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder getConfigSwitchItemBuilder( + int index) { + return getConfigSwitchItemFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder getConfigSwitchItemOrBuilder( + int index) { + if (configSwitchItemBuilder_ == null) { + return configSwitchItem_.get(index); } else { + return configSwitchItemBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder> + getConfigSwitchItemOrBuilderList() { + if (configSwitchItemBuilder_ != null) { + return configSwitchItemBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(configSwitchItem_); + } + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder addConfigSwitchItemBuilder() { + return getConfigSwitchItemFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.getDefaultInstance()); + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder addConfigSwitchItemBuilder( + int index) { + return getConfigSwitchItemFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.getDefaultInstance()); + } + /** + * <code>repeated .ConfigSwitchItem configSwitchItem = 1;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder> + getConfigSwitchItemBuilderList() { + return getConfigSwitchItemFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder> + getConfigSwitchItemFieldBuilder() { + if (configSwitchItemBuilder_ == null) { + configSwitchItemBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItem.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.ConfigSwitchItemOrBuilder>( + configSwitchItem_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + configSwitchItem_ = null; + } + return configSwitchItemBuilder_; + } + + private long timestamp_ ; + /** + * <code>uint64 timestamp = 2;</code> + * @return The timestamp. + */ + @java.lang.Override + public long getTimestamp() { + return timestamp_; + } + /** + * <code>uint64 timestamp = 2;</code> + * @param value The timestamp to set. + * @return This builder for chaining. + */ + public Builder setTimestamp(long value) { + + timestamp_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>uint64 timestamp = 2;</code> + * @return This builder for chaining. + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000002); + timestamp_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebLiveSpecialAccountConfigState) + } + + // @@protoc_insertion_point(class_scope:SCWebLiveSpecialAccountConfigState) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebLiveSpecialAccountConfigState> + PARSER = new com.google.protobuf.AbstractParser<SCWebLiveSpecialAccountConfigState>() { + @java.lang.Override + public SCWebLiveSpecialAccountConfigState parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebLiveSpecialAccountConfigState> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebLiveSpecialAccountConfigState> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveSpecialAccountConfigStateOuterClass.SCWebLiveSpecialAccountConfigState getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebLiveSpecialAccountConfigState_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebLiveSpecialAccountConfigState_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n(SCWebLiveSpecialAccountConfigState.pro" + + "to\032\026ConfigSwitchItem.proto\"d\n\"SCWebLiveS" + + "pecialAccountConfigState\022+\n\020configSwitch" + + "Item\030\001 \003(\0132\021.ConfigSwitchItem\022\021\n\ttimesta" + + "mp\030\002 \001(\004B6\n4tech.ordinaryroad.live.chat." + + "client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.getDescriptor(), + }); + internal_static_SCWebLiveSpecialAccountConfigState_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebLiveSpecialAccountConfigState_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebLiveSpecialAccountConfigState_descriptor, + new java.lang.String[] { "ConfigSwitchItem", "Timestamp", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.ConfigSwitchItemOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebLiveWatchingUsersOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebLiveWatchingUsersOuterClass.java new file mode 100644 index 0000000..5a39e0b --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebLiveWatchingUsersOuterClass.java @@ -0,0 +1,1081 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebLiveWatchingUsers.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebLiveWatchingUsersOuterClass { + private SCWebLiveWatchingUsersOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebLiveWatchingUsersOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebLiveWatchingUsers) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo> + getWatchingUserList(); + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo getWatchingUser(int index); + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + int getWatchingUserCount(); + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder> + getWatchingUserOrBuilderList(); + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder getWatchingUserOrBuilder( + int index); + + /** + * <code>string displayWatchingCount = 2;</code> + * @return The displayWatchingCount. + */ + java.lang.String getDisplayWatchingCount(); + /** + * <code>string displayWatchingCount = 2;</code> + * @return The bytes for displayWatchingCount. + */ + com.google.protobuf.ByteString + getDisplayWatchingCountBytes(); + + /** + * <code>uint64 pendingDuration = 3;</code> + * @return The pendingDuration. + */ + long getPendingDuration(); + } + /** + * Protobuf type {@code SCWebLiveWatchingUsers} + */ + public static final class SCWebLiveWatchingUsers extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebLiveWatchingUsers) + SCWebLiveWatchingUsersOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebLiveWatchingUsers.newBuilder() to construct. + private SCWebLiveWatchingUsers(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebLiveWatchingUsers() { + watchingUser_ = java.util.Collections.emptyList(); + displayWatchingCount_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebLiveWatchingUsers(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.internal_static_SCWebLiveWatchingUsers_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.internal_static_SCWebLiveWatchingUsers_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers.Builder.class); + } + + public static final int WATCHINGUSER_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo> watchingUser_; + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo> getWatchingUserList() { + return watchingUser_; + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder> + getWatchingUserOrBuilderList() { + return watchingUser_; + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + @java.lang.Override + public int getWatchingUserCount() { + return watchingUser_.size(); + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo getWatchingUser(int index) { + return watchingUser_.get(index); + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder getWatchingUserOrBuilder( + int index) { + return watchingUser_.get(index); + } + + public static final int DISPLAYWATCHINGCOUNT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object displayWatchingCount_ = ""; + /** + * <code>string displayWatchingCount = 2;</code> + * @return The displayWatchingCount. + */ + @java.lang.Override + public java.lang.String getDisplayWatchingCount() { + java.lang.Object ref = displayWatchingCount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayWatchingCount_ = s; + return s; + } + } + /** + * <code>string displayWatchingCount = 2;</code> + * @return The bytes for displayWatchingCount. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayWatchingCountBytes() { + java.lang.Object ref = displayWatchingCount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayWatchingCount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PENDINGDURATION_FIELD_NUMBER = 3; + private long pendingDuration_ = 0L; + /** + * <code>uint64 pendingDuration = 3;</code> + * @return The pendingDuration. + */ + @java.lang.Override + public long getPendingDuration() { + return pendingDuration_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < watchingUser_.size(); i++) { + output.writeMessage(1, watchingUser_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayWatchingCount_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayWatchingCount_); + } + if (pendingDuration_ != 0L) { + output.writeUInt64(3, pendingDuration_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < watchingUser_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, watchingUser_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayWatchingCount_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayWatchingCount_); + } + if (pendingDuration_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, pendingDuration_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers) obj; + + if (!getWatchingUserList() + .equals(other.getWatchingUserList())) return false; + if (!getDisplayWatchingCount() + .equals(other.getDisplayWatchingCount())) return false; + if (getPendingDuration() + != other.getPendingDuration()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getWatchingUserCount() > 0) { + hash = (37 * hash) + WATCHINGUSER_FIELD_NUMBER; + hash = (53 * hash) + getWatchingUserList().hashCode(); + } + hash = (37 * hash) + DISPLAYWATCHINGCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getDisplayWatchingCount().hashCode(); + hash = (37 * hash) + PENDINGDURATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getPendingDuration()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebLiveWatchingUsers} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebLiveWatchingUsers) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.internal_static_SCWebLiveWatchingUsers_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.internal_static_SCWebLiveWatchingUsers_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (watchingUserBuilder_ == null) { + watchingUser_ = java.util.Collections.emptyList(); + } else { + watchingUser_ = null; + watchingUserBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + displayWatchingCount_ = ""; + pendingDuration_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.internal_static_SCWebLiveWatchingUsers_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers result) { + if (watchingUserBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + watchingUser_ = java.util.Collections.unmodifiableList(watchingUser_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.watchingUser_ = watchingUser_; + } else { + result.watchingUser_ = watchingUserBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayWatchingCount_ = displayWatchingCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pendingDuration_ = pendingDuration_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers.getDefaultInstance()) return this; + if (watchingUserBuilder_ == null) { + if (!other.watchingUser_.isEmpty()) { + if (watchingUser_.isEmpty()) { + watchingUser_ = other.watchingUser_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureWatchingUserIsMutable(); + watchingUser_.addAll(other.watchingUser_); + } + onChanged(); + } + } else { + if (!other.watchingUser_.isEmpty()) { + if (watchingUserBuilder_.isEmpty()) { + watchingUserBuilder_.dispose(); + watchingUserBuilder_ = null; + watchingUser_ = other.watchingUser_; + bitField0_ = (bitField0_ & ~0x00000001); + watchingUserBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getWatchingUserFieldBuilder() : null; + } else { + watchingUserBuilder_.addAllMessages(other.watchingUser_); + } + } + } + if (!other.getDisplayWatchingCount().isEmpty()) { + displayWatchingCount_ = other.displayWatchingCount_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPendingDuration() != 0L) { + setPendingDuration(other.getPendingDuration()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo m = + input.readMessage( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.parser(), + extensionRegistry); + if (watchingUserBuilder_ == null) { + ensureWatchingUserIsMutable(); + watchingUser_.add(m); + } else { + watchingUserBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + displayWatchingCount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + pendingDuration_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo> watchingUser_ = + java.util.Collections.emptyList(); + private void ensureWatchingUserIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + watchingUser_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo>(watchingUser_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder> watchingUserBuilder_; + + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo> getWatchingUserList() { + if (watchingUserBuilder_ == null) { + return java.util.Collections.unmodifiableList(watchingUser_); + } else { + return watchingUserBuilder_.getMessageList(); + } + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public int getWatchingUserCount() { + if (watchingUserBuilder_ == null) { + return watchingUser_.size(); + } else { + return watchingUserBuilder_.getCount(); + } + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo getWatchingUser(int index) { + if (watchingUserBuilder_ == null) { + return watchingUser_.get(index); + } else { + return watchingUserBuilder_.getMessage(index); + } + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public Builder setWatchingUser( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo value) { + if (watchingUserBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWatchingUserIsMutable(); + watchingUser_.set(index, value); + onChanged(); + } else { + watchingUserBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public Builder setWatchingUser( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder builderForValue) { + if (watchingUserBuilder_ == null) { + ensureWatchingUserIsMutable(); + watchingUser_.set(index, builderForValue.build()); + onChanged(); + } else { + watchingUserBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public Builder addWatchingUser(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo value) { + if (watchingUserBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWatchingUserIsMutable(); + watchingUser_.add(value); + onChanged(); + } else { + watchingUserBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public Builder addWatchingUser( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo value) { + if (watchingUserBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWatchingUserIsMutable(); + watchingUser_.add(index, value); + onChanged(); + } else { + watchingUserBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public Builder addWatchingUser( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder builderForValue) { + if (watchingUserBuilder_ == null) { + ensureWatchingUserIsMutable(); + watchingUser_.add(builderForValue.build()); + onChanged(); + } else { + watchingUserBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public Builder addWatchingUser( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder builderForValue) { + if (watchingUserBuilder_ == null) { + ensureWatchingUserIsMutable(); + watchingUser_.add(index, builderForValue.build()); + onChanged(); + } else { + watchingUserBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public Builder addAllWatchingUser( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo> values) { + if (watchingUserBuilder_ == null) { + ensureWatchingUserIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, watchingUser_); + onChanged(); + } else { + watchingUserBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public Builder clearWatchingUser() { + if (watchingUserBuilder_ == null) { + watchingUser_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + watchingUserBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public Builder removeWatchingUser(int index) { + if (watchingUserBuilder_ == null) { + ensureWatchingUserIsMutable(); + watchingUser_.remove(index); + onChanged(); + } else { + watchingUserBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder getWatchingUserBuilder( + int index) { + return getWatchingUserFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder getWatchingUserOrBuilder( + int index) { + if (watchingUserBuilder_ == null) { + return watchingUser_.get(index); } else { + return watchingUserBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder> + getWatchingUserOrBuilderList() { + if (watchingUserBuilder_ != null) { + return watchingUserBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(watchingUser_); + } + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder addWatchingUserBuilder() { + return getWatchingUserFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.getDefaultInstance()); + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder addWatchingUserBuilder( + int index) { + return getWatchingUserFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.getDefaultInstance()); + } + /** + * <code>repeated .WebWatchingUserInfo watchingUser = 1;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder> + getWatchingUserBuilderList() { + return getWatchingUserFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder> + getWatchingUserFieldBuilder() { + if (watchingUserBuilder_ == null) { + watchingUserBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder>( + watchingUser_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + watchingUser_ = null; + } + return watchingUserBuilder_; + } + + private java.lang.Object displayWatchingCount_ = ""; + /** + * <code>string displayWatchingCount = 2;</code> + * @return The displayWatchingCount. + */ + public java.lang.String getDisplayWatchingCount() { + java.lang.Object ref = displayWatchingCount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayWatchingCount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string displayWatchingCount = 2;</code> + * @return The bytes for displayWatchingCount. + */ + public com.google.protobuf.ByteString + getDisplayWatchingCountBytes() { + java.lang.Object ref = displayWatchingCount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayWatchingCount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string displayWatchingCount = 2;</code> + * @param value The displayWatchingCount to set. + * @return This builder for chaining. + */ + public Builder setDisplayWatchingCount( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + displayWatchingCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string displayWatchingCount = 2;</code> + * @return This builder for chaining. + */ + public Builder clearDisplayWatchingCount() { + displayWatchingCount_ = getDefaultInstance().getDisplayWatchingCount(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string displayWatchingCount = 2;</code> + * @param value The bytes for displayWatchingCount to set. + * @return This builder for chaining. + */ + public Builder setDisplayWatchingCountBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + displayWatchingCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long pendingDuration_ ; + /** + * <code>uint64 pendingDuration = 3;</code> + * @return The pendingDuration. + */ + @java.lang.Override + public long getPendingDuration() { + return pendingDuration_; + } + /** + * <code>uint64 pendingDuration = 3;</code> + * @param value The pendingDuration to set. + * @return This builder for chaining. + */ + public Builder setPendingDuration(long value) { + + pendingDuration_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 pendingDuration = 3;</code> + * @return This builder for chaining. + */ + public Builder clearPendingDuration() { + bitField0_ = (bitField0_ & ~0x00000004); + pendingDuration_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebLiveWatchingUsers) + } + + // @@protoc_insertion_point(class_scope:SCWebLiveWatchingUsers) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebLiveWatchingUsers> + PARSER = new com.google.protobuf.AbstractParser<SCWebLiveWatchingUsers>() { + @java.lang.Override + public SCWebLiveWatchingUsers parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebLiveWatchingUsers> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebLiveWatchingUsers> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebLiveWatchingUsersOuterClass.SCWebLiveWatchingUsers getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebLiveWatchingUsers_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebLiveWatchingUsers_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034SCWebLiveWatchingUsers.proto\032\031WebWatch" + + "ingUserInfo.proto\"{\n\026SCWebLiveWatchingUs" + + "ers\022*\n\014watchingUser\030\001 \003(\0132\024.WebWatchingU" + + "serInfo\022\034\n\024displayWatchingCount\030\002 \001(\t\022\027\n" + + "\017pendingDuration\030\003 \001(\004B6\n4tech.ordinaryr" + + "oad.live.chat.client.kuaishou.protobufb\006" + + "proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.getDescriptor(), + }); + internal_static_SCWebLiveWatchingUsers_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebLiveWatchingUsers_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebLiveWatchingUsers_descriptor, + new java.lang.String[] { "WatchingUser", "DisplayWatchingCount", "PendingDuration", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebPipEndedOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebPipEndedOuterClass.java new file mode 100644 index 0000000..150867c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebPipEndedOuterClass.java @@ -0,0 +1,549 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebPipEnded.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebPipEndedOuterClass { + private SCWebPipEndedOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebPipEndedOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebPipEnded) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + long getTime(); + } + /** + * Protobuf type {@code SCWebPipEnded} + */ + public static final class SCWebPipEnded extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebPipEnded) + SCWebPipEndedOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebPipEnded.newBuilder() to construct. + private SCWebPipEnded(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebPipEnded() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebPipEnded(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.internal_static_SCWebPipEnded_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.internal_static_SCWebPipEnded_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_ = 0L; + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded) obj; + + if (getTime() + != other.getTime()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebPipEnded} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebPipEnded) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEndedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.internal_static_SCWebPipEnded_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.internal_static_SCWebPipEnded_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + time_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.internal_static_SCWebPipEnded_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.time_ = time_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long time_ ; + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * <code>uint64 time = 1;</code> + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 time = 1;</code> + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebPipEnded) + } + + // @@protoc_insertion_point(class_scope:SCWebPipEnded) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebPipEnded> + PARSER = new com.google.protobuf.AbstractParser<SCWebPipEnded>() { + @java.lang.Override + public SCWebPipEnded parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebPipEnded> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebPipEnded> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipEndedOuterClass.SCWebPipEnded getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebPipEnded_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebPipEnded_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\023SCWebPipEnded.proto\"\035\n\rSCWebPipEnded\022\014" + + "\n\004time\030\001 \001(\004B6\n4tech.ordinaryroad.live.c" + + "hat.client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebPipEnded_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebPipEnded_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebPipEnded_descriptor, + new java.lang.String[] { "Time", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebPipStartedOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebPipStartedOuterClass.java new file mode 100644 index 0000000..4b4e9ff --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebPipStartedOuterClass.java @@ -0,0 +1,549 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebPipStarted.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebPipStartedOuterClass { + private SCWebPipStartedOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebPipStartedOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebPipStarted) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + long getTime(); + } + /** + * Protobuf type {@code SCWebPipStarted} + */ + public static final class SCWebPipStarted extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebPipStarted) + SCWebPipStartedOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebPipStarted.newBuilder() to construct. + private SCWebPipStarted(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebPipStarted() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebPipStarted(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.internal_static_SCWebPipStarted_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.internal_static_SCWebPipStarted_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted.Builder.class); + } + + public static final int TIME_FIELD_NUMBER = 1; + private long time_ = 0L; + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (time_ != 0L) { + output.writeUInt64(1, time_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, time_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted) obj; + + if (getTime() + != other.getTime()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebPipStarted} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebPipStarted) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStartedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.internal_static_SCWebPipStarted_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.internal_static_SCWebPipStarted_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + time_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.internal_static_SCWebPipStarted_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.time_ = time_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted.getDefaultInstance()) return this; + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long time_ ; + /** + * <code>uint64 time = 1;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * <code>uint64 time = 1;</code> + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 time = 1;</code> + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebPipStarted) + } + + // @@protoc_insertion_point(class_scope:SCWebPipStarted) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebPipStarted> + PARSER = new com.google.protobuf.AbstractParser<SCWebPipStarted>() { + @java.lang.Override + public SCWebPipStarted parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebPipStarted> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebPipStarted> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebPipStartedOuterClass.SCWebPipStarted getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebPipStarted_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebPipStarted_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\025SCWebPipStarted.proto\"\037\n\017SCWebPipStart" + + "ed\022\014\n\004time\030\001 \001(\004B6\n4tech.ordinaryroad.li" + + "ve.chat.client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebPipStarted_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebPipStarted_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebPipStarted_descriptor, + new java.lang.String[] { "Time", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebRefreshWalletOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebRefreshWalletOuterClass.java new file mode 100644 index 0000000..44f11b1 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebRefreshWalletOuterClass.java @@ -0,0 +1,469 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebRefreshWallet.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebRefreshWalletOuterClass { + private SCWebRefreshWalletOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebRefreshWalletOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebRefreshWallet) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code SCWebRefreshWallet} + */ + public static final class SCWebRefreshWallet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebRefreshWallet) + SCWebRefreshWalletOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebRefreshWallet.newBuilder() to construct. + private SCWebRefreshWallet(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebRefreshWallet() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebRefreshWallet(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.internal_static_SCWebRefreshWallet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.internal_static_SCWebRefreshWallet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet.Builder.class); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet) obj; + + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebRefreshWallet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebRefreshWallet) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWalletOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.internal_static_SCWebRefreshWallet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.internal_static_SCWebRefreshWallet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.internal_static_SCWebRefreshWallet_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebRefreshWallet) + } + + // @@protoc_insertion_point(class_scope:SCWebRefreshWallet) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebRefreshWallet> + PARSER = new com.google.protobuf.AbstractParser<SCWebRefreshWallet>() { + @java.lang.Override + public SCWebRefreshWallet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebRefreshWallet> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebRefreshWallet> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRefreshWalletOuterClass.SCWebRefreshWallet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebRefreshWallet_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebRefreshWallet_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\030SCWebRefreshWallet.proto\"\024\n\022SCWebRefre" + + "shWalletB6\n4tech.ordinaryroad.live.chat." + + "client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebRefreshWallet_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebRefreshWallet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebRefreshWallet_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebRideChangedOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebRideChangedOuterClass.java new file mode 100644 index 0000000..4e6cd79 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebRideChangedOuterClass.java @@ -0,0 +1,697 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebRideChanged.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebRideChangedOuterClass { + private SCWebRideChangedOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebRideChangedOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebRideChanged) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string rideId = 1;</code> + * @return The rideId. + */ + java.lang.String getRideId(); + /** + * <code>string rideId = 1;</code> + * @return The bytes for rideId. + */ + com.google.protobuf.ByteString + getRideIdBytes(); + + /** + * <code>uint32 requestMaxDelayMillis = 2;</code> + * @return The requestMaxDelayMillis. + */ + int getRequestMaxDelayMillis(); + } + /** + * Protobuf type {@code SCWebRideChanged} + */ + public static final class SCWebRideChanged extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebRideChanged) + SCWebRideChangedOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebRideChanged.newBuilder() to construct. + private SCWebRideChanged(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebRideChanged() { + rideId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebRideChanged(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.internal_static_SCWebRideChanged_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.internal_static_SCWebRideChanged_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged.Builder.class); + } + + public static final int RIDEID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object rideId_ = ""; + /** + * <code>string rideId = 1;</code> + * @return The rideId. + */ + @java.lang.Override + public java.lang.String getRideId() { + java.lang.Object ref = rideId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rideId_ = s; + return s; + } + } + /** + * <code>string rideId = 1;</code> + * @return The bytes for rideId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRideIdBytes() { + java.lang.Object ref = rideId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rideId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUESTMAXDELAYMILLIS_FIELD_NUMBER = 2; + private int requestMaxDelayMillis_ = 0; + /** + * <code>uint32 requestMaxDelayMillis = 2;</code> + * @return The requestMaxDelayMillis. + */ + @java.lang.Override + public int getRequestMaxDelayMillis() { + return requestMaxDelayMillis_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rideId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, rideId_); + } + if (requestMaxDelayMillis_ != 0) { + output.writeUInt32(2, requestMaxDelayMillis_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rideId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, rideId_); + } + if (requestMaxDelayMillis_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, requestMaxDelayMillis_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged) obj; + + if (!getRideId() + .equals(other.getRideId())) return false; + if (getRequestMaxDelayMillis() + != other.getRequestMaxDelayMillis()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RIDEID_FIELD_NUMBER; + hash = (53 * hash) + getRideId().hashCode(); + hash = (37 * hash) + REQUESTMAXDELAYMILLIS_FIELD_NUMBER; + hash = (53 * hash) + getRequestMaxDelayMillis(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebRideChanged} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebRideChanged) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChangedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.internal_static_SCWebRideChanged_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.internal_static_SCWebRideChanged_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + rideId_ = ""; + requestMaxDelayMillis_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.internal_static_SCWebRideChanged_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.rideId_ = rideId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestMaxDelayMillis_ = requestMaxDelayMillis_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged.getDefaultInstance()) return this; + if (!other.getRideId().isEmpty()) { + rideId_ = other.rideId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getRequestMaxDelayMillis() != 0) { + setRequestMaxDelayMillis(other.getRequestMaxDelayMillis()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + rideId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + requestMaxDelayMillis_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object rideId_ = ""; + /** + * <code>string rideId = 1;</code> + * @return The rideId. + */ + public java.lang.String getRideId() { + java.lang.Object ref = rideId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rideId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string rideId = 1;</code> + * @return The bytes for rideId. + */ + public com.google.protobuf.ByteString + getRideIdBytes() { + java.lang.Object ref = rideId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rideId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string rideId = 1;</code> + * @param value The rideId to set. + * @return This builder for chaining. + */ + public Builder setRideId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + rideId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string rideId = 1;</code> + * @return This builder for chaining. + */ + public Builder clearRideId() { + rideId_ = getDefaultInstance().getRideId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string rideId = 1;</code> + * @param value The bytes for rideId to set. + * @return This builder for chaining. + */ + public Builder setRideIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + rideId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int requestMaxDelayMillis_ ; + /** + * <code>uint32 requestMaxDelayMillis = 2;</code> + * @return The requestMaxDelayMillis. + */ + @java.lang.Override + public int getRequestMaxDelayMillis() { + return requestMaxDelayMillis_; + } + /** + * <code>uint32 requestMaxDelayMillis = 2;</code> + * @param value The requestMaxDelayMillis to set. + * @return This builder for chaining. + */ + public Builder setRequestMaxDelayMillis(int value) { + + requestMaxDelayMillis_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>uint32 requestMaxDelayMillis = 2;</code> + * @return This builder for chaining. + */ + public Builder clearRequestMaxDelayMillis() { + bitField0_ = (bitField0_ & ~0x00000002); + requestMaxDelayMillis_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebRideChanged) + } + + // @@protoc_insertion_point(class_scope:SCWebRideChanged) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebRideChanged> + PARSER = new com.google.protobuf.AbstractParser<SCWebRideChanged>() { + @java.lang.Override + public SCWebRideChanged parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebRideChanged> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebRideChanged> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebRideChangedOuterClass.SCWebRideChanged getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebRideChanged_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebRideChanged_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026SCWebRideChanged.proto\"A\n\020SCWebRideCha" + + "nged\022\016\n\006rideId\030\001 \001(\t\022\035\n\025requestMaxDelayM" + + "illis\030\002 \001(\rB6\n4tech.ordinaryroad.live.ch" + + "at.client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebRideChanged_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebRideChanged_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebRideChanged_descriptor, + new java.lang.String[] { "RideId", "RequestMaxDelayMillis", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebSuspectedViolationOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebSuspectedViolationOuterClass.java new file mode 100644 index 0000000..dabcda8 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SCWebSuspectedViolationOuterClass.java @@ -0,0 +1,550 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SCWebSuspectedViolation.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SCWebSuspectedViolationOuterClass { + private SCWebSuspectedViolationOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SCWebSuspectedViolationOrBuilder extends + // @@protoc_insertion_point(interface_extends:SCWebSuspectedViolation) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>bool suspectedViolation = 1;</code> + * @return The suspectedViolation. + */ + boolean getSuspectedViolation(); + } + /** + * Protobuf type {@code SCWebSuspectedViolation} + */ + public static final class SCWebSuspectedViolation extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SCWebSuspectedViolation) + SCWebSuspectedViolationOrBuilder { + private static final long serialVersionUID = 0L; + // Use SCWebSuspectedViolation.newBuilder() to construct. + private SCWebSuspectedViolation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SCWebSuspectedViolation() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SCWebSuspectedViolation(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.internal_static_SCWebSuspectedViolation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.internal_static_SCWebSuspectedViolation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation.Builder.class); + } + + public static final int SUSPECTEDVIOLATION_FIELD_NUMBER = 1; + private boolean suspectedViolation_ = false; + /** + * <code>bool suspectedViolation = 1;</code> + * @return The suspectedViolation. + */ + @java.lang.Override + public boolean getSuspectedViolation() { + return suspectedViolation_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (suspectedViolation_ != false) { + output.writeBool(1, suspectedViolation_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (suspectedViolation_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, suspectedViolation_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation) obj; + + if (getSuspectedViolation() + != other.getSuspectedViolation()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SUSPECTEDVIOLATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSuspectedViolation()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SCWebSuspectedViolation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SCWebSuspectedViolation) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.internal_static_SCWebSuspectedViolation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.internal_static_SCWebSuspectedViolation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + suspectedViolation_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.internal_static_SCWebSuspectedViolation_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.suspectedViolation_ = suspectedViolation_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation.getDefaultInstance()) return this; + if (other.getSuspectedViolation() != false) { + setSuspectedViolation(other.getSuspectedViolation()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + suspectedViolation_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private boolean suspectedViolation_ ; + /** + * <code>bool suspectedViolation = 1;</code> + * @return The suspectedViolation. + */ + @java.lang.Override + public boolean getSuspectedViolation() { + return suspectedViolation_; + } + /** + * <code>bool suspectedViolation = 1;</code> + * @param value The suspectedViolation to set. + * @return This builder for chaining. + */ + public Builder setSuspectedViolation(boolean value) { + + suspectedViolation_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>bool suspectedViolation = 1;</code> + * @return This builder for chaining. + */ + public Builder clearSuspectedViolation() { + bitField0_ = (bitField0_ & ~0x00000001); + suspectedViolation_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SCWebSuspectedViolation) + } + + // @@protoc_insertion_point(class_scope:SCWebSuspectedViolation) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SCWebSuspectedViolation> + PARSER = new com.google.protobuf.AbstractParser<SCWebSuspectedViolation>() { + @java.lang.Override + public SCWebSuspectedViolation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SCWebSuspectedViolation> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SCWebSuspectedViolation> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SCWebSuspectedViolationOuterClass.SCWebSuspectedViolation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SCWebSuspectedViolation_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SCWebSuspectedViolation_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\035SCWebSuspectedViolation.proto\"5\n\027SCWeb" + + "SuspectedViolation\022\032\n\022suspectedViolation" + + "\030\001 \001(\010B6\n4tech.ordinaryroad.live.chat.cl" + + "ient.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SCWebSuspectedViolation_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SCWebSuspectedViolation_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SCWebSuspectedViolation_descriptor, + new java.lang.String[] { "SuspectedViolation", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SimpleUserInfoOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SimpleUserInfoOuterClass.java new file mode 100644 index 0000000..e1b6666 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SimpleUserInfoOuterClass.java @@ -0,0 +1,921 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SimpleUserInfo.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class SimpleUserInfoOuterClass { + private SimpleUserInfoOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SimpleUserInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:SimpleUserInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string principalId = 1;</code> + * @return The principalId. + */ + java.lang.String getPrincipalId(); + /** + * <code>string principalId = 1;</code> + * @return The bytes for principalId. + */ + com.google.protobuf.ByteString + getPrincipalIdBytes(); + + /** + * <code>string userName = 2;</code> + * @return The userName. + */ + java.lang.String getUserName(); + /** + * <code>string userName = 2;</code> + * @return The bytes for userName. + */ + com.google.protobuf.ByteString + getUserNameBytes(); + + /** + * <code>string headUrl = 3;</code> + * @return The headUrl. + */ + java.lang.String getHeadUrl(); + /** + * <code>string headUrl = 3;</code> + * @return The bytes for headUrl. + */ + com.google.protobuf.ByteString + getHeadUrlBytes(); + } + /** + * Protobuf type {@code SimpleUserInfo} + */ + public static final class SimpleUserInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SimpleUserInfo) + SimpleUserInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use SimpleUserInfo.newBuilder() to construct. + private SimpleUserInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SimpleUserInfo() { + principalId_ = ""; + userName_ = ""; + headUrl_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SimpleUserInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.internal_static_SimpleUserInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.internal_static_SimpleUserInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder.class); + } + + public static final int PRINCIPALID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object principalId_ = ""; + /** + * <code>string principalId = 1;</code> + * @return The principalId. + */ + @java.lang.Override + public java.lang.String getPrincipalId() { + java.lang.Object ref = principalId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalId_ = s; + return s; + } + } + /** + * <code>string principalId = 1;</code> + * @return The bytes for principalId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPrincipalIdBytes() { + java.lang.Object ref = principalId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principalId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERNAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object userName_ = ""; + /** + * <code>string userName = 2;</code> + * @return The userName. + */ + @java.lang.Override + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } + } + /** + * <code>string userName = 2;</code> + * @return The bytes for userName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEADURL_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object headUrl_ = ""; + /** + * <code>string headUrl = 3;</code> + * @return The headUrl. + */ + @java.lang.Override + public java.lang.String getHeadUrl() { + java.lang.Object ref = headUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + headUrl_ = s; + return s; + } + } + /** + * <code>string headUrl = 3;</code> + * @return The bytes for headUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHeadUrlBytes() { + java.lang.Object ref = headUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + headUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, principalId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(headUrl_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, headUrl_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, principalId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(headUrl_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, headUrl_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo) obj; + + if (!getPrincipalId() + .equals(other.getPrincipalId())) return false; + if (!getUserName() + .equals(other.getUserName())) return false; + if (!getHeadUrl() + .equals(other.getHeadUrl())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRINCIPALID_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalId().hashCode(); + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUserName().hashCode(); + hash = (37 * hash) + HEADURL_FIELD_NUMBER; + hash = (53 * hash) + getHeadUrl().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SimpleUserInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SimpleUserInfo) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.internal_static_SimpleUserInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.internal_static_SimpleUserInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + principalId_ = ""; + userName_ = ""; + headUrl_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.internal_static_SimpleUserInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.principalId_ = principalId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userName_ = userName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.headUrl_ = headUrl_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance()) return this; + if (!other.getPrincipalId().isEmpty()) { + principalId_ = other.principalId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUserName().isEmpty()) { + userName_ = other.userName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getHeadUrl().isEmpty()) { + headUrl_ = other.headUrl_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + principalId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + userName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + headUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object principalId_ = ""; + /** + * <code>string principalId = 1;</code> + * @return The principalId. + */ + public java.lang.String getPrincipalId() { + java.lang.Object ref = principalId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string principalId = 1;</code> + * @return The bytes for principalId. + */ + public com.google.protobuf.ByteString + getPrincipalIdBytes() { + java.lang.Object ref = principalId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + principalId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string principalId = 1;</code> + * @param value The principalId to set. + * @return This builder for chaining. + */ + public Builder setPrincipalId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + principalId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string principalId = 1;</code> + * @return This builder for chaining. + */ + public Builder clearPrincipalId() { + principalId_ = getDefaultInstance().getPrincipalId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string principalId = 1;</code> + * @param value The bytes for principalId to set. + * @return This builder for chaining. + */ + public Builder setPrincipalIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + principalId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object userName_ = ""; + /** + * <code>string userName = 2;</code> + * @return The userName. + */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string userName = 2;</code> + * @return The bytes for userName. + */ + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string userName = 2;</code> + * @param value The userName to set. + * @return This builder for chaining. + */ + public Builder setUserName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string userName = 2;</code> + * @return This builder for chaining. + */ + public Builder clearUserName() { + userName_ = getDefaultInstance().getUserName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string userName = 2;</code> + * @param value The bytes for userName to set. + * @return This builder for chaining. + */ + public Builder setUserNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object headUrl_ = ""; + /** + * <code>string headUrl = 3;</code> + * @return The headUrl. + */ + public java.lang.String getHeadUrl() { + java.lang.Object ref = headUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + headUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string headUrl = 3;</code> + * @return The bytes for headUrl. + */ + public com.google.protobuf.ByteString + getHeadUrlBytes() { + java.lang.Object ref = headUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + headUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string headUrl = 3;</code> + * @param value The headUrl to set. + * @return This builder for chaining. + */ + public Builder setHeadUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + headUrl_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>string headUrl = 3;</code> + * @return This builder for chaining. + */ + public Builder clearHeadUrl() { + headUrl_ = getDefaultInstance().getHeadUrl(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * <code>string headUrl = 3;</code> + * @param value The bytes for headUrl to set. + * @return This builder for chaining. + */ + public Builder setHeadUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + headUrl_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SimpleUserInfo) + } + + // @@protoc_insertion_point(class_scope:SimpleUserInfo) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SimpleUserInfo> + PARSER = new com.google.protobuf.AbstractParser<SimpleUserInfo>() { + @java.lang.Override + public SimpleUserInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SimpleUserInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SimpleUserInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SimpleUserInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SimpleUserInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024SimpleUserInfo.proto\"H\n\016SimpleUserInfo" + + "\022\023\n\013principalId\030\001 \001(\t\022\020\n\010userName\030\002 \001(\t\022" + + "\017\n\007headUrl\030\003 \001(\tB6\n4tech.ordinaryroad.li" + + "ve.chat.client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_SimpleUserInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SimpleUserInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SimpleUserInfo_descriptor, + new java.lang.String[] { "PrincipalId", "UserName", "HeadUrl", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SocketMessageOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SocketMessageOuterClass.java new file mode 100644 index 0000000..ded05b9 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/SocketMessageOuterClass.java @@ -0,0 +1,910 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: SocketMessage.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +import tech.ordinaryroad.live.chat.client.kuaishou.msg.base.IKuaishouCmdMsg; + +public final class SocketMessageOuterClass { + private SocketMessageOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface SocketMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:SocketMessage) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.PayloadType payloadType = 1;</code> + * @return The enum numeric value on the wire for payloadType. + */ + int getPayloadTypeValue(); + /** + * <code>.PayloadType payloadType = 1;</code> + * @return The payloadType. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType getPayloadType(); + + /** + * <code>.SocketMessage.CompressionType compressionType = 2;</code> + * @return The enum numeric value on the wire for compressionType. + */ + int getCompressionTypeValue(); + /** + * <code>.SocketMessage.CompressionType compressionType = 2;</code> + * @return The compressionType. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType getCompressionType(); + + /** + * <code>bytes payload = 3;</code> + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); + } + /** + * Protobuf type {@code SocketMessage} + */ + public static final class SocketMessage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:SocketMessage) + SocketMessageOrBuilder, IKuaishouCmdMsg { + + @Override + public String getCmd() { + return getPayloadType().name(); + } + + @Override + public void setCmd(String cmd) { + // ignore + } + + @Override + public PayloadTypeOuterClass.PayloadType getCmdEnum() { + return getPayloadType(); + } + + private static final long serialVersionUID = 0L; + // Use SocketMessage.newBuilder() to construct. + private SocketMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private SocketMessage() { + payloadType_ = 0; + compressionType_ = 0; + payload_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SocketMessage(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.internal_static_SocketMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.internal_static_SocketMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.Builder.class); + } + + /** + * Protobuf enum {@code SocketMessage.CompressionType} + */ + public enum CompressionType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * <code>UNKNOWN = 0;</code> + */ + UNKNOWN(0), + /** + * <code>NONE = 1;</code> + */ + NONE(1), + /** + * <code>GZIP = 2;</code> + */ + GZIP(2), + /** + * <code>AES = 3;</code> + */ + AES(3), + UNRECOGNIZED(-1), + ; + + /** + * <code>UNKNOWN = 0;</code> + */ + public static final int UNKNOWN_VALUE = 0; + /** + * <code>NONE = 1;</code> + */ + public static final int NONE_VALUE = 1; + /** + * <code>GZIP = 2;</code> + */ + public static final int GZIP_VALUE = 2; + /** + * <code>AES = 3;</code> + */ + public static final int AES_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CompressionType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CompressionType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN; + case 1: return NONE; + case 2: return GZIP; + case 3: return AES; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap<CompressionType> + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + CompressionType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap<CompressionType>() { + public CompressionType findValueByNumber(int number) { + return CompressionType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.getDescriptor().getEnumTypes().get(0); + } + + private static final CompressionType[] VALUES = values(); + + public static CompressionType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CompressionType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:SocketMessage.CompressionType) + } + + public static final int PAYLOADTYPE_FIELD_NUMBER = 1; + private int payloadType_ = 0; + /** + * <code>.PayloadType payloadType = 1;</code> + * @return The enum numeric value on the wire for payloadType. + */ + @java.lang.Override public int getPayloadTypeValue() { + return payloadType_; + } + /** + * <code>.PayloadType payloadType = 1;</code> + * @return The payloadType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType getPayloadType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType.forNumber(payloadType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType.UNRECOGNIZED : result; + } + + public static final int COMPRESSIONTYPE_FIELD_NUMBER = 2; + private int compressionType_ = 0; + /** + * <code>.SocketMessage.CompressionType compressionType = 2;</code> + * @return The enum numeric value on the wire for compressionType. + */ + @java.lang.Override public int getCompressionTypeValue() { + return compressionType_; + } + /** + * <code>.SocketMessage.CompressionType compressionType = 2;</code> + * @return The compressionType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType getCompressionType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType.forNumber(compressionType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType.UNRECOGNIZED : result; + } + + public static final int PAYLOAD_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * <code>bytes payload = 3;</code> + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (payloadType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType.UNKNOWN.getNumber()) { + output.writeEnum(1, payloadType_); + } + if (compressionType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType.UNKNOWN.getNumber()) { + output.writeEnum(2, compressionType_); + } + if (!payload_.isEmpty()) { + output.writeBytes(3, payload_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (payloadType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, payloadType_); + } + if (compressionType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType.UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, compressionType_); + } + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, payload_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage) obj; + + if (payloadType_ != other.payloadType_) return false; + if (compressionType_ != other.compressionType_) return false; + if (!getPayload() + .equals(other.getPayload())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAYLOADTYPE_FIELD_NUMBER; + hash = (53 * hash) + payloadType_; + hash = (37 * hash) + COMPRESSIONTYPE_FIELD_NUMBER; + hash = (53 * hash) + compressionType_; + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SocketMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:SocketMessage) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.internal_static_SocketMessage_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.internal_static_SocketMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + payloadType_ = 0; + compressionType_ = 0; + payload_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.internal_static_SocketMessage_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.payloadType_ = payloadType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.compressionType_ = compressionType_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.payload_ = payload_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.getDefaultInstance()) return this; + if (other.payloadType_ != 0) { + setPayloadTypeValue(other.getPayloadTypeValue()); + } + if (other.compressionType_ != 0) { + setCompressionTypeValue(other.getCompressionTypeValue()); + } + if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { + setPayload(other.getPayload()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + payloadType_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + compressionType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + payload_ = input.readBytes(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int payloadType_ = 0; + /** + * <code>.PayloadType payloadType = 1;</code> + * @return The enum numeric value on the wire for payloadType. + */ + @java.lang.Override public int getPayloadTypeValue() { + return payloadType_; + } + /** + * <code>.PayloadType payloadType = 1;</code> + * @param value The enum numeric value on the wire for payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadTypeValue(int value) { + payloadType_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.PayloadType payloadType = 1;</code> + * @return The payloadType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType getPayloadType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType.forNumber(payloadType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType.UNRECOGNIZED : result; + } + /** + * <code>.PayloadType payloadType = 1;</code> + * @param value The payloadType to set. + * @return This builder for chaining. + */ + public Builder setPayloadType(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass.PayloadType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + payloadType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * <code>.PayloadType payloadType = 1;</code> + * @return This builder for chaining. + */ + public Builder clearPayloadType() { + bitField0_ = (bitField0_ & ~0x00000001); + payloadType_ = 0; + onChanged(); + return this; + } + + private int compressionType_ = 0; + /** + * <code>.SocketMessage.CompressionType compressionType = 2;</code> + * @return The enum numeric value on the wire for compressionType. + */ + @java.lang.Override public int getCompressionTypeValue() { + return compressionType_; + } + /** + * <code>.SocketMessage.CompressionType compressionType = 2;</code> + * @param value The enum numeric value on the wire for compressionType to set. + * @return This builder for chaining. + */ + public Builder setCompressionTypeValue(int value) { + compressionType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SocketMessage.CompressionType compressionType = 2;</code> + * @return The compressionType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType getCompressionType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType.forNumber(compressionType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType.UNRECOGNIZED : result; + } + /** + * <code>.SocketMessage.CompressionType compressionType = 2;</code> + * @param value The compressionType to set. + * @return This builder for chaining. + */ + public Builder setCompressionType(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage.CompressionType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + compressionType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * <code>.SocketMessage.CompressionType compressionType = 2;</code> + * @return This builder for chaining. + */ + public Builder clearCompressionType() { + bitField0_ = (bitField0_ & ~0x00000002); + compressionType_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * <code>bytes payload = 3;</code> + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + /** + * <code>bytes payload = 3;</code> + * @param value The payload to set. + * @return This builder for chaining. + */ + public Builder setPayload(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + payload_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>bytes payload = 3;</code> + * @return This builder for chaining. + */ + public Builder clearPayload() { + bitField0_ = (bitField0_ & ~0x00000004); + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:SocketMessage) + } + + // @@protoc_insertion_point(class_scope:SocketMessage) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<SocketMessage> + PARSER = new com.google.protobuf.AbstractParser<SocketMessage>() { + @java.lang.Override + public SocketMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<SocketMessage> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<SocketMessage> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SocketMessageOuterClass.SocketMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SocketMessage_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_SocketMessage_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\023SocketMessage.proto\032\021PayloadType.proto" + + "\"\271\001\n\rSocketMessage\022!\n\013payloadType\030\001 \001(\0162" + + "\014.PayloadType\0227\n\017compressionType\030\002 \001(\0162\036" + + ".SocketMessage.CompressionType\022\017\n\007payloa" + + "d\030\003 \001(\014\";\n\017CompressionType\022\013\n\007UNKNOWN\020\000\022" + + "\010\n\004NONE\020\001\022\010\n\004GZIP\020\002\022\007\n\003AES\020\003B6\n4tech.ord" + + "inaryroad.live.chat.client.kuaishou.prot" + + "obufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass.getDescriptor(), + }); + internal_static_SocketMessage_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_SocketMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_SocketMessage_descriptor, + new java.lang.String[] { "PayloadType", "CompressionType", "Payload", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/UserInfoOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/UserInfoOuterClass.java new file mode 100644 index 0000000..f09acea --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/UserInfoOuterClass.java @@ -0,0 +1,2121 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: UserInfo.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class UserInfoOuterClass { + private UserInfoOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface UserInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:UserInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>uint64 userId = 1;</code> + * @return The userId. + */ + long getUserId(); + + /** + * <code>string userName = 2;</code> + * @return The userName. + */ + java.lang.String getUserName(); + /** + * <code>string userName = 2;</code> + * @return The bytes for userName. + */ + com.google.protobuf.ByteString + getUserNameBytes(); + + /** + * <code>string userGender = 3;</code> + * @return The userGender. + */ + java.lang.String getUserGender(); + /** + * <code>string userGender = 3;</code> + * @return The bytes for userGender. + */ + com.google.protobuf.ByteString + getUserGenderBytes(); + + /** + * <code>string userText = 4;</code> + * @return The userText. + */ + java.lang.String getUserText(); + /** + * <code>string userText = 4;</code> + * @return The bytes for userText. + */ + com.google.protobuf.ByteString + getUserTextBytes(); + + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> + getHeadUrlsList(); + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl getHeadUrls(int index); + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + int getHeadUrlsCount(); + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> + getHeadUrlsOrBuilderList(); + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getHeadUrlsOrBuilder( + int index); + + /** + * <code>bool verified = 6;</code> + * @return The verified. + */ + boolean getVerified(); + + /** + * <code>string sUserId = 7;</code> + * @return The sUserId. + */ + java.lang.String getSUserId(); + /** + * <code>string sUserId = 7;</code> + * @return The bytes for sUserId. + */ + com.google.protobuf.ByteString + getSUserIdBytes(); + + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> + getHttpsHeadUrlsList(); + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl getHttpsHeadUrls(int index); + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + int getHttpsHeadUrlsCount(); + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> + getHttpsHeadUrlsOrBuilderList(); + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getHttpsHeadUrlsOrBuilder( + int index); + + /** + * <code>string kwaiId = 9;</code> + * @return The kwaiId. + */ + java.lang.String getKwaiId(); + /** + * <code>string kwaiId = 9;</code> + * @return The bytes for kwaiId. + */ + com.google.protobuf.ByteString + getKwaiIdBytes(); + } + /** + * Protobuf type {@code UserInfo} + */ + public static final class UserInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:UserInfo) + UserInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserInfo.newBuilder() to construct. + private UserInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private UserInfo() { + userName_ = ""; + userGender_ = ""; + userText_ = ""; + headUrls_ = java.util.Collections.emptyList(); + sUserId_ = ""; + httpsHeadUrls_ = java.util.Collections.emptyList(); + kwaiId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UserInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.internal_static_UserInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.internal_static_UserInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo.Builder.class); + } + + public static final int USERID_FIELD_NUMBER = 1; + private long userId_ = 0L; + /** + * <code>uint64 userId = 1;</code> + * @return The userId. + */ + @java.lang.Override + public long getUserId() { + return userId_; + } + + public static final int USERNAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object userName_ = ""; + /** + * <code>string userName = 2;</code> + * @return The userName. + */ + @java.lang.Override + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } + } + /** + * <code>string userName = 2;</code> + * @return The bytes for userName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERGENDER_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object userGender_ = ""; + /** + * <code>string userGender = 3;</code> + * @return The userGender. + */ + @java.lang.Override + public java.lang.String getUserGender() { + java.lang.Object ref = userGender_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userGender_ = s; + return s; + } + } + /** + * <code>string userGender = 3;</code> + * @return The bytes for userGender. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserGenderBytes() { + java.lang.Object ref = userGender_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userGender_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERTEXT_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object userText_ = ""; + /** + * <code>string userText = 4;</code> + * @return The userText. + */ + @java.lang.Override + public java.lang.String getUserText() { + java.lang.Object ref = userText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userText_ = s; + return s; + } + } + /** + * <code>string userText = 4;</code> + * @return The bytes for userText. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUserTextBytes() { + java.lang.Object ref = userText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEADURLS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> headUrls_; + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> getHeadUrlsList() { + return headUrls_; + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> + getHeadUrlsOrBuilderList() { + return headUrls_; + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + @java.lang.Override + public int getHeadUrlsCount() { + return headUrls_.size(); + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl getHeadUrls(int index) { + return headUrls_.get(index); + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getHeadUrlsOrBuilder( + int index) { + return headUrls_.get(index); + } + + public static final int VERIFIED_FIELD_NUMBER = 6; + private boolean verified_ = false; + /** + * <code>bool verified = 6;</code> + * @return The verified. + */ + @java.lang.Override + public boolean getVerified() { + return verified_; + } + + public static final int SUSERID_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object sUserId_ = ""; + /** + * <code>string sUserId = 7;</code> + * @return The sUserId. + */ + @java.lang.Override + public java.lang.String getSUserId() { + java.lang.Object ref = sUserId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sUserId_ = s; + return s; + } + } + /** + * <code>string sUserId = 7;</code> + * @return The bytes for sUserId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSUserIdBytes() { + java.lang.Object ref = sUserId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HTTPSHEADURLS_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> httpsHeadUrls_; + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + @java.lang.Override + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> getHttpsHeadUrlsList() { + return httpsHeadUrls_; + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + @java.lang.Override + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> + getHttpsHeadUrlsOrBuilderList() { + return httpsHeadUrls_; + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + @java.lang.Override + public int getHttpsHeadUrlsCount() { + return httpsHeadUrls_.size(); + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl getHttpsHeadUrls(int index) { + return httpsHeadUrls_.get(index); + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getHttpsHeadUrlsOrBuilder( + int index) { + return httpsHeadUrls_.get(index); + } + + public static final int KWAIID_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private volatile java.lang.Object kwaiId_ = ""; + /** + * <code>string kwaiId = 9;</code> + * @return The kwaiId. + */ + @java.lang.Override + public java.lang.String getKwaiId() { + java.lang.Object ref = kwaiId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kwaiId_ = s; + return s; + } + } + /** + * <code>string kwaiId = 9;</code> + * @return The bytes for kwaiId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKwaiIdBytes() { + java.lang.Object ref = kwaiId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kwaiId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (userId_ != 0L) { + output.writeUInt64(1, userId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userGender_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userGender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, userText_); + } + for (int i = 0; i < headUrls_.size(); i++) { + output.writeMessage(5, headUrls_.get(i)); + } + if (verified_ != false) { + output.writeBool(6, verified_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sUserId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, sUserId_); + } + for (int i = 0; i < httpsHeadUrls_.size(); i++) { + output.writeMessage(8, httpsHeadUrls_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kwaiId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, kwaiId_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (userId_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, userId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, userName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userGender_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userGender_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, userText_); + } + for (int i = 0; i < headUrls_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, headUrls_.get(i)); + } + if (verified_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, verified_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sUserId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, sUserId_); + } + for (int i = 0; i < httpsHeadUrls_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, httpsHeadUrls_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kwaiId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, kwaiId_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo) obj; + + if (getUserId() + != other.getUserId()) return false; + if (!getUserName() + .equals(other.getUserName())) return false; + if (!getUserGender() + .equals(other.getUserGender())) return false; + if (!getUserText() + .equals(other.getUserText())) return false; + if (!getHeadUrlsList() + .equals(other.getHeadUrlsList())) return false; + if (getVerified() + != other.getVerified()) return false; + if (!getSUserId() + .equals(other.getSUserId())) return false; + if (!getHttpsHeadUrlsList() + .equals(other.getHttpsHeadUrlsList())) return false; + if (!getKwaiId() + .equals(other.getKwaiId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USERID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getUserId()); + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUserName().hashCode(); + hash = (37 * hash) + USERGENDER_FIELD_NUMBER; + hash = (53 * hash) + getUserGender().hashCode(); + hash = (37 * hash) + USERTEXT_FIELD_NUMBER; + hash = (53 * hash) + getUserText().hashCode(); + if (getHeadUrlsCount() > 0) { + hash = (37 * hash) + HEADURLS_FIELD_NUMBER; + hash = (53 * hash) + getHeadUrlsList().hashCode(); + } + hash = (37 * hash) + VERIFIED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getVerified()); + hash = (37 * hash) + SUSERID_FIELD_NUMBER; + hash = (53 * hash) + getSUserId().hashCode(); + if (getHttpsHeadUrlsCount() > 0) { + hash = (37 * hash) + HTTPSHEADURLS_FIELD_NUMBER; + hash = (53 * hash) + getHttpsHeadUrlsList().hashCode(); + } + hash = (37 * hash) + KWAIID_FIELD_NUMBER; + hash = (53 * hash) + getKwaiId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code UserInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:UserInfo) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.internal_static_UserInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.internal_static_UserInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + userId_ = 0L; + userName_ = ""; + userGender_ = ""; + userText_ = ""; + if (headUrlsBuilder_ == null) { + headUrls_ = java.util.Collections.emptyList(); + } else { + headUrls_ = null; + headUrlsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + verified_ = false; + sUserId_ = ""; + if (httpsHeadUrlsBuilder_ == null) { + httpsHeadUrls_ = java.util.Collections.emptyList(); + } else { + httpsHeadUrls_ = null; + httpsHeadUrlsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + kwaiId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.internal_static_UserInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo result) { + if (headUrlsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + headUrls_ = java.util.Collections.unmodifiableList(headUrls_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.headUrls_ = headUrls_; + } else { + result.headUrls_ = headUrlsBuilder_.build(); + } + if (httpsHeadUrlsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + httpsHeadUrls_ = java.util.Collections.unmodifiableList(httpsHeadUrls_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.httpsHeadUrls_ = httpsHeadUrls_; + } else { + result.httpsHeadUrls_ = httpsHeadUrlsBuilder_.build(); + } + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.userId_ = userId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.userName_ = userName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.userGender_ = userGender_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.userText_ = userText_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.verified_ = verified_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.sUserId_ = sUserId_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.kwaiId_ = kwaiId_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo.getDefaultInstance()) return this; + if (other.getUserId() != 0L) { + setUserId(other.getUserId()); + } + if (!other.getUserName().isEmpty()) { + userName_ = other.userName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getUserGender().isEmpty()) { + userGender_ = other.userGender_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getUserText().isEmpty()) { + userText_ = other.userText_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (headUrlsBuilder_ == null) { + if (!other.headUrls_.isEmpty()) { + if (headUrls_.isEmpty()) { + headUrls_ = other.headUrls_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureHeadUrlsIsMutable(); + headUrls_.addAll(other.headUrls_); + } + onChanged(); + } + } else { + if (!other.headUrls_.isEmpty()) { + if (headUrlsBuilder_.isEmpty()) { + headUrlsBuilder_.dispose(); + headUrlsBuilder_ = null; + headUrls_ = other.headUrls_; + bitField0_ = (bitField0_ & ~0x00000010); + headUrlsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getHeadUrlsFieldBuilder() : null; + } else { + headUrlsBuilder_.addAllMessages(other.headUrls_); + } + } + } + if (other.getVerified() != false) { + setVerified(other.getVerified()); + } + if (!other.getSUserId().isEmpty()) { + sUserId_ = other.sUserId_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (httpsHeadUrlsBuilder_ == null) { + if (!other.httpsHeadUrls_.isEmpty()) { + if (httpsHeadUrls_.isEmpty()) { + httpsHeadUrls_ = other.httpsHeadUrls_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.addAll(other.httpsHeadUrls_); + } + onChanged(); + } + } else { + if (!other.httpsHeadUrls_.isEmpty()) { + if (httpsHeadUrlsBuilder_.isEmpty()) { + httpsHeadUrlsBuilder_.dispose(); + httpsHeadUrlsBuilder_ = null; + httpsHeadUrls_ = other.httpsHeadUrls_; + bitField0_ = (bitField0_ & ~0x00000080); + httpsHeadUrlsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getHttpsHeadUrlsFieldBuilder() : null; + } else { + httpsHeadUrlsBuilder_.addAllMessages(other.httpsHeadUrls_); + } + } + } + if (!other.getKwaiId().isEmpty()) { + kwaiId_ = other.kwaiId_; + bitField0_ |= 0x00000100; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + userId_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + userName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + userGender_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + userText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl m = + input.readMessage( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.parser(), + extensionRegistry); + if (headUrlsBuilder_ == null) { + ensureHeadUrlsIsMutable(); + headUrls_.add(m); + } else { + headUrlsBuilder_.addMessage(m); + } + break; + } // case 42 + case 48: { + verified_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + sUserId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl m = + input.readMessage( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.parser(), + extensionRegistry); + if (httpsHeadUrlsBuilder_ == null) { + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.add(m); + } else { + httpsHeadUrlsBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: { + kwaiId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long userId_ ; + /** + * <code>uint64 userId = 1;</code> + * @return The userId. + */ + @java.lang.Override + public long getUserId() { + return userId_; + } + /** + * <code>uint64 userId = 1;</code> + * @param value The userId to set. + * @return This builder for chaining. + */ + public Builder setUserId(long value) { + + userId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>uint64 userId = 1;</code> + * @return This builder for chaining. + */ + public Builder clearUserId() { + bitField0_ = (bitField0_ & ~0x00000001); + userId_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object userName_ = ""; + /** + * <code>string userName = 2;</code> + * @return The userName. + */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string userName = 2;</code> + * @return The bytes for userName. + */ + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string userName = 2;</code> + * @param value The userName to set. + * @return This builder for chaining. + */ + public Builder setUserName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string userName = 2;</code> + * @return This builder for chaining. + */ + public Builder clearUserName() { + userName_ = getDefaultInstance().getUserName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string userName = 2;</code> + * @param value The bytes for userName to set. + * @return This builder for chaining. + */ + public Builder setUserNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object userGender_ = ""; + /** + * <code>string userGender = 3;</code> + * @return The userGender. + */ + public java.lang.String getUserGender() { + java.lang.Object ref = userGender_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userGender_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string userGender = 3;</code> + * @return The bytes for userGender. + */ + public com.google.protobuf.ByteString + getUserGenderBytes() { + java.lang.Object ref = userGender_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userGender_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string userGender = 3;</code> + * @param value The userGender to set. + * @return This builder for chaining. + */ + public Builder setUserGender( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userGender_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>string userGender = 3;</code> + * @return This builder for chaining. + */ + public Builder clearUserGender() { + userGender_ = getDefaultInstance().getUserGender(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * <code>string userGender = 3;</code> + * @param value The bytes for userGender to set. + * @return This builder for chaining. + */ + public Builder setUserGenderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userGender_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object userText_ = ""; + /** + * <code>string userText = 4;</code> + * @return The userText. + */ + public java.lang.String getUserText() { + java.lang.Object ref = userText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string userText = 4;</code> + * @return The bytes for userText. + */ + public com.google.protobuf.ByteString + getUserTextBytes() { + java.lang.Object ref = userText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string userText = 4;</code> + * @param value The userText to set. + * @return This builder for chaining. + */ + public Builder setUserText( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + userText_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>string userText = 4;</code> + * @return This builder for chaining. + */ + public Builder clearUserText() { + userText_ = getDefaultInstance().getUserText(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * <code>string userText = 4;</code> + * @param value The bytes for userText to set. + * @return This builder for chaining. + */ + public Builder setUserTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + userText_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> headUrls_ = + java.util.Collections.emptyList(); + private void ensureHeadUrlsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + headUrls_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl>(headUrls_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> headUrlsBuilder_; + + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> getHeadUrlsList() { + if (headUrlsBuilder_ == null) { + return java.util.Collections.unmodifiableList(headUrls_); + } else { + return headUrlsBuilder_.getMessageList(); + } + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public int getHeadUrlsCount() { + if (headUrlsBuilder_ == null) { + return headUrls_.size(); + } else { + return headUrlsBuilder_.getCount(); + } + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl getHeadUrls(int index) { + if (headUrlsBuilder_ == null) { + return headUrls_.get(index); + } else { + return headUrlsBuilder_.getMessage(index); + } + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public Builder setHeadUrls( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (headUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadUrlsIsMutable(); + headUrls_.set(index, value); + onChanged(); + } else { + headUrlsBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public Builder setHeadUrls( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (headUrlsBuilder_ == null) { + ensureHeadUrlsIsMutable(); + headUrls_.set(index, builderForValue.build()); + onChanged(); + } else { + headUrlsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public Builder addHeadUrls(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (headUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadUrlsIsMutable(); + headUrls_.add(value); + onChanged(); + } else { + headUrlsBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public Builder addHeadUrls( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (headUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHeadUrlsIsMutable(); + headUrls_.add(index, value); + onChanged(); + } else { + headUrlsBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public Builder addHeadUrls( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (headUrlsBuilder_ == null) { + ensureHeadUrlsIsMutable(); + headUrls_.add(builderForValue.build()); + onChanged(); + } else { + headUrlsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public Builder addHeadUrls( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (headUrlsBuilder_ == null) { + ensureHeadUrlsIsMutable(); + headUrls_.add(index, builderForValue.build()); + onChanged(); + } else { + headUrlsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public Builder addAllHeadUrls( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> values) { + if (headUrlsBuilder_ == null) { + ensureHeadUrlsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, headUrls_); + onChanged(); + } else { + headUrlsBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public Builder clearHeadUrls() { + if (headUrlsBuilder_ == null) { + headUrls_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + headUrlsBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public Builder removeHeadUrls(int index) { + if (headUrlsBuilder_ == null) { + ensureHeadUrlsIsMutable(); + headUrls_.remove(index); + onChanged(); + } else { + headUrlsBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder getHeadUrlsBuilder( + int index) { + return getHeadUrlsFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getHeadUrlsOrBuilder( + int index) { + if (headUrlsBuilder_ == null) { + return headUrls_.get(index); } else { + return headUrlsBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> + getHeadUrlsOrBuilderList() { + if (headUrlsBuilder_ != null) { + return headUrlsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(headUrls_); + } + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder addHeadUrlsBuilder() { + return getHeadUrlsFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.getDefaultInstance()); + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder addHeadUrlsBuilder( + int index) { + return getHeadUrlsFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.getDefaultInstance()); + } + /** + * <code>repeated .PicUrl headUrls = 5;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder> + getHeadUrlsBuilderList() { + return getHeadUrlsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> + getHeadUrlsFieldBuilder() { + if (headUrlsBuilder_ == null) { + headUrlsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder>( + headUrls_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + headUrls_ = null; + } + return headUrlsBuilder_; + } + + private boolean verified_ ; + /** + * <code>bool verified = 6;</code> + * @return The verified. + */ + @java.lang.Override + public boolean getVerified() { + return verified_; + } + /** + * <code>bool verified = 6;</code> + * @param value The verified to set. + * @return This builder for chaining. + */ + public Builder setVerified(boolean value) { + + verified_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>bool verified = 6;</code> + * @return This builder for chaining. + */ + public Builder clearVerified() { + bitField0_ = (bitField0_ & ~0x00000020); + verified_ = false; + onChanged(); + return this; + } + + private java.lang.Object sUserId_ = ""; + /** + * <code>string sUserId = 7;</code> + * @return The sUserId. + */ + public java.lang.String getSUserId() { + java.lang.Object ref = sUserId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sUserId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string sUserId = 7;</code> + * @return The bytes for sUserId. + */ + public com.google.protobuf.ByteString + getSUserIdBytes() { + java.lang.Object ref = sUserId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sUserId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string sUserId = 7;</code> + * @param value The sUserId to set. + * @return This builder for chaining. + */ + public Builder setSUserId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + sUserId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>string sUserId = 7;</code> + * @return This builder for chaining. + */ + public Builder clearSUserId() { + sUserId_ = getDefaultInstance().getSUserId(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * <code>string sUserId = 7;</code> + * @param value The bytes for sUserId to set. + * @return This builder for chaining. + */ + public Builder setSUserIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + sUserId_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> httpsHeadUrls_ = + java.util.Collections.emptyList(); + private void ensureHttpsHeadUrlsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + httpsHeadUrls_ = new java.util.ArrayList<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl>(httpsHeadUrls_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> httpsHeadUrlsBuilder_; + + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> getHttpsHeadUrlsList() { + if (httpsHeadUrlsBuilder_ == null) { + return java.util.Collections.unmodifiableList(httpsHeadUrls_); + } else { + return httpsHeadUrlsBuilder_.getMessageList(); + } + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public int getHttpsHeadUrlsCount() { + if (httpsHeadUrlsBuilder_ == null) { + return httpsHeadUrls_.size(); + } else { + return httpsHeadUrlsBuilder_.getCount(); + } + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl getHttpsHeadUrls(int index) { + if (httpsHeadUrlsBuilder_ == null) { + return httpsHeadUrls_.get(index); + } else { + return httpsHeadUrlsBuilder_.getMessage(index); + } + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public Builder setHttpsHeadUrls( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (httpsHeadUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.set(index, value); + onChanged(); + } else { + httpsHeadUrlsBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public Builder setHttpsHeadUrls( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (httpsHeadUrlsBuilder_ == null) { + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.set(index, builderForValue.build()); + onChanged(); + } else { + httpsHeadUrlsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public Builder addHttpsHeadUrls(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (httpsHeadUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.add(value); + onChanged(); + } else { + httpsHeadUrlsBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public Builder addHttpsHeadUrls( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl value) { + if (httpsHeadUrlsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.add(index, value); + onChanged(); + } else { + httpsHeadUrlsBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public Builder addHttpsHeadUrls( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (httpsHeadUrlsBuilder_ == null) { + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.add(builderForValue.build()); + onChanged(); + } else { + httpsHeadUrlsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public Builder addHttpsHeadUrls( + int index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder builderForValue) { + if (httpsHeadUrlsBuilder_ == null) { + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.add(index, builderForValue.build()); + onChanged(); + } else { + httpsHeadUrlsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public Builder addAllHttpsHeadUrls( + java.lang.Iterable<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl> values) { + if (httpsHeadUrlsBuilder_ == null) { + ensureHttpsHeadUrlsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, httpsHeadUrls_); + onChanged(); + } else { + httpsHeadUrlsBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public Builder clearHttpsHeadUrls() { + if (httpsHeadUrlsBuilder_ == null) { + httpsHeadUrls_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + httpsHeadUrlsBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public Builder removeHttpsHeadUrls(int index) { + if (httpsHeadUrlsBuilder_ == null) { + ensureHttpsHeadUrlsIsMutable(); + httpsHeadUrls_.remove(index); + onChanged(); + } else { + httpsHeadUrlsBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder getHttpsHeadUrlsBuilder( + int index) { + return getHttpsHeadUrlsFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder getHttpsHeadUrlsOrBuilder( + int index) { + if (httpsHeadUrlsBuilder_ == null) { + return httpsHeadUrls_.get(index); } else { + return httpsHeadUrlsBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public java.util.List<? extends tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> + getHttpsHeadUrlsOrBuilderList() { + if (httpsHeadUrlsBuilder_ != null) { + return httpsHeadUrlsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(httpsHeadUrls_); + } + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder addHttpsHeadUrlsBuilder() { + return getHttpsHeadUrlsFieldBuilder().addBuilder( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.getDefaultInstance()); + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder addHttpsHeadUrlsBuilder( + int index) { + return getHttpsHeadUrlsFieldBuilder().addBuilder( + index, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.getDefaultInstance()); + } + /** + * <code>repeated .PicUrl httpsHeadUrls = 8;</code> + */ + public java.util.List<tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder> + getHttpsHeadUrlsBuilderList() { + return getHttpsHeadUrlsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder> + getHttpsHeadUrlsFieldBuilder() { + if (httpsHeadUrlsBuilder_ == null) { + httpsHeadUrlsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrl.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.PicUrlOrBuilder>( + httpsHeadUrls_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + httpsHeadUrls_ = null; + } + return httpsHeadUrlsBuilder_; + } + + private java.lang.Object kwaiId_ = ""; + /** + * <code>string kwaiId = 9;</code> + * @return The kwaiId. + */ + public java.lang.String getKwaiId() { + java.lang.Object ref = kwaiId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + kwaiId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string kwaiId = 9;</code> + * @return The bytes for kwaiId. + */ + public com.google.protobuf.ByteString + getKwaiIdBytes() { + java.lang.Object ref = kwaiId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + kwaiId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string kwaiId = 9;</code> + * @param value The kwaiId to set. + * @return This builder for chaining. + */ + public Builder setKwaiId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + kwaiId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>string kwaiId = 9;</code> + * @return This builder for chaining. + */ + public Builder clearKwaiId() { + kwaiId_ = getDefaultInstance().getKwaiId(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * <code>string kwaiId = 9;</code> + * @param value The bytes for kwaiId to set. + * @return This builder for chaining. + */ + public Builder setKwaiIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + kwaiId_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:UserInfo) + } + + // @@protoc_insertion_point(class_scope:UserInfo) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<UserInfo> + PARSER = new com.google.protobuf.AbstractParser<UserInfo>() { + @java.lang.Override + public UserInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<UserInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<UserInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.UserInfoOuterClass.UserInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_UserInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_UserInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\016UserInfo.proto\032\014PicUrl.proto\"\300\001\n\010UserI" + + "nfo\022\016\n\006userId\030\001 \001(\004\022\020\n\010userName\030\002 \001(\t\022\022\n" + + "\nuserGender\030\003 \001(\t\022\020\n\010userText\030\004 \001(\t\022\031\n\010h" + + "eadUrls\030\005 \003(\0132\007.PicUrl\022\020\n\010verified\030\006 \001(\010" + + "\022\017\n\007sUserId\030\007 \001(\t\022\036\n\rhttpsHeadUrls\030\010 \003(\013" + + "2\007.PicUrl\022\016\n\006kwaiId\030\t \001(\tB6\n4tech.ordina" + + "ryroad.live.chat.client.kuaishou.protobu" + + "fb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.getDescriptor(), + }); + internal_static_UserInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_UserInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_UserInfo_descriptor, + new java.lang.String[] { "UserId", "UserName", "UserGender", "UserText", "HeadUrls", "Verified", "SUserId", "HttpsHeadUrls", "KwaiId", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PicUrlOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebComboCommentFeedOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebComboCommentFeedOuterClass.java new file mode 100644 index 0000000..49a905a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebComboCommentFeedOuterClass.java @@ -0,0 +1,846 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebComboCommentFeed.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class WebComboCommentFeedOuterClass { + private WebComboCommentFeedOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface WebComboCommentFeedOrBuilder extends + // @@protoc_insertion_point(interface_extends:WebComboCommentFeed) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string id = 1;</code> + * @return The id. + */ + java.lang.String getId(); + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * <code>string content = 2;</code> + * @return The content. + */ + java.lang.String getContent(); + /** + * <code>string content = 2;</code> + * @return The bytes for content. + */ + com.google.protobuf.ByteString + getContentBytes(); + + /** + * <code>uint32 comboCount = 3;</code> + * @return The comboCount. + */ + int getComboCount(); + } + /** + * Protobuf type {@code WebComboCommentFeed} + */ + public static final class WebComboCommentFeed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:WebComboCommentFeed) + WebComboCommentFeedOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebComboCommentFeed.newBuilder() to construct. + private WebComboCommentFeed(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private WebComboCommentFeed() { + id_ = ""; + content_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebComboCommentFeed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.internal_static_WebComboCommentFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.internal_static_WebComboCommentFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * <code>string id = 1;</code> + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * <code>string content = 2;</code> + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + /** + * <code>string content = 2;</code> + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMBOCOUNT_FIELD_NUMBER = 3; + private int comboCount_ = 0; + /** + * <code>uint32 comboCount = 3;</code> + * @return The comboCount. + */ + @java.lang.Override + public int getComboCount() { + return comboCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); + } + if (comboCount_ != 0) { + output.writeUInt32(3, comboCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); + } + if (comboCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(3, comboCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getContent() + .equals(other.getContent())) return false; + if (getComboCount() + != other.getComboCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + COMBOCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getComboCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code WebComboCommentFeed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:WebComboCommentFeed) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.internal_static_WebComboCommentFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.internal_static_WebComboCommentFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + content_ = ""; + comboCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.internal_static_WebComboCommentFeed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.content_ = content_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.comboCount_ = comboCount_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getComboCount() != 0) { + setComboCount(other.getComboCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + comboCount_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * <code>string id = 1;</code> + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string id = 1;</code> + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string id = 1;</code> + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string id = 1;</code> + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + /** + * <code>string content = 2;</code> + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string content = 2;</code> + * @return The bytes for content. + */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string content = 2;</code> + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>string content = 2;</code> + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * <code>string content = 2;</code> + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int comboCount_ ; + /** + * <code>uint32 comboCount = 3;</code> + * @return The comboCount. + */ + @java.lang.Override + public int getComboCount() { + return comboCount_; + } + /** + * <code>uint32 comboCount = 3;</code> + * @param value The comboCount to set. + * @return This builder for chaining. + */ + public Builder setComboCount(int value) { + + comboCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint32 comboCount = 3;</code> + * @return This builder for chaining. + */ + public Builder clearComboCount() { + bitField0_ = (bitField0_ & ~0x00000004); + comboCount_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:WebComboCommentFeed) + } + + // @@protoc_insertion_point(class_scope:WebComboCommentFeed) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<WebComboCommentFeed> + PARSER = new com.google.protobuf.AbstractParser<WebComboCommentFeed>() { + @java.lang.Override + public WebComboCommentFeed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<WebComboCommentFeed> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<WebComboCommentFeed> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebComboCommentFeedOuterClass.WebComboCommentFeed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WebComboCommentFeed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_WebComboCommentFeed_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031WebComboCommentFeed.proto\"F\n\023WebComboC" + + "ommentFeed\022\n\n\002id\030\001 \001(\t\022\017\n\007content\030\002 \001(\t\022" + + "\022\n\ncomboCount\030\003 \001(\rB6\n4tech.ordinaryroad" + + ".live.chat.client.kuaishou.protobufb\006pro" + + "to3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_WebComboCommentFeed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_WebComboCommentFeed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_WebComboCommentFeed_descriptor, + new java.lang.String[] { "Id", "Content", "ComboCount", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebCommentFeedOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebCommentFeedOuterClass.java new file mode 100644 index 0000000..efa9870 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebCommentFeedOuterClass.java @@ -0,0 +1,1651 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebCommentFeed.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class WebCommentFeedOuterClass { + private WebCommentFeedOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface WebCommentFeedOrBuilder extends + // @@protoc_insertion_point(interface_extends:WebCommentFeed) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string id = 1;</code> + * @return The id. + */ + java.lang.String getId(); + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return The user. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser(); + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder(); + + /** + * <code>string content = 3;</code> + * @return The content. + */ + java.lang.String getContent(); + /** + * <code>string content = 3;</code> + * @return The bytes for content. + */ + com.google.protobuf.ByteString + getContentBytes(); + + /** + * <code>string deviceHash = 4;</code> + * @return The deviceHash. + */ + java.lang.String getDeviceHash(); + /** + * <code>string deviceHash = 4;</code> + * @return The bytes for deviceHash. + */ + com.google.protobuf.ByteString + getDeviceHashBytes(); + + /** + * <code>uint64 sortRank = 5;</code> + * @return The sortRank. + */ + long getSortRank(); + + /** + * <code>string color = 6;</code> + * @return The color. + */ + java.lang.String getColor(); + /** + * <code>string color = 6;</code> + * @return The bytes for color. + */ + com.google.protobuf.ByteString + getColorBytes(); + + /** + * <code>.WebCommentFeedShowType showType = 7;</code> + * @return The enum numeric value on the wire for showType. + */ + int getShowTypeValue(); + /** + * <code>.WebCommentFeedShowType showType = 7;</code> + * @return The showType. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType getShowType(); + + /** + * <code>.LiveAudienceState senderState = 8;</code> + * @return Whether the senderState field is set. + */ + boolean hasSenderState(); + /** + * <code>.LiveAudienceState senderState = 8;</code> + * @return The senderState. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getSenderState(); + /** + * <code>.LiveAudienceState senderState = 8;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder getSenderStateOrBuilder(); + } + /** + * Protobuf type {@code WebCommentFeed} + */ + public static final class WebCommentFeed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:WebCommentFeed) + WebCommentFeedOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebCommentFeed.newBuilder() to construct. + private WebCommentFeed(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private WebCommentFeed() { + id_ = ""; + content_ = ""; + deviceHash_ = ""; + color_ = ""; + showType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebCommentFeed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.internal_static_WebCommentFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.internal_static_WebCommentFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * <code>string id = 1;</code> + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return user_ != null; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + + public static final int CONTENT_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * <code>string content = 3;</code> + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + /** + * <code>string content = 3;</code> + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DEVICEHASH_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object deviceHash_ = ""; + /** + * <code>string deviceHash = 4;</code> + * @return The deviceHash. + */ + @java.lang.Override + public java.lang.String getDeviceHash() { + java.lang.Object ref = deviceHash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceHash_ = s; + return s; + } + } + /** + * <code>string deviceHash = 4;</code> + * @return The bytes for deviceHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDeviceHashBytes() { + java.lang.Object ref = deviceHash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SORTRANK_FIELD_NUMBER = 5; + private long sortRank_ = 0L; + /** + * <code>uint64 sortRank = 5;</code> + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + + public static final int COLOR_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object color_ = ""; + /** + * <code>string color = 6;</code> + * @return The color. + */ + @java.lang.Override + public java.lang.String getColor() { + java.lang.Object ref = color_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + color_ = s; + return s; + } + } + /** + * <code>string color = 6;</code> + * @return The bytes for color. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getColorBytes() { + java.lang.Object ref = color_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + color_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHOWTYPE_FIELD_NUMBER = 7; + private int showType_ = 0; + /** + * <code>.WebCommentFeedShowType showType = 7;</code> + * @return The enum numeric value on the wire for showType. + */ + @java.lang.Override public int getShowTypeValue() { + return showType_; + } + /** + * <code>.WebCommentFeedShowType showType = 7;</code> + * @return The showType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType getShowType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType.forNumber(showType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType.UNRECOGNIZED : result; + } + + public static final int SENDERSTATE_FIELD_NUMBER = 8; + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState senderState_; + /** + * <code>.LiveAudienceState senderState = 8;</code> + * @return Whether the senderState field is set. + */ + @java.lang.Override + public boolean hasSenderState() { + return senderState_ != null; + } + /** + * <code>.LiveAudienceState senderState = 8;</code> + * @return The senderState. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getSenderState() { + return senderState_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance() : senderState_; + } + /** + * <code>.LiveAudienceState senderState = 8;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder getSenderStateOrBuilder() { + return senderState_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance() : senderState_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (user_ != null) { + output.writeMessage(2, getUser()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, content_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceHash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, deviceHash_); + } + if (sortRank_ != 0L) { + output.writeUInt64(5, sortRank_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(color_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, color_); + } + if (showType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType.FEED_SHOW_UNKNOWN.getNumber()) { + output.writeEnum(7, showType_); + } + if (senderState_ != null) { + output.writeMessage(8, getSenderState()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (user_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, content_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceHash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, deviceHash_); + } + if (sortRank_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(5, sortRank_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(color_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, color_); + } + if (showType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType.FEED_SHOW_UNKNOWN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, showType_); + } + if (senderState_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getSenderState()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (!getContent() + .equals(other.getContent())) return false; + if (!getDeviceHash() + .equals(other.getDeviceHash())) return false; + if (getSortRank() + != other.getSortRank()) return false; + if (!getColor() + .equals(other.getColor())) return false; + if (showType_ != other.showType_) return false; + if (hasSenderState() != other.hasSenderState()) return false; + if (hasSenderState()) { + if (!getSenderState() + .equals(other.getSenderState())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + DEVICEHASH_FIELD_NUMBER; + hash = (53 * hash) + getDeviceHash().hashCode(); + hash = (37 * hash) + SORTRANK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSortRank()); + hash = (37 * hash) + COLOR_FIELD_NUMBER; + hash = (53 * hash) + getColor().hashCode(); + hash = (37 * hash) + SHOWTYPE_FIELD_NUMBER; + hash = (53 * hash) + showType_; + if (hasSenderState()) { + hash = (37 * hash) + SENDERSTATE_FIELD_NUMBER; + hash = (53 * hash) + getSenderState().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code WebCommentFeed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:WebCommentFeed) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.internal_static_WebCommentFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.internal_static_WebCommentFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + content_ = ""; + deviceHash_ = ""; + sortRank_ = 0L; + color_ = ""; + showType_ = 0; + senderState_ = null; + if (senderStateBuilder_ != null) { + senderStateBuilder_.dispose(); + senderStateBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.internal_static_WebCommentFeed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.content_ = content_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.deviceHash_ = deviceHash_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.sortRank_ = sortRank_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.color_ = color_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.showType_ = showType_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.senderState_ = senderStateBuilder_ == null + ? senderState_ + : senderStateBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getDeviceHash().isEmpty()) { + deviceHash_ = other.deviceHash_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getSortRank() != 0L) { + setSortRank(other.getSortRank()); + } + if (!other.getColor().isEmpty()) { + color_ = other.color_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.showType_ != 0) { + setShowTypeValue(other.getShowTypeValue()); + } + if (other.hasSenderState()) { + mergeSenderState(other.getSenderState()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + deviceHash_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + sortRank_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + color_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + showType_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: { + input.readMessage( + getSenderStateFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * <code>string id = 1;</code> + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string id = 1;</code> + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string id = 1;</code> + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string id = 1;</code> + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> userBuilder_; + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private java.lang.Object content_ = ""; + /** + * <code>string content = 3;</code> + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string content = 3;</code> + * @return The bytes for content. + */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string content = 3;</code> + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>string content = 3;</code> + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * <code>string content = 3;</code> + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object deviceHash_ = ""; + /** + * <code>string deviceHash = 4;</code> + * @return The deviceHash. + */ + public java.lang.String getDeviceHash() { + java.lang.Object ref = deviceHash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceHash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string deviceHash = 4;</code> + * @return The bytes for deviceHash. + */ + public com.google.protobuf.ByteString + getDeviceHashBytes() { + java.lang.Object ref = deviceHash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string deviceHash = 4;</code> + * @param value The deviceHash to set. + * @return This builder for chaining. + */ + public Builder setDeviceHash( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + deviceHash_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>string deviceHash = 4;</code> + * @return This builder for chaining. + */ + public Builder clearDeviceHash() { + deviceHash_ = getDefaultInstance().getDeviceHash(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * <code>string deviceHash = 4;</code> + * @param value The bytes for deviceHash to set. + * @return This builder for chaining. + */ + public Builder setDeviceHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + deviceHash_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private long sortRank_ ; + /** + * <code>uint64 sortRank = 5;</code> + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + /** + * <code>uint64 sortRank = 5;</code> + * @param value The sortRank to set. + * @return This builder for chaining. + */ + public Builder setSortRank(long value) { + + sortRank_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>uint64 sortRank = 5;</code> + * @return This builder for chaining. + */ + public Builder clearSortRank() { + bitField0_ = (bitField0_ & ~0x00000010); + sortRank_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object color_ = ""; + /** + * <code>string color = 6;</code> + * @return The color. + */ + public java.lang.String getColor() { + java.lang.Object ref = color_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + color_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string color = 6;</code> + * @return The bytes for color. + */ + public com.google.protobuf.ByteString + getColorBytes() { + java.lang.Object ref = color_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + color_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string color = 6;</code> + * @param value The color to set. + * @return This builder for chaining. + */ + public Builder setColor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + color_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>string color = 6;</code> + * @return This builder for chaining. + */ + public Builder clearColor() { + color_ = getDefaultInstance().getColor(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * <code>string color = 6;</code> + * @param value The bytes for color to set. + * @return This builder for chaining. + */ + public Builder setColorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + color_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int showType_ = 0; + /** + * <code>.WebCommentFeedShowType showType = 7;</code> + * @return The enum numeric value on the wire for showType. + */ + @java.lang.Override public int getShowTypeValue() { + return showType_; + } + /** + * <code>.WebCommentFeedShowType showType = 7;</code> + * @param value The enum numeric value on the wire for showType to set. + * @return This builder for chaining. + */ + public Builder setShowTypeValue(int value) { + showType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.WebCommentFeedShowType showType = 7;</code> + * @return The showType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType getShowType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType.forNumber(showType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType.UNRECOGNIZED : result; + } + /** + * <code>.WebCommentFeedShowType showType = 7;</code> + * @param value The showType to set. + * @return This builder for chaining. + */ + public Builder setShowType(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.WebCommentFeedShowType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + showType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * <code>.WebCommentFeedShowType showType = 7;</code> + * @return This builder for chaining. + */ + public Builder clearShowType() { + bitField0_ = (bitField0_ & ~0x00000040); + showType_ = 0; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState senderState_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder> senderStateBuilder_; + /** + * <code>.LiveAudienceState senderState = 8;</code> + * @return Whether the senderState field is set. + */ + public boolean hasSenderState() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * <code>.LiveAudienceState senderState = 8;</code> + * @return The senderState. + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState getSenderState() { + if (senderStateBuilder_ == null) { + return senderState_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance() : senderState_; + } else { + return senderStateBuilder_.getMessage(); + } + } + /** + * <code>.LiveAudienceState senderState = 8;</code> + */ + public Builder setSenderState(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState value) { + if (senderStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + senderState_ = value; + } else { + senderStateBuilder_.setMessage(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>.LiveAudienceState senderState = 8;</code> + */ + public Builder setSenderState( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder builderForValue) { + if (senderStateBuilder_ == null) { + senderState_ = builderForValue.build(); + } else { + senderStateBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>.LiveAudienceState senderState = 8;</code> + */ + public Builder mergeSenderState(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState value) { + if (senderStateBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0) && + senderState_ != null && + senderState_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance()) { + getSenderStateBuilder().mergeFrom(value); + } else { + senderState_ = value; + } + } else { + senderStateBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>.LiveAudienceState senderState = 8;</code> + */ + public Builder clearSenderState() { + bitField0_ = (bitField0_ & ~0x00000080); + senderState_ = null; + if (senderStateBuilder_ != null) { + senderStateBuilder_.dispose(); + senderStateBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.LiveAudienceState senderState = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder getSenderStateBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getSenderStateFieldBuilder().getBuilder(); + } + /** + * <code>.LiveAudienceState senderState = 8;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder getSenderStateOrBuilder() { + if (senderStateBuilder_ != null) { + return senderStateBuilder_.getMessageOrBuilder(); + } else { + return senderState_ == null ? + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.getDefaultInstance() : senderState_; + } + } + /** + * <code>.LiveAudienceState senderState = 8;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder> + getSenderStateFieldBuilder() { + if (senderStateBuilder_ == null) { + senderStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceState.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.LiveAudienceStateOrBuilder>( + getSenderState(), + getParentForChildren(), + isClean()); + senderState_ = null; + } + return senderStateBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:WebCommentFeed) + } + + // @@protoc_insertion_point(class_scope:WebCommentFeed) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<WebCommentFeed> + PARSER = new com.google.protobuf.AbstractParser<WebCommentFeed>() { + @java.lang.Override + public WebCommentFeed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<WebCommentFeed> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<WebCommentFeed> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedOuterClass.WebCommentFeed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WebCommentFeed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_WebCommentFeed_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024WebCommentFeed.proto\032\024SimpleUserInfo.p" + + "roto\032\034WebCommentFeedShowType.proto\032\027Live" + + "AudienceState.proto\"\325\001\n\016WebCommentFeed\022\n" + + "\n\002id\030\001 \001(\t\022\035\n\004user\030\002 \001(\0132\017.SimpleUserInf" + + "o\022\017\n\007content\030\003 \001(\t\022\022\n\ndeviceHash\030\004 \001(\t\022\020" + + "\n\010sortRank\030\005 \001(\004\022\r\n\005color\030\006 \001(\t\022)\n\010showT" + + "ype\030\007 \001(\0162\027.WebCommentFeedShowType\022\'\n\013se" + + "nderState\030\010 \001(\0132\022.LiveAudienceStateB6\n4t" + + "ech.ordinaryroad.live.chat.client.kuaish" + + "ou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.getDescriptor(), + }); + internal_static_WebCommentFeed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_WebCommentFeed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_WebCommentFeed_descriptor, + new java.lang.String[] { "Id", "User", "Content", "DeviceHash", "SortRank", "Color", "ShowType", "SenderState", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.LiveAudienceStateOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebCommentFeedShowTypeOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebCommentFeedShowTypeOuterClass.java new file mode 100644 index 0000000..74cc938 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebCommentFeedShowTypeOuterClass.java @@ -0,0 +1,180 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebCommentFeedShowType.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class WebCommentFeedShowTypeOuterClass { + private WebCommentFeedShowTypeOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code WebCommentFeedShowType} + */ + public enum WebCommentFeedShowType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * <code>FEED_SHOW_UNKNOWN = 0;</code> + */ + FEED_SHOW_UNKNOWN(0), + /** + * <code>FEED_SHOW_NORMAL = 1;</code> + */ + FEED_SHOW_NORMAL(1), + /** + * <code>FEED_HIDDEN = 2;</code> + */ + FEED_HIDDEN(2), + UNRECOGNIZED(-1), + ; + + /** + * <code>FEED_SHOW_UNKNOWN = 0;</code> + */ + public static final int FEED_SHOW_UNKNOWN_VALUE = 0; + /** + * <code>FEED_SHOW_NORMAL = 1;</code> + */ + public static final int FEED_SHOW_NORMAL_VALUE = 1; + /** + * <code>FEED_HIDDEN = 2;</code> + */ + public static final int FEED_HIDDEN_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static WebCommentFeedShowType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static WebCommentFeedShowType forNumber(int value) { + switch (value) { + case 0: return FEED_SHOW_UNKNOWN; + case 1: return FEED_SHOW_NORMAL; + case 2: return FEED_HIDDEN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap<WebCommentFeedShowType> + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + WebCommentFeedShowType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap<WebCommentFeedShowType>() { + public WebCommentFeedShowType findValueByNumber(int number) { + return WebCommentFeedShowType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebCommentFeedShowTypeOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final WebCommentFeedShowType[] VALUES = values(); + + public static WebCommentFeedShowType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private WebCommentFeedShowType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:WebCommentFeedShowType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\034WebCommentFeedShowType.proto*V\n\026WebCom" + + "mentFeedShowType\022\025\n\021FEED_SHOW_UNKNOWN\020\000\022" + + "\024\n\020FEED_SHOW_NORMAL\020\001\022\017\n\013FEED_HIDDEN\020\002B6" + + "\n4tech.ordinaryroad.live.chat.client.kua" + + "ishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebGiftFeedOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebGiftFeedOuterClass.java new file mode 100644 index 0000000..4e94afd --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebGiftFeedOuterClass.java @@ -0,0 +1,2305 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebGiftFeed.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class WebGiftFeedOuterClass { + private WebGiftFeedOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface WebGiftFeedOrBuilder extends + // @@protoc_insertion_point(interface_extends:WebGiftFeed) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string id = 1;</code> + * @return The id. + */ + java.lang.String getId(); + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return The user. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser(); + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder(); + + /** + * <code>uint64 time = 3;</code> + * @return The time. + */ + long getTime(); + + /** + * <code>uint32 intGiftId = 4;</code> + * @return The intGiftId. + */ + int getIntGiftId(); + + /** + * <code>uint64 sortRank = 5;</code> + * @return The sortRank. + */ + long getSortRank(); + + /** + * <code>string mergeKey = 6;</code> + * @return The mergeKey. + */ + java.lang.String getMergeKey(); + /** + * <code>string mergeKey = 6;</code> + * @return The bytes for mergeKey. + */ + com.google.protobuf.ByteString + getMergeKeyBytes(); + + /** + * <code>uint32 batchSize = 7;</code> + * @return The batchSize. + */ + int getBatchSize(); + + /** + * <code>uint32 comboCount = 8;</code> + * @return The comboCount. + */ + int getComboCount(); + + /** + * <code>uint32 rank = 9;</code> + * @return The rank. + */ + int getRank(); + + /** + * <code>uint64 expireDuration = 10;</code> + * @return The expireDuration. + */ + long getExpireDuration(); + + /** + * <code>uint64 clientTimestamp = 11;</code> + * @return The clientTimestamp. + */ + long getClientTimestamp(); + + /** + * <code>uint64 slotDisplayDuration = 12;</code> + * @return The slotDisplayDuration. + */ + long getSlotDisplayDuration(); + + /** + * <code>uint32 starLevel = 13;</code> + * @return The starLevel. + */ + int getStarLevel(); + + /** + * <code>.WebGiftFeed.StyleType styleType = 14;</code> + * @return The enum numeric value on the wire for styleType. + */ + int getStyleTypeValue(); + /** + * <code>.WebGiftFeed.StyleType styleType = 14;</code> + * @return The styleType. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType getStyleType(); + + /** + * <code>.WebLiveAssistantType liveAssistantType = 15;</code> + * @return The enum numeric value on the wire for liveAssistantType. + */ + int getLiveAssistantTypeValue(); + /** + * <code>.WebLiveAssistantType liveAssistantType = 15;</code> + * @return The liveAssistantType. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType(); + + /** + * <code>string deviceHash = 16;</code> + * @return The deviceHash. + */ + java.lang.String getDeviceHash(); + /** + * <code>string deviceHash = 16;</code> + * @return The bytes for deviceHash. + */ + com.google.protobuf.ByteString + getDeviceHashBytes(); + + /** + * <code>bool danmakuDisplay = 17;</code> + * @return The danmakuDisplay. + */ + boolean getDanmakuDisplay(); + } + /** + * Protobuf type {@code WebGiftFeed} + */ + public static final class WebGiftFeed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:WebGiftFeed) + WebGiftFeedOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebGiftFeed.newBuilder() to construct. + private WebGiftFeed(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private WebGiftFeed() { + id_ = ""; + mergeKey_ = ""; + styleType_ = 0; + liveAssistantType_ = 0; + deviceHash_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebGiftFeed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.internal_static_WebGiftFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.internal_static_WebGiftFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder.class); + } + + /** + * Protobuf enum {@code WebGiftFeed.StyleType} + */ + public enum StyleType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * <code>UNKNOWN_STYLE = 0;</code> + */ + UNKNOWN_STYLE(0), + /** + * <code>BATCH_STAR_0 = 1;</code> + */ + BATCH_STAR_0(1), + /** + * <code>BATCH_STAR_1 = 2;</code> + */ + BATCH_STAR_1(2), + /** + * <code>BATCH_STAR_2 = 3;</code> + */ + BATCH_STAR_2(3), + /** + * <code>BATCH_STAR_3 = 4;</code> + */ + BATCH_STAR_3(4), + /** + * <code>BATCH_STAR_4 = 5;</code> + */ + BATCH_STAR_4(5), + /** + * <code>BATCH_STAR_5 = 6;</code> + */ + BATCH_STAR_5(6), + /** + * <code>BATCH_STAR_6 = 7;</code> + */ + BATCH_STAR_6(7), + UNRECOGNIZED(-1), + ; + + /** + * <code>UNKNOWN_STYLE = 0;</code> + */ + public static final int UNKNOWN_STYLE_VALUE = 0; + /** + * <code>BATCH_STAR_0 = 1;</code> + */ + public static final int BATCH_STAR_0_VALUE = 1; + /** + * <code>BATCH_STAR_1 = 2;</code> + */ + public static final int BATCH_STAR_1_VALUE = 2; + /** + * <code>BATCH_STAR_2 = 3;</code> + */ + public static final int BATCH_STAR_2_VALUE = 3; + /** + * <code>BATCH_STAR_3 = 4;</code> + */ + public static final int BATCH_STAR_3_VALUE = 4; + /** + * <code>BATCH_STAR_4 = 5;</code> + */ + public static final int BATCH_STAR_4_VALUE = 5; + /** + * <code>BATCH_STAR_5 = 6;</code> + */ + public static final int BATCH_STAR_5_VALUE = 6; + /** + * <code>BATCH_STAR_6 = 7;</code> + */ + public static final int BATCH_STAR_6_VALUE = 7; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static StyleType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static StyleType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_STYLE; + case 1: return BATCH_STAR_0; + case 2: return BATCH_STAR_1; + case 3: return BATCH_STAR_2; + case 4: return BATCH_STAR_3; + case 5: return BATCH_STAR_4; + case 6: return BATCH_STAR_5; + case 7: return BATCH_STAR_6; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap<StyleType> + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + StyleType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap<StyleType>() { + public StyleType findValueByNumber(int number) { + return StyleType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.getDescriptor().getEnumTypes().get(0); + } + + private static final StyleType[] VALUES = values(); + + public static StyleType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private StyleType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:WebGiftFeed.StyleType) + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * <code>string id = 1;</code> + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return user_ != null; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + + public static final int TIME_FIELD_NUMBER = 3; + private long time_ = 0L; + /** + * <code>uint64 time = 3;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + public static final int INTGIFTID_FIELD_NUMBER = 4; + private int intGiftId_ = 0; + /** + * <code>uint32 intGiftId = 4;</code> + * @return The intGiftId. + */ + @java.lang.Override + public int getIntGiftId() { + return intGiftId_; + } + + public static final int SORTRANK_FIELD_NUMBER = 5; + private long sortRank_ = 0L; + /** + * <code>uint64 sortRank = 5;</code> + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + + public static final int MERGEKEY_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object mergeKey_ = ""; + /** + * <code>string mergeKey = 6;</code> + * @return The mergeKey. + */ + @java.lang.Override + public java.lang.String getMergeKey() { + java.lang.Object ref = mergeKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mergeKey_ = s; + return s; + } + } + /** + * <code>string mergeKey = 6;</code> + * @return The bytes for mergeKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMergeKeyBytes() { + java.lang.Object ref = mergeKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mergeKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BATCHSIZE_FIELD_NUMBER = 7; + private int batchSize_ = 0; + /** + * <code>uint32 batchSize = 7;</code> + * @return The batchSize. + */ + @java.lang.Override + public int getBatchSize() { + return batchSize_; + } + + public static final int COMBOCOUNT_FIELD_NUMBER = 8; + private int comboCount_ = 0; + /** + * <code>uint32 comboCount = 8;</code> + * @return The comboCount. + */ + @java.lang.Override + public int getComboCount() { + return comboCount_; + } + + public static final int RANK_FIELD_NUMBER = 9; + private int rank_ = 0; + /** + * <code>uint32 rank = 9;</code> + * @return The rank. + */ + @java.lang.Override + public int getRank() { + return rank_; + } + + public static final int EXPIREDURATION_FIELD_NUMBER = 10; + private long expireDuration_ = 0L; + /** + * <code>uint64 expireDuration = 10;</code> + * @return The expireDuration. + */ + @java.lang.Override + public long getExpireDuration() { + return expireDuration_; + } + + public static final int CLIENTTIMESTAMP_FIELD_NUMBER = 11; + private long clientTimestamp_ = 0L; + /** + * <code>uint64 clientTimestamp = 11;</code> + * @return The clientTimestamp. + */ + @java.lang.Override + public long getClientTimestamp() { + return clientTimestamp_; + } + + public static final int SLOTDISPLAYDURATION_FIELD_NUMBER = 12; + private long slotDisplayDuration_ = 0L; + /** + * <code>uint64 slotDisplayDuration = 12;</code> + * @return The slotDisplayDuration. + */ + @java.lang.Override + public long getSlotDisplayDuration() { + return slotDisplayDuration_; + } + + public static final int STARLEVEL_FIELD_NUMBER = 13; + private int starLevel_ = 0; + /** + * <code>uint32 starLevel = 13;</code> + * @return The starLevel. + */ + @java.lang.Override + public int getStarLevel() { + return starLevel_; + } + + public static final int STYLETYPE_FIELD_NUMBER = 14; + private int styleType_ = 0; + /** + * <code>.WebGiftFeed.StyleType styleType = 14;</code> + * @return The enum numeric value on the wire for styleType. + */ + @java.lang.Override public int getStyleTypeValue() { + return styleType_; + } + /** + * <code>.WebGiftFeed.StyleType styleType = 14;</code> + * @return The styleType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType getStyleType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType.forNumber(styleType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType.UNRECOGNIZED : result; + } + + public static final int LIVEASSISTANTTYPE_FIELD_NUMBER = 15; + private int liveAssistantType_ = 0; + /** + * <code>.WebLiveAssistantType liveAssistantType = 15;</code> + * @return The enum numeric value on the wire for liveAssistantType. + */ + @java.lang.Override public int getLiveAssistantTypeValue() { + return liveAssistantType_; + } + /** + * <code>.WebLiveAssistantType liveAssistantType = 15;</code> + * @return The liveAssistantType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.forNumber(liveAssistantType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNRECOGNIZED : result; + } + + public static final int DEVICEHASH_FIELD_NUMBER = 16; + @SuppressWarnings("serial") + private volatile java.lang.Object deviceHash_ = ""; + /** + * <code>string deviceHash = 16;</code> + * @return The deviceHash. + */ + @java.lang.Override + public java.lang.String getDeviceHash() { + java.lang.Object ref = deviceHash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceHash_ = s; + return s; + } + } + /** + * <code>string deviceHash = 16;</code> + * @return The bytes for deviceHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDeviceHashBytes() { + java.lang.Object ref = deviceHash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DANMAKUDISPLAY_FIELD_NUMBER = 17; + private boolean danmakuDisplay_ = false; + /** + * <code>bool danmakuDisplay = 17;</code> + * @return The danmakuDisplay. + */ + @java.lang.Override + public boolean getDanmakuDisplay() { + return danmakuDisplay_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (user_ != null) { + output.writeMessage(2, getUser()); + } + if (time_ != 0L) { + output.writeUInt64(3, time_); + } + if (intGiftId_ != 0) { + output.writeUInt32(4, intGiftId_); + } + if (sortRank_ != 0L) { + output.writeUInt64(5, sortRank_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mergeKey_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, mergeKey_); + } + if (batchSize_ != 0) { + output.writeUInt32(7, batchSize_); + } + if (comboCount_ != 0) { + output.writeUInt32(8, comboCount_); + } + if (rank_ != 0) { + output.writeUInt32(9, rank_); + } + if (expireDuration_ != 0L) { + output.writeUInt64(10, expireDuration_); + } + if (clientTimestamp_ != 0L) { + output.writeUInt64(11, clientTimestamp_); + } + if (slotDisplayDuration_ != 0L) { + output.writeUInt64(12, slotDisplayDuration_); + } + if (starLevel_ != 0) { + output.writeUInt32(13, starLevel_); + } + if (styleType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType.UNKNOWN_STYLE.getNumber()) { + output.writeEnum(14, styleType_); + } + if (liveAssistantType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNKNOWN_ASSISTANT_TYPE.getNumber()) { + output.writeEnum(15, liveAssistantType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceHash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, deviceHash_); + } + if (danmakuDisplay_ != false) { + output.writeBool(17, danmakuDisplay_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (user_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, time_); + } + if (intGiftId_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, intGiftId_); + } + if (sortRank_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(5, sortRank_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mergeKey_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, mergeKey_); + } + if (batchSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(7, batchSize_); + } + if (comboCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(8, comboCount_); + } + if (rank_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(9, rank_); + } + if (expireDuration_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(10, expireDuration_); + } + if (clientTimestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(11, clientTimestamp_); + } + if (slotDisplayDuration_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(12, slotDisplayDuration_); + } + if (starLevel_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(13, starLevel_); + } + if (styleType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType.UNKNOWN_STYLE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(14, styleType_); + } + if (liveAssistantType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNKNOWN_ASSISTANT_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(15, liveAssistantType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceHash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, deviceHash_); + } + if (danmakuDisplay_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(17, danmakuDisplay_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getTime() + != other.getTime()) return false; + if (getIntGiftId() + != other.getIntGiftId()) return false; + if (getSortRank() + != other.getSortRank()) return false; + if (!getMergeKey() + .equals(other.getMergeKey())) return false; + if (getBatchSize() + != other.getBatchSize()) return false; + if (getComboCount() + != other.getComboCount()) return false; + if (getRank() + != other.getRank()) return false; + if (getExpireDuration() + != other.getExpireDuration()) return false; + if (getClientTimestamp() + != other.getClientTimestamp()) return false; + if (getSlotDisplayDuration() + != other.getSlotDisplayDuration()) return false; + if (getStarLevel() + != other.getStarLevel()) return false; + if (styleType_ != other.styleType_) return false; + if (liveAssistantType_ != other.liveAssistantType_) return false; + if (!getDeviceHash() + .equals(other.getDeviceHash())) return false; + if (getDanmakuDisplay() + != other.getDanmakuDisplay()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + INTGIFTID_FIELD_NUMBER; + hash = (53 * hash) + getIntGiftId(); + hash = (37 * hash) + SORTRANK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSortRank()); + hash = (37 * hash) + MERGEKEY_FIELD_NUMBER; + hash = (53 * hash) + getMergeKey().hashCode(); + hash = (37 * hash) + BATCHSIZE_FIELD_NUMBER; + hash = (53 * hash) + getBatchSize(); + hash = (37 * hash) + COMBOCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getComboCount(); + hash = (37 * hash) + RANK_FIELD_NUMBER; + hash = (53 * hash) + getRank(); + hash = (37 * hash) + EXPIREDURATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getExpireDuration()); + hash = (37 * hash) + CLIENTTIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getClientTimestamp()); + hash = (37 * hash) + SLOTDISPLAYDURATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSlotDisplayDuration()); + hash = (37 * hash) + STARLEVEL_FIELD_NUMBER; + hash = (53 * hash) + getStarLevel(); + hash = (37 * hash) + STYLETYPE_FIELD_NUMBER; + hash = (53 * hash) + styleType_; + hash = (37 * hash) + LIVEASSISTANTTYPE_FIELD_NUMBER; + hash = (53 * hash) + liveAssistantType_; + hash = (37 * hash) + DEVICEHASH_FIELD_NUMBER; + hash = (53 * hash) + getDeviceHash().hashCode(); + hash = (37 * hash) + DANMAKUDISPLAY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDanmakuDisplay()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code WebGiftFeed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:WebGiftFeed) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.internal_static_WebGiftFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.internal_static_WebGiftFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + time_ = 0L; + intGiftId_ = 0; + sortRank_ = 0L; + mergeKey_ = ""; + batchSize_ = 0; + comboCount_ = 0; + rank_ = 0; + expireDuration_ = 0L; + clientTimestamp_ = 0L; + slotDisplayDuration_ = 0L; + starLevel_ = 0; + styleType_ = 0; + liveAssistantType_ = 0; + deviceHash_ = ""; + danmakuDisplay_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.internal_static_WebGiftFeed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.time_ = time_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.intGiftId_ = intGiftId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.sortRank_ = sortRank_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.mergeKey_ = mergeKey_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.batchSize_ = batchSize_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.comboCount_ = comboCount_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.rank_ = rank_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.expireDuration_ = expireDuration_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.clientTimestamp_ = clientTimestamp_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.slotDisplayDuration_ = slotDisplayDuration_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.starLevel_ = starLevel_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.styleType_ = styleType_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.liveAssistantType_ = liveAssistantType_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.deviceHash_ = deviceHash_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.danmakuDisplay_ = danmakuDisplay_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (other.getIntGiftId() != 0) { + setIntGiftId(other.getIntGiftId()); + } + if (other.getSortRank() != 0L) { + setSortRank(other.getSortRank()); + } + if (!other.getMergeKey().isEmpty()) { + mergeKey_ = other.mergeKey_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getBatchSize() != 0) { + setBatchSize(other.getBatchSize()); + } + if (other.getComboCount() != 0) { + setComboCount(other.getComboCount()); + } + if (other.getRank() != 0) { + setRank(other.getRank()); + } + if (other.getExpireDuration() != 0L) { + setExpireDuration(other.getExpireDuration()); + } + if (other.getClientTimestamp() != 0L) { + setClientTimestamp(other.getClientTimestamp()); + } + if (other.getSlotDisplayDuration() != 0L) { + setSlotDisplayDuration(other.getSlotDisplayDuration()); + } + if (other.getStarLevel() != 0) { + setStarLevel(other.getStarLevel()); + } + if (other.styleType_ != 0) { + setStyleTypeValue(other.getStyleTypeValue()); + } + if (other.liveAssistantType_ != 0) { + setLiveAssistantTypeValue(other.getLiveAssistantTypeValue()); + } + if (!other.getDeviceHash().isEmpty()) { + deviceHash_ = other.deviceHash_; + bitField0_ |= 0x00008000; + onChanged(); + } + if (other.getDanmakuDisplay() != false) { + setDanmakuDisplay(other.getDanmakuDisplay()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + intGiftId_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + sortRank_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + mergeKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + batchSize_ = input.readUInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + comboCount_ = input.readUInt32(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + rank_ = input.readUInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + expireDuration_ = input.readUInt64(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: { + clientTimestamp_ = input.readUInt64(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: { + slotDisplayDuration_ = input.readUInt64(); + bitField0_ |= 0x00000800; + break; + } // case 96 + case 104: { + starLevel_ = input.readUInt32(); + bitField0_ |= 0x00001000; + break; + } // case 104 + case 112: { + styleType_ = input.readEnum(); + bitField0_ |= 0x00002000; + break; + } // case 112 + case 120: { + liveAssistantType_ = input.readEnum(); + bitField0_ |= 0x00004000; + break; + } // case 120 + case 130: { + deviceHash_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 136: { + danmakuDisplay_ = input.readBool(); + bitField0_ |= 0x00010000; + break; + } // case 136 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * <code>string id = 1;</code> + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string id = 1;</code> + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string id = 1;</code> + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string id = 1;</code> + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> userBuilder_; + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private long time_ ; + /** + * <code>uint64 time = 3;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * <code>uint64 time = 3;</code> + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 time = 3;</code> + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000004); + time_ = 0L; + onChanged(); + return this; + } + + private int intGiftId_ ; + /** + * <code>uint32 intGiftId = 4;</code> + * @return The intGiftId. + */ + @java.lang.Override + public int getIntGiftId() { + return intGiftId_; + } + /** + * <code>uint32 intGiftId = 4;</code> + * @param value The intGiftId to set. + * @return This builder for chaining. + */ + public Builder setIntGiftId(int value) { + + intGiftId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint32 intGiftId = 4;</code> + * @return This builder for chaining. + */ + public Builder clearIntGiftId() { + bitField0_ = (bitField0_ & ~0x00000008); + intGiftId_ = 0; + onChanged(); + return this; + } + + private long sortRank_ ; + /** + * <code>uint64 sortRank = 5;</code> + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + /** + * <code>uint64 sortRank = 5;</code> + * @param value The sortRank to set. + * @return This builder for chaining. + */ + public Builder setSortRank(long value) { + + sortRank_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>uint64 sortRank = 5;</code> + * @return This builder for chaining. + */ + public Builder clearSortRank() { + bitField0_ = (bitField0_ & ~0x00000010); + sortRank_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object mergeKey_ = ""; + /** + * <code>string mergeKey = 6;</code> + * @return The mergeKey. + */ + public java.lang.String getMergeKey() { + java.lang.Object ref = mergeKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mergeKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string mergeKey = 6;</code> + * @return The bytes for mergeKey. + */ + public com.google.protobuf.ByteString + getMergeKeyBytes() { + java.lang.Object ref = mergeKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mergeKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string mergeKey = 6;</code> + * @param value The mergeKey to set. + * @return This builder for chaining. + */ + public Builder setMergeKey( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + mergeKey_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>string mergeKey = 6;</code> + * @return This builder for chaining. + */ + public Builder clearMergeKey() { + mergeKey_ = getDefaultInstance().getMergeKey(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * <code>string mergeKey = 6;</code> + * @param value The bytes for mergeKey to set. + * @return This builder for chaining. + */ + public Builder setMergeKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + mergeKey_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private int batchSize_ ; + /** + * <code>uint32 batchSize = 7;</code> + * @return The batchSize. + */ + @java.lang.Override + public int getBatchSize() { + return batchSize_; + } + /** + * <code>uint32 batchSize = 7;</code> + * @param value The batchSize to set. + * @return This builder for chaining. + */ + public Builder setBatchSize(int value) { + + batchSize_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>uint32 batchSize = 7;</code> + * @return This builder for chaining. + */ + public Builder clearBatchSize() { + bitField0_ = (bitField0_ & ~0x00000040); + batchSize_ = 0; + onChanged(); + return this; + } + + private int comboCount_ ; + /** + * <code>uint32 comboCount = 8;</code> + * @return The comboCount. + */ + @java.lang.Override + public int getComboCount() { + return comboCount_; + } + /** + * <code>uint32 comboCount = 8;</code> + * @param value The comboCount to set. + * @return This builder for chaining. + */ + public Builder setComboCount(int value) { + + comboCount_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>uint32 comboCount = 8;</code> + * @return This builder for chaining. + */ + public Builder clearComboCount() { + bitField0_ = (bitField0_ & ~0x00000080); + comboCount_ = 0; + onChanged(); + return this; + } + + private int rank_ ; + /** + * <code>uint32 rank = 9;</code> + * @return The rank. + */ + @java.lang.Override + public int getRank() { + return rank_; + } + /** + * <code>uint32 rank = 9;</code> + * @param value The rank to set. + * @return This builder for chaining. + */ + public Builder setRank(int value) { + + rank_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>uint32 rank = 9;</code> + * @return This builder for chaining. + */ + public Builder clearRank() { + bitField0_ = (bitField0_ & ~0x00000100); + rank_ = 0; + onChanged(); + return this; + } + + private long expireDuration_ ; + /** + * <code>uint64 expireDuration = 10;</code> + * @return The expireDuration. + */ + @java.lang.Override + public long getExpireDuration() { + return expireDuration_; + } + /** + * <code>uint64 expireDuration = 10;</code> + * @param value The expireDuration to set. + * @return This builder for chaining. + */ + public Builder setExpireDuration(long value) { + + expireDuration_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>uint64 expireDuration = 10;</code> + * @return This builder for chaining. + */ + public Builder clearExpireDuration() { + bitField0_ = (bitField0_ & ~0x00000200); + expireDuration_ = 0L; + onChanged(); + return this; + } + + private long clientTimestamp_ ; + /** + * <code>uint64 clientTimestamp = 11;</code> + * @return The clientTimestamp. + */ + @java.lang.Override + public long getClientTimestamp() { + return clientTimestamp_; + } + /** + * <code>uint64 clientTimestamp = 11;</code> + * @param value The clientTimestamp to set. + * @return This builder for chaining. + */ + public Builder setClientTimestamp(long value) { + + clientTimestamp_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * <code>uint64 clientTimestamp = 11;</code> + * @return This builder for chaining. + */ + public Builder clearClientTimestamp() { + bitField0_ = (bitField0_ & ~0x00000400); + clientTimestamp_ = 0L; + onChanged(); + return this; + } + + private long slotDisplayDuration_ ; + /** + * <code>uint64 slotDisplayDuration = 12;</code> + * @return The slotDisplayDuration. + */ + @java.lang.Override + public long getSlotDisplayDuration() { + return slotDisplayDuration_; + } + /** + * <code>uint64 slotDisplayDuration = 12;</code> + * @param value The slotDisplayDuration to set. + * @return This builder for chaining. + */ + public Builder setSlotDisplayDuration(long value) { + + slotDisplayDuration_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * <code>uint64 slotDisplayDuration = 12;</code> + * @return This builder for chaining. + */ + public Builder clearSlotDisplayDuration() { + bitField0_ = (bitField0_ & ~0x00000800); + slotDisplayDuration_ = 0L; + onChanged(); + return this; + } + + private int starLevel_ ; + /** + * <code>uint32 starLevel = 13;</code> + * @return The starLevel. + */ + @java.lang.Override + public int getStarLevel() { + return starLevel_; + } + /** + * <code>uint32 starLevel = 13;</code> + * @param value The starLevel to set. + * @return This builder for chaining. + */ + public Builder setStarLevel(int value) { + + starLevel_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * <code>uint32 starLevel = 13;</code> + * @return This builder for chaining. + */ + public Builder clearStarLevel() { + bitField0_ = (bitField0_ & ~0x00001000); + starLevel_ = 0; + onChanged(); + return this; + } + + private int styleType_ = 0; + /** + * <code>.WebGiftFeed.StyleType styleType = 14;</code> + * @return The enum numeric value on the wire for styleType. + */ + @java.lang.Override public int getStyleTypeValue() { + return styleType_; + } + /** + * <code>.WebGiftFeed.StyleType styleType = 14;</code> + * @param value The enum numeric value on the wire for styleType to set. + * @return This builder for chaining. + */ + public Builder setStyleTypeValue(int value) { + styleType_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * <code>.WebGiftFeed.StyleType styleType = 14;</code> + * @return The styleType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType getStyleType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType.forNumber(styleType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType.UNRECOGNIZED : result; + } + /** + * <code>.WebGiftFeed.StyleType styleType = 14;</code> + * @param value The styleType to set. + * @return This builder for chaining. + */ + public Builder setStyleType(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed.StyleType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00002000; + styleType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * <code>.WebGiftFeed.StyleType styleType = 14;</code> + * @return This builder for chaining. + */ + public Builder clearStyleType() { + bitField0_ = (bitField0_ & ~0x00002000); + styleType_ = 0; + onChanged(); + return this; + } + + private int liveAssistantType_ = 0; + /** + * <code>.WebLiveAssistantType liveAssistantType = 15;</code> + * @return The enum numeric value on the wire for liveAssistantType. + */ + @java.lang.Override public int getLiveAssistantTypeValue() { + return liveAssistantType_; + } + /** + * <code>.WebLiveAssistantType liveAssistantType = 15;</code> + * @param value The enum numeric value on the wire for liveAssistantType to set. + * @return This builder for chaining. + */ + public Builder setLiveAssistantTypeValue(int value) { + liveAssistantType_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * <code>.WebLiveAssistantType liveAssistantType = 15;</code> + * @return The liveAssistantType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.forNumber(liveAssistantType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNRECOGNIZED : result; + } + /** + * <code>.WebLiveAssistantType liveAssistantType = 15;</code> + * @param value The liveAssistantType to set. + * @return This builder for chaining. + */ + public Builder setLiveAssistantType(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; + liveAssistantType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * <code>.WebLiveAssistantType liveAssistantType = 15;</code> + * @return This builder for chaining. + */ + public Builder clearLiveAssistantType() { + bitField0_ = (bitField0_ & ~0x00004000); + liveAssistantType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object deviceHash_ = ""; + /** + * <code>string deviceHash = 16;</code> + * @return The deviceHash. + */ + public java.lang.String getDeviceHash() { + java.lang.Object ref = deviceHash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceHash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string deviceHash = 16;</code> + * @return The bytes for deviceHash. + */ + public com.google.protobuf.ByteString + getDeviceHashBytes() { + java.lang.Object ref = deviceHash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string deviceHash = 16;</code> + * @param value The deviceHash to set. + * @return This builder for chaining. + */ + public Builder setDeviceHash( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + deviceHash_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * <code>string deviceHash = 16;</code> + * @return This builder for chaining. + */ + public Builder clearDeviceHash() { + deviceHash_ = getDefaultInstance().getDeviceHash(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + /** + * <code>string deviceHash = 16;</code> + * @param value The bytes for deviceHash to set. + * @return This builder for chaining. + */ + public Builder setDeviceHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + deviceHash_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private boolean danmakuDisplay_ ; + /** + * <code>bool danmakuDisplay = 17;</code> + * @return The danmakuDisplay. + */ + @java.lang.Override + public boolean getDanmakuDisplay() { + return danmakuDisplay_; + } + /** + * <code>bool danmakuDisplay = 17;</code> + * @param value The danmakuDisplay to set. + * @return This builder for chaining. + */ + public Builder setDanmakuDisplay(boolean value) { + + danmakuDisplay_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * <code>bool danmakuDisplay = 17;</code> + * @return This builder for chaining. + */ + public Builder clearDanmakuDisplay() { + bitField0_ = (bitField0_ & ~0x00010000); + danmakuDisplay_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:WebGiftFeed) + } + + // @@protoc_insertion_point(class_scope:WebGiftFeed) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<WebGiftFeed> + PARSER = new com.google.protobuf.AbstractParser<WebGiftFeed>() { + @java.lang.Override + public WebGiftFeed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<WebGiftFeed> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<WebGiftFeed> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass.WebGiftFeed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WebGiftFeed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_WebGiftFeed_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021WebGiftFeed.proto\032\024SimpleUserInfo.prot" + + "o\032\032WebLiveAssistantType.proto\"\273\004\n\013WebGif" + + "tFeed\022\n\n\002id\030\001 \001(\t\022\035\n\004user\030\002 \001(\0132\017.Simple" + + "UserInfo\022\014\n\004time\030\003 \001(\004\022\021\n\tintGiftId\030\004 \001(" + + "\r\022\020\n\010sortRank\030\005 \001(\004\022\020\n\010mergeKey\030\006 \001(\t\022\021\n" + + "\tbatchSize\030\007 \001(\r\022\022\n\ncomboCount\030\010 \001(\r\022\014\n\004" + + "rank\030\t \001(\r\022\026\n\016expireDuration\030\n \001(\004\022\027\n\017cl" + + "ientTimestamp\030\013 \001(\004\022\033\n\023slotDisplayDurati" + + "on\030\014 \001(\004\022\021\n\tstarLevel\030\r \001(\r\022)\n\tstyleType" + + "\030\016 \001(\0162\026.WebGiftFeed.StyleType\0220\n\021liveAs" + + "sistantType\030\017 \001(\0162\025.WebLiveAssistantType" + + "\022\022\n\ndeviceHash\030\020 \001(\t\022\026\n\016danmakuDisplay\030\021" + + " \001(\010\"\234\001\n\tStyleType\022\021\n\rUNKNOWN_STYLE\020\000\022\020\n" + + "\014BATCH_STAR_0\020\001\022\020\n\014BATCH_STAR_1\020\002\022\020\n\014BAT" + + "CH_STAR_2\020\003\022\020\n\014BATCH_STAR_3\020\004\022\020\n\014BATCH_S" + + "TAR_4\020\005\022\020\n\014BATCH_STAR_5\020\006\022\020\n\014BATCH_STAR_" + + "6\020\007B6\n4tech.ordinaryroad.live.chat.clien" + + "t.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.getDescriptor(), + }); + internal_static_WebGiftFeed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_WebGiftFeed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_WebGiftFeed_descriptor, + new java.lang.String[] { "Id", "User", "Time", "IntGiftId", "SortRank", "MergeKey", "BatchSize", "ComboCount", "Rank", "ExpireDuration", "ClientTimestamp", "SlotDisplayDuration", "StarLevel", "StyleType", "LiveAssistantType", "DeviceHash", "DanmakuDisplay", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebLikeFeedOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebLikeFeedOuterClass.java new file mode 100644 index 0000000..67eff24 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebLikeFeedOuterClass.java @@ -0,0 +1,1046 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebLikeFeed.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class WebLikeFeedOuterClass { + private WebLikeFeedOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface WebLikeFeedOrBuilder extends + // @@protoc_insertion_point(interface_extends:WebLikeFeed) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string id = 1;</code> + * @return The id. + */ + java.lang.String getId(); + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return The user. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser(); + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder(); + + /** + * <code>uint64 sortRank = 3;</code> + * @return The sortRank. + */ + long getSortRank(); + + /** + * <code>string deviceHash = 4;</code> + * @return The deviceHash. + */ + java.lang.String getDeviceHash(); + /** + * <code>string deviceHash = 4;</code> + * @return The bytes for deviceHash. + */ + com.google.protobuf.ByteString + getDeviceHashBytes(); + } + /** + * Protobuf type {@code WebLikeFeed} + */ + public static final class WebLikeFeed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:WebLikeFeed) + WebLikeFeedOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebLikeFeed.newBuilder() to construct. + private WebLikeFeed(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private WebLikeFeed() { + id_ = ""; + deviceHash_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebLikeFeed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.internal_static_WebLikeFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.internal_static_WebLikeFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * <code>string id = 1;</code> + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return user_ != null; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + + public static final int SORTRANK_FIELD_NUMBER = 3; + private long sortRank_ = 0L; + /** + * <code>uint64 sortRank = 3;</code> + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + + public static final int DEVICEHASH_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object deviceHash_ = ""; + /** + * <code>string deviceHash = 4;</code> + * @return The deviceHash. + */ + @java.lang.Override + public java.lang.String getDeviceHash() { + java.lang.Object ref = deviceHash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceHash_ = s; + return s; + } + } + /** + * <code>string deviceHash = 4;</code> + * @return The bytes for deviceHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDeviceHashBytes() { + java.lang.Object ref = deviceHash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (user_ != null) { + output.writeMessage(2, getUser()); + } + if (sortRank_ != 0L) { + output.writeUInt64(3, sortRank_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceHash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, deviceHash_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (user_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + if (sortRank_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, sortRank_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceHash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, deviceHash_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getSortRank() + != other.getSortRank()) return false; + if (!getDeviceHash() + .equals(other.getDeviceHash())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + SORTRANK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSortRank()); + hash = (37 * hash) + DEVICEHASH_FIELD_NUMBER; + hash = (53 * hash) + getDeviceHash().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code WebLikeFeed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:WebLikeFeed) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.internal_static_WebLikeFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.internal_static_WebLikeFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + sortRank_ = 0L; + deviceHash_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.internal_static_WebLikeFeed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.sortRank_ = sortRank_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.deviceHash_ = deviceHash_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getSortRank() != 0L) { + setSortRank(other.getSortRank()); + } + if (!other.getDeviceHash().isEmpty()) { + deviceHash_ = other.deviceHash_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + sortRank_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + deviceHash_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * <code>string id = 1;</code> + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string id = 1;</code> + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string id = 1;</code> + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string id = 1;</code> + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> userBuilder_; + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private long sortRank_ ; + /** + * <code>uint64 sortRank = 3;</code> + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + /** + * <code>uint64 sortRank = 3;</code> + * @param value The sortRank to set. + * @return This builder for chaining. + */ + public Builder setSortRank(long value) { + + sortRank_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 sortRank = 3;</code> + * @return This builder for chaining. + */ + public Builder clearSortRank() { + bitField0_ = (bitField0_ & ~0x00000004); + sortRank_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object deviceHash_ = ""; + /** + * <code>string deviceHash = 4;</code> + * @return The deviceHash. + */ + public java.lang.String getDeviceHash() { + java.lang.Object ref = deviceHash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceHash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string deviceHash = 4;</code> + * @return The bytes for deviceHash. + */ + public com.google.protobuf.ByteString + getDeviceHashBytes() { + java.lang.Object ref = deviceHash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string deviceHash = 4;</code> + * @param value The deviceHash to set. + * @return This builder for chaining. + */ + public Builder setDeviceHash( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + deviceHash_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>string deviceHash = 4;</code> + * @return This builder for chaining. + */ + public Builder clearDeviceHash() { + deviceHash_ = getDefaultInstance().getDeviceHash(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * <code>string deviceHash = 4;</code> + * @param value The bytes for deviceHash to set. + * @return This builder for chaining. + */ + public Builder setDeviceHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + deviceHash_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:WebLikeFeed) + } + + // @@protoc_insertion_point(class_scope:WebLikeFeed) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<WebLikeFeed> + PARSER = new com.google.protobuf.AbstractParser<WebLikeFeed>() { + @java.lang.Override + public WebLikeFeed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<WebLikeFeed> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<WebLikeFeed> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLikeFeedOuterClass.WebLikeFeed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WebLikeFeed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_WebLikeFeed_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021WebLikeFeed.proto\032\024SimpleUserInfo.prot" + + "o\"^\n\013WebLikeFeed\022\n\n\002id\030\001 \001(\t\022\035\n\004user\030\002 \001" + + "(\0132\017.SimpleUserInfo\022\020\n\010sortRank\030\003 \001(\004\022\022\n" + + "\ndeviceHash\030\004 \001(\tB6\n4tech.ordinaryroad.l" + + "ive.chat.client.kuaishou.protobufb\006proto" + + "3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(), + }); + internal_static_WebLikeFeed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_WebLikeFeed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_WebLikeFeed_descriptor, + new java.lang.String[] { "Id", "User", "SortRank", "DeviceHash", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebLiveAssistantTypeOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebLiveAssistantTypeOuterClass.java new file mode 100644 index 0000000..066422c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebLiveAssistantTypeOuterClass.java @@ -0,0 +1,180 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebLiveAssistantType.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class WebLiveAssistantTypeOuterClass { + private WebLiveAssistantTypeOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code WebLiveAssistantType} + */ + public enum WebLiveAssistantType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * <code>UNKNOWN_ASSISTANT_TYPE = 0;</code> + */ + UNKNOWN_ASSISTANT_TYPE(0), + /** + * <code>SUPER = 1;</code> + */ + SUPER(1), + /** + * <code>JUNIOR = 2;</code> + */ + JUNIOR(2), + UNRECOGNIZED(-1), + ; + + /** + * <code>UNKNOWN_ASSISTANT_TYPE = 0;</code> + */ + public static final int UNKNOWN_ASSISTANT_TYPE_VALUE = 0; + /** + * <code>SUPER = 1;</code> + */ + public static final int SUPER_VALUE = 1; + /** + * <code>JUNIOR = 2;</code> + */ + public static final int JUNIOR_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static WebLiveAssistantType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static WebLiveAssistantType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_ASSISTANT_TYPE; + case 1: return SUPER; + case 2: return JUNIOR; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap<WebLiveAssistantType> + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + WebLiveAssistantType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap<WebLiveAssistantType>() { + public WebLiveAssistantType findValueByNumber(int number) { + return WebLiveAssistantType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final WebLiveAssistantType[] VALUES = values(); + + public static WebLiveAssistantType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private WebLiveAssistantType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:WebLiveAssistantType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032WebLiveAssistantType.proto*I\n\024WebLiveA" + + "ssistantType\022\032\n\026UNKNOWN_ASSISTANT_TYPE\020\000" + + "\022\t\n\005SUPER\020\001\022\n\n\006JUNIOR\020\002B6\n4tech.ordinary" + + "road.live.chat.client.kuaishou.protobufb" + + "\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebPauseTypeOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebPauseTypeOuterClass.java new file mode 100644 index 0000000..28c8879 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebPauseTypeOuterClass.java @@ -0,0 +1,179 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebPauseType.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class WebPauseTypeOuterClass { + private WebPauseTypeOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code WebPauseType} + */ + public enum WebPauseType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * <code>UNKNOWN_PAUSE_TYPE = 0;</code> + */ + UNKNOWN_PAUSE_TYPE(0), + /** + * <code>TELEPHONE = 1;</code> + */ + TELEPHONE(1), + /** + * <code>SHARE = 2;</code> + */ + SHARE(2), + UNRECOGNIZED(-1), + ; + + /** + * <code>UNKNOWN_PAUSE_TYPE = 0;</code> + */ + public static final int UNKNOWN_PAUSE_TYPE_VALUE = 0; + /** + * <code>TELEPHONE = 1;</code> + */ + public static final int TELEPHONE_VALUE = 1; + /** + * <code>SHARE = 2;</code> + */ + public static final int SHARE_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static WebPauseType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static WebPauseType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_PAUSE_TYPE; + case 1: return TELEPHONE; + case 2: return SHARE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap<WebPauseType> + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + WebPauseType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap<WebPauseType>() { + public WebPauseType findValueByNumber(int number) { + return WebPauseType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebPauseTypeOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final WebPauseType[] VALUES = values(); + + public static WebPauseType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private WebPauseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:WebPauseType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\022WebPauseType.proto*@\n\014WebPauseType\022\026\n\022" + + "UNKNOWN_PAUSE_TYPE\020\000\022\r\n\tTELEPHONE\020\001\022\t\n\005S" + + "HARE\020\002B6\n4tech.ordinaryroad.live.chat.cl" + + "ient.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebRedPackCoverTypeOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebRedPackCoverTypeOuterClass.java new file mode 100644 index 0000000..6b03df2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebRedPackCoverTypeOuterClass.java @@ -0,0 +1,180 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebRedPackCoverType.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class WebRedPackCoverTypeOuterClass { + private WebRedPackCoverTypeOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code WebRedPackCoverType} + */ + public enum WebRedPackCoverType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * <code>UNKNOWN_COVER_TYPE = 0;</code> + */ + UNKNOWN_COVER_TYPE(0), + /** + * <code>NORMAL_COVER = 1;</code> + */ + NORMAL_COVER(1), + /** + * <code>PRETTY_COVER = 2;</code> + */ + PRETTY_COVER(2), + UNRECOGNIZED(-1), + ; + + /** + * <code>UNKNOWN_COVER_TYPE = 0;</code> + */ + public static final int UNKNOWN_COVER_TYPE_VALUE = 0; + /** + * <code>NORMAL_COVER = 1;</code> + */ + public static final int NORMAL_COVER_VALUE = 1; + /** + * <code>PRETTY_COVER = 2;</code> + */ + public static final int PRETTY_COVER_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static WebRedPackCoverType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static WebRedPackCoverType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_COVER_TYPE; + case 1: return NORMAL_COVER; + case 2: return PRETTY_COVER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap<WebRedPackCoverType> + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + WebRedPackCoverType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap<WebRedPackCoverType>() { + public WebRedPackCoverType findValueByNumber(int number) { + return WebRedPackCoverType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final WebRedPackCoverType[] VALUES = values(); + + public static WebRedPackCoverType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private WebRedPackCoverType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:WebRedPackCoverType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031WebRedPackCoverType.proto*Q\n\023WebRedPac" + + "kCoverType\022\026\n\022UNKNOWN_COVER_TYPE\020\000\022\020\n\014NO" + + "RMAL_COVER\020\001\022\020\n\014PRETTY_COVER\020\002B6\n4tech.o" + + "rdinaryroad.live.chat.client.kuaishou.pr" + + "otobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebRedPackInfoOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebRedPackInfoOuterClass.java new file mode 100644 index 0000000..72ffc45 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebRedPackInfoOuterClass.java @@ -0,0 +1,1522 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebRedPackInfo.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class WebRedPackInfoOuterClass { + private WebRedPackInfoOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface WebRedPackInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:WebRedPackInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string id = 1;</code> + * @return The id. + */ + java.lang.String getId(); + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * <code>.SimpleUserInfo author = 2;</code> + * @return Whether the author field is set. + */ + boolean hasAuthor(); + /** + * <code>.SimpleUserInfo author = 2;</code> + * @return The author. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getAuthor(); + /** + * <code>.SimpleUserInfo author = 2;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getAuthorOrBuilder(); + + /** + * <code>uint64 balance = 3;</code> + * @return The balance. + */ + long getBalance(); + + /** + * <code>uint64 openTime = 4;</code> + * @return The openTime. + */ + long getOpenTime(); + + /** + * <code>uint64 currentTime = 5;</code> + * @return The currentTime. + */ + long getCurrentTime(); + + /** + * <code>string grabToken = 6;</code> + * @return The grabToken. + */ + java.lang.String getGrabToken(); + /** + * <code>string grabToken = 6;</code> + * @return The bytes for grabToken. + */ + com.google.protobuf.ByteString + getGrabTokenBytes(); + + /** + * <code>bool needSendRequest = 7;</code> + * @return The needSendRequest. + */ + boolean getNeedSendRequest(); + + /** + * <code>uint64 requestDelayMillis = 8;</code> + * @return The requestDelayMillis. + */ + long getRequestDelayMillis(); + + /** + * <code>uint64 luckiestDelayMillis = 9;</code> + * @return The luckiestDelayMillis. + */ + long getLuckiestDelayMillis(); + + /** + * <code>.WebRedPackCoverType coverType = 10;</code> + * @return The enum numeric value on the wire for coverType. + */ + int getCoverTypeValue(); + /** + * <code>.WebRedPackCoverType coverType = 10;</code> + * @return The coverType. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType getCoverType(); + } + /** + * Protobuf type {@code WebRedPackInfo} + */ + public static final class WebRedPackInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:WebRedPackInfo) + WebRedPackInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebRedPackInfo.newBuilder() to construct. + private WebRedPackInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private WebRedPackInfo() { + id_ = ""; + grabToken_ = ""; + coverType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebRedPackInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.internal_static_WebRedPackInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.internal_static_WebRedPackInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * <code>string id = 1;</code> + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTHOR_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo author_; + /** + * <code>.SimpleUserInfo author = 2;</code> + * @return Whether the author field is set. + */ + @java.lang.Override + public boolean hasAuthor() { + return author_ != null; + } + /** + * <code>.SimpleUserInfo author = 2;</code> + * @return The author. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getAuthor() { + return author_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : author_; + } + /** + * <code>.SimpleUserInfo author = 2;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getAuthorOrBuilder() { + return author_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : author_; + } + + public static final int BALANCE_FIELD_NUMBER = 3; + private long balance_ = 0L; + /** + * <code>uint64 balance = 3;</code> + * @return The balance. + */ + @java.lang.Override + public long getBalance() { + return balance_; + } + + public static final int OPENTIME_FIELD_NUMBER = 4; + private long openTime_ = 0L; + /** + * <code>uint64 openTime = 4;</code> + * @return The openTime. + */ + @java.lang.Override + public long getOpenTime() { + return openTime_; + } + + public static final int CURRENTTIME_FIELD_NUMBER = 5; + private long currentTime_ = 0L; + /** + * <code>uint64 currentTime = 5;</code> + * @return The currentTime. + */ + @java.lang.Override + public long getCurrentTime() { + return currentTime_; + } + + public static final int GRABTOKEN_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object grabToken_ = ""; + /** + * <code>string grabToken = 6;</code> + * @return The grabToken. + */ + @java.lang.Override + public java.lang.String getGrabToken() { + java.lang.Object ref = grabToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + grabToken_ = s; + return s; + } + } + /** + * <code>string grabToken = 6;</code> + * @return The bytes for grabToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGrabTokenBytes() { + java.lang.Object ref = grabToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + grabToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEEDSENDREQUEST_FIELD_NUMBER = 7; + private boolean needSendRequest_ = false; + /** + * <code>bool needSendRequest = 7;</code> + * @return The needSendRequest. + */ + @java.lang.Override + public boolean getNeedSendRequest() { + return needSendRequest_; + } + + public static final int REQUESTDELAYMILLIS_FIELD_NUMBER = 8; + private long requestDelayMillis_ = 0L; + /** + * <code>uint64 requestDelayMillis = 8;</code> + * @return The requestDelayMillis. + */ + @java.lang.Override + public long getRequestDelayMillis() { + return requestDelayMillis_; + } + + public static final int LUCKIESTDELAYMILLIS_FIELD_NUMBER = 9; + private long luckiestDelayMillis_ = 0L; + /** + * <code>uint64 luckiestDelayMillis = 9;</code> + * @return The luckiestDelayMillis. + */ + @java.lang.Override + public long getLuckiestDelayMillis() { + return luckiestDelayMillis_; + } + + public static final int COVERTYPE_FIELD_NUMBER = 10; + private int coverType_ = 0; + /** + * <code>.WebRedPackCoverType coverType = 10;</code> + * @return The enum numeric value on the wire for coverType. + */ + @java.lang.Override public int getCoverTypeValue() { + return coverType_; + } + /** + * <code>.WebRedPackCoverType coverType = 10;</code> + * @return The coverType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType getCoverType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType.forNumber(coverType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (author_ != null) { + output.writeMessage(2, getAuthor()); + } + if (balance_ != 0L) { + output.writeUInt64(3, balance_); + } + if (openTime_ != 0L) { + output.writeUInt64(4, openTime_); + } + if (currentTime_ != 0L) { + output.writeUInt64(5, currentTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(grabToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, grabToken_); + } + if (needSendRequest_ != false) { + output.writeBool(7, needSendRequest_); + } + if (requestDelayMillis_ != 0L) { + output.writeUInt64(8, requestDelayMillis_); + } + if (luckiestDelayMillis_ != 0L) { + output.writeUInt64(9, luckiestDelayMillis_); + } + if (coverType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType.UNKNOWN_COVER_TYPE.getNumber()) { + output.writeEnum(10, coverType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (author_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getAuthor()); + } + if (balance_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, balance_); + } + if (openTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, openTime_); + } + if (currentTime_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(5, currentTime_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(grabToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, grabToken_); + } + if (needSendRequest_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, needSendRequest_); + } + if (requestDelayMillis_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(8, requestDelayMillis_); + } + if (luckiestDelayMillis_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(9, luckiestDelayMillis_); + } + if (coverType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType.UNKNOWN_COVER_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(10, coverType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasAuthor() != other.hasAuthor()) return false; + if (hasAuthor()) { + if (!getAuthor() + .equals(other.getAuthor())) return false; + } + if (getBalance() + != other.getBalance()) return false; + if (getOpenTime() + != other.getOpenTime()) return false; + if (getCurrentTime() + != other.getCurrentTime()) return false; + if (!getGrabToken() + .equals(other.getGrabToken())) return false; + if (getNeedSendRequest() + != other.getNeedSendRequest()) return false; + if (getRequestDelayMillis() + != other.getRequestDelayMillis()) return false; + if (getLuckiestDelayMillis() + != other.getLuckiestDelayMillis()) return false; + if (coverType_ != other.coverType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasAuthor()) { + hash = (37 * hash) + AUTHOR_FIELD_NUMBER; + hash = (53 * hash) + getAuthor().hashCode(); + } + hash = (37 * hash) + BALANCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBalance()); + hash = (37 * hash) + OPENTIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getOpenTime()); + hash = (37 * hash) + CURRENTTIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getCurrentTime()); + hash = (37 * hash) + GRABTOKEN_FIELD_NUMBER; + hash = (53 * hash) + getGrabToken().hashCode(); + hash = (37 * hash) + NEEDSENDREQUEST_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getNeedSendRequest()); + hash = (37 * hash) + REQUESTDELAYMILLIS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRequestDelayMillis()); + hash = (37 * hash) + LUCKIESTDELAYMILLIS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getLuckiestDelayMillis()); + hash = (37 * hash) + COVERTYPE_FIELD_NUMBER; + hash = (53 * hash) + coverType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code WebRedPackInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:WebRedPackInfo) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.internal_static_WebRedPackInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.internal_static_WebRedPackInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + author_ = null; + if (authorBuilder_ != null) { + authorBuilder_.dispose(); + authorBuilder_ = null; + } + balance_ = 0L; + openTime_ = 0L; + currentTime_ = 0L; + grabToken_ = ""; + needSendRequest_ = false; + requestDelayMillis_ = 0L; + luckiestDelayMillis_ = 0L; + coverType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.internal_static_WebRedPackInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.author_ = authorBuilder_ == null + ? author_ + : authorBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.balance_ = balance_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.openTime_ = openTime_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.currentTime_ = currentTime_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.grabToken_ = grabToken_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.needSendRequest_ = needSendRequest_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.requestDelayMillis_ = requestDelayMillis_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.luckiestDelayMillis_ = luckiestDelayMillis_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.coverType_ = coverType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasAuthor()) { + mergeAuthor(other.getAuthor()); + } + if (other.getBalance() != 0L) { + setBalance(other.getBalance()); + } + if (other.getOpenTime() != 0L) { + setOpenTime(other.getOpenTime()); + } + if (other.getCurrentTime() != 0L) { + setCurrentTime(other.getCurrentTime()); + } + if (!other.getGrabToken().isEmpty()) { + grabToken_ = other.grabToken_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (other.getNeedSendRequest() != false) { + setNeedSendRequest(other.getNeedSendRequest()); + } + if (other.getRequestDelayMillis() != 0L) { + setRequestDelayMillis(other.getRequestDelayMillis()); + } + if (other.getLuckiestDelayMillis() != 0L) { + setLuckiestDelayMillis(other.getLuckiestDelayMillis()); + } + if (other.coverType_ != 0) { + setCoverTypeValue(other.getCoverTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getAuthorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + balance_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + openTime_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + currentTime_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + grabToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + needSendRequest_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + requestDelayMillis_ = input.readUInt64(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + luckiestDelayMillis_ = input.readUInt64(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + coverType_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 80 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * <code>string id = 1;</code> + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string id = 1;</code> + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string id = 1;</code> + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string id = 1;</code> + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo author_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> authorBuilder_; + /** + * <code>.SimpleUserInfo author = 2;</code> + * @return Whether the author field is set. + */ + public boolean hasAuthor() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * <code>.SimpleUserInfo author = 2;</code> + * @return The author. + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getAuthor() { + if (authorBuilder_ == null) { + return author_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : author_; + } else { + return authorBuilder_.getMessage(); + } + } + /** + * <code>.SimpleUserInfo author = 2;</code> + */ + public Builder setAuthor(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (authorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + author_ = value; + } else { + authorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo author = 2;</code> + */ + public Builder setAuthor( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder builderForValue) { + if (authorBuilder_ == null) { + author_ = builderForValue.build(); + } else { + authorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo author = 2;</code> + */ + public Builder mergeAuthor(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (authorBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + author_ != null && + author_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance()) { + getAuthorBuilder().mergeFrom(value); + } else { + author_ = value; + } + } else { + authorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo author = 2;</code> + */ + public Builder clearAuthor() { + bitField0_ = (bitField0_ & ~0x00000002); + author_ = null; + if (authorBuilder_ != null) { + authorBuilder_.dispose(); + authorBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo author = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder getAuthorBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAuthorFieldBuilder().getBuilder(); + } + /** + * <code>.SimpleUserInfo author = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getAuthorOrBuilder() { + if (authorBuilder_ != null) { + return authorBuilder_.getMessageOrBuilder(); + } else { + return author_ == null ? + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : author_; + } + } + /** + * <code>.SimpleUserInfo author = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> + getAuthorFieldBuilder() { + if (authorBuilder_ == null) { + authorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder>( + getAuthor(), + getParentForChildren(), + isClean()); + author_ = null; + } + return authorBuilder_; + } + + private long balance_ ; + /** + * <code>uint64 balance = 3;</code> + * @return The balance. + */ + @java.lang.Override + public long getBalance() { + return balance_; + } + /** + * <code>uint64 balance = 3;</code> + * @param value The balance to set. + * @return This builder for chaining. + */ + public Builder setBalance(long value) { + + balance_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 balance = 3;</code> + * @return This builder for chaining. + */ + public Builder clearBalance() { + bitField0_ = (bitField0_ & ~0x00000004); + balance_ = 0L; + onChanged(); + return this; + } + + private long openTime_ ; + /** + * <code>uint64 openTime = 4;</code> + * @return The openTime. + */ + @java.lang.Override + public long getOpenTime() { + return openTime_; + } + /** + * <code>uint64 openTime = 4;</code> + * @param value The openTime to set. + * @return This builder for chaining. + */ + public Builder setOpenTime(long value) { + + openTime_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint64 openTime = 4;</code> + * @return This builder for chaining. + */ + public Builder clearOpenTime() { + bitField0_ = (bitField0_ & ~0x00000008); + openTime_ = 0L; + onChanged(); + return this; + } + + private long currentTime_ ; + /** + * <code>uint64 currentTime = 5;</code> + * @return The currentTime. + */ + @java.lang.Override + public long getCurrentTime() { + return currentTime_; + } + /** + * <code>uint64 currentTime = 5;</code> + * @param value The currentTime to set. + * @return This builder for chaining. + */ + public Builder setCurrentTime(long value) { + + currentTime_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>uint64 currentTime = 5;</code> + * @return This builder for chaining. + */ + public Builder clearCurrentTime() { + bitField0_ = (bitField0_ & ~0x00000010); + currentTime_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object grabToken_ = ""; + /** + * <code>string grabToken = 6;</code> + * @return The grabToken. + */ + public java.lang.String getGrabToken() { + java.lang.Object ref = grabToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + grabToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string grabToken = 6;</code> + * @return The bytes for grabToken. + */ + public com.google.protobuf.ByteString + getGrabTokenBytes() { + java.lang.Object ref = grabToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + grabToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string grabToken = 6;</code> + * @param value The grabToken to set. + * @return This builder for chaining. + */ + public Builder setGrabToken( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + grabToken_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>string grabToken = 6;</code> + * @return This builder for chaining. + */ + public Builder clearGrabToken() { + grabToken_ = getDefaultInstance().getGrabToken(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * <code>string grabToken = 6;</code> + * @param value The bytes for grabToken to set. + * @return This builder for chaining. + */ + public Builder setGrabTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + grabToken_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private boolean needSendRequest_ ; + /** + * <code>bool needSendRequest = 7;</code> + * @return The needSendRequest. + */ + @java.lang.Override + public boolean getNeedSendRequest() { + return needSendRequest_; + } + /** + * <code>bool needSendRequest = 7;</code> + * @param value The needSendRequest to set. + * @return This builder for chaining. + */ + public Builder setNeedSendRequest(boolean value) { + + needSendRequest_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>bool needSendRequest = 7;</code> + * @return This builder for chaining. + */ + public Builder clearNeedSendRequest() { + bitField0_ = (bitField0_ & ~0x00000040); + needSendRequest_ = false; + onChanged(); + return this; + } + + private long requestDelayMillis_ ; + /** + * <code>uint64 requestDelayMillis = 8;</code> + * @return The requestDelayMillis. + */ + @java.lang.Override + public long getRequestDelayMillis() { + return requestDelayMillis_; + } + /** + * <code>uint64 requestDelayMillis = 8;</code> + * @param value The requestDelayMillis to set. + * @return This builder for chaining. + */ + public Builder setRequestDelayMillis(long value) { + + requestDelayMillis_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * <code>uint64 requestDelayMillis = 8;</code> + * @return This builder for chaining. + */ + public Builder clearRequestDelayMillis() { + bitField0_ = (bitField0_ & ~0x00000080); + requestDelayMillis_ = 0L; + onChanged(); + return this; + } + + private long luckiestDelayMillis_ ; + /** + * <code>uint64 luckiestDelayMillis = 9;</code> + * @return The luckiestDelayMillis. + */ + @java.lang.Override + public long getLuckiestDelayMillis() { + return luckiestDelayMillis_; + } + /** + * <code>uint64 luckiestDelayMillis = 9;</code> + * @param value The luckiestDelayMillis to set. + * @return This builder for chaining. + */ + public Builder setLuckiestDelayMillis(long value) { + + luckiestDelayMillis_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * <code>uint64 luckiestDelayMillis = 9;</code> + * @return This builder for chaining. + */ + public Builder clearLuckiestDelayMillis() { + bitField0_ = (bitField0_ & ~0x00000100); + luckiestDelayMillis_ = 0L; + onChanged(); + return this; + } + + private int coverType_ = 0; + /** + * <code>.WebRedPackCoverType coverType = 10;</code> + * @return The enum numeric value on the wire for coverType. + */ + @java.lang.Override public int getCoverTypeValue() { + return coverType_; + } + /** + * <code>.WebRedPackCoverType coverType = 10;</code> + * @param value The enum numeric value on the wire for coverType to set. + * @return This builder for chaining. + */ + public Builder setCoverTypeValue(int value) { + coverType_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * <code>.WebRedPackCoverType coverType = 10;</code> + * @return The coverType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType getCoverType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType.forNumber(coverType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType.UNRECOGNIZED : result; + } + /** + * <code>.WebRedPackCoverType coverType = 10;</code> + * @param value The coverType to set. + * @return This builder for chaining. + */ + public Builder setCoverType(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.WebRedPackCoverType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + coverType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * <code>.WebRedPackCoverType coverType = 10;</code> + * @return This builder for chaining. + */ + public Builder clearCoverType() { + bitField0_ = (bitField0_ & ~0x00000200); + coverType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:WebRedPackInfo) + } + + // @@protoc_insertion_point(class_scope:WebRedPackInfo) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<WebRedPackInfo> + PARSER = new com.google.protobuf.AbstractParser<WebRedPackInfo>() { + @java.lang.Override + public WebRedPackInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<WebRedPackInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<WebRedPackInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackInfoOuterClass.WebRedPackInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WebRedPackInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_WebRedPackInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024WebRedPackInfo.proto\032\024SimpleUserInfo.p" + + "roto\032\031WebRedPackCoverType.proto\"\203\002\n\016WebR" + + "edPackInfo\022\n\n\002id\030\001 \001(\t\022\037\n\006author\030\002 \001(\0132\017" + + ".SimpleUserInfo\022\017\n\007balance\030\003 \001(\004\022\020\n\010open" + + "Time\030\004 \001(\004\022\023\n\013currentTime\030\005 \001(\004\022\021\n\tgrabT" + + "oken\030\006 \001(\t\022\027\n\017needSendRequest\030\007 \001(\010\022\032\n\022r" + + "equestDelayMillis\030\010 \001(\004\022\033\n\023luckiestDelay" + + "Millis\030\t \001(\004\022\'\n\tcoverType\030\n \001(\0162\024.WebRed" + + "PackCoverTypeB6\n4tech.ordinaryroad.live." + + "chat.client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.getDescriptor(), + }); + internal_static_WebRedPackInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_WebRedPackInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_WebRedPackInfo_descriptor, + new java.lang.String[] { "Id", "Author", "Balance", "OpenTime", "CurrentTime", "GrabToken", "NeedSendRequest", "RequestDelayMillis", "LuckiestDelayMillis", "CoverType", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebRedPackCoverTypeOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebShareFeedOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebShareFeedOuterClass.java new file mode 100644 index 0000000..97d7817 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebShareFeedOuterClass.java @@ -0,0 +1,1301 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebShareFeed.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class WebShareFeedOuterClass { + private WebShareFeedOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface WebShareFeedOrBuilder extends + // @@protoc_insertion_point(interface_extends:WebShareFeed) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string id = 1;</code> + * @return The id. + */ + java.lang.String getId(); + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return The user. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser(); + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder(); + + /** + * <code>uint64 time = 3;</code> + * @return The time. + */ + long getTime(); + + /** + * <code>uint32 thirdPartyPlatform = 4;</code> + * @return The thirdPartyPlatform. + */ + int getThirdPartyPlatform(); + + /** + * <code>uint64 sortRank = 5;</code> + * @return The sortRank. + */ + long getSortRank(); + + /** + * <code>.WebLiveAssistantType liveAssistantType = 6;</code> + * @return The enum numeric value on the wire for liveAssistantType. + */ + int getLiveAssistantTypeValue(); + /** + * <code>.WebLiveAssistantType liveAssistantType = 6;</code> + * @return The liveAssistantType. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType(); + + /** + * <code>string deviceHash = 7;</code> + * @return The deviceHash. + */ + java.lang.String getDeviceHash(); + /** + * <code>string deviceHash = 7;</code> + * @return The bytes for deviceHash. + */ + com.google.protobuf.ByteString + getDeviceHashBytes(); + } + /** + * Protobuf type {@code WebShareFeed} + */ + public static final class WebShareFeed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:WebShareFeed) + WebShareFeedOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebShareFeed.newBuilder() to construct. + private WebShareFeed(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private WebShareFeed() { + id_ = ""; + liveAssistantType_ = 0; + deviceHash_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebShareFeed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.internal_static_WebShareFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.internal_static_WebShareFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * <code>string id = 1;</code> + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return user_ != null; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + + public static final int TIME_FIELD_NUMBER = 3; + private long time_ = 0L; + /** + * <code>uint64 time = 3;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + public static final int THIRDPARTYPLATFORM_FIELD_NUMBER = 4; + private int thirdPartyPlatform_ = 0; + /** + * <code>uint32 thirdPartyPlatform = 4;</code> + * @return The thirdPartyPlatform. + */ + @java.lang.Override + public int getThirdPartyPlatform() { + return thirdPartyPlatform_; + } + + public static final int SORTRANK_FIELD_NUMBER = 5; + private long sortRank_ = 0L; + /** + * <code>uint64 sortRank = 5;</code> + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + + public static final int LIVEASSISTANTTYPE_FIELD_NUMBER = 6; + private int liveAssistantType_ = 0; + /** + * <code>.WebLiveAssistantType liveAssistantType = 6;</code> + * @return The enum numeric value on the wire for liveAssistantType. + */ + @java.lang.Override public int getLiveAssistantTypeValue() { + return liveAssistantType_; + } + /** + * <code>.WebLiveAssistantType liveAssistantType = 6;</code> + * @return The liveAssistantType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.forNumber(liveAssistantType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNRECOGNIZED : result; + } + + public static final int DEVICEHASH_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object deviceHash_ = ""; + /** + * <code>string deviceHash = 7;</code> + * @return The deviceHash. + */ + @java.lang.Override + public java.lang.String getDeviceHash() { + java.lang.Object ref = deviceHash_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceHash_ = s; + return s; + } + } + /** + * <code>string deviceHash = 7;</code> + * @return The bytes for deviceHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDeviceHashBytes() { + java.lang.Object ref = deviceHash_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (user_ != null) { + output.writeMessage(2, getUser()); + } + if (time_ != 0L) { + output.writeUInt64(3, time_); + } + if (thirdPartyPlatform_ != 0) { + output.writeUInt32(4, thirdPartyPlatform_); + } + if (sortRank_ != 0L) { + output.writeUInt64(5, sortRank_); + } + if (liveAssistantType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNKNOWN_ASSISTANT_TYPE.getNumber()) { + output.writeEnum(6, liveAssistantType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceHash_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, deviceHash_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (user_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, time_); + } + if (thirdPartyPlatform_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, thirdPartyPlatform_); + } + if (sortRank_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(5, sortRank_); + } + if (liveAssistantType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNKNOWN_ASSISTANT_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(6, liveAssistantType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceHash_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, deviceHash_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getTime() + != other.getTime()) return false; + if (getThirdPartyPlatform() + != other.getThirdPartyPlatform()) return false; + if (getSortRank() + != other.getSortRank()) return false; + if (liveAssistantType_ != other.liveAssistantType_) return false; + if (!getDeviceHash() + .equals(other.getDeviceHash())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + THIRDPARTYPLATFORM_FIELD_NUMBER; + hash = (53 * hash) + getThirdPartyPlatform(); + hash = (37 * hash) + SORTRANK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSortRank()); + hash = (37 * hash) + LIVEASSISTANTTYPE_FIELD_NUMBER; + hash = (53 * hash) + liveAssistantType_; + hash = (37 * hash) + DEVICEHASH_FIELD_NUMBER; + hash = (53 * hash) + getDeviceHash().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code WebShareFeed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:WebShareFeed) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.internal_static_WebShareFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.internal_static_WebShareFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + time_ = 0L; + thirdPartyPlatform_ = 0; + sortRank_ = 0L; + liveAssistantType_ = 0; + deviceHash_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.internal_static_WebShareFeed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.time_ = time_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.thirdPartyPlatform_ = thirdPartyPlatform_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.sortRank_ = sortRank_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.liveAssistantType_ = liveAssistantType_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.deviceHash_ = deviceHash_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (other.getThirdPartyPlatform() != 0) { + setThirdPartyPlatform(other.getThirdPartyPlatform()); + } + if (other.getSortRank() != 0L) { + setSortRank(other.getSortRank()); + } + if (other.liveAssistantType_ != 0) { + setLiveAssistantTypeValue(other.getLiveAssistantTypeValue()); + } + if (!other.getDeviceHash().isEmpty()) { + deviceHash_ = other.deviceHash_; + bitField0_ |= 0x00000040; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + thirdPartyPlatform_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + sortRank_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + liveAssistantType_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: { + deviceHash_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * <code>string id = 1;</code> + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string id = 1;</code> + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string id = 1;</code> + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string id = 1;</code> + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> userBuilder_; + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private long time_ ; + /** + * <code>uint64 time = 3;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * <code>uint64 time = 3;</code> + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 time = 3;</code> + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000004); + time_ = 0L; + onChanged(); + return this; + } + + private int thirdPartyPlatform_ ; + /** + * <code>uint32 thirdPartyPlatform = 4;</code> + * @return The thirdPartyPlatform. + */ + @java.lang.Override + public int getThirdPartyPlatform() { + return thirdPartyPlatform_; + } + /** + * <code>uint32 thirdPartyPlatform = 4;</code> + * @param value The thirdPartyPlatform to set. + * @return This builder for chaining. + */ + public Builder setThirdPartyPlatform(int value) { + + thirdPartyPlatform_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>uint32 thirdPartyPlatform = 4;</code> + * @return This builder for chaining. + */ + public Builder clearThirdPartyPlatform() { + bitField0_ = (bitField0_ & ~0x00000008); + thirdPartyPlatform_ = 0; + onChanged(); + return this; + } + + private long sortRank_ ; + /** + * <code>uint64 sortRank = 5;</code> + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + /** + * <code>uint64 sortRank = 5;</code> + * @param value The sortRank to set. + * @return This builder for chaining. + */ + public Builder setSortRank(long value) { + + sortRank_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>uint64 sortRank = 5;</code> + * @return This builder for chaining. + */ + public Builder clearSortRank() { + bitField0_ = (bitField0_ & ~0x00000010); + sortRank_ = 0L; + onChanged(); + return this; + } + + private int liveAssistantType_ = 0; + /** + * <code>.WebLiveAssistantType liveAssistantType = 6;</code> + * @return The enum numeric value on the wire for liveAssistantType. + */ + @java.lang.Override public int getLiveAssistantTypeValue() { + return liveAssistantType_; + } + /** + * <code>.WebLiveAssistantType liveAssistantType = 6;</code> + * @param value The enum numeric value on the wire for liveAssistantType to set. + * @return This builder for chaining. + */ + public Builder setLiveAssistantTypeValue(int value) { + liveAssistantType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>.WebLiveAssistantType liveAssistantType = 6;</code> + * @return The liveAssistantType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.forNumber(liveAssistantType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNRECOGNIZED : result; + } + /** + * <code>.WebLiveAssistantType liveAssistantType = 6;</code> + * @param value The liveAssistantType to set. + * @return This builder for chaining. + */ + public Builder setLiveAssistantType(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + liveAssistantType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * <code>.WebLiveAssistantType liveAssistantType = 6;</code> + * @return This builder for chaining. + */ + public Builder clearLiveAssistantType() { + bitField0_ = (bitField0_ & ~0x00000020); + liveAssistantType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object deviceHash_ = ""; + /** + * <code>string deviceHash = 7;</code> + * @return The deviceHash. + */ + public java.lang.String getDeviceHash() { + java.lang.Object ref = deviceHash_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceHash_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string deviceHash = 7;</code> + * @return The bytes for deviceHash. + */ + public com.google.protobuf.ByteString + getDeviceHashBytes() { + java.lang.Object ref = deviceHash_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceHash_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string deviceHash = 7;</code> + * @param value The deviceHash to set. + * @return This builder for chaining. + */ + public Builder setDeviceHash( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + deviceHash_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>string deviceHash = 7;</code> + * @return This builder for chaining. + */ + public Builder clearDeviceHash() { + deviceHash_ = getDefaultInstance().getDeviceHash(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * <code>string deviceHash = 7;</code> + * @param value The bytes for deviceHash to set. + * @return This builder for chaining. + */ + public Builder setDeviceHashBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + deviceHash_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:WebShareFeed) + } + + // @@protoc_insertion_point(class_scope:WebShareFeed) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<WebShareFeed> + PARSER = new com.google.protobuf.AbstractParser<WebShareFeed>() { + @java.lang.Override + public WebShareFeed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<WebShareFeed> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<WebShareFeed> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebShareFeedOuterClass.WebShareFeed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WebShareFeed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_WebShareFeed_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\022WebShareFeed.proto\032\024SimpleUserInfo.pro" + + "to\032\032WebLiveAssistantType.proto\"\273\001\n\014WebSh" + + "areFeed\022\n\n\002id\030\001 \001(\t\022\035\n\004user\030\002 \001(\0132\017.Simp" + + "leUserInfo\022\014\n\004time\030\003 \001(\004\022\032\n\022thirdPartyPl" + + "atform\030\004 \001(\r\022\020\n\010sortRank\030\005 \001(\004\0220\n\021liveAs" + + "sistantType\030\006 \001(\0162\025.WebLiveAssistantType" + + "\022\022\n\ndeviceHash\030\007 \001(\tB6\n4tech.ordinaryroa" + + "d.live.chat.client.kuaishou.protobufb\006pr" + + "oto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.getDescriptor(), + }); + internal_static_WebShareFeed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_WebShareFeed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_WebShareFeed_descriptor, + new java.lang.String[] { "Id", "User", "Time", "ThirdPartyPlatform", "SortRank", "LiveAssistantType", "DeviceHash", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebSystemNoticeFeedOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebSystemNoticeFeedOuterClass.java new file mode 100644 index 0000000..b633443 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebSystemNoticeFeedOuterClass.java @@ -0,0 +1,1427 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebSystemNoticeFeed.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class WebSystemNoticeFeedOuterClass { + private WebSystemNoticeFeedOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface WebSystemNoticeFeedOrBuilder extends + // @@protoc_insertion_point(interface_extends:WebSystemNoticeFeed) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string id = 1;</code> + * @return The id. + */ + java.lang.String getId(); + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return The user. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser(); + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder(); + + /** + * <code>uint64 time = 3;</code> + * @return The time. + */ + long getTime(); + + /** + * <code>string content = 4;</code> + * @return The content. + */ + java.lang.String getContent(); + /** + * <code>string content = 4;</code> + * @return The bytes for content. + */ + com.google.protobuf.ByteString + getContentBytes(); + + /** + * <code>uint64 displayDuration = 5;</code> + * @return The displayDuration. + */ + long getDisplayDuration(); + + /** + * <code>uint64 sortRank = 6;</code> + * @return The sortRank. + */ + long getSortRank(); + + /** + * <code>.WebSystemNoticeFeed.DisplayType displayType = 7;</code> + * @return The enum numeric value on the wire for displayType. + */ + int getDisplayTypeValue(); + /** + * <code>.WebSystemNoticeFeed.DisplayType displayType = 7;</code> + * @return The displayType. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType getDisplayType(); + } + /** + * Protobuf type {@code WebSystemNoticeFeed} + */ + public static final class WebSystemNoticeFeed extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:WebSystemNoticeFeed) + WebSystemNoticeFeedOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebSystemNoticeFeed.newBuilder() to construct. + private WebSystemNoticeFeed(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private WebSystemNoticeFeed() { + id_ = ""; + content_ = ""; + displayType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebSystemNoticeFeed(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.internal_static_WebSystemNoticeFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.internal_static_WebSystemNoticeFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder.class); + } + + /** + * Protobuf enum {@code WebSystemNoticeFeed.DisplayType} + */ + public enum DisplayType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * <code>UNKNOWN_DISPLAY_TYPE = 0;</code> + */ + UNKNOWN_DISPLAY_TYPE(0), + /** + * <code>COMMENT = 1;</code> + */ + COMMENT(1), + /** + * <code>ALERT = 2;</code> + */ + ALERT(2), + /** + * <code>TOAST = 3;</code> + */ + TOAST(3), + UNRECOGNIZED(-1), + ; + + /** + * <code>UNKNOWN_DISPLAY_TYPE = 0;</code> + */ + public static final int UNKNOWN_DISPLAY_TYPE_VALUE = 0; + /** + * <code>COMMENT = 1;</code> + */ + public static final int COMMENT_VALUE = 1; + /** + * <code>ALERT = 2;</code> + */ + public static final int ALERT_VALUE = 2; + /** + * <code>TOAST = 3;</code> + */ + public static final int TOAST_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DisplayType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static DisplayType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_DISPLAY_TYPE; + case 1: return COMMENT; + case 2: return ALERT; + case 3: return TOAST; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap<DisplayType> + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + DisplayType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap<DisplayType>() { + public DisplayType findValueByNumber(int number) { + return DisplayType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.getDescriptor().getEnumTypes().get(0); + } + + private static final DisplayType[] VALUES = values(); + + public static DisplayType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private DisplayType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:WebSystemNoticeFeed.DisplayType) + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * <code>string id = 1;</code> + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_FIELD_NUMBER = 2; + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return user_ != null; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + + public static final int TIME_FIELD_NUMBER = 3; + private long time_ = 0L; + /** + * <code>uint64 time = 3;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + + public static final int CONTENT_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + /** + * <code>string content = 4;</code> + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + /** + * <code>string content = 4;</code> + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAYDURATION_FIELD_NUMBER = 5; + private long displayDuration_ = 0L; + /** + * <code>uint64 displayDuration = 5;</code> + * @return The displayDuration. + */ + @java.lang.Override + public long getDisplayDuration() { + return displayDuration_; + } + + public static final int SORTRANK_FIELD_NUMBER = 6; + private long sortRank_ = 0L; + /** + * <code>uint64 sortRank = 6;</code> + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + + public static final int DISPLAYTYPE_FIELD_NUMBER = 7; + private int displayType_ = 0; + /** + * <code>.WebSystemNoticeFeed.DisplayType displayType = 7;</code> + * @return The enum numeric value on the wire for displayType. + */ + @java.lang.Override public int getDisplayTypeValue() { + return displayType_; + } + /** + * <code>.WebSystemNoticeFeed.DisplayType displayType = 7;</code> + * @return The displayType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType getDisplayType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType.forNumber(displayType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (user_ != null) { + output.writeMessage(2, getUser()); + } + if (time_ != 0L) { + output.writeUInt64(3, time_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, content_); + } + if (displayDuration_ != 0L) { + output.writeUInt64(5, displayDuration_); + } + if (sortRank_ != 0L) { + output.writeUInt64(6, sortRank_); + } + if (displayType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType.UNKNOWN_DISPLAY_TYPE.getNumber()) { + output.writeEnum(7, displayType_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); + } + if (user_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUser()); + } + if (time_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, time_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, content_); + } + if (displayDuration_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(5, displayDuration_); + } + if (sortRank_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(6, sortRank_); + } + if (displayType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType.UNKNOWN_DISPLAY_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, displayType_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getTime() + != other.getTime()) return false; + if (!getContent() + .equals(other.getContent())) return false; + if (getDisplayDuration() + != other.getDisplayDuration()) return false; + if (getSortRank() + != other.getSortRank()) return false; + if (displayType_ != other.displayType_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + TIME_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTime()); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + DISPLAYDURATION_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDisplayDuration()); + hash = (37 * hash) + SORTRANK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSortRank()); + hash = (37 * hash) + DISPLAYTYPE_FIELD_NUMBER; + hash = (53 * hash) + displayType_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code WebSystemNoticeFeed} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:WebSystemNoticeFeed) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeedOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.internal_static_WebSystemNoticeFeed_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.internal_static_WebSystemNoticeFeed_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + time_ = 0L; + content_ = ""; + displayDuration_ = 0L; + sortRank_ = 0L; + displayType_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.internal_static_WebSystemNoticeFeed_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.time_ = time_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.content_ = content_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.displayDuration_ = displayDuration_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.sortRank_ = sortRank_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.displayType_ = displayType_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getTime() != 0L) { + setTime(other.getTime()); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.getDisplayDuration() != 0L) { + setDisplayDuration(other.getDisplayDuration()); + } + if (other.getSortRank() != 0L) { + setSortRank(other.getSortRank()); + } + if (other.displayType_ != 0) { + setDisplayTypeValue(other.getDisplayTypeValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + time_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + displayDuration_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + sortRank_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + displayType_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 56 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * <code>string id = 1;</code> + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string id = 1;</code> + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string id = 1;</code> + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>string id = 1;</code> + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * <code>string id = 1;</code> + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> userBuilder_; + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * <code>.SimpleUserInfo user = 2;</code> + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000002); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder getUserBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + } + /** + * <code>.SimpleUserInfo user = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private long time_ ; + /** + * <code>uint64 time = 3;</code> + * @return The time. + */ + @java.lang.Override + public long getTime() { + return time_; + } + /** + * <code>uint64 time = 3;</code> + * @param value The time to set. + * @return This builder for chaining. + */ + public Builder setTime(long value) { + + time_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>uint64 time = 3;</code> + * @return This builder for chaining. + */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000004); + time_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + /** + * <code>string content = 4;</code> + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string content = 4;</code> + * @return The bytes for content. + */ + public com.google.protobuf.ByteString + getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string content = 4;</code> + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + content_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>string content = 4;</code> + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * <code>string content = 4;</code> + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private long displayDuration_ ; + /** + * <code>uint64 displayDuration = 5;</code> + * @return The displayDuration. + */ + @java.lang.Override + public long getDisplayDuration() { + return displayDuration_; + } + /** + * <code>uint64 displayDuration = 5;</code> + * @param value The displayDuration to set. + * @return This builder for chaining. + */ + public Builder setDisplayDuration(long value) { + + displayDuration_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>uint64 displayDuration = 5;</code> + * @return This builder for chaining. + */ + public Builder clearDisplayDuration() { + bitField0_ = (bitField0_ & ~0x00000010); + displayDuration_ = 0L; + onChanged(); + return this; + } + + private long sortRank_ ; + /** + * <code>uint64 sortRank = 6;</code> + * @return The sortRank. + */ + @java.lang.Override + public long getSortRank() { + return sortRank_; + } + /** + * <code>uint64 sortRank = 6;</code> + * @param value The sortRank to set. + * @return This builder for chaining. + */ + public Builder setSortRank(long value) { + + sortRank_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * <code>uint64 sortRank = 6;</code> + * @return This builder for chaining. + */ + public Builder clearSortRank() { + bitField0_ = (bitField0_ & ~0x00000020); + sortRank_ = 0L; + onChanged(); + return this; + } + + private int displayType_ = 0; + /** + * <code>.WebSystemNoticeFeed.DisplayType displayType = 7;</code> + * @return The enum numeric value on the wire for displayType. + */ + @java.lang.Override public int getDisplayTypeValue() { + return displayType_; + } + /** + * <code>.WebSystemNoticeFeed.DisplayType displayType = 7;</code> + * @param value The enum numeric value on the wire for displayType to set. + * @return This builder for chaining. + */ + public Builder setDisplayTypeValue(int value) { + displayType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * <code>.WebSystemNoticeFeed.DisplayType displayType = 7;</code> + * @return The displayType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType getDisplayType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType.forNumber(displayType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType.UNRECOGNIZED : result; + } + /** + * <code>.WebSystemNoticeFeed.DisplayType displayType = 7;</code> + * @param value The displayType to set. + * @return This builder for chaining. + */ + public Builder setDisplayType(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed.DisplayType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + displayType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * <code>.WebSystemNoticeFeed.DisplayType displayType = 7;</code> + * @return This builder for chaining. + */ + public Builder clearDisplayType() { + bitField0_ = (bitField0_ & ~0x00000040); + displayType_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:WebSystemNoticeFeed) + } + + // @@protoc_insertion_point(class_scope:WebSystemNoticeFeed) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<WebSystemNoticeFeed> + PARSER = new com.google.protobuf.AbstractParser<WebSystemNoticeFeed>() { + @java.lang.Override + public WebSystemNoticeFeed parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<WebSystemNoticeFeed> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<WebSystemNoticeFeed> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebSystemNoticeFeedOuterClass.WebSystemNoticeFeed getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WebSystemNoticeFeed_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_WebSystemNoticeFeed_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031WebSystemNoticeFeed.proto\032\024SimpleUserI" + + "nfo.proto\"\215\002\n\023WebSystemNoticeFeed\022\n\n\002id\030" + + "\001 \001(\t\022\035\n\004user\030\002 \001(\0132\017.SimpleUserInfo\022\014\n\004" + + "time\030\003 \001(\004\022\017\n\007content\030\004 \001(\t\022\027\n\017displayDu" + + "ration\030\005 \001(\004\022\020\n\010sortRank\030\006 \001(\004\0225\n\013displa" + + "yType\030\007 \001(\0162 .WebSystemNoticeFeed.Displa" + + "yType\"J\n\013DisplayType\022\030\n\024UNKNOWN_DISPLAY_" + + "TYPE\020\000\022\013\n\007COMMENT\020\001\022\t\n\005ALERT\020\002\022\t\n\005TOAST\020" + + "\003B6\n4tech.ordinaryroad.live.chat.client." + + "kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(), + }); + internal_static_WebSystemNoticeFeed_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_WebSystemNoticeFeed_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_WebSystemNoticeFeed_descriptor, + new java.lang.String[] { "Id", "User", "Time", "Content", "DisplayDuration", "SortRank", "DisplayType", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebUserPauseTypeOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebUserPauseTypeOuterClass.java new file mode 100644 index 0000000..e86bfab --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebUserPauseTypeOuterClass.java @@ -0,0 +1,170 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebUserPauseType.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class WebUserPauseTypeOuterClass { + private WebUserPauseTypeOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code WebUserPauseType} + */ + public enum WebUserPauseType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * <code>UNKNOWN_USER_PAUSE_TYPE = 0;</code> + */ + UNKNOWN_USER_PAUSE_TYPE(0), + /** + * <code>BACKGROUND = 1;</code> + */ + BACKGROUND(1), + UNRECOGNIZED(-1), + ; + + /** + * <code>UNKNOWN_USER_PAUSE_TYPE = 0;</code> + */ + public static final int UNKNOWN_USER_PAUSE_TYPE_VALUE = 0; + /** + * <code>BACKGROUND = 1;</code> + */ + public static final int BACKGROUND_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static WebUserPauseType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static WebUserPauseType forNumber(int value) { + switch (value) { + case 0: return UNKNOWN_USER_PAUSE_TYPE; + case 1: return BACKGROUND; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap<WebUserPauseType> + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + WebUserPauseType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap<WebUserPauseType>() { + public WebUserPauseType findValueByNumber(int number) { + return WebUserPauseType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebUserPauseTypeOuterClass.getDescriptor().getEnumTypes().get(0); + } + + private static final WebUserPauseType[] VALUES = values(); + + public static WebUserPauseType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private WebUserPauseType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:WebUserPauseType) + } + + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026WebUserPauseType.proto*?\n\020WebUserPause" + + "Type\022\033\n\027UNKNOWN_USER_PAUSE_TYPE\020\000\022\016\n\nBAC" + + "KGROUND\020\001B6\n4tech.ordinaryroad.live.chat" + + ".client.kuaishou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebWatchingUserInfoOuterClass.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebWatchingUserInfoOuterClass.java new file mode 100644 index 0000000..15e9bb2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/java/tech/ordinaryroad/live/chat/client/kuaishou/protobuf/WebWatchingUserInfoOuterClass.java @@ -0,0 +1,1080 @@ +/* + * MIT License + * + * Copyright (c) 2023 OrdinaryRoad + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: WebWatchingUserInfo.proto + +package tech.ordinaryroad.live.chat.client.kuaishou.protobuf; + +public final class WebWatchingUserInfoOuterClass { + private WebWatchingUserInfoOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface WebWatchingUserInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:WebWatchingUserInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>.SimpleUserInfo user = 1;</code> + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * <code>.SimpleUserInfo user = 1;</code> + * @return The user. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser(); + /** + * <code>.SimpleUserInfo user = 1;</code> + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder(); + + /** + * <code>bool offline = 2;</code> + * @return The offline. + */ + boolean getOffline(); + + /** + * <code>bool tuhao = 3;</code> + * @return The tuhao. + */ + boolean getTuhao(); + + /** + * <code>.WebLiveAssistantType liveAssistantType = 4;</code> + * @return The enum numeric value on the wire for liveAssistantType. + */ + int getLiveAssistantTypeValue(); + /** + * <code>.WebLiveAssistantType liveAssistantType = 4;</code> + * @return The liveAssistantType. + */ + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType(); + + /** + * <code>string displayKsCoin = 5;</code> + * @return The displayKsCoin. + */ + java.lang.String getDisplayKsCoin(); + /** + * <code>string displayKsCoin = 5;</code> + * @return The bytes for displayKsCoin. + */ + com.google.protobuf.ByteString + getDisplayKsCoinBytes(); + } + /** + * Protobuf type {@code WebWatchingUserInfo} + */ + public static final class WebWatchingUserInfo extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:WebWatchingUserInfo) + WebWatchingUserInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebWatchingUserInfo.newBuilder() to construct. + private WebWatchingUserInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private WebWatchingUserInfo() { + liveAssistantType_ = 0; + displayKsCoin_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebWatchingUserInfo(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.internal_static_WebWatchingUserInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.internal_static_WebWatchingUserInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder.class); + } + + public static final int USER_FIELD_NUMBER = 1; + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + /** + * <code>.SimpleUserInfo user = 1;</code> + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return user_ != null; + } + /** + * <code>.SimpleUserInfo user = 1;</code> + * @return The user. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + /** + * <code>.SimpleUserInfo user = 1;</code> + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + + public static final int OFFLINE_FIELD_NUMBER = 2; + private boolean offline_ = false; + /** + * <code>bool offline = 2;</code> + * @return The offline. + */ + @java.lang.Override + public boolean getOffline() { + return offline_; + } + + public static final int TUHAO_FIELD_NUMBER = 3; + private boolean tuhao_ = false; + /** + * <code>bool tuhao = 3;</code> + * @return The tuhao. + */ + @java.lang.Override + public boolean getTuhao() { + return tuhao_; + } + + public static final int LIVEASSISTANTTYPE_FIELD_NUMBER = 4; + private int liveAssistantType_ = 0; + /** + * <code>.WebLiveAssistantType liveAssistantType = 4;</code> + * @return The enum numeric value on the wire for liveAssistantType. + */ + @java.lang.Override public int getLiveAssistantTypeValue() { + return liveAssistantType_; + } + /** + * <code>.WebLiveAssistantType liveAssistantType = 4;</code> + * @return The liveAssistantType. + */ + @java.lang.Override public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.forNumber(liveAssistantType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNRECOGNIZED : result; + } + + public static final int DISPLAYKSCOIN_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object displayKsCoin_ = ""; + /** + * <code>string displayKsCoin = 5;</code> + * @return The displayKsCoin. + */ + @java.lang.Override + public java.lang.String getDisplayKsCoin() { + java.lang.Object ref = displayKsCoin_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayKsCoin_ = s; + return s; + } + } + /** + * <code>string displayKsCoin = 5;</code> + * @return The bytes for displayKsCoin. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDisplayKsCoinBytes() { + java.lang.Object ref = displayKsCoin_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayKsCoin_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (user_ != null) { + output.writeMessage(1, getUser()); + } + if (offline_ != false) { + output.writeBool(2, offline_); + } + if (tuhao_ != false) { + output.writeBool(3, tuhao_); + } + if (liveAssistantType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNKNOWN_ASSISTANT_TYPE.getNumber()) { + output.writeEnum(4, liveAssistantType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayKsCoin_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayKsCoin_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (user_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUser()); + } + if (offline_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, offline_); + } + if (tuhao_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, tuhao_); + } + if (liveAssistantType_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNKNOWN_ASSISTANT_TYPE.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, liveAssistantType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayKsCoin_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayKsCoin_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo)) { + return super.equals(obj); + } + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo other = (tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo) obj; + + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser() + .equals(other.getUser())) return false; + } + if (getOffline() + != other.getOffline()) return false; + if (getTuhao() + != other.getTuhao()) return false; + if (liveAssistantType_ != other.liveAssistantType_) return false; + if (!getDisplayKsCoin() + .equals(other.getDisplayKsCoin())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().hashCode(); + } + hash = (37 * hash) + OFFLINE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getOffline()); + hash = (37 * hash) + TUHAO_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getTuhao()); + hash = (37 * hash) + LIVEASSISTANTTYPE_FIELD_NUMBER; + hash = (53 * hash) + liveAssistantType_; + hash = (37 * hash) + DISPLAYKSCOIN_FIELD_NUMBER; + hash = (53 * hash) + getDisplayKsCoin().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code WebWatchingUserInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:WebWatchingUserInfo) + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.internal_static_WebWatchingUserInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.internal_static_WebWatchingUserInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.class, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.Builder.class); + } + + // Construct using tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + offline_ = false; + tuhao_ = false; + liveAssistantType_ = 0; + displayKsCoin_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.internal_static_WebWatchingUserInfo_descriptor; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo getDefaultInstanceForType() { + return tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.getDefaultInstance(); + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo build() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo buildPartial() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo result = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.user_ = userBuilder_ == null + ? user_ + : userBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.offline_ = offline_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.tuhao_ = tuhao_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.liveAssistantType_ = liveAssistantType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.displayKsCoin_ = displayKsCoin_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo) { + return mergeFrom((tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo other) { + if (other == tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo.getDefaultInstance()) return this; + if (other.hasUser()) { + mergeUser(other.getUser()); + } + if (other.getOffline() != false) { + setOffline(other.getOffline()); + } + if (other.getTuhao() != false) { + setTuhao(other.getTuhao()); + } + if (other.liveAssistantType_ != 0) { + setLiveAssistantTypeValue(other.getLiveAssistantTypeValue()); + } + if (!other.getDisplayKsCoin().isEmpty()) { + displayKsCoin_ = other.displayKsCoin_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUserFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + offline_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + tuhao_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + liveAssistantType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + displayKsCoin_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo user_; + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> userBuilder_; + /** + * <code>.SimpleUserInfo user = 1;</code> + * @return Whether the user field is set. + */ + public boolean hasUser() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * <code>.SimpleUserInfo user = 1;</code> + * @return The user. + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo getUser() { + if (userBuilder_ == null) { + return user_ == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * <code>.SimpleUserInfo user = 1;</code> + */ + public Builder setUser(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + } else { + userBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 1;</code> + */ + public Builder setUser( + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 1;</code> + */ + public Builder mergeUser(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo value) { + if (userBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + user_ != null && + user_ != tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance()) { + getUserBuilder().mergeFrom(value); + } else { + user_ = value; + } + } else { + userBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 1;</code> + */ + public Builder clearUser() { + bitField0_ = (bitField0_ & ~0x00000001); + user_ = null; + if (userBuilder_ != null) { + userBuilder_.dispose(); + userBuilder_ = null; + } + onChanged(); + return this; + } + /** + * <code>.SimpleUserInfo user = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder getUserBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * <code>.SimpleUserInfo user = 1;</code> + */ + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.getDefaultInstance() : user_; + } + } + /** + * <code>.SimpleUserInfo user = 1;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfo.Builder, tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.SimpleUserInfoOrBuilder>( + getUser(), + getParentForChildren(), + isClean()); + user_ = null; + } + return userBuilder_; + } + + private boolean offline_ ; + /** + * <code>bool offline = 2;</code> + * @return The offline. + */ + @java.lang.Override + public boolean getOffline() { + return offline_; + } + /** + * <code>bool offline = 2;</code> + * @param value The offline to set. + * @return This builder for chaining. + */ + public Builder setOffline(boolean value) { + + offline_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * <code>bool offline = 2;</code> + * @return This builder for chaining. + */ + public Builder clearOffline() { + bitField0_ = (bitField0_ & ~0x00000002); + offline_ = false; + onChanged(); + return this; + } + + private boolean tuhao_ ; + /** + * <code>bool tuhao = 3;</code> + * @return The tuhao. + */ + @java.lang.Override + public boolean getTuhao() { + return tuhao_; + } + /** + * <code>bool tuhao = 3;</code> + * @param value The tuhao to set. + * @return This builder for chaining. + */ + public Builder setTuhao(boolean value) { + + tuhao_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * <code>bool tuhao = 3;</code> + * @return This builder for chaining. + */ + public Builder clearTuhao() { + bitField0_ = (bitField0_ & ~0x00000004); + tuhao_ = false; + onChanged(); + return this; + } + + private int liveAssistantType_ = 0; + /** + * <code>.WebLiveAssistantType liveAssistantType = 4;</code> + * @return The enum numeric value on the wire for liveAssistantType. + */ + @java.lang.Override public int getLiveAssistantTypeValue() { + return liveAssistantType_; + } + /** + * <code>.WebLiveAssistantType liveAssistantType = 4;</code> + * @param value The enum numeric value on the wire for liveAssistantType to set. + * @return This builder for chaining. + */ + public Builder setLiveAssistantTypeValue(int value) { + liveAssistantType_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * <code>.WebLiveAssistantType liveAssistantType = 4;</code> + * @return The liveAssistantType. + */ + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType getLiveAssistantType() { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType result = tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.forNumber(liveAssistantType_); + return result == null ? tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType.UNRECOGNIZED : result; + } + /** + * <code>.WebLiveAssistantType liveAssistantType = 4;</code> + * @param value The liveAssistantType to set. + * @return This builder for chaining. + */ + public Builder setLiveAssistantType(tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.WebLiveAssistantType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + liveAssistantType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * <code>.WebLiveAssistantType liveAssistantType = 4;</code> + * @return This builder for chaining. + */ + public Builder clearLiveAssistantType() { + bitField0_ = (bitField0_ & ~0x00000008); + liveAssistantType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object displayKsCoin_ = ""; + /** + * <code>string displayKsCoin = 5;</code> + * @return The displayKsCoin. + */ + public java.lang.String getDisplayKsCoin() { + java.lang.Object ref = displayKsCoin_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayKsCoin_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string displayKsCoin = 5;</code> + * @return The bytes for displayKsCoin. + */ + public com.google.protobuf.ByteString + getDisplayKsCoinBytes() { + java.lang.Object ref = displayKsCoin_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayKsCoin_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string displayKsCoin = 5;</code> + * @param value The displayKsCoin to set. + * @return This builder for chaining. + */ + public Builder setDisplayKsCoin( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + displayKsCoin_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * <code>string displayKsCoin = 5;</code> + * @return This builder for chaining. + */ + public Builder clearDisplayKsCoin() { + displayKsCoin_ = getDefaultInstance().getDisplayKsCoin(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * <code>string displayKsCoin = 5;</code> + * @param value The bytes for displayKsCoin to set. + * @return This builder for chaining. + */ + public Builder setDisplayKsCoinBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + displayKsCoin_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:WebWatchingUserInfo) + } + + // @@protoc_insertion_point(class_scope:WebWatchingUserInfo) + private static final tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo(); + } + + public static tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<WebWatchingUserInfo> + PARSER = new com.google.protobuf.AbstractParser<WebWatchingUserInfo>() { + @java.lang.Override + public WebWatchingUserInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser<WebWatchingUserInfo> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<WebWatchingUserInfo> getParserForType() { + return PARSER; + } + + @java.lang.Override + public tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebWatchingUserInfoOuterClass.WebWatchingUserInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WebWatchingUserInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_WebWatchingUserInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031WebWatchingUserInfo.proto\032\024SimpleUserI" + + "nfo.proto\032\032WebLiveAssistantType.proto\"\235\001" + + "\n\023WebWatchingUserInfo\022\035\n\004user\030\001 \001(\0132\017.Si" + + "mpleUserInfo\022\017\n\007offline\030\002 \001(\010\022\r\n\005tuhao\030\003" + + " \001(\010\0220\n\021liveAssistantType\030\004 \001(\0162\025.WebLiv" + + "eAssistantType\022\025\n\rdisplayKsCoin\030\005 \001(\tB6\n" + + "4tech.ordinaryroad.live.chat.client.kuai" + + "shou.protobufb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(), + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.getDescriptor(), + }); + internal_static_WebWatchingUserInfo_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_WebWatchingUserInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_WebWatchingUserInfo_descriptor, + new java.lang.String[] { "User", "Offline", "Tuhao", "LiveAssistantType", "DisplayKsCoin", }); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.SimpleUserInfoOuterClass.getDescriptor(); + tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebLiveAssistantTypeOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/AuditAudienceMask.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/AuditAudienceMask.proto new file mode 100644 index 0000000..8ffa40c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/AuditAudienceMask.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +import "LiveCdnNodeView.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message AuditAudienceMask { + repeated LiveCdnNodeView iconCdnNodeView = 1; + string title = 2; + string detail = 3; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSError.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSError.proto new file mode 100644 index 0000000..0e179c2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSError.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message CSError { + uint32 code = 1; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSHeartbeat.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSHeartbeat.proto new file mode 100644 index 0000000..0b37909 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSHeartbeat.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message CSHeartbeat { + uint64 timestamp = 1; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSPing.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSPing.proto new file mode 100644 index 0000000..a7b66fb --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSPing.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +import "ClientId.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message CSPing { + string echoData = 1; + ClientId clientId = 2; + string deviceId = 3; + string appVer = 4; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebEnterRoom.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebEnterRoom.proto new file mode 100644 index 0000000..3b88423 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebEnterRoom.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message CSWebEnterRoom { + string token = 1; + string liveStreamId = 2; + uint32 reconnectCount = 3; + uint32 lastErrorCode = 4; + string expTag = 5; + string attach = 6; + string pageId = 7; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebError.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebError.proto new file mode 100644 index 0000000..e49d4d4 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebError.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message CSWebError { + uint32 code = 1; + string msg = 2; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebHeartbeat.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebHeartbeat.proto new file mode 100644 index 0000000..bde6248 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebHeartbeat.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message CSWebHeartbeat { + uint64 timestamp = 1; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebUserExit.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebUserExit.proto new file mode 100644 index 0000000..348f3aa --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebUserExit.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message CSWebUserExit { + uint64 time = 1; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebUserPause.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebUserPause.proto new file mode 100644 index 0000000..5987e01 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/CSWebUserPause.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; +import "WebUserPauseType.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message CSWebUserPause { + uint64 time = 1; + WebUserPauseType pauseType = 2; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/ClientId.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/ClientId.proto new file mode 100644 index 0000000..5ec34ad --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/ClientId.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +enum ClientId { + NONE = 0; + IPHONE = 1; + ANDROID = 2; + WEB = 3; + PC = 6; + IPHONE_LIVE_MATE = 8; + ANDROID_LIVE_MATE = 9; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/ConfigSwitchItem.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/ConfigSwitchItem.proto new file mode 100644 index 0000000..efb3507 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/ConfigSwitchItem.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; +import "ConfigSwitchType.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message ConfigSwitchItem { + ConfigSwitchType configSwitchType = 1; + bool value = 2; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/ConfigSwitchType.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/ConfigSwitchType.proto new file mode 100644 index 0000000..3fa75b8 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/ConfigSwitchType.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +enum ConfigSwitchType { + UNKNOWN = 0; + HIDE_BARRAGE = 1; + HIDE_SPECIAL_EFFECT = 2; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/GzoneNameplate.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/GzoneNameplate.proto new file mode 100644 index 0000000..b8212e7 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/GzoneNameplate.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +import "PicUrl.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message GzoneNameplate { + int64 id = 1; + string name = 2; + repeated PicUrl urls = 3; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/LiveAudienceState.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/LiveAudienceState.proto new file mode 100644 index 0000000..79c0636 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/LiveAudienceState.proto @@ -0,0 +1,22 @@ +syntax = "proto3"; +import "GzoneNameplate.proto"; +import "LiveFansGroupState.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message LiveAudienceState { + bool isFromFansTop = 1; + bool isKoi = 2; + AssistantType assistantType = 3; + uint32 fansGroupIntimacyLevel = 4; + GzoneNameplate nameplate = 5; + LiveFansGroupState liveFansGroupState = 6; + uint32 wealthGrade = 7; + string badgeKey = 8; + +enum AssistantType { + UNKNOWN_ASSISTANT_TYPE = 0; + SUPER = 1; + JUNIOR = 2; +} +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/LiveCdnNodeView.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/LiveCdnNodeView.proto new file mode 100644 index 0000000..495eb9e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/LiveCdnNodeView.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message LiveCdnNodeView { + string cdn = 1; + string url = 2; + bool freeTraffic = 3; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/LiveFansGroupState.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/LiveFansGroupState.proto new file mode 100644 index 0000000..107d4fd --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/LiveFansGroupState.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message LiveFansGroupState { + uint32 intimacyLevel = 1; + uint32 enterRoomSpecialEffect = 2; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/PSHostInfo.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/PSHostInfo.proto new file mode 100644 index 0000000..1eb3042 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/PSHostInfo.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message PSHostInfo { + string ip = 1; + int32 port = 2; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/PayloadType.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/PayloadType.proto new file mode 100644 index 0000000..05eafc2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/PayloadType.proto @@ -0,0 +1,65 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +enum PayloadType { + UNKNOWN = 0; + CS_HEARTBEAT = 1; + CS_ERROR = 3; + CS_PING = 4; + PS_HOST_INFO = 51; + SC_HEARTBEAT_ACK = 101; + SC_ECHO = 102; + SC_ERROR = 103; + SC_PING_ACK = 104; + SC_INFO = 105; + CS_ENTER_ROOM = 200; + CS_USER_PAUSE = 201; + CS_USER_EXIT = 202; + CS_AUTHOR_PUSH_TRAFFIC_ZERO = 203; + CS_HORSE_RACING = 204; + CS_RACE_LOSE = 205; + CS_VOIP_SIGNAL = 206; + SC_ENTER_ROOM_ACK = 300; + SC_AUTHOR_PAUSE = 301; + SC_AUTHOR_RESUME = 302; + SC_AUTHOR_PUSH_TRAFFIC_ZERO = 303; + SC_AUTHOR_HEARTBEAT_MISS = 304; + SC_PIP_STARTED = 305; + SC_PIP_ENDED = 306; + SC_HORSE_RACING_ACK = 307; + SC_VOIP_SIGNAL = 308; + SC_FEED_PUSH = 310; + SC_ASSISTANT_STATUS = 311; + SC_REFRESH_WALLET = 312; + SC_LIVE_CHAT_CALL = 320; + SC_LIVE_CHAT_CALL_ACCEPTED = 321; + SC_LIVE_CHAT_CALL_REJECTED = 322; + SC_LIVE_CHAT_READY = 323; + SC_LIVE_CHAT_GUEST_END = 324; + SC_LIVE_CHAT_ENDED = 325; + SC_RENDERING_MAGIC_FACE_DISABLE = 326; + SC_RENDERING_MAGIC_FACE_ENABLE = 327; + SC_RED_PACK_FEED = 330; + SC_LIVE_WATCHING_LIST = 340; + SC_LIVE_QUIZ_QUESTION_ASKED = 350; + SC_LIVE_QUIZ_QUESTION_REVIEWED = 351; + SC_LIVE_QUIZ_SYNC = 352; + SC_LIVE_QUIZ_ENDED = 353; + SC_LIVE_QUIZ_WINNERS = 354; + SC_SUSPECTED_VIOLATION = 355; + SC_SHOP_OPENED = 360; + SC_SHOP_CLOSED = 361; + SC_GUESS_OPENED = 370; + SC_GUESS_CLOSED = 371; + SC_PK_INVITATION = 380; + SC_PK_STATISTIC = 381; + SC_RIDDLE_OPENED = 390; + SC_RIDDLE_CLOESED = 391; + SC_RIDE_CHANGED = 412; + SC_BET_CHANGED = 441; + SC_BET_CLOSED = 442; + SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE = 645; + SC_LIVE_WARNING_MASK_STATUS_CHANGED_AUDIENCE = 758; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/PicUrl.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/PicUrl.proto new file mode 100644 index 0000000..891fea7 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/PicUrl.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message PicUrl { + string cdn = 1; + string url = 2; + string urlPattern = 3; + string ip = 4; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCEcho.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCEcho.proto new file mode 100644 index 0000000..6682ba6 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCEcho.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCEcho { + string content = 1; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCError.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCError.proto new file mode 100644 index 0000000..c901028 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCError.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCError { + uint32 code = 1; + string msg = 2; + uint32 subCode = 3; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCHeartbeatAck.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCHeartbeatAck.proto new file mode 100644 index 0000000..9242e93 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCHeartbeatAck.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCHeartbeatAck { + uint64 timestamp = 1; + uint64 clientTimestamp = 2; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCInfo.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCInfo.proto new file mode 100644 index 0000000..3099f77 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCInfo.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCInfo { + uint32 code = 1; + string msg = 2; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCLiveWarningMaskStatusChangedAudience.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCLiveWarningMaskStatusChangedAudience.proto new file mode 100644 index 0000000..ebceb65 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCLiveWarningMaskStatusChangedAudience.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; +import "AuditAudienceMask.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCLiveWarningMaskStatusChangedAudience { + bool displayMask = 1; + AuditAudienceMask warningMask = 2; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCPingAck.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCPingAck.proto new file mode 100644 index 0000000..202a86a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCPingAck.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCPingAck { + string echoData = 1; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebAuthorPause.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebAuthorPause.proto new file mode 100644 index 0000000..7beb4e6 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebAuthorPause.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; +import "WebPauseType.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebAuthorPause { + uint64 time = 1; + WebPauseType pauseType = 2; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebAuthorResume.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebAuthorResume.proto new file mode 100644 index 0000000..fdeae3a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebAuthorResume.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebAuthorResume { + uint64 time = 1; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebBetChanged.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebBetChanged.proto new file mode 100644 index 0000000..a8b58cb --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebBetChanged.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebBetChanged { + uint64 maxDelayMillis = 1; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebBetClosed.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebBetClosed.proto new file mode 100644 index 0000000..dec4c1d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebBetClosed.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebBetClosed { + uint64 maxDelayMillis = 1; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebCurrentRedPackFeed.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebCurrentRedPackFeed.proto new file mode 100644 index 0000000..64b9a41 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebCurrentRedPackFeed.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; +import "WebRedPackInfo.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebCurrentRedPackFeed { + repeated WebRedPackInfo redPack = 1; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebEnterRoomAck.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebEnterRoomAck.proto new file mode 100644 index 0000000..8885071 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebEnterRoomAck.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebEnterRoomAck { + uint64 minReconnectMs = 1; + uint64 maxReconnectMs = 2; + uint64 heartbeatIntervalMs = 3; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebError.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebError.proto new file mode 100644 index 0000000..7bc8644 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebError.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebError { + uint32 code = 1; + string msg = 2; + uint32 subCode = 3; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebFeedPush.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebFeedPush.proto new file mode 100644 index 0000000..c7c41d1 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebFeedPush.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; +import "WebCommentFeed.proto"; +import "WebComboCommentFeed.proto"; +import "WebLikeFeed.proto"; +import "WebGiftFeed.proto"; +import "WebSystemNoticeFeed.proto"; +import "WebShareFeed.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebFeedPush { + string displayWatchingCount = 1; + string displayLikeCount = 2; + uint64 pendingLikeCount = 3; + uint64 pushInterval = 4; + repeated WebCommentFeed commentFeeds = 5; + string commentCursor = 6; + repeated WebComboCommentFeed comboCommentFeed = 7; + repeated WebLikeFeed likeFeeds = 8; + repeated WebGiftFeed giftFeeds = 9; + string giftCursor = 10; + repeated WebSystemNoticeFeed systemNoticeFeeds = 11; + repeated WebShareFeed shareFeeds = 12; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebGuessClosed.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebGuessClosed.proto new file mode 100644 index 0000000..53e3f63 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebGuessClosed.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebGuessClosed { + uint64 time = 1; + string guessId = 2; + uint64 displayMaxDelayMillis = 3; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebGuessOpened.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebGuessOpened.proto new file mode 100644 index 0000000..d46f065 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebGuessOpened.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebGuessOpened { + uint64 time = 1; + string guessId = 2; + uint64 submitDeadline = 3; + uint64 displayMaxDelayMillis = 4; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebHeartbeatAck.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebHeartbeatAck.proto new file mode 100644 index 0000000..6a6e32b --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebHeartbeatAck.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebHeartbeatAck { + uint64 timestamp = 1; + uint64 clientTimestamp = 2; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebLiveSpecialAccountConfigState.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebLiveSpecialAccountConfigState.proto new file mode 100644 index 0000000..bd2b5fe --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebLiveSpecialAccountConfigState.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; +import "ConfigSwitchItem.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebLiveSpecialAccountConfigState { + repeated ConfigSwitchItem configSwitchItem = 1; + uint64 timestamp = 2; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebLiveWatchingUsers.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebLiveWatchingUsers.proto new file mode 100644 index 0000000..c838173 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebLiveWatchingUsers.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +import "WebWatchingUserInfo.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebLiveWatchingUsers { + repeated WebWatchingUserInfo watchingUser = 1; + string displayWatchingCount = 2; + uint64 pendingDuration = 3; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebPipEnded.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebPipEnded.proto new file mode 100644 index 0000000..1fb073d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebPipEnded.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebPipEnded { + uint64 time = 1; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebPipStarted.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebPipStarted.proto new file mode 100644 index 0000000..5693a3d --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebPipStarted.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebPipStarted { + uint64 time = 1; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebRefreshWallet.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebRefreshWallet.proto new file mode 100644 index 0000000..f51c539 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebRefreshWallet.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebRefreshWallet { + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebRideChanged.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebRideChanged.proto new file mode 100644 index 0000000..2c31e7b --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebRideChanged.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebRideChanged { + string rideId = 1; + uint32 requestMaxDelayMillis = 2; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebSuspectedViolation.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebSuspectedViolation.proto new file mode 100644 index 0000000..a254104 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SCWebSuspectedViolation.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SCWebSuspectedViolation { + bool suspectedViolation = 1; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SimpleUserInfo.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SimpleUserInfo.proto new file mode 100644 index 0000000..cff3fea --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SimpleUserInfo.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SimpleUserInfo { + string principalId = 1; + string userName = 2; + string headUrl = 3; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SocketMessage.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SocketMessage.proto new file mode 100644 index 0000000..f75cfed --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/SocketMessage.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +import "PayloadType.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message SocketMessage { + PayloadType payloadType = 1; + CompressionType compressionType = 2; + bytes payload = 3; + +enum CompressionType { + UNKNOWN = 0; + NONE = 1; + GZIP = 2; + AES = 3; +} +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/UserInfo.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/UserInfo.proto new file mode 100644 index 0000000..5609492 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/UserInfo.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +import "PicUrl.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message UserInfo { + uint64 userId = 1; + string userName = 2; + string userGender = 3; + string userText = 4; + repeated PicUrl headUrls = 5; + bool verified = 6; + string sUserId = 7; + repeated PicUrl httpsHeadUrls = 8; + string kwaiId = 9; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebComboCommentFeed.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebComboCommentFeed.proto new file mode 100644 index 0000000..1ee68ca --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebComboCommentFeed.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message WebComboCommentFeed { + string id = 1; + string content = 2; + uint32 comboCount = 3; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebCommentFeed.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebCommentFeed.proto new file mode 100644 index 0000000..19c776b --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebCommentFeed.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; +import "SimpleUserInfo.proto"; +import "WebCommentFeedShowType.proto"; +import "LiveAudienceState.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message WebCommentFeed { + string id = 1; + SimpleUserInfo user = 2; + string content = 3; + string deviceHash = 4; + uint64 sortRank = 5; + string color = 6; + WebCommentFeedShowType showType = 7; + LiveAudienceState senderState = 8; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebCommentFeedShowType.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebCommentFeedShowType.proto new file mode 100644 index 0000000..7f11ee4 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebCommentFeedShowType.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +enum WebCommentFeedShowType { + FEED_SHOW_UNKNOWN = 0; + FEED_SHOW_NORMAL = 1; + FEED_HIDDEN = 2; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebGiftFeed.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebGiftFeed.proto new file mode 100644 index 0000000..0ff3c6c --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebGiftFeed.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; +import "SimpleUserInfo.proto"; +import "WebLiveAssistantType.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message WebGiftFeed { + string id = 1; + SimpleUserInfo user = 2; + uint64 time = 3; + uint32 intGiftId = 4; + uint64 sortRank = 5; + string mergeKey = 6; + uint32 batchSize = 7; + uint32 comboCount = 8; + uint32 rank = 9; + uint64 expireDuration = 10; + uint64 clientTimestamp = 11; + uint64 slotDisplayDuration = 12; + uint32 starLevel = 13; + StyleType styleType = 14; + WebLiveAssistantType liveAssistantType = 15; + string deviceHash = 16; + bool danmakuDisplay = 17; + +enum StyleType { + UNKNOWN_STYLE = 0; + BATCH_STAR_0 = 1; + BATCH_STAR_1 = 2; + BATCH_STAR_2 = 3; + BATCH_STAR_3 = 4; + BATCH_STAR_4 = 5; + BATCH_STAR_5 = 6; + BATCH_STAR_6 = 7; +} +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebLikeFeed.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebLikeFeed.proto new file mode 100644 index 0000000..ebcd99e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebLikeFeed.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; +import "SimpleUserInfo.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message WebLikeFeed { + string id = 1; + SimpleUserInfo user = 2; + uint64 sortRank = 3; + string deviceHash = 4; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebLiveAssistantType.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebLiveAssistantType.proto new file mode 100644 index 0000000..dc7c85f --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebLiveAssistantType.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +enum WebLiveAssistantType { + UNKNOWN_ASSISTANT_TYPE = 0; + SUPER = 1; + JUNIOR = 2; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebPauseType.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebPauseType.proto new file mode 100644 index 0000000..c190e09 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebPauseType.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +enum WebPauseType { + UNKNOWN_PAUSE_TYPE = 0; + TELEPHONE = 1; + SHARE = 2; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebRedPackCoverType.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebRedPackCoverType.proto new file mode 100644 index 0000000..25bc6a5 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebRedPackCoverType.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +enum WebRedPackCoverType { + UNKNOWN_COVER_TYPE = 0; + NORMAL_COVER = 1; + PRETTY_COVER = 2; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebRedPackInfo.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebRedPackInfo.proto new file mode 100644 index 0000000..c99aac4 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebRedPackInfo.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; +import "SimpleUserInfo.proto"; +import "WebRedPackCoverType.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message WebRedPackInfo { + string id = 1; + SimpleUserInfo author = 2; + uint64 balance = 3; + uint64 openTime = 4; + uint64 currentTime = 5; + string grabToken = 6; + bool needSendRequest = 7; + uint64 requestDelayMillis = 8; + uint64 luckiestDelayMillis = 9; + WebRedPackCoverType coverType = 10; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebShareFeed.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebShareFeed.proto new file mode 100644 index 0000000..9e829a3 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebShareFeed.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; +import "SimpleUserInfo.proto"; +import "WebLiveAssistantType.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message WebShareFeed { + string id = 1; + SimpleUserInfo user = 2; + uint64 time = 3; + uint32 thirdPartyPlatform = 4; + uint64 sortRank = 5; + WebLiveAssistantType liveAssistantType = 6; + string deviceHash = 7; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebSystemNoticeFeed.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebSystemNoticeFeed.proto new file mode 100644 index 0000000..a6a5ae2 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebSystemNoticeFeed.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +import "SimpleUserInfo.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message WebSystemNoticeFeed { + string id = 1; + SimpleUserInfo user = 2; + uint64 time = 3; + string content = 4; + uint64 displayDuration = 5; + uint64 sortRank = 6; + DisplayType displayType = 7; + +enum DisplayType { + UNKNOWN_DISPLAY_TYPE = 0; + COMMENT = 1; + ALERT = 2; + TOAST = 3; +} +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebUserPauseType.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebUserPauseType.proto new file mode 100644 index 0000000..9f3d284 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebUserPauseType.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +enum WebUserPauseType { + UNKNOWN_USER_PAUSE_TYPE = 0; + BACKGROUND = 1; +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebWatchingUserInfo.proto b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebWatchingUserInfo.proto new file mode 100644 index 0000000..ad6a10a --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/main/resources/proto/WebWatchingUserInfo.proto @@ -0,0 +1,14 @@ +syntax = "proto3"; +import "SimpleUserInfo.proto"; +import "WebLiveAssistantType.proto"; + +option java_package = "tech.ordinaryroad.live.chat.client.kuaishou.protobuf"; + +message WebWatchingUserInfo { + SimpleUserInfo user = 1; + bool offline = 2; + bool tuhao = 3; + WebLiveAssistantType liveAssistantType = 4; + string displayKsCoin = 5; + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/test/java/tech/ordinaryroad/live/chat/client/kuaishou/api/KuaishouApisTest.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/test/java/tech/ordinaryroad/live/chat/client/kuaishou/api/KuaishouApisTest.java new file mode 100644 index 0000000..db2fa9e --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/test/java/tech/ordinaryroad/live/chat/client/kuaishou/api/KuaishouApisTest.java @@ -0,0 +1,40 @@ +package tech.ordinaryroad.live.chat.client.kuaishou.api; + +import org.junit.jupiter.api.Test; + +import java.util.Map; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; + +/** + * @author mjz + * @date 2024/1/6 + */ +class KuaishouApisTest { + + @Test + void allgifts() { + Map<String, KuaishouApis.GiftInfo> allgifts = KuaishouApis.allgifts(); + assertNotEquals(0, allgifts.size()); + } + + @Test + void getGiftInfoById() { + KuaishouApis.GiftInfo giftInfoById = KuaishouApis.getGiftInfoById("1"); + assertEquals("鑽у厜妫�", giftInfoById.getGiftName()); + + } + + @Test + void sendComment() { + System.out.println(KuaishouApis.sendComment(System.getenv("cookie"), + "3x6pb6bcmjrarvs", + KuaishouApis.SendCommentRequest + .builder() + .liveStreamId("XKLoBv2mAEo") + .content("666666a") + .build() + )); + } +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/test/java/tech/ordinaryroad/live/chat/client/kuaishou/client/KuaishouLiveChatClientTest.java b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/test/java/tech/ordinaryroad/live/chat/client/kuaishou/client/KuaishouLiveChatClientTest.java new file mode 100644 index 0000000..ad94357 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/live-chat-client-kuaishou/src/test/java/tech/ordinaryroad/live/chat/client/kuaishou/client/KuaishouLiveChatClientTest.java @@ -0,0 +1,206 @@ +package tech.ordinaryroad.live.chat.client.kuaishou.client; + +import cn.hutool.core.thread.ThreadUtil; +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; +import tech.ordinaryroad.live.chat.client.commons.base.msg.ICmdMsg; +import tech.ordinaryroad.live.chat.client.commons.base.msg.IMsg; +import tech.ordinaryroad.live.chat.client.commons.client.enums.ClientStatusEnums; +import tech.ordinaryroad.live.chat.client.kuaishou.config.KuaishouLiveChatClientConfig; +import tech.ordinaryroad.live.chat.client.kuaishou.listener.IKuaishouMsgListener; +import tech.ordinaryroad.live.chat.client.kuaishou.msg.KuaishouDanmuMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.msg.KuaishouGiftMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.msg.KuaishouLikeMsg; +import tech.ordinaryroad.live.chat.client.kuaishou.netty.handler.KuaishouBinaryFrameHandler; +import tech.ordinaryroad.live.chat.client.kuaishou.protobuf.PayloadTypeOuterClass; +import tech.ordinaryroad.live.chat.client.kuaishou.protobuf.WebGiftFeedOuterClass; + +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author mjz + * @date 2024/1/5 + */ +@Slf4j +class KuaishouLiveChatClientTest { + + Map<String, List<WebGiftFeedOuterClass.WebGiftFeed>> map = new HashMap<>(); + + static Object lock = new Object(); + KuaishouLiveChatClient client; + + @Test + void example() throws InterruptedException { + String cookie = System.getenv("cookie"); +// String cookie =""; + log.error("cookie: {}", cookie); + KuaishouLiveChatClientConfig config = KuaishouLiveChatClientConfig.builder() + // TODO 娴忚鍣–ookie + .cookie(cookie) + .roomId("3xpbyu443usqwau") + .roomId("DX204317461") + .roomId("xzx11234") + .roomId("N-ik-T8-20") + .roomId("3x9f7e3t3fsr74k") + .roomId("3xiqpb2riusznvq") + .roomId("QQ2027379716") + .roomId("xiannvwan1008") + // 绁佸ぉ閬� + .roomId("t8888888") + .roomId("by529529") + // 澶у笀2 + .roomId("3x6pb6bcmjrarvs") + .roomId("3xbyfeffjhky7b2") + // 鏈堢 + .roomId("YUE99999") + .roomId("mengyu980726") + // 澶у笀1 + .roomId("3xkz5pb2kx3q4u6") + .build(); + + client = new KuaishouLiveChatClient(config, new IKuaishouMsgListener() { + @Override + public void onMsg(IMsg msg) { + // log.debug("鏀跺埌{}娑堟伅 {}", msg.getClass(), msg); + } + + @Override + public void onCmdMsg(PayloadTypeOuterClass.PayloadType cmd, ICmdMsg<PayloadTypeOuterClass.PayloadType> cmdMsg) { + // log.debug("鏀跺埌CMD娑堟伅{} {}", cmd, cmdMsg); + } + + @Override + public void onOtherCmdMsg(PayloadTypeOuterClass.PayloadType cmd, ICmdMsg<PayloadTypeOuterClass.PayloadType> cmdMsg) { + log.debug("鏀跺埌鍏朵粬CMD娑堟伅 {}", cmd); + } + + @Override + public void onUnknownCmd(String cmdString, IMsg msg) { + log.debug("鏀跺埌鏈煡CMD娑堟伅 {}", cmdString); + } + + @Override + public void onDanmuMsg(KuaishouBinaryFrameHandler binaryFrameHandler, KuaishouDanmuMsg msg) { + log.info("{} 鏀跺埌寮瑰箷 [{}] {}({})锛歿}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onGiftMsg(KuaishouBinaryFrameHandler binaryFrameHandler, KuaishouGiftMsg msg) { + String mergeKey = msg.getMsg().getMergeKey(); + map.computeIfAbsent(mergeKey, s -> new ArrayList<>()).add(msg.getMsg()); + + log.info("{} 鏀跺埌绀肩墿 [{}] {}({}) {} {}({})x{}({}) mergeKey:{},comboCount:{}, batchSize:{}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), "璧犻��", msg.getGiftName(), msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice(), msg.getMsg().getMergeKey(), msg.getMsg().getComboCount(), msg.getMsg().getBatchSize()); + } + }); + + client.addStatusChangeListener(new PropertyChangeListener() { + @Override + public void propertyChange(PropertyChangeEvent evt) { + ClientStatusEnums newValue = (ClientStatusEnums) evt.getNewValue(); + if (newValue == ClientStatusEnums.CONNECTED) { + // 杩炴帴鎴愬姛5绉掑悗鍙戦�佸脊骞� + ThreadUtil.execAsync(() -> { + ThreadUtil.sleep(10000); + client.sendDanmu("666666", new Runnable() { + @Override + public void run() { + log.warn("寮瑰箷鍙戦�佹垚鍔�"); + } + }); + }); + } + } + }); + + client.connect(); + + // 闃叉娴嬭瘯鏃剁洿鎺ラ��鍑� + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + + @Test + void clickLike() throws Exception { + String cookie = System.getenv("cookie"); +// String cookie =""; + log.error("cookie: {}", cookie); + KuaishouLiveChatClientConfig config = KuaishouLiveChatClientConfig.builder() + .cookie(cookie) + .roomId("K6866676") + .roomId("xinsang_") + .roomId("lollaopu") + .roomId("YTC2844073618") + .build(); + + client = new KuaishouLiveChatClient(config, new IKuaishouMsgListener() { + @Override + public void onMsg(IMsg msg) { +// log.debug("鏀跺埌{}娑堟伅 {}", msg.getClass(), msg); + } + + @Override + public void onCmdMsg(PayloadTypeOuterClass.PayloadType cmd, ICmdMsg<PayloadTypeOuterClass.PayloadType> cmdMsg) { +// log.debug("鏀跺埌CMD娑堟伅{} {}", cmd, cmdMsg); + } + + @Override + public void onOtherCmdMsg(PayloadTypeOuterClass.PayloadType cmd, ICmdMsg<PayloadTypeOuterClass.PayloadType> cmdMsg) { +// log.debug("鏀跺埌鍏朵粬CMD娑堟伅 {}", cmd); + } + + @Override + public void onUnknownCmd(String cmdString, IMsg msg) { +// log.debug("鏀跺埌鏈煡CMD娑堟伅 {}", cmdString); + } + + @Override + public void onDanmuMsg(KuaishouBinaryFrameHandler binaryFrameHandler, KuaishouDanmuMsg msg) { + log.info("{} 鏀跺埌寮瑰箷 [{}] {}({})锛歿}", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), msg.getContent()); + } + + @Override + public void onGiftMsg(KuaishouBinaryFrameHandler binaryFrameHandler, KuaishouGiftMsg msg) { + log.info("{} 鏀跺埌绀肩墿 [{}] {}({}) {} {}({})x{}({})", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid(), "璧犻��", msg.getGiftName(), msg.getGiftId(), msg.getGiftCount(), msg.getGiftPrice()); + } + + @Override + public void onLikeMsg(KuaishouBinaryFrameHandler binaryFrameHandler, KuaishouLikeMsg msg) { + log.info("{} 鏀跺埌鐐硅禐 [{}] {}({})", binaryFrameHandler.getRoomId(), msg.getBadgeLevel() != 0 ? msg.getBadgeLevel() + msg.getBadgeName() : "", msg.getUsername(), msg.getUid()); + } + }); + + client.addStatusChangeListener(evt -> { + ClientStatusEnums newValue = (ClientStatusEnums) evt.getNewValue(); + if (newValue == ClientStatusEnums.CONNECTED) { + // 杩炴帴鎴愬姛10绉掑悗鍙戦�佸脊骞� + ThreadUtil.execAsync(() -> { + ThreadUtil.sleep(10000); + client.sendDanmu("6666a", () -> { + log.warn("寮瑰箷鍙戦�佹垚鍔�"); + client.clickLike(13, () -> { + log.warn("涓虹洿鎾棿鐐硅禐鎴愬姛"); + }); + }); + }); + } + }); + + client.connect(); + + // 闃叉娴嬭瘯鏃剁洿鎺ラ��鍑� + while (true) { + synchronized (lock) { + lock.wait(); + } + } + } + +} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-live/live-chat-clients/pom.xml b/ruoyi-modules/ruoyi-live/live-chat-clients/pom.xml new file mode 100644 index 0000000..b09cfec --- /dev/null +++ b/ruoyi-modules/ruoyi-live/live-chat-clients/pom.xml @@ -0,0 +1,47 @@ +<!--<!–--> +<!-- ~ MIT License--> +<!-- ~--> +<!-- ~ Copyright (c) 2023 OrdinaryRoad--> +<!-- ~--> +<!-- ~ Permission is hereby granted, free of charge, to any person obtaining a copy--> +<!-- ~ of this software and associated documentation files (the "Software"), to deal--> +<!-- ~ in the Software without restriction, including without limitation the rights--> +<!-- ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell--> +<!-- ~ copies of the Software, and to permit persons to whom the Software is--> +<!-- ~ furnished to do so, subject to the following conditions:--> +<!-- ~--> +<!-- ~ The above copyright notice and this permission notice shall be included in all--> +<!-- ~ copies or substantial portions of the Software.--> +<!-- ~--> +<!-- ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR--> +<!-- ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,--> +<!-- ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE--> +<!-- ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER--> +<!-- ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,--> +<!-- ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE--> +<!-- ~ SOFTWARE.--> +<!-- –>--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.ruoyi</groupId> + <artifactId>ruoyi-live</artifactId> + <version>${revision}</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <packaging>pom</packaging> + + <artifactId>live-chat-clients</artifactId> + <name>live-chat-client</name> + + <modules> + <module>live-chat-client-bilibili</module> + <module>live-chat-client-douyu</module> + <module>live-chat-client-huya</module> + <module>live-chat-client-douyin</module> + <module>live-chat-client-kuaishou</module> + </modules> +</project> diff --git a/ruoyi-modules/ruoyi-live/pom.xml b/ruoyi-modules/ruoyi-live/pom.xml new file mode 100644 index 0000000..71247b7 --- /dev/null +++ b/ruoyi-modules/ruoyi-live/pom.xml @@ -0,0 +1,177 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <parent> + <groupId>org.ruoyi</groupId> + <artifactId>ruoyi-modules</artifactId> + <version>${revision}</version> + <relativePath>../pom.xml</relativePath> + </parent> + <packaging>pom</packaging> + <modelVersion>4.0.0</modelVersion> + <artifactId>ruoyi-live</artifactId> + + <description> + AI鐩存挱 + </description> + + <modules> + <module>live-chat-client-commons</module> + <module>live-chat-client-servers</module> + <module>live-chat-clients</module> + </modules> + + <properties> + <maven.compiler.source>8</maven.compiler.source> + <maven.compiler.target>8</maven.compiler.target> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven-source-plugin.version>3.2.1</maven-source-plugin.version> + <maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version> + <maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version> + <nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version> + + <brotli4j.version>1.13.0</brotli4j.version> + <jackson-databind.version>2.16.0</jackson-databind.version> + <hutool-all.version>5.8.24</hutool-all.version> + <netty-all.version>4.1.104.Final</netty-all.version> + <logback-classic.version>1.4.12</logback-classic.version> + <lombok.version>1.18.30</lombok.version> + <junit-jupiter.version>5.10.1</junit-jupiter.version> + <protobuf-java-util.version>3.25.1</protobuf-java-util.version> + <tars-core.version>1.7.3</tars-core.version> + </properties> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-commons-base</artifactId> + <version>1.0.0</version> + </dependency> + + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-commons-util</artifactId> + <version>1.0.0</version> + </dependency> + + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-commons-client</artifactId> + <version>1.0.0</version> + </dependency> + + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-servers-netty</artifactId> + <version>1.0.0</version> + </dependency> + + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-servers-netty-client</artifactId> + <version>1.0.0</version> + </dependency> + + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-bilibili</artifactId> + <version>1.0.0</version> + </dependency> + + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-douyu</artifactId> + <version>1.0.0</version> + </dependency> + + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-huya</artifactId> + <version>1.0.0</version> + </dependency> + + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-douyin</artifactId> + <version>1.0.0</version> + </dependency> + + <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>live-chat-client-kuaishou</artifactId> + <version>1.0.0</version> + </dependency> + + <dependency> + <groupId>com.aayushatharva.brotli4j</groupId> + <artifactId>brotli4j</artifactId> + <version>${brotli4j.version}</version> + </dependency> + + <dependency> + <groupId>com.google.protobuf</groupId> + <artifactId>protobuf-java-util</artifactId> + <version>${protobuf-java-util.version}</version> + </dependency> + + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>${jackson-databind.version}</version> + </dependency> + + <dependency> + <groupId>cn.hutool</groupId> + <artifactId>hutool-all</artifactId> + <version>${hutool-all.version}</version> + </dependency> + + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-all</artifactId> + <version>${netty-all.version}</version> + </dependency> + + <dependency> + <groupId>com.tencent.tars</groupId> + <artifactId>tars-core</artifactId> + <version>${tars-core.version}</version> + </dependency> + + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>${logback-classic.version}</version> + </dependency> + + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <version>${lombok.version}</version> + <scope>compile</scope> + </dependency> + + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter</artifactId> + <version>${junit-jupiter.version}</version> + <scope>test</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>com.squareup.okhttp3</groupId> + <artifactId>okhttp</artifactId> + <version>4.10.0</version> + </dependency> + </dependencies> + +</project> diff --git a/ruoyi-modules/ruoyi-midjourney/pom.xml b/ruoyi-modules/ruoyi-midjourney/pom.xml deleted file mode 100644 index 98e3503..0000000 --- a/ruoyi-modules/ruoyi-midjourney/pom.xml +++ /dev/null @@ -1,119 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - <parent> - <groupId>com.xmzs</groupId> - <artifactId>ruoyi-modules</artifactId> - <version>${revision}</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <modelVersion>4.0.0</modelVersion> - <artifactId>ruoyi-midjourney</artifactId> - - <description> - AI缁樼敾 - </description> - - <properties> - <hutool.version>5.8.18</hutool.version> - <org-json.version>20220924</org-json.version> - <jda.version>5.0.0-beta.9</jda.version> - <chatgpt-java.version>1.1.2-beta0</chatgpt-java.version> - <dataurl.version>2.0.0</dataurl.version> - <knife4j.verison>4.1.0</knife4j.verison> - <user-agent-utils.verison>1.21</user-agent-utils.verison> - <httpclient.verison>4.5.14</httpclient.verison> - <java.version>17</java.version> - <maven.compiler.source>${java.version}</maven.compiler.source> - <maven.compiler.target>${java.version}</maven.compiler.target> - </properties> - - <dependencies> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-web</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-data-redis</artifactId> - </dependency> - - <dependency> - <groupId>cn.hutool</groupId> - <artifactId>hutool-core</artifactId> - <version>${hutool.version}</version> - </dependency> - <dependency> - <groupId>cn.hutool</groupId> - <artifactId>hutool-cache</artifactId> - <version>${hutool.version}</version> - </dependency> - <dependency> - <groupId>cn.hutool</groupId> - <artifactId>hutool-crypto</artifactId> - <version>${hutool.version}</version> - </dependency> - <dependency> - <groupId>org.json</groupId> - <artifactId>json</artifactId> - <version>${org-json.version}</version> - </dependency> - <dependency> - <groupId>net.dv8tion</groupId> - <artifactId>JDA</artifactId> - <version>${jda.version}</version> - <exclusions> - <exclusion> - <groupId>club.minnced</groupId> - <artifactId>opus-java</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>com.unfbx</groupId> - <artifactId>chatgpt-java</artifactId> - <version>${chatgpt-java.version}</version> - <exclusions> - <exclusion> - <artifactId>slf4j-simple</artifactId> - <groupId>org.slf4j</groupId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>eu.maxschuster</groupId> - <artifactId>dataurl</artifactId> - <version>${dataurl.version}</version> - </dependency> - <dependency> - <groupId>com.github.xiaoymin</groupId> - <artifactId>knife4j-openapi2-spring-boot-starter</artifactId> - <version>${knife4j.verison}</version> - </dependency> - <dependency> - <groupId>eu.bitwalker</groupId> - <artifactId>UserAgentUtils</artifactId> - <version>${user-agent-utils.verison}</version> - </dependency> - - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-configuration-processor</artifactId> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.projectlombok</groupId> - <artifactId>lombok</artifactId> - <optional>true</optional> - </dependency> - <dependency> - <groupId>jakarta.servlet</groupId> - <artifactId>jakarta.servlet-api</artifactId> - </dependency> - <dependency> - <groupId>com.xmzs</groupId> - <artifactId>ruoyi-system</artifactId> - </dependency> - </dependencies> - -</project> diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/Constants.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/Constants.java deleted file mode 100644 index 8c5634e..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/Constants.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.xmzs.midjourney; - -import lombok.experimental.UtilityClass; - -@UtilityClass -public final class Constants { - // 浠诲姟鎵╁睍灞炴�� start - public static final String TASK_PROPERTY_NOTIFY_HOOK = "notifyHook"; - public static final String TASK_PROPERTY_FINAL_PROMPT = "finalPrompt"; - public static final String TASK_PROPERTY_MESSAGE_ID = "messageId"; - public static final String TASK_PROPERTY_MESSAGE_HASH = "messageHash"; - public static final String TASK_PROPERTY_PROGRESS_MESSAGE_ID = "progressMessageId"; - public static final String TASK_PROPERTY_FLAGS = "flags"; - public static final String TASK_PROPERTY_NONCE = "nonce"; - public static final String TASK_PROPERTY_DISCORD_INSTANCE_ID = "discordInstanceId"; - // 浠诲姟鎵╁睍灞炴�� end - - public static final String API_SECRET_HEADER_NAME = "mj-api-secret"; - public static final String DEFAULT_DISCORD_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36"; -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/ProxyApplication.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/ProxyApplication.java deleted file mode 100644 index f54f2b1..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/ProxyApplication.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.xmzs.midjourney; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.Import; -import org.springframework.scheduling.annotation.EnableScheduling; -import spring.config.BeanConfig; -import spring.config.WebMvcConfig; - -@EnableScheduling -@SpringBootApplication -@Import({BeanConfig.class, WebMvcConfig.class}) -public class ProxyApplication { - - public static void main(String[] args) { - SpringApplication.run(ProxyApplication.class, args); - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/ProxyProperties.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/ProxyProperties.java deleted file mode 100644 index ddd2750..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/ProxyProperties.java +++ /dev/null @@ -1,211 +0,0 @@ -package com.xmzs.midjourney; - -import com.xmzs.midjourney.enums.TranslateWay; -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -import java.time.Duration; -import java.util.ArrayList; -import java.util.List; - -@Data -@Component -@ConfigurationProperties(prefix = "mj") -public class ProxyProperties { - /** - * task瀛樺偍閰嶇疆. - */ - private final TaskStore taskStore = new TaskStore(); - /** - * discord璐﹀彿閫夋嫨瑙勫垯. - */ - private String accountChooseRule = "BestWaitIdleRule"; - /** - * discord鍗曡处鍙烽厤缃�. - */ - private final DiscordAccountConfig discord = new DiscordAccountConfig(); - /** - * discord璐﹀彿姹犻厤缃�. - */ - private final List<DiscordAccountConfig> accounts = new ArrayList<>(); - /** - * 浠g悊閰嶇疆. - */ - private final ProxyConfig proxy = new ProxyConfig(); - /** - * 鍙嶄唬閰嶇疆. - */ - private final NgDiscordConfig ngDiscord = new NgDiscordConfig(); - /** - * 鐧惧害缈昏瘧閰嶇疆. - */ - private final BaiduTranslateConfig baiduTranslate = new BaiduTranslateConfig(); - /** - * openai閰嶇疆. - */ - private final OpenaiConfig openai = new OpenaiConfig(); - /** - * 涓枃prompt缈昏瘧鏂瑰紡. - */ - private TranslateWay translateWay = TranslateWay.NULL; - /** - * 鎺ュ彛瀵嗛挜锛屼负绌轰笉鍚敤閴存潈锛涜皟鐢ㄦ帴鍙f椂闇�瑕佸姞璇锋眰澶� mj-api-secret. - */ - private String apiSecret; - /** - * 浠诲姟鐘舵�佸彉鏇村洖璋冨湴鍧�. - */ - private String notifyHook; - /** - * 閫氱煡鍥炶皟绾跨▼姹犲ぇ灏�. - */ - private int notifyPoolSize = 10; - - @Data - public static class DiscordAccountConfig { - /** - * 鏈嶅姟鍣↖D. - */ - private String guildId; - /** - * 棰戦亾ID. - */ - private String channelId; - /** - * 鐢ㄦ埛Token. - */ - private String userToken; - /** - * 鐢ㄦ埛UserAgent. - */ - private String userAgent = Constants.DEFAULT_DISCORD_USER_AGENT; - /** - * 鏄惁鍙敤. - */ - private boolean enable = true; - /** - * 骞跺彂鏁�. - */ - private int coreSize = 3; - /** - * 绛夊緟闃熷垪闀垮害. - */ - private int queueSize = 10; - /** - * 浠诲姟瓒呮椂鏃堕棿(鍒嗛挓). - */ - private int timeoutMinutes = 5; - } - - @Data - public static class BaiduTranslateConfig { - /** - * 鐧惧害缈昏瘧鐨凙PP_ID. - */ - private String appid; - /** - * 鐧惧害缈昏瘧鐨勫瘑閽�. - */ - private String appSecret; - } - - @Data - public static class OpenaiConfig { - /** - * 鑷畾涔塯pt鐨刟pi-url. - */ - private String gptApiUrl; - /** - * gpt鐨刟pi-key. - */ - private String gptApiKey; - /** - * 瓒呮椂鏃堕棿. - */ - private Duration timeout = Duration.ofSeconds(30); - /** - * 浣跨敤鐨勬ā鍨�. - */ - private String model = "gpt-3.5-turbo"; - /** - * 杩斿洖缁撴灉鐨勬渶澶у垎璇嶆暟. - */ - private int maxTokens = 2048; - /** - * 鐩镐技搴︼紝鍙栧�� 0-2. - */ - private double temperature = 0; - } - - @Data - public static class TaskStore { - /** - * 浠诲姟杩囨湡鏃堕棿锛岄粯璁�30澶�. - */ - private Duration timeout = Duration.ofDays(30); - /** - * 浠诲姟瀛樺偍鏂瑰紡: redis(榛樿)銆乮n_memory. - */ - private Type type = Type.IN_MEMORY; - - public enum Type { - /** - * redis. - */ - REDIS, - /** - * in_memory. - */ - IN_MEMORY - } - } - - @Data - public static class ProxyConfig { - /** - * 浠g悊host. - */ - private String host; - /** - * 浠g悊绔彛. - */ - private Integer port; - } - - @Data - public static class NgDiscordConfig { - /** - * https://discord.com 鍙嶄唬. - */ - private String server; - /** - * https://cdn.discordapp.com 鍙嶄唬. - */ - private String cdn; - /** - * wss://gateway.discord.gg 鍙嶄唬. - */ - private String wss; - /** - * https://discord-attachments-uploads-prd.storage.googleapis.com 鍙嶄唬. - */ - private String uploadServer; - } - - @Data - public static class TaskQueueConfig { - /** - * 骞跺彂鏁�. - */ - private int coreSize = 3; - /** - * 绛夊緟闃熷垪闀垮害. - */ - private int queueSize = 10; - /** - * 浠诲姟瓒呮椂鏃堕棿(鍒嗛挓). - */ - private int timeoutMinutes = 5; - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/ReturnCode.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/ReturnCode.java deleted file mode 100644 index 8296e74..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/ReturnCode.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.xmzs.midjourney; - -import lombok.experimental.UtilityClass; - -@UtilityClass -public final class ReturnCode { - /** - * 鎴愬姛. - */ - public static final int SUCCESS = 1; - /** - * 鏁版嵁鏈壘鍒�. - */ - public static final int NOT_FOUND = 3; - /** - * 鏍¢獙閿欒. - */ - public static final int VALIDATION_ERROR = 4; - /** - * 绯荤粺寮傚父. - */ - public static final int FAILURE = 9; - - /** - * 宸插瓨鍦�. - */ - public static final int EXISTED = 21; - /** - * 鎺掗槦涓�. - */ - public static final int IN_QUEUE = 22; - /** - * 闃熷垪宸叉弧. - */ - public static final int QUEUE_REJECTED = 23; - /** - * prompt鍖呭惈鏁忔劅璇�. - */ - public static final int BANNED_PROMPT = 24; - - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/controller/AccountController.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/controller/AccountController.java deleted file mode 100644 index a5d27de..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/controller/AccountController.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.xmzs.midjourney.controller; - -import com.xmzs.midjourney.domain.DiscordAccount; -import com.xmzs.midjourney.loadbalancer.DiscordInstance; -import com.xmzs.midjourney.loadbalancer.DiscordLoadBalancer; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.List; - -@Api(tags = "璐﹀彿鏌ヨ") -@RestController -@RequestMapping("/mj/account") -@RequiredArgsConstructor -public class AccountController { - - private final DiscordLoadBalancer loadBalancer; - - @ApiOperation(value = "鎸囧畾ID鑾峰彇璐﹀彿") - @GetMapping("/{id}/fetch") - public DiscordAccount fetch(@ApiParam(value = "璐﹀彿ID") @PathVariable String id) { - DiscordInstance instance = this.loadBalancer.getDiscordInstance(id); - return instance == null ? null : instance.account(); - } - - @ApiOperation(value = "鏌ヨ鎵�鏈夎处鍙�") - @GetMapping("/list") - public List<DiscordAccount> list() { - return this.loadBalancer.getAllInstances().stream().map(DiscordInstance::account).toList(); - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/controller/FaceController.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/controller/FaceController.java deleted file mode 100644 index 4ade81e..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/controller/FaceController.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.xmzs.midjourney.controller; - -import cn.hutool.json.JSONUtil; -import com.xmzs.midjourney.domain.InsightFace; -import com.xmzs.midjourney.domain.MjPriceConfig; -import com.xmzs.midjourney.util.MjOkHttpUtil; - -import com.xmzs.system.service.IChatCostService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import okhttp3.Request; -import org.apache.commons.lang3.math.NumberUtils; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - - -@Api(tags = "浠诲姟鏌ヨ") -@RestController -@RequestMapping("/mj") -@RequiredArgsConstructor -@Slf4j -public class FaceController { - - private final IChatCostService chatCostService; - - private final MjOkHttpUtil mjOkHttpUtil; - - private final MjPriceConfig priceConfig; - - @ApiOperation(value = "鎹㈣劯") - @PostMapping("/insight-face/swap") - public String insightFace(@RequestBody InsightFace insightFace) { - // 鎵i櫎鎺ュ彛璐圭敤骞朵笖淇濆瓨娑堟伅璁板綍 - chatCostService.taskDeduct("mj","鎹㈣劯", NumberUtils.toDouble(priceConfig.getFaceSwapping(), 0.3)); - // 鍒涘缓璇锋眰浣擄紙杩欓噷浣跨敤JSON浣滀负濯掍綋绫诲瀷锛� - String insightFaceJson = JSONUtil.toJsonStr(insightFace); - String url = "mj/insight-face/swap"; - Request request = mjOkHttpUtil.createPostRequest(url, insightFaceJson); - return mjOkHttpUtil.executeRequest(request); - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/controller/SubmitController.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/controller/SubmitController.java deleted file mode 100644 index a9e1a14..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/controller/SubmitController.java +++ /dev/null @@ -1,139 +0,0 @@ -package com.xmzs.midjourney.controller; - -import cn.hutool.json.JSONUtil; -import com.xmzs.midjourney.domain.MjPriceConfig; -import com.xmzs.midjourney.dto.*; -import com.xmzs.midjourney.enums.ActionType; -import com.xmzs.midjourney.util.*; -import com.xmzs.system.service.IChatCostService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import okhttp3.Request; -import org.apache.commons.lang3.math.NumberUtils; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - - -import java.util.Optional; - -@Api(tags = "浠诲姟鎻愪氦") -@RestController -@RequestMapping("/mj/submit") -@RequiredArgsConstructor -@Slf4j -public class SubmitController { - - private final MjPriceConfig priceConfig; - - private final IChatCostService chatCostService; - - private final MjOkHttpUtil mjOkHttpUtil; - - @ApiOperation(value = "缁樺浘鍙樺寲") - @PostMapping("/change") - public String change(@RequestBody SubmitChangeDTO changeDTO) { - String jsonStr = JSONUtil.toJsonStr(changeDTO); - String url = "mj/submit/change"; - Request request = mjOkHttpUtil.createPostRequest(url, jsonStr); - return mjOkHttpUtil.executeRequest(request); - } - - @ApiOperation(value = "鎵ц鍔ㄤ綔") - @PostMapping("/action") - public String action(@RequestBody SubmitActionDTO changeDTO) { - ActionType actionType = ActionType.fromCustomId(getAction(changeDTO.getCustomId())); - Optional.ofNullable(actionType).ifPresentOrElse( - type -> { - switch (type) { - case UP_SAMPLE: - chatCostService.taskDeduct("mj","鏀惧ぇ", NumberUtils.toDouble(priceConfig.getUpsample(), 0.1)); - break; - case IN_PAINT: - // 灞�閮ㄩ噸缁樺凡缁忔墸璐�,涓嶆墽琛屼换浣曟搷浣� - break; - default: - chatCostService.taskDeduct("mj","鍙樺寲", NumberUtils.toDouble(priceConfig.getChange(), 0.3)); - break; - } - }, - () -> chatCostService.taskDeduct("mj","鍙樺寲", NumberUtils.toDouble(priceConfig.getChange(), 0.3)) - ); - - String jsonStr = JSONUtil.toJsonStr(changeDTO); - String url = "mj/submit/action"; - Request request = mjOkHttpUtil.createPostRequest(url, jsonStr); - return mjOkHttpUtil.executeRequest(request); - } - - @ApiOperation(value = "缁樺浘鍙樺寲-simple") - @PostMapping("/simple-change") - public String simpleChange(@RequestBody SubmitSimpleChangeDTO simpleChangeDTO) { - String jsonStr = JSONUtil.toJsonStr(simpleChangeDTO); - String url = "mj/submit/simple-change"; - Request request = mjOkHttpUtil.createPostRequest(url, jsonStr); - return mjOkHttpUtil.executeRequest(request); - } - - @ApiOperation(value = "鎻愪氦鍥剧敓鍥俱�佹贩鍥句换鍔�") - @PostMapping("/blend") - public String blend(@RequestBody SubmitBlendDTO blendDTO) { - chatCostService.taskDeduct("mj","鍥剧敓鍥�", NumberUtils.toDouble(priceConfig.getBlend(), 0.3)); - String jsonStr = JSONUtil.toJsonStr(blendDTO); - String url = "mj/submit/blend"; - Request request = mjOkHttpUtil.createPostRequest(url, jsonStr); - return mjOkHttpUtil.executeRequest(request); - } - - @ApiOperation(value = "鎻愪氦鍥剧敓鏂囦换鍔�") - @PostMapping("/describe") - public String describe(@RequestBody SubmitDescribeDTO describeDTO) { - chatCostService.taskDeduct("mj","鍥剧敓鏂�", NumberUtils.toDouble(priceConfig.getDescribe(), 0.1)); - String jsonStr = JSONUtil.toJsonStr(describeDTO); - String url = "mj/submit/describe"; - Request request = mjOkHttpUtil.createPostRequest(url, jsonStr); - return mjOkHttpUtil.executeRequest(request); - } - - @ApiOperation(value = "鎻愪氦鏂囩敓鍥句换鍔�") - @PostMapping("/imagine") - public String imagine(@RequestBody SubmitImagineDTO imagineDTO) { - chatCostService.taskDeduct("mj",imagineDTO.getPrompt(), NumberUtils.toDouble(priceConfig.getImagine(), 0.3)); - String jsonStr = JSONUtil.toJsonStr(imagineDTO); - String url = "mj/submit/imagine"; - Request request = mjOkHttpUtil.createPostRequest(url, jsonStr); - return mjOkHttpUtil.executeRequest(request); - } - - @ApiOperation(value = "鎻愪氦灞�閮ㄩ噸缁樹换鍔�") - @PostMapping("/modal") - public String modal(@RequestBody SubmitModalDTO submitModalDTO) { - chatCostService.taskDeduct("mj","灞�閮ㄩ噸缁�", NumberUtils.toDouble(priceConfig.getInpaint(), 0.1)); - String jsonStr = JSONUtil.toJsonStr(submitModalDTO); - String url = "mj/submit/modal"; - Request request = mjOkHttpUtil.createPostRequest(url, jsonStr); - return mjOkHttpUtil.executeRequest(request); - } - - @ApiOperation(value = "鎻愪氦鎻愮ず璇嶅垎鏋愪换鍔�") - @PostMapping("/shorten") - public String shorten(@RequestBody SubmitShortenDTO submitShortenDTO) { - chatCostService.taskDeduct("mj","鎻愮ず璇嶅垎鏋�", NumberUtils.toDouble(priceConfig.getShorten(), 0.1)); - String jsonStr = JSONUtil.toJsonStr(submitShortenDTO); - String url = "mj/submit/shorten"; - Request request = mjOkHttpUtil.createPostRequest(url, jsonStr); - return mjOkHttpUtil.executeRequest(request); - } - - public String getAction(String customId) { - if (customId == null || customId.isEmpty()) { - return null; - } - String[] parts = customId.split("::"); - return customId.endsWith("SOLO") ? parts[1] : parts[2]; - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/controller/TaskController.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/controller/TaskController.java deleted file mode 100644 index f0f9391..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/controller/TaskController.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.xmzs.midjourney.controller; - -import cn.hutool.json.JSONUtil; -import com.xmzs.midjourney.util.MjOkHttpUtil; -import com.xmzs.midjourney.dto.TaskConditionDTO; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import okhttp3.Request; -import org.springframework.web.bind.annotation.*; - -@Api(tags = "浠诲姟鏌ヨ") -@RestController -@RequestMapping("/mj/task") -@RequiredArgsConstructor -@Slf4j -public class TaskController { - - private final MjOkHttpUtil mjOkHttpUtil; - - @ApiOperation(value = "鎸囧畾ID鑾峰彇浠诲姟") - @GetMapping("/{id}/fetch") - public String fetch(@ApiParam(value = "浠诲姟ID") @PathVariable String id) { - String url = "mj/task/" + id + "/fetch"; - Request request = mjOkHttpUtil.createGetRequest(url); - return mjOkHttpUtil.executeRequest(request); - } - - @ApiOperation(value = "鏍规嵁ID鍒楄〃鏌ヨ浠诲姟") - @PostMapping("/list-by-condition") - public String listByIds(@RequestBody TaskConditionDTO conditionDTO) { - String url = "mj/task/list-by-condition"; - String conditionJson = JSONUtil.toJsonStr(conditionDTO); - Request request = mjOkHttpUtil.createPostRequest(url,conditionJson); - return mjOkHttpUtil.executeRequest(request); - } - - @ApiOperation(value = "鑾峰彇浠诲姟鍥剧墖鐨剆eed") - @GetMapping("/{id}/image-seed") - public String getSeed(@ApiParam(value = "浠诲姟ID") @PathVariable String id) { - String url = "mj/task/" + id + "/image-seed"; - Request request = mjOkHttpUtil.createGetRequest(url); - return mjOkHttpUtil.executeRequest(request); - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/domain/DiscordAccount.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/domain/DiscordAccount.java deleted file mode 100644 index 01286db..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/domain/DiscordAccount.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.xmzs.midjourney.domain; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.xmzs.midjourney.Constants; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -@Data -@EqualsAndHashCode(callSuper = true) -@ApiModel("Discord璐﹀彿") -public class DiscordAccount extends DomainObject { - - @ApiModelProperty("鏈嶅姟鍣↖D") - private String guildId; - @ApiModelProperty("棰戦亾ID") - private String channelId; - @ApiModelProperty("鐢ㄦ埛Token") - private String userToken; - @ApiModelProperty("鐢ㄦ埛UserAgent") - private String userAgent = Constants.DEFAULT_DISCORD_USER_AGENT; - - @ApiModelProperty("鏄惁鍙敤") - private boolean enable = true; - - @ApiModelProperty("骞跺彂鏁�") - private int coreSize = 3; - @ApiModelProperty("绛夊緟闃熷垪闀垮害") - private int queueSize = 10; - @ApiModelProperty("浠诲姟瓒呮椂鏃堕棿(鍒嗛挓)") - private int timeoutMinutes = 5; - - @JsonIgnore - public String getDisplay() { - return this.channelId; - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/domain/DomainObject.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/domain/DomainObject.java deleted file mode 100644 index 82abc72..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/domain/DomainObject.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.xmzs.midjourney.domain; - - -import com.fasterxml.jackson.annotation.JsonIgnore; -import io.swagger.annotations.ApiModelProperty; -import lombok.Getter; -import lombok.Setter; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.Map; - - -public class DomainObject implements Serializable { - @Getter - @Setter - @ApiModelProperty("ID") - protected String id; - - @Setter - protected Map<String, Object> properties; // 鎵╁睍灞炴�э紝浠呮敮鎸佸熀鏈被鍨� - - @JsonIgnore - private final transient Object lock = new Object(); - - public void sleep() throws InterruptedException { - synchronized (this.lock) { - this.lock.wait(); - } - } - - public void awake() { - synchronized (this.lock) { - this.lock.notifyAll(); - } - } - - public DomainObject setProperty(String name, Object value) { - getProperties().put(name, value); - return this; - } - - public DomainObject removeProperty(String name) { - getProperties().remove(name); - return this; - } - - public Object getProperty(String name) { - return getProperties().get(name); - } - - @SuppressWarnings("unchecked") - public <T> T getPropertyGeneric(String name) { - return (T) getProperty(name); - } - - public <T> T getProperty(String name, Class<T> clz) { - return getProperty(name, clz, null); - } - - public <T> T getProperty(String name, Class<T> clz, T defaultValue) { - Object value = getProperty(name); - return value == null ? defaultValue : clz.cast(value); - } - - public Map<String, Object> getProperties() { - if (this.properties == null) { - this.properties = new HashMap<>(); - } - return this.properties; - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/domain/InsightFace.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/domain/InsightFace.java deleted file mode 100644 index c06e51c..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/domain/InsightFace.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.xmzs.midjourney.domain; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serializable; - -/** - * @author WangLe - */ -@Data -@ApiModel("Discord璐﹀彿") -public class InsightFace implements Serializable { - /**鏈汉澶村儚json*/ - @ApiModelProperty("鏈汉澶村儚json") - private String sourceBase64; - - /**鏄庢槦澶村儚json*/ - @ApiModelProperty("鏄庢槦澶村儚json") - private String targetBase64; -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/domain/MjPriceConfig.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/domain/MjPriceConfig.java deleted file mode 100644 index 6fd0786..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/domain/MjPriceConfig.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.xmzs.midjourney.domain; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -/** - * 缁樼敾璐圭敤淇℃伅 - * - * @author Admin - */ -@Data -@Component -@ConfigurationProperties(prefix = "mj") -public class MjPriceConfig { - /** - * 鏀惧ぇ鍥惧儚 - */ - private String upsample; - - /** - * 鍙樺寲 - */ - private String change; - - /** - * 鍥剧敓鍥� - */ - private String blend; - - /** - * 鍥剧敓鏂� - */ - private String describe; - - /** - * 鏂囩敓鍥� - */ - private String imagine; - - /** - * 灞�閮ㄩ噸缁� - */ - private String inpaint; - - /** - * 鎻愮ず璇嶅垎鏋� - */ - private String shorten; - - /** - * 鎹㈣劯 - */ - private String faceSwapping; - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/BaseSubmitDTO.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/BaseSubmitDTO.java deleted file mode 100644 index 6b8bae0..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/BaseSubmitDTO.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.xmzs.midjourney.dto; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Getter; -import lombok.Setter; - -@Getter -@Setter -public abstract class BaseSubmitDTO { - - @ApiModelProperty("鑷畾涔夊弬鏁�") - protected String state; - - @ApiModelProperty("鍥炶皟鍦板潃, 涓虹┖鏃朵娇鐢ㄥ叏灞�notifyHook") - protected String notifyHook; -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitActionDTO.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitActionDTO.java deleted file mode 100644 index 7a5c8ba..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitActionDTO.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.midjourney.dto; - -import io.swagger.annotations.ApiModel; -import lombok.Data; - - -@Data -@ApiModel("鍙樺寲浠诲姟鎻愪氦鍙傛暟") -public class SubmitActionDTO { - - private String customId; - - private String taskId; - - private String state; - - private String notifyHook; -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitBlendDTO.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitBlendDTO.java deleted file mode 100644 index 74e7e8a..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitBlendDTO.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.midjourney.dto; - -import com.xmzs.midjourney.enums.BlendDimensions; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.List; - -@Data -@ApiModel("Blend鎻愪氦鍙傛暟") -@EqualsAndHashCode(callSuper = true) -public class SubmitBlendDTO extends BaseSubmitDTO { - - @ApiModelProperty(value = "鍥剧墖base64鏁扮粍", required = true, example = "[\"data:image/png;base64,xxx1\", \"data:image/png;base64,xxx2\"]") - private List<String> base64Array; - - @ApiModelProperty(value = "姣斾緥: PORTRAIT(2:3); SQUARE(1:1); LANDSCAPE(3:2)", example = "SQUARE") - private BlendDimensions dimensions = BlendDimensions.SQUARE; -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitChangeDTO.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitChangeDTO.java deleted file mode 100644 index f542efa..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitChangeDTO.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xmzs.midjourney.dto; - -import com.xmzs.midjourney.enums.TaskAction; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@ApiModel("鍙樺寲浠诲姟鎻愪氦鍙傛暟") -@EqualsAndHashCode(callSuper = true) -public class SubmitChangeDTO extends BaseSubmitDTO { - - @ApiModelProperty(value = "浠诲姟ID", required = true, example = "\"1320098173412546\"") - private String taskId; - - @ApiModelProperty(value = "UPSCALE(鏀惧ぇ); VARIATION(鍙樻崲); REROLL(閲嶆柊鐢熸垚)", required = true, - allowableValues = "UPSCALE, VARIATION, REROLL", example = "UPSCALE") - private TaskAction action; - - @ApiModelProperty(value = "搴忓彿(1~4), action涓篣PSCALE,VARIATION鏃跺繀浼�", allowableValues = "range[1, 4]", example = "1") - private Integer index; - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitDescribeDTO.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitDescribeDTO.java deleted file mode 100644 index f54bc2b..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitDescribeDTO.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.xmzs.midjourney.dto; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -@Data -@ApiModel("Describe鎻愪氦鍙傛暟") -@EqualsAndHashCode(callSuper = true) -public class SubmitDescribeDTO extends BaseSubmitDTO { - - @ApiModelProperty(value = "鍥剧墖base64", required = true, example = "data:image/png;base64,xxx") - private String base64; -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitImagineDTO.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitImagineDTO.java deleted file mode 100644 index 54b83a6..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitImagineDTO.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xmzs.midjourney.dto; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.List; - - -@Data -@ApiModel("Imagine鎻愪氦鍙傛暟") -@EqualsAndHashCode(callSuper = true) -public class SubmitImagineDTO extends BaseSubmitDTO { - - @ApiModelProperty(value = "鎻愮ず璇�", required = true, example = "Cat") - private String prompt; - - @ApiModelProperty(value = "鍨浘base64鏁扮粍") - private List<String> base64Array; - - @ApiModelProperty(hidden = true) - @Deprecated(since = "3.0", forRemoval = true) - private String base64; - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitModalDTO.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitModalDTO.java deleted file mode 100644 index a565814..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitModalDTO.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.xmzs.midjourney.dto; - -import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = true) -@ApiModel("灞�閮ㄩ噸缁樻彁浜ゅ弬鏁�") -public class SubmitModalDTO extends BaseSubmitDTO{ - - private String maskBase64; - - private String taskId; - - private String prompt; - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitShortenDTO.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitShortenDTO.java deleted file mode 100644 index a6e5bd9..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitShortenDTO.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.xmzs.midjourney.dto; - -import io.swagger.annotations.ApiModel; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@EqualsAndHashCode(callSuper = true) -@ApiModel("prompt鍒嗘瀽鎻愪氦鍙傛暟") -public class SubmitShortenDTO extends BaseSubmitDTO{ - - private String botType; - - private String prompt; - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitSimpleChangeDTO.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitSimpleChangeDTO.java deleted file mode 100644 index e95cb5d..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/SubmitSimpleChangeDTO.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.xmzs.midjourney.dto; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -@Data -@ApiModel("鍙樺寲浠诲姟鎻愪氦鍙傛暟-simple") -@EqualsAndHashCode(callSuper = true) -public class SubmitSimpleChangeDTO extends BaseSubmitDTO { - - @ApiModelProperty(value = "鍙樺寲鎻忚堪: ID $action$index", required = true, example = "1320098173412546 U2") - private String content; - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/TaskConditionDTO.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/TaskConditionDTO.java deleted file mode 100644 index 6168f88..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/dto/TaskConditionDTO.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.xmzs.midjourney.dto; - -import io.swagger.annotations.ApiModel; -import lombok.Data; - -import java.util.List; - -@Data -@ApiModel("浠诲姟鏌ヨ鍙傛暟") -public class TaskConditionDTO { - - private List<String> ids; - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/ActionType.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/ActionType.java deleted file mode 100644 index 8bb90fb..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/ActionType.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.xmzs.midjourney.enums; - -import lombok.Getter; - -/** - * @author WangLe - */ -@Getter -public enum ActionType { - IN_PAINT("Inpaint"), // 灞�閮ㄩ噸缁樻搷浣� - RE_ROLL("reroll"), // 閲嶇粯鎿嶄綔 - UP_SAMPLE("upsample"), // 鏀惧ぇ鎿嶄綔 - ZOOM("zoom"), // 鍙樼劍鎿嶄綔 - UPSCALE("upscale"), // 楂樻竻鏀惧ぇ鎿嶄綔 - VARIATION("variation"); // 鍙樺寲鎿嶄綔 - - private final String action; - - ActionType(String action) { - this.action = action; - } - - public static ActionType fromCustomId(String customId) { - for (ActionType type : values()) { - if (type.getAction().equals(customId)) { - return type; - } - } - return null; - } -} - diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/BlendDimensions.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/BlendDimensions.java deleted file mode 100644 index 76a272e..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/BlendDimensions.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.midjourney.enums; - - -import lombok.Getter; - -@Getter -public enum BlendDimensions { - - PORTRAIT("2:3"), - - SQUARE("1:1"), - - LANDSCAPE("3:2"); - - private final String value; - - BlendDimensions(String value) { - this.value = value; - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/MessageType.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/MessageType.java deleted file mode 100644 index 5a5213d..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/MessageType.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xmzs.midjourney.enums; - - -public enum MessageType { - /** - * 鍒涘缓. - */ - CREATE, - /** - * 淇敼. - */ - UPDATE, - /** - * 鍒犻櫎. - */ - DELETE; - - public static MessageType of(String type) { - return switch (type) { - case "MESSAGE_CREATE" -> CREATE; - case "MESSAGE_UPDATE" -> UPDATE; - case "MESSAGE_DELETE" -> DELETE; - default -> null; - }; - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/TaskAction.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/TaskAction.java deleted file mode 100644 index d719acf..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/TaskAction.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.xmzs.midjourney.enums; - - -public enum TaskAction { - /** - * 鐢熸垚鍥剧墖. - */ - IMAGINE, - /** - * 閫変腑鏀惧ぇ. - */ - UPSCALE, - /** - * 閫変腑鍏朵腑鐨勪竴寮犲浘锛岀敓鎴愬洓寮犵浉浼肩殑. - */ - VARIATION, - /** - * 閲嶆柊鎵ц. - */ - REROLL, - /** - * 鍥捐浆prompt. - */ - DESCRIBE, - /** - * 澶氬浘娣峰悎. - */ - BLEND - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/TaskStatus.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/TaskStatus.java deleted file mode 100644 index 73f3b42..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/TaskStatus.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xmzs.midjourney.enums; - - -public enum TaskStatus { - /** - * 鏈惎鍔�. - */ - NOT_START, - /** - * 宸叉彁浜�. - */ - SUBMITTED, - /** - * 鎵ц涓�. - */ - IN_PROGRESS, - /** - * 澶辫触. - */ - FAILURE, - /** - * 鎴愬姛. - */ - SUCCESS - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/TranslateWay.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/TranslateWay.java deleted file mode 100644 index 4a04fe3..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/enums/TranslateWay.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.midjourney.enums; - - -public enum TranslateWay { - /** - * 鐧惧害缈昏瘧. - */ - BAIDU, - /** - * GPT缈昏瘧. - */ - GPT, - /** - * 涓嶇炕璇�. - */ - NULL - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/exception/BannedPromptException.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/exception/BannedPromptException.java deleted file mode 100644 index 7aeaa9f..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/exception/BannedPromptException.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.xmzs.midjourney.exception; - -public class BannedPromptException extends Exception { - - public BannedPromptException(String message) { - super(message); - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/exception/SnowFlakeException.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/exception/SnowFlakeException.java deleted file mode 100644 index c44d0e8..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/exception/SnowFlakeException.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.xmzs.midjourney.exception; - -public class SnowFlakeException extends RuntimeException { - - public SnowFlakeException(String message) { - super(message); - } - - public SnowFlakeException(String message, Throwable cause) { - super(message, cause); - } - - public SnowFlakeException(Throwable cause) { - super(cause); - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/DiscordInstance.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/DiscordInstance.java deleted file mode 100644 index 5c5dc82..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/DiscordInstance.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.xmzs.midjourney.loadbalancer; - - -import com.xmzs.midjourney.domain.DiscordAccount; -import com.xmzs.midjourney.result.Message; -import com.xmzs.midjourney.result.SubmitResultVO; -import com.xmzs.midjourney.service.DiscordService; -import com.xmzs.midjourney.support.Task; - -import java.util.List; -import java.util.Map; -import java.util.concurrent.Callable; -import java.util.concurrent.Future; - -public interface DiscordInstance extends DiscordService { - - String getInstanceId(); - - DiscordAccount account(); - - boolean isAlive(); - - void startWss() throws Exception; - - List<Task> getRunningTasks(); - - void exitTask(Task task); - - Map<String, Future<?>> getRunningFutures(); - - SubmitResultVO submitTask(Task task, Callable<Message<Void>> discordSubmit); - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/DiscordInstanceImpl.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/DiscordInstanceImpl.java deleted file mode 100644 index e81ec59..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/DiscordInstanceImpl.java +++ /dev/null @@ -1,205 +0,0 @@ -package com.xmzs.midjourney.loadbalancer; - - -import com.xmzs.midjourney.Constants; -import com.xmzs.midjourney.ReturnCode; -import com.xmzs.midjourney.domain.DiscordAccount; -import com.xmzs.midjourney.enums.BlendDimensions; -import com.xmzs.midjourney.enums.TaskStatus; -import com.xmzs.midjourney.result.Message; -import com.xmzs.midjourney.result.SubmitResultVO; -import com.xmzs.midjourney.service.DiscordService; -import com.xmzs.midjourney.service.DiscordServiceImpl; -import com.xmzs.midjourney.service.NotifyService; -import com.xmzs.midjourney.service.TaskStoreService; -import com.xmzs.midjourney.support.Task; -import com.xmzs.midjourney.wss.WebSocketStarter; -import com.xmzs.midjourney.wss.user.UserWebSocketStarter; -import eu.maxschuster.dataurl.DataUrl; -import lombok.extern.slf4j.Slf4j; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; -import org.springframework.web.client.RestTemplate; - -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.Callable; -import java.util.concurrent.CopyOnWriteArrayList; -import java.util.concurrent.Future; -import java.util.concurrent.RejectedExecutionException; - -@Slf4j -public class DiscordInstanceImpl implements DiscordInstance { - private final DiscordAccount account; - private final WebSocketStarter socketStarter; - private final DiscordService service; - private final TaskStoreService taskStoreService; - private final NotifyService notifyService; - - private final ThreadPoolTaskExecutor taskExecutor; - private final List<Task> runningTasks; - private final Map<String, Future<?>> taskFutureMap = Collections.synchronizedMap(new HashMap<>()); - - public DiscordInstanceImpl(DiscordAccount account, UserWebSocketStarter socketStarter, RestTemplate restTemplate, - TaskStoreService taskStoreService, NotifyService notifyService, Map<String, String> paramsMap) { - this.account = account; - this.socketStarter = socketStarter; - this.taskStoreService = taskStoreService; - this.notifyService = notifyService; - this.service = new DiscordServiceImpl(account, restTemplate, paramsMap); - this.runningTasks = new CopyOnWriteArrayList<>(); - this.taskExecutor = new ThreadPoolTaskExecutor(); - this.taskExecutor.setCorePoolSize(account.getCoreSize()); - this.taskExecutor.setMaxPoolSize(account.getCoreSize()); - this.taskExecutor.setQueueCapacity(account.getQueueSize()); - this.taskExecutor.setThreadNamePrefix("TaskQueue-" + account.getDisplay() + "-"); - this.taskExecutor.initialize(); - } - - @Override - public String getInstanceId() { - return this.account.getChannelId(); - } - - @Override - public DiscordAccount account() { - return this.account; - } - - @Override - public boolean isAlive() { - return this.account.isEnable(); - } - - @Override - public void startWss() throws Exception { - this.socketStarter.setTrying(true); - this.socketStarter.start(); - } - - @Override - public List<Task> getRunningTasks() { - return this.runningTasks; - } - - @Override - public void exitTask(Task task) { - try { - Future<?> future = this.taskFutureMap.get(task.getId()); - if (future != null) { - future.cancel(true); - } - saveAndNotify(task); - } finally { - this.runningTasks.remove(task); - this.taskFutureMap.remove(task.getId()); - } - } - - @Override - public Map<String, Future<?>> getRunningFutures() { - return this.taskFutureMap; - } - - @Override - public synchronized SubmitResultVO submitTask(Task task, Callable<Message<Void>> discordSubmit) { - this.taskStoreService.save(task); - int currentWaitNumbers; - try { - currentWaitNumbers = this.taskExecutor.getThreadPoolExecutor().getQueue().size(); - Future<?> future = this.taskExecutor.submit(() -> executeTask(task, discordSubmit)); - this.taskFutureMap.put(task.getId(), future); - } catch (RejectedExecutionException e) { - this.taskStoreService.delete(task.getId()); - return SubmitResultVO.fail(ReturnCode.QUEUE_REJECTED, "闃熷垪宸叉弧锛岃绋嶅悗灏濊瘯") - .setProperty(Constants.TASK_PROPERTY_DISCORD_INSTANCE_ID, this.getInstanceId()); - } catch (Exception e) { - log.error("submit task error", e); - return SubmitResultVO.fail(ReturnCode.FAILURE, "鎻愪氦澶辫触锛岀郴缁熷紓甯�") - .setProperty(Constants.TASK_PROPERTY_DISCORD_INSTANCE_ID, this.getInstanceId()); - } - if (currentWaitNumbers == 0) { - return SubmitResultVO.of(ReturnCode.SUCCESS, "鎻愪氦鎴愬姛", task.getId()) - .setProperty(Constants.TASK_PROPERTY_DISCORD_INSTANCE_ID, this.getInstanceId()); - } else { - return SubmitResultVO.of(ReturnCode.IN_QUEUE, "鎺掗槦涓紝鍓嶉潰杩樻湁" + currentWaitNumbers + "涓换鍔�", task.getId()) - .setProperty("numberOfQueues", currentWaitNumbers) - .setProperty(Constants.TASK_PROPERTY_DISCORD_INSTANCE_ID, this.getInstanceId()); - } - } - - private void executeTask(Task task, Callable<Message<Void>> discordSubmit) { - this.runningTasks.add(task); - try { - task.start(); - Message<Void> result = discordSubmit.call(); - if (result.getCode() != ReturnCode.SUCCESS) { - task.fail(result.getDescription()); - saveAndNotify(task); - return; - } - saveAndNotify(task); - do { - task.sleep(); - saveAndNotify(task); - } while (task.getStatus() == TaskStatus.IN_PROGRESS); - log.debug("task finished, id: {}, status: {}", task.getId(), task.getStatus()); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } catch (Exception e) { - log.error("task execute error", e); - task.fail("鎵ц閿欒锛岀郴缁熷紓甯�"); - saveAndNotify(task); - } finally { - this.runningTasks.remove(task); - this.taskFutureMap.remove(task.getId()); - } - } - - private void saveAndNotify(Task task) { - this.taskStoreService.save(task); - this.notifyService.notifyTaskChange(task); - } - - @Override - public Message<Void> imagine(String prompt, String nonce) { - return this.service.imagine(prompt, nonce); - } - - @Override - public Message<Void> upscale(String messageId, int index, String messageHash, int messageFlags, String nonce) { - return this.service.upscale(messageId, index, messageHash, messageFlags, nonce); - } - - @Override - public Message<Void> variation(String messageId, int index, String messageHash, int messageFlags, String nonce) { - return this.service.variation(messageId, index, messageHash, messageFlags, nonce); - } - - @Override - public Message<Void> reroll(String messageId, String messageHash, int messageFlags, String nonce) { - return this.service.reroll(messageId, messageHash, messageFlags, nonce); - } - - @Override - public Message<Void> describe(String finalFileName, String nonce) { - return this.service.describe(finalFileName, nonce); - } - - @Override - public Message<Void> blend(List<String> finalFileNames, BlendDimensions dimensions, String nonce) { - return this.service.blend(finalFileNames, dimensions, nonce); - } - - @Override - public Message<String> upload(String fileName, DataUrl dataUrl) { - return this.service.upload(fileName, dataUrl); - } - - @Override - public Message<String> sendImageMessage(String content, String finalFileName) { - return this.service.sendImageMessage(content, finalFileName); - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/DiscordLoadBalancer.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/DiscordLoadBalancer.java deleted file mode 100644 index e4c9ebe..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/DiscordLoadBalancer.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.xmzs.midjourney.loadbalancer; - - -import cn.hutool.core.text.CharSequenceUtil; -import com.xmzs.midjourney.loadbalancer.rule.IRule; -import com.xmzs.midjourney.support.Task; -import com.xmzs.midjourney.support.TaskCondition; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Component; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Optional; -import java.util.Set; -import java.util.stream.Stream; - -@Component -@RequiredArgsConstructor -public class DiscordLoadBalancer { - private final IRule rule; - - private final List<DiscordInstance> instances = Collections.synchronizedList(new ArrayList<>()); - - public List<DiscordInstance> getAllInstances() { - return this.instances; - } - - public List<DiscordInstance> getAliveInstances() { - return this.instances.stream().filter(DiscordInstance::isAlive).toList(); - } - - public DiscordInstance chooseInstance() { - return this.rule.choose(getAliveInstances()); - } - - public DiscordInstance getDiscordInstance(String instanceId) { - if (CharSequenceUtil.isBlank(instanceId)) { - return null; - } - return this.instances.stream() - .filter(instance -> CharSequenceUtil.equals(instanceId, instance.getInstanceId())) - .findFirst().orElse(null); - } - - public Set<String> getQueueTaskIds() { - Set<String> taskIds = Collections.synchronizedSet(new HashSet<>()); - for (DiscordInstance instance : getAliveInstances()) { - taskIds.addAll(instance.getRunningFutures().keySet()); - } - return taskIds; - } - - public Stream<Task> findRunningTask(TaskCondition condition) { - return getAliveInstances().stream().flatMap(instance -> instance.getRunningTasks().stream().filter(condition)); - } - - public Task getRunningTask(String id) { - for (DiscordInstance instance : getAliveInstances()) { - Optional<Task> optional = instance.getRunningTasks().stream().filter(t -> id.equals(t.getId())).findFirst(); - if (optional.isPresent()) { - return optional.get(); - } - } - return null; - } - - public Task getRunningTaskByNonce(String nonce) { - if (CharSequenceUtil.isBlank(nonce)) { - return null; - } - TaskCondition condition = new TaskCondition().setNonce(nonce); - for (DiscordInstance instance : getAliveInstances()) { - Optional<Task> optional = instance.getRunningTasks().stream().filter(condition).findFirst(); - if (optional.isPresent()) { - return optional.get(); - } - } - return null; - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/rule/BestWaitIdleRule.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/rule/BestWaitIdleRule.java deleted file mode 100644 index 3dd7399..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/rule/BestWaitIdleRule.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.xmzs.midjourney.loadbalancer.rule; - -import cn.hutool.core.util.RandomUtil; -import com.xmzs.midjourney.loadbalancer.DiscordInstance; - -import java.util.Comparator; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * 鏈�灏戠瓑寰呯┖闂�. - * 閫夋嫨绛夊緟鏁版渶灏戠殑瀹炰緥锛屽鏋滈兘涓嶉渶瑕佺瓑寰咃紝鍒欓殢鏈洪�夋嫨 - */ -public class BestWaitIdleRule implements IRule { - - @Override - public DiscordInstance choose(List<DiscordInstance> instances) { - if (instances.isEmpty()) { - return null; - } - Map<Integer, List<DiscordInstance>> map = instances.stream() - .collect(Collectors.groupingBy(i -> { - int wait = i.getRunningFutures().size() - i.account().getCoreSize(); - return wait >= 0 ? wait : -1; - })); - List<DiscordInstance> instanceList = map.entrySet().stream().min(Comparator.comparingInt(Map.Entry::getKey)).orElseThrow().getValue(); - return RandomUtil.randomEle(instanceList); - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/rule/IRule.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/rule/IRule.java deleted file mode 100644 index a89b256..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/rule/IRule.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.xmzs.midjourney.loadbalancer.rule; - -import com.xmzs.midjourney.loadbalancer.DiscordInstance; - -import java.util.List; - -public interface IRule { - - DiscordInstance choose(List<DiscordInstance> instances); -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/rule/RoundRobinRule.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/rule/RoundRobinRule.java deleted file mode 100644 index 43d8251..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/loadbalancer/rule/RoundRobinRule.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.xmzs.midjourney.loadbalancer.rule; - -import com.xmzs.midjourney.loadbalancer.DiscordInstance; - -import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; - -/** - * 杞. - */ -public class RoundRobinRule implements IRule { - private final AtomicInteger position = new AtomicInteger(0); - - @Override - public DiscordInstance choose(List<DiscordInstance> instances) { - if (instances.isEmpty()) { - return null; - } - int pos = incrementAndGet(); - return instances.get(pos % instances.size()); - } - - private int incrementAndGet() { - int current; - int next; - do { - current = this.position.get(); - next = current == Integer.MAX_VALUE ? 0 : current + 1; - } while (!this.position.compareAndSet(current, next)); - return next; - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/result/Message.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/result/Message.java deleted file mode 100644 index 4dca97f..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/result/Message.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.xmzs.midjourney.result; - -import com.xmzs.midjourney.ReturnCode; -import lombok.Getter; - -@Getter -public class Message<T> { - private final int code; - private final String description; - private final T result; - - public static <Y> Message<Y> success() { - return new Message<>(ReturnCode.SUCCESS, "鎴愬姛"); - } - - public static <T> Message<T> success(T result) { - return new Message<>(ReturnCode.SUCCESS, "鎴愬姛", result); - } - - public static <T> Message<T> success(int code, String description, T result) { - return new Message<>(code, description, result); - } - - public static <Y> Message<Y> notFound() { - return new Message<>(ReturnCode.NOT_FOUND, "鏁版嵁鏈壘鍒�"); - } - - public static <Y> Message<Y> validationError() { - return new Message<>(ReturnCode.VALIDATION_ERROR, "鏍¢獙閿欒"); - } - - public static <Y> Message<Y> failure() { - return new Message<>(ReturnCode.FAILURE, "绯荤粺寮傚父"); - } - - public static <Y> Message<Y> failure(String description) { - return new Message<>(ReturnCode.FAILURE, description); - } - - public static <Y> Message<Y> of(int code, String description) { - return new Message<>(code, description); - } - - public static <T> Message<T> of(int code, String description, T result) { - return new Message<>(code, description, result); - } - - private Message(int code, String description) { - this(code, description, null); - } - - private Message(int code, String description, T result) { - this.code = code; - this.description = description; - this.result = result; - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/result/SubmitResultVO.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/result/SubmitResultVO.java deleted file mode 100644 index b5b392b..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/result/SubmitResultVO.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.xmzs.midjourney.result; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.HashMap; -import java.util.Map; - -@Data -@ApiModel("鎻愪氦缁撴灉") -public class SubmitResultVO { - - @ApiModelProperty(value = "鐘舵�佺爜: 1(鎻愪氦鎴愬姛), 21(宸插瓨鍦�), 22(鎺掗槦涓�), other(閿欒)", required = true, example = "1") - private int code; - - @ApiModelProperty(value = "鎻忚堪", required = true, example = "鎻愪氦鎴愬姛") - private String description; - - @ApiModelProperty(value = "浠诲姟ID", example = "1320098173412546") - private String result; - - @ApiModelProperty(value = "鎵╁睍瀛楁") - private Map<String, Object> properties = new HashMap<>(); - - public SubmitResultVO setProperty(String name, Object value) { - this.properties.put(name, value); - return this; - } - - public SubmitResultVO removeProperty(String name) { - this.properties.remove(name); - return this; - } - - public Object getProperty(String name) { - return this.properties.get(name); - } - - @SuppressWarnings("unchecked") - public <T> T getPropertyGeneric(String name) { - return (T) getProperty(name); - } - - public <T> T getProperty(String name, Class<T> clz) { - return clz.cast(getProperty(name)); - } - - public static SubmitResultVO of(int code, String description, String result) { - return new SubmitResultVO(code, description, result); - } - - public static SubmitResultVO fail(int code, String description) { - return new SubmitResultVO(code, description, null); - } - - private SubmitResultVO(int code, String description, String result) { - this.code = code; - this.description = description; - this.result = result; - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/DiscordService.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/DiscordService.java deleted file mode 100644 index e2fc729..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/DiscordService.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.xmzs.midjourney.service; - - -import com.xmzs.midjourney.enums.BlendDimensions; -import com.xmzs.midjourney.result.Message; -import eu.maxschuster.dataurl.DataUrl; - -import java.util.List; - -public interface DiscordService { - - Message<Void> imagine(String prompt, String nonce); - - Message<Void> upscale(String messageId, int index, String messageHash, int messageFlags, String nonce); - - Message<Void> variation(String messageId, int index, String messageHash, int messageFlags, String nonce); - - Message<Void> reroll(String messageId, String messageHash, int messageFlags, String nonce); - - Message<Void> describe(String finalFileName, String nonce); - - Message<Void> blend(List<String> finalFileNames, BlendDimensions dimensions, String nonce); - - Message<String> upload(String fileName, DataUrl dataUrl); - - Message<String> sendImageMessage(String content, String finalFileName); - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/DiscordServiceImpl.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/DiscordServiceImpl.java deleted file mode 100644 index e1a1bc3..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/DiscordServiceImpl.java +++ /dev/null @@ -1,219 +0,0 @@ -package com.xmzs.midjourney.service; - - -import cn.hutool.core.text.CharSequenceUtil; -import com.xmzs.midjourney.ReturnCode; -import com.xmzs.midjourney.domain.DiscordAccount; -import com.xmzs.midjourney.enums.BlendDimensions; -import com.xmzs.midjourney.result.Message; -import com.xmzs.midjourney.support.DiscordHelper; -import com.xmzs.midjourney.support.SpringContextHolder; -import eu.maxschuster.dataurl.DataUrl; -import lombok.extern.slf4j.Slf4j; -import org.json.JSONArray; -import org.json.JSONObject; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.client.HttpStatusCodeException; -import org.springframework.web.client.RestTemplate; - -import java.util.List; -import java.util.Map; - -@Slf4j -public class DiscordServiceImpl implements DiscordService { - private static final String DEFAULT_SESSION_ID = "f1a313a09ce079ce252459dc70231f30"; - - private final DiscordAccount account; - private final Map<String, String> paramsMap; - private final RestTemplate restTemplate; - private final DiscordHelper discordHelper; - - private final String discordInteractionUrl; - private final String discordAttachmentUrl; - private final String discordMessageUrl; - - public DiscordServiceImpl(DiscordAccount account, RestTemplate restTemplate, Map<String, String> paramsMap) { - this.account = account; - this.restTemplate = restTemplate; - this.discordHelper = SpringContextHolder.getApplicationContext().getBean(DiscordHelper.class); - this.paramsMap = paramsMap; - String discordServer = this.discordHelper.getServer(); - this.discordInteractionUrl = discordServer + "/api/v9/interactions"; - this.discordAttachmentUrl = discordServer + "/api/v9/channels/" + account.getChannelId() + "/attachments"; - this.discordMessageUrl = discordServer + "/api/v9/channels/" + account.getChannelId() + "/messages"; - } - - @Override - public Message<Void> imagine(String prompt, String nonce) { - String paramsStr = replaceInteractionParams(this.paramsMap.get("imagine"), nonce); - JSONObject params = new JSONObject(paramsStr); - params.getJSONObject("data").getJSONArray("options").getJSONObject(0) - .put("value", prompt); - return postJsonAndCheckStatus(params.toString()); - } - - @Override - public Message<Void> upscale(String messageId, int index, String messageHash, int messageFlags, String nonce) { - String paramsStr = replaceInteractionParams(this.paramsMap.get("upscale"), nonce) - .replace("$message_id", messageId) - .replace("$index", String.valueOf(index)) - .replace("$message_hash", messageHash); - paramsStr = new JSONObject(paramsStr).put("message_flags", messageFlags).toString(); - return postJsonAndCheckStatus(paramsStr); - } - - @Override - public Message<Void> variation(String messageId, int index, String messageHash, int messageFlags, String nonce) { - String paramsStr = replaceInteractionParams(this.paramsMap.get("variation"), nonce) - .replace("$message_id", messageId) - .replace("$index", String.valueOf(index)) - .replace("$message_hash", messageHash); - paramsStr = new JSONObject(paramsStr).put("message_flags", messageFlags).toString(); - return postJsonAndCheckStatus(paramsStr); - } - - @Override - public Message<Void> reroll(String messageId, String messageHash, int messageFlags, String nonce) { - String paramsStr = replaceInteractionParams(this.paramsMap.get("reroll"), nonce) - .replace("$message_id", messageId) - .replace("$message_hash", messageHash); - paramsStr = new JSONObject(paramsStr).put("message_flags", messageFlags).toString(); - return postJsonAndCheckStatus(paramsStr); - } - - @Override - public Message<Void> describe(String finalFileName, String nonce) { - String fileName = CharSequenceUtil.subAfter(finalFileName, "/", true); - String paramsStr = replaceInteractionParams(this.paramsMap.get("describe"), nonce) - .replace("$file_name", fileName) - .replace("$final_file_name", finalFileName); - return postJsonAndCheckStatus(paramsStr); - } - - @Override - public Message<Void> blend(List<String> finalFileNames, BlendDimensions dimensions, String nonce) { - String paramsStr = replaceInteractionParams(this.paramsMap.get("blend"), nonce); - JSONObject params = new JSONObject(paramsStr); - JSONArray options = params.getJSONObject("data").getJSONArray("options"); - JSONArray attachments = params.getJSONObject("data").getJSONArray("attachments"); - for (int i = 0; i < finalFileNames.size(); i++) { - String finalFileName = finalFileNames.get(i); - String fileName = CharSequenceUtil.subAfter(finalFileName, "/", true); - JSONObject attachment = new JSONObject().put("id", String.valueOf(i)) - .put("filename", fileName) - .put("uploaded_filename", finalFileName); - attachments.put(attachment); - JSONObject option = new JSONObject().put("type", 11) - .put("name", "image" + (i + 1)) - .put("value", i); - options.put(option); - } - options.put(new JSONObject().put("type", 3) - .put("name", "dimensions") - .put("value", "--ar " + dimensions.getValue())); - return postJsonAndCheckStatus(params.toString()); - } - - private String replaceInteractionParams(String paramsStr, String nonce) { - return paramsStr.replace("$guild_id", this.account.getGuildId()) - .replace("$channel_id", this.account.getChannelId()) - .replace("$session_id", DEFAULT_SESSION_ID) - .replace("$nonce", nonce); - } - - @Override - public Message<String> upload(String fileName, DataUrl dataUrl) { - try { - JSONObject fileObj = new JSONObject(); - fileObj.put("filename", fileName); - fileObj.put("file_size", dataUrl.getData().length); - fileObj.put("id", "0"); - JSONObject params = new JSONObject() - .put("files", new JSONArray().put(fileObj)); - ResponseEntity<String> responseEntity = postJson(this.discordAttachmentUrl, params.toString()); - if (responseEntity.getStatusCode() != HttpStatus.OK) { - log.error("涓婁紶鍥剧墖鍒癲iscord澶辫触, status: {}, msg: {}", responseEntity.getStatusCodeValue(), responseEntity.getBody()); - return Message.of(ReturnCode.VALIDATION_ERROR, "涓婁紶鍥剧墖鍒癲iscord澶辫触"); - } - JSONArray array = new JSONObject(responseEntity.getBody()).getJSONArray("attachments"); - if (array.length() == 0) { - return Message.of(ReturnCode.VALIDATION_ERROR, "涓婁紶鍥剧墖鍒癲iscord澶辫触"); - } - String uploadUrl = array.getJSONObject(0).getString("upload_url"); - String uploadFilename = array.getJSONObject(0).getString("upload_filename"); - putFile(uploadUrl, dataUrl); - return Message.success(uploadFilename); - } catch (Exception e) { - log.error("涓婁紶鍥剧墖鍒癲iscord澶辫触", e); - return Message.of(ReturnCode.FAILURE, "涓婁紶鍥剧墖鍒癲iscord澶辫触"); - } - } - - @Override - public Message<String> sendImageMessage(String content, String finalFileName) { - String fileName = CharSequenceUtil.subAfter(finalFileName, "/", true); - String paramsStr = this.paramsMap.get("message").replace("$content", content) - .replace("$channel_id", this.account.getChannelId()) - .replace("$file_name", fileName) - .replace("$final_file_name", finalFileName); - ResponseEntity<String> responseEntity = postJson(this.discordMessageUrl, paramsStr); - if (responseEntity.getStatusCode() != HttpStatus.OK) { - log.error("鍙戦�佸浘鐗囨秷鎭埌discord澶辫触, status: {}, msg: {}", responseEntity.getStatusCodeValue(), responseEntity.getBody()); - return Message.of(ReturnCode.VALIDATION_ERROR, "鍙戦�佸浘鐗囨秷鎭埌discord澶辫触"); - } - JSONObject result = new JSONObject(responseEntity.getBody()); - JSONArray attachments = result.optJSONArray("attachments"); - if (!attachments.isEmpty()) { - return Message.success(attachments.getJSONObject(0).optString("url")); - } - return Message.failure("鍙戦�佸浘鐗囨秷鎭埌discord澶辫触: 鍥剧墖涓嶅瓨鍦�"); - } - - private void putFile(String uploadUrl, DataUrl dataUrl) { - uploadUrl = this.discordHelper.getDiscordUploadUrl(uploadUrl); - HttpHeaders headers = new HttpHeaders(); - headers.add("User-Agent", this.account.getUserAgent()); - headers.setContentType(MediaType.valueOf(dataUrl.getMimeType())); - headers.setContentLength(dataUrl.getData().length); - HttpEntity<byte[]> requestEntity = new HttpEntity<>(dataUrl.getData(), headers); - this.restTemplate.put(uploadUrl, requestEntity); - } - - private ResponseEntity<String> postJson(String paramsStr) { - return postJson(this.discordInteractionUrl, paramsStr); - } - - private ResponseEntity<String> postJson(String url, String paramsStr) { - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_JSON); - headers.set("Authorization", this.account.getUserToken()); - headers.set("User-Agent", this.account.getUserAgent()); - HttpEntity<String> httpEntity = new HttpEntity<>(paramsStr, headers); - return this.restTemplate.postForEntity(url, httpEntity, String.class); - } - - private Message<Void> postJsonAndCheckStatus(String paramsStr) { - try { - ResponseEntity<String> responseEntity = postJson(paramsStr); - if (responseEntity.getStatusCode() == HttpStatus.NO_CONTENT) { - return Message.success(); - } - return Message.of(responseEntity.getStatusCodeValue(), CharSequenceUtil.sub(responseEntity.getBody(), 0, 100)); - } catch (HttpStatusCodeException e) { - return convertHttpStatusCodeException(e); - } - } - - private Message<Void> convertHttpStatusCodeException(HttpStatusCodeException e) { - try { - JSONObject error = new JSONObject(e.getResponseBodyAsString()); - return Message.of(error.optInt("code", e.getRawStatusCode()), error.optString("message")); - } catch (Exception je) { - return Message.of(e.getRawStatusCode(), CharSequenceUtil.sub(e.getMessage(), 0, 100)); - } - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/NotifyService.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/NotifyService.java deleted file mode 100644 index ebcca0b..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/NotifyService.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.xmzs.midjourney.service; - - -import com.xmzs.midjourney.support.Task; - -public interface NotifyService { - - void notifyTaskChange(Task task); - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/NotifyServiceImpl.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/NotifyServiceImpl.java deleted file mode 100644 index b13151a..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/NotifyServiceImpl.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.xmzs.midjourney.service; - -import cn.hutool.cache.CacheUtil; -import cn.hutool.cache.impl.TimedCache; -import cn.hutool.core.exceptions.CheckedUtil; -import cn.hutool.core.text.CharSequenceUtil; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xmzs.midjourney.Constants; -import com.xmzs.midjourney.ProxyProperties; -import com.xmzs.midjourney.enums.TaskStatus; -import com.xmzs.midjourney.support.Task; -import lombok.extern.slf4j.Slf4j; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; -import org.springframework.stereotype.Service; -import org.springframework.web.client.RestTemplate; - -import java.time.Duration; - -@Slf4j -@Service -public class NotifyServiceImpl implements NotifyService { - private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); - private final ThreadPoolTaskExecutor executor; - private final TimedCache<String, Object> taskLocks = CacheUtil.newTimedCache(Duration.ofHours(1).toMillis()); - - public NotifyServiceImpl(ProxyProperties properties) { - this.executor = new ThreadPoolTaskExecutor(); - this.executor.setCorePoolSize(properties.getNotifyPoolSize()); - this.executor.setThreadNamePrefix("TaskNotify-"); - this.executor.initialize(); - } - - @Override - public void notifyTaskChange(Task task) { - String notifyHook = task.getPropertyGeneric(Constants.TASK_PROPERTY_NOTIFY_HOOK); - if (CharSequenceUtil.isBlank(notifyHook)) { - return; - } - String taskId = task.getId(); - TaskStatus taskStatus = task.getStatus(); - Object taskLock = this.taskLocks.get(taskId, (CheckedUtil.Func0Rt<Object>) Object::new); - try { - String paramsStr = OBJECT_MAPPER.writeValueAsString(task); - this.executor.execute(() -> { - synchronized (taskLock) { - try { - ResponseEntity<String> responseEntity = postJson(notifyHook, paramsStr); - if (responseEntity.getStatusCode() == HttpStatus.OK) { - log.debug("鎺ㄩ�佷换鍔″彉鏇存垚鍔�, 浠诲姟ID: {}, status: {}, notifyHook: {}", taskId, taskStatus, notifyHook); - } else { - log.warn("鎺ㄩ�佷换鍔″彉鏇村け璐�, 浠诲姟ID: {}, notifyHook: {}, code: {}, msg: {}", taskId, notifyHook, responseEntity.getStatusCodeValue(), responseEntity.getBody()); - } - } catch (Exception e) { - log.warn("鎺ㄩ�佷换鍔″彉鏇村け璐�, 浠诲姟ID: {}, notifyHook: {}, 鎻忚堪: {}", taskId, notifyHook, e.getMessage()); - } - } - }); - } catch (JsonProcessingException e) { - log.warn("鎺ㄩ�佷换鍔″彉鏇村け璐�, 浠诲姟ID: {}, notifyHook: {}, 鎻忚堪: {}", taskId, notifyHook, e.getMessage()); - } - } - - private ResponseEntity<String> postJson(String notifyHook, String paramsJson) { - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_JSON); - HttpEntity<String> httpEntity = new HttpEntity<>(paramsJson, headers); - return new RestTemplate().postForEntity(notifyHook, httpEntity, String.class); - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/TaskService.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/TaskService.java deleted file mode 100644 index 44b7ca6..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/TaskService.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.xmzs.midjourney.service; - -import com.xmzs.midjourney.enums.BlendDimensions; -import com.xmzs.midjourney.result.SubmitResultVO; -import com.xmzs.midjourney.support.Task; -import eu.maxschuster.dataurl.DataUrl; - -import java.util.List; - -public interface TaskService { - - SubmitResultVO submitImagine(Task task, List<DataUrl> dataUrls); - - SubmitResultVO submitUpscale(Task task, String targetMessageId, String targetMessageHash, int index, int messageFlags); - - SubmitResultVO submitVariation(Task task, String targetMessageId, String targetMessageHash, int index, int messageFlags); - - SubmitResultVO submitReroll(Task task, String targetMessageId, String targetMessageHash, int messageFlags); - - SubmitResultVO submitDescribe(Task task, DataUrl dataUrl); - - SubmitResultVO submitBlend(Task task, List<DataUrl> dataUrls, BlendDimensions dimensions); -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/TaskServiceImpl.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/TaskServiceImpl.java deleted file mode 100644 index 907049e..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/TaskServiceImpl.java +++ /dev/null @@ -1,128 +0,0 @@ -package com.xmzs.midjourney.service; - -import com.xmzs.midjourney.Constants; -import com.xmzs.midjourney.ReturnCode; -import com.xmzs.midjourney.enums.BlendDimensions; -import com.xmzs.midjourney.loadbalancer.DiscordInstance; -import com.xmzs.midjourney.loadbalancer.DiscordLoadBalancer; -import com.xmzs.midjourney.result.Message; -import com.xmzs.midjourney.result.SubmitResultVO; -import com.xmzs.midjourney.support.Task; -import com.xmzs.midjourney.util.MimeTypeUtils; -import eu.maxschuster.dataurl.DataUrl; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.List; - -@Slf4j -@Service -@RequiredArgsConstructor -public class TaskServiceImpl implements TaskService { - private final TaskStoreService taskStoreService; - private final DiscordLoadBalancer discordLoadBalancer; - - @Override - public SubmitResultVO submitImagine(Task task, List<DataUrl> dataUrls) { - DiscordInstance instance = this.discordLoadBalancer.chooseInstance(); - if (instance == null) { - return SubmitResultVO.fail(ReturnCode.NOT_FOUND, "鏃犲彲鐢ㄧ殑璐﹀彿瀹炰緥"); - } - task.setProperty(Constants.TASK_PROPERTY_DISCORD_INSTANCE_ID, instance.getInstanceId()); - return instance.submitTask(task, () -> { - List<String> imageUrls = new ArrayList<>(); - for (DataUrl dataUrl : dataUrls) { - String taskFileName = task.getId() + "." + MimeTypeUtils.guessFileSuffix(dataUrl.getMimeType()); - Message<String> uploadResult = instance.upload(taskFileName, dataUrl); - if (uploadResult.getCode() != ReturnCode.SUCCESS) { - return Message.of(uploadResult.getCode(), uploadResult.getDescription()); - } - String finalFileName = uploadResult.getResult(); - Message<String> sendImageResult = instance.sendImageMessage("upload image: " + finalFileName, finalFileName); - if (sendImageResult.getCode() != ReturnCode.SUCCESS) { - return Message.of(sendImageResult.getCode(), sendImageResult.getDescription()); - } - imageUrls.add(sendImageResult.getResult()); - } - if (!imageUrls.isEmpty()) { - task.setPrompt(String.join(" ", imageUrls) + " " + task.getPrompt()); - task.setPromptEn(String.join(" ", imageUrls) + " " + task.getPromptEn()); - task.setDescription("/imagine " + task.getPrompt()); - this.taskStoreService.save(task); - } - return instance.imagine(task.getPromptEn(), task.getPropertyGeneric(Constants.TASK_PROPERTY_NONCE)); - }); - } - - @Override - public SubmitResultVO submitUpscale(Task task, String targetMessageId, String targetMessageHash, int index, int messageFlags) { - String instanceId = task.getPropertyGeneric(Constants.TASK_PROPERTY_DISCORD_INSTANCE_ID); - DiscordInstance discordInstance = this.discordLoadBalancer.getDiscordInstance(instanceId); - if (discordInstance == null || !discordInstance.isAlive()) { - return SubmitResultVO.fail(ReturnCode.NOT_FOUND, "璐﹀彿涓嶅彲鐢�: " + instanceId); - } - return discordInstance.submitTask(task, () -> discordInstance.upscale(targetMessageId, index, targetMessageHash, messageFlags, task.getPropertyGeneric(Constants.TASK_PROPERTY_NONCE))); - } - - @Override - public SubmitResultVO submitVariation(Task task, String targetMessageId, String targetMessageHash, int index, int messageFlags) { - String instanceId = task.getPropertyGeneric(Constants.TASK_PROPERTY_DISCORD_INSTANCE_ID); - DiscordInstance discordInstance = this.discordLoadBalancer.getDiscordInstance(instanceId); - if (discordInstance == null || !discordInstance.isAlive()) { - return SubmitResultVO.fail(ReturnCode.NOT_FOUND, "璐﹀彿涓嶅彲鐢�: " + instanceId); - } - return discordInstance.submitTask(task, () -> discordInstance.variation(targetMessageId, index, targetMessageHash, messageFlags, task.getPropertyGeneric(Constants.TASK_PROPERTY_NONCE))); - } - - @Override - public SubmitResultVO submitReroll(Task task, String targetMessageId, String targetMessageHash, int messageFlags) { - String instanceId = task.getPropertyGeneric(Constants.TASK_PROPERTY_DISCORD_INSTANCE_ID); - DiscordInstance discordInstance = this.discordLoadBalancer.getDiscordInstance(instanceId); - if (discordInstance == null || !discordInstance.isAlive()) { - return SubmitResultVO.fail(ReturnCode.NOT_FOUND, "璐﹀彿涓嶅彲鐢�: " + instanceId); - } - return discordInstance.submitTask(task, () -> discordInstance.reroll(targetMessageId, targetMessageHash, messageFlags, task.getPropertyGeneric(Constants.TASK_PROPERTY_NONCE))); - } - - @Override - public SubmitResultVO submitDescribe(Task task, DataUrl dataUrl) { - DiscordInstance discordInstance = this.discordLoadBalancer.chooseInstance(); - if (discordInstance == null) { - return SubmitResultVO.fail(ReturnCode.NOT_FOUND, "鏃犲彲鐢ㄧ殑璐﹀彿瀹炰緥"); - } - task.setProperty(Constants.TASK_PROPERTY_DISCORD_INSTANCE_ID, discordInstance.getInstanceId()); - return discordInstance.submitTask(task, () -> { - String taskFileName = task.getId() + "." + MimeTypeUtils.guessFileSuffix(dataUrl.getMimeType()); - Message<String> uploadResult = discordInstance.upload(taskFileName, dataUrl); - if (uploadResult.getCode() != ReturnCode.SUCCESS) { - return Message.of(uploadResult.getCode(), uploadResult.getDescription()); - } - String finalFileName = uploadResult.getResult(); - return discordInstance.describe(finalFileName, task.getPropertyGeneric(Constants.TASK_PROPERTY_NONCE)); - }); - } - - @Override - public SubmitResultVO submitBlend(Task task, List<DataUrl> dataUrls, BlendDimensions dimensions) { - DiscordInstance discordInstance = this.discordLoadBalancer.chooseInstance(); - if (discordInstance == null) { - return SubmitResultVO.fail(ReturnCode.NOT_FOUND, "鏃犲彲鐢ㄧ殑璐﹀彿瀹炰緥"); - } - task.setProperty(Constants.TASK_PROPERTY_DISCORD_INSTANCE_ID, discordInstance.getInstanceId()); - return discordInstance.submitTask(task, () -> { - List<String> finalFileNames = new ArrayList<>(); - for (DataUrl dataUrl : dataUrls) { - String taskFileName = task.getId() + "." + MimeTypeUtils.guessFileSuffix(dataUrl.getMimeType()); - Message<String> uploadResult = discordInstance.upload(taskFileName, dataUrl); - if (uploadResult.getCode() != ReturnCode.SUCCESS) { - return Message.of(uploadResult.getCode(), uploadResult.getDescription()); - } - finalFileNames.add(uploadResult.getResult()); - } - return discordInstance.blend(finalFileNames, dimensions, task.getPropertyGeneric(Constants.TASK_PROPERTY_NONCE)); - }); - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/TaskStoreService.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/TaskStoreService.java deleted file mode 100644 index c090fb5..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/TaskStoreService.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.xmzs.midjourney.service; - - -import com.xmzs.midjourney.support.Task; -import com.xmzs.midjourney.support.TaskCondition; - -import java.util.List; - -public interface TaskStoreService { - - void save(Task task); - - void delete(String id); - - Task get(String id); - - List<Task> list(); - - List<Task> list(TaskCondition condition); - - Task findOne(TaskCondition condition); - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/TranslateService.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/TranslateService.java deleted file mode 100644 index fe673a9..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/TranslateService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.xmzs.midjourney.service; - -import java.util.regex.Pattern; - -public interface TranslateService { - - String translateToEnglish(String prompt); - - default boolean containsChinese(String prompt) { - return Pattern.compile("[\u4e00-\u9fa5]").matcher(prompt).find(); - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/store/InMemoryTaskStoreServiceImpl.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/store/InMemoryTaskStoreServiceImpl.java deleted file mode 100644 index 4773e1a..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/store/InMemoryTaskStoreServiceImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.xmzs.midjourney.service.store; - -import cn.hutool.cache.CacheUtil; -import cn.hutool.cache.impl.TimedCache; -import cn.hutool.core.collection.ListUtil; -import cn.hutool.core.stream.StreamUtil; -import com.xmzs.midjourney.service.TaskStoreService; -import com.xmzs.midjourney.support.Task; -import com.xmzs.midjourney.support.TaskCondition; - -import java.time.Duration; -import java.util.List; - - -public class InMemoryTaskStoreServiceImpl implements TaskStoreService { - private final TimedCache<String, Task> taskMap; - - public InMemoryTaskStoreServiceImpl(Duration timeout) { - this.taskMap = CacheUtil.newTimedCache(timeout.toMillis()); - } - - @Override - public void save(Task task) { - this.taskMap.put(task.getId(), task); - } - - @Override - public void delete(String key) { - this.taskMap.remove(key); - } - - @Override - public Task get(String key) { - return this.taskMap.get(key); - } - - @Override - public List<Task> list() { - return ListUtil.toList(this.taskMap.iterator()); - } - - @Override - public List<Task> list(TaskCondition condition) { - return StreamUtil.of(this.taskMap.iterator()).filter(condition).toList(); - } - - @Override - public Task findOne(TaskCondition condition) { - return StreamUtil.of(this.taskMap.iterator()).filter(condition).findFirst().orElse(null); - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/store/RedisTaskStoreServiceImpl.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/store/RedisTaskStoreServiceImpl.java deleted file mode 100644 index ae08502..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/store/RedisTaskStoreServiceImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.xmzs.midjourney.service.store; - -import com.xmzs.midjourney.service.TaskStoreService; -import com.xmzs.midjourney.support.Task; -import com.xmzs.midjourney.support.TaskCondition; -import org.springframework.data.redis.core.Cursor; -import org.springframework.data.redis.core.RedisCallback; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.data.redis.core.ScanOptions; -import org.springframework.data.redis.core.ValueOperations; - -import java.time.Duration; -import java.util.Collections; -import java.util.List; -import java.util.Objects; -import java.util.Set; -import java.util.stream.Collectors; - -public class RedisTaskStoreServiceImpl implements TaskStoreService { - private static final String KEY_PREFIX = "mj-task-store::"; - - private final Duration timeout; - private final RedisTemplate<String, Task> redisTemplate; - - public RedisTaskStoreServiceImpl(Duration timeout, RedisTemplate<String, Task> redisTemplate) { - this.timeout = timeout; - this.redisTemplate = redisTemplate; - } - - @Override - public void save(Task task) { - this.redisTemplate.opsForValue().set(getRedisKey(task.getId()), task, this.timeout); - } - - @Override - public void delete(String id) { - this.redisTemplate.delete(getRedisKey(id)); - } - - @Override - public Task get(String id) { - return this.redisTemplate.opsForValue().get(getRedisKey(id)); - } - - @Override - public List<Task> list() { - Set<String> keys = this.redisTemplate.execute((RedisCallback<Set<String>>) connection -> { - Cursor<byte[]> cursor = connection.scan(ScanOptions.scanOptions().match(KEY_PREFIX + "*").count(1000).build()); - return cursor.stream().map(String::new).collect(Collectors.toSet()); - }); - if (keys == null || keys.isEmpty()) { - return Collections.emptyList(); - } - ValueOperations<String, Task> operations = this.redisTemplate.opsForValue(); - return keys.stream().map(operations::get) - .filter(Objects::nonNull) - .toList(); - } - - @Override - public List<Task> list(TaskCondition condition) { - return list().stream().filter(condition).toList(); - } - - @Override - public Task findOne(TaskCondition condition) { - return list().stream().filter(condition).findFirst().orElse(null); - } - - private String getRedisKey(String id) { - return KEY_PREFIX + id; - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/translate/BaiduTranslateServiceImpl.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/translate/BaiduTranslateServiceImpl.java deleted file mode 100644 index c629ca1..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/translate/BaiduTranslateServiceImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.xmzs.midjourney.service.translate; - - -import cn.hutool.core.exceptions.ValidateException; -import cn.hutool.core.text.CharSequenceUtil; -import cn.hutool.core.util.RandomUtil; -import cn.hutool.crypto.digest.MD5; -import com.xmzs.midjourney.ProxyProperties; -import com.xmzs.midjourney.service.TranslateService; -import lombok.extern.slf4j.Slf4j; -import org.json.JSONArray; -import org.json.JSONObject; -import org.springframework.beans.factory.support.BeanDefinitionValidationException; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; -import org.springframework.web.client.RestTemplate; - -import java.util.ArrayList; -import java.util.List; - -@Slf4j -public class BaiduTranslateServiceImpl implements TranslateService { - private static final String TRANSLATE_API = "https://fanyi-api.baidu.com/api/trans/vip/translate"; - - private final String appid; - private final String appSecret; - - public BaiduTranslateServiceImpl(ProxyProperties.BaiduTranslateConfig translateConfig) { - this.appid = translateConfig.getAppid(); - this.appSecret = translateConfig.getAppSecret(); - if (!CharSequenceUtil.isAllNotBlank(this.appid, this.appSecret)) { - throw new BeanDefinitionValidationException("mj.baidu-translate.appid鎴杕j.baidu-translate.app-secret鏈厤缃�"); - } - } - - @Override - public String translateToEnglish(String prompt) { - if (!containsChinese(prompt)) { - return prompt; - } - String salt = RandomUtil.randomNumbers(5); - String sign = MD5.create().digestHex(this.appid + prompt + salt + this.appSecret); - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); - MultiValueMap<String, String> body = new LinkedMultiValueMap<>(); - body.add("from", "zh"); - body.add("to", "en"); - body.add("appid", this.appid); - body.add("salt", salt); - body.add("q", prompt); - body.add("sign", sign); - HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<>(body, headers); - try { - ResponseEntity<String> responseEntity = new RestTemplate().exchange(TRANSLATE_API, HttpMethod.POST, requestEntity, String.class); - if (responseEntity.getStatusCode() != HttpStatus.OK || CharSequenceUtil.isBlank(responseEntity.getBody())) { - throw new ValidateException(responseEntity.getStatusCodeValue() + " - " + responseEntity.getBody()); - } - JSONObject result = new JSONObject(responseEntity.getBody()); - if (result.has("error_code")) { - throw new ValidateException(result.getString("error_code") + " - " + result.getString("error_msg")); - } - List<String> strings = new ArrayList<>(); - JSONArray transResult = result.getJSONArray("trans_result"); - for (int i = 0; i < transResult.length(); i++) { - strings.add(transResult.getJSONObject(i).getString("dst")); - } - return CharSequenceUtil.join("\n", strings); - } catch (Exception e) { - log.warn("璋冪敤鐧惧害缈昏瘧澶辫触: {}", e.getMessage()); - } - return prompt; - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/translate/GPTTranslateServiceImpl.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/translate/GPTTranslateServiceImpl.java deleted file mode 100644 index 157fb4f..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/translate/GPTTranslateServiceImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.xmzs.midjourney.service.translate; - - -import cn.hutool.core.text.CharSequenceUtil; -import com.xmzs.midjourney.ProxyProperties; -import com.xmzs.midjourney.service.TranslateService; -import com.unfbx.chatgpt.OpenAiClient; -import com.unfbx.chatgpt.entity.chat.ChatChoice; -import com.unfbx.chatgpt.entity.chat.ChatCompletion; -import com.unfbx.chatgpt.entity.chat.ChatCompletionResponse; -import com.unfbx.chatgpt.entity.chat.Message; -import com.unfbx.chatgpt.function.KeyRandomStrategy; -import com.unfbx.chatgpt.interceptor.OpenAILogger; -import com.unfbx.chatgpt.interceptor.OpenAiResponseInterceptor; -import lombok.extern.slf4j.Slf4j; -import okhttp3.OkHttpClient; -import okhttp3.logging.HttpLoggingInterceptor; -import org.springframework.beans.factory.support.BeanDefinitionValidationException; - -import java.net.InetSocketAddress; -import java.net.Proxy; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.concurrent.TimeUnit; - -@Slf4j -public class GPTTranslateServiceImpl implements TranslateService { - private final OpenAiClient openAiClient; - private final ProxyProperties.OpenaiConfig openaiConfig; - - public GPTTranslateServiceImpl(ProxyProperties properties) { - this.openaiConfig = properties.getOpenai(); - if (CharSequenceUtil.isBlank(this.openaiConfig.getGptApiKey())) { - throw new BeanDefinitionValidationException("mj.openai.gpt-api-key鏈厤缃�"); - } - HttpLoggingInterceptor httpLoggingInterceptor = new HttpLoggingInterceptor(new OpenAILogger()); - httpLoggingInterceptor.setLevel(HttpLoggingInterceptor.Level.HEADERS); - OkHttpClient.Builder okHttpBuilder = new OkHttpClient.Builder() - .addInterceptor(httpLoggingInterceptor) - .addInterceptor(new OpenAiResponseInterceptor()) - .connectTimeout(10, TimeUnit.SECONDS) - .writeTimeout(30, TimeUnit.SECONDS) - .readTimeout(30, TimeUnit.SECONDS); - if (CharSequenceUtil.isNotBlank(properties.getProxy().getHost())) { - Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(properties.getProxy().getHost(), properties.getProxy().getPort())); - okHttpBuilder.proxy(proxy); - } - OpenAiClient.Builder apiBuilder = OpenAiClient.builder() - .apiKey(Collections.singletonList(this.openaiConfig.getGptApiKey())) - .keyStrategy(new KeyRandomStrategy()) - .okHttpClient(okHttpBuilder.build()); - if (CharSequenceUtil.isNotBlank(this.openaiConfig.getGptApiUrl())) { - apiBuilder.apiHost(this.openaiConfig.getGptApiUrl()); - } - this.openAiClient = apiBuilder.build(); - } - - @Override - public String translateToEnglish(String prompt) { - if (!containsChinese(prompt)) { - return prompt; - } - Message m1 = Message.builder().role(Message.Role.SYSTEM).content("鎶婁腑鏂囩炕璇戞垚鑻辨枃").build(); - Message m2 = Message.builder().role(Message.Role.USER).content(prompt).build(); - ChatCompletion chatCompletion = ChatCompletion.builder() - .messages(Arrays.asList(m1, m2)) - .model(this.openaiConfig.getModel()) - .temperature(this.openaiConfig.getTemperature()) - .maxTokens(this.openaiConfig.getMaxTokens()) - .build(); - ChatCompletionResponse chatCompletionResponse = this.openAiClient.chatCompletion(chatCompletion); - try { - List<ChatChoice> choices = chatCompletionResponse.getChoices(); - if (!choices.isEmpty()) { - return choices.get(0).getMessage().getContent(); - } - } catch (Exception e) { - log.warn("璋冪敤chat-gpt鎺ュ彛缈昏瘧涓枃澶辫触: {}", e.getMessage()); - } - return prompt; - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/translate/NoTranslateServiceImpl.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/translate/NoTranslateServiceImpl.java deleted file mode 100644 index cbfc1a1..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/service/translate/NoTranslateServiceImpl.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.xmzs.midjourney.service.translate; - - -import com.xmzs.midjourney.service.TranslateService; -import lombok.extern.slf4j.Slf4j; - -@Slf4j -public class NoTranslateServiceImpl implements TranslateService { - - @Override - public String translateToEnglish(String prompt) { - return prompt; - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/ApiAuthorizeInterceptor.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/ApiAuthorizeInterceptor.java deleted file mode 100644 index 00e1f32..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/ApiAuthorizeInterceptor.java +++ /dev/null @@ -1,152 +0,0 @@ -package com.xmzs.midjourney.support; - -import com.xmzs.common.chat.constant.OpenAIConst; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.system.service.IChatService; -import com.xmzs.system.service.ISseService; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import org.jetbrains.annotations.NotNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.*; -import org.springframework.stereotype.Component; -import org.springframework.util.StreamUtils; -import org.springframework.web.client.RestTemplate; -import org.springframework.web.servlet.HandlerInterceptor; - -import java.io.InputStream; -import java.nio.charset.StandardCharsets; -import java.util.Enumeration; -import java.util.Objects; - -@Component -public class ApiAuthorizeInterceptor implements HandlerInterceptor { - private static final Logger log = LoggerFactory.getLogger(ApiAuthorizeInterceptor.class); - private static final String API_SECRET_HEADER = "mj-api-secret"; - - @Value("${chat.apiKey}") - private String API_SECRET_VALUE; - @Value("${chat.apiHost}") - private String apiHost; - - @Autowired - private RestTemplate restTemplate; - - @Autowired - private IChatService chatService; - - @Autowired - private ISseService sseService; - - @Override - public boolean preHandle(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response, @NotNull Object handler) { - // 鍒ゆ柇鏄惁鏄疢idJourney鐨勮姹� - if (isMidJourneyRequest(request)) { - try { - // 澶勭悊璇锋眰锛屼緥濡傝垂鐢ㄦ墸闄ゅ拰浠诲姟鏌ヨ - processRequest(request); - // 杞彂璇锋眰鍒扮洰鏍囨湇鍔″櫒 - forwardRequest(request, response); - } catch (Exception e) { - // 璁板綍閿欒鏃ュ織锛屽寘鎷紓甯稿爢鏍堜俊鎭� - log.error("杞彂璇锋眰鏃跺彂鐢熼敊璇�", e); - // 璁剧疆HTTP鐘舵�佺爜鍜屽搷搴斾俊鎭� - response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value()); - response.setCharacterEncoding(StandardCharsets.UTF_8.name()); - response.setContentType(MediaType.APPLICATION_JSON_VALUE); - try { - // 鍚戝鎴风杩斿洖閿欒淇℃伅 - response.getWriter().write("缁樺浘澶辫触锛�" + e.getMessage()); - } catch (Exception ex) { - log.error("璁剧疆閿欒鍝嶅簲鏃跺彂鐢熼敊璇�", ex); - } - // 涓柇璇锋眰澶勭悊娴佺▼ - return false; - } - // 涓柇姝e父鐨勮姹傚鐞嗘祦绋嬶紝鍥犱负璇锋眰宸茶杞彂 - return false; - } - // 濡傛灉涓嶆槸MidJourney鐨勮姹傦紝鍒欑户缁甯稿鐞� - return true; - } - - private boolean isMidJourneyRequest(HttpServletRequest request) { - String uri = request.getRequestURI(); - return uri.startsWith("/mj") && - !uri.matches(".*/\\d+/fetch") && - !uri.matches("/mj/insight-face/swap") && - !uri.matches("/mj/submit/action"); - } - - private void processRequest(HttpServletRequest request) { - // 澶勭悊浠樿垂鐢ㄦ埛鐨勮姹傦紝鍖呮嫭璐圭敤鎵i櫎鍜屼换鍔℃煡璇� - sseService.checkUserGrade(); - String uri = request.getRequestURI(); - if (uri.matches("/mj/submit/describe") || uri.matches("/mj/submit/shorten")) { - chatService.mjTaskDeduct(uri.endsWith("describe") ? "鍥剧敓鏂�" : "prompt鍒嗘瀽", OpenAIConst.MJ_COST_TYPE2); - } else if (uri.endsWith("image-seed") || uri.endsWith("list-by-condition")) { - chatService.mjTaskDeduct(uri.endsWith("image-seed") ? "鑾峰彇绉嶅瓙" : "浠诲姟鏌ヨ", OpenAIConst.MJ_COST_TYPE3); - } else if (uri.matches("/mj/submit/.*")) { - chatService.mjTaskDeduct("鏂囩敓鍥�", OpenAIConst.MJ_COST_TYPE1); - } - } - - private void forwardRequest(HttpServletRequest request, HttpServletResponse response) throws Exception { - String targetUrl = buildTargetUrl(request); - HttpEntity<String> entity = new HttpEntity<>(readRequestBody(request), copyHeaders(request)); - HttpMethod method = HttpMethod.valueOf(request.getMethod()); - ResponseEntity<byte[]> responseEntity = restTemplate.exchange(targetUrl, method, entity, byte[].class); - copyResponseBack(response, responseEntity); - } - - private String buildTargetUrl(HttpServletRequest request) { - String uri = request.getRequestURI(); - String queryString = request.getQueryString(); - log.info("Forwarding URL: {}", uri); - return apiHost + uri + (queryString != null ? "?" + queryString : ""); - } - - private HttpHeaders copyHeaders(HttpServletRequest request) { - HttpHeaders headers = new HttpHeaders(); - headers.set(API_SECRET_HEADER, API_SECRET_VALUE); - Enumeration<String> headerNames = request.getHeaderNames(); - while (headerNames.hasMoreElements()) { - String headerName = headerNames.nextElement(); - if (!headerName.equalsIgnoreCase(API_SECRET_HEADER) && - !headerName.equalsIgnoreCase(HttpHeaders.CONTENT_LENGTH) && - !headerName.equalsIgnoreCase(HttpHeaders.AUTHORIZATION)) { - headers.set(headerName, request.getHeader(headerName)); - } - } - return headers; - } - - private String readRequestBody(HttpServletRequest request) throws Exception { - if (request.getContentLengthLong() > 0) { - try (InputStream inputStream = request.getInputStream()) { - return StreamUtils.copyToString(inputStream, StandardCharsets.UTF_8); - } - } - return ""; - } - - private void copyResponseBack(HttpServletResponse response, ResponseEntity<byte[]> responseEntity) throws Exception { - HttpHeaders responseHeaders = responseEntity.getHeaders(); - responseHeaders.forEach((key, values) -> { - if (!key.equalsIgnoreCase(API_SECRET_HEADER)) { - response.addHeader(key, String.join(",", values)); - } - }); - // 璁剧疆鍝嶅簲鍐呭绫诲瀷涓篣TF-8锛岄槻姝贡鐮� - response.setContentType(MediaType.APPLICATION_JSON_VALUE); - response.setCharacterEncoding(StandardCharsets.UTF_8.name()); - HttpStatus status = HttpStatus.resolve(responseEntity.getStatusCode().value()); - response.setStatus(Objects.requireNonNullElse(status, HttpStatus.INTERNAL_SERVER_ERROR).value()); - if (responseEntity.getBody() != null) { - StreamUtils.copy(responseEntity.getBody(), response.getOutputStream()); - } - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/DiscordAccountHelper.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/DiscordAccountHelper.java deleted file mode 100644 index adaf869..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/DiscordAccountHelper.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.xmzs.midjourney.support; - - -import cn.hutool.core.text.CharSequenceUtil; -import com.xmzs.midjourney.Constants; -import com.xmzs.midjourney.ProxyProperties; -import com.xmzs.midjourney.domain.DiscordAccount; -import com.xmzs.midjourney.loadbalancer.DiscordInstance; -import com.xmzs.midjourney.loadbalancer.DiscordInstanceImpl; -import com.xmzs.midjourney.service.NotifyService; -import com.xmzs.midjourney.service.TaskStoreService; -import com.xmzs.midjourney.wss.handle.MessageHandler; -import com.xmzs.midjourney.wss.user.UserMessageListener; -import com.xmzs.midjourney.wss.user.UserWebSocketStarter; -import lombok.RequiredArgsConstructor; -import org.springframework.web.client.RestTemplate; - -import java.util.List; -import java.util.Map; - -@RequiredArgsConstructor -public class DiscordAccountHelper { - private final DiscordHelper discordHelper; - private final ProxyProperties properties; - private final RestTemplate restTemplate; - private final TaskStoreService taskStoreService; - private final NotifyService notifyService; - private final List<MessageHandler> messageHandlers; - private final Map<String, String> paramsMap; - - public DiscordInstance createDiscordInstance(DiscordAccount account) { - if (!CharSequenceUtil.isAllNotBlank(account.getGuildId(), account.getChannelId(), account.getUserToken())) { - throw new IllegalArgumentException("guildId, channelId, userToken must not be blank"); - } - if (CharSequenceUtil.isBlank(account.getUserAgent())) { - account.setUserAgent(Constants.DEFAULT_DISCORD_USER_AGENT); - } - var messageListener = new UserMessageListener(account, this.messageHandlers); - var webSocketStarter = new UserWebSocketStarter(this.discordHelper.getWss(), account, messageListener, this.properties.getProxy()); - return new DiscordInstanceImpl(account, webSocketStarter, this.restTemplate, - this.taskStoreService, this.notifyService, this.paramsMap); - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/DiscordAccountInitializer.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/DiscordAccountInitializer.java deleted file mode 100644 index bc9ddfa..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/DiscordAccountInitializer.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.xmzs.midjourney.support; - - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.exceptions.ValidateException; -import cn.hutool.core.text.CharSequenceUtil; -import com.xmzs.midjourney.ProxyProperties; -import com.xmzs.midjourney.ReturnCode; -import com.xmzs.midjourney.domain.DiscordAccount; -import com.xmzs.midjourney.loadbalancer.DiscordInstance; -import com.xmzs.midjourney.loadbalancer.DiscordLoadBalancer; -import com.xmzs.midjourney.util.AsyncLockUtils; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.apache.logging.log4j.util.Strings; -import org.springframework.boot.ApplicationArguments; -import org.springframework.boot.ApplicationRunner; -import org.springframework.stereotype.Component; - -import java.time.Duration; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; - -@Slf4j -@Component -@RequiredArgsConstructor -public class DiscordAccountInitializer implements ApplicationRunner { - private final DiscordLoadBalancer discordLoadBalancer; - private final DiscordAccountHelper discordAccountHelper; - private final ProxyProperties properties; - - @Override - public void run(ApplicationArguments args) throws Exception { - ProxyProperties.ProxyConfig proxy = this.properties.getProxy(); - if (Strings.isNotBlank(proxy.getHost())) { - System.setProperty("http.proxyHost", proxy.getHost()); - System.setProperty("http.proxyPort", String.valueOf(proxy.getPort())); - System.setProperty("https.proxyHost", proxy.getHost()); - System.setProperty("https.proxyPort", String.valueOf(proxy.getPort())); - } - - List<ProxyProperties.DiscordAccountConfig> configAccounts = this.properties.getAccounts(); - if (CharSequenceUtil.isNotBlank(this.properties.getDiscord().getChannelId())) { - configAccounts.add(this.properties.getDiscord()); - } - List<DiscordInstance> instances = this.discordLoadBalancer.getAllInstances(); - for (ProxyProperties.DiscordAccountConfig configAccount : configAccounts) { - DiscordAccount account = new DiscordAccount(); - BeanUtil.copyProperties(configAccount, account); - account.setId(configAccount.getChannelId()); - try { - DiscordInstance instance = this.discordAccountHelper.createDiscordInstance(account); - if (!account.isEnable()) { - continue; - } - instance.startWss(); - AsyncLockUtils.LockObject lock = AsyncLockUtils.waitForLock("wss:" + account.getChannelId(), Duration.ofSeconds(10)); - if (ReturnCode.SUCCESS != lock.getProperty("code", Integer.class, 0)) { - throw new ValidateException(lock.getProperty("description", String.class)); - } - instances.add(instance); - } catch (Exception e) { - log.error("Account({}) init fail, disabled: {}", account.getDisplay(), e.getMessage()); - account.setEnable(false); - } - } - Set<String> enableInstanceIds = instances.stream().filter(DiscordInstance::isAlive).map(DiscordInstance::getInstanceId).collect(Collectors.toSet()); - log.info("褰撳墠鍙敤璐﹀彿鏁� [{}] - {}", enableInstanceIds.size(), String.join(", ", enableInstanceIds)); - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/DiscordHelper.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/DiscordHelper.java deleted file mode 100644 index b2c8e32..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/DiscordHelper.java +++ /dev/null @@ -1,103 +0,0 @@ -package com.xmzs.midjourney.support; - -import cn.hutool.core.text.CharSequenceUtil; -import com.xmzs.midjourney.ProxyProperties; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Component; - -@Component -@RequiredArgsConstructor -public class DiscordHelper { - private final ProxyProperties properties; - /** - * DISCORD_SERVER_URL. - */ - public static final String DISCORD_SERVER_URL = "https://discord.com"; - /** - * DISCORD_CDN_URL. - */ - public static final String DISCORD_CDN_URL = "https://cdn.discordapp.com"; - /** - * DISCORD_WSS_URL. - */ - public static final String DISCORD_WSS_URL = "wss://gateway.discord.gg"; - /** - * DISCORD_UPLOAD_URL. - */ - public static final String DISCORD_UPLOAD_URL = "https://discord-attachments-uploads-prd.storage.googleapis.com"; - - public String getServer() { - if (CharSequenceUtil.isBlank(this.properties.getNgDiscord().getServer())) { - return DISCORD_SERVER_URL; - } - String serverUrl = this.properties.getNgDiscord().getServer(); - if (serverUrl.endsWith("/")) { - serverUrl = serverUrl.substring(0, serverUrl.length() - 1); - } - return serverUrl; - } - - public String getCdn() { - if (CharSequenceUtil.isBlank(this.properties.getNgDiscord().getCdn())) { - return DISCORD_CDN_URL; - } - String cdnUrl = this.properties.getNgDiscord().getCdn(); - if (cdnUrl.endsWith("/")) { - cdnUrl = cdnUrl.substring(0, cdnUrl.length() - 1); - } - return cdnUrl; - } - - public String getWss() { - if (CharSequenceUtil.isBlank(this.properties.getNgDiscord().getWss())) { - return DISCORD_WSS_URL; - } - String wssUrl = this.properties.getNgDiscord().getWss(); - if (wssUrl.endsWith("/")) { - wssUrl = wssUrl.substring(0, wssUrl.length() - 1); - } - return wssUrl; - } - - public String getDiscordUploadUrl(String uploadUrl) { - if (CharSequenceUtil.isBlank(this.properties.getNgDiscord().getUploadServer()) || CharSequenceUtil.isBlank(uploadUrl)) { - return uploadUrl; - } - String uploadServer = this.properties.getNgDiscord().getUploadServer(); - if (uploadServer.endsWith("/")) { - uploadServer = uploadServer.substring(0, uploadServer.length() - 1); - } - return uploadUrl.replaceFirst(DISCORD_UPLOAD_URL, uploadServer); - } - - public String findTaskIdWithCdnUrl(String url) { - if (!CharSequenceUtil.startWith(url, DISCORD_CDN_URL)) { - return null; - } - int hashStartIndex = url.lastIndexOf("/"); - String taskId = CharSequenceUtil.subBefore(url.substring(hashStartIndex + 1), ".", true); - if (CharSequenceUtil.length(taskId) == 16) { - return taskId; - } - return null; - } - - public String getMessageHash(String imageUrl) { - if (CharSequenceUtil.isBlank(imageUrl)) { - return null; - } - if (CharSequenceUtil.endWith(imageUrl, "_grid_0.webp")) { - int hashStartIndex = imageUrl.lastIndexOf("/"); - if (hashStartIndex < 0) { - return null; - } - return CharSequenceUtil.sub(imageUrl, hashStartIndex + 1, imageUrl.length() - "_grid_0.webp".length()); - } - int hashStartIndex = imageUrl.lastIndexOf("_"); - if (hashStartIndex < 0) { - return null; - } - return CharSequenceUtil.subBefore(imageUrl.substring(hashStartIndex + 1), ".", true); - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/SpringContextHolder.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/SpringContextHolder.java deleted file mode 100644 index 5f0b1db..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/SpringContextHolder.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.xmzs.midjourney.support; - -import org.springframework.beans.BeansException; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; -import org.springframework.stereotype.Component; - -@Component -public class SpringContextHolder implements ApplicationContextAware { - private static ApplicationContext APPLICATION_CONTEXT; - - @Override - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { - APPLICATION_CONTEXT = applicationContext; - } - - public static ApplicationContext getApplicationContext() { - if (APPLICATION_CONTEXT == null) { - throw new IllegalStateException("SpringContextHolder is not ready."); - } - return APPLICATION_CONTEXT; - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/Task.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/Task.java deleted file mode 100644 index afe49f2..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/Task.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.xmzs.midjourney.support; - -import com.xmzs.midjourney.domain.DomainObject; -import com.xmzs.midjourney.enums.TaskAction; -import com.xmzs.midjourney.enums.TaskStatus; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serial; - -@Data -@EqualsAndHashCode(callSuper = true) -@ApiModel("浠诲姟") -public class Task extends DomainObject { - @Serial - private static final long serialVersionUID = -674915748204390789L; - - @ApiModelProperty("浠诲姟绫诲瀷") - private TaskAction action; - @ApiModelProperty("浠诲姟鐘舵��") - private TaskStatus status = TaskStatus.NOT_START; - - @ApiModelProperty("鎻愮ず璇�") - private String prompt; - @ApiModelProperty("鎻愮ず璇�-鑻辨枃") - private String promptEn; - - @ApiModelProperty("浠诲姟鎻忚堪") - private String description; - @ApiModelProperty("鑷畾涔夊弬鏁�") - private String state; - - @ApiModelProperty("鎻愪氦鏃堕棿") - private Long submitTime; - @ApiModelProperty("寮�濮嬫墽琛屾椂闂�") - private Long startTime; - @ApiModelProperty("缁撴潫鏃堕棿") - private Long finishTime; - - @ApiModelProperty("鍥剧墖url") - private String imageUrl; - - @ApiModelProperty("浠诲姟杩涘害") - private String progress; - @ApiModelProperty("澶辫触鍘熷洜") - private String failReason; - - public void start() { - this.startTime = System.currentTimeMillis(); - this.status = TaskStatus.SUBMITTED; - this.progress = "0%"; - } - - public void success() { - this.finishTime = System.currentTimeMillis(); - this.status = TaskStatus.SUCCESS; - this.progress = "100%"; - } - - public void fail(String reason) { - this.finishTime = System.currentTimeMillis(); - this.status = TaskStatus.FAILURE; - this.failReason = reason; - this.progress = ""; - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/TaskCondition.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/TaskCondition.java deleted file mode 100644 index 34f47d1..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/TaskCondition.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.xmzs.midjourney.support; - -import cn.hutool.core.text.CharSequenceUtil; -import com.xmzs.midjourney.Constants; -import com.xmzs.midjourney.enums.TaskAction; -import com.xmzs.midjourney.enums.TaskStatus; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.util.Set; -import java.util.function.Predicate; - - -@Data -@Accessors(chain = true) -public class TaskCondition implements Predicate<Task> { - private String id; - - private Set<TaskStatus> statusSet; - private Set<TaskAction> actionSet; - - private String prompt; - private String promptEn; - private String description; - - private String finalPromptEn; - private String messageId; - private String messageHash; - private String progressMessageId; - private String nonce; - - @Override - public boolean test(Task task) { - if (task == null) { - return false; - } - if (CharSequenceUtil.isNotBlank(this.id) && !this.id.equals(task.getId())) { - return false; - } - if (this.statusSet != null && !this.statusSet.isEmpty() && !this.statusSet.contains(task.getStatus())) { - return false; - } - if (this.actionSet != null && !this.actionSet.isEmpty() && !this.actionSet.contains(task.getAction())) { - return false; - } - if (CharSequenceUtil.isNotBlank(this.prompt) && !this.prompt.equals(task.getPrompt())) { - return false; - } - if (CharSequenceUtil.isNotBlank(this.promptEn) && !this.promptEn.equals(task.getPromptEn())) { - return false; - } - if (CharSequenceUtil.isNotBlank(this.description) && !CharSequenceUtil.contains(task.getDescription(), this.description)) { - return false; - } - - if (CharSequenceUtil.isNotBlank(this.finalPromptEn) && !this.finalPromptEn.equals(task.getProperty(Constants.TASK_PROPERTY_FINAL_PROMPT))) { - return false; - } - if (CharSequenceUtil.isNotBlank(this.messageId) && !this.messageId.equals(task.getProperty(Constants.TASK_PROPERTY_MESSAGE_ID))) { - return false; - } - if (CharSequenceUtil.isNotBlank(this.messageHash) && !this.messageHash.equals(task.getProperty(Constants.TASK_PROPERTY_MESSAGE_HASH))) { - return false; - } - if (CharSequenceUtil.isNotBlank(this.progressMessageId) && !this.progressMessageId.equals(task.getProperty(Constants.TASK_PROPERTY_PROGRESS_MESSAGE_ID))) { - return false; - } - if (CharSequenceUtil.isNotBlank(this.nonce) && !this.nonce.equals(task.getProperty(Constants.TASK_PROPERTY_NONCE))) { - return false; - } - return true; - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/TaskTimeoutSchedule.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/TaskTimeoutSchedule.java deleted file mode 100644 index e4443db..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/support/TaskTimeoutSchedule.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.xmzs.midjourney.support; - -import com.xmzs.midjourney.enums.TaskStatus; -import com.xmzs.midjourney.loadbalancer.DiscordLoadBalancer; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Component; - -import java.util.List; -import java.util.Set; -import java.util.concurrent.TimeUnit; - -@Slf4j -@Component -@RequiredArgsConstructor -public class TaskTimeoutSchedule { - private final DiscordLoadBalancer discordLoadBalancer; - - @Scheduled(fixedRate = 30000L) - public void checkTasks() { - this.discordLoadBalancer.getAliveInstances().forEach(instance -> { - long timeout = TimeUnit.MINUTES.toMillis(instance.account().getTimeoutMinutes()); - List<Task> tasks = instance.getRunningTasks().stream() - .filter(t -> System.currentTimeMillis() - t.getStartTime() > timeout) - .toList(); - for (Task task : tasks) { - if (Set.of(TaskStatus.FAILURE, TaskStatus.SUCCESS).contains(task.getStatus())) { - log.warn("task status is failure/success but is in the queue, end it. id: {}", task.getId()); - } else { - log.debug("task timeout, id: {}", task.getId()); - task.fail("浠诲姟瓒呮椂"); - } - instance.exitTask(task); - } - }); - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/AsyncLockUtils.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/AsyncLockUtils.java deleted file mode 100644 index 067869d..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/AsyncLockUtils.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.xmzs.midjourney.util; - -import cn.hutool.cache.CacheUtil; -import cn.hutool.cache.impl.TimedCache; -import cn.hutool.core.thread.ThreadUtil; -import com.xmzs.midjourney.domain.DomainObject; -import lombok.experimental.UtilityClass; - -import java.time.Duration; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; - -@UtilityClass -public class AsyncLockUtils { - private static final TimedCache<String, LockObject> LOCK_MAP = CacheUtil.newTimedCache(Duration.ofDays(1).toMillis()); - - public static synchronized LockObject getLock(String key) { - return LOCK_MAP.get(key); - } - - public static LockObject waitForLock(String key, Duration duration) throws TimeoutException { - LockObject lockObject; - synchronized (LOCK_MAP) { - if (!LOCK_MAP.containsKey(key)) { - LOCK_MAP.put(key, new LockObject(key)); - } - lockObject = LOCK_MAP.get(key); - } - Future<?> future = ThreadUtil.execAsync(() -> { - try { - lockObject.sleep(); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } - }); - try { - future.get(duration.toMillis(), TimeUnit.MILLISECONDS); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - } catch (ExecutionException e) { - // do nothing - } catch (TimeoutException e) { - future.cancel(true); - throw new TimeoutException("Wait Timeout"); - } finally { - LOCK_MAP.remove(lockObject.getId()); - } - return lockObject; - } - - public static class LockObject extends DomainObject { - - public LockObject(String id) { - this.id = id; - } - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/BannedPromptUtils.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/BannedPromptUtils.java deleted file mode 100644 index 6d2ec05..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/BannedPromptUtils.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.xmzs.midjourney.util; - -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.text.CharSequenceUtil; -import com.xmzs.midjourney.exception.BannedPromptException; -import lombok.experimental.UtilityClass; - -import java.io.File; -import java.nio.charset.StandardCharsets; -import java.util.List; -import java.util.Locale; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -@UtilityClass -public class BannedPromptUtils { - private static final String BANNED_WORDS_FILE_PATH = "/home/spring/config/banned-words.txt"; - private final List<String> BANNED_WORDS; - - static { - List<String> lines; - File file = new File(BANNED_WORDS_FILE_PATH); - if (file.exists()) { - lines = FileUtil.readLines(file, StandardCharsets.UTF_8); - } else { - var resource = BannedPromptUtils.class.getResource("/banned-words.txt"); - lines = FileUtil.readLines(resource, StandardCharsets.UTF_8); - } - BANNED_WORDS = lines.stream().filter(CharSequenceUtil::isNotBlank).toList(); - } - - public static void checkBanned(String promptEn) throws BannedPromptException { - String finalPromptEn = promptEn.toLowerCase(Locale.ENGLISH); - for (String word : BANNED_WORDS) { - Matcher matcher = Pattern.compile("\\b" + word + "\\b").matcher(finalPromptEn); - if (matcher.find()) { - int index = CharSequenceUtil.indexOfIgnoreCase(promptEn, word); - throw new BannedPromptException(promptEn.substring(index, index + word.length())); - } - } - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/ContentParseData.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/ContentParseData.java deleted file mode 100644 index 81ca7a6..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/ContentParseData.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.xmzs.midjourney.util; - -import lombok.Data; - -@Data -public class ContentParseData { - protected String prompt; - protected String status; -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/ConvertUtils.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/ConvertUtils.java deleted file mode 100644 index 070c74e..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/ConvertUtils.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.xmzs.midjourney.util; - -import cn.hutool.core.text.CharSequenceUtil; -import com.xmzs.midjourney.enums.TaskAction; -import eu.maxschuster.dataurl.DataUrl; -import eu.maxschuster.dataurl.DataUrlSerializer; -import eu.maxschuster.dataurl.IDataUrlSerializer; -import lombok.experimental.UtilityClass; - -import java.net.MalformedURLException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -@UtilityClass -public class ConvertUtils { - /** - * content姝e垯鍖归厤prompt鍜岃繘搴�. - */ - public static final String CONTENT_REGEX = ".*?\\*\\*(.*?)\\*\\*.+<@\\d+> \\((.*?)\\)"; - - public static ContentParseData parseContent(String content) { - return parseContent(content, CONTENT_REGEX); - } - - public static ContentParseData parseContent(String content, String regex) { - if (CharSequenceUtil.isBlank(content)) { - return null; - } - Matcher matcher = Pattern.compile(regex).matcher(content); - if (!matcher.find()) { - return null; - } - ContentParseData parseData = new ContentParseData(); - parseData.setPrompt(matcher.group(1)); - parseData.setStatus(matcher.group(2)); - return parseData; - } - - public static List<DataUrl> convertBase64Array(List<String> base64Array) throws MalformedURLException { - if (base64Array == null || base64Array.isEmpty()) { - return Collections.emptyList(); - } - IDataUrlSerializer serializer = new DataUrlSerializer(); - List<DataUrl> dataUrlList = new ArrayList<>(); - for (String base64 : base64Array) { - DataUrl dataUrl = serializer.unserialize(base64); - dataUrlList.add(dataUrl); - } - return dataUrlList; - } - - public static TaskChangeParams convertChangeParams(String content) { - List<String> split = CharSequenceUtil.split(content, " "); - if (split.size() != 2) { - return null; - } - String action = split.get(1).toLowerCase(); - TaskChangeParams changeParams = new TaskChangeParams(); - changeParams.setId(split.get(0)); - if (action.charAt(0) == 'u') { - changeParams.setAction(TaskAction.UPSCALE); - } else if (action.charAt(0) == 'v') { - changeParams.setAction(TaskAction.VARIATION); - } else if (action.equals("r")) { - changeParams.setAction(TaskAction.REROLL); - return changeParams; - } else { - return null; - } - try { - int index = Integer.parseInt(action.substring(1, 2)); - if (index < 1 || index > 4) { - return null; - } - changeParams.setIndex(index); - } catch (Exception e) { - return null; - } - return changeParams; - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/MimeTypeUtils.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/MimeTypeUtils.java deleted file mode 100644 index 7080994..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/MimeTypeUtils.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.xmzs.midjourney.util; - -import cn.hutool.core.io.FileUtil; -import cn.hutool.core.text.CharSequenceUtil; -import lombok.experimental.UtilityClass; - -import java.nio.charset.StandardCharsets; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@UtilityClass -public class MimeTypeUtils { - private final Map<String, List<String>> MIME_TYPE_MAP; - - static { - MIME_TYPE_MAP = new HashMap<>(); - var resource = MimeTypeUtils.class.getResource("/mime.types"); - var lines = FileUtil.readLines(resource, StandardCharsets.UTF_8); - for (var line : lines) { - if (CharSequenceUtil.isBlank(line)) { - continue; - } - var arr = line.split(":"); - MIME_TYPE_MAP.put(arr[0], CharSequenceUtil.split(arr[1], ' ')); - } - } - - public static String guessFileSuffix(String mimeType) { - if (CharSequenceUtil.isBlank(mimeType)) { - return null; - } - String key = mimeType; - if (!MIME_TYPE_MAP.containsKey(key)) { - key = MIME_TYPE_MAP.keySet().stream().filter(k -> CharSequenceUtil.startWithIgnoreCase(mimeType, k)) - .findFirst().orElse(null); - } - var suffixList = MIME_TYPE_MAP.get(key); - if (suffixList == null || suffixList.isEmpty()) { - return null; - } - return suffixList.iterator().next(); - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/MjOkHttpUtil.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/MjOkHttpUtil.java deleted file mode 100644 index 3088fd4..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/MjOkHttpUtil.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.xmzs.midjourney.util; - -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import okhttp3.*; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; - -/** - * @author WangLe - */ -@RequiredArgsConstructor -@Component -@Slf4j -public class MjOkHttpUtil { - - @Value("${chat.apiKey}") - private List<String> apiKey; - @Value("${chat.apiHost}") - private String apiHost; - - private static final String API_SECRET_HEADER = "mj-api-secret"; - - private final OkHttpClient client = new OkHttpClient.Builder() - .connectTimeout(300, TimeUnit.SECONDS) - .writeTimeout(300, TimeUnit.SECONDS) - .readTimeout(300, TimeUnit.SECONDS) - .build(); - - public String executeRequest(Request request) { - try (Response response = client.newCall(request).execute()) { - if (!response.isSuccessful()) { - throw new IOException("Unexpected code " + response); - } - return response.body() != null ? response.body().string() : null; - } catch (IOException e) { - // 杩欓噷搴旀牴鎹疄闄呮儏鍐典娇鐢ㄩ�傚綋鐨勬棩蹇楄褰曟柟寮� - log.error("璇锋眰澶辫触: {}",e.getMessage()); - return null; - } - } - - public Request createPostRequest(String url, String json) { - MediaType JSON = MediaType.get("application/json; charset=utf-8"); - RequestBody body = RequestBody.create(json, JSON); - return new Request.Builder() - .url(apiHost + url) - .post(body) - .header(API_SECRET_HEADER, apiKey.get(0)) - .build(); - } - - public Request createGetRequest(String url) { - return new Request.Builder() - .url(apiHost + url) - .header(API_SECRET_HEADER, apiKey.get(0)) - .build(); - } - -} - diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/SnowFlake.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/SnowFlake.java deleted file mode 100644 index f78cb87..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/SnowFlake.java +++ /dev/null @@ -1,152 +0,0 @@ -package com.xmzs.midjourney.util; - -import cn.hutool.core.exceptions.ValidateException; -import com.xmzs.midjourney.exception.SnowFlakeException; -import lombok.extern.slf4j.Slf4j; - -import java.lang.management.ManagementFactory; -import java.net.InetAddress; -import java.net.NetworkInterface; -import java.util.Date; -import java.util.concurrent.ThreadLocalRandom; - -@Slf4j -public class SnowFlake { - private long workerId; - private long datacenterId; - private long sequence = 0L; - private final long twepoch; - private final long sequenceMask; - private final long workerIdShift; - private final long datacenterIdShift; - private final long timestampLeftShift; - private long lastTimestamp = -1L; - private final boolean randomSequence; - private long count = 0L; - private final long timeOffset; - private final ThreadLocalRandom tlr = ThreadLocalRandom.current(); - - public static final SnowFlake INSTANCE = new SnowFlake(); - - private SnowFlake() { - this(false, 10, null, 5L, 5L, 12L); - } - - private SnowFlake(boolean randomSequence, long timeOffset, Date epochDate, long workerIdBits, long datacenterIdBits, long sequenceBits) { - if (null != epochDate) { - this.twepoch = epochDate.getTime(); - } else { - // 2012/12/12 23:59:59 GMT - this.twepoch = 1355327999000L; - } - long maxWorkerId = ~(-1L << workerIdBits); - long maxDatacenterId = ~(-1L << datacenterIdBits); - this.sequenceMask = ~(-1L << sequenceBits); - this.workerIdShift = sequenceBits; - this.datacenterIdShift = sequenceBits + workerIdBits; - this.timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits; - this.randomSequence = randomSequence; - this.timeOffset = timeOffset; - try { - this.datacenterId = getDatacenterId(maxDatacenterId); - this.workerId = getMaxWorkerId(datacenterId, maxWorkerId); - } catch (Exception e) { - log.warn("datacenterId or workerId generate error: {}, set default value", e.getMessage()); - this.datacenterId = 4; - this.workerId = 1; - } - } - - public synchronized String nextId() { - long currentTimestamp = timeGen(); - if (currentTimestamp < this.lastTimestamp) { - long offset = this.lastTimestamp - currentTimestamp; - if (offset > this.timeOffset) { - throw new ValidateException("Clock moved backwards, refusing to generate id for [" + offset + "ms]"); - } - try { - this.wait(offset << 1); - } catch (InterruptedException e) { - throw new SnowFlakeException(e); - } - currentTimestamp = timeGen(); - if (currentTimestamp < this.lastTimestamp) { - throw new SnowFlakeException("Clock moved backwards, refusing to generate id for [" + offset + "ms]"); - } - } - if (this.lastTimestamp == currentTimestamp) { - long tempSequence = this.sequence + 1; - if (this.randomSequence) { - this.sequence = tempSequence & this.sequenceMask; - this.count = (this.count + 1) & this.sequenceMask; - if (this.count == 0) { - currentTimestamp = this.tillNextMillis(this.lastTimestamp); - } - } else { - this.sequence = tempSequence & this.sequenceMask; - if (this.sequence == 0) { - currentTimestamp = this.tillNextMillis(lastTimestamp); - } - } - } else { - this.sequence = this.randomSequence ? this.tlr.nextLong(this.sequenceMask + 1) : 0L; - this.count = 0L; - } - this.lastTimestamp = currentTimestamp; - long id = ((currentTimestamp - this.twepoch) << this.timestampLeftShift) | - (this.datacenterId << this.datacenterIdShift) | - (this.workerId << this.workerIdShift) | - this.sequence; - return String.valueOf(id); - } - - private static long getDatacenterId(long maxDatacenterId) { - long id = 0L; - try { - InetAddress ip = InetAddress.getLocalHost(); - NetworkInterface network = NetworkInterface.getByInetAddress(ip); - if (network == null) { - id = 1L; - } else { - byte[] mac = network.getHardwareAddress(); - if (null != mac) { - id = ((0x000000FF & (long) mac[mac.length - 1]) | (0x0000FF00 & (((long) mac[mac.length - 2]) << 8))) >> 6; - id = id % (maxDatacenterId + 1); - } - } - } catch (Exception e) { - throw new SnowFlakeException(e); - } - return id; - } - - private static long getMaxWorkerId(long datacenterId, long maxWorkerId) { - StringBuilder macIpPid = new StringBuilder(); - macIpPid.append(datacenterId); - try { - String name = ManagementFactory.getRuntimeMXBean().getName(); - if (name != null && !name.isEmpty()) { - macIpPid.append(name.split("@")[0]); - } - String hostIp = InetAddress.getLocalHost().getHostAddress(); - String ipStr = hostIp.replace("\\.", ""); - macIpPid.append(ipStr); - } catch (Exception e) { - throw new SnowFlakeException(e); - } - return (macIpPid.toString().hashCode() & 0xffff) % (maxWorkerId + 1); - } - - private long tillNextMillis(long lastTimestamp) { - long timestamp = timeGen(); - while (timestamp <= lastTimestamp) { - timestamp = timeGen(); - } - return timestamp; - } - - private long timeGen() { - return System.currentTimeMillis(); - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/TaskChangeParams.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/TaskChangeParams.java deleted file mode 100644 index 99a34eb..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/TaskChangeParams.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.xmzs.midjourney.util; - -import com.xmzs.midjourney.enums.TaskAction; -import lombok.Data; - -@Data -public class TaskChangeParams { - private String id; - private TaskAction action; - private Integer index; -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/UVContentParseData.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/UVContentParseData.java deleted file mode 100644 index 1bb76d6..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/util/UVContentParseData.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.xmzs.midjourney.util; - -import lombok.Data; -import lombok.EqualsAndHashCode; - -@Data -@EqualsAndHashCode(callSuper = true) -public class UVContentParseData extends ContentParseData { - protected Integer index; -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/WebSocketStarter.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/WebSocketStarter.java deleted file mode 100644 index 89c09f0..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/WebSocketStarter.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.xmzs.midjourney.wss; - -import com.xmzs.midjourney.ProxyProperties; -import com.neovisionaries.ws.client.ProxySettings; -import com.neovisionaries.ws.client.WebSocketFactory; -import org.apache.logging.log4j.util.Strings; - -public interface WebSocketStarter { - - void setTrying(boolean trying); - - void start() throws Exception; - - default WebSocketFactory createWebSocketFactory(ProxyProperties.ProxyConfig proxy) { - WebSocketFactory webSocketFactory = new WebSocketFactory().setConnectionTimeout(10000); - if (Strings.isNotBlank(proxy.getHost())) { - ProxySettings proxySettings = webSocketFactory.getProxySettings(); - proxySettings.setHost(proxy.getHost()); - proxySettings.setPort(proxy.getPort()); - } - return webSocketFactory; - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/BlendSuccessHandler.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/BlendSuccessHandler.java deleted file mode 100644 index 663422b..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/BlendSuccessHandler.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.xmzs.midjourney.wss.handle; - - -import com.xmzs.midjourney.enums.MessageType; -import com.xmzs.midjourney.enums.TaskAction; -import com.xmzs.midjourney.support.Task; -import com.xmzs.midjourney.support.TaskCondition; -import com.xmzs.midjourney.util.ContentParseData; -import com.xmzs.midjourney.util.ConvertUtils; -import net.dv8tion.jda.api.utils.data.DataObject; -import org.springframework.stereotype.Component; - -import java.util.Optional; -import java.util.Set; - -/** - * blend娑堟伅澶勭悊. - * 瀹屾垚(create): **<https://s.mj.run/JWu6jaL1D-8> <https://s.mj.run/QhfnQY-l68o> --v 5.1** - <@1012983546824114217> (relaxed) - */ -@Component -public class BlendSuccessHandler extends MessageHandler { - - @Override - public void handle(MessageType messageType, DataObject message) { - String content = getMessageContent(message); - ContentParseData parseData = ConvertUtils.parseContent(content); - if (parseData == null || !MessageType.CREATE.equals(messageType)) { - return; - } - Optional<DataObject> interaction = message.optObject("interaction"); - if (interaction.isPresent() && "blend".equals(interaction.get().getString("name"))) { - // blend浠诲姟寮�濮嬫椂锛岃缃畃rompt - Task task = this.discordLoadBalancer.getRunningTaskByNonce(getMessageNonce(message)); - if (task != null) { - task.setPromptEn(parseData.getPrompt()); - task.setPrompt(parseData.getPrompt()); - } - } - if (hasImage(message)) { - TaskCondition condition = new TaskCondition() - .setActionSet(Set.of(TaskAction.BLEND)) - .setFinalPromptEn(parseData.getPrompt()); - findAndFinishImageTask(condition, parseData.getPrompt(), message); - } - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/DescribeSuccessHandler.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/DescribeSuccessHandler.java deleted file mode 100644 index 4d5b6b8..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/DescribeSuccessHandler.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.xmzs.midjourney.wss.handle; - -import com.xmzs.midjourney.Constants; -import com.xmzs.midjourney.enums.MessageType; -import com.xmzs.midjourney.support.Task; -import net.dv8tion.jda.api.utils.data.DataArray; -import net.dv8tion.jda.api.utils.data.DataObject; -import org.springframework.stereotype.Component; - -import java.util.Optional; - -/** - * describe娑堟伅澶勭悊. - */ -@Component -public class DescribeSuccessHandler extends MessageHandler { - - @Override - public void handle(MessageType messageType, DataObject message) { - Optional<DataObject> interaction = message.optObject("interaction"); - if (!MessageType.UPDATE.equals(messageType) || interaction.isEmpty() || !"describe".equals(interaction.get().getString("name"))) { - return; - } - DataArray embeds = message.getArray("embeds"); - if (embeds.isEmpty()) { - return; - } - String description = embeds.getObject(0).getString("description"); - Optional<DataObject> imageOptional = embeds.getObject(0).optObject("image"); - if (imageOptional.isEmpty()) { - return; - } - String imageUrl = imageOptional.get().getString("url"); - String taskId = this.discordHelper.findTaskIdWithCdnUrl(imageUrl); - Task task = this.discordLoadBalancer.getRunningTask(taskId); - if (task == null) { - return; - } - task.setPrompt(description); - task.setPromptEn(description); - task.setProperty(Constants.TASK_PROPERTY_FINAL_PROMPT, description); - task.setImageUrl(replaceCdnUrl(imageUrl)); - finishTask(task, message); - task.awake(); - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/ErrorMessageHandler.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/ErrorMessageHandler.java deleted file mode 100644 index 15fda36..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/ErrorMessageHandler.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.xmzs.midjourney.wss.handle; - -import cn.hutool.core.text.CharSequenceUtil; -import com.xmzs.midjourney.ProxyProperties; -import com.xmzs.midjourney.enums.MessageType; -import com.xmzs.midjourney.enums.TaskStatus; -import com.xmzs.midjourney.support.Task; -import com.xmzs.midjourney.support.TaskCondition; -import lombok.extern.slf4j.Slf4j; -import net.dv8tion.jda.api.utils.data.DataArray; -import net.dv8tion.jda.api.utils.data.DataObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import java.util.Optional; -import java.util.Set; - -@Slf4j -@Component -public class ErrorMessageHandler extends MessageHandler { - @Autowired - protected ProxyProperties properties; - - @Override - public void handle(MessageType messageType, DataObject message) { - Optional<DataArray> embedsOptional = message.optArray("embeds"); - if (!MessageType.CREATE.equals(messageType) || embedsOptional.isEmpty() || embedsOptional.get().isEmpty()) { - return; - } - DataObject embed = embedsOptional.get().getObject(0); - String title = embed.getString("title", null); - String description = embed.getString("description", null); - String footerText = ""; - Optional<DataObject> footer = embed.optObject("footer"); - if (footer.isPresent()) { - footerText = footer.get().getString("text", ""); - } - String channelId = message.getString("channel_id", ""); - int color = embed.getInt("color", 0); - if (color == 16239475) { - log.warn("{} - MJ璀﹀憡淇℃伅: {}\n{}\nfooter: {}", channelId, title, description, footerText); - } else if (color == 16711680) { - log.error("{} - MJ寮傚父淇℃伅: {}\n{}\nfooter: {}", channelId, title, description, footerText); - String nonce = getMessageNonce(message); - Task task = this.discordLoadBalancer.getRunningTaskByNonce(nonce); - if (task != null) { - task.fail("[" + title + "] " + description); - task.awake(); - } - } else if (CharSequenceUtil.contains(title, "Invalid link")) { - // 鍏煎 Invalid link! 閿欒 - log.error("{} - MJ寮傚父淇℃伅: {}\n{}\nfooter: {}", channelId, title, description, footerText); - DataObject messageReference = message.optObject("message_reference").orElse(DataObject.empty()); - String referenceMessageId = messageReference.getString("message_id", ""); - if (CharSequenceUtil.isBlank(referenceMessageId)) { - return; - } - TaskCondition condition = new TaskCondition().setStatusSet(Set.of(TaskStatus.IN_PROGRESS)) - .setProgressMessageId(referenceMessageId); - Task task = this.discordLoadBalancer.findRunningTask(condition).findFirst().orElse(null); - if (task != null) { - task.fail("[" + title + "] " + description); - task.awake(); - } - } - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/ImagineSuccessHandler.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/ImagineSuccessHandler.java deleted file mode 100644 index f370402..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/ImagineSuccessHandler.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.xmzs.midjourney.wss.handle; - - -import com.xmzs.midjourney.enums.MessageType; -import com.xmzs.midjourney.enums.TaskAction; -import com.xmzs.midjourney.support.TaskCondition; -import com.xmzs.midjourney.util.ContentParseData; -import com.xmzs.midjourney.util.ConvertUtils; -import net.dv8tion.jda.api.utils.data.DataObject; -import org.springframework.stereotype.Component; - -import java.util.Set; - -/** - * imagine娑堟伅澶勭悊. - * 瀹屾垚(create): **cat** - <@1012983546824114217> (relaxed) - */ -@Component -public class ImagineSuccessHandler extends MessageHandler { - private static final String CONTENT_REGEX = "\\*\\*(.*?)\\*\\* - <@\\d+> \\((.*?)\\)"; - - @Override - public void handle(MessageType messageType, DataObject message) { - String content = getMessageContent(message); - ContentParseData parseData = ConvertUtils.parseContent(content, CONTENT_REGEX); - if (MessageType.CREATE.equals(messageType) && parseData != null && hasImage(message)) { - TaskCondition condition = new TaskCondition() - .setActionSet(Set.of(TaskAction.IMAGINE)) - .setFinalPromptEn(parseData.getPrompt()); - findAndFinishImageTask(condition, parseData.getPrompt(), message); - } - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/MessageHandler.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/MessageHandler.java deleted file mode 100644 index a120565..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/MessageHandler.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.xmzs.midjourney.wss.handle; - -import cn.hutool.core.text.CharSequenceUtil; -import com.xmzs.midjourney.Constants; -import com.xmzs.midjourney.enums.MessageType; -import com.xmzs.midjourney.loadbalancer.DiscordLoadBalancer; -import com.xmzs.midjourney.support.DiscordHelper; -import com.xmzs.midjourney.support.Task; -import com.xmzs.midjourney.support.TaskCondition; -import jakarta.annotation.Resource; -import net.dv8tion.jda.api.utils.data.DataArray; -import net.dv8tion.jda.api.utils.data.DataObject; - -import java.util.Comparator; - -public abstract class MessageHandler { - @Resource - protected DiscordLoadBalancer discordLoadBalancer; - @Resource - protected DiscordHelper discordHelper; - - public abstract void handle(MessageType messageType, DataObject message); - - protected String getMessageContent(DataObject message) { - return message.hasKey("content") ? message.getString("content") : ""; - } - - protected String getMessageNonce(DataObject message) { - return message.hasKey("nonce") ? message.getString("nonce") : ""; - } - - protected void findAndFinishImageTask(TaskCondition condition, String finalPrompt, DataObject message) { - String imageUrl = getImageUrl(message); - String messageHash = this.discordHelper.getMessageHash(imageUrl); - condition.setMessageHash(messageHash); - Task task = this.discordLoadBalancer.findRunningTask(condition) - .findFirst().orElseGet(() -> { - condition.setMessageHash(null); - return this.discordLoadBalancer.findRunningTask(condition) - .min(Comparator.comparing(Task::getStartTime)) - .orElse(null); - }); - if (task == null) { - return; - } - task.setProperty(Constants.TASK_PROPERTY_FINAL_PROMPT, finalPrompt); - task.setProperty(Constants.TASK_PROPERTY_MESSAGE_HASH, messageHash); - task.setImageUrl(imageUrl); - finishTask(task, message); - task.awake(); - } - - protected void finishTask(Task task, DataObject message) { - task.setProperty(Constants.TASK_PROPERTY_MESSAGE_ID, message.getString("id")); - task.setProperty(Constants.TASK_PROPERTY_FLAGS, message.getInt("flags", 0)); - task.setProperty(Constants.TASK_PROPERTY_MESSAGE_HASH, this.discordHelper.getMessageHash(task.getImageUrl())); - task.success(); - } - - protected boolean hasImage(DataObject message) { - DataArray attachments = message.optArray("attachments").orElse(DataArray.empty()); - return !attachments.isEmpty(); - } - - protected String getImageUrl(DataObject message) { - DataArray attachments = message.getArray("attachments"); - if (!attachments.isEmpty()) { - String imageUrl = attachments.getObject(0).getString("url"); - return replaceCdnUrl(imageUrl); - } - return null; - } - - protected String replaceCdnUrl(String imageUrl) { - if (CharSequenceUtil.isBlank(imageUrl)) { - return imageUrl; - } - String cdn = this.discordHelper.getCdn(); - if (CharSequenceUtil.startWith(imageUrl, cdn)) { - return imageUrl; - } - return CharSequenceUtil.replaceFirst(imageUrl, DiscordHelper.DISCORD_CDN_URL, cdn); - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/RerollSuccessHandler.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/RerollSuccessHandler.java deleted file mode 100644 index f86b8f4..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/RerollSuccessHandler.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.xmzs.midjourney.wss.handle; - - -import com.xmzs.midjourney.enums.MessageType; -import com.xmzs.midjourney.enums.TaskAction; -import com.xmzs.midjourney.support.TaskCondition; -import com.xmzs.midjourney.util.ContentParseData; -import com.xmzs.midjourney.util.ConvertUtils; -import net.dv8tion.jda.api.utils.data.DataObject; -import org.springframework.stereotype.Component; - -import java.util.Set; - -/** - * reroll 娑堟伅澶勭悊. - * 瀹屾垚(create): **cat** - <@1012983546824114217> (relaxed) - * 瀹屾垚(create): **cat** - Variations by <@1012983546824114217> (relaxed) - * 瀹屾垚(create): **cat** - Variations (Strong鎴朣ubtle) by <@1012983546824114217> (relaxed) - */ -@Component -public class RerollSuccessHandler extends MessageHandler { - private static final String CONTENT_REGEX_1 = "\\*\\*(.*?)\\*\\* - <@\\d+> \\((.*?)\\)"; - private static final String CONTENT_REGEX_2 = "\\*\\*(.*?)\\*\\* - Variations by <@\\d+> \\((.*?)\\)"; - private static final String CONTENT_REGEX_3 = "\\*\\*(.*?)\\*\\* - Variations \\(.*?\\) by <@\\d+> \\((.*?)\\)"; - - @Override - public void handle(MessageType messageType, DataObject message) { - String content = getMessageContent(message); - ContentParseData parseData = getParseData(content); - if (MessageType.CREATE.equals(messageType) && parseData != null && hasImage(message)) { - TaskCondition condition = new TaskCondition() - .setActionSet(Set.of(TaskAction.REROLL)) - .setFinalPromptEn(parseData.getPrompt()); - findAndFinishImageTask(condition, parseData.getPrompt(), message); - } - } - - private ContentParseData getParseData(String content) { - ContentParseData parseData = ConvertUtils.parseContent(content, CONTENT_REGEX_1); - if (parseData == null) { - parseData = ConvertUtils.parseContent(content, CONTENT_REGEX_2); - } - if (parseData == null) { - parseData = ConvertUtils.parseContent(content, CONTENT_REGEX_3); - } - return parseData; - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/StartAndProgressHandler.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/StartAndProgressHandler.java deleted file mode 100644 index 9ff668d..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/StartAndProgressHandler.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.xmzs.midjourney.wss.handle; - - -import cn.hutool.core.text.CharSequenceUtil; -import com.xmzs.midjourney.Constants; -import com.xmzs.midjourney.enums.MessageType; -import com.xmzs.midjourney.enums.TaskStatus; -import com.xmzs.midjourney.support.Task; -import com.xmzs.midjourney.support.TaskCondition; -import com.xmzs.midjourney.util.ContentParseData; -import com.xmzs.midjourney.util.ConvertUtils; -import lombok.extern.slf4j.Slf4j; -import net.dv8tion.jda.api.utils.data.DataArray; -import net.dv8tion.jda.api.utils.data.DataObject; -import org.springframework.stereotype.Component; - -import java.util.Optional; -import java.util.Set; - -@Slf4j -@Component -public class StartAndProgressHandler extends MessageHandler { - - @Override - public void handle(MessageType messageType, DataObject message) { - String nonce = getMessageNonce(message); - String content = getMessageContent(message); - ContentParseData parseData = ConvertUtils.parseContent(content); - if (MessageType.CREATE.equals(messageType) && CharSequenceUtil.isNotBlank(nonce)) { - if (isError(message)) { - return; - } - // 浠诲姟寮�濮� - Task task = this.discordLoadBalancer.getRunningTaskByNonce(nonce); - if (task == null) { - return; - } - task.setProperty(Constants.TASK_PROPERTY_PROGRESS_MESSAGE_ID, message.getString("id")); - // 鍏煎灏戞暟content涓虹┖鐨勫満鏅� - if (parseData != null) { - task.setProperty(Constants.TASK_PROPERTY_FINAL_PROMPT, parseData.getPrompt()); - } - task.setStatus(TaskStatus.IN_PROGRESS); - task.awake(); - } else if (MessageType.UPDATE.equals(messageType) && parseData != null) { - // 浠诲姟杩涘害 - TaskCondition condition = new TaskCondition().setStatusSet(Set.of(TaskStatus.IN_PROGRESS)) - .setProgressMessageId(message.getString("id")); - Task task = this.discordLoadBalancer.findRunningTask(condition).findFirst().orElse(null); - if (task == null) { - return; - } - task.setProperty(Constants.TASK_PROPERTY_FINAL_PROMPT, parseData.getPrompt()); - task.setStatus(TaskStatus.IN_PROGRESS); - task.setProgress(parseData.getStatus()); - String imageUrl = getImageUrl(message); - task.setImageUrl(imageUrl); - task.setProperty(Constants.TASK_PROPERTY_MESSAGE_HASH, this.discordHelper.getMessageHash(imageUrl)); - task.awake(); - } - } - - private boolean isError(DataObject message) { - Optional<DataArray> embedsOptional = message.optArray("embeds"); - if (embedsOptional.isEmpty() || embedsOptional.get().isEmpty()) { - return false; - } - DataObject embed = embedsOptional.get().getObject(0); - return embed.getInt("color", 0) == 16711680; - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/UpscaleSuccessHandler.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/UpscaleSuccessHandler.java deleted file mode 100644 index abe78d6..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/UpscaleSuccessHandler.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.xmzs.midjourney.wss.handle; - -import com.xmzs.midjourney.enums.MessageType; -import com.xmzs.midjourney.enums.TaskAction; -import com.xmzs.midjourney.support.TaskCondition; -import com.xmzs.midjourney.util.ContentParseData; -import com.xmzs.midjourney.util.ConvertUtils; -import net.dv8tion.jda.api.utils.data.DataObject; -import org.springframework.stereotype.Component; - -import java.util.Set; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * upscale娑堟伅澶勭悊. - * 瀹屾垚(create): **cat** - Upscaled (Beta鎴朙ight) by <@1083152202048217169> (fast) - * 瀹屾垚(create): **cat** - Upscaled by <@1083152202048217169> (fast) - * 瀹屾垚(create): **cat** - Image #1 <@1012983546824114217> - */ -@Component -public class UpscaleSuccessHandler extends MessageHandler { - private static final String CONTENT_REGEX_1 = "\\*\\*(.*?)\\*\\* - Upscaled \\(.*?\\) by <@\\d+> \\((.*?)\\)"; - private static final String CONTENT_REGEX_2 = "\\*\\*(.*?)\\*\\* - Upscaled by <@\\d+> \\((.*?)\\)"; - private static final String CONTENT_REGEX_3 = "\\*\\*(.*?)\\*\\* - Image #\\d <@\\d+>"; - - @Override - public void handle(MessageType messageType, DataObject message) { - String content = getMessageContent(message); - ContentParseData parseData = getParseData(content); - if (MessageType.CREATE.equals(messageType) && parseData != null && hasImage(message)) { - TaskCondition condition = new TaskCondition() - .setActionSet(Set.of(TaskAction.UPSCALE)) - .setFinalPromptEn(parseData.getPrompt()); - findAndFinishImageTask(condition, parseData.getPrompt(), message); - } - } - - private ContentParseData getParseData(String content) { - ContentParseData parseData = ConvertUtils.parseContent(content, CONTENT_REGEX_1); - if (parseData == null) { - parseData = ConvertUtils.parseContent(content, CONTENT_REGEX_2); - } - if (parseData != null) { - return parseData; - } - Matcher matcher = Pattern.compile(CONTENT_REGEX_3).matcher(content); - if (!matcher.find()) { - return null; - } - parseData = new ContentParseData(); - parseData.setPrompt(matcher.group(1)); - parseData.setStatus("done"); - return parseData; - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/VariationSuccessHandler.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/VariationSuccessHandler.java deleted file mode 100644 index 7fabe8d..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/handle/VariationSuccessHandler.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.xmzs.midjourney.wss.handle; - -import com.xmzs.midjourney.enums.MessageType; -import com.xmzs.midjourney.enums.TaskAction; -import com.xmzs.midjourney.support.TaskCondition; -import com.xmzs.midjourney.util.ContentParseData; -import com.xmzs.midjourney.util.ConvertUtils; -import net.dv8tion.jda.api.utils.data.DataObject; -import org.springframework.stereotype.Component; - -import java.util.Set; - -/** - * variation娑堟伅澶勭悊. - * 瀹屾垚(create): **cat** - Variations (Strong鎴朣ubtle) by <@1012983546824114217> (relaxed) - * 瀹屾垚(create): **cat** - Variations by <@1012983546824114217> (relaxed) - */ -@Component -public class VariationSuccessHandler extends MessageHandler { - private static final String CONTENT_REGEX_1 = "\\*\\*(.*?)\\*\\* - Variations by <@\\d+> \\((.*?)\\)"; - private static final String CONTENT_REGEX_2 = "\\*\\*(.*?)\\*\\* - Variations \\(.*?\\) by <@\\d+> \\((.*?)\\)"; - - @Override - public void handle(MessageType messageType, DataObject message) { - String content = getMessageContent(message); - ContentParseData parseData = getParseData(content); - if (MessageType.CREATE.equals(messageType) && parseData != null && hasImage(message)) { - TaskCondition condition = new TaskCondition() - .setActionSet(Set.of(TaskAction.VARIATION)) - .setFinalPromptEn(parseData.getPrompt()); - findAndFinishImageTask(condition, parseData.getPrompt(), message); - } - } - - private ContentParseData getParseData(String content) { - ContentParseData parseData = ConvertUtils.parseContent(content, CONTENT_REGEX_1); - if (parseData == null) { - parseData = ConvertUtils.parseContent(content, CONTENT_REGEX_2); - } - return parseData; - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/user/UserMessageListener.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/user/UserMessageListener.java deleted file mode 100644 index d495ff8..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/user/UserMessageListener.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.xmzs.midjourney.wss.user; - - -import cn.hutool.core.text.CharSequenceUtil; -import cn.hutool.core.thread.ThreadUtil; -import com.xmzs.midjourney.domain.DiscordAccount; -import com.xmzs.midjourney.enums.MessageType; -import com.xmzs.midjourney.wss.handle.MessageHandler; -import lombok.extern.slf4j.Slf4j; -import net.dv8tion.jda.api.utils.data.DataObject; - -import java.util.List; - -@Slf4j -public class UserMessageListener { - private final DiscordAccount account; - private final List<MessageHandler> messageHandlers; - - public UserMessageListener(DiscordAccount account, List<MessageHandler> messageHandlers) { - this.account = account; - this.messageHandlers = messageHandlers; - } - - public void onMessage(DataObject raw) { - MessageType messageType = MessageType.of(raw.getString("t")); - if (messageType == null || MessageType.DELETE == messageType) { - return; - } - DataObject data = raw.getObject("d"); - if (ignoreAndLogMessage(data, messageType)) { - return; - } - ThreadUtil.sleep(50); - for (MessageHandler messageHandler : this.messageHandlers) { - messageHandler.handle(messageType, data); - } - } - - private boolean ignoreAndLogMessage(DataObject data, MessageType messageType) { - String channelId = data.getString("channel_id"); - if (!CharSequenceUtil.equals(channelId, this.account.getChannelId())) { - return true; - } - String authorName = data.optObject("author").map(a -> a.getString("username")).orElse("System"); - log.debug("{} - {} - {}: {}", this.account.getDisplay(), messageType.name(), authorName, data.opt("content").orElse("")); - return false; - } -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/user/UserWebSocketStarter.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/user/UserWebSocketStarter.java deleted file mode 100644 index 252f914..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/com/xmzs/midjourney/wss/user/UserWebSocketStarter.java +++ /dev/null @@ -1,369 +0,0 @@ -package com.xmzs.midjourney.wss.user; - -import cn.hutool.core.exceptions.ValidateException; -import cn.hutool.core.text.CharSequenceUtil; -import cn.hutool.core.thread.ThreadUtil; -import cn.hutool.core.util.RandomUtil; -import com.xmzs.midjourney.ProxyProperties; -import com.xmzs.midjourney.ReturnCode; -import com.xmzs.midjourney.domain.DiscordAccount; -import com.xmzs.midjourney.util.AsyncLockUtils; -import com.xmzs.midjourney.wss.WebSocketStarter; -import com.neovisionaries.ws.client.WebSocket; -import com.neovisionaries.ws.client.WebSocketAdapter; -import com.neovisionaries.ws.client.WebSocketFactory; -import com.neovisionaries.ws.client.WebSocketFrame; -import eu.bitwalker.useragentutils.UserAgent; -import lombok.extern.slf4j.Slf4j; -import net.dv8tion.jda.api.utils.data.DataArray; -import net.dv8tion.jda.api.utils.data.DataObject; -import net.dv8tion.jda.api.utils.data.DataType; -import net.dv8tion.jda.internal.requests.WebSocketCode; -import net.dv8tion.jda.internal.utils.compress.Decompressor; -import net.dv8tion.jda.internal.utils.compress.ZlibDecompressor; - -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import java.util.List; -import java.util.Map; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; - -@Slf4j -public class UserWebSocketStarter extends WebSocketAdapter implements WebSocketStarter { - private static final int CONNECT_RETRY_LIMIT = 3; - - private final ProxyProperties.ProxyConfig proxyConfig; - private final DiscordAccount account; - private final UserMessageListener userMessageListener; - private final ScheduledExecutorService heartExecutor; - private final String wssServer; - private final DataObject authData; - - private Decompressor decompressor; - private WebSocket socket = null; - private String resumeGatewayUrl; - private String sessionId; - - private Future<?> heartbeatInterval; - private Future<?> heartbeatTimeout; - private boolean heartbeatAck = false; - private Object sequence = null; - private long interval = 41250; - private boolean trying = false; - - public UserWebSocketStarter(String wssServer, DiscordAccount account, UserMessageListener userMessageListener, ProxyProperties.ProxyConfig proxyConfig) { - this.wssServer = wssServer; - this.account = account; - this.userMessageListener = userMessageListener; - this.proxyConfig = proxyConfig; - this.heartExecutor = Executors.newSingleThreadScheduledExecutor(); - this.authData = createAuthData(); - } - - @Override - public void setTrying(boolean trying) { - this.trying = trying; - } - - @Override - public synchronized void start() throws Exception { - this.decompressor = new ZlibDecompressor(2048); - WebSocketFactory webSocketFactory = createWebSocketFactory(this.proxyConfig); - String gatewayUrl = CharSequenceUtil.isNotBlank(this.resumeGatewayUrl) ? this.resumeGatewayUrl : this.wssServer; - this.socket = webSocketFactory.createSocket(gatewayUrl + "/?encoding=json&v=9&compress=zlib-stream"); - this.socket.addListener(this); - this.socket.addHeader("Accept-Encoding", "gzip, deflate, br") - .addHeader("Accept-Language", "zh-CN,zh;q=0.9") - .addHeader("Cache-Control", "no-cache") - .addHeader("Pragma", "no-cache") - .addHeader("Sec-Websocket-Extensions", "permessage-deflate; client_max_window_bits") - .addHeader("User-Agent", this.account.getUserAgent()); - this.socket.connect(); - } - - @Override - public void onConnected(WebSocket websocket, Map<String, List<String>> headers) { - log.debug("[wss-{}] Connected to websocket.", this.account.getDisplay()); - } - - @Override - public void handleCallbackError(WebSocket websocket, Throwable cause) throws Exception { - log.error("[wss-{}] There was some websocket error.", this.account.getDisplay(), cause); - } - - @Override - public void onDisconnected(WebSocket websocket, WebSocketFrame serverCloseFrame, WebSocketFrame clientCloseFrame, boolean closedByServer) throws Exception { - int code; - String closeReason; - if (closedByServer) { - code = serverCloseFrame.getCloseCode(); - closeReason = serverCloseFrame.getCloseReason(); - } else { - code = clientCloseFrame.getCloseCode(); - closeReason = clientCloseFrame.getCloseReason(); - } - connectFinish(code, closeReason); - if (this.trying) { - return; - } - if (code == 5240) { - // 闅愬紡鍏抽棴wss - clearAllStates(); - } else if (code >= 4000) { - log.warn("[wss-{}] Can't reconnect! Account disabled. Closed by {}({}).", this.account.getDisplay(), code, closeReason); - clearAllStates(); - this.account.setEnable(false); - } else if (code == 2001) { - // reconnect - log.warn("[wss-{}] Waiting try reconnect...", this.account.getDisplay()); - tryReconnect(); - } else { - log.warn("[wss-{}] Closed by {}({}). Waiting try new connection...", this.account.getDisplay(), code, closeReason); - tryNewConnect(); - } - } - - private void tryReconnect() { - clearSocketStates(); - try { - this.trying = true; - tryStart(true); - } catch (Exception e) { - if (e instanceof TimeoutException) { - sendClose(5240, "try new connect"); - } - log.warn("[wss-{}] Try reconnect fail: {}, Waiting try new connection...", this.account.getDisplay(), e.getMessage()); - ThreadUtil.sleep(1000); - tryNewConnect(); - } - } - - private void tryNewConnect() { - this.trying = true; - for (int i = 1; i <= CONNECT_RETRY_LIMIT; i++) { - clearAllStates(); - try { - tryStart(false); - return; - } catch (Exception e) { - if (e instanceof TimeoutException) { - sendClose(5240, "try new connect"); - } - log.warn("[wss-{}] Try new connection fail ({}): {}", this.account.getDisplay(), i, e.getMessage()); - ThreadUtil.sleep(5000); - } - } - log.error("[wss-{}] Account disabled", this.account.getDisplay()); - this.account.setEnable(false); - } - - public void tryStart(boolean reconnect) throws Exception { - start(); - AsyncLockUtils.LockObject lock = AsyncLockUtils.waitForLock("wss:" + this.account.getChannelId(), Duration.ofSeconds(20)); - int code = lock.getProperty("code", Integer.class, 0); - if (code == ReturnCode.SUCCESS) { - log.debug("[wss-{}] {} success.", this.account.getDisplay(), reconnect ? "Reconnect" : "New connect"); - return; - } - throw new ValidateException(lock.getProperty("description", String.class)); - } - - @Override - public void onBinaryMessage(WebSocket websocket, byte[] binary) throws Exception { - if (this.decompressor == null) { - return; - } - byte[] decompressBinary = this.decompressor.decompress(binary); - if (decompressBinary == null) { - return; - } - String json = new String(decompressBinary, StandardCharsets.UTF_8); - DataObject data = DataObject.fromJson(json); - int opCode = data.getInt("op"); - switch (opCode) { - case WebSocketCode.HEARTBEAT -> { - log.debug("[wss-{}] Receive heartbeat.", this.account.getDisplay()); - handleHeartbeat(); - } - case WebSocketCode.HEARTBEAT_ACK -> { - this.heartbeatAck = true; - clearHeartbeatTimeout(); - } - case WebSocketCode.HELLO -> { - handleHello(data); - doResumeOrIdentify(); - } - case WebSocketCode.RESUME -> { - log.debug("[wss-{}] Receive resumed.", this.account.getDisplay()); - connectSuccess(); - } - case WebSocketCode.RECONNECT -> sendReconnect("receive server reconnect"); - case WebSocketCode.INVALIDATE_SESSION -> sendClose(1009, "receive session invalid"); - case WebSocketCode.DISPATCH -> handleDispatch(data); - default -> log.debug("[wss-{}] Receive unknown code: {}.", this.account.getDisplay(), data); - } - } - - private void handleHello(DataObject data) { - clearHeartbeatInterval(); - this.interval = data.getObject("d").getLong("heartbeat_interval"); - this.heartbeatAck = true; - this.heartbeatInterval = this.heartExecutor.scheduleAtFixedRate(() -> { - if (this.heartbeatAck) { - this.heartbeatAck = false; - send(WebSocketCode.HEARTBEAT, this.sequence); - } else { - sendReconnect("heartbeat has not ack interval"); - } - }, (long) Math.floor(RandomUtil.randomDouble(0, 1) * this.interval), this.interval, TimeUnit.MILLISECONDS); - } - - private void doResumeOrIdentify() { - if (CharSequenceUtil.isBlank(this.sessionId)) { - log.debug("[wss-{}] Send identify msg.", this.account.getDisplay()); - send(WebSocketCode.IDENTIFY, this.authData); - } else { - log.debug("[wss-{}] Send resume msg.", this.account.getDisplay()); - send(WebSocketCode.RESUME, DataObject.empty().put("token", this.account.getUserToken()) - .put("session_id", this.sessionId).put("seq", this.sequence)); - } - } - - private void handleHeartbeat() { - send(WebSocketCode.HEARTBEAT, this.sequence); - this.heartbeatTimeout = ThreadUtil.execAsync(() -> { - ThreadUtil.sleep(this.interval); - sendReconnect("heartbeat has not ack"); - }); - } - - private void clearAllStates() { - clearSocketStates(); - clearResumeStates(); - } - - private void clearSocketStates() { - clearHeartbeatTimeout(); - clearHeartbeatInterval(); - this.socket = null; - this.decompressor = null; - } - - private void clearResumeStates() { - this.sessionId = null; - this.sequence = null; - this.resumeGatewayUrl = null; - } - - private void clearHeartbeatInterval() { - if (this.heartbeatInterval != null) { - this.heartbeatInterval.cancel(true); - this.heartbeatInterval = null; - } - } - - private void clearHeartbeatTimeout() { - if (this.heartbeatTimeout != null) { - this.heartbeatTimeout.cancel(true); - this.heartbeatTimeout = null; - } - } - - private void sendReconnect(String reason) { - sendClose(2001, reason); - } - - private void sendClose(int code, String reason) { - if (this.socket != null) { - this.socket.sendClose(code, reason); - } - } - - private void send(int op, Object d) { - if (this.socket != null) { - this.socket.sendText(DataObject.empty().put("op", op).put("d", d).toString()); - } - } - - private void connectSuccess() { - this.trying = false; - connectFinish(ReturnCode.SUCCESS, ""); - } - - private void connectFinish(int code, String description) { - AsyncLockUtils.LockObject lock = AsyncLockUtils.getLock("wss:" + this.account.getChannelId()); - if (lock != null) { - lock.setProperty("code", code); - lock.setProperty("description", description); - lock.awake(); - } - } - - private void handleDispatch(DataObject raw) { - this.sequence = raw.opt("s").orElse(null); - if (!raw.isType("d", DataType.OBJECT)) { - return; - } - DataObject content = raw.getObject("d"); - String t = raw.getString("t", null); - if ("READY".equals(t)) { - this.sessionId = content.getString("session_id"); - this.resumeGatewayUrl = content.getString("resume_gateway_url"); - log.debug("[wss-{}] Dispatch ready: identify.", this.account.getDisplay()); - connectSuccess(); - return; - } else if ("RESUMED".equals(t)) { - log.debug("[wss-{}] Dispatch read: resumed.", this.account.getDisplay()); - connectSuccess(); - return; - } - try { - this.userMessageListener.onMessage(raw); - } catch (Exception e) { - log.error("[wss-{}] Handle message error", this.account.getDisplay(), e); - } - } - - private DataObject createAuthData() { - UserAgent agent = UserAgent.parseUserAgentString(this.account.getUserAgent()); - DataObject connectionProperties = DataObject.empty() - .put("browser", agent.getBrowser().getGroup().getName()) - .put("browser_user_agent", this.account.getUserAgent()) - .put("browser_version", agent.getBrowserVersion().toString()) - .put("client_build_number", 222963) - .put("client_event_source", null) - .put("device", "") - .put("os", agent.getOperatingSystem().getName()) - .put("referer", "https://www.midjourney.com") - .put("referrer_current", "") - .put("referring_domain", "www.midjourney.com") - .put("referring_domain_current", "") - .put("release_channel", "stable") - .put("system_locale", "zh-CN"); - DataObject presence = DataObject.empty() - .put("activities", DataArray.empty()) - .put("afk", false) - .put("since", 0) - .put("status", "online"); - DataObject clientState = DataObject.empty() - .put("api_code_version", 0) - .put("guild_versions", DataObject.empty()) - .put("highest_last_message_id", "0") - .put("private_channels_version", "0") - .put("read_state_version", 0) - .put("user_guild_settings_version", -1) - .put("user_settings_version", -1); - return DataObject.empty() - .put("capabilities", 16381) - .put("client_state", clientState) - .put("compress", false) - .put("presence", presence) - .put("properties", connectionProperties) - .put("token", this.account.getUserToken()); - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/spring/config/BeanConfig.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/spring/config/BeanConfig.java deleted file mode 100644 index 2ea40fd..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/spring/config/BeanConfig.java +++ /dev/null @@ -1,100 +0,0 @@ -package spring.config; - -import cn.hutool.core.io.IoUtil; -import cn.hutool.core.util.ReflectUtil; -import com.xmzs.midjourney.ProxyProperties; -import com.xmzs.midjourney.loadbalancer.rule.IRule; -import com.xmzs.midjourney.service.NotifyService; -import com.xmzs.midjourney.service.TaskStoreService; -import com.xmzs.midjourney.service.TranslateService; -import com.xmzs.midjourney.service.store.InMemoryTaskStoreServiceImpl; -import com.xmzs.midjourney.service.store.RedisTaskStoreServiceImpl; -import com.xmzs.midjourney.service.translate.BaiduTranslateServiceImpl; -import com.xmzs.midjourney.service.translate.GPTTranslateServiceImpl; -import com.xmzs.midjourney.service.translate.NoTranslateServiceImpl; -import com.xmzs.midjourney.support.DiscordAccountHelper; -import com.xmzs.midjourney.support.DiscordHelper; -import com.xmzs.midjourney.support.Task; -import com.xmzs.midjourney.wss.handle.MessageHandler; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.data.redis.connection.RedisConnectionFactory; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; -import org.springframework.data.redis.serializer.StringRedisSerializer; -import org.springframework.web.client.RestTemplate; - -import java.io.IOException; -import java.time.Duration; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@Configuration -public class BeanConfig { - @Autowired - private ApplicationContext applicationContext; - @Autowired - private ProxyProperties properties; - - @Bean - TranslateService translateService() { - return switch (this.properties.getTranslateWay()) { - case BAIDU -> new BaiduTranslateServiceImpl(this.properties.getBaiduTranslate()); - case GPT -> new GPTTranslateServiceImpl(this.properties); - default -> new NoTranslateServiceImpl(); - }; - } - - @Bean - TaskStoreService taskStoreService(RedisConnectionFactory redisConnectionFactory) { - ProxyProperties.TaskStore.Type type = this.properties.getTaskStore().getType(); - Duration timeout = this.properties.getTaskStore().getTimeout(); - return switch (type) { - case IN_MEMORY -> new InMemoryTaskStoreServiceImpl(timeout); - case REDIS -> new RedisTaskStoreServiceImpl(timeout, taskRedisTemplate(redisConnectionFactory)); - }; - } - - @Bean - RedisTemplate<String, Task> taskRedisTemplate(RedisConnectionFactory redisConnectionFactory) { - RedisTemplate<String, Task> redisTemplate = new RedisTemplate<>(); - redisTemplate.setConnectionFactory(redisConnectionFactory); - redisTemplate.setKeySerializer(new StringRedisSerializer()); - redisTemplate.setHashKeySerializer(new StringRedisSerializer()); - redisTemplate.setValueSerializer(new Jackson2JsonRedisSerializer<>(Task.class)); - return redisTemplate; - } - - @Bean - public RestTemplate restTemplate() { - return new RestTemplate(); - } - - @Bean - public IRule loadBalancerRule() { - String ruleClassName = IRule.class.getPackageName() + "." + this.properties.getAccountChooseRule(); - return ReflectUtil.newInstance(ruleClassName); - } - - @Bean - List<MessageHandler> messageHandlers() { - return this.applicationContext.getBeansOfType(MessageHandler.class).values().stream().toList(); - } - - @Bean - DiscordAccountHelper discordAccountHelper(DiscordHelper discordHelper, TaskStoreService taskStoreService, NotifyService notifyService) throws IOException { - var resources = this.applicationContext.getResources("classpath:api-params/*.json"); - Map<String, String> paramsMap = new HashMap<>(); - for (var resource : resources) { - String filename = resource.getFilename(); - String params = IoUtil.readUtf8(resource.getInputStream()); - paramsMap.put(filename.substring(0, filename.length() - 5), params); - } - return new DiscordAccountHelper(discordHelper, this.properties, restTemplate(), taskStoreService, notifyService, messageHandlers(), paramsMap); - } - - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/java/spring/config/WebMvcConfig.java b/ruoyi-modules/ruoyi-midjourney/src/main/java/spring/config/WebMvcConfig.java deleted file mode 100644 index d8e41aa..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/java/spring/config/WebMvcConfig.java +++ /dev/null @@ -1,32 +0,0 @@ -package spring.config; - -import cn.hutool.core.text.CharSequenceUtil; -import com.xmzs.midjourney.ProxyProperties; -import com.xmzs.midjourney.support.ApiAuthorizeInterceptor; -import jakarta.annotation.Resource; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; - -@Configuration -public class WebMvcConfig implements WebMvcConfigurer { - @Resource - private ApiAuthorizeInterceptor apiAuthorizeInterceptor; - @Resource - private ProxyProperties properties; - - @Override - public void addViewControllers(ViewControllerRegistry registry) { - registry.addViewController("/").setViewName("redirect:doc.html"); - } - - @Override - public void addInterceptors(InterceptorRegistry registry) { - if (CharSequenceUtil.isNotBlank(this.properties.getApiSecret())) { - registry.addInterceptor(this.apiAuthorizeInterceptor) - .addPathPatterns("/mj/submit/**", "/mj/task/**", "/mj/account/**"); - } - } - -} diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/blend.json b/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/blend.json deleted file mode 100644 index 7c8a352..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/blend.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "type":2, - "guild_id": "$guild_id", - "channel_id": "$channel_id", - "application_id":"936929561302675456", - "session_id":"$session_id", - "nonce": "$nonce", - "data":{ - "version":"1166847114203123796", - "id":"1062880104792997970", - "name":"blend", - "type":1, - "options":[], - "attachments":[] - } -} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/describe.json b/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/describe.json deleted file mode 100644 index 7ed659d..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/describe.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "type": 2, - "guild_id": "$guild_id", - "channel_id": "$channel_id", - "application_id": "936929561302675456", - "session_id": "$session_id", - "nonce": "$nonce", - "data": { - "version": "1166847114203123797", - "id": "1092492867185950852", - "name": "describe", - "type": 1, - "options": [ - { - "type": 11, - "name": "image", - "value": 0 - } - ], - "attachments": [ - { - "id": "0", - "filename": "$file_name", - "uploaded_filename": "$final_file_name" - } - ] - } -} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/imagine.json b/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/imagine.json deleted file mode 100644 index f4554cc..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/imagine.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": 2, - "guild_id": "$guild_id", - "channel_id": "$channel_id", - "application_id": "936929561302675456", - "session_id": "$session_id", - "nonce": "$nonce", - "data": { - "version": "1166847114203123795", - "id": "938956540159881230", - "name": "imagine", - "type": 1, - "options": [ - { - "type": 3, - "name": "prompt", - "value": "$prompt" - } - ] - } -} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/message.json b/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/message.json deleted file mode 100644 index 9f8cccb..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/message.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "content":"$content", - "channel_id":"$channel_id", - "type":0, - "sticker_ids":[], - "attachments":[ - { - "id":"0", - "filename": "$file_name", - "uploaded_filename": "$final_file_name" - } - ] -} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/reroll.json b/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/reroll.json deleted file mode 100644 index 84435b6..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/reroll.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": 3, - "guild_id": "$guild_id", - "channel_id": "$channel_id", - "message_id": "$message_id", - "application_id": "936929561302675456", - "session_id": "$session_id", - "nonce": "$nonce", - "message_flags": 0, - "data": { - "component_type": 2, - "custom_id": "MJ::JOB::reroll::0::$message_hash::SOLO" - } -} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/upscale.json b/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/upscale.json deleted file mode 100644 index f1afdd5..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/upscale.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": 3, - "guild_id": "$guild_id", - "channel_id": "$channel_id", - "message_id": "$message_id", - "application_id": "936929561302675456", - "session_id": "$session_id", - "nonce": "$nonce", - "message_flags": 0, - "data": { - "component_type": 2, - "custom_id": "MJ::JOB::upsample::$index::$message_hash" - } -} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/variation.json b/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/variation.json deleted file mode 100644 index 0f750ae..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/resources/api-params/variation.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "type": 3, - "guild_id": "$guild_id", - "channel_id": "$channel_id", - "message_id": "$message_id", - "application_id": "936929561302675456", - "session_id": "$session_id", - "nonce": "$nonce", - "message_flags": 0, - "data": { - "component_type": 2, - "custom_id": "MJ::JOB::variation::$index::$message_hash" - } -} \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/resources/banned-words.txt b/ruoyi-modules/ruoyi-midjourney/src/main/resources/banned-words.txt deleted file mode 100644 index 5d38603..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/resources/banned-words.txt +++ /dev/null @@ -1,211 +0,0 @@ -blood -twerk -making love -voluptuous -naughty -wincest -orgy -no clothes -au naturel -no shirt -decapitate -bare -nude -barely dressed -nude -bra -risque -scantily clad -cleavage -stripped -infested -full frontal -unclothed -invisible clothes -wearing nothing -lingerie -with no shirt -naked -without clothes on -negligee -zero clothes -gruesome -fascist -nazi -prophet mohammed -slave -coon -honkey -cocaine -heroin -meth -crack -kill -belle delphine -hitler -jinping -lolita -president xi -torture -disturbing -farts -fart -poop -infected -warts -shit -brown pudding -bunghole -vomit -voluptuous -seductive -sperm -sexy -sadist -sensored -censored -silenced -deepfake -inappropriate -waifu -succubus -slaughter -surgery -reproduce -crucified -seductively -explicit -inappropriate -large bust -explicit -wang -inappropriate -teratoma -intimate -see through -tryphophobia -bloodbath -wound -cronenberg -khorne -cannibal -cannibalism -visceral -guts -bloodshot -gory -killing -crucifixion -surgery -vivisection -massacre -hemoglobin -suicide -arse -labia -ass -mammaries -badonkers -bloody -minge -big ass -mommy milker -booba -nipple -oppai -booty -organs -bosom -ovaries -flesh -breasts -penis -busty -phallus -clunge -sexy female -crotch -skimpy -dick -thick -bruises -girth -titty -honkers -vagina -hooters -veiny -knob -ahegao -pinup -ballgag -car crash -playboy -bimbo -pleasure -bodily fluids -pleasures -boudoir -rule34 -brothel -seducing -dominatrix -corpse -seductive -erotic -seductive -fuck -sensual -hardcore -sexy -hentai -shag -horny -crucified -shibari -incest -smut -jav -succubus -jerk off king at pic -thot -kinbaku -legs spread -sensuality -belly button -porn -patriotic -bleed -excrement -petite -seduction -mccurry -provocative -sultry -erected -camisole -tight white -arrest -see-through -feces -anus -revealing clothing -vein -loli --edge -boobs --backed -tied up -zedong -bathing -jail -reticulum -rear end -sakimichan -behind bars -shirtless -sakimichan -seductive -sexi -sexualiz -sexual \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-midjourney/src/main/resources/mime.types b/ruoyi-modules/ruoyi-midjourney/src/main/resources/mime.types deleted file mode 100644 index fcff7ef..0000000 --- a/ruoyi-modules/ruoyi-midjourney/src/main/resources/mime.types +++ /dev/null @@ -1,82 +0,0 @@ -text/html:html htm shtml -text/css:css -text/xml:xml - -text/mathml:mml -text/plain:txt -text/vnd.sun.j2me.app-descriptor:jad -text/vnd.wap.wml:wml -text/x-component:htc - -image/gif:gif -image/jpeg:jpg jpeg -image/png:png -image/tiff:tif tiff -image/vnd.wap.wbmp:wbmp -image/x-icon:ico -image/x-jng:jng -image/x-ms-bmp:bmp -image/svg+xml:svg svgz -image/webp:webp - -application/javascript:js -application/x-javascript:js -application/atom+xml:atom -application/rss+xml:rss - -application/font-woff:woff -application/java-archive:jar war ear -application/json:json -application/mac-binhex40:hqx -application/msword:doc -application/pdf:pdf -application/postscript:ps eps ai -application/rtf:rtf -application/vnd.apple.mpegurl:m3u8 -application/vnd.ms-excel:xls -application/vnd.ms-fontobject:eot -application/vnd.ms-powerpoint:ppt -application/vnd.wap.wmlc:wmlc -application/vnd.google-earth.kml+xml:kml -application/vnd.google-earth.kmz:kmz -application/x-7z-compressed:7z -application/x-cocoa:cco -application/x-java-archive-diff:jardiff -application/x-java-jnlp-file:jnlp -application/x-makeself:run -application/x-perl:pl pm -application/x-pilot:prc pdb -application/x-rar-compressed:rar -application/x-redhat-package-manager:rpm -application/x-sea:sea -application/x-shockwave-flash:swf -application/x-stuffit:sit -application/x-tcl:tcl tk -application/x-x509-ca-cert:der pem crt -application/x-xpinstall:xpi -application/xhtml+xml:xhtml -application/xspf+xml:xspf -application/zip:zip - -application/vnd.openxmlformats-officedocument.wordprocessingml.document:docx -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:xlsx -application/vnd.openxmlformats-officedocument.presentationml.presentation:pptx - -audio/midi:mid midi kar -audio/mpeg:mp3 -audio/ogg:ogg -audio/x-m4a:m4a -audio/x-realaudio:ra - -video/3gpp:3gpp 3gp -video/mp2t:ts -video/mp4:mp4 -video/mpeg:mpeg mpg -video/quicktime:mov -video/webm:webm -video/x-flv:flv -video/x-m4v:m4v -video/x-mng:mng -video/x-ms-asf:asx asf -video/x-ms-wmv:wmv -video/x-msvideo:avi diff --git a/ruoyi-modules/ruoyi-system/pom.xml b/ruoyi-modules/ruoyi-system/pom.xml index 8353449..cdce824 100644 --- a/ruoyi-modules/ruoyi-system/pom.xml +++ b/ruoyi-modules/ruoyi-system/pom.xml @@ -16,6 +16,10 @@ system绯荤粺妯″潡 </description> + <properties> + <httpclient.version>4.5.14</httpclient.version> + </properties> + <dependencies> <!-- 閫氱敤宸ュ叿--> <dependency> @@ -93,9 +97,20 @@ </dependency> <dependency> + <groupId>org.ruoyi</groupId> + <artifactId>ruoyi-common-wechat</artifactId> + </dependency> + + <dependency> <groupId>com.fasterxml.jackson.dataformat</groupId> <artifactId>jackson-dataformat-xml</artifactId> <version>2.15.2</version> + </dependency> + + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpmime</artifactId> + <version>${httpclient.version}</version> </dependency> <!-- 鏀粯鍔熻兘妯″潡 --> @@ -103,6 +118,12 @@ <groupId>org.ruoyi</groupId> <artifactId>ruoyi-common-pay</artifactId> </dependency> + <dependency> + <groupId>io.github.ollama4j</groupId> + <artifactId>ollama4j</artifactId> + <version>1.0.79</version> + <scope>compile</scope> + </dependency> </dependencies> diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/GptConfig.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/GptConfig.java deleted file mode 100644 index 429e0d2..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/GptConfig.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.xmzs.system.cofing; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -import java.util.List; - -/** - * gpt閰嶇疆 - * - * @author ashinnotfound - * @date 2023/03/04 - */ -@Data -@Component -@ConfigurationProperties("gpt") -public class GptConfig { - private String baseUrl; - private String model; - private Integer maxToken; - private Double temperature; - private List<String> basicPrompt; - private List<String> apiKey; - private Long ofSeconds; - private String imageQuality; - private String imageStyle; - private String audioModel; - private String audioVoice; - private Double audioSpeed; -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/KeywordConfig.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/KeywordConfig.java deleted file mode 100644 index 8ab758e..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/KeywordConfig.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.xmzs.system.cofing; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -/** - * 鍏抽敭瀛楅厤缃� - * - * @author ashinnotfound - * @date 2023/08/10 - */ -@Data -@Component -@ConfigurationProperties("keyword") -public class KeywordConfig { - private String reset; - private String image; - private String audio; -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/QqConfig.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/QqConfig.java deleted file mode 100644 index de92f81..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/QqConfig.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.system.cofing; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -/** - * qq閰嶇疆 - * - * @author ashinnotfound - * @date 2023/03/04 - */ -@Data -@Component -@ConfigurationProperties("qq") -public class QqConfig { - private Boolean enable; - private Long account; - private Boolean acceptNewFriend; - private Boolean acceptNewGroup; -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/WechatConfig.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/WechatConfig.java deleted file mode 100644 index 715c3d2..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/WechatConfig.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.xmzs.system.cofing; - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -/** - * 寰俊閰嶇疆 - * - * @author ashinnotfound - * @date 2023/03/19 - */ -@Data -@Component -@ConfigurationProperties("wechat") -public class WechatConfig { - private Boolean enable; - private String qrPath; -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/WxMaConfiguration.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/WxMaConfiguration.java deleted file mode 100644 index 55515a7..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/WxMaConfiguration.java +++ /dev/null @@ -1,132 +0,0 @@ -package com.xmzs.system.cofing; - -import cn.binarywang.wx.miniapp.api.WxMaService; -import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl; -import cn.binarywang.wx.miniapp.bean.WxMaKefuMessage; -import cn.binarywang.wx.miniapp.bean.WxMaSubscribeMessage; -import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl; -import cn.binarywang.wx.miniapp.message.WxMaMessageHandler; -import cn.binarywang.wx.miniapp.message.WxMaMessageRouter; -import com.google.common.collect.Lists; -import lombok.extern.slf4j.Slf4j; -import me.chanjar.weixin.common.bean.result.WxMediaUploadResult; -import me.chanjar.weixin.common.error.WxErrorException; -import me.chanjar.weixin.common.error.WxRuntimeException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import java.io.File; -import java.util.List; -import java.util.stream.Collectors; - -/** - * @author Admin - */ -@Slf4j -@Configuration -@EnableConfigurationProperties(WxMaProperties.class) -public class WxMaConfiguration { - private final WxMaProperties properties; - - @Autowired - public WxMaConfiguration(WxMaProperties properties) { - this.properties = properties; - } - - @Bean - public WxMaService wxMaService() { - List<WxMaProperties.Config> configs = this.properties.getConfigs(); - if (configs == null) { - throw new WxRuntimeException("澶у摜锛屾嫓鎵樺厛鐪嬩笅椤圭洰棣栭〉鐨勮鏄庯紙readme鏂囦欢锛夛紝娣诲姞涓嬬浉鍏抽厤缃紝娉ㄦ剰鍒厤閿欎簡锛�"); - } - WxMaService maService = new WxMaServiceImpl(); - maService.setMultiConfigs( - configs.stream() - .map(a -> { - WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl(); -// WxMaDefaultConfigImpl config = new WxMaRedisConfigImpl(new JedisPool()); - // 浣跨敤涓婇潰鐨勯厤缃椂锛岄渶瑕佸悓鏃跺紩鍏edis-lock鐨勪緷璧栵紝鍚﹀垯浼氭姤绫绘棤娉曟壘鍒扮殑寮傚父 - config.setAppid(a.getAppid()); - config.setSecret(a.getSecret()); - config.setToken(a.getToken()); - config.setAesKey(a.getAesKey()); - config.setMsgDataFormat(a.getMsgDataFormat()); - return config; - }).collect(Collectors.toMap(WxMaDefaultConfigImpl::getAppid, a -> a, (o, n) -> o))); - return maService; - } - - @Bean - public WxMaMessageRouter wxMaMessageRouter(WxMaService wxMaService) { - final WxMaMessageRouter router = new WxMaMessageRouter(wxMaService); - router - .rule().handler(logHandler).next() - .rule().async(false).content("璁㈤槄娑堟伅").handler(subscribeMsgHandler).end() - .rule().async(false).content("鏂囨湰").handler(textHandler).end() - .rule().async(false).content("鍥剧墖").handler(picHandler).end() - .rule().async(false).content("浜岀淮鐮�").handler(qrcodeHandler).end(); - return router; - } - - private final WxMaMessageHandler subscribeMsgHandler = (wxMessage, context, service, sessionManager) -> { - service.getMsgService().sendSubscribeMsg(WxMaSubscribeMessage.builder() - .templateId("姝ゅ鏇存崲涓鸿嚜宸辩殑妯℃澘id") - .data(Lists.newArrayList( - new WxMaSubscribeMessage.MsgData("keyword1", "339208499"))) - .toUser(wxMessage.getFromUser()) - .build()); - return null; - }; - - private final WxMaMessageHandler logHandler = (wxMessage, context, service, sessionManager) -> { - log.info("鏀跺埌娑堟伅锛�" + wxMessage.toString()); - service.getMsgService().sendKefuMsg(WxMaKefuMessage.newTextBuilder().content("鏀跺埌淇℃伅涓猴細" + wxMessage.toJson()) - .toUser(wxMessage.getFromUser()).build()); - return null; - }; - - private final WxMaMessageHandler textHandler = (wxMessage, context, service, sessionManager) -> { - service.getMsgService().sendKefuMsg(WxMaKefuMessage.newTextBuilder().content("鍥炲鏂囨湰娑堟伅") - .toUser(wxMessage.getFromUser()).build()); - return null; - }; - - private final WxMaMessageHandler picHandler = (wxMessage, context, service, sessionManager) -> { - try { - WxMediaUploadResult uploadResult = service.getMediaService() - .uploadMedia("image", "png", - ClassLoader.getSystemResourceAsStream("tmp.png")); - service.getMsgService().sendKefuMsg( - WxMaKefuMessage - .newImageBuilder() - .mediaId(uploadResult.getMediaId()) - .toUser(wxMessage.getFromUser()) - .build()); - } catch (WxErrorException e) { - e.printStackTrace(); - } - - return null; - }; - - private final WxMaMessageHandler qrcodeHandler = (wxMessage, context, service, sessionManager) -> { - try { - final File file = service.getQrcodeService().createQrcode("123", 430); - WxMediaUploadResult uploadResult = service.getMediaService().uploadMedia("image", file); - service.getMsgService().sendKefuMsg( - WxMaKefuMessage - .newImageBuilder() - .mediaId(uploadResult.getMediaId()) - .toUser(wxMessage.getFromUser()) - .build()); - } catch (WxErrorException e) { - e.printStackTrace(); - } - - return null; - }; - -} - diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/WxMaProperties.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/WxMaProperties.java deleted file mode 100644 index 3ad49b3..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/cofing/WxMaProperties.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.xmzs.system.cofing; - -/** - * 寰俊灏忕▼搴忓睘鎬ч厤缃被 - * - * @author: wangle - * @date: 2023/5/18 - */ - -import lombok.Data; -import org.springframework.boot.context.properties.ConfigurationProperties; - -import java.util.List; - -/** - * @author <a href="https://github.com/binarywang">Binary Wang</a> - */ -@Data -@ConfigurationProperties(prefix = "wx.miniapp") -public class WxMaProperties { - - private List<Config> configs; - - @Data - public static class Config { - /** - * 璁剧疆寰俊灏忕▼搴忕殑appid - */ - private String appid; - - /** - * 璁剧疆寰俊灏忕▼搴忕殑Secret - */ - private String secret; - - /** - * 璁剧疆寰俊灏忕▼搴忔秷鎭湇鍔″櫒閰嶇疆鐨則oken - */ - private String token; - - /** - * 璁剧疆寰俊灏忕▼搴忔秷鎭湇鍔″櫒閰嶇疆鐨凟ncodingAESKey - */ - private String aesKey; - - /** - * 娑堟伅鏍煎紡锛孹ML鎴栬�匤SON - */ - private String msgDataFormat; - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/monitor/CacheController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/monitor/CacheController.java deleted file mode 100644 index 3beaf46..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/monitor/CacheController.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.xmzs.system.controller.monitor; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.system.domain.vo.CacheListInfoVo; -import lombok.RequiredArgsConstructor; -import org.redisson.spring.data.connection.RedissonConnectionFactory; -import org.springframework.data.redis.connection.RedisConnection; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.*; - -/** - * 缂撳瓨鐩戞帶 - * - * @author Lion Li - */ -@RequiredArgsConstructor -@RestController -@RequestMapping("/monitor/cache") -public class CacheController { - - private final RedissonConnectionFactory connectionFactory; - - /** - * 鑾峰彇缂撳瓨鐩戞帶鍒楄〃 - */ - @SaCheckPermission("monitor:cache:list") - @GetMapping() - public R<CacheListInfoVo> getInfo() throws Exception { - RedisConnection connection = connectionFactory.getConnection(); - Properties commandStats = connection.commands().info("commandstats"); - - List<Map<String, String>> pieList = new ArrayList<>(); - if (commandStats != null) { - commandStats.stringPropertyNames().forEach(key -> { - Map<String, String> data = new HashMap<>(2); - String property = commandStats.getProperty(key); - data.put("name", StringUtils.removeStart(key, "cmdstat_")); - data.put("value", StringUtils.substringBetween(property, "calls=", ",usec")); - pieList.add(data); - }); - } - - CacheListInfoVo infoVo = new CacheListInfoVo(); - infoVo.setInfo(connection.commands().info()); - infoVo.setDbSize(connection.commands().dbSize()); - infoVo.setCommandStats(pieList); - return R.ok(infoVo); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/monitor/SysLogininforController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/monitor/SysLogininforController.java deleted file mode 100644 index 2c54ca7..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/monitor/SysLogininforController.java +++ /dev/null @@ -1,89 +0,0 @@ -package com.xmzs.system.controller.monitor; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import com.xmzs.common.core.constant.GlobalConstants; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.excel.utils.ExcelUtil; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.redis.utils.RedisUtils; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.bo.SysLogininforBo; -import com.xmzs.system.domain.vo.SysLogininforVo; -import com.xmzs.system.service.ISysLogininforService; -import jakarta.servlet.http.HttpServletResponse; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 绯荤粺璁块棶璁板綍 - * - * @author Lion Li - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/monitor/logininfor") -public class SysLogininforController extends BaseController { - - private final ISysLogininforService logininforService; - - /** - * 鑾峰彇绯荤粺璁块棶璁板綍鍒楄〃 - */ - @SaCheckPermission("monitor:logininfor:list") - @GetMapping("/list") - public TableDataInfo<SysLogininforVo> list(SysLogininforBo logininfor, PageQuery pageQuery) { - return logininforService.selectPageLogininforList(logininfor, pageQuery); - } - - /** - * 瀵煎嚭绯荤粺璁块棶璁板綍鍒楄〃 - */ - @Log(title = "鐧诲綍鏃ュ織", businessType = BusinessType.EXPORT) - @SaCheckPermission("monitor:logininfor:export") - @PostMapping("/export") - public void export(SysLogininforBo logininfor, HttpServletResponse response) { - List<SysLogininforVo> list = logininforService.selectLogininforList(logininfor); - ExcelUtil.exportExcel(list, "鐧诲綍鏃ュ織", SysLogininforVo.class, response); - } - - /** - * 鎵归噺鍒犻櫎鐧诲綍鏃ュ織 - * @param infoIds 鏃ュ織ids - */ - @SaCheckPermission("monitor:logininfor:remove") - @Log(title = "鐧诲綍鏃ュ織", businessType = BusinessType.DELETE) - @DeleteMapping("/{infoIds}") - public R<Void> remove(@PathVariable Long[] infoIds) { - return toAjax(logininforService.deleteLogininforByIds(infoIds)); - } - - /** - * 娓呯悊绯荤粺璁块棶璁板綍 - */ - @SaCheckPermission("monitor:logininfor:remove") - @Log(title = "鐧诲綍鏃ュ織", businessType = BusinessType.CLEAN) - @DeleteMapping("/clean") - public R<Void> clean() { - logininforService.cleanLogininfor(); - return R.ok(); - } - - @SaCheckPermission("monitor:logininfor:unlock") - @Log(title = "璐︽埛瑙i攣", businessType = BusinessType.OTHER) - @GetMapping("/unlock/{userName}") - public R<Void> unlock(@PathVariable("userName") String userName) { - String loginName = GlobalConstants.PWD_ERR_CNT_KEY + userName; - if (RedisUtils.hasKey(loginName)) { - RedisUtils.deleteObject(loginName); - } - return R.ok(); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/monitor/SysOperlogController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/monitor/SysOperlogController.java deleted file mode 100644 index dabfb2a..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/monitor/SysOperlogController.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.xmzs.system.controller.monitor; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.excel.utils.ExcelUtil; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.bo.SysOperLogBo; -import com.xmzs.system.domain.vo.SysOperLogVo; -import com.xmzs.system.service.ISysOperLogService; -import jakarta.servlet.http.HttpServletResponse; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 鎿嶄綔鏃ュ織璁板綍 - * - * @author Lion Li - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/monitor/operlog") -public class SysOperlogController extends BaseController { - - private final ISysOperLogService operLogService; - - /** - * 鑾峰彇鎿嶄綔鏃ュ織璁板綍鍒楄〃 - */ - @SaCheckPermission("monitor:operlog:list") - @GetMapping("/list") - public TableDataInfo<SysOperLogVo> list(SysOperLogBo operLog, PageQuery pageQuery) { - return operLogService.selectPageOperLogList(operLog, pageQuery); - } - - /** - * 瀵煎嚭鎿嶄綔鏃ュ織璁板綍鍒楄〃 - */ - @Log(title = "鎿嶄綔鏃ュ織", businessType = BusinessType.EXPORT) - @SaCheckPermission("monitor:operlog:export") - @PostMapping("/export") - public void export(SysOperLogBo operLog, HttpServletResponse response) { - List<SysOperLogVo> list = operLogService.selectOperLogList(operLog); - ExcelUtil.exportExcel(list, "鎿嶄綔鏃ュ織", SysOperLogVo.class, response); - } - - /** - * 鎵归噺鍒犻櫎鎿嶄綔鏃ュ織璁板綍 - * @param operIds 鏃ュ織ids - */ - @Log(title = "鎿嶄綔鏃ュ織", businessType = BusinessType.DELETE) - @SaCheckPermission("monitor:operlog:remove") - @DeleteMapping("/{operIds}") - public R<Void> remove(@PathVariable Long[] operIds) { - return toAjax(operLogService.deleteOperLogByIds(operIds)); - } - - /** - * 娓呯悊鎿嶄綔鏃ュ織璁板綍 - */ - @Log(title = "鎿嶄綔鏃ュ織", businessType = BusinessType.CLEAN) - @SaCheckPermission("monitor:operlog:remove") - @DeleteMapping("/clean") - public R<Void> clean() { - operLogService.cleanOperLog(); - return R.ok(); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/monitor/SysUserOnlineController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/monitor/SysUserOnlineController.java deleted file mode 100644 index 1756ec3..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/monitor/SysUserOnlineController.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.xmzs.system.controller.monitor; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import cn.dev33.satoken.exception.NotLoginException; -import cn.dev33.satoken.stp.StpUtil; -import cn.hutool.core.bean.BeanUtil; -import com.xmzs.common.core.constant.CacheConstants; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.domain.dto.UserOnlineDTO; -import com.xmzs.common.core.utils.StreamUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.redis.utils.RedisUtils; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.SysUserOnline; -import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.*; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -/** - * 鍦ㄧ嚎鐢ㄦ埛鐩戞帶 - * - * @author Lion Li - */ -@RequiredArgsConstructor -@RestController -@RequestMapping("/monitor/online") -public class SysUserOnlineController extends BaseController { - - /** - * 鑾峰彇鍦ㄧ嚎鐢ㄦ埛鐩戞帶鍒楄〃 - * - * @param ipaddr IP鍦板潃 - * @param userName 鐢ㄦ埛鍚� - */ - @SaCheckPermission("monitor:online:list") - @GetMapping("/list") - public TableDataInfo<SysUserOnline> list(String ipaddr, String userName) { - // 鑾峰彇鎵�鏈夋湭杩囨湡鐨� token - List<String> keys = StpUtil.searchTokenValue("", 0, -1, false); - List<UserOnlineDTO> userOnlineDTOList = new ArrayList<>(); - for (String key : keys) { - String token = StringUtils.substringAfterLast(key, ":"); - // 濡傛灉宸茬粡杩囨湡鍒欒烦杩� - if (StpUtil.stpLogic.getTokenActivityTimeoutByToken(token) < -1) { - continue; - } - userOnlineDTOList.add(RedisUtils.getCacheObject(CacheConstants.ONLINE_TOKEN_KEY + token)); - } - if (StringUtils.isNotEmpty(ipaddr) && StringUtils.isNotEmpty(userName)) { - userOnlineDTOList = StreamUtils.filter(userOnlineDTOList, userOnline -> - StringUtils.equals(ipaddr, userOnline.getIpaddr()) && - StringUtils.equals(userName, userOnline.getUserName()) - ); - } else if (StringUtils.isNotEmpty(ipaddr)) { - userOnlineDTOList = StreamUtils.filter(userOnlineDTOList, userOnline -> - StringUtils.equals(ipaddr, userOnline.getIpaddr()) - ); - } else if (StringUtils.isNotEmpty(userName)) { - userOnlineDTOList = StreamUtils.filter(userOnlineDTOList, userOnline -> - StringUtils.equals(userName, userOnline.getUserName()) - ); - } - Collections.reverse(userOnlineDTOList); - userOnlineDTOList.removeAll(Collections.singleton(null)); - List<SysUserOnline> userOnlineList = BeanUtil.copyToList(userOnlineDTOList, SysUserOnline.class); - return TableDataInfo.build(userOnlineList); - } - - /** - * 寮洪��鐢ㄦ埛 - * - * @param tokenId token鍊� - */ - @SaCheckPermission("monitor:online:forceLogout") - @Log(title = "鍦ㄧ嚎鐢ㄦ埛", businessType = BusinessType.FORCE) - @DeleteMapping("/{tokenId}") - public R<Void> forceLogout(@PathVariable String tokenId) { - try { - StpUtil.kickoutByTokenValue(tokenId); - } catch (NotLoginException ignored) { - } - return R.ok(); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysConfigController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysConfigController.java deleted file mode 100644 index 2e74146..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysConfigController.java +++ /dev/null @@ -1,137 +0,0 @@ -package com.xmzs.system.controller.system; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.excel.utils.ExcelUtil; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.bo.SysConfigBo; -import com.xmzs.system.domain.vo.SysConfigVo; -import com.xmzs.system.service.ISysConfigService; -import jakarta.servlet.http.HttpServletResponse; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 鍙傛暟閰嶇疆 淇℃伅鎿嶄綔澶勭悊 - * - * @author Lion Li - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/system/config") -public class SysConfigController extends BaseController { - - private final ISysConfigService configService; - - /** - * 鑾峰彇鍙傛暟閰嶇疆鍒楄〃 - */ - @SaCheckPermission("system:config:list") - @GetMapping("/list") - public TableDataInfo<SysConfigVo> list(SysConfigBo config, PageQuery pageQuery) { - return configService.selectPageConfigList(config, pageQuery); - } - - /** - * 瀵煎嚭鍙傛暟閰嶇疆鍒楄〃 - */ - @Log(title = "鍙傛暟绠$悊", businessType = BusinessType.EXPORT) - @SaCheckPermission("system:config:export") - @PostMapping("/export") - public void export(SysConfigBo config, HttpServletResponse response) { - List<SysConfigVo> list = configService.selectConfigList(config); - ExcelUtil.exportExcel(list, "鍙傛暟鏁版嵁", SysConfigVo.class, response); - } - - /** - * 鏍规嵁鍙傛暟缂栧彿鑾峰彇璇︾粏淇℃伅 - * - * @param configId 鍙傛暟ID - */ - @SaCheckPermission("system:config:query") - @GetMapping(value = "/{configId}") - public R<SysConfigVo> getInfo(@PathVariable Long configId) { - return R.ok(configService.selectConfigById(configId)); - } - - /** - * 鏍规嵁鍙傛暟閿悕鏌ヨ鍙傛暟鍊� - * - * @param configKey 鍙傛暟Key - */ - @GetMapping(value = "/configKey/{configKey}") - public R<Void> getConfigKey(@PathVariable String configKey) { - return R.ok(configService.selectConfigByKey(configKey)); - } - - /** - * 鏂板鍙傛暟閰嶇疆 - */ - @SaCheckPermission("system:config:add") - @Log(title = "鍙傛暟绠$悊", businessType = BusinessType.INSERT) - @PostMapping - public R<Void> add(@Validated @RequestBody SysConfigBo config) { - if (!configService.checkConfigKeyUnique(config)) { - return R.fail("鏂板鍙傛暟'" + config.getConfigName() + "'澶辫触锛屽弬鏁伴敭鍚嶅凡瀛樺湪"); - } - configService.insertConfig(config); - return R.ok(); - } - - /** - * 淇敼鍙傛暟閰嶇疆 - */ - @SaCheckPermission("system:config:edit") - @Log(title = "鍙傛暟绠$悊", businessType = BusinessType.UPDATE) - @PutMapping - public R<Void> edit(@Validated @RequestBody SysConfigBo config) { - if (!configService.checkConfigKeyUnique(config)) { - return R.fail("淇敼鍙傛暟'" + config.getConfigName() + "'澶辫触锛屽弬鏁伴敭鍚嶅凡瀛樺湪"); - } - configService.updateConfig(config); - return R.ok(); - } - - /** - * 鏍规嵁鍙傛暟閿悕淇敼鍙傛暟閰嶇疆 - */ - @SaCheckPermission("system:config:edit") - @Log(title = "鍙傛暟绠$悊", businessType = BusinessType.UPDATE) - @PutMapping("/updateByKey") - public R<Void> updateByKey(@RequestBody SysConfigBo config) { - configService.updateConfig(config); - return R.ok(); - } - - /** - * 鍒犻櫎鍙傛暟閰嶇疆 - * - * @param configIds 鍙傛暟ID涓� - */ - @SaCheckPermission("system:config:remove") - @Log(title = "鍙傛暟绠$悊", businessType = BusinessType.DELETE) - @DeleteMapping("/{configIds}") - public R<Void> remove(@PathVariable Long[] configIds) { - configService.deleteConfigByIds(configIds); - return R.ok(); - } - - /** - * 鍒锋柊鍙傛暟缂撳瓨 - */ - @SaCheckPermission("system:config:remove") - @Log(title = "鍙傛暟绠$悊", businessType = BusinessType.CLEAN) - @DeleteMapping("/refreshCache") - public R<Void> refreshCache() { - configService.resetConfigCache(); - return R.ok(); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysDeptController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysDeptController.java deleted file mode 100644 index dce84e4..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysDeptController.java +++ /dev/null @@ -1,120 +0,0 @@ -package com.xmzs.system.controller.system; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import cn.hutool.core.convert.Convert; -import com.xmzs.common.core.constant.UserConstants; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.bo.SysDeptBo; -import com.xmzs.system.domain.vo.SysDeptVo; -import com.xmzs.system.service.ISysDeptService; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 閮ㄩ棬淇℃伅 - * - * @author Lion Li - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/system/dept") -public class SysDeptController extends BaseController { - - private final ISysDeptService deptService; - - /** - * 鑾峰彇閮ㄩ棬鍒楄〃 - */ - @SaCheckPermission("system:dept:list") - @GetMapping("/list") - public R<List<SysDeptVo>> list(SysDeptBo dept) { - List<SysDeptVo> depts = deptService.selectDeptList(dept); - return R.ok(depts); - } - - /** - * 鏌ヨ閮ㄩ棬鍒楄〃锛堟帓闄よ妭鐐癸級 - * - * @param deptId 閮ㄩ棬ID - */ - @SaCheckPermission("system:dept:list") - @GetMapping("/list/exclude/{deptId}") - public R<List<SysDeptVo>> excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) { - List<SysDeptVo> depts = deptService.selectDeptList(new SysDeptBo()); - depts.removeIf(d -> d.getDeptId().equals(deptId) - || StringUtils.splitList(d.getAncestors()).contains(Convert.toStr(deptId))); - return R.ok(depts); - } - - /** - * 鏍规嵁閮ㄩ棬缂栧彿鑾峰彇璇︾粏淇℃伅 - * - * @param deptId 閮ㄩ棬ID - */ - @SaCheckPermission("system:dept:query") - @GetMapping(value = "/{deptId}") - public R<SysDeptVo> getInfo(@PathVariable Long deptId) { - deptService.checkDeptDataScope(deptId); - return R.ok(deptService.selectDeptById(deptId)); - } - - /** - * 鏂板閮ㄩ棬 - */ - @SaCheckPermission("system:dept:add") - @Log(title = "閮ㄩ棬绠$悊", businessType = BusinessType.INSERT) - @PostMapping - public R<Void> add(@Validated @RequestBody SysDeptBo dept) { - if (!deptService.checkDeptNameUnique(dept)) { - return R.fail("鏂板閮ㄩ棬'" + dept.getDeptName() + "'澶辫触锛岄儴闂ㄥ悕绉板凡瀛樺湪"); - } - return toAjax(deptService.insertDept(dept)); - } - - /** - * 淇敼閮ㄩ棬 - */ - @SaCheckPermission("system:dept:edit") - @Log(title = "閮ㄩ棬绠$悊", businessType = BusinessType.UPDATE) - @PutMapping - public R<Void> edit(@Validated @RequestBody SysDeptBo dept) { - Long deptId = dept.getDeptId(); - deptService.checkDeptDataScope(deptId); - if (!deptService.checkDeptNameUnique(dept)) { - return R.fail("淇敼閮ㄩ棬'" + dept.getDeptName() + "'澶辫触锛岄儴闂ㄥ悕绉板凡瀛樺湪"); - } else if (dept.getParentId().equals(deptId)) { - return R.fail("淇敼閮ㄩ棬'" + dept.getDeptName() + "'澶辫触锛屼笂绾ч儴闂ㄤ笉鑳芥槸鑷繁"); - } else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus()) - && deptService.selectNormalChildrenDeptById(deptId) > 0) { - return R.fail("璇ラ儴闂ㄥ寘鍚湭鍋滅敤鐨勫瓙閮ㄩ棬锛�"); - } - return toAjax(deptService.updateDept(dept)); - } - - /** - * 鍒犻櫎閮ㄩ棬 - * - * @param deptId 閮ㄩ棬ID - */ - @SaCheckPermission("system:dept:remove") - @Log(title = "閮ㄩ棬绠$悊", businessType = BusinessType.DELETE) - @DeleteMapping("/{deptId}") - public R<Void> remove(@PathVariable Long deptId) { - if (deptService.hasChildByDeptId(deptId)) { - return R.warn("瀛樺湪涓嬬骇閮ㄩ棬,涓嶅厑璁稿垹闄�"); - } - if (deptService.checkDeptExistUser(deptId)) { - return R.warn("閮ㄩ棬瀛樺湪鐢ㄦ埛,涓嶅厑璁稿垹闄�"); - } - deptService.checkDeptDataScope(deptId); - return toAjax(deptService.deleteDeptById(deptId)); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysDictDataController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysDictDataController.java deleted file mode 100644 index 3fef24e..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysDictDataController.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.xmzs.system.controller.system; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import cn.hutool.core.util.ObjectUtil; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.excel.utils.ExcelUtil; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.bo.SysDictDataBo; -import com.xmzs.system.domain.vo.SysDictDataVo; -import com.xmzs.system.service.ISysDictDataService; -import com.xmzs.system.service.ISysDictTypeService; -import jakarta.servlet.http.HttpServletResponse; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.ArrayList; -import java.util.List; - -/** - * 鏁版嵁瀛楀吀淇℃伅 - * - * @author Lion Li - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/system/dict/data") -public class SysDictDataController extends BaseController { - - private final ISysDictDataService dictDataService; - private final ISysDictTypeService dictTypeService; - - /** - * 鏌ヨ瀛楀吀鏁版嵁鍒楄〃 - */ - @SaCheckPermission("system:dict:list") - @GetMapping("/list") - public TableDataInfo<SysDictDataVo> list(SysDictDataBo dictData, PageQuery pageQuery) { - return dictDataService.selectPageDictDataList(dictData, pageQuery); - } - - /** - * 瀵煎嚭瀛楀吀鏁版嵁鍒楄〃 - */ - @Log(title = "瀛楀吀鏁版嵁", businessType = BusinessType.EXPORT) - @SaCheckPermission("system:dict:export") - @PostMapping("/export") - public void export(SysDictDataBo dictData, HttpServletResponse response) { - List<SysDictDataVo> list = dictDataService.selectDictDataList(dictData); - ExcelUtil.exportExcel(list, "瀛楀吀鏁版嵁", SysDictDataVo.class, response); - } - - /** - * 鏌ヨ瀛楀吀鏁版嵁璇︾粏 - * - * @param dictCode 瀛楀吀code - */ - @SaCheckPermission("system:dict:query") - @GetMapping(value = "/{dictCode}") - public R<SysDictDataVo> getInfo(@PathVariable Long dictCode) { - return R.ok(dictDataService.selectDictDataById(dictCode)); - } - - /** - * 鏍规嵁瀛楀吀绫诲瀷鏌ヨ瀛楀吀鏁版嵁淇℃伅 - * - * @param dictType 瀛楀吀绫诲瀷 - */ - @GetMapping(value = "/type/{dictType}") - public R<List<SysDictDataVo>> dictType(@PathVariable String dictType) { - List<SysDictDataVo> data = dictTypeService.selectDictDataByType(dictType); - if (ObjectUtil.isNull(data)) { - data = new ArrayList<>(); - } - return R.ok(data); - } - - /** - * 鏂板瀛楀吀绫诲瀷 - */ - @SaCheckPermission("system:dict:add") - @Log(title = "瀛楀吀鏁版嵁", businessType = BusinessType.INSERT) - @PostMapping - public R<Void> add(@Validated @RequestBody SysDictDataBo dict) { - dictDataService.insertDictData(dict); - return R.ok(); - } - - /** - * 淇敼淇濆瓨瀛楀吀绫诲瀷 - */ - @SaCheckPermission("system:dict:edit") - @Log(title = "瀛楀吀鏁版嵁", businessType = BusinessType.UPDATE) - @PutMapping - public R<Void> edit(@Validated @RequestBody SysDictDataBo dict) { - dictDataService.updateDictData(dict); - return R.ok(); - } - - /** - * 鍒犻櫎瀛楀吀绫诲瀷 - * - * @param dictCodes 瀛楀吀code涓� - */ - @SaCheckPermission("system:dict:remove") - @Log(title = "瀛楀吀绫诲瀷", businessType = BusinessType.DELETE) - @DeleteMapping("/{dictCodes}") - public R<Void> remove(@PathVariable Long[] dictCodes) { - dictDataService.deleteDictDataByIds(dictCodes); - return R.ok(); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysDictTypeController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysDictTypeController.java deleted file mode 100644 index c78907e..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysDictTypeController.java +++ /dev/null @@ -1,125 +0,0 @@ -package com.xmzs.system.controller.system; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.excel.utils.ExcelUtil; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.bo.SysDictTypeBo; -import com.xmzs.system.domain.vo.SysDictTypeVo; -import com.xmzs.system.service.ISysDictTypeService; -import jakarta.servlet.http.HttpServletResponse; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 鏁版嵁瀛楀吀淇℃伅 - * - * @author Lion Li - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/system/dict/type") -public class SysDictTypeController extends BaseController { - - private final ISysDictTypeService dictTypeService; - - /** - * 鏌ヨ瀛楀吀绫诲瀷鍒楄〃 - */ - @SaCheckPermission("system:dict:list") - @GetMapping("/list") - public TableDataInfo<SysDictTypeVo> list(SysDictTypeBo dictType, PageQuery pageQuery) { - return dictTypeService.selectPageDictTypeList(dictType, pageQuery); - } - - /** - * 瀵煎嚭瀛楀吀绫诲瀷鍒楄〃 - */ - @Log(title = "瀛楀吀绫诲瀷", businessType = BusinessType.EXPORT) - @SaCheckPermission("system:dict:export") - @PostMapping("/export") - public void export(SysDictTypeBo dictType, HttpServletResponse response) { - List<SysDictTypeVo> list = dictTypeService.selectDictTypeList(dictType); - ExcelUtil.exportExcel(list, "瀛楀吀绫诲瀷", SysDictTypeVo.class, response); - } - - /** - * 鏌ヨ瀛楀吀绫诲瀷璇︾粏 - * - * @param dictId 瀛楀吀ID - */ - @SaCheckPermission("system:dict:query") - @GetMapping(value = "/{dictId}") - public R<SysDictTypeVo> getInfo(@PathVariable Long dictId) { - return R.ok(dictTypeService.selectDictTypeById(dictId)); - } - - /** - * 鏂板瀛楀吀绫诲瀷 - */ - @SaCheckPermission("system:dict:add") - @Log(title = "瀛楀吀绫诲瀷", businessType = BusinessType.INSERT) - @PostMapping - public R<Void> add(@Validated @RequestBody SysDictTypeBo dict) { - if (!dictTypeService.checkDictTypeUnique(dict)) { - return R.fail("鏂板瀛楀吀'" + dict.getDictName() + "'澶辫触锛屽瓧鍏哥被鍨嬪凡瀛樺湪"); - } - dictTypeService.insertDictType(dict); - return R.ok(); - } - - /** - * 淇敼瀛楀吀绫诲瀷 - */ - @SaCheckPermission("system:dict:edit") - @Log(title = "瀛楀吀绫诲瀷", businessType = BusinessType.UPDATE) - @PutMapping - public R<Void> edit(@Validated @RequestBody SysDictTypeBo dict) { - if (!dictTypeService.checkDictTypeUnique(dict)) { - return R.fail("淇敼瀛楀吀'" + dict.getDictName() + "'澶辫触锛屽瓧鍏哥被鍨嬪凡瀛樺湪"); - } - dictTypeService.updateDictType(dict); - return R.ok(); - } - - /** - * 鍒犻櫎瀛楀吀绫诲瀷 - * - * @param dictIds 瀛楀吀ID涓� - */ - @SaCheckPermission("system:dict:remove") - @Log(title = "瀛楀吀绫诲瀷", businessType = BusinessType.DELETE) - @DeleteMapping("/{dictIds}") - public R<Void> remove(@PathVariable Long[] dictIds) { - dictTypeService.deleteDictTypeByIds(dictIds); - return R.ok(); - } - - /** - * 鍒锋柊瀛楀吀缂撳瓨 - */ - @SaCheckPermission("system:dict:remove") - @Log(title = "瀛楀吀绫诲瀷", businessType = BusinessType.CLEAN) - @DeleteMapping("/refreshCache") - public R<Void> refreshCache() { - dictTypeService.resetDictCache(); - return R.ok(); - } - - /** - * 鑾峰彇瀛楀吀閫夋嫨妗嗗垪琛� - */ - @GetMapping("/optionselect") - public R<List<SysDictTypeVo>> optionselect() { - List<SysDictTypeVo> dictTypes = dictTypeService.selectDictTypeAll(); - return R.ok(dictTypes); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysMenuController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysMenuController.java deleted file mode 100644 index adc05ed..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysMenuController.java +++ /dev/null @@ -1,182 +0,0 @@ -package com.xmzs.system.controller.system; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import cn.dev33.satoken.annotation.SaCheckRole; -import cn.dev33.satoken.annotation.SaMode; -import cn.hutool.core.lang.tree.Tree; -import com.xmzs.common.core.constant.TenantConstants; -import com.xmzs.common.core.constant.UserConstants; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.SysMenu; -import com.xmzs.system.domain.bo.SysMenuBo; -import com.xmzs.system.domain.vo.MenuTreeSelectVo; -import com.xmzs.system.domain.vo.RouterVo; -import com.xmzs.system.domain.vo.SysMenuVo; -import com.xmzs.system.service.ISysMenuService; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 鑿滃崟淇℃伅 - * - * @author Lion Li - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/system/menu") -public class SysMenuController extends BaseController { - - private final ISysMenuService menuService; - - /** - * 鑾峰彇璺敱淇℃伅 - * - * @return 璺敱淇℃伅 - */ - @GetMapping("/getRouters") - public R<List<RouterVo>> getRouters() { - List<SysMenu> menus = menuService.selectMenuTreeByUserId(LoginHelper.getUserId()); - return R.ok(menuService.buildMenus(menus)); - } - - /** - * 鑾峰彇鑿滃崟鍒楄〃 - */ - @SaCheckRole(value = { - TenantConstants.SUPER_ADMIN_ROLE_KEY, - TenantConstants.TENANT_ADMIN_ROLE_KEY - }, mode = SaMode.OR) - @SaCheckPermission("system:menu:list") - @GetMapping("/list") - public R<List<SysMenuVo>> list(SysMenuBo menu) { - List<SysMenuVo> menus = menuService.selectMenuList(menu, LoginHelper.getUserId()); - return R.ok(menus); - } - - /** - * 鏍规嵁鑿滃崟缂栧彿鑾峰彇璇︾粏淇℃伅 - * - * @param menuId 鑿滃崟ID - */ - @SaCheckRole(value = { - TenantConstants.SUPER_ADMIN_ROLE_KEY, - TenantConstants.TENANT_ADMIN_ROLE_KEY - }, mode = SaMode.OR) - @SaCheckPermission("system:menu:query") - @GetMapping(value = "/{menuId}") - public R<SysMenuVo> getInfo(@PathVariable Long menuId) { - return R.ok(menuService.selectMenuById(menuId)); - } - - /** - * 鑾峰彇鑿滃崟涓嬫媺鏍戝垪琛� - */ - @SaCheckRole(value = { - TenantConstants.SUPER_ADMIN_ROLE_KEY, - TenantConstants.TENANT_ADMIN_ROLE_KEY - }, mode = SaMode.OR) - @SaCheckPermission("system:menu:query") - @GetMapping("/treeselect") - public R<List<Tree<Long>>> treeselect(SysMenuBo menu) { - List<SysMenuVo> menus = menuService.selectMenuList(menu, LoginHelper.getUserId()); - return R.ok(menuService.buildMenuTreeSelect(menus)); - } - - /** - * 鍔犺浇瀵瑰簲瑙掕壊鑿滃崟鍒楄〃鏍� - * - * @param roleId 瑙掕壊ID - */ - @SaCheckRole(value = { - TenantConstants.SUPER_ADMIN_ROLE_KEY, - TenantConstants.TENANT_ADMIN_ROLE_KEY - }, mode = SaMode.OR) - @SaCheckPermission("system:menu:query") - @GetMapping(value = "/roleMenuTreeselect/{roleId}") - public R<MenuTreeSelectVo> roleMenuTreeselect(@PathVariable("roleId") Long roleId) { - List<SysMenuVo> menus = menuService.selectMenuList(LoginHelper.getUserId()); - MenuTreeSelectVo selectVo = new MenuTreeSelectVo(); - selectVo.setCheckedKeys(menuService.selectMenuListByRoleId(roleId)); - selectVo.setMenus(menuService.buildMenuTreeSelect(menus)); - return R.ok(selectVo); - } - - /** - * 鍔犺浇瀵瑰簲绉熸埛濂楅鑿滃崟鍒楄〃鏍� - * - * @param packageId 绉熸埛濂楅ID - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:menu:query") - @GetMapping(value = "/tenantPackageMenuTreeselect/{packageId}") - public R<MenuTreeSelectVo> tenantPackageMenuTreeselect(@PathVariable("packageId") Long packageId) { - List<SysMenuVo> menus = menuService.selectMenuList(LoginHelper.getUserId()); - MenuTreeSelectVo selectVo = new MenuTreeSelectVo(); - selectVo.setCheckedKeys(menuService.selectMenuListByPackageId(packageId)); - selectVo.setMenus(menuService.buildMenuTreeSelect(menus)); - return R.ok(selectVo); - } - - /** - * 鏂板鑿滃崟 - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:menu:add") - @Log(title = "鑿滃崟绠$悊", businessType = BusinessType.INSERT) - @PostMapping - public R<Void> add(@Validated @RequestBody SysMenuBo menu) { - if (!menuService.checkMenuNameUnique(menu)) { - return R.fail("鏂板鑿滃崟'" + menu.getMenuName() + "'澶辫触锛岃彍鍗曞悕绉板凡瀛樺湪"); - } else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath())) { - return R.fail("鏂板鑿滃崟'" + menu.getMenuName() + "'澶辫触锛屽湴鍧�蹇呴』浠ttp(s)://寮�澶�"); - } - return toAjax(menuService.insertMenu(menu)); - } - - /** - * 淇敼鑿滃崟 - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:menu:edit") - @Log(title = "鑿滃崟绠$悊", businessType = BusinessType.UPDATE) - @PutMapping - public R<Void> edit(@Validated @RequestBody SysMenuBo menu) { - if (!menuService.checkMenuNameUnique(menu)) { - return R.fail("淇敼鑿滃崟'" + menu.getMenuName() + "'澶辫触锛岃彍鍗曞悕绉板凡瀛樺湪"); - } else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath())) { - return R.fail("淇敼鑿滃崟'" + menu.getMenuName() + "'澶辫触锛屽湴鍧�蹇呴』浠ttp(s)://寮�澶�"); - } else if (menu.getMenuId().equals(menu.getParentId())) { - return R.fail("淇敼鑿滃崟'" + menu.getMenuName() + "'澶辫触锛屼笂绾ц彍鍗曚笉鑳介�夋嫨鑷繁"); - } - return toAjax(menuService.updateMenu(menu)); - } - - /** - * 鍒犻櫎鑿滃崟 - * - * @param menuId 鑿滃崟ID - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:menu:remove") - @Log(title = "鑿滃崟绠$悊", businessType = BusinessType.DELETE) - @DeleteMapping("/{menuId}") - public R<Void> remove(@PathVariable("menuId") Long menuId) { - if (menuService.hasChildByMenuId(menuId)) { - return R.warn("瀛樺湪瀛愯彍鍗�,涓嶅厑璁稿垹闄�"); - } - if (menuService.checkMenuExistRole(menuId)) { - return R.warn("鑿滃崟宸插垎閰�,涓嶅厑璁稿垹闄�"); - } - return toAjax(menuService.deleteMenuById(menuId)); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysModelController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysModelController.java deleted file mode 100644 index 8f1d99f..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysModelController.java +++ /dev/null @@ -1,114 +0,0 @@ -package com.xmzs.system.controller.system; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.excel.utils.ExcelUtil; -import com.xmzs.common.idempotent.annotation.RepeatSubmit; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.bo.SysModelBo; -import com.xmzs.system.domain.vo.SysModelVo; -import com.xmzs.system.service.ISysModelService; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 绯荤粺妯″瀷 - * - * @author Lion Li - * @date 2024-04-04 - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/system/model") -public class SysModelController extends BaseController { - - private final ISysModelService sysModelService; - - /** - * 鏌ヨ绯荤粺妯″瀷鍒楄〃 - */ - @GetMapping("/list") - public TableDataInfo<SysModelVo> list(SysModelBo bo, PageQuery pageQuery) { - return sysModelService.queryPageList(bo, pageQuery); - } - - /** - * 鏌ヨ绯荤粺妯″瀷鍒楄〃 - */ - @GetMapping("/modelList") - public R<List<SysModelVo>> modelList(SysModelBo bo) { - bo.setModelShow("0"); - return R.ok(sysModelService.queryList(bo)); - } - - /** - * 瀵煎嚭绯荤粺妯″瀷鍒楄〃 - */ - @SaCheckPermission("system:model:export") - @Log(title = "绯荤粺妯″瀷", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(SysModelBo bo, HttpServletResponse response) { - List<SysModelVo> list = sysModelService.queryList(bo); - ExcelUtil.exportExcel(list, "绯荤粺妯″瀷", SysModelVo.class, response); - } - - /** - * 鑾峰彇绯荤粺妯″瀷璇︾粏淇℃伅 - * - * @param id 涓婚敭 - */ - @SaCheckPermission("system:model:query") - @GetMapping("/{id}") - public R<SysModelVo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable Long id) { - return R.ok(sysModelService.queryById(id)); - } - - /** - * 鏂板绯荤粺妯″瀷 - */ - @SaCheckPermission("system:model:add") - @Log(title = "绯荤粺妯″瀷", businessType = BusinessType.INSERT) - @RepeatSubmit() - @PostMapping() - public R<Void> add(@Validated(AddGroup.class) @RequestBody SysModelBo bo) { - return toAjax(sysModelService.insertByBo(bo)); - } - - /** - * 淇敼绯荤粺妯″瀷 - */ - @SaCheckPermission("system:model:edit") - @Log(title = "绯荤粺妯″瀷", businessType = BusinessType.UPDATE) - @RepeatSubmit() - @PutMapping() - public R<Void> edit(@Validated(EditGroup.class) @RequestBody SysModelBo bo) { - return toAjax(sysModelService.updateByBo(bo)); - } - - /** - * 鍒犻櫎绯荤粺妯″瀷 - * - * @param ids 涓婚敭涓� - */ - @SaCheckPermission("system:model:remove") - @Log(title = "绯荤粺妯″瀷", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable Long[] ids) { - return toAjax(sysModelService.deleteWithValidByIds(List.of(ids), true)); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysNoticeController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysNoticeController.java deleted file mode 100644 index f20cc9e..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysNoticeController.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.xmzs.system.controller.system; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.bo.SysNoticeBo; -import com.xmzs.system.domain.vo.SysNoticeVo; -import com.xmzs.system.service.ISysNoticeService; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -/** - * 鍏憡 淇℃伅鎿嶄綔澶勭悊 - * - * @author Lion Li - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/system/notice") -public class SysNoticeController extends BaseController { - - private final ISysNoticeService noticeService; - - /** - * 鑾峰彇閫氱煡鍏憡鍒楄〃 - */ - @SaCheckPermission("system:notice:list") - @GetMapping("/list") - public TableDataInfo<SysNoticeVo> list(SysNoticeBo notice, PageQuery pageQuery) { - return noticeService.selectPageNoticeList(notice, pageQuery); - } - - /** - * 鏍规嵁閫氱煡鍏憡缂栧彿鑾峰彇璇︾粏淇℃伅 - * - * @param noticeId 鍏憡ID - */ - @SaCheckPermission("system:notice:query") - @GetMapping(value = "/{noticeId}") - public R<SysNoticeVo> getInfo(@PathVariable Long noticeId) { - return R.ok(noticeService.selectNoticeById(noticeId)); - } - - /** - * 鏂板閫氱煡鍏憡 - */ - @SaCheckPermission("system:notice:add") - @Log(title = "閫氱煡鍏憡", businessType = BusinessType.INSERT) - @PostMapping - public R<Void> add(@Validated @RequestBody SysNoticeBo notice) { - return toAjax(noticeService.insertNotice(notice)); - } - - /** - * 淇敼閫氱煡鍏憡 - */ - @SaCheckPermission("system:notice:edit") - @Log(title = "閫氱煡鍏憡", businessType = BusinessType.UPDATE) - @PutMapping - public R<Void> edit(@Validated @RequestBody SysNoticeBo notice) { - return toAjax(noticeService.updateNotice(notice)); - } - - /** - * 鍒犻櫎閫氱煡鍏憡 - * - * @param noticeIds 鍏憡ID涓� - */ - @SaCheckPermission("system:notice:remove") - @Log(title = "閫氱煡鍏憡", businessType = BusinessType.DELETE) - @DeleteMapping("/{noticeIds}") - public R<Void> remove(@PathVariable Long[] noticeIds) { - return toAjax(noticeService.deleteNoticeByIds(noticeIds)); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysOssConfigController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysOssConfigController.java deleted file mode 100644 index 8ca1254..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysOssConfigController.java +++ /dev/null @@ -1,105 +0,0 @@ -package com.xmzs.system.controller.system; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.core.validate.QueryGroup; -import com.xmzs.common.idempotent.annotation.RepeatSubmit; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.bo.SysOssConfigBo; -import com.xmzs.system.domain.vo.SysOssConfigVo; -import com.xmzs.system.service.ISysOssConfigService; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 瀵硅薄瀛樺偍閰嶇疆 - * - * @author Lion Li - * @author 瀛よ垷鐑熼洦 - * @date 2021-08-13 - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/resource/oss/config") -public class SysOssConfigController extends BaseController { - - private final ISysOssConfigService ossConfigService; - - /** - * 鏌ヨ瀵硅薄瀛樺偍閰嶇疆鍒楄〃 - */ - @SaCheckPermission("system:oss:list") - @GetMapping("/list") - public TableDataInfo<SysOssConfigVo> list(@Validated(QueryGroup.class) SysOssConfigBo bo, PageQuery pageQuery) { - return ossConfigService.queryPageList(bo, pageQuery); - } - - /** - * 鑾峰彇瀵硅薄瀛樺偍閰嶇疆璇︾粏淇℃伅 - * - * @param ossConfigId OSS閰嶇疆ID - */ - @SaCheckPermission("system:oss:query") - @GetMapping("/{ossConfigId}") - public R<SysOssConfigVo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable Long ossConfigId) { - return R.ok(ossConfigService.queryById(ossConfigId)); - } - - /** - * 鏂板瀵硅薄瀛樺偍閰嶇疆 - */ - @SaCheckPermission("system:oss:add") - @Log(title = "瀵硅薄瀛樺偍閰嶇疆", businessType = BusinessType.INSERT) - @RepeatSubmit() - @PostMapping() - public R<Void> add(@Validated(AddGroup.class) @RequestBody SysOssConfigBo bo) { - return toAjax(ossConfigService.insertByBo(bo)); - } - - /** - * 淇敼瀵硅薄瀛樺偍閰嶇疆 - */ - @SaCheckPermission("system:oss:edit") - @Log(title = "瀵硅薄瀛樺偍閰嶇疆", businessType = BusinessType.UPDATE) - @RepeatSubmit() - @PutMapping() - public R<Void> edit(@Validated(EditGroup.class) @RequestBody SysOssConfigBo bo) { - return toAjax(ossConfigService.updateByBo(bo)); - } - - /** - * 鍒犻櫎瀵硅薄瀛樺偍閰嶇疆 - * - * @param ossConfigIds OSS閰嶇疆ID涓� - */ - @SaCheckPermission("system:oss:remove") - @Log(title = "瀵硅薄瀛樺偍閰嶇疆", businessType = BusinessType.DELETE) - @DeleteMapping("/{ossConfigIds}") - public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable Long[] ossConfigIds) { - return toAjax(ossConfigService.deleteWithValidByIds(List.of(ossConfigIds), true)); - } - - /** - * 鐘舵�佷慨鏀� - */ - @SaCheckPermission("system:oss:edit") - @Log(title = "瀵硅薄瀛樺偍鐘舵�佷慨鏀�", businessType = BusinessType.UPDATE) - @PutMapping("/changeStatus") - public R<Void> changeStatus(@RequestBody SysOssConfigBo bo) { - return toAjax(ossConfigService.updateOssConfigStatus(bo)); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysOssController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysOssController.java deleted file mode 100644 index 3ca4b23..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysOssController.java +++ /dev/null @@ -1,108 +0,0 @@ -package com.xmzs.system.controller.system; - - -import cn.dev33.satoken.annotation.SaCheckPermission; -import cn.hutool.core.util.ObjectUtil; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.validate.QueryGroup; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.bo.SysOssBo; -import com.xmzs.system.domain.vo.SysOssUploadVo; -import com.xmzs.system.domain.vo.SysOssVo; -import com.xmzs.system.service.ISysOssService; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.constraints.NotEmpty; -import lombok.RequiredArgsConstructor; -import org.springframework.http.MediaType; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import java.io.IOException; -import java.util.Arrays; -import java.util.List; - -/** - * 鏂囦欢涓婁紶 鎺у埗灞� - * - * @author Lion Li - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/resource/oss") -public class SysOssController extends BaseController { - - private final ISysOssService ossService; - - /** - * 鏌ヨOSS瀵硅薄瀛樺偍鍒楄〃 - */ - @SaCheckPermission("system:oss:list") - @GetMapping("/list") - public TableDataInfo<SysOssVo> list(@Validated(QueryGroup.class) SysOssBo bo, PageQuery pageQuery) { - return ossService.queryPageList(bo, pageQuery); - } - - /** - * 鏌ヨOSS瀵硅薄鍩轰簬id涓� - * - * @param ossIds OSS瀵硅薄ID涓� - */ - @SaCheckPermission("system:oss:list") - @GetMapping("/listByIds/{ossIds}") - public R<List<SysOssVo>> listByIds(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable Long[] ossIds) { - List<SysOssVo> list = ossService.listByIds(Arrays.asList(ossIds)); - return R.ok(list); - } - - /** - * 涓婁紶OSS瀵硅薄瀛樺偍 - * - * @param file 鏂囦欢 - */ - @SaCheckPermission("system:oss:upload") - @Log(title = "OSS瀵硅薄瀛樺偍", businessType = BusinessType.INSERT) - @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) - public R<SysOssUploadVo> upload(@RequestPart("file") MultipartFile file) { - if (ObjectUtil.isNull(file)) { - return R.fail("涓婁紶鏂囦欢涓嶈兘涓虹┖"); - } - SysOssVo oss = ossService.upload(file); - SysOssUploadVo uploadVo = new SysOssUploadVo(); - uploadVo.setUrl(oss.getUrl()); - uploadVo.setFileName(oss.getOriginalName()); - uploadVo.setOssId(oss.getOssId().toString()); - return R.ok(uploadVo); - } - - /** - * 涓嬭浇OSS瀵硅薄 - * - * @param ossId OSS瀵硅薄ID - */ - @SaCheckPermission("system:oss:download") - @GetMapping("/download/{ossId}") - public void download(@PathVariable Long ossId, HttpServletResponse response) throws IOException { - ossService.download(ossId, response); - } - - /** - * 鍒犻櫎OSS瀵硅薄瀛樺偍 - * - * @param ossIds OSS瀵硅薄ID涓� - */ - @SaCheckPermission("system:oss:remove") - @Log(title = "OSS瀵硅薄瀛樺偍", businessType = BusinessType.DELETE) - @DeleteMapping("/{ossIds}") - public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable Long[] ossIds) { - return toAjax(ossService.deleteWithValidByIds(List.of(ossIds), true)); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysPostController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysPostController.java deleted file mode 100644 index f98d135..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysPostController.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.xmzs.system.controller.system; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.excel.utils.ExcelUtil; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.bo.SysPostBo; -import com.xmzs.system.domain.vo.SysPostVo; -import com.xmzs.system.service.ISysPostService; -import jakarta.servlet.http.HttpServletResponse; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 宀椾綅淇℃伅鎿嶄綔澶勭悊 - * - * @author Lion Li - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/system/post") -public class SysPostController extends BaseController { - - private final ISysPostService postService; - - /** - * 鑾峰彇宀椾綅鍒楄〃 - */ - @SaCheckPermission("system:post:list") - @GetMapping("/list") - public TableDataInfo<SysPostVo> list(SysPostBo post, PageQuery pageQuery) { - return postService.selectPagePostList(post, pageQuery); - } - - /** - * 瀵煎嚭宀椾綅鍒楄〃 - */ - @Log(title = "宀椾綅绠$悊", businessType = BusinessType.EXPORT) - @SaCheckPermission("system:post:export") - @PostMapping("/export") - public void export(SysPostBo post, HttpServletResponse response) { - List<SysPostVo> list = postService.selectPostList(post); - ExcelUtil.exportExcel(list, "宀椾綅鏁版嵁", SysPostVo.class, response); - } - - /** - * 鏍规嵁宀椾綅缂栧彿鑾峰彇璇︾粏淇℃伅 - * - * @param postId 宀椾綅ID - */ - @SaCheckPermission("system:post:query") - @GetMapping(value = "/{postId}") - public R<SysPostVo> getInfo(@PathVariable Long postId) { - return R.ok(postService.selectPostById(postId)); - } - - /** - * 鏂板宀椾綅 - */ - @SaCheckPermission("system:post:add") - @Log(title = "宀椾綅绠$悊", businessType = BusinessType.INSERT) - @PostMapping - public R<Void> add(@Validated @RequestBody SysPostBo post) { - if (!postService.checkPostNameUnique(post)) { - return R.fail("鏂板宀椾綅'" + post.getPostName() + "'澶辫触锛屽矖浣嶅悕绉板凡瀛樺湪"); - } else if (!postService.checkPostCodeUnique(post)) { - return R.fail("鏂板宀椾綅'" + post.getPostName() + "'澶辫触锛屽矖浣嶇紪鐮佸凡瀛樺湪"); - } - return toAjax(postService.insertPost(post)); - } - - /** - * 淇敼宀椾綅 - */ - @SaCheckPermission("system:post:edit") - @Log(title = "宀椾綅绠$悊", businessType = BusinessType.UPDATE) - @PutMapping - public R<Void> edit(@Validated @RequestBody SysPostBo post) { - if (!postService.checkPostNameUnique(post)) { - return R.fail("淇敼宀椾綅'" + post.getPostName() + "'澶辫触锛屽矖浣嶅悕绉板凡瀛樺湪"); - } else if (!postService.checkPostCodeUnique(post)) { - return R.fail("淇敼宀椾綅'" + post.getPostName() + "'澶辫触锛屽矖浣嶇紪鐮佸凡瀛樺湪"); - } - return toAjax(postService.updatePost(post)); - } - - /** - * 鍒犻櫎宀椾綅 - * - * @param postIds 宀椾綅ID涓� - */ - @SaCheckPermission("system:post:remove") - @Log(title = "宀椾綅绠$悊", businessType = BusinessType.DELETE) - @DeleteMapping("/{postIds}") - public R<Void> remove(@PathVariable Long[] postIds) { - return toAjax(postService.deletePostByIds(postIds)); - } - - /** - * 鑾峰彇宀椾綅閫夋嫨妗嗗垪琛� - */ - @GetMapping("/optionselect") - public R<List<SysPostVo>> optionselect() { - List<SysPostVo> posts = postService.selectPostAll(); - return R.ok(posts); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysProfileController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysProfileController.java deleted file mode 100644 index 719cf2a..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysProfileController.java +++ /dev/null @@ -1,123 +0,0 @@ -package com.xmzs.system.controller.system; - -import cn.dev33.satoken.secure.BCrypt; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.io.FileUtil; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.core.utils.file.MimeTypeUtils; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.bo.SysUserBo; -import com.xmzs.system.domain.bo.SysUserProfileBo; -import com.xmzs.system.domain.vo.AvatarVo; -import com.xmzs.system.domain.vo.ProfileVo; -import com.xmzs.system.domain.vo.SysOssVo; -import com.xmzs.system.domain.vo.SysUserVo; -import com.xmzs.system.service.ISysOssService; -import com.xmzs.system.service.ISysUserService; -import lombok.RequiredArgsConstructor; -import org.springframework.http.MediaType; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import java.util.Arrays; - -/** - * 涓汉淇℃伅 涓氬姟澶勭悊 - * - * @author Lion Li - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/system/user/profile") -public class SysProfileController extends BaseController { - - private final ISysUserService userService; - private final ISysOssService ossService; - - /** - * 涓汉淇℃伅 - */ - @GetMapping - public R<ProfileVo> profile() { - SysUserVo user = userService.selectUserById(LoginHelper.getUserId()); - ProfileVo profileVo = new ProfileVo(); - profileVo.setUser(user); - profileVo.setRoleGroup(userService.selectUserRoleGroup(user.getUserName())); - profileVo.setPostGroup(userService.selectUserPostGroup(user.getUserName())); - return R.ok(profileVo); - } - - /** - * 淇敼鐢ㄦ埛 - */ - @Log(title = "涓汉淇℃伅", businessType = BusinessType.UPDATE) - @PutMapping - public R<Void> updateProfile(@RequestBody SysUserProfileBo profile) { - SysUserBo user = BeanUtil.toBean(profile, SysUserBo.class); - if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user)) { - return R.fail("淇敼鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛屾墜鏈哄彿鐮佸凡瀛樺湪"); - } - if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user)) { - return R.fail("淇敼鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛岄偖绠辫处鍙峰凡瀛樺湪"); - } - user.setUserId(LoginHelper.getUserId()); - if (userService.updateUserProfile(user) > 0) { - return R.ok(); - } - return R.fail("淇敼涓汉淇℃伅寮傚父锛岃鑱旂郴绠$悊鍛�"); - } - - /** - * 閲嶇疆瀵嗙爜 - * - * @param newPassword 鏃у瘑鐮� - * @param oldPassword 鏂板瘑鐮� - */ - @Log(title = "涓汉淇℃伅", businessType = BusinessType.UPDATE) - @PutMapping("/updatePwd") - public R<Void> updatePwd(String oldPassword, String newPassword) { - SysUserVo user = userService.selectUserById(LoginHelper.getUserId()); - String password = user.getPassword(); - if (!BCrypt.checkpw(oldPassword, password)) { - return R.fail("淇敼瀵嗙爜澶辫触锛屾棫瀵嗙爜閿欒"); - } - if (BCrypt.checkpw(newPassword, password)) { - return R.fail("鏂板瘑鐮佷笉鑳戒笌鏃у瘑鐮佺浉鍚�"); - } - - if (userService.resetUserPwd(user.getUserId(), BCrypt.hashpw(newPassword)) > 0) { - return R.ok(); - } - return R.fail("淇敼瀵嗙爜寮傚父锛岃鑱旂郴绠$悊鍛�"); - } - - /** - * 澶村儚涓婁紶 - * - * @param avatarfile 鐢ㄦ埛澶村儚 - */ - @Log(title = "鐢ㄦ埛澶村儚", businessType = BusinessType.UPDATE) - @PostMapping(value = "/avatar", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) - public R<AvatarVo> avatar(@RequestPart("avatarfile") MultipartFile avatarfile) { - if (!avatarfile.isEmpty()) { - String extension = FileUtil.extName(avatarfile.getOriginalFilename()); - if (!StringUtils.equalsAnyIgnoreCase(extension, MimeTypeUtils.IMAGE_EXTENSION)) { - return R.fail("鏂囦欢鏍煎紡涓嶆纭紝璇蜂笂浼�" + Arrays.toString(MimeTypeUtils.IMAGE_EXTENSION) + "鏍煎紡"); - } - SysOssVo oss = ossService.upload(avatarfile); - String avatar = oss.getUrl(); - if (userService.updateUserAvatar(LoginHelper.getUserId(), oss.getUrl())) { - AvatarVo avatarVo = new AvatarVo(); - avatarVo.setImgUrl(avatar); - return R.ok(avatarVo); - } - } - return R.fail("涓婁紶鍥剧墖寮傚父锛岃鑱旂郴绠$悊鍛�"); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysRoleController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysRoleController.java deleted file mode 100644 index ac11839..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysRoleController.java +++ /dev/null @@ -1,226 +0,0 @@ -package com.xmzs.system.controller.system; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.excel.utils.ExcelUtil; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.SysUserRole; -import com.xmzs.system.domain.bo.SysDeptBo; -import com.xmzs.system.domain.bo.SysRoleBo; -import com.xmzs.system.domain.bo.SysUserBo; -import com.xmzs.system.domain.vo.DeptTreeSelectVo; -import com.xmzs.system.domain.vo.SysRoleVo; -import com.xmzs.system.domain.vo.SysUserVo; -import com.xmzs.system.service.ISysDeptService; -import com.xmzs.system.service.ISysRoleService; -import com.xmzs.system.service.ISysUserService; -import jakarta.servlet.http.HttpServletResponse; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 瑙掕壊淇℃伅 - * - * @author Lion Li - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/system/role") -public class SysRoleController extends BaseController { - - private final ISysRoleService roleService; - private final ISysUserService userService; - private final ISysDeptService deptService; - - /** - * 鑾峰彇瑙掕壊淇℃伅鍒楄〃 - */ - @SaCheckPermission("system:role:list") - @GetMapping("/list") - public TableDataInfo<SysRoleVo> list(SysRoleBo role, PageQuery pageQuery) { - return roleService.selectPageRoleList(role, pageQuery); - } - - /** - * 瀵煎嚭瑙掕壊淇℃伅鍒楄〃 - */ - @Log(title = "瑙掕壊绠$悊", businessType = BusinessType.EXPORT) - @SaCheckPermission("system:role:export") - @PostMapping("/export") - public void export(SysRoleBo role, HttpServletResponse response) { - List<SysRoleVo> list = roleService.selectRoleList(role); - ExcelUtil.exportExcel(list, "瑙掕壊鏁版嵁", SysRoleVo.class, response); - } - - /** - * 鏍规嵁瑙掕壊缂栧彿鑾峰彇璇︾粏淇℃伅 - * - * @param roleId 瑙掕壊ID - */ - @SaCheckPermission("system:role:query") - @GetMapping(value = "/{roleId}") - public R<SysRoleVo> getInfo(@PathVariable Long roleId) { - roleService.checkRoleDataScope(roleId); - return R.ok(roleService.selectRoleById(roleId)); - } - - /** - * 鏂板瑙掕壊 - */ - @SaCheckPermission("system:role:add") - @Log(title = "瑙掕壊绠$悊", businessType = BusinessType.INSERT) - @PostMapping - public R<Void> add(@Validated @RequestBody SysRoleBo role) { - if (!roleService.checkRoleNameUnique(role)) { - return R.fail("鏂板瑙掕壊'" + role.getRoleName() + "'澶辫触锛岃鑹插悕绉板凡瀛樺湪"); - } else if (!roleService.checkRoleKeyUnique(role)) { - return R.fail("鏂板瑙掕壊'" + role.getRoleName() + "'澶辫触锛岃鑹叉潈闄愬凡瀛樺湪"); - } - return toAjax(roleService.insertRole(role)); - - } - - /** - * 淇敼淇濆瓨瑙掕壊 - */ - @SaCheckPermission("system:role:edit") - @Log(title = "瑙掕壊绠$悊", businessType = BusinessType.UPDATE) - @PutMapping - public R<Void> edit(@Validated @RequestBody SysRoleBo role) { - roleService.checkRoleAllowed(role.getRoleId()); - roleService.checkRoleDataScope(role.getRoleId()); - if (!roleService.checkRoleNameUnique(role)) { - return R.fail("淇敼瑙掕壊'" + role.getRoleName() + "'澶辫触锛岃鑹插悕绉板凡瀛樺湪"); - } else if (!roleService.checkRoleKeyUnique(role)) { - return R.fail("淇敼瑙掕壊'" + role.getRoleName() + "'澶辫触锛岃鑹叉潈闄愬凡瀛樺湪"); - } - - if (roleService.updateRole(role) > 0) { - roleService.cleanOnlineUserByRole(role.getRoleId()); - return R.ok(); - } - return R.fail("淇敼瑙掕壊'" + role.getRoleName() + "'澶辫触锛岃鑱旂郴绠$悊鍛�"); - } - - /** - * 淇敼淇濆瓨鏁版嵁鏉冮檺 - */ - @SaCheckPermission("system:role:edit") - @Log(title = "瑙掕壊绠$悊", businessType = BusinessType.UPDATE) - @PutMapping("/dataScope") - public R<Void> dataScope(@RequestBody SysRoleBo role) { - roleService.checkRoleAllowed(role.getRoleId()); - roleService.checkRoleDataScope(role.getRoleId()); - return toAjax(roleService.authDataScope(role)); - } - - /** - * 鐘舵�佷慨鏀� - */ - @SaCheckPermission("system:role:edit") - @Log(title = "瑙掕壊绠$悊", businessType = BusinessType.UPDATE) - @PutMapping("/changeStatus") - public R<Void> changeStatus(@RequestBody SysRoleBo role) { - roleService.checkRoleAllowed(role.getRoleId()); - roleService.checkRoleDataScope(role.getRoleId()); - return toAjax(roleService.updateRoleStatus(role.getRoleId(), role.getStatus())); - } - - /** - * 鍒犻櫎瑙掕壊 - * - * @param roleIds 瑙掕壊ID涓� - */ - @SaCheckPermission("system:role:remove") - @Log(title = "瑙掕壊绠$悊", businessType = BusinessType.DELETE) - @DeleteMapping("/{roleIds}") - public R<Void> remove(@PathVariable Long[] roleIds) { - return toAjax(roleService.deleteRoleByIds(roleIds)); - } - - /** - * 鑾峰彇瑙掕壊閫夋嫨妗嗗垪琛� - */ - @SaCheckPermission("system:role:query") - @GetMapping("/optionselect") - public R<List<SysRoleVo>> optionselect() { - return R.ok(roleService.selectRoleAll()); - } - - /** - * 鏌ヨ宸插垎閰嶇敤鎴疯鑹插垪琛� - */ - @SaCheckPermission("system:role:list") - @GetMapping("/authUser/allocatedList") - public TableDataInfo<SysUserVo> allocatedList(SysUserBo user, PageQuery pageQuery) { - return userService.selectAllocatedList(user, pageQuery); - } - - /** - * 鏌ヨ鏈垎閰嶇敤鎴疯鑹插垪琛� - */ - @SaCheckPermission("system:role:list") - @GetMapping("/authUser/unallocatedList") - public TableDataInfo<SysUserVo> unallocatedList(SysUserBo user, PageQuery pageQuery) { - return userService.selectUnallocatedList(user, pageQuery); - } - - /** - * 鍙栨秷鎺堟潈鐢ㄦ埛 - */ - @SaCheckPermission("system:role:edit") - @Log(title = "瑙掕壊绠$悊", businessType = BusinessType.GRANT) - @PutMapping("/authUser/cancel") - public R<Void> cancelAuthUser(@RequestBody SysUserRole userRole) { - return toAjax(roleService.deleteAuthUser(userRole)); - } - - /** - * 鎵归噺鍙栨秷鎺堟潈鐢ㄦ埛 - * - * @param roleId 瑙掕壊ID - * @param userIds 鐢ㄦ埛ID涓� - */ - @SaCheckPermission("system:role:edit") - @Log(title = "瑙掕壊绠$悊", businessType = BusinessType.GRANT) - @PutMapping("/authUser/cancelAll") - public R<Void> cancelAuthUserAll(Long roleId, Long[] userIds) { - return toAjax(roleService.deleteAuthUsers(roleId, userIds)); - } - - /** - * 鎵归噺閫夋嫨鐢ㄦ埛鎺堟潈 - * - * @param roleId 瑙掕壊ID - * @param userIds 鐢ㄦ埛ID涓� - */ - @SaCheckPermission("system:role:edit") - @Log(title = "瑙掕壊绠$悊", businessType = BusinessType.GRANT) - @PutMapping("/authUser/selectAll") - public R<Void> selectAuthUserAll(Long roleId, Long[] userIds) { - roleService.checkRoleDataScope(roleId); - return toAjax(roleService.insertAuthUsers(roleId, userIds)); - } - - /** - * 鑾峰彇瀵瑰簲瑙掕壊閮ㄩ棬鏍戝垪琛� - * - * @param roleId 瑙掕壊ID - */ - @SaCheckPermission("system:role:list") - @GetMapping(value = "/deptTree/{roleId}") - public R<DeptTreeSelectVo> roleDeptTreeselect(@PathVariable("roleId") Long roleId) { - DeptTreeSelectVo selectVo = new DeptTreeSelectVo(); - selectVo.setCheckedKeys(deptService.selectDeptListByRoleId(roleId)); - selectVo.setDepts(deptService.selectDeptTreeList(new SysDeptBo())); - return R.ok(selectVo); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysTenantController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysTenantController.java deleted file mode 100644 index 429b1b1..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysTenantController.java +++ /dev/null @@ -1,174 +0,0 @@ -package com.xmzs.system.controller.system; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import cn.dev33.satoken.annotation.SaCheckRole; -import com.baomidou.lock.annotation.Lock4j; -import com.xmzs.common.core.constant.TenantConstants; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.excel.utils.ExcelUtil; -import com.xmzs.common.idempotent.annotation.RepeatSubmit; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.tenant.helper.TenantHelper; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.bo.SysTenantBo; -import com.xmzs.system.domain.vo.SysTenantVo; -import com.xmzs.system.service.ISysTenantService; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 绉熸埛绠$悊 - * - * @author Michelle.Chung - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/system/tenant") -public class SysTenantController extends BaseController { - - private final ISysTenantService tenantService; - - /** - * 鏌ヨ绉熸埛鍒楄〃 - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:tenant:list") - @GetMapping("/list") - public TableDataInfo<SysTenantVo> list(SysTenantBo bo, PageQuery pageQuery) { - return tenantService.queryPageList(bo, pageQuery); - } - - /** - * 瀵煎嚭绉熸埛鍒楄〃 - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:tenant:export") - @Log(title = "绉熸埛", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(SysTenantBo bo, HttpServletResponse response) { - List<SysTenantVo> list = tenantService.queryList(bo); - ExcelUtil.exportExcel(list, "绉熸埛", SysTenantVo.class, response); - } - - /** - * 鑾峰彇绉熸埛璇︾粏淇℃伅 - * - * @param id 涓婚敭 - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:tenant:query") - @GetMapping("/{id}") - public R<SysTenantVo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable Long id) { - return R.ok(tenantService.queryById(id)); - } - - /** - * 鏂板绉熸埛 - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:tenant:add") - @Log(title = "绉熸埛", businessType = BusinessType.INSERT) - @Lock4j - @RepeatSubmit() - @PostMapping() - public R<Void> add(@Validated(AddGroup.class) @RequestBody SysTenantBo bo) { - if (!tenantService.checkCompanyNameUnique(bo)) { - return R.fail("鏂板绉熸埛'" + bo.getCompanyName() + "'澶辫触锛屼紒涓氬悕绉板凡瀛樺湪"); - } - return toAjax(TenantHelper.ignore(() -> tenantService.insertByBo(bo))); - } - - /** - * 淇敼绉熸埛 - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:tenant:edit") - @Log(title = "绉熸埛", businessType = BusinessType.UPDATE) - @RepeatSubmit() - @PutMapping() - public R<Void> edit(@Validated(EditGroup.class) @RequestBody SysTenantBo bo) { - tenantService.checkTenantAllowed(bo.getTenantId()); - if (!tenantService.checkCompanyNameUnique(bo)) { - return R.fail("淇敼绉熸埛'" + bo.getCompanyName() + "'澶辫触锛屽叕鍙稿悕绉板凡瀛樺湪"); - } - return toAjax(tenantService.updateByBo(bo)); - } - - /** - * 鐘舵�佷慨鏀� - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:tenant:edit") - @Log(title = "绉熸埛", businessType = BusinessType.UPDATE) - @PutMapping("/changeStatus") - public R<Void> changeStatus(@RequestBody SysTenantBo bo) { - tenantService.checkTenantAllowed(bo.getTenantId()); - return toAjax(tenantService.updateTenantStatus(bo)); - } - - /** - * 鍒犻櫎绉熸埛 - * - * @param ids 涓婚敭涓� - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:tenant:remove") - @Log(title = "绉熸埛", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable Long[] ids) { - return toAjax(tenantService.deleteWithValidByIds(List.of(ids), true)); - } - - /** - * 鍔ㄦ�佸垏鎹㈢鎴� - * - * @param tenantId 绉熸埛ID - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @GetMapping("/dynamic/{tenantId}") - public R<Void> dynamicTenant(@NotBlank(message = "绉熸埛ID涓嶈兘涓虹┖") @PathVariable String tenantId) { - TenantHelper.setDynamic(tenantId); - return R.ok(); - } - - /** - * 娓呴櫎鍔ㄦ�佺鎴� - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @GetMapping("/dynamic/clear") - public R<Void> dynamicClear() { - TenantHelper.clearDynamic(); - return R.ok(); - } - - - /** - * 鍚屾绉熸埛濂楅 - * - * @param tenantId 绉熸埛id - * @param packageId 濂楅id - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:tenant:edit") - @Log(title = "绉熸埛", businessType = BusinessType.UPDATE) - @GetMapping("/syncTenantPackage") - public R<Void> syncTenantPackage(@NotBlank(message = "绉熸埛ID涓嶈兘涓虹┖") String tenantId, @NotBlank(message = "濂楅ID涓嶈兘涓虹┖") String packageId) { - return toAjax(TenantHelper.ignore(() -> tenantService.syncTenantPackage(tenantId, packageId))); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysTenantPackageController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysTenantPackageController.java deleted file mode 100644 index 9ade45f..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysTenantPackageController.java +++ /dev/null @@ -1,134 +0,0 @@ -package com.xmzs.system.controller.system; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import cn.dev33.satoken.annotation.SaCheckRole; -import com.xmzs.common.core.constant.TenantConstants; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.excel.utils.ExcelUtil; -import com.xmzs.common.idempotent.annotation.RepeatSubmit; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.bo.SysTenantPackageBo; -import com.xmzs.system.domain.vo.SysTenantPackageVo; -import com.xmzs.system.service.ISysTenantPackageService; -import jakarta.servlet.http.HttpServletResponse; -import jakarta.validation.constraints.NotEmpty; -import jakarta.validation.constraints.NotNull; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 绉熸埛濂楅绠$悊 - * - * @author Michelle.Chung - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/system/tenant/package") -public class SysTenantPackageController extends BaseController { - - private final ISysTenantPackageService tenantPackageService; - - /** - * 鏌ヨ绉熸埛濂楅鍒楄〃 - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:tenantPackage:list") - @GetMapping("/list") - public TableDataInfo<SysTenantPackageVo> list(SysTenantPackageBo bo, PageQuery pageQuery) { - return tenantPackageService.queryPageList(bo, pageQuery); - } - - /** - * 鏌ヨ绉熸埛濂楅涓嬫媺閫夊垪琛� - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:tenantPackage:list") - @GetMapping("/selectList") - public R<List<SysTenantPackageVo>> selectList() { - return R.ok(tenantPackageService.selectList()); - } - - /** - * 瀵煎嚭绉熸埛濂楅鍒楄〃 - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:tenantPackage:export") - @Log(title = "绉熸埛濂楅", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(SysTenantPackageBo bo, HttpServletResponse response) { - List<SysTenantPackageVo> list = tenantPackageService.queryList(bo); - ExcelUtil.exportExcel(list, "绉熸埛濂楅", SysTenantPackageVo.class, response); - } - - /** - * 鑾峰彇绉熸埛濂楅璇︾粏淇℃伅 - * - * @param packageId 涓婚敭 - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:tenantPackage:query") - @GetMapping("/{packageId}") - public R<SysTenantPackageVo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable Long packageId) { - return R.ok(tenantPackageService.queryById(packageId)); - } - - /** - * 鏂板绉熸埛濂楅 - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:tenantPackage:add") - @Log(title = "绉熸埛濂楅", businessType = BusinessType.INSERT) - @RepeatSubmit() - @PostMapping() - public R<Void> add(@Validated(AddGroup.class) @RequestBody SysTenantPackageBo bo) { - return toAjax(tenantPackageService.insertByBo(bo)); - } - - /** - * 淇敼绉熸埛濂楅 - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:tenantPackage:edit") - @Log(title = "绉熸埛濂楅", businessType = BusinessType.UPDATE) - @RepeatSubmit() - @PutMapping() - public R<Void> edit(@Validated(EditGroup.class) @RequestBody SysTenantPackageBo bo) { - return toAjax(tenantPackageService.updateByBo(bo)); - } - - /** - * 鐘舵�佷慨鏀� - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:tenantPackage:edit") - @Log(title = "绉熸埛濂楅", businessType = BusinessType.UPDATE) - @PutMapping("/changeStatus") - public R<Void> changeStatus(@RequestBody SysTenantPackageBo bo) { - return toAjax(tenantPackageService.updatePackageStatus(bo)); - } - - /** - * 鍒犻櫎绉熸埛濂楅 - * - * @param packageIds 涓婚敭涓� - */ - @SaCheckRole(TenantConstants.SUPER_ADMIN_ROLE_KEY) - @SaCheckPermission("system:tenantPackage:remove") - @Log(title = "绉熸埛濂楅", businessType = BusinessType.DELETE) - @DeleteMapping("/{packageIds}") - public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖") - @PathVariable Long[] packageIds) { - return toAjax(tenantPackageService.deleteWithValidByIds(List.of(packageIds), true)); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysUserController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysUserController.java deleted file mode 100644 index 95b9ea4..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/controller/system/SysUserController.java +++ /dev/null @@ -1,297 +0,0 @@ -package com.xmzs.system.controller.system; - -import cn.dev33.satoken.annotation.SaCheckPermission; -import cn.dev33.satoken.secure.BCrypt; -import cn.hutool.core.lang.tree.Tree; -import cn.hutool.core.util.ArrayUtil; -import cn.hutool.core.util.ObjectUtil; -import com.xmzs.common.core.domain.R; -import com.xmzs.common.core.domain.model.LoginUser; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.StreamUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.excel.core.ExcelResult; -import com.xmzs.common.excel.utils.ExcelUtil; -import com.xmzs.common.log.annotation.Log; -import com.xmzs.common.log.enums.BusinessType; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.common.tenant.helper.TenantHelper; -import com.xmzs.common.web.core.BaseController; -import com.xmzs.system.domain.bo.SysDeptBo; -import com.xmzs.system.domain.bo.SysUserBo; -import com.xmzs.system.domain.request.UserRequest; -import com.xmzs.system.domain.vo.*; -import com.xmzs.system.listener.SysUserImportListener; -import com.xmzs.system.service.*; -import jakarta.servlet.http.HttpServletResponse; -import lombok.RequiredArgsConstructor; -import org.springframework.http.MediaType; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import java.util.ArrayList; -import java.util.List; - -/** - * 鐢ㄦ埛淇℃伅 - * - * @author Lion Li - */ -@Validated -@RequiredArgsConstructor -@RestController -@RequestMapping("/system/user") -public class SysUserController extends BaseController { - - private final ISysUserService userService; - private final ISysRoleService roleService; - private final ISysPostService postService; - private final ISysDeptService deptService; - private final ISysTenantService tenantService; - private final ISysOssService ossService; - /** - * 鑾峰彇鐢ㄦ埛鍒楄〃 - */ - @SaCheckPermission("system:user:list") - @GetMapping("/list") - public TableDataInfo<SysUserVo> list(SysUserBo user, PageQuery pageQuery) { - return userService.selectPageUserList(user, pageQuery); - } - - /** - * 瀵煎嚭鐢ㄦ埛鍒楄〃 - */ - @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.EXPORT) - @SaCheckPermission("system:user:export") - @PostMapping("/export") - public void export(SysUserBo user, HttpServletResponse response) { - List<SysUserVo> list = userService.selectUserList(user); - List<SysUserExportVo> listVo = MapstructUtils.convert(list, SysUserExportVo.class); - ExcelUtil.exportExcel(listVo, "鐢ㄦ埛鏁版嵁", SysUserExportVo.class, response); - } - - /** - * 瀵煎叆鏁版嵁 - * - * @param file 瀵煎叆鏂囦欢 - * @param updateSupport 鏄惁鏇存柊宸插瓨鍦ㄦ暟鎹� - */ - @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.IMPORT) - @SaCheckPermission("system:user:import") - @PostMapping(value = "/importData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) - public R<Void> importData(@RequestPart("file") MultipartFile file, boolean updateSupport) throws Exception { - ExcelResult<SysUserImportVo> result = ExcelUtil.importExcel(file.getInputStream(), SysUserImportVo.class, new SysUserImportListener(updateSupport)); - return R.ok(result.getAnalysis()); - } - - /** - * 鑾峰彇瀵煎叆妯℃澘 - */ - @PostMapping("/importTemplate") - public void importTemplate(HttpServletResponse response) { - ExcelUtil.exportExcel(new ArrayList<>(), "鐢ㄦ埛鏁版嵁", SysUserImportVo.class, response); - } - - /** - * 鑾峰彇鐢ㄦ埛淇℃伅 - * - * @return 鐢ㄦ埛淇℃伅 - */ - @GetMapping("/getInfo") - public R<UserInfoVo> getInfo() { - UserInfoVo userInfoVo = new UserInfoVo(); - LoginUser loginUser = LoginHelper.getLoginUser(); - if (TenantHelper.isEnable() && LoginHelper.isSuperAdmin()) { - // 瓒呯骇绠$悊鍛� 濡傛灉閲嶆柊鍔犺浇鐢ㄦ埛淇℃伅闇�娓呴櫎鍔ㄦ�佺鎴� - TenantHelper.clearDynamic(); - } - SysUserVo user = userService.selectUserById(loginUser.getUserId()); - userInfoVo.setUser(user); - userInfoVo.setPermissions(loginUser.getMenuPermission()); - userInfoVo.setRoles(loginUser.getRolePermission()); - return R.ok(userInfoVo); - } - - /** - * 鏍规嵁鐢ㄦ埛缂栧彿鑾峰彇璇︾粏淇℃伅 - * - * @param userId 鐢ㄦ埛ID - */ - @SaCheckPermission("system:user:query") - @GetMapping(value = {"/", "/{userId}"}) - public R<SysUserInfoVo> getInfo(@PathVariable(value = "userId", required = false) Long userId) { - userService.checkUserDataScope(userId); - SysUserInfoVo userInfoVo = new SysUserInfoVo(); - List<SysRoleVo> roles = roleService.selectRoleAll(); - userInfoVo.setRoles(LoginHelper.isSuperAdmin(userId) ? roles : StreamUtils.filter(roles, r -> !r.isSuperAdmin())); - userInfoVo.setPosts(postService.selectPostAll()); - if (ObjectUtil.isNotNull(userId)) { - SysUserVo sysUser = userService.selectUserById(userId); - userInfoVo.setUser(sysUser); - userInfoVo.setRoleIds(StreamUtils.toList(sysUser.getRoles(), SysRoleVo::getRoleId)); - userInfoVo.setPostIds(postService.selectPostListByUserId(userId)); - } - return R.ok(userInfoVo); - } - - /** - * 鏂板鐢ㄦ埛 - */ - @SaCheckPermission("system:user:add") - @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.INSERT) - @PostMapping - public R<Void> add(@Validated @RequestBody SysUserBo user) { - if (!userService.checkUserNameUnique(user)) { - return R.fail("鏂板鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛岀櫥褰曡处鍙峰凡瀛樺湪"); - } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user)) { - return R.fail("鏂板鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛屾墜鏈哄彿鐮佸凡瀛樺湪"); - } else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user)) { - return R.fail("鏂板鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛岄偖绠辫处鍙峰凡瀛樺湪"); - } - if (TenantHelper.isEnable()) { - if (!tenantService.checkAccountBalance(TenantHelper.getTenantId())) { - return R.fail("褰撳墠绉熸埛涓嬬敤鎴峰悕棰濅笉瓒筹紝璇疯仈绯荤鐞嗗憳"); - } - } - user.setPassword(BCrypt.hashpw(user.getPassword())); - return toAjax(userService.insertUser(user)); - } - - /** - * 淇敼鐢ㄦ埛 - */ - @SaCheckPermission("system:user:edit") - @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.UPDATE) - @PutMapping - public R<Void> edit(@Validated @RequestBody SysUserBo user) { - userService.checkUserAllowed(user.getUserId()); - userService.checkUserDataScope(user.getUserId()); - if (!userService.checkUserNameUnique(user)) { - return R.fail("淇敼鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛岀櫥褰曡处鍙峰凡瀛樺湪"); - } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user)) { - return R.fail("淇敼鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛屾墜鏈哄彿鐮佸凡瀛樺湪"); - } else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user)) { - return R.fail("淇敼鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛岄偖绠辫处鍙峰凡瀛樺湪"); - } - return toAjax(userService.updateUser(user)); - } - - /** - * 淇敼鐢ㄦ埛鍚嶇О - */ - @Log(title = "淇敼鐢ㄦ埛鍚嶇О", businessType = BusinessType.UPDATE) - @PostMapping("/editName") - public R<Void> editName(@RequestBody @Validated UserRequest userRequest) { - LoginUser loginUser = LoginHelper.getLoginUser(); - userService.updateUserName(loginUser.getUserId(), userRequest.getNickName()); - return R.ok("鎿嶄綔鎴愬姛!"); - } - - /** - * 淇敼鐢ㄦ埛澶村儚 - */ - @Log(title = "淇敼鐢ㄦ埛澶村儚", businessType = BusinessType.UPDATE) - @PostMapping("/edit/avatar") - public R<Void> editAvatar(@RequestPart("file") MultipartFile file) { - if (ObjectUtil.isNull(file)) { - return R.fail("涓婁紶鏂囦欢涓嶈兘涓虹┖"); - } - LoginUser loginUser = LoginHelper.getLoginUser(); - // 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛 - SysOssVo oss = ossService.upload(file); - userService.updateUserAvatar(loginUser.getUserId(), oss.getUrl()); - return R.ok(oss.getUrl()); - } - - /** - * 灏忕▼搴�-淇敼鐢ㄦ埛 - */ - @PostMapping("/edit/xcxUser") - public R<SysUserVo> editXcxUser(@RequestBody SysUserBo user) { - return R.ok(userService.updateXcxUser(user)); - } - - /** - * 鍒犻櫎鐢ㄦ埛 - * - * @param userIds 瑙掕壊ID涓� - */ - @SaCheckPermission("system:user:remove") - @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.DELETE) - @DeleteMapping("/{userIds}") - public R<Void> remove(@PathVariable Long[] userIds) { - if (ArrayUtil.contains(userIds, LoginHelper.getUserId())) { - return R.fail("褰撳墠鐢ㄦ埛涓嶈兘鍒犻櫎"); - } - return toAjax(userService.deleteUserByIds(userIds)); - } - - /** - * 閲嶇疆瀵嗙爜 - */ - @SaCheckPermission("system:user:resetPwd") - @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.UPDATE) - @PutMapping("/resetPwd") - public R<Void> resetPwd(@RequestBody SysUserBo user) { - userService.checkUserAllowed(user.getUserId()); - userService.checkUserDataScope(user.getUserId()); - user.setPassword(BCrypt.hashpw(user.getPassword())); - return toAjax(userService.resetUserPwd(user.getUserId(), user.getPassword())); - } - - /** - * 鐘舵�佷慨鏀� - */ - @SaCheckPermission("system:user:edit") - @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.UPDATE) - @PutMapping("/changeStatus") - public R<Void> changeStatus(@RequestBody SysUserBo user) { - userService.checkUserAllowed(user.getUserId()); - userService.checkUserDataScope(user.getUserId()); - return toAjax(userService.updateUserStatus(user.getUserId(), user.getStatus())); - } - - /** - * 鏍规嵁鐢ㄦ埛缂栧彿鑾峰彇鎺堟潈瑙掕壊 - * - * @param userId 鐢ㄦ埛ID - */ - @SaCheckPermission("system:user:query") - @GetMapping("/authRole/{userId}") - public R<SysUserInfoVo> authRole(@PathVariable Long userId) { - SysUserVo user = userService.selectUserById(userId); - List<SysRoleVo> roles = roleService.selectRolesByUserId(userId); - SysUserInfoVo userInfoVo = new SysUserInfoVo(); - userInfoVo.setUser(user); - userInfoVo.setRoles(LoginHelper.isSuperAdmin(userId) ? roles : StreamUtils.filter(roles, r -> !r.isSuperAdmin())); - return R.ok(userInfoVo); - } - - /** - * 鐢ㄦ埛鎺堟潈瑙掕壊 - * - * @param userId 鐢ㄦ埛Id - * @param roleIds 瑙掕壊ID涓� - */ - @SaCheckPermission("system:user:edit") - @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.GRANT) - @PutMapping("/authRole") - public R<Void> insertAuthRole(Long userId, Long[] roleIds) { - userService.checkUserDataScope(userId); - userService.insertUserAuth(userId, roleIds); - return R.ok(); - } - - /** - * 鑾峰彇閮ㄩ棬鏍戝垪琛� - */ - @SaCheckPermission("system:user:list") - @GetMapping("/deptTree") - public R<List<Tree<Long>>> deptTree(SysDeptBo dept) { - return R.ok(deptService.selectDeptTreeList(dept)); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/ChatMessage.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/ChatMessage.java deleted file mode 100644 index 6691f32..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/ChatMessage.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serial; - -/** - * 鑱婂ぉ娑堟伅瀵硅薄 chat_message - * - * @author Lion Li - * @date 2023-11-26 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("chat_message") -public class ChatMessage extends BaseEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 涓婚敭 - */ - @NotNull(message = "涓婚敭涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long id; - - /** - * 鐢ㄦ埛ID - */ - @NotBlank(message = "鐢ㄦ埛ID", groups = { AddGroup.class, EditGroup.class }) - private Long UserId; - - /** - * 娑堟伅鍐呭 - */ - @NotBlank(message = "娑堟伅鍐呭涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String content; - - - /** - * 鎵i櫎璐圭敤 - */ - private Double deductCost; - - /** - * 绱 Tokens - */ - @NotNull(message = "绱 Tokens涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private Integer totalTokens; - - /** - * 妯″瀷鍚嶇О - */ - @NotBlank(message = "妯″瀷鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String modelName; - - /** - * 澶囨敞 - */ - @NotBlank(message = "澶囨敞涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String remark; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/ChatToken.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/ChatToken.java deleted file mode 100644 index 83631d6..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/ChatToken.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; - -/** - * 鐢ㄦ埛token chat_token - * - * @author Lion Li - * @date 2023-11-26 - */ -@Data -@TableName("chat_token") -public class ChatToken implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 涓婚敭 - */ - @NotNull(message = "涓婚敭涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long id; - - /** - * 鐢ㄦ埛ID - */ - @NotBlank(message = "鐢ㄦ埛ID", groups = { AddGroup.class, EditGroup.class }) - private Long UserId; - - /** - * 寰呯粨绠梩oken - */ - private Integer token; - - /** - * 妯″瀷鍚嶇О - */ - @NotBlank(message = "妯″瀷鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String modelName; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/PaymentOrders.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/PaymentOrders.java deleted file mode 100644 index 0729322..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/PaymentOrders.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serial; -import java.math.BigDecimal; - -/** - * 鏀粯璁㈠崟瀵硅薄 payment_orders - * - * @author Lion Li - * @date 2023-12-29 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("sys_pay_order") -public class PaymentOrders extends BaseEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 涓婚敭 - */ - @TableId(value = "id") - private Long id; - - /** - * 璁㈠崟缂栧彿 - */ - private String orderNo; - - /** - * 璁㈠崟鍚嶇О - */ - private String orderName; - - /** - * 閲戦 - */ - private BigDecimal amount; - - /** - * 鏀粯鐘舵�� - */ - private String paymentStatus; - - /** - * 鏀粯鏂瑰紡 - */ - private String paymentMethod; - - /** - * 鐢ㄦ埛ID - */ - private Long userId; - - /** - * 澶囨敞 - */ - private String remark; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysCache.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysCache.java deleted file mode 100644 index d3ed861..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysCache.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.xmzs.system.domain; - -import com.xmzs.common.core.utils.StringUtils; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * 缂撳瓨淇℃伅 - * - * @author Lion Li - */ -@Data -@NoArgsConstructor -public class SysCache { - - /** - * 缂撳瓨鍚嶇О - */ - private String cacheName = ""; - - /** - * 缂撳瓨閿悕 - */ - private String cacheKey = ""; - - /** - * 缂撳瓨鍐呭 - */ - private String cacheValue = ""; - - /** - * 澶囨敞 - */ - private String remark = ""; - - public SysCache(String cacheName, String remark) { - this.cacheName = cacheName; - this.remark = remark; - } - - public SysCache(String cacheName, String cacheKey, String cacheValue) { - this.cacheName = StringUtils.replace(cacheName, ":", ""); - this.cacheKey = StringUtils.replace(cacheKey, cacheName, ""); - this.cacheValue = cacheValue; - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysConfig.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysConfig.java deleted file mode 100644 index 5e49cf0..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysConfig.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.tenant.core.TenantEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 鍙傛暟閰嶇疆琛� sys_config - * - * @author Lion Li - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("sys_config") -public class SysConfig extends TenantEntity { - - /** - * 鍙傛暟涓婚敭 - */ - @TableId(value = "config_id") - private Long configId; - - /** - * 鍙傛暟鍚嶇О - */ - private String configName; - - /** - * 鍙傛暟閿悕 - */ - private String configKey; - - /** - * 鍙傛暟閿�� - */ - private String configValue; - - /** - * 绯荤粺鍐呯疆锛圷鏄� N鍚︼級 - */ - private String configType; - - /** - * 澶囨敞 - */ - private String remark; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysDept.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysDept.java deleted file mode 100644 index 93f05c0..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysDept.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableLogic; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.tenant.core.TenantEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serial; - -/** - * 閮ㄩ棬琛� sys_dept - * - * @author Lion Li - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("sys_dept") -public class SysDept extends TenantEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 閮ㄩ棬ID - */ - @TableId(value = "dept_id") - private Long deptId; - - /** - * 鐖堕儴闂↖D - */ - private Long parentId; - - /** - * 閮ㄩ棬鍚嶇О - */ - private String deptName; - - /** - * 鏄剧ず椤哄簭 - */ - private Integer orderNum; - - /** - * 璐熻矗浜� - */ - private String leader; - - /** - * 鑱旂郴鐢佃瘽 - */ - private String phone; - - /** - * 閭 - */ - private String email; - - /** - * 閮ㄩ棬鐘舵��:0姝e父,1鍋滅敤 - */ - private String status; - - /** - * 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛� - */ - @TableLogic - private String delFlag; - - /** - * 绁栫骇鍒楄〃 - */ - private String ancestors; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysDictData.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysDictData.java deleted file mode 100644 index 523d4d4..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysDictData.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.core.constant.UserConstants; -import com.xmzs.common.tenant.core.TenantEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 瀛楀吀鏁版嵁琛� sys_dict_data - * - * @author Lion Li - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("sys_dict_data") -public class SysDictData extends TenantEntity { - - /** - * 瀛楀吀缂栫爜 - */ - @TableId(value = "dict_code") - private Long dictCode; - - /** - * 瀛楀吀鎺掑簭 - */ - private Integer dictSort; - - /** - * 瀛楀吀鏍囩 - */ - private String dictLabel; - - /** - * 瀛楀吀閿�� - */ - private String dictValue; - - /** - * 瀛楀吀绫诲瀷 - */ - private String dictType; - - /** - * 鏍峰紡灞炴�э紙鍏朵粬鏍峰紡鎵╁睍锛� - */ - private String cssClass; - - /** - * 琛ㄦ牸瀛楀吀鏍峰紡 - */ - private String listClass; - - /** - * 鏄惁榛樿锛圷鏄� N鍚︼級 - */ - private String isDefault; - - /** - * 鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - /** - * 澶囨敞 - */ - private String remark; - - public boolean getDefault() { - return UserConstants.YES.equals(this.isDefault); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysDictType.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysDictType.java deleted file mode 100644 index 1788177..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysDictType.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.tenant.core.TenantEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 瀛楀吀绫诲瀷琛� sys_dict_type - * - * @author Lion Li - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("sys_dict_type") -public class SysDictType extends TenantEntity { - - /** - * 瀛楀吀涓婚敭 - */ - @TableId(value = "dict_id") - private Long dictId; - - /** - * 瀛楀吀鍚嶇О - */ - private String dictName; - - /** - * 瀛楀吀绫诲瀷 - */ - private String dictType; - - /** - * 鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - /** - * 澶囨敞 - */ - private String remark; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysLogininfor.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysLogininfor.java deleted file mode 100644 index 1ce9fc1..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysLogininfor.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - -/** - * 绯荤粺璁块棶璁板綍琛� sys_logininfor - * - * @author Lion Li - */ - -@Data -@TableName("sys_logininfor") -public class SysLogininfor implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * ID - */ - @TableId(value = "info_id") - private Long infoId; - - /** - * 绉熸埛缂栧彿 - */ - private String tenantId; - - /** - * 鐢ㄦ埛璐﹀彿 - */ - private String userName; - - /** - * 鐧诲綍鐘舵�� 0鎴愬姛 1澶辫触 - */ - private String status; - - /** - * 鐧诲綍IP鍦板潃 - */ - private String ipaddr; - - /** - * 鐧诲綍鍦扮偣 - */ - private String loginLocation; - - /** - * 娴忚鍣ㄧ被鍨� - */ - private String browser; - - /** - * 鎿嶄綔绯荤粺 - */ - private String os; - - /** - * 鎻愮ず娑堟伅 - */ - private String msg; - - /** - * 璁块棶鏃堕棿 - */ - private Date loginTime; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysMenu.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysMenu.java deleted file mode 100644 index 79cebd7..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysMenu.java +++ /dev/null @@ -1,191 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.core.constant.Constants; -import com.xmzs.common.core.constant.UserConstants; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.ArrayList; -import java.util.List; - -/** - * 鑿滃崟鏉冮檺琛� sys_menu - * - * @author Lion Li - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("sys_menu") -public class SysMenu extends BaseEntity { - - /** - * 鑿滃崟ID - */ - @TableId(value = "menu_id") - private Long menuId; - - /** - * 鐖惰彍鍗旾D - */ - private Long parentId; - - /** - * 鑿滃崟鍚嶇О - */ - private String menuName; - - /** - * 鏄剧ず椤哄簭 - */ - private Integer orderNum; - - /** - * 璺敱鍦板潃 - */ - private String path; - - /** - * 缁勪欢璺緞 - */ - private String component; - - /** - * 璺敱鍙傛暟 - */ - private String queryParam; - - /** - * 鏄惁涓哄閾撅紙0鏄� 1鍚︼級 - */ - private String isFrame; - - /** - * 鏄惁缂撳瓨锛�0缂撳瓨 1涓嶇紦瀛橈級 - */ - private String isCache; - - /** - * 绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛� - */ - private String menuType; - - /** - * 鏄剧ず鐘舵�侊紙0鏄剧ず 1闅愯棌锛� - */ - private String visible; - - /** - * 鑿滃崟鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - /** - * 鏉冮檺瀛楃涓� - */ - private String perms; - - /** - * 鑿滃崟鍥炬爣 - */ - private String icon; - - /** - * 澶囨敞 - */ - private String remark; - - /** - * 鐖惰彍鍗曞悕绉� - */ - @TableField(exist = false) - private String parentName; - - /** - * 瀛愯彍鍗� - */ - @TableField(exist = false) - private List<SysMenu> children = new ArrayList<>(); - - /** - * 鑾峰彇璺敱鍚嶇О - */ - public String getRouteName() { - String routerName = StringUtils.capitalize(path); - // 闈炲閾惧苟涓旀槸涓�绾х洰褰曪紙绫诲瀷涓虹洰褰曪級 - if (isMenuFrame()) { - routerName = StringUtils.EMPTY; - } - return routerName; - } - - /** - * 鑾峰彇璺敱鍦板潃 - */ - public String getRouterPath() { - String routerPath = this.path; - // 鍐呴摼鎵撳紑澶栫綉鏂瑰紡 - if (getParentId() != 0L && isInnerLink()) { - routerPath = innerLinkReplaceEach(routerPath); - } - // 闈炲閾惧苟涓旀槸涓�绾х洰褰曪紙绫诲瀷涓虹洰褰曪級 - if (0L == getParentId() && UserConstants.TYPE_DIR.equals(getMenuType()) - && UserConstants.NO_FRAME.equals(getIsFrame())) { - routerPath = "/" + this.path; - } - // 闈炲閾惧苟涓旀槸涓�绾х洰褰曪紙绫诲瀷涓鸿彍鍗曪級 - else if (isMenuFrame()) { - routerPath = "/"; - } - return routerPath; - } - - /** - * 鑾峰彇缁勪欢淇℃伅 - */ - public String getComponentInfo() { - String component = UserConstants.LAYOUT; - if (StringUtils.isNotEmpty(this.component) && !isMenuFrame()) { - component = this.component; - } else if (StringUtils.isEmpty(this.component) && getParentId() != 0L && isInnerLink()) { - component = UserConstants.INNER_LINK; - } else if (StringUtils.isEmpty(this.component) && isParentView()) { - component = UserConstants.PARENT_VIEW; - } - return component; - } - - /** - * 鏄惁涓鸿彍鍗曞唴閮ㄨ烦杞� - */ - public boolean isMenuFrame() { - return getParentId() == 0L && UserConstants.TYPE_MENU.equals(menuType) && isFrame.equals(UserConstants.NO_FRAME); - } - - /** - * 鏄惁涓哄唴閾剧粍浠� - */ - public boolean isInnerLink() { - return isFrame.equals(UserConstants.NO_FRAME) && StringUtils.ishttp(path); - } - - /** - * 鏄惁涓簆arent_view缁勪欢 - */ - public boolean isParentView() { - return getParentId() != 0L && UserConstants.TYPE_DIR.equals(menuType); - } - - /** - * 鍐呴摼鍩熷悕鐗规畩瀛楃鏇挎崲 - */ - public static String innerLinkReplaceEach(String path) { - return StringUtils.replaceEach(path, new String[]{Constants.HTTP, Constants.HTTPS, Constants.WWW, "."}, - new String[]{"", "", "", "/"}); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysModel.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysModel.java deleted file mode 100644 index 690f406..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysModel.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serial; - -/** - * 绯荤粺妯″瀷瀵硅薄 sys_model - * - * @author Lion Li - * @date 2024-04-04 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("sys_model") -public class SysModel extends BaseEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 涓婚敭 - */ - @TableId(value = "id") - private Long id; - - /** - * 妯″瀷鍚嶇О - */ - private String modelName; - - /** - * 妯″瀷鎻忚堪 - */ - private String modelDescribe; - - /** - * 妯″瀷浠锋牸 - */ - private double modelPrice; - - /** - * 璁¤垂绫诲瀷 - */ - private String modelType; - - /** - * 鏄惁鏄剧ず - */ - private String modelShow; - - - /** - * 绯荤粺鎻愮ず璇� - */ - private String systemPrompt; - - /** - * 澶囨敞 - */ - private String remark; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysNotice.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysNotice.java deleted file mode 100644 index 5e20e4d..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysNotice.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.tenant.core.TenantEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - - -/** - * 閫氱煡鍏憡琛� sys_notice - * - * @author Lion Li - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("sys_notice") -public class SysNotice extends TenantEntity { - - /** - * 鍏憡ID - */ - @TableId(value = "notice_id") - private Long noticeId; - - /** - * 鍏憡鏍囬 - */ - private String noticeTitle; - - /** - * 鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛� - */ - private String noticeType; - - /** - * 鍏憡鍐呭 - */ - private String noticeContent; - - /** - * 鍏憡鐘舵�侊紙0姝e父 1鍏抽棴锛� - */ - private String status; - - /** - * 澶囨敞 - */ - private String remark; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysOperLog.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysOperLog.java deleted file mode 100644 index 250e7df..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysOperLog.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - -/** - * 鎿嶄綔鏃ュ織璁板綍琛� oper_log - * - * @author Lion Li - */ - -@Data -@TableName("sys_oper_log") -public class SysOperLog implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 鏃ュ織涓婚敭 - */ - @TableId(value = "oper_id") - private Long operId; - - /** - * 绉熸埛缂栧彿 - */ - private String tenantId; - - /** - * 鎿嶄綔妯″潡 - */ - private String title; - - /** - * 涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛� - */ - private Integer businessType; - - /** - * 璇锋眰鏂规硶 - */ - private String method; - - /** - * 璇锋眰鏂瑰紡 - */ - private String requestMethod; - - /** - * 鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級 - */ - private Integer operatorType; - - /** - * 鎿嶄綔浜哄憳 - */ - private String operName; - - /** - * 閮ㄩ棬鍚嶇О - */ - private String deptName; - - /** - * 璇锋眰url - */ - private String operUrl; - - /** - * 鎿嶄綔鍦板潃 - */ - private String operIp; - - /** - * 鎿嶄綔鍦扮偣 - */ - private String operLocation; - - /** - * 璇锋眰鍙傛暟 - */ - private String operParam; - - /** - * 杩斿洖鍙傛暟 - */ - private String jsonResult; - - /** - * 鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛� - */ - private Integer status; - - /** - * 閿欒娑堟伅 - */ - private String errorMsg; - - /** - * 鎿嶄綔鏃堕棿 - */ - private Date operTime; - - /** - * 娑堣�楁椂闂� - */ - private Long costTime; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysOss.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysOss.java deleted file mode 100644 index 414c47c..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysOss.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.tenant.core.TenantEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * OSS瀵硅薄瀛樺偍瀵硅薄 - * - * @author Lion Li - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("sys_oss") -public class SysOss extends TenantEntity { - - /** - * 瀵硅薄瀛樺偍涓婚敭 - */ - @TableId(value = "oss_id") - private Long ossId; - - /** - * 鏂囦欢鍚� - */ - private String fileName; - - /** - * 鍘熷悕 - */ - private String originalName; - - /** - * 鏂囦欢鍚庣紑鍚� - */ - private String fileSuffix; - - /** - * URL鍦板潃 - */ - private String url; - - /** - * 鏈嶅姟鍟� - */ - private String service; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysOssConfig.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysOssConfig.java deleted file mode 100644 index 46580f6..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysOssConfig.java +++ /dev/null @@ -1,89 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.tenant.core.TenantEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 瀵硅薄瀛樺偍閰嶇疆瀵硅薄 sys_oss_config - * - * @author Lion Li - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("sys_oss_config") -public class SysOssConfig extends TenantEntity { - - /** - * 涓诲缓 - */ - @TableId(value = "oss_config_id") - private Long ossConfigId; - - /** - * 閰嶇疆key - */ - private String configKey; - - /** - * accessKey - */ - private String accessKey; - - /** - * 绉橀挜 - */ - private String secretKey; - - /** - * 妗跺悕绉� - */ - private String bucketName; - - /** - * 鍓嶇紑 - */ - private String prefix; - - /** - * 璁块棶绔欑偣 - */ - private String endpoint; - - /** - * 鑷畾涔夊煙鍚� - */ - private String domain; - - /** - * 鏄惁https锛�0鍚� 1鏄級 - */ - private String isHttps; - - /** - * 鍩� - */ - private String region; - - /** - * 鏄惁榛樿锛�0=鏄�,1=鍚︼級 - */ - private String status; - - /** - * 鎵╁睍瀛楁 - */ - private String ext1; - - /** - * 澶囨敞 - */ - private String remark; - - /** - * 妗舵潈闄愮被鍨�(0private 1public 2custom) - */ - private String accessPolicy; -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysPost.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysPost.java deleted file mode 100644 index b8b3965..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysPost.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.tenant.core.TenantEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 宀椾綅琛� sys_post - * - * @author Lion Li - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("sys_post") -public class SysPost extends TenantEntity { - - /** - * 宀椾綅搴忓彿 - */ - @TableId(value = "post_id") - private Long postId; - - /** - * 宀椾綅缂栫爜 - */ - private String postCode; - - /** - * 宀椾綅鍚嶇О - */ - private String postName; - - /** - * 宀椾綅鎺掑簭 - */ - private Integer postSort; - - /** - * 鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - /** - * 澶囨敞 - */ - private String remark; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysRole.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysRole.java deleted file mode 100644 index 52f833e..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysRole.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableLogic; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.tenant.core.TenantEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; - -/** - * 瑙掕壊琛� sys_role - * - * @author Lion Li - */ - -@Data -@NoArgsConstructor -@EqualsAndHashCode(callSuper = true) -@TableName("sys_role") -public class SysRole extends TenantEntity { - - /** - * 瑙掕壊ID - */ - @TableId(value = "role_id") - private Long roleId; - - /** - * 瑙掕壊鍚嶇О - */ - private String roleName; - - /** - * 瑙掕壊鏉冮檺 - */ - private String roleKey; - - /** - * 瑙掕壊鎺掑簭 - */ - private Integer roleSort; - - /** - * 鏁版嵁鑼冨洿锛�1锛氭墍鏈夋暟鎹潈闄愶紱2锛氳嚜瀹氫箟鏁版嵁鏉冮檺锛�3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺锛�4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶紱5锛氫粎鏈汉鏁版嵁鏉冮檺锛� - */ - private String dataScope; - - /** - * 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙 0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀猴級 - */ - private Boolean menuCheckStrictly; - - /** - * 閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀� 锛� - */ - private Boolean deptCheckStrictly; - - /** - * 瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - /** - * 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛� - */ - @TableLogic - private String delFlag; - - /** - * 澶囨敞 - */ - private String remark; - - public SysRole(Long roleId) { - this.roleId = roleId; - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysRoleDept.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysRoleDept.java deleted file mode 100644 index 4cf396c..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysRoleDept.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -/** - * 瑙掕壊鍜岄儴闂ㄥ叧鑱� sys_role_dept - * - * @author Lion Li - */ - -@Data -@TableName("sys_role_dept") -public class SysRoleDept { - - /** - * 瑙掕壊ID - */ - @TableId(type = IdType.INPUT) - private Long roleId; - - /** - * 閮ㄩ棬ID - */ - private Long deptId; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysRoleMenu.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysRoleMenu.java deleted file mode 100644 index 7f6bc58..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysRoleMenu.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -/** - * 瑙掕壊鍜岃彍鍗曞叧鑱� sys_role_menu - * - * @author Lion Li - */ - -@Data -@TableName("sys_role_menu") -public class SysRoleMenu { - - /** - * 瑙掕壊ID - */ - @TableId(type = IdType.INPUT) - private Long roleId; - - /** - * 鑿滃崟ID - */ - private Long menuId; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysTenant.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysTenant.java deleted file mode 100644 index a4dde1c..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysTenant.java +++ /dev/null @@ -1,103 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableLogic; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serial; -import java.util.Date; - -/** - * 绉熸埛瀵硅薄 sys_tenant - * - * @author Michelle.Chung - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("sys_tenant") -public class SysTenant extends BaseEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * id - */ - @TableId(value = "id") - private Long id; - - /** - * 绉熸埛缂栧彿 - */ - private String tenantId; - - /** - * 鑱旂郴浜� - */ - private String contactUserName; - - /** - * 鑱旂郴鐢佃瘽 - */ - private String contactPhone; - - /** - * 浼佷笟鍚嶇О - */ - private String companyName; - - /** - * 缁熶竴绀句細淇$敤浠g爜 - */ - private String licenseNumber; - - /** - * 鍦板潃 - */ - private String address; - - /** - * 鍩熷悕 - */ - private String domain; - - /** - * 浼佷笟绠�浠� - */ - private String intro; - - /** - * 澶囨敞 - */ - private String remark; - - /** - * 绉熸埛濂楅缂栧彿 - */ - private Long packageId; - - /** - * 杩囨湡鏃堕棿 - */ - private Date expireTime; - - /** - * 鐢ㄦ埛鏁伴噺锛�-1涓嶉檺鍒讹級 - */ - private Long accountCount; - - /** - * 绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - /** - * 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛� - */ - @TableLogic - private String delFlag; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysTenantPackage.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysTenantPackage.java deleted file mode 100644 index a1c7b1b..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysTenantPackage.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableLogic; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serial; - -/** - * 绉熸埛濂楅瀵硅薄 sys_tenant_package - * - * @author Michelle.Chung - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("sys_tenant_package") -public class SysTenantPackage extends BaseEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 绉熸埛濂楅id - */ - @TableId(value = "package_id") - private Long packageId; - /** - * 濂楅鍚嶇О - */ - private String packageName; - /** - * 鍏宠仈鑿滃崟id - */ - private String menuIds; - /** - * 澶囨敞 - */ - private String remark; - /** - * 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀猴紙 0锛氱埗瀛愪笉浜掔浉鍏宠仈鏄剧ず 1锛氱埗瀛愪簰鐩稿叧鑱旀樉绀猴級 - */ - private Boolean menuCheckStrictly; - /** - * 鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - /** - * 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛� - */ - @TableLogic - private String delFlag; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysUser.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysUser.java deleted file mode 100644 index bbe038e..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysUser.java +++ /dev/null @@ -1,123 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.*; -import com.xmzs.common.core.constant.UserConstants; -import com.xmzs.common.tenant.core.TenantEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; - -import java.util.Date; - -/** - * 鐢ㄦ埛瀵硅薄 sys_user - * - * @author Lion Li - */ - -@Data -@NoArgsConstructor -@EqualsAndHashCode(callSuper = true) -@TableName("sys_user") -public class SysUser extends TenantEntity { - - /** - * 鐢ㄦ埛ID - */ - @TableId(value = "user_id") - private Long userId; - - /** - * 閮ㄩ棬ID - */ - private Long deptId; - - /** - * 鐢ㄦ埛璐﹀彿 - */ - private String userName; - - /** - * 鐢ㄦ埛鏄电О - */ - private String nickName; - - /** - * 鐢ㄦ埛绫诲瀷锛坰ys_user绯荤粺鐢ㄦ埛锛� - */ - private String userType; - - /** - * 鐢ㄦ埛閭 - */ - private String email; - - /** - * 鎵嬫満鍙风爜 - */ - private String phonenumber; - - /** - * 鐢ㄦ埛鎬у埆 - */ - private String sex; - - /** - * 鐢ㄦ埛澶村儚 - */ - private String avatar; - - /** - * 瀵嗙爜 - */ - @TableField( - insertStrategy = FieldStrategy.NOT_EMPTY, - updateStrategy = FieldStrategy.NOT_EMPTY, - whereStrategy = FieldStrategy.NOT_EMPTY - ) - private String password; - - /** - * 甯愬彿鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - /** - * 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛� - */ - @TableLogic - private String delFlag; - - /** - * 鏈�鍚庣櫥褰旾P - */ - private String loginIp; - - /** - * 鏈�鍚庣櫥褰曟椂闂� - */ - private Date loginDate; - - /** - * 澶囨敞 - */ - private String remark; - - /** 鏅�氱敤鎴风殑鏍囪瘑,瀵瑰綋鍓嶅紑鍙戣�呭笎鍙峰敮涓�銆備竴涓猳penid瀵瑰簲涓�涓叕浼楀彿鎴栧皬绋嬪簭 */ - private String openId; - - /** 鐢ㄦ埛浣欓 */ - private Double userBalance; - - /** 鐢ㄦ埛浣欓 */ - private String userGrade; - - public SysUser(Long userId) { - this.userId = userId; - } - - public boolean isSuperAdmin() { - return UserConstants.SUPER_ADMIN_ID.equals(this.userId); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysUserOnline.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysUserOnline.java deleted file mode 100644 index 0ef4fd9..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysUserOnline.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.xmzs.system.domain; - -import lombok.Data; - -/** - * 褰撳墠鍦ㄧ嚎浼氳瘽 - * - * @author Lion Li - */ - -@Data -public class SysUserOnline { - - /** - * 浼氳瘽缂栧彿 - */ - private String tokenId; - - /** - * 閮ㄩ棬鍚嶇О - */ - private String deptName; - - /** - * 鐢ㄦ埛鍚嶇О - */ - private String userName; - - /** - * 鐧诲綍IP鍦板潃 - */ - private String ipaddr; - - /** - * 鐧诲綍鍦板潃 - */ - private String loginLocation; - - /** - * 娴忚鍣ㄧ被鍨� - */ - private String browser; - - /** - * 鎿嶄綔绯荤粺 - */ - private String os; - - /** - * 鐧诲綍鏃堕棿 - */ - private Long loginTime; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysUserPost.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysUserPost.java deleted file mode 100644 index ceca287..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysUserPost.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -/** - * 鐢ㄦ埛鍜屽矖浣嶅叧鑱� sys_user_post - * - * @author Lion Li - */ - -@Data -@TableName("sys_user_post") -public class SysUserPost { - - /** - * 鐢ㄦ埛ID - */ - @TableId(type = IdType.INPUT) - private Long userId; - - /** - * 宀椾綅ID - */ - private Long postId; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysUserRole.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysUserRole.java deleted file mode 100644 index 688c66c..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/SysUserRole.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -/** - * 鐢ㄦ埛鍜岃鑹插叧鑱� sys_user_role - * - * @author Lion Li - */ - -@Data -@TableName("sys_user_role") -public class SysUserRole { - - /** - * 鐢ㄦ埛ID - */ - @TableId(type = IdType.INPUT) - private Long userId; - - /** - * 瑙掕壊ID - */ - private Long roleId; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/VoiceRole.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/VoiceRole.java deleted file mode 100644 index ab7b1e9..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/VoiceRole.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.xmzs.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serial; - -/** - * 閰嶉煶瑙掕壊瀵硅薄 voice_role - * - * @author Lion Li - * @date 2024-03-19 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("voice_role") -public class VoiceRole extends BaseEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * id - */ - @TableId(value = "id") - private Long id; - - /** - * 瑙掕壊鍚嶇О - */ - private String name; - - /** - * 瑙掕壊鎻忚堪 - */ - private String description; - - /** - * 澶村儚 - */ - private String avatar; - - /** - * 瑙掕壊id - */ - private String voiceId; - - /** - * 闊抽鍦板潃 - */ - private String fileUrl; - - /** - * 闊抽棰勫鐞嗭紙瀹為獙鎬э級 - */ - private String preProcess; - - /** - * 澶囨敞 - */ - private String remark; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/ChatMessageBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/ChatMessageBo.java deleted file mode 100644 index 4d0cadd..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/ChatMessageBo.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.system.domain.ChatMessage; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 鑱婂ぉ娑堟伅涓氬姟瀵硅薄 chat_message - * - * @author Lion Li - * @date 2023-11-26 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = ChatMessage.class, reverseConvertGenerate = false) -public class ChatMessageBo extends BaseEntity { - - /** - * 涓婚敭 - */ - @NotNull(message = "涓婚敭涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long id; - - /** - * 鐢ㄦ埛ID - */ - @NotBlank(message = "鐢ㄦ埛ID", groups = { AddGroup.class, EditGroup.class }) - private Long UserId; - - /** - * 娑堟伅鍐呭 - */ - @NotBlank(message = "娑堟伅鍐呭涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String content; - - - /** - * 鎵i櫎璐圭敤 - */ - private Double deductCost; - - /** - * 绱 Tokens - */ - @NotNull(message = "绱 Tokens涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private Integer totalTokens; - - /** - * 妯″瀷鍚嶇О - */ - @NotBlank(message = "妯″瀷鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String modelName; - - /** - * 澶囨敞 - */ - @NotBlank(message = "澶囨敞涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String remark; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/PaymentOrdersBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/PaymentOrdersBo.java deleted file mode 100644 index 67b98a2..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/PaymentOrdersBo.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.system.domain.PaymentOrders; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.math.BigDecimal; - -/** - * 鏀粯璁㈠崟涓氬姟瀵硅薄 payment_orders - * - * @author Lion Li - * @date 2023-12-29 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = PaymentOrders.class, reverseConvertGenerate = false) -public class PaymentOrdersBo extends BaseEntity { - - /** - * 涓婚敭 - */ - @NotNull(message = "涓婚敭涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long id; - - /** - * 璁㈠崟缂栧彿 - */ - @NotBlank(message = "璁㈠崟缂栧彿涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String orderNo; - - /** - * 璁㈠崟鍚嶇О - */ - @NotBlank(message = "璁㈠崟鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String orderName; - - /** - * 閲戦 - */ - @NotNull(message = "閲戦涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private BigDecimal amount; - - /** - * 鏀粯鐘舵�� - */ - @NotBlank(message = "鏀粯鐘舵�佷笉鑳戒负绌�", groups = { AddGroup.class, EditGroup.class }) - private String paymentStatus; - - /** - * 鏀粯鏂瑰紡 - */ - @NotBlank(message = "鏀粯鏂瑰紡涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String paymentMethod; - - /** - * 鐢ㄦ埛ID - */ - @NotNull(message = "鐢ㄦ埛ID涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private Long userId; - - /** - * 澶囨敞 - */ - @NotBlank(message = "澶囨敞涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String remark; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysConfigBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysConfigBo.java deleted file mode 100644 index fc9e4f0..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysConfigBo.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.system.domain.SysConfig; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 鍙傛暟閰嶇疆涓氬姟瀵硅薄 sys_config - * - * @author Michelle.Chung - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = SysConfig.class, reverseConvertGenerate = false) -public class SysConfigBo extends BaseEntity { - - /** - * 鍙傛暟涓婚敭 - */ - @NotNull(message = "鍙傛暟涓婚敭涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long configId; - - /** - * 鍙傛暟鍚嶇О - */ - @NotBlank(message = "鍙傛暟鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - @Size(min = 0, max = 100, message = "鍙傛暟鍚嶇О涓嶈兘瓒呰繃{max}涓瓧绗�") - private String configName; - - /** - * 鍙傛暟閿悕 - */ - @NotBlank(message = "鍙傛暟閿悕涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - @Size(min = 0, max = 100, message = "鍙傛暟閿悕闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String configKey; - - /** - * 鍙傛暟閿�� - */ - @NotBlank(message = "鍙傛暟閿�间笉鑳戒负绌�", groups = { AddGroup.class, EditGroup.class }) - @Size(min = 0, max = 500, message = "鍙傛暟閿�奸暱搴︿笉鑳借秴杩噞max}涓瓧绗�") - private String configValue; - - /** - * 绯荤粺鍐呯疆锛圷鏄� N鍚︼級 - */ - private String configType; - - /** - * 澶囨敞 - */ - private String remark; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysDeptBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysDeptBo.java deleted file mode 100644 index df6a1aa..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysDeptBo.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.system.domain.SysDept; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.Email; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 閮ㄩ棬涓氬姟瀵硅薄 sys_dept - * - * @author Michelle.Chung - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = SysDept.class, reverseConvertGenerate = false) -public class SysDeptBo extends BaseEntity { - - /** - * 閮ㄩ棬id - */ - @NotNull(message = "閮ㄩ棬id涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long deptId; - - /** - * 鐖堕儴闂↖D - */ - private Long parentId; - - /** - * 閮ㄩ棬鍚嶇О - */ - @NotBlank(message = "閮ㄩ棬鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - @Size(min = 0, max = 30, message = "閮ㄩ棬鍚嶇О闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String deptName; - - /** - * 鏄剧ず椤哄簭 - */ - @NotNull(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖") - private Integer orderNum; - - /** - * 璐熻矗浜� - */ - private String leader; - - /** - * 鑱旂郴鐢佃瘽 - */ - @Size(min = 0, max = 11, message = "鑱旂郴鐢佃瘽闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String phone; - - /** - * 閭 - */ - @Email(message = "閭鏍煎紡涓嶆纭�") - @Size(min = 0, max = 50, message = "閭闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String email; - - /** - * 閮ㄩ棬鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysDictDataBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysDictDataBo.java deleted file mode 100644 index 2174234..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysDictDataBo.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.system.domain.SysDictData; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 瀛楀吀鏁版嵁涓氬姟瀵硅薄 sys_dict_data - * - * @author Michelle.Chung - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = SysDictData.class, reverseConvertGenerate = false) -public class SysDictDataBo extends BaseEntity { - - /** - * 瀛楀吀缂栫爜 - */ - @NotNull(message = "瀛楀吀缂栫爜涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long dictCode; - - /** - * 瀛楀吀鎺掑簭 - */ - private Integer dictSort; - - /** - * 瀛楀吀鏍囩 - */ - @NotBlank(message = "瀛楀吀鏍囩涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - @Size(min = 0, max = 100, message = "瀛楀吀鏍囩闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String dictLabel; - - /** - * 瀛楀吀閿�� - */ - @NotBlank(message = "瀛楀吀閿�间笉鑳戒负绌�", groups = { AddGroup.class, EditGroup.class }) - @Size(min = 0, max = 100, message = "瀛楀吀閿�奸暱搴︿笉鑳借秴杩噞max}涓瓧绗�") - private String dictValue; - - /** - * 瀛楀吀绫诲瀷 - */ - @NotBlank(message = "瀛楀吀绫诲瀷涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - @Size(min = 0, max = 100, message = "瀛楀吀绫诲瀷闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String dictType; - - /** - * 鏍峰紡灞炴�э紙鍏朵粬鏍峰紡鎵╁睍锛� - */ - @Size(min = 0, max = 100, message = "鏍峰紡灞炴�ч暱搴︿笉鑳借秴杩噞max}涓瓧绗�") - private String cssClass; - - /** - * 琛ㄦ牸鍥炴樉鏍峰紡 - */ - private String listClass; - - /** - * 鏄惁榛樿锛圷鏄� N鍚︼級 - */ - private String isDefault; - - /** - * 鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - /** - * 鍒涘缓閮ㄩ棬 - */ - private Long createDept; - - /** - * 澶囨敞 - */ - private String remark; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysDictTypeBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysDictTypeBo.java deleted file mode 100644 index 9e0bcc1..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysDictTypeBo.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.system.domain.SysDictType; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Pattern; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 瀛楀吀绫诲瀷涓氬姟瀵硅薄 sys_dict_type - * - * @author Michelle.Chung - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = SysDictType.class, reverseConvertGenerate = false) -public class SysDictTypeBo extends BaseEntity { - - /** - * 瀛楀吀涓婚敭 - */ - @NotNull(message = "瀛楀吀涓婚敭涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long dictId; - - /** - * 瀛楀吀鍚嶇О - */ - @NotBlank(message = "瀛楀吀鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - @Size(min = 0, max = 100, message = "瀛楀吀绫诲瀷鍚嶇О闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String dictName; - - /** - * 瀛楀吀绫诲瀷 - */ - @NotBlank(message = "瀛楀吀绫诲瀷涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - @Size(min = 0, max = 100, message = "瀛楀吀绫诲瀷绫诲瀷闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - @Pattern(regexp = "^[a-z][a-z0-9_]*$", message = "瀛楀吀绫诲瀷蹇呴』浠ュ瓧姣嶅紑澶达紝涓斿彧鑳戒负锛堝皬鍐欏瓧姣嶏紝鏁板瓧锛屼笅婊戠嚎锛�") - private String dictType; - - /** - * 鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - /** - * 澶囨敞 - */ - private String remark; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysLogininforBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysLogininforBo.java deleted file mode 100644 index 227c22e..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysLogininforBo.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.system.domain.SysLogininfor; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * 绯荤粺璁块棶璁板綍涓氬姟瀵硅薄 sys_logininfor - * - * @author Michelle.Chung - */ - -@Data -@AutoMapper(target = SysLogininfor.class, reverseConvertGenerate = false) -public class SysLogininforBo { - - /** - * 璁块棶ID - */ - private Long infoId; - - /** - * 绉熸埛缂栧彿 - */ - private String tenantId; - - /** - * 鐢ㄦ埛璐﹀彿 - */ - private String userName; - - /** - * 鐧诲綍IP鍦板潃 - */ - private String ipaddr; - - /** - * 鐧诲綍鍦扮偣 - */ - private String loginLocation; - - /** - * 娴忚鍣ㄧ被鍨� - */ - private String browser; - - /** - * 鎿嶄綔绯荤粺 - */ - private String os; - - /** - * 鐧诲綍鐘舵�侊紙0鎴愬姛 1澶辫触锛� - */ - private String status; - - /** - * 鎻愮ず娑堟伅 - */ - private String msg; - - /** - * 璁块棶鏃堕棿 - */ - private Date loginTime; - - /** - * 璇锋眰鍙傛暟 - */ - private Map<String, Object> params = new HashMap<>(); - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysMenuBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysMenuBo.java deleted file mode 100644 index 81c19c8..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysMenuBo.java +++ /dev/null @@ -1,111 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.system.domain.SysMenu; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 鑿滃崟鏉冮檺涓氬姟瀵硅薄 sys_menu - * - * @author Michelle.Chung - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = SysMenu.class, reverseConvertGenerate = false) -public class SysMenuBo extends BaseEntity { - - /** - * 鑿滃崟ID - */ - @NotNull(message = "鑿滃崟ID涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long menuId; - - /** - * 鐖惰彍鍗旾D - */ - private Long parentId; - - /** - * 鑿滃崟鍚嶇О - */ - @NotBlank(message = "鑿滃崟鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - @Size(min = 0, max = 50, message = "鑿滃崟鍚嶇О闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String menuName; - - /** - * 鏄剧ず椤哄簭 - */ - @NotNull(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private Integer orderNum; - - /** - * 璺敱鍦板潃 - */ - @Size(min = 0, max = 200, message = "璺敱鍦板潃涓嶈兘瓒呰繃{max}涓瓧绗�") - private String path; - - /** - * 缁勪欢璺緞 - */ - @Size(min = 0, max = 200, message = "缁勪欢璺緞涓嶈兘瓒呰繃{max}涓瓧绗�") - private String component; - - /** - * 璺敱鍙傛暟 - */ - private String queryParam; - - /** - * 鏄惁涓哄閾撅紙0鏄� 1鍚︼級 - */ - private String isFrame; - - /** - * 鏄惁缂撳瓨锛�0缂撳瓨 1涓嶇紦瀛橈級 - */ - private String isCache; - - /** - * 鑿滃崟绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛� - */ - @NotBlank(message = "鑿滃崟绫诲瀷涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String menuType; - - /** - * 鏄剧ず鐘舵�侊紙0鏄剧ず 1闅愯棌锛� - */ - private String visible; - - /** - * 鑿滃崟鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - /** - * 鏉冮檺鏍囪瘑 - */ - @JsonInclude(JsonInclude.Include.NON_NULL) - @Size(min = 0, max = 100, message = "鏉冮檺鏍囪瘑闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String perms; - - /** - * 鑿滃崟鍥炬爣 - */ - private String icon; - - /** - * 澶囨敞 - */ - private String remark; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysModelBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysModelBo.java deleted file mode 100644 index a2b822e..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysModelBo.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.system.domain.SysModel; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 绯荤粺妯″瀷涓氬姟瀵硅薄 sys_model - * - * @author Lion Li - * @date 2024-04-04 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = SysModel.class, reverseConvertGenerate = false) -public class SysModelBo extends BaseEntity { - - /** - * 涓婚敭 - */ - @NotNull(message = "涓婚敭涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long id; - - /** - * 妯″瀷鍚嶇О - */ - @NotBlank(message = "妯″瀷鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String modelName; - - - /** - * 妯″瀷鎻忚堪 - */ - @NotBlank(message = "妯″瀷鎻忚堪涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String modelDescribe; - - /** - * 妯″瀷浠锋牸 - */ - @NotNull(message = "妯″瀷浠锋牸涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private double modelPrice; - - /** - * 璁¤垂绫诲瀷 (1 token鎵h垂; 2 娆℃暟鎵h垂 ) - */ - @NotBlank(message = "璁¤垂绫诲瀷涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String modelType; - - /** - * 妯″瀷鐘舵�� (0 鏄剧ず; 1 闅愯棌 ) - */ - private String modelShow; - - - /** - * 绯荤粺鎻愮ず璇� - */ - private String systemPrompt; - - /** - * 澶囨敞 - */ - @NotBlank(message = "澶囨敞涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String remark; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysNoticeBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysNoticeBo.java deleted file mode 100644 index 7c3591e..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysNoticeBo.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.core.xss.Xss; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.system.domain.SysNotice; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 閫氱煡鍏憡涓氬姟瀵硅薄 sys_notice - * - * @author Michelle.Chung - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = SysNotice.class, reverseConvertGenerate = false) -public class SysNoticeBo extends BaseEntity { - - /** - * 鍏憡ID - */ - @NotNull(message = "鍏憡ID涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long noticeId; - - /** - * 鍏憡鏍囬 - */ - @Xss(message = "鍏憡鏍囬涓嶈兘鍖呭惈鑴氭湰瀛楃") - @NotBlank(message = "鍏憡鏍囬涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - @Size(min = 0, max = 50, message = "鍏憡鏍囬涓嶈兘瓒呰繃{max}涓瓧绗�") - private String noticeTitle; - - /** - * 鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛� - */ - private String noticeType; - - /** - * 鍏憡鍐呭 - */ - private String noticeContent; - - /** - * 鍏憡鐘舵�侊紙0姝e父 1鍏抽棴锛� - */ - private String status; - - /** - * 澶囨敞 - */ - private String remark; - - /** - * 鍒涘缓浜哄悕绉� - */ - private String createByName; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysOperLogBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysOperLogBo.java deleted file mode 100644 index a4034a9..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysOperLogBo.java +++ /dev/null @@ -1,127 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.log.event.OperLogEvent; -import com.xmzs.system.domain.SysOperLog; -import io.github.linpeilie.annotations.AutoMapper; -import io.github.linpeilie.annotations.AutoMappers; -import lombok.Data; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * 鎿嶄綔鏃ュ織璁板綍涓氬姟瀵硅薄 sys_oper_log - * - * @author Michelle.Chung - * @date 2023-02-07 - */ - -@Data -@AutoMappers({ - @AutoMapper(target = SysOperLog.class, reverseConvertGenerate = false), - @AutoMapper(target = OperLogEvent.class) -}) -public class SysOperLogBo { - - /** - * 鏃ュ織涓婚敭 - */ - private Long operId; - - /** - * 绉熸埛缂栧彿 - */ - private String tenantId; - - /** - * 妯″潡鏍囬 - */ - private String title; - - /** - * 涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛� - */ - private Integer businessType; - - /** - * 涓氬姟绫诲瀷鏁扮粍 - */ - private Integer[] businessTypes; - - /** - * 鏂规硶鍚嶇О - */ - private String method; - - /** - * 璇锋眰鏂瑰紡 - */ - private String requestMethod; - - /** - * 鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級 - */ - private Integer operatorType; - - /** - * 鎿嶄綔浜哄憳 - */ - private String operName; - - /** - * 閮ㄩ棬鍚嶇О - */ - private String deptName; - - /** - * 璇锋眰URL - */ - private String operUrl; - - /** - * 涓绘満鍦板潃 - */ - private String operIp; - - /** - * 鎿嶄綔鍦扮偣 - */ - private String operLocation; - - /** - * 璇锋眰鍙傛暟 - */ - private String operParam; - - /** - * 杩斿洖鍙傛暟 - */ - private String jsonResult; - - /** - * 鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛� - */ - private Integer status; - - /** - * 閿欒娑堟伅 - */ - private String errorMsg; - - /** - * 鎿嶄綔鏃堕棿 - */ - private Date operTime; - - /** - * 娑堣�楁椂闂� - */ - private Long costTime; - - /** - * 璇锋眰鍙傛暟 - */ - private Map<String, Object> params = new HashMap<>(); - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysOssBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysOssBo.java deleted file mode 100644 index 40ee5c7..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysOssBo.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.system.domain.SysOss; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * OSS瀵硅薄瀛樺偍鍒嗛〉鏌ヨ瀵硅薄 sys_oss - * - * @author Lion Li - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = SysOss.class, reverseConvertGenerate = false) -public class SysOssBo extends BaseEntity { - - /** - * ossId - */ - private Long ossId; - - /** - * 鏂囦欢鍚� - */ - private String fileName; - - /** - * 鍘熷悕 - */ - private String originalName; - - /** - * 鏂囦欢鍚庣紑鍚� - */ - private String fileSuffix; - - /** - * URL鍦板潃 - */ - private String url; - - /** - * 鏈嶅姟鍟� - */ - private String service; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysOssConfigBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysOssConfigBo.java deleted file mode 100644 index a741761..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysOssConfigBo.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.system.domain.SysOssConfig; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 瀵硅薄瀛樺偍閰嶇疆涓氬姟瀵硅薄 sys_oss_config - * - * @author Lion Li - * @author 瀛よ垷鐑熼洦 - * @date 2021-08-13 - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = SysOssConfig.class, reverseConvertGenerate = false) -public class SysOssConfigBo extends BaseEntity { - - /** - * 涓诲缓 - */ - @NotNull(message = "涓诲缓涓嶈兘涓虹┖", groups = {EditGroup.class}) - private Long ossConfigId; - - /** - * 閰嶇疆key - */ - @NotBlank(message = "閰嶇疆key涓嶈兘涓虹┖", groups = {AddGroup.class, EditGroup.class}) - @Size(min = 2, max = 100, message = "configKey闀垮害蹇呴』浠嬩簬{min}鍜寋max} 涔嬮棿") - private String configKey; - - /** - * accessKey - */ - @NotBlank(message = "accessKey涓嶈兘涓虹┖", groups = {AddGroup.class, EditGroup.class}) - @Size(min = 2, max = 100, message = "accessKey闀垮害蹇呴』浠嬩簬{min}鍜寋max} 涔嬮棿") - private String accessKey; - - /** - * 绉橀挜 - */ - @NotBlank(message = "secretKey涓嶈兘涓虹┖", groups = {AddGroup.class, EditGroup.class}) - @Size(min = 2, max = 100, message = "secretKey闀垮害蹇呴』浠嬩簬{min}鍜寋max} 涔嬮棿") - private String secretKey; - - /** - * 妗跺悕绉� - */ - @NotBlank(message = "妗跺悕绉颁笉鑳戒负绌�", groups = {AddGroup.class, EditGroup.class}) - @Size(min = 2, max = 100, message = "bucketName闀垮害蹇呴』浠嬩簬{min}鍜寋max}涔嬮棿") - private String bucketName; - - /** - * 鍓嶇紑 - */ - private String prefix; - - /** - * 璁块棶绔欑偣 - */ - @NotBlank(message = "璁块棶绔欑偣涓嶈兘涓虹┖", groups = {AddGroup.class, EditGroup.class}) - @Size(min = 2, max = 100, message = "endpoint闀垮害蹇呴』浠嬩簬{min}鍜寋max}涔嬮棿") - private String endpoint; - - /** - * 鑷畾涔夊煙鍚� - */ - private String domain; - - /** - * 鏄惁https锛圷=鏄�,N=鍚︼級 - */ - private String isHttps; - - /** - * 鏄惁榛樿锛�0=鏄�,1=鍚︼級 - */ - private String status; - - /** - * 鍩� - */ - private String region; - - /** - * 鎵╁睍瀛楁 - */ - private String ext1; - - /** - * 澶囨敞 - */ - private String remark; - - /** - * 妗舵潈闄愮被鍨�(0private 1public 2custom) - */ - @NotBlank(message = "妗舵潈闄愮被鍨嬩笉鑳戒负绌�", groups = {AddGroup.class, EditGroup.class}) - private String accessPolicy; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysPostBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysPostBo.java deleted file mode 100644 index 5f8ed62..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysPostBo.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.system.domain.SysPost; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 宀椾綅淇℃伅涓氬姟瀵硅薄 sys_post - * - * @author Michelle.Chung - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = SysPost.class, reverseConvertGenerate = false) -public class SysPostBo extends BaseEntity { - - /** - * 宀椾綅ID - */ - @NotNull(message = "宀椾綅ID涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long postId; - - /** - * 宀椾綅缂栫爜 - */ - @NotBlank(message = "宀椾綅缂栫爜涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - @Size(min = 0, max = 64, message = "宀椾綅缂栫爜闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String postCode; - - /** - * 宀椾綅鍚嶇О - */ - @NotBlank(message = "宀椾綅鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - @Size(min = 0, max = 50, message = "宀椾綅鍚嶇О闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String postName; - - /** - * 鏄剧ず椤哄簭 - */ - @NotNull(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private Integer postSort; - - /** - * 鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - /** - * 澶囨敞 - */ - private String remark; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysRoleBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysRoleBo.java deleted file mode 100644 index b6dfa3f..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysRoleBo.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.core.constant.UserConstants; -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.system.domain.SysRole; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; - -/** - * 瑙掕壊淇℃伅涓氬姟瀵硅薄 sys_role - * - * @author Michelle.Chung - */ - -@Data -@NoArgsConstructor -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = SysRole.class, reverseConvertGenerate = false) -public class SysRoleBo extends BaseEntity { - - /** - * 瑙掕壊ID - */ - @NotNull(message = "瑙掕壊ID涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long roleId; - - /** - * 瑙掕壊鍚嶇О - */ - @NotBlank(message = "瑙掕壊鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - @Size(min = 0, max = 30, message = "瑙掕壊鍚嶇О闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String roleName; - - /** - * 瑙掕壊鏉冮檺瀛楃涓� - */ - @NotBlank(message = "瑙掕壊鏉冮檺瀛楃涓蹭笉鑳戒负绌�", groups = { AddGroup.class, EditGroup.class }) - @Size(min = 0, max = 100, message = "鏉冮檺瀛楃闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String roleKey; - - /** - * 鏄剧ず椤哄簭 - */ - @NotNull(message = "鏄剧ず椤哄簭涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private Integer roleSort; - - /** - * 鏁版嵁鑼冨洿锛�1锛氬叏閮ㄦ暟鎹潈闄� 2锛氳嚜瀹氭暟鎹潈闄� 3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺 4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶級 - */ - private String dataScope; - - /** - * 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀� - */ - private Boolean menuCheckStrictly; - - /** - * 閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀� - */ - private Boolean deptCheckStrictly; - - /** - * 瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - /** - * 澶囨敞 - */ - private String remark; - - /** - * 鑿滃崟缁� - */ - private Long[] menuIds; - - /** - * 閮ㄩ棬缁勶紙鏁版嵁鏉冮檺锛� - */ - private Long[] deptIds; - - public SysRoleBo(Long roleId) { - this.roleId = roleId; - } - - public boolean isSuperAdmin() { - return UserConstants.SUPER_ADMIN_ID.equals(this.roleId); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysTenantBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysTenantBo.java deleted file mode 100644 index 412778c..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysTenantBo.java +++ /dev/null @@ -1,114 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.system.domain.SysTenant; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.Date; - -/** - * 绉熸埛涓氬姟瀵硅薄 sys_tenant - * - * @author Michelle.Chung - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = SysTenant.class, reverseConvertGenerate = false) -public class SysTenantBo extends BaseEntity { - - /** - * id - */ - @NotNull(message = "id涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long id; - - /** - * 绉熸埛缂栧彿 - */ - private String tenantId; - - /** - * 鑱旂郴浜� - */ - @NotBlank(message = "鑱旂郴浜轰笉鑳戒负绌�", groups = { AddGroup.class, EditGroup.class }) - private String contactUserName; - - /** - * 鑱旂郴鐢佃瘽 - */ - @NotBlank(message = "鑱旂郴鐢佃瘽涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String contactPhone; - - /** - * 浼佷笟鍚嶇О - */ - @NotBlank(message = "浼佷笟鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String companyName; - - /** - * 鐢ㄦ埛鍚嶏紙鍒涘缓绯荤粺鐢ㄦ埛锛� - */ - @NotBlank(message = "鐢ㄦ埛鍚嶄笉鑳戒负绌�", groups = { AddGroup.class }) - private String username; - - /** - * 瀵嗙爜锛堝垱寤虹郴缁熺敤鎴凤級 - */ - @NotBlank(message = "瀵嗙爜涓嶈兘涓虹┖", groups = { AddGroup.class }) - private String password; - - /** - * 缁熶竴绀句細淇$敤浠g爜 - */ - private String licenseNumber; - - /** - * 鍦板潃 - */ - private String address; - - /** - * 鍩熷悕 - */ - private String domain; - - /** - * 浼佷笟绠�浠� - */ - private String intro; - - /** - * 澶囨敞 - */ - private String remark; - - /** - * 绉熸埛濂楅缂栧彿 - */ - @NotNull(message = "绉熸埛濂楅涓嶈兘涓虹┖", groups = { AddGroup.class }) - private Long packageId; - - /** - * 杩囨湡鏃堕棿 - */ - private Date expireTime; - - /** - * 鐢ㄦ埛鏁伴噺锛�-1涓嶉檺鍒讹級 - */ - private Long accountCount; - - /** - * 绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysTenantPackageBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysTenantPackageBo.java deleted file mode 100644 index 5bb2ff7..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysTenantPackageBo.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.system.domain.SysTenantPackage; -import io.github.linpeilie.annotations.AutoMapper; -import io.github.linpeilie.annotations.AutoMapping; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 绉熸埛濂楅涓氬姟瀵硅薄 sys_tenant_package - * - * @author Michelle.Chung - */ - -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = SysTenantPackage.class, reverseConvertGenerate = false) -public class SysTenantPackageBo extends BaseEntity { - - /** - * 绉熸埛濂楅id - */ - @NotNull(message = "绉熸埛濂楅id涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long packageId; - - /** - * 濂楅鍚嶇О - */ - @NotBlank(message = "濂楅鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String packageName; - - /** - * 鍏宠仈鑿滃崟id - */ - @AutoMapping(target = "menuIds", expression = "java(com.xmzs.common.core.utils.StringUtils.join(source.getMenuIds(), \",\"))") - private Long[] menuIds; - - /** - * 澶囨敞 - */ - private String remark; - - /** - * 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀� - */ - private Boolean menuCheckStrictly; - - /** - * 鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysUserBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysUserBo.java deleted file mode 100644 index 20aa9d2..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysUserBo.java +++ /dev/null @@ -1,133 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.core.constant.UserConstants; -import com.xmzs.common.core.xss.Xss; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.common.sensitive.annotation.Sensitive; -import com.xmzs.common.sensitive.core.SensitiveStrategy; -import com.xmzs.system.domain.SysUser; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.Email; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; - -import java.math.BigDecimal; - -/** - * 鐢ㄦ埛淇℃伅涓氬姟瀵硅薄 sys_user - * - * @author Michelle.Chung - */ - -@Data -@NoArgsConstructor -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = SysUser.class, reverseConvertGenerate = false) -public class SysUserBo extends BaseEntity { - - /** - * 鐢ㄦ埛ID - */ - private Long userId; - - /** - * 閮ㄩ棬ID - */ - private Long deptId; - - /** - * 鐢ㄦ埛璐﹀彿 - */ - @Xss(message = "鐢ㄦ埛璐﹀彿涓嶈兘鍖呭惈鑴氭湰瀛楃") - @NotBlank(message = "鐢ㄦ埛璐﹀彿涓嶈兘涓虹┖") - @Size(min = 0, max = 30, message = "鐢ㄦ埛璐﹀彿闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String userName; - - /** - * 鐢ㄦ埛鏄电О - */ - @Xss(message = "鐢ㄦ埛鏄电О涓嶈兘鍖呭惈鑴氭湰瀛楃") - @Size(min = 0, max = 30, message = "鐢ㄦ埛鏄电О闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String nickName; - - /** - * 鐢ㄦ埛绫诲瀷锛坰ys_user绯荤粺鐢ㄦ埛锛� - */ - private String userType; - - /** - * 鐢ㄦ埛閭 - */ - @Sensitive(strategy = SensitiveStrategy.EMAIL) - @Email(message = "閭鏍煎紡涓嶆纭�") - @Size(min = 0, max = 50, message = "閭闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String email; - - /** - * 鎵嬫満鍙风爜 - */ - @Sensitive(strategy = SensitiveStrategy.PHONE) - private String phonenumber; - - /** - * 鐢ㄦ埛鎬у埆锛�0鐢� 1濂� 2鏈煡锛� - */ - private String sex; - - /** - * 瀵嗙爜 - */ - private String password; - - /** - * 甯愬彿鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - /** - * 寰俊澶村儚 - */ - private String avatar; - - /** - * 澶囨敞 - */ - private String remark; - - /** - * 瑙掕壊缁� - */ - @Size(min = 1, message = "鐢ㄦ埛瑙掕壊涓嶈兘涓虹┖") - private Long[] roleIds; - - /** - * 宀椾綅缁� - */ - private Long[] postIds; - - /** - * 鏁版嵁鏉冮檺 褰撳墠瑙掕壊ID - */ - private Long roleId; - - /** 鏅�氱敤鎴风殑鏍囪瘑,瀵瑰綋鍓嶅紑鍙戣�呭笎鍙峰敮涓�銆備竴涓猳penid瀵瑰簲涓�涓叕浼楀彿鎴栧皬绋嬪簭 */ - private String openId; - - /** 鐢ㄦ埛绛夌骇 */ - private String userGrade; - - /** 鐢ㄦ埛浣欓 */ - private BigDecimal userBalance; - - public SysUserBo(Long userId) { - this.userId = userId; - } - - public boolean isSuperAdmin() { - return UserConstants.SUPER_ADMIN_ID.equals(this.userId); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysUserProfileBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysUserProfileBo.java deleted file mode 100644 index d8999e5..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/SysUserProfileBo.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.core.xss.Xss; -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.common.sensitive.annotation.Sensitive; -import com.xmzs.common.sensitive.core.SensitiveStrategy; -import jakarta.validation.constraints.Email; -import jakarta.validation.constraints.Size; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; - -/** - * 涓汉淇℃伅涓氬姟澶勭悊 - * - * @author Michelle.Chung - */ - -@Data -@NoArgsConstructor -@EqualsAndHashCode(callSuper = true) -public class SysUserProfileBo extends BaseEntity { - - /** - * 鐢ㄦ埛ID - */ - private Long userId; - - /** - * 鐢ㄦ埛鏄电О - */ - @Xss(message = "鐢ㄦ埛鏄电О涓嶈兘鍖呭惈鑴氭湰瀛楃") - @Size(min = 0, max = 30, message = "鐢ㄦ埛鏄电О闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String nickName; - - /** - * 鐢ㄦ埛閭 - */ - @Sensitive(strategy = SensitiveStrategy.EMAIL) - @Email(message = "閭鏍煎紡涓嶆纭�") - @Size(min = 0, max = 50, message = "閭闀垮害涓嶈兘瓒呰繃{max}涓瓧绗�") - private String email; - - /** - * 鎵嬫満鍙风爜 - */ - @Sensitive(strategy = SensitiveStrategy.PHONE) - private String phonenumber; - - /** - * 鐢ㄦ埛鎬у埆锛�0鐢� 1濂� 2鏈煡锛� - */ - private String sex; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/VoiceRoleBo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/VoiceRoleBo.java deleted file mode 100644 index 98c329f..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/bo/VoiceRoleBo.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.xmzs.system.domain.bo; - -import com.xmzs.common.mybatis.core.domain.BaseEntity; -import com.xmzs.system.domain.VoiceRole; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 閰嶉煶瑙掕壊涓氬姟瀵硅薄 voice_role - * - * @author Lion Li - * @date 2024-03-19 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = VoiceRole.class, reverseConvertGenerate = false) -public class VoiceRoleBo extends BaseEntity { - - /** - * id - */ - @NotNull(message = "id涓嶈兘涓虹┖") - private Long id; - - /** - * 瑙掕壊鍚嶇О - */ - @NotBlank(message = "瑙掕壊鍚嶇О涓嶈兘涓虹┖") - private String name; - - /** - * 瑙掕壊鎻忚堪 - */ - @NotBlank(message = "瑙掕壊鎻忚堪涓嶈兘涓虹┖") - private String description; - - /** - * 澶村儚 - */ - @NotBlank(message = "澶村儚涓嶈兘涓虹┖") - private String avatar; - - /** - * 瑙掕壊id - */ - @NotBlank(message = "瑙掕壊id涓嶈兘涓虹┖") - private String voiceId; - - /** - * 闊抽鍦板潃 - */ - @NotBlank(message = "闊抽鍦板潃涓嶈兘涓虹┖") - private String fileUrl; - - /** - * 闊抽棰勫鐞嗭紙瀹為獙鎬э級 - */ - @NotBlank(message = "闊抽棰勫鐞嗭紙瀹為獙鎬э級涓嶈兘涓虹┖") - private String preProcess; - - /** - * 澶囨敞 - */ - @NotBlank(message = "澶囨敞涓嶈兘涓虹┖") - private String remark; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/request/EmailRequest.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/request/EmailRequest.java deleted file mode 100644 index f26578a..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/request/EmailRequest.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.web.domain.request; - -import jakarta.validation.constraints.NotNull; -import lombok.Data; - - -/** - * 鐢ㄦ埛鐧诲綍 - */ -@Data -public class EmailRequest { - /** - * 璐﹀彿 - */ - @NotNull(message = "璐﹀彿涓嶈兘涓虹┖") - private String username; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/request/OrderRequest.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/request/OrderRequest.java deleted file mode 100644 index 7a5a1dd..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/request/OrderRequest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xmzs.system.domain.request; - -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -@Data -public class OrderRequest { - - /** - * 鍟嗗搧閲戦 - */ - @NotNull(message = "鍟嗗搧閲戦") - private String money; - - /** - * 鍟嗗搧鍚嶇О - */ - @NotNull(message = "鍟嗗搧鍚嶇О") - private String name; - - /** - * 璁㈠崟缂栧彿 - */ - @NotNull(message = "璁㈠崟缂栧彿") - private String orderNo; -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/request/UserRequest.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/request/UserRequest.java deleted file mode 100644 index 82c5cd2..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/request/UserRequest.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.system.domain.request; - -import jakarta.validation.constraints.NotNull; -import lombok.Data; - - -/** - * 缂栬緫鐢ㄦ埛 - */ -@Data -public class UserRequest { - /** - * 鐢ㄦ埛鍚嶇О - */ - @NotNull(message = "鐢ㄦ埛鍚嶇О涓嶈兘涓虹┖") - private String nickName; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/AvatarVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/AvatarVo.java deleted file mode 100644 index a6091e8..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/AvatarVo.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.xmzs.system.domain.vo; - -import lombok.Data; - -/** - * 鐢ㄦ埛澶村儚淇℃伅 - * - * @author Michelle.Chung - */ -@Data -public class AvatarVo { - - /** - * 澶村儚鍦板潃 - */ - private String imgUrl; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/CacheListInfoVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/CacheListInfoVo.java deleted file mode 100644 index 21e5457..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/CacheListInfoVo.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.xmzs.system.domain.vo; - -import lombok.Data; - -import java.util.List; -import java.util.Map; -import java.util.Properties; - -/** - * 缂撳瓨鐩戞帶鍒楄〃淇℃伅 - * - * @author Michelle.Chung - */ -@Data -public class CacheListInfoVo { - - private Properties info; - - private Long dbSize; - - private List<Map<String, String>> commandStats; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/CaptchaVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/CaptchaVo.java deleted file mode 100644 index 24971a3..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/CaptchaVo.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xmzs.web.domain.vo; - -import lombok.Data; - -/** - * 楠岃瘉鐮佷俊鎭� - * - * @author Michelle.Chung - */ -@Data -public class CaptchaVo { - - /** - * 鏄惁寮�鍚獙璇佺爜 - */ - private Boolean captchaEnabled = true; - - private String uuid; - - /** - * 楠岃瘉鐮佸浘鐗� - */ - private String img; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/ChatMessageVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/ChatMessageVo.java deleted file mode 100644 index 5b984f4..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/ChatMessageVo.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import com.xmzs.system.domain.ChatMessage; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - - -/** - * 鑱婂ぉ娑堟伅瑙嗗浘瀵硅薄 chat_message - * - * @author Lion Li - * @date 2023-11-26 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = ChatMessage.class) -public class ChatMessageVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 涓婚敭 - */ - @NotNull(message = "涓婚敭涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long id; - - /** - * 鐢ㄦ埛ID - */ - @NotBlank(message = "鐢ㄦ埛ID", groups = { AddGroup.class, EditGroup.class }) - private Long UserId; - - /** - * 娑堟伅鍐呭 - */ - @NotBlank(message = "娑堟伅鍐呭涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String content; - - - /** - * 鎵i櫎璐圭敤 - */ - private Double deductCost; - - /** - * 绱 Tokens - */ - @NotNull(message = "绱 Tokens涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private Integer totalTokens; - - /** - * 妯″瀷鍚嶇О - */ - @NotBlank(message = "妯″瀷鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String modelName; - - /** - * 澶囨敞 - */ - @NotBlank(message = "澶囨敞涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String remark; - - /** - * 鍒涘缓鏃堕棿 - */ - private Date createTime; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/ChatTokenVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/ChatTokenVo.java deleted file mode 100644 index 3c4f3f1..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/ChatTokenVo.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.xmzs.common.core.validate.AddGroup; -import com.xmzs.common.core.validate.EditGroup; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; - -import java.io.Serializable; - -/** - * 鐢ㄦ埛token chat_token - * - * @author Lion Li - * @date 2023-11-26 - */ -@Data -public class ChatTokenVo implements Serializable { - - /** - * 涓婚敭 - */ - @NotNull(message = "涓婚敭涓嶈兘涓虹┖", groups = { EditGroup.class }) - private Long id; - - /** - * 鐢ㄦ埛ID - */ - @NotBlank(message = "鐢ㄦ埛ID", groups = { AddGroup.class, EditGroup.class }) - private Long UserId; - - /** - * 寰呯粨绠梩oken - */ - private Integer token; - - /** - * 妯″瀷鍚嶇О - */ - @NotBlank(message = "妯″瀷鍚嶇О涓嶈兘涓虹┖", groups = { AddGroup.class, EditGroup.class }) - private String modelName; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/DeptTreeSelectVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/DeptTreeSelectVo.java deleted file mode 100644 index b3c8eb2..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/DeptTreeSelectVo.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xmzs.system.domain.vo; - -import cn.hutool.core.lang.tree.Tree; -import lombok.Data; - -import java.util.List; - -/** - * 瑙掕壊閮ㄩ棬鍒楄〃鏍戜俊鎭� - * - * @author Michelle.Chung - */ -@Data -public class DeptTreeSelectVo { - - /** - * 閫変腑閮ㄩ棬鍒楄〃 - */ - private List<Long> checkedKeys; - - /** - * 涓嬫媺鏍戠粨鏋勫垪琛� - */ - private List<Tree<Long>> depts; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/LoginTenantVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/LoginTenantVo.java deleted file mode 100644 index a785281..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/LoginTenantVo.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xmzs.system.domain.vo; - -import lombok.Data; - -import java.util.List; - -/** - * 鐧诲綍绉熸埛瀵硅薄 - * - * @author Michelle.Chung - */ -@Data -public class LoginTenantVo { - - /** - * 绉熸埛寮�鍏� - */ - private Boolean tenantEnabled; - - /** - * 绉熸埛瀵硅薄鍒楄〃 - */ - private List<TenantListVo> voList; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/LoginVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/LoginVo.java deleted file mode 100644 index 29885d7..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/LoginVo.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.xmzs.web.domain.vo; - -import com.xmzs.common.core.domain.model.LoginUser; -import lombok.Data; - -/** - * 鐧诲綍杩斿洖淇℃伅 - * - * @author Michelle.Chung - */ -@Data -public class LoginVo { - private String token; - private LoginUser userInfo; -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/MenuTreeSelectVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/MenuTreeSelectVo.java deleted file mode 100644 index a9ada18..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/MenuTreeSelectVo.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xmzs.system.domain.vo; - -import cn.hutool.core.lang.tree.Tree; -import lombok.Data; - -import java.util.List; - -/** - * 瑙掕壊鑿滃崟鍒楄〃鏍戜俊鎭� - * - * @author Michelle.Chung - */ -@Data -public class MenuTreeSelectVo { - - /** - * 閫変腑鑿滃崟鍒楄〃 - */ - private List<Long> checkedKeys; - - /** - * 鑿滃崟涓嬫媺鏍戠粨鏋勫垪琛� - */ - private List<Tree<Long>> menus; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/MetaVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/MetaVo.java deleted file mode 100644 index 8f6bdf7..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/MetaVo.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.xmzs.common.core.utils.StringUtils; -import lombok.Data; - -/** - * 璺敱鏄剧ず淇℃伅 - * - * @author ruoyi - */ - -@Data -public class MetaVo { - - /** - * 璁剧疆璇ヨ矾鐢卞湪渚ц竟鏍忓拰闈㈠寘灞戜腑灞曠ず鐨勫悕瀛� - */ - private String title; - - /** - * 璁剧疆璇ヨ矾鐢辩殑鍥炬爣锛屽搴旇矾寰剆rc/assets/icons/svg - */ - private String icon; - - /** - * 璁剧疆涓簍rue锛屽垯涓嶄細琚� <keep-alive>缂撳瓨 - */ - private boolean noCache; - - /** - * 鍐呴摼鍦板潃锛坔ttp(s)://寮�澶达級 - */ - private String link; - - public MetaVo(String title, String icon) { - this.title = title; - this.icon = icon; - } - - public MetaVo(String title, String icon, boolean noCache) { - this.title = title; - this.icon = icon; - this.noCache = noCache; - } - - public MetaVo(String title, String icon, String link) { - this.title = title; - this.icon = icon; - this.link = link; - } - - public MetaVo(String title, String icon, boolean noCache, String link) { - this.title = title; - this.icon = icon; - this.noCache = noCache; - if (StringUtils.ishttp(link)) { - this.link = link; - } - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/PaymentOrdersVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/PaymentOrdersVo.java deleted file mode 100644 index 0825c35..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/PaymentOrdersVo.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.system.domain.PaymentOrders; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.math.BigDecimal; - - - -/** - * 鏀粯璁㈠崟瑙嗗浘瀵硅薄 payment_orders - * - * @author Lion Li - * @date 2023-12-29 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = PaymentOrders.class) -public class PaymentOrdersVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 涓婚敭 - */ - @ExcelProperty(value = "涓婚敭") - private Long id; - - /** - * 璁㈠崟缂栧彿 - */ - @ExcelProperty(value = "璁㈠崟缂栧彿") - private String orderNo; - - /** - * 璁㈠崟鍚嶇О - */ - @ExcelProperty(value = "璁㈠崟鍚嶇О") - private String orderName; - - /** - * 閲戦 - */ - @ExcelProperty(value = "閲戦") - private BigDecimal amount; - - /** - * 鏀粯鐘舵�� - */ - @ExcelProperty(value = "鏀粯鐘舵��") - private String paymentStatus; - - /** - * 鏀粯鏂瑰紡 - */ - @ExcelProperty(value = "鏀粯鏂瑰紡") - private String paymentMethod; - - /** - * 鐢ㄦ埛ID - */ - @ExcelProperty(value = "鐢ㄦ埛ID") - private Long userId; - - /** - * 浜岀淮鐮佸湴鍧� - */ - private String url; - - /** - * 澶囨敞 - */ - @ExcelProperty(value = "澶囨敞") - private String remark; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/ProfileVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/ProfileVo.java deleted file mode 100644 index 541fd33..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/ProfileVo.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.xmzs.system.domain.vo; - -import lombok.Data; - -/** - * 鐢ㄦ埛涓汉淇℃伅 - * - * @author Michelle.Chung - */ -@Data -public class ProfileVo { - - /** - * 鐢ㄦ埛淇℃伅 - */ - private SysUserVo user; - - /** - * 鐢ㄦ埛鎵�灞炶鑹茬粍 - */ - private String roleGroup; - - /** - * 鐢ㄦ埛鎵�灞炲矖浣嶇粍 - */ - private String postGroup; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/RouterVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/RouterVo.java deleted file mode 100644 index feaeb21..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/RouterVo.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.fasterxml.jackson.annotation.JsonInclude; -import lombok.Data; - -import java.util.List; - -/** - * 璺敱閰嶇疆淇℃伅 - * - * @author Lion Li - */ -@Data -@JsonInclude(JsonInclude.Include.NON_EMPTY) -public class RouterVo { - - /** - * 璺敱鍚嶅瓧 - */ - private String name; - - /** - * 璺敱鍦板潃 - */ - private String path; - - /** - * 鏄惁闅愯棌璺敱锛屽綋璁剧疆 true 鐨勬椂鍊欒璺敱涓嶄細鍐嶄晶杈规爮鍑虹幇 - */ - private boolean hidden; - - /** - * 閲嶅畾鍚戝湴鍧�锛屽綋璁剧疆 noRedirect 鐨勬椂鍊欒璺敱鍦ㄩ潰鍖呭睉瀵艰埅涓笉鍙鐐瑰嚮 - */ - private String redirect; - - /** - * 缁勪欢鍦板潃 - */ - private String component; - - /** - * 璺敱鍙傛暟锛氬 {"id": 1, "name": "ry"} - */ - private String query; - - /** - * 褰撲綘涓�涓矾鐢变笅闈㈢殑 children 澹版槑鐨勮矾鐢卞ぇ浜�1涓椂锛岃嚜鍔ㄤ細鍙樻垚宓屽鐨勬ā寮�--濡傜粍浠堕〉闈� - */ - private Boolean alwaysShow; - - /** - * 鍏朵粬鍏冪礌 - */ - private MetaVo meta; - - /** - * 瀛愯矾鐢� - */ - private List<RouterVo> children; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysConfigVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysConfigVo.java deleted file mode 100644 index 7f0d3de..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysConfigVo.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.common.excel.annotation.ExcelDictFormat; -import com.xmzs.common.excel.convert.ExcelDictConvert; -import com.xmzs.system.domain.SysConfig; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - - -/** - * 鍙傛暟閰嶇疆瑙嗗浘瀵硅薄 sys_config - * - * @author Michelle.Chung - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = SysConfig.class) -public class SysConfigVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 鍙傛暟涓婚敭 - */ - @ExcelProperty(value = "鍙傛暟涓婚敭") - private Long configId; - - /** - * 鍙傛暟鍚嶇О - */ - @ExcelProperty(value = "鍙傛暟鍚嶇О") - private String configName; - - /** - * 鍙傛暟閿悕 - */ - @ExcelProperty(value = "鍙傛暟閿悕") - private String configKey; - - /** - * 鍙傛暟閿�� - */ - @ExcelProperty(value = "鍙傛暟閿��") - private String configValue; - - /** - * 绯荤粺鍐呯疆锛圷鏄� N鍚︼級 - */ - @ExcelProperty(value = "绯荤粺鍐呯疆", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_yes_no") - private String configType; - - /** - * 澶囨敞 - */ - @ExcelProperty(value = "澶囨敞") - private String remark; - - /** - * 鍒涘缓鏃堕棿 - */ - @ExcelProperty(value = "鍒涘缓鏃堕棿") - private Date createTime; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysDeptVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysDeptVo.java deleted file mode 100644 index 314ef4d..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysDeptVo.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.common.excel.annotation.ExcelDictFormat; -import com.xmzs.common.excel.convert.ExcelDictConvert; -import com.xmzs.system.domain.SysDept; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - -/** - * 閮ㄩ棬瑙嗗浘瀵硅薄 sys_dept - * - * @author Michelle.Chung - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = SysDept.class) -public class SysDeptVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 閮ㄩ棬id - */ - @ExcelProperty(value = "閮ㄩ棬id") - private Long deptId; - - /** - * 鐖堕儴闂╥d - */ - private Long parentId; - - /** - * 鐖堕儴闂ㄥ悕绉� - */ - private String parentName; - - /** - * 绁栫骇鍒楄〃 - */ - private String ancestors; - - /** - * 閮ㄩ棬鍚嶇О - */ - @ExcelProperty(value = "閮ㄩ棬鍚嶇О") - private String deptName; - - /** - * 鏄剧ず椤哄簭 - */ - private Integer orderNum; - - /** - * 璐熻矗浜� - */ - @ExcelProperty(value = "璐熻矗浜�") - private String leader; - - /** - * 鑱旂郴鐢佃瘽 - */ - @ExcelProperty(value = "鑱旂郴鐢佃瘽") - private String phone; - - /** - * 閭 - */ - @ExcelProperty(value = "閭") - private String email; - - /** - * 閮ㄩ棬鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - @ExcelProperty(value = "閮ㄩ棬鐘舵��", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_normal_disable") - private String status; - - /** - * 鍒涘缓鏃堕棿 - */ - @ExcelProperty(value = "鍒涘缓鏃堕棿") - private Date createTime; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysDictDataVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysDictDataVo.java deleted file mode 100644 index 3b6ff22..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysDictDataVo.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.common.excel.annotation.ExcelDictFormat; -import com.xmzs.common.excel.convert.ExcelDictConvert; -import com.xmzs.system.domain.SysDictData; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - - -/** - * 瀛楀吀鏁版嵁瑙嗗浘瀵硅薄 sys_dict_data - * - * @author Michelle.Chung - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = SysDictData.class) -public class SysDictDataVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 瀛楀吀缂栫爜 - */ - @ExcelProperty(value = "瀛楀吀缂栫爜") - private Long dictCode; - - /** - * 瀛楀吀鎺掑簭 - */ - @ExcelProperty(value = "瀛楀吀鎺掑簭") - private Integer dictSort; - - /** - * 瀛楀吀鏍囩 - */ - @ExcelProperty(value = "瀛楀吀鏍囩") - private String dictLabel; - - /** - * 瀛楀吀閿�� - */ - @ExcelProperty(value = "瀛楀吀閿��") - private String dictValue; - - /** - * 瀛楀吀绫诲瀷 - */ - @ExcelProperty(value = "瀛楀吀绫诲瀷") - private String dictType; - - /** - * 鏍峰紡灞炴�э紙鍏朵粬鏍峰紡鎵╁睍锛� - */ - private String cssClass; - - /** - * 琛ㄦ牸鍥炴樉鏍峰紡 - */ - private String listClass; - - /** - * 鏄惁榛樿锛圷鏄� N鍚︼級 - */ - @ExcelProperty(value = "鏄惁榛樿", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_yes_no") - private String isDefault; - - /** - * 鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - @ExcelProperty(value = "鐘舵��", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_normal_disable") - private String status; - - /** - * 澶囨敞 - */ - @ExcelProperty(value = "澶囨敞") - private String remark; - - /** - * 鍒涘缓鏃堕棿 - */ - @ExcelProperty(value = "鍒涘缓鏃堕棿") - private Date createTime; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysDictTypeVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysDictTypeVo.java deleted file mode 100644 index 292c106..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysDictTypeVo.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.common.excel.annotation.ExcelDictFormat; -import com.xmzs.common.excel.convert.ExcelDictConvert; -import com.xmzs.system.domain.SysDictType; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - - -/** - * 瀛楀吀绫诲瀷瑙嗗浘瀵硅薄 sys_dict_type - * - * @author Michelle.Chung - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = SysDictType.class) -public class SysDictTypeVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 瀛楀吀涓婚敭 - */ - @ExcelProperty(value = "瀛楀吀涓婚敭") - private Long dictId; - - /** - * 瀛楀吀鍚嶇О - */ - @ExcelProperty(value = "瀛楀吀鍚嶇О") - private String dictName; - - /** - * 瀛楀吀绫诲瀷 - */ - @ExcelProperty(value = "瀛楀吀绫诲瀷") - private String dictType; - - /** - * 鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - @ExcelProperty(value = "鐘舵��", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_normal_disable") - private String status; - - /** - * 澶囨敞 - */ - @ExcelProperty(value = "澶囨敞") - private String remark; - - /** - * 鍒涘缓鏃堕棿 - */ - @ExcelProperty(value = "鍒涘缓鏃堕棿") - private Date createTime; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysLogininforVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysLogininforVo.java deleted file mode 100644 index d1a9e81..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysLogininforVo.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.common.excel.annotation.ExcelDictFormat; -import com.xmzs.common.excel.convert.ExcelDictConvert; -import com.xmzs.system.domain.SysLogininfor; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - - - -/** - * 绯荤粺璁块棶璁板綍瑙嗗浘瀵硅薄 sys_logininfor - * - * @author Michelle.Chung - * @date 2023-02-07 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = SysLogininfor.class) -public class SysLogininforVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 璁块棶ID - */ - @ExcelProperty(value = "搴忓彿") - private Long infoId; - - /** - * 绉熸埛缂栧彿 - */ - private String tenantId; - - /** - * 鐢ㄦ埛璐﹀彿 - */ - @ExcelProperty(value = "鐢ㄦ埛璐﹀彿") - private String userName; - - /** - * 鐧诲綍鐘舵�侊紙0鎴愬姛 1澶辫触锛� - */ - @ExcelProperty(value = "鐧诲綍鐘舵��", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_common_status") - private String status; - - /** - * 鐧诲綍IP鍦板潃 - */ - @ExcelProperty(value = "鐧诲綍鍦板潃") - private String ipaddr; - - /** - * 鐧诲綍鍦扮偣 - */ - @ExcelProperty(value = "鐧诲綍鍦扮偣") - private String loginLocation; - - /** - * 娴忚鍣ㄧ被鍨� - */ - @ExcelProperty(value = "娴忚鍣�") - private String browser; - - /** - * 鎿嶄綔绯荤粺 - */ - @ExcelProperty(value = "鎿嶄綔绯荤粺") - private String os; - - - /** - * 鎻愮ず娑堟伅 - */ - @ExcelProperty(value = "鎻愮ず娑堟伅") - private String msg; - - /** - * 璁块棶鏃堕棿 - */ - @ExcelProperty(value = "璁块棶鏃堕棿") - private Date loginTime; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysMenuVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysMenuVo.java deleted file mode 100644 index df59e97..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysMenuVo.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.xmzs.system.domain.SysMenu; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - - -/** - * 鑿滃崟鏉冮檺瑙嗗浘瀵硅薄 sys_menu - * - * @author Michelle.Chung - */ -@Data -@AutoMapper(target = SysMenu.class) -public class SysMenuVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 鑿滃崟ID - */ - private Long menuId; - - /** - * 鑿滃崟鍚嶇О - */ - private String menuName; - - /** - * 鐖惰彍鍗旾D - */ - private Long parentId; - - /** - * 鏄剧ず椤哄簭 - */ - private Integer orderNum; - - /** - * 璺敱鍦板潃 - */ - private String path; - - /** - * 缁勪欢璺緞 - */ - private String component; - - /** - * 璺敱鍙傛暟 - */ - private String queryParam; - - /** - * 鏄惁涓哄閾撅紙0鏄� 1鍚︼級 - */ - private String isFrame; - - /** - * 鏄惁缂撳瓨锛�0缂撳瓨 1涓嶇紦瀛橈級 - */ - private String isCache; - - /** - * 鑿滃崟绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛� - */ - private String menuType; - - /** - * 鏄剧ず鐘舵�侊紙0鏄剧ず 1闅愯棌锛� - */ - private String visible; - - /** - * 鑿滃崟鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - /** - * 鏉冮檺鏍囪瘑 - */ - private String perms; - - /** - * 鑿滃崟鍥炬爣 - */ - private String icon; - - /** - * 鍒涘缓閮ㄩ棬 - */ - private Long createDept; - - /** - * 澶囨敞 - */ - private String remark; - - /** - * 鍒涘缓鏃堕棿 - */ - private Date createTime; - - /** - * 瀛愯彍鍗� - */ - private List<SysMenuVo> children = new ArrayList<>(); - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysModelVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysModelVo.java deleted file mode 100644 index 3ed94eb..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysModelVo.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.system.domain.SysModel; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; - - -/** - * 绯荤粺妯″瀷瑙嗗浘瀵硅薄 sys_model - * - * @author Lion Li - * @date 2024-04-04 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = SysModel.class) -public class SysModelVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 涓婚敭 - */ - @ExcelProperty(value = "涓婚敭") - private Long id; - - /** - * 妯″瀷鍚嶇О - */ - @ExcelProperty(value = "妯″瀷鍚嶇О") - private String modelName; - - - - /** - * 妯″瀷鎻忚堪 - */ - @ExcelProperty(value = "妯″瀷鎻忚堪") - private String modelDescribe; - - /** - * 妯″瀷浠锋牸 - */ - @ExcelProperty(value = "妯″瀷浠锋牸") - private double modelPrice; - - /** - * 璁¤垂绫诲瀷 - */ - @ExcelProperty(value = "璁¤垂绫诲瀷") - private String modelType; - - /** - * 鏄惁鏄剧ず - */ - private String modelShow; - - - /** - * 绯荤粺鎻愮ず璇� - */ - private String systemPrompt; - - /** - * 澶囨敞 - */ - @ExcelProperty(value = "澶囨敞") - private String remark; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysNoticeVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysNoticeVo.java deleted file mode 100644 index eeea773..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysNoticeVo.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.xmzs.common.translation.annotation.Translation; -import com.xmzs.common.translation.constant.TransConstant; -import com.xmzs.system.domain.SysNotice; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - - - -/** - * 閫氱煡鍏憡瑙嗗浘瀵硅薄 sys_notice - * - * @author Michelle.Chung - */ -@Data -@AutoMapper(target = SysNotice.class) -public class SysNoticeVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 鍏憡ID - */ - private Long noticeId; - - /** - * 鍏憡鏍囬 - */ - private String noticeTitle; - - /** - * 鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛� - */ - private String noticeType; - - /** - * 鍏憡鍐呭 - */ - private String noticeContent; - - /** - * 鍏憡鐘舵�侊紙0姝e父 1鍏抽棴锛� - */ - private String status; - - /** - * 澶囨敞 - */ - private String remark; - - /** - * 鍒涘缓鑰� - */ - private Long createBy; - - /** - * 鍒涘缓浜哄悕绉� - */ - @Translation(type = TransConstant.USER_ID_TO_NAME, mapper = "createBy") - private String createByName; - - /** - * 鍒涘缓鏃堕棿 - */ - private Date createTime; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysOperLogVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysOperLogVo.java deleted file mode 100644 index 16adc70..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysOperLogVo.java +++ /dev/null @@ -1,144 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.common.excel.annotation.ExcelDictFormat; -import com.xmzs.common.excel.convert.ExcelDictConvert; -import com.xmzs.system.domain.SysOperLog; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - - -/** - * 鎿嶄綔鏃ュ織璁板綍瑙嗗浘瀵硅薄 sys_oper_log - * - * @author Michelle.Chung - * @date 2023-02-07 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = SysOperLog.class) -public class SysOperLogVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 鏃ュ織涓婚敭 - */ - @ExcelProperty(value = "鏃ュ織涓婚敭") - private Long operId; - - /** - * 绉熸埛缂栧彿 - */ - private String tenantId; - - /** - * 妯″潡鏍囬 - */ - @ExcelProperty(value = "鎿嶄綔妯″潡") - private String title; - - /** - * 涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛� - */ - @ExcelProperty(value = "涓氬姟绫诲瀷", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_oper_type") - private Integer businessType; - - /** - * 涓氬姟绫诲瀷鏁扮粍 - */ - private Integer[] businessTypes; - - /** - * 鏂规硶鍚嶇О - */ - @ExcelProperty(value = "璇锋眰鏂规硶") - private String method; - - /** - * 璇锋眰鏂瑰紡 - */ - @ExcelProperty(value = "璇锋眰鏂瑰紡") - private String requestMethod; - - /** - * 鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級 - */ - @ExcelProperty(value = "鎿嶄綔绫诲埆", converter = ExcelDictConvert.class) - @ExcelDictFormat(readConverterExp = "0=鍏跺畠,1=鍚庡彴鐢ㄦ埛,2=鎵嬫満绔敤鎴�") - private Integer operatorType; - - /** - * 鎿嶄綔浜哄憳 - */ - @ExcelProperty(value = "鎿嶄綔浜哄憳") - private String operName; - - /** - * 閮ㄩ棬鍚嶇О - */ - @ExcelProperty(value = "閮ㄩ棬鍚嶇О") - private String deptName; - - /** - * 璇锋眰URL - */ - @ExcelProperty(value = "璇锋眰鍦板潃") - private String operUrl; - - /** - * 涓绘満鍦板潃 - */ - @ExcelProperty(value = "鎿嶄綔鍦板潃") - private String operIp; - - /** - * 鎿嶄綔鍦扮偣 - */ - @ExcelProperty(value = "鎿嶄綔鍦扮偣") - private String operLocation; - - /** - * 璇锋眰鍙傛暟 - */ - @ExcelProperty(value = "璇锋眰鍙傛暟") - private String operParam; - - /** - * 杩斿洖鍙傛暟 - */ - @ExcelProperty(value = "杩斿洖鍙傛暟") - private String jsonResult; - - /** - * 鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛� - */ - @ExcelProperty(value = "鐘舵��", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_common_status") - private Integer status; - - /** - * 閿欒娑堟伅 - */ - @ExcelProperty(value = "閿欒娑堟伅") - private String errorMsg; - - /** - * 鎿嶄綔鏃堕棿 - */ - @ExcelProperty(value = "鎿嶄綔鏃堕棿") - private Date operTime; - - /** - * 娑堣�楁椂闂� - */ - @ExcelProperty(value = "娑堣�楁椂闂�") - private Long costTime; -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysOssConfigVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysOssConfigVo.java deleted file mode 100644 index 12ff554..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysOssConfigVo.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.xmzs.system.domain.SysOssConfig; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; - - -/** - * 瀵硅薄瀛樺偍閰嶇疆瑙嗗浘瀵硅薄 sys_oss_config - * - * @author Lion Li - * @author 瀛よ垷鐑熼洦 - * @date 2021-08-13 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = SysOssConfig.class) -public class SysOssConfigVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 涓诲缓 - */ - private Long ossConfigId; - - /** - * 閰嶇疆key - */ - private String configKey; - - /** - * accessKey - */ - private String accessKey; - - /** - * 绉橀挜 - */ - private String secretKey; - - /** - * 妗跺悕绉� - */ - private String bucketName; - - /** - * 鍓嶇紑 - */ - private String prefix; - - /** - * 璁块棶绔欑偣 - */ - private String endpoint; - - /** - * 鑷畾涔夊煙鍚� - */ - private String domain; - - /** - * 鏄惁https锛圷=鏄�,N=鍚︼級 - */ - private String isHttps; - - /** - * 鍩� - */ - private String region; - - /** - * 鏄惁榛樿锛�0=鏄�,1=鍚︼級 - */ - private String status; - - /** - * 鎵╁睍瀛楁 - */ - private String ext1; - - /** - * 澶囨敞 - */ - private String remark; - - /** - * 妗舵潈闄愮被鍨�(0private 1public 2custom) - */ - private String accessPolicy; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysOssUploadVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysOssUploadVo.java deleted file mode 100644 index 326ec26..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysOssUploadVo.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.xmzs.system.domain.vo; - -import lombok.Data; - -/** - * 涓婁紶瀵硅薄淇℃伅 - * - * @author Michelle.Chung - */ -@Data -public class SysOssUploadVo { - - /** - * URL鍦板潃 - */ - private String url; - - /** - * 鏂囦欢鍚� - */ - private String fileName; - - /** - * 瀵硅薄瀛樺偍涓婚敭 - */ - private String ossId; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysOssVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysOssVo.java deleted file mode 100644 index 6c754f0..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysOssVo.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.xmzs.common.translation.annotation.Translation; -import com.xmzs.common.translation.constant.TransConstant; -import com.xmzs.system.domain.SysOss; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - -/** - * OSS瀵硅薄瀛樺偍瑙嗗浘瀵硅薄 sys_oss - * - * @author Lion Li - */ -@Data -@AutoMapper(target = SysOss.class) -public class SysOssVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 瀵硅薄瀛樺偍涓婚敭 - */ - private Long ossId; - - /** - * 鏂囦欢鍚� - */ - private String fileName; - - /** - * 鍘熷悕 - */ - private String originalName; - - /** - * 鏂囦欢鍚庣紑鍚� - */ - private String fileSuffix; - - /** - * URL鍦板潃 - */ - private String url; - - /** - * 鍒涘缓鏃堕棿 - */ - private Date createTime; - - /** - * 涓婁紶浜� - */ - private Long createBy; - - /** - * 涓婁紶浜哄悕绉� - */ - @Translation(type = TransConstant.USER_ID_TO_NAME, mapper = "createBy") - private String createByName; - - /** - * 鏈嶅姟鍟� - */ - private String service; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysPostVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysPostVo.java deleted file mode 100644 index 0f87704..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysPostVo.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.common.excel.annotation.ExcelDictFormat; -import com.xmzs.common.excel.convert.ExcelDictConvert; -import com.xmzs.system.domain.SysPost; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - - - -/** - * 宀椾綅淇℃伅瑙嗗浘瀵硅薄 sys_post - * - * @author Michelle.Chung - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = SysPost.class) -public class SysPostVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 宀椾綅ID - */ - @ExcelProperty(value = "宀椾綅搴忓彿") - private Long postId; - - /** - * 宀椾綅缂栫爜 - */ - @ExcelProperty(value = "宀椾綅缂栫爜") - private String postCode; - - /** - * 宀椾綅鍚嶇О - */ - @ExcelProperty(value = "宀椾綅鍚嶇О") - private String postName; - - /** - * 鏄剧ず椤哄簭 - */ - @ExcelProperty(value = "宀椾綅鎺掑簭") - private Integer postSort; - - /** - * 鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - @ExcelProperty(value = "鐘舵��", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_normal_disable") - private String status; - - /** - * 澶囨敞 - */ - @ExcelProperty(value = "澶囨敞") - private String remark; - - /** - * 鍒涘缓鏃堕棿 - */ - @ExcelProperty(value = "鍒涘缓鏃堕棿") - private Date createTime; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysRoleVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysRoleVo.java deleted file mode 100644 index 76d6a9f..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysRoleVo.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.common.core.constant.UserConstants; -import com.xmzs.common.excel.annotation.ExcelDictFormat; -import com.xmzs.common.excel.convert.ExcelDictConvert; -import com.xmzs.system.domain.SysRole; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - -/** - * 瑙掕壊淇℃伅瑙嗗浘瀵硅薄 sys_role - * - * @author Michelle.Chung - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = SysRole.class) -public class SysRoleVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 瑙掕壊ID - */ - @ExcelProperty(value = "瑙掕壊搴忓彿") - private Long roleId; - - /** - * 瑙掕壊鍚嶇О - */ - @ExcelProperty(value = "瑙掕壊鍚嶇О") - private String roleName; - - /** - * 瑙掕壊鏉冮檺瀛楃涓� - */ - @ExcelProperty(value = "瑙掕壊鏉冮檺") - private String roleKey; - - /** - * 鏄剧ず椤哄簭 - */ - @ExcelProperty(value = "瑙掕壊鎺掑簭") - private Integer roleSort; - - /** - * 鏁版嵁鑼冨洿锛�1锛氬叏閮ㄦ暟鎹潈闄� 2锛氳嚜瀹氭暟鎹潈闄� 3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺 4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶級 - */ - @ExcelProperty(value = "鏁版嵁鑼冨洿", converter = ExcelDictConvert.class) - @ExcelDictFormat(readConverterExp = "1=鎵�鏈夋暟鎹潈闄�,2=鑷畾涔夋暟鎹潈闄�,3=鏈儴闂ㄦ暟鎹潈闄�,4=鏈儴闂ㄥ強浠ヤ笅鏁版嵁鏉冮檺,5=浠呮湰浜烘暟鎹潈闄�") - private String dataScope; - - /** - * 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀� - */ - @ExcelProperty(value = "鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�") - private Boolean menuCheckStrictly; - - /** - * 閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀� - */ - @ExcelProperty(value = "閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�") - private Boolean deptCheckStrictly; - - /** - * 瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - @ExcelProperty(value = "瑙掕壊鐘舵��", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_normal_disable") - private String status; - - /** - * 澶囨敞 - */ - @ExcelProperty(value = "澶囨敞") - private String remark; - - /** - * 鍒涘缓鏃堕棿 - */ - @ExcelProperty(value = "鍒涘缓鏃堕棿") - private Date createTime; - - /** - * 鐢ㄦ埛鏄惁瀛樺湪姝よ鑹叉爣璇� 榛樿涓嶅瓨鍦� - */ - private boolean flag = false; - - public boolean isSuperAdmin() { - return UserConstants.SUPER_ADMIN_ID.equals(this.roleId); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysTenantPackageVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysTenantPackageVo.java deleted file mode 100644 index e1dd270..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysTenantPackageVo.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.common.excel.annotation.ExcelDictFormat; -import com.xmzs.common.excel.convert.ExcelDictConvert; -import com.xmzs.system.domain.SysTenantPackage; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; - - -/** - * 绉熸埛濂楅瑙嗗浘瀵硅薄 sys_tenant_package - * - * @author Michelle.Chung - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = SysTenantPackage.class) -public class SysTenantPackageVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 绉熸埛濂楅id - */ - @ExcelProperty(value = "绉熸埛濂楅id") - private Long packageId; - - /** - * 濂楅鍚嶇О - */ - @ExcelProperty(value = "濂楅鍚嶇О") - private String packageName; - - /** - * 鍏宠仈鑿滃崟id - */ - @ExcelProperty(value = "鍏宠仈鑿滃崟id") - private String menuIds; - - /** - * 澶囨敞 - */ - @ExcelProperty(value = "澶囨敞") - private String remark; - - /** - * 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀� - */ - @ExcelProperty(value = "鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�") - private Boolean menuCheckStrictly; - - /** - * 鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - @ExcelProperty(value = "鐘舵��", converter = ExcelDictConvert.class) - @ExcelDictFormat(readConverterExp = "0=姝e父,1=鍋滅敤") - private String status; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysTenantVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysTenantVo.java deleted file mode 100644 index 4158742..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysTenantVo.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.common.excel.annotation.ExcelDictFormat; -import com.xmzs.common.excel.convert.ExcelDictConvert; -import com.xmzs.system.domain.SysTenant; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - - -/** - * 绉熸埛瑙嗗浘瀵硅薄 sys_tenant - * - * @author Michelle.Chung - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = SysTenant.class) -public class SysTenantVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * id - */ - @ExcelProperty(value = "id") - private Long id; - - /** - * 绉熸埛缂栧彿 - */ - @ExcelProperty(value = "绉熸埛缂栧彿") - private String tenantId; - - /** - * 鑱旂郴浜� - */ - @ExcelProperty(value = "鑱旂郴浜�") - private String contactUserName; - - /** - * 鑱旂郴鐢佃瘽 - */ - @ExcelProperty(value = "鑱旂郴鐢佃瘽") - private String contactPhone; - - /** - * 浼佷笟鍚嶇О - */ - @ExcelProperty(value = "浼佷笟鍚嶇О") - private String companyName; - - /** - * 缁熶竴绀句細淇$敤浠g爜 - */ - @ExcelProperty(value = "缁熶竴绀句細淇$敤浠g爜") - private String licenseNumber; - - /** - * 鍦板潃 - */ - @ExcelProperty(value = "鍦板潃") - private String address; - - /** - * 鍩熷悕 - */ - @ExcelProperty(value = "鍩熷悕") - private String domain; - - /** - * 浼佷笟绠�浠� - */ - @ExcelProperty(value = "浼佷笟绠�浠�") - private String intro; - - /** - * 澶囨敞 - */ - @ExcelProperty(value = "澶囨敞") - private String remark; - - /** - * 绉熸埛濂楅缂栧彿 - */ - @ExcelProperty(value = "绉熸埛濂楅缂栧彿") - private Long packageId; - - /** - * 杩囨湡鏃堕棿 - */ - @ExcelProperty(value = "杩囨湡鏃堕棿") - private Date expireTime; - - /** - * 鐢ㄦ埛鏁伴噺锛�-1涓嶉檺鍒讹級 - */ - @ExcelProperty(value = "鐢ㄦ埛鏁伴噺") - private Long accountCount; - - /** - * 绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - @ExcelProperty(value = "绉熸埛鐘舵��", converter = ExcelDictConvert.class) - @ExcelDictFormat(readConverterExp = "0=姝e父,1=鍋滅敤") - private String status; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysUserExportVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysUserExportVo.java deleted file mode 100644 index 9241b82..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysUserExportVo.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.common.excel.annotation.ExcelDictFormat; -import com.xmzs.common.excel.convert.ExcelDictConvert; -import io.github.linpeilie.annotations.AutoMapper; -import io.github.linpeilie.annotations.ReverseAutoMapping; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; - -/** - * 鐢ㄦ埛瀵硅薄瀵煎嚭VO - * - * @author Lion Li - */ - -@Data -@NoArgsConstructor -@AutoMapper(target = SysUserVo.class, convertGenerate = false) -public class SysUserExportVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 鐢ㄦ埛ID - */ - @ExcelProperty(value = "鐢ㄦ埛搴忓彿") - private Long userId; - - /** - * 鐢ㄦ埛璐﹀彿 - */ - @ExcelProperty(value = "鐧诲綍鍚嶇О") - private String userName; - - /** - * 鐢ㄦ埛鏄电О - */ - @ExcelProperty(value = "鐢ㄦ埛鍚嶇О") - private String nickName; - - /** - * 鐢ㄦ埛閭 - */ - @ExcelProperty(value = "鐢ㄦ埛閭") - private String email; - - /** - * 鎵嬫満鍙风爜 - */ - @ExcelProperty(value = "鎵嬫満鍙风爜") - private String phonenumber; - - /** - * 鐢ㄦ埛鎬у埆 - */ - @ExcelProperty(value = "鐢ㄦ埛鎬у埆", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_user_sex") - private String sex; - - /** - * 甯愬彿鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - @ExcelProperty(value = "甯愬彿鐘舵��", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_normal_disable") - private String status; - - /** - * 鏈�鍚庣櫥褰旾P - */ - @ExcelProperty(value = "鏈�鍚庣櫥褰旾P") - private String loginIp; - - /** - * 鏈�鍚庣櫥褰曟椂闂� - */ - @ExcelProperty(value = "鏈�鍚庣櫥褰曟椂闂�") - private Date loginDate; - - /** - * 閮ㄩ棬鍚嶇О - */ - @ReverseAutoMapping(target = "deptName", source = "dept.deptName") - @ExcelProperty(value = "閮ㄩ棬鍚嶇О") - private String deptName; - - /** - * 璐熻矗浜� - */ - @ReverseAutoMapping(target = "leader", source = "dept.leader") - @ExcelProperty(value = "閮ㄩ棬璐熻矗浜�") - private String leader; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysUserImportVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysUserImportVo.java deleted file mode 100644 index b551a33..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysUserImportVo.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.common.excel.annotation.ExcelDictFormat; -import com.xmzs.common.excel.convert.ExcelDictConvert; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serial; -import java.io.Serializable; - -/** - * 鐢ㄦ埛瀵硅薄瀵煎叆VO - * - * @author Lion Li - */ - -@Data -@NoArgsConstructor -// @Accessors(chain = true) // 瀵煎叆涓嶅厑璁镐娇鐢� 浼氭壘涓嶅埌set鏂规硶 -public class SysUserImportVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 鐢ㄦ埛ID - */ - @ExcelProperty(value = "鐢ㄦ埛搴忓彿") - private Long userId; - - /** - * 閮ㄩ棬ID - */ - @ExcelProperty(value = "閮ㄩ棬缂栧彿") - private Long deptId; - - /** - * 鐢ㄦ埛璐﹀彿 - */ - @ExcelProperty(value = "鐧诲綍鍚嶇О") - private String userName; - - /** - * 鐢ㄦ埛鏄电О - */ - @ExcelProperty(value = "鐢ㄦ埛鍚嶇О") - private String nickName; - - /** - * 鐢ㄦ埛閭 - */ - @ExcelProperty(value = "鐢ㄦ埛閭") - private String email; - - /** - * 鎵嬫満鍙风爜 - */ - @ExcelProperty(value = "鎵嬫満鍙风爜") - private String phonenumber; - - /** - * 鐢ㄦ埛鎬у埆 - */ - @ExcelProperty(value = "鐢ㄦ埛鎬у埆", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_user_sex") - private String sex; - - /** - * 甯愬彿鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - @ExcelProperty(value = "甯愬彿鐘舵��", converter = ExcelDictConvert.class) - @ExcelDictFormat(dictType = "sys_normal_disable") - private String status; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysUserInfoVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysUserInfoVo.java deleted file mode 100644 index 0b5633d..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysUserInfoVo.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.xmzs.system.domain.vo; - -import lombok.Data; - -import java.util.List; - -/** - * 鐢ㄦ埛淇℃伅 - * - * @author Michelle.Chung - */ -@Data -public class SysUserInfoVo { - - /** - * 鐢ㄦ埛淇℃伅 - */ - private SysUserVo user; - - /** - * 瑙掕壊ID鍒楄〃 - */ - private List<Long> roleIds; - - /** - * 瑙掕壊鍒楄〃 - */ - private List<SysRoleVo> roles; - - /** - * 宀椾綅ID鍒楄〃 - */ - private List<Long> postIds; - - /** - * 宀椾綅鍒楄〃 - */ - private List<SysPostVo> posts; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysUserVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysUserVo.java deleted file mode 100644 index 6d4dcb8..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/SysUserVo.java +++ /dev/null @@ -1,145 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.xmzs.system.domain.SysUser; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; -import java.util.Date; -import java.util.List; - - -/** - * 鐢ㄦ埛淇℃伅瑙嗗浘瀵硅薄 sys_user - * - * @author Michelle.Chung - */ -@Data -@AutoMapper(target = SysUser.class) -public class SysUserVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * 鐢ㄦ埛ID - */ - private Long userId; - - /** - * 绉熸埛ID - */ - private String tenantId; - - /** - * 閮ㄩ棬ID - */ - private Long deptId; - - /** - * 鐢ㄦ埛璐﹀彿 - */ - private String userName; - - /** - * 鐢ㄦ埛鏄电О - */ - private String nickName; - - /** - * 鐢ㄦ埛绫诲瀷锛坰ys_user绯荤粺鐢ㄦ埛锛� - */ - private String userType; - - /** - * 鐢ㄦ埛閭 - */ - private String email; - - /** - * 鎵嬫満鍙风爜 - */ - private String phonenumber; - - /** - * 鐢ㄦ埛鎬у埆锛�0鐢� 1濂� 2鏈煡锛� - */ - private String sex; - - /** - * 澶村儚鍦板潃 - */ - private String avatar; - - /** - * 寰俊澶村儚鍦板潃 - */ - private String wxAvatar; - - - /** - * 瀵嗙爜 - */ - @JsonIgnore - @JsonProperty - private String password; - - /** - * 甯愬彿鐘舵�侊紙0姝e父 1鍋滅敤锛� - */ - private String status; - - /** - * 鏈�鍚庣櫥褰旾P - */ - private String loginIp; - - /** - * 鏈�鍚庣櫥褰曟椂闂� - */ - private Date loginDate; - - /** - * 澶囨敞 - */ - private String remark; - - /** - * 鍒涘缓鏃堕棿 - */ - private Date createTime; - - /** - * 閮ㄩ棬瀵硅薄 - */ - private SysDeptVo dept; - - /** - * 瑙掕壊瀵硅薄 - */ - private List<SysRoleVo> roles; - - /** - * 瑙掕壊缁� - */ - private Long[] roleIds; - - /** - * 宀椾綅缁� - */ - private Long[] postIds; - - /** - * 鏁版嵁鏉冮檺 褰撳墠瑙掕壊ID - */ - private Long roleId; - - /** 鐢ㄦ埛绛夌骇 */ - private String userGrade; - - /** 鐢ㄦ埛浣欓 */ - private double userBalance; -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/TenantListVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/TenantListVo.java deleted file mode 100644 index db2eff8..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/TenantListVo.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.xmzs.system.domain.vo; - -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -/** - * 绉熸埛鍒楄〃 - * - * @author Lion Li - */ -@Data -@AutoMapper(target = SysTenantVo.class) -public class TenantListVo { - - private String tenantId; - - private String companyName; - - private String domain; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/UserInfoVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/UserInfoVo.java deleted file mode 100644 index 55e00b2..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/UserInfoVo.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.xmzs.system.domain.vo; - -import lombok.Data; - -import java.util.Set; - -/** - * 鐧诲綍鐢ㄦ埛淇℃伅 - * - * @author Michelle.Chung - */ -@Data -public class UserInfoVo { - - /** - * 鐢ㄦ埛鍩烘湰淇℃伅 - */ - private SysUserVo user; - - /** - * 鑿滃崟鏉冮檺 - */ - private Set<String> permissions; - - /** - * 瑙掕壊鏉冮檺 - */ - private Set<String> roles; - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/VoiceRoleVo.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/VoiceRoleVo.java deleted file mode 100644 index 832c3d9..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/domain/vo/VoiceRoleVo.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.xmzs.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import com.xmzs.system.domain.VoiceRole; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; - -import java.io.Serial; -import java.io.Serializable; - - - -/** - * 閰嶉煶瑙掕壊瑙嗗浘瀵硅薄 voice_role - * - * @author Lion Li - * @date 2024-03-19 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = VoiceRole.class) -public class VoiceRoleVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * id - */ - @ExcelProperty(value = "id") - private Long id; - - /** - * 瑙掕壊鍚嶇О - */ - @ExcelProperty(value = "瑙掕壊鍚嶇О") - private String name; - - /** - * 瑙掕壊鎻忚堪 - */ - @ExcelProperty(value = "瑙掕壊鎻忚堪") - private String description; - - /** - * 澶村儚 - */ - @ExcelProperty(value = "澶村儚") - private String avatar; - - /** - * 瑙掕壊id - */ - @ExcelProperty(value = "瑙掕壊id") - private String voiceId; - - /** - * 闊抽鍦板潃 - */ - @ExcelProperty(value = "闊抽鍦板潃") - private String fileUrl; - - /** - * 闊抽棰勫鐞嗭紙瀹為獙鎬э級 - */ - @ExcelProperty(value = "闊抽棰勫鐞�") - private String preProcess; - - /** - * 澶囨敞 - */ - @ExcelProperty(value = "澶囨敞") - private String remark; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/handler/CustomerBigDecimalSerialize.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/handler/CustomerBigDecimalSerialize.java deleted file mode 100644 index dab8184..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/handler/CustomerBigDecimalSerialize.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xmzs.system.handler; - -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; - -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Objects; - -public class CustomerBigDecimalSerialize extends JsonSerializer<BigDecimal> { - @Override - public void serialize(BigDecimal value, JsonGenerator gen, SerializerProvider serializers) throws IOException { - if(Objects.nonNull(value)) { - //杩斿洖鍒板墠绔殑鏁版嵁涓烘暟瀛楃被鍨�,鍓嶇鎺ユ敹鏈夊彲鑳戒涪澶辩簿搴� - //gen.writeNumber(value.stripTrailingZeros()); - //杩斿洖鍒板墠绔殑鏁版嵁涓哄瓧绗︿覆绫诲瀷 - gen.writeString(value.stripTrailingZeros().toPlainString()); - //鍘婚櫎0鍚庣紑,濡傛灉鎯崇粺涓�杩涜淇濈暀绮惧害锛屼篃鍙互閲囩敤绫讳技澶勭悊 - }else {//濡傛灉涓簄ull鐨勮瘽锛屽氨鍐檔ull - gen.writeNull(); - } - } -} - diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/handler/WechatMessageHandler.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/handler/WechatMessageHandler.java deleted file mode 100644 index 059f6b1..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/handler/WechatMessageHandler.java +++ /dev/null @@ -1,103 +0,0 @@ -package com.xmzs.system.handler; - -import com.xmzs.common.chat.domain.request.ChatRequest; -import com.xmzs.common.chat.domain.request.Dall3Request; -import com.xmzs.common.chat.entity.chat.ChatCompletion; -import com.xmzs.common.chat.entity.images.Item; -import com.xmzs.common.wechat.api.MessageTools; -import com.xmzs.common.wechat.beans.BaseMsg; -import com.xmzs.common.wechat.core.Core; -import com.xmzs.common.wechat.face.IMsgHandlerFace; -import com.xmzs.system.cofing.KeywordConfig; -import com.xmzs.system.service.ISseService; - -import java.util.List; - -/** - * 寰俊娑堟伅澶勭悊绋嬪簭 - * - * @author ashinnotfound - * @date 2023/03/19 - */ -public class WechatMessageHandler implements IMsgHandlerFace { - private final ISseService sseService; - private final KeywordConfig keywordConfig; - - public WechatMessageHandler(ISseService sseService, KeywordConfig keywordConfig) { - this.sseService = sseService; - this.keywordConfig = keywordConfig; - } - - @Override - public String textMsgHandle(BaseMsg baseMsg) { - //濡傛灉鏄湪缇よ亰 - if (baseMsg.isGroupMsg()){ - //瀛樺湪@鏈哄櫒浜虹殑娑堟伅灏卞悜ChatGPT鎻愰棶 - if (baseMsg.getText().contains("@"+ Core.getInstance().getNickName())){ - //鍘婚櫎@鍐嶆彁闂� - String prompt = baseMsg.getText().replace("@"+ Core.getInstance().getNickName() + "鈥�", "").trim(); - return textResponse(baseMsg.getFromUserName(), prompt); - } - }else { - ChatRequest chatBO = new ChatRequest(); - chatBO.setPrompt(baseMsg.getText()); - chatBO.setModel(ChatCompletion.Model.GPT_3_5_TURBO.getName()); - return sseService.chat(chatBO); - } - return null; - } - - - private String textResponse(String userName, String content) { - if (keywordConfig.getReset().equals(content)){ - return "閲嶇疆浼氳瘽鎴愬姛"; - }else { - ChatRequest chatBO = new ChatRequest(); - chatBO.setPrompt(content); - chatBO.setUserId(userName); - if (content.startsWith(keywordConfig.getImage())) { - Dall3Request dall3Request = new Dall3Request(); - dall3Request.setPrompt(content.replaceFirst(keywordConfig.getImage() + " ", "")); - List<Item> items = sseService.dall3(dall3Request); - MessageTools.sendPicMsgByUserId(userName, items.get(0).getUrl()); - } else { - chatBO.setPrompt(content); - } - } - return "杩欎釜闂鎴戣繕娌″浼氬憿"; - } - - @Override - public String picMsgHandle(BaseMsg baseMsg) { - return null; - } - - @Override - public String voiceMsgHandle(BaseMsg baseMsg) { - return null; - } - - @Override - public String viedoMsgHandle(BaseMsg baseMsg) { - return null; - } - - @Override - public String nameCardMsgHandle(BaseMsg baseMsg) { - return null; - } - - @Override - public void sysMsgHandle(BaseMsg baseMsg) { - } - - @Override - public String verifyAddFriendMsgHandle(BaseMsg baseMsg) { - return null; - } - - @Override - public String mediaMsgHandle(BaseMsg baseMsg) { - return null; - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/listener/SSEEventSourceListener.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/listener/SSEEventSourceListener.java deleted file mode 100644 index 1a5dbc4..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/listener/SSEEventSourceListener.java +++ /dev/null @@ -1,140 +0,0 @@ -package com.xmzs.system.listener; - - -import cn.hutool.core.collection.CollectionUtil; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.xmzs.common.chat.config.LocalCache; -import com.xmzs.common.chat.entity.chat.ChatCompletionResponse; -import com.xmzs.common.chat.utils.TikTokensUtil; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.system.domain.bo.ChatMessageBo; -import com.xmzs.system.domain.bo.SysModelBo; -import com.xmzs.system.domain.vo.SysModelVo; -import com.xmzs.system.service.IChatMessageService; -import com.xmzs.system.service.IChatCostService; -import com.xmzs.system.service.ISysModelService; -import lombok.RequiredArgsConstructor; -import lombok.SneakyThrows; -import lombok.extern.slf4j.Slf4j; -import okhttp3.Response; -import okhttp3.ResponseBody; -import okhttp3.sse.EventSource; -import okhttp3.sse.EventSourceListener; -import org.jetbrains.annotations.NotNull; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyEmitter; - -import java.util.List; -import java.util.Objects; - -/** - * 鎻忚堪锛歄penAIEventSourceListener - * - * @author https:www.unfbx.com - * @date 2023-02-22 - */ -@Slf4j -@RequiredArgsConstructor -@Component -public class SSEEventSourceListener extends EventSourceListener { - - private ResponseBodyEmitter emitter; - - private StringBuilder stringBuffer = new StringBuilder(); - - @Autowired(required = false) - public SSEEventSourceListener(ResponseBodyEmitter emitter) { - this.emitter = emitter; - } - private static final ISysModelService sysModelService = SpringUtils.getBean(ISysModelService.class); - private String modelName; - /** - * {@inheritDoc} - */ - @Override - public void onOpen(EventSource eventSource, Response response) { - log.info("OpenAI寤虹珛sse杩炴帴..."); - } - - /** - * {@inheritDoc} - */ - @SneakyThrows - @Override - public void onEvent(@NotNull EventSource eventSource, String id, String type, String data) { - try { - if (data.equals("[DONE]")) { - //鎴愬姛鍝嶅簲 - emitter.complete(); - if(StringUtils.isNotEmpty(modelName)){ - IChatCostService IChatCostService = SpringUtils.context().getBean(IChatCostService.class); - IChatMessageService chatMessageService = SpringUtils.context().getBean(IChatMessageService.class); - ChatMessageBo chatMessageBo = new ChatMessageBo(); - chatMessageBo.setModelName(modelName); - chatMessageBo.setContent(stringBuffer.toString()); - Long userId = (Long)LocalCache.CACHE.get("userId"); - chatMessageBo.setUserId(userId); - - //鏌ヨ鎸夋鏁版墸璐圭殑妯″瀷 - SysModelBo sysModelBo = new SysModelBo(); - sysModelBo.setModelType("2"); - sysModelBo.setModelName(modelName); - List<SysModelVo> sysModelList = sysModelService.queryList(sysModelBo); - if (CollectionUtil.isNotEmpty(sysModelList)){ - chatMessageBo.setDeductCost(0d); - chatMessageBo.setRemark("鎻愰棶鏃舵墸璐�"); - // 淇濆瓨娑堟伅璁板綍 - chatMessageService.insertByBo(chatMessageBo); - }else{ - int tokens = TikTokensUtil.tokens(modelName,stringBuffer.toString()); - chatMessageBo.setTotalTokens(tokens); - // 鎸塼oken鎵h垂骞朵笖淇濆瓨娑堟伅璁板綍 - IChatCostService.deductToken(chatMessageBo); - } - } - return; - } - // 瑙f瀽杩斿洖鍐呭 - ObjectMapper mapper = new ObjectMapper(); - ChatCompletionResponse completionResponse = mapper.readValue(data, ChatCompletionResponse.class); - if(completionResponse == null || CollectionUtil.isEmpty(completionResponse.getChoices())){ - return; - } - String content = completionResponse.getChoices().get(0).getDelta().getContent(); - if(StringUtils.isEmpty(content)){ - return; - } - if(StringUtils.isEmpty(modelName)){ - modelName = completionResponse.getModel(); - } - stringBuffer.append(content); - emitter.send(data); - } catch (Exception e) { - log.error("sse淇℃伅鎺ㄩ�佸け璐}鍐呭锛歿}",e.getMessage(),data); - eventSource.cancel(); - } - } - - @Override - public void onClosed(EventSource eventSource) { - log.info("OpenAI鍏抽棴sse杩炴帴..."); - } - - @SneakyThrows - @Override - public void onFailure(EventSource eventSource, Throwable t, Response response) { - if (Objects.isNull(response)) { - return; - } - ResponseBody body = response.body(); - if (Objects.nonNull(body)) { - log.error("OpenAI sse杩炴帴寮傚父data锛歿}锛屽紓甯革細{}", body.string(), t); - } else { - log.error("OpenAI sse杩炴帴寮傚父data锛歿}锛屽紓甯革細{}", response, t); - } - eventSource.cancel(); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/listener/SysUserImportListener.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/listener/SysUserImportListener.java deleted file mode 100644 index 3bd0274..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/listener/SysUserImportListener.java +++ /dev/null @@ -1,119 +0,0 @@ -package com.xmzs.system.listener; - -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.crypto.digest.BCrypt; -import com.alibaba.excel.context.AnalysisContext; -import com.alibaba.excel.event.AnalysisEventListener; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.core.utils.ValidatorUtils; -import com.xmzs.common.excel.core.ExcelListener; -import com.xmzs.common.excel.core.ExcelResult; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.system.domain.bo.SysUserBo; -import com.xmzs.system.domain.vo.SysUserImportVo; -import com.xmzs.system.domain.vo.SysUserVo; -import com.xmzs.system.service.ISysConfigService; -import com.xmzs.system.service.ISysUserService; -import lombok.extern.slf4j.Slf4j; - -import java.util.List; - -/** - * 绯荤粺鐢ㄦ埛鑷畾涔夊鍏� - * - * @author Lion Li - */ -@Slf4j -public class SysUserImportListener extends AnalysisEventListener<SysUserImportVo> implements ExcelListener<SysUserImportVo> { - - private final ISysUserService userService; - - private final String password; - - private final Boolean isUpdateSupport; - - private final Long operUserId; - - private int successNum = 0; - private int failureNum = 0; - private final StringBuilder successMsg = new StringBuilder(); - private final StringBuilder failureMsg = new StringBuilder(); - - public SysUserImportListener(Boolean isUpdateSupport) { - String initPassword = SpringUtils.getBean(ISysConfigService.class).selectConfigByKey("sys.user.initPassword"); - this.userService = SpringUtils.getBean(ISysUserService.class); - this.password = BCrypt.hashpw(initPassword); - this.isUpdateSupport = isUpdateSupport; - this.operUserId = LoginHelper.getUserId(); - } - - @Override - public void invoke(SysUserImportVo userVo, AnalysisContext context) { - SysUserVo sysUser = this.userService.selectUserByUserName(userVo.getUserName()); - try { - // 楠岃瘉鏄惁瀛樺湪杩欎釜鐢ㄦ埛 - if (ObjectUtil.isNull(sysUser)) { - SysUserBo user = BeanUtil.toBean(userVo, SysUserBo.class); - ValidatorUtils.validate(user); - user.setPassword(password); - user.setCreateBy(operUserId); - userService.insertUser(user); - successNum++; - successMsg.append("<br/>").append(successNum).append("銆佽处鍙� ").append(user.getUserName()).append(" 瀵煎叆鎴愬姛"); - } else if (isUpdateSupport) { - Long userId = sysUser.getUserId(); - SysUserBo user = BeanUtil.toBean(userVo, SysUserBo.class); - user.setUserId(userId); - ValidatorUtils.validate(user); - userService.checkUserAllowed(user.getUserId()); - userService.checkUserDataScope(user.getUserId()); - user.setUpdateBy(operUserId); - userService.updateUser(user); - successNum++; - successMsg.append("<br/>").append(successNum).append("銆佽处鍙� ").append(user.getUserName()).append(" 鏇存柊鎴愬姛"); - } else { - failureNum++; - failureMsg.append("<br/>").append(failureNum).append("銆佽处鍙� ").append(sysUser.getUserName()).append(" 宸插瓨鍦�"); - } - } catch (Exception e) { - failureNum++; - String msg = "<br/>" + failureNum + "銆佽处鍙� " + sysUser.getUserName() + " 瀵煎叆澶辫触锛�"; - failureMsg.append(msg).append(e.getMessage()); - log.error(msg, e); - } - } - - @Override - public void doAfterAllAnalysed(AnalysisContext context) { - - } - - @Override - public ExcelResult<SysUserImportVo> getExcelResult() { - return new ExcelResult<>() { - - @Override - public String getAnalysis() { - if (failureNum > 0) { - failureMsg.insert(0, "寰堟姳姝夛紝瀵煎叆澶辫触锛佸叡 " + failureNum + " 鏉℃暟鎹牸寮忎笉姝g‘锛岄敊璇涓嬶細"); - throw new ServiceException(failureMsg.toString()); - } else { - successMsg.insert(0, "鎭枩鎮紝鏁版嵁宸插叏閮ㄥ鍏ユ垚鍔燂紒鍏� " + successNum + " 鏉★紝鏁版嵁濡備笅锛�"); - } - return successMsg.toString(); - } - - @Override - public List<SysUserImportVo> getList() { - return null; - } - - @Override - public List<String> getErrorList() { - return null; - } - }; - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/ChatMessageMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/ChatMessageMapper.java deleted file mode 100644 index 83eb480..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/ChatMessageMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.ChatMessage; -import com.xmzs.system.domain.vo.ChatMessageVo; - - -/** - * 鑱婂ぉ娑堟伅Mapper鎺ュ彛 - * - * @author Lion Li - * @date 2023-11-26 - */ -public interface ChatMessageMapper extends BaseMapperPlus<ChatMessage, ChatMessageVo> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/ChatTokenMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/ChatTokenMapper.java deleted file mode 100644 index afc2f10..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/ChatTokenMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.ChatToken; -import com.xmzs.system.domain.vo.ChatTokenVo; - - -/** - * 鑱婂ぉ娑堟伅Mapper鎺ュ彛 - * - * @author Lion Li - * @date 2023-11-26 - */ -public interface ChatTokenMapper extends BaseMapperPlus<ChatToken, ChatTokenVo> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/PaymentOrdersMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/PaymentOrdersMapper.java deleted file mode 100644 index 776bbc0..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/PaymentOrdersMapper.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.PaymentOrders; -import com.xmzs.system.domain.vo.PaymentOrdersVo; - -/** - * 鏀粯璁㈠崟Mapper鎺ュ彛 - * - * @author Lion Li - * @date 2023-12-29 - */ -public interface PaymentOrdersMapper extends BaseMapperPlus<PaymentOrders, PaymentOrdersVo> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysConfigMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysConfigMapper.java deleted file mode 100644 index c34500d..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysConfigMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysConfig; -import com.xmzs.system.domain.vo.SysConfigVo; - -/** - * 鍙傛暟閰嶇疆 鏁版嵁灞� - * - * @author Lion Li - */ -public interface SysConfigMapper extends BaseMapperPlus<SysConfig, SysConfigVo> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysDeptMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysDeptMapper.java deleted file mode 100644 index bfd8c63..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysDeptMapper.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.xmzs.system.mapper; - -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import com.xmzs.common.mybatis.annotation.DataColumn; -import com.xmzs.common.mybatis.annotation.DataPermission; -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysDept; -import com.xmzs.system.domain.vo.SysDeptVo; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 閮ㄩ棬绠$悊 鏁版嵁灞� - * - * @author Lion Li - */ -public interface SysDeptMapper extends BaseMapperPlus<SysDept, SysDeptVo> { - - /** - * 鏌ヨ閮ㄩ棬绠$悊鏁版嵁 - * - * @param queryWrapper 鏌ヨ鏉′欢 - * @return 閮ㄩ棬淇℃伅闆嗗悎 - */ - @DataPermission({ - @DataColumn(key = "deptName", value = "dept_id") - }) - List<SysDeptVo> selectDeptList(@Param(Constants.WRAPPER) Wrapper<SysDept> queryWrapper); - - @DataPermission({ - @DataColumn(key = "deptName", value = "dept_id") - }) - SysDeptVo selectDeptById(Long deptId); - - /** - * 鏍规嵁瑙掕壊ID鏌ヨ閮ㄩ棬鏍戜俊鎭� - * - * @param roleId 瑙掕壊ID - * @param deptCheckStrictly 閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀� - * @return 閫変腑閮ㄩ棬鍒楄〃 - */ - List<Long> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly); - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysDictDataMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysDictDataMapper.java deleted file mode 100644 index cb31530..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysDictDataMapper.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xmzs.system.mapper; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.xmzs.common.core.constant.UserConstants; -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysDictData; -import com.xmzs.system.domain.vo.SysDictDataVo; - -import java.util.List; - -/** - * 瀛楀吀琛� 鏁版嵁灞� - * - * @author Lion Li - */ -public interface SysDictDataMapper extends BaseMapperPlus<SysDictData, SysDictDataVo> { - - default List<SysDictDataVo> selectDictDataByType(String dictType) { - return selectVoList( - new LambdaQueryWrapper<SysDictData>() - .eq(SysDictData::getStatus, UserConstants.DICT_NORMAL) - .eq(SysDictData::getDictType, dictType) - .orderByAsc(SysDictData::getDictSort)); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysDictTypeMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysDictTypeMapper.java deleted file mode 100644 index a8af364..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysDictTypeMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysDictType; -import com.xmzs.system.domain.vo.SysDictTypeVo; - -/** - * 瀛楀吀琛� 鏁版嵁灞� - * - * @author Lion Li - */ -public interface SysDictTypeMapper extends BaseMapperPlus<SysDictType, SysDictTypeVo> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysLogininforMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysLogininforMapper.java deleted file mode 100644 index 6421f90..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysLogininforMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysLogininfor; -import com.xmzs.system.domain.vo.SysLogininforVo; - -/** - * 绯荤粺璁块棶鏃ュ織鎯呭喌淇℃伅 鏁版嵁灞� - * - * @author Lion Li - */ -public interface SysLogininforMapper extends BaseMapperPlus<SysLogininfor, SysLogininforVo> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysMenuMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysMenuMapper.java deleted file mode 100644 index 64714c7..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysMenuMapper.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.xmzs.system.mapper; - -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import com.xmzs.common.core.constant.UserConstants; -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysMenu; -import com.xmzs.system.domain.vo.SysMenuVo; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 鑿滃崟琛� 鏁版嵁灞� - * - * @author Lion Li - */ -public interface SysMenuMapper extends BaseMapperPlus<SysMenu, SysMenuVo> { - - /** - * 鏍规嵁鐢ㄦ埛鎵�鏈夋潈闄� - * - * @return 鏉冮檺鍒楄〃 - */ - List<String> selectMenuPerms(); - - /** - * 鏍规嵁鐢ㄦ埛鏌ヨ绯荤粺鑿滃崟鍒楄〃 - * - * @param queryWrapper 鏌ヨ鏉′欢 - * @return 鑿滃崟鍒楄〃 - */ - List<SysMenu> selectMenuListByUserId(@Param(Constants.WRAPPER) Wrapper<SysMenu> queryWrapper); - - /** - * 鏍规嵁鐢ㄦ埛ID鏌ヨ鏉冮檺 - * - * @param userId 鐢ㄦ埛ID - * @return 鏉冮檺鍒楄〃 - */ - List<String> selectMenuPermsByUserId(Long userId); - - /** - * 鏍规嵁瑙掕壊ID鏌ヨ鏉冮檺 - * - * @param roleId 瑙掕壊ID - * @return 鏉冮檺鍒楄〃 - */ - List<String> selectMenuPermsByRoleId(Long roleId); - - /** - * 鏍规嵁鐢ㄦ埛ID鏌ヨ鑿滃崟 - * - * @return 鑿滃崟鍒楄〃 - */ - default List<SysMenu> selectMenuTreeAll() { - LambdaQueryWrapper<SysMenu> lqw = new LambdaQueryWrapper<SysMenu>() - .in(SysMenu::getMenuType, UserConstants.TYPE_DIR, UserConstants.TYPE_MENU) - .eq(SysMenu::getStatus, UserConstants.MENU_NORMAL) - .orderByAsc(SysMenu::getParentId) - .orderByAsc(SysMenu::getOrderNum); - return this.selectList(lqw); - } - - /** - * 鏍规嵁鐢ㄦ埛ID鏌ヨ鑿滃崟 - * - * @param userId 鐢ㄦ埛ID - * @return 鑿滃崟鍒楄〃 - */ - List<SysMenu> selectMenuTreeByUserId(Long userId); - - /** - * 鏍规嵁瑙掕壊ID鏌ヨ鑿滃崟鏍戜俊鎭� - * - * @param roleId 瑙掕壊ID - * @param menuCheckStrictly 鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀� - * @return 閫変腑鑿滃崟鍒楄〃 - */ - List<Long> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly); - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysModelMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysModelMapper.java deleted file mode 100644 index ccded06..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysModelMapper.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysModel; -import com.xmzs.system.domain.vo.SysModelVo; - -/** - * 绯荤粺妯″瀷Mapper鎺ュ彛 - * - * @author Lion Li - * @date 2024-04-04 - */ -public interface SysModelMapper extends BaseMapperPlus<SysModel, SysModelVo> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysNoticeMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysNoticeMapper.java deleted file mode 100644 index 9b36c0a..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysNoticeMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysNotice; -import com.xmzs.system.domain.vo.SysNoticeVo; - -/** - * 閫氱煡鍏憡琛� 鏁版嵁灞� - * - * @author Lion Li - */ -public interface SysNoticeMapper extends BaseMapperPlus<SysNotice, SysNoticeVo> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysOperLogMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysOperLogMapper.java deleted file mode 100644 index 5b82d56..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysOperLogMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysOperLog; -import com.xmzs.system.domain.vo.SysOperLogVo; - -/** - * 鎿嶄綔鏃ュ織 鏁版嵁灞� - * - * @author Lion Li - */ -public interface SysOperLogMapper extends BaseMapperPlus<SysOperLog, SysOperLogVo> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysOssConfigMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysOssConfigMapper.java deleted file mode 100644 index d07cf22..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysOssConfigMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysOssConfig; -import com.xmzs.system.domain.vo.SysOssConfigVo; - -/** - * 瀵硅薄瀛樺偍閰嶇疆Mapper鎺ュ彛 - * - * @author Lion Li - * @author 瀛よ垷鐑熼洦 - * @date 2021-08-13 - */ -public interface SysOssConfigMapper extends BaseMapperPlus<SysOssConfig, SysOssConfigVo> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysOssMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysOssMapper.java deleted file mode 100644 index 5850394..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysOssMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysOss; -import com.xmzs.system.domain.vo.SysOssVo; - -/** - * 鏂囦欢涓婁紶 鏁版嵁灞� - * - * @author Lion Li - */ -public interface SysOssMapper extends BaseMapperPlus<SysOss, SysOssVo> { -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysPostMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysPostMapper.java deleted file mode 100644 index 851c7b9..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysPostMapper.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysPost; -import com.xmzs.system.domain.vo.SysPostVo; - -import java.util.List; - -/** - * 宀椾綅淇℃伅 鏁版嵁灞� - * - * @author Lion Li - */ -public interface SysPostMapper extends BaseMapperPlus<SysPost, SysPostVo> { - - /** - * 鏍规嵁鐢ㄦ埛ID鑾峰彇宀椾綅閫夋嫨妗嗗垪琛� - * - * @param userId 鐢ㄦ埛ID - * @return 閫変腑宀椾綅ID鍒楄〃 - */ - List<Long> selectPostListByUserId(Long userId); - - /** - * 鏌ヨ鐢ㄦ埛鎵�灞炲矖浣嶇粍 - * - * @param userName 鐢ㄦ埛鍚� - * @return 缁撴灉 - */ - List<SysPostVo> selectPostsByUserName(String userName); - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysRoleDeptMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysRoleDeptMapper.java deleted file mode 100644 index 9dc642c..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysRoleDeptMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysRoleDept; - -/** - * 瑙掕壊涓庨儴闂ㄥ叧鑱旇〃 鏁版嵁灞� - * - * @author Lion Li - */ -public interface SysRoleDeptMapper extends BaseMapperPlus<SysRoleDept, SysRoleDept> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysRoleMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysRoleMapper.java deleted file mode 100644 index 09cffc2..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysRoleMapper.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.xmzs.system.mapper; - -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.mybatis.annotation.DataColumn; -import com.xmzs.common.mybatis.annotation.DataPermission; -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysRole; -import com.xmzs.system.domain.vo.SysRoleVo; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 瑙掕壊琛� 鏁版嵁灞� - * - * @author Lion Li - */ -public interface SysRoleMapper extends BaseMapperPlus<SysRole, SysRoleVo> { - - @DataPermission({ - @DataColumn(key = "deptName", value = "d.dept_id") - }) - Page<SysRoleVo> selectPageRoleList(@Param("page") Page<SysRole> page, @Param(Constants.WRAPPER) Wrapper<SysRole> queryWrapper); - - /** - * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ瑙掕壊鏁版嵁 - * - * @param queryWrapper 鏌ヨ鏉′欢 - * @return 瑙掕壊鏁版嵁闆嗗悎淇℃伅 - */ - @DataPermission({ - @DataColumn(key = "deptName", value = "d.dept_id") - }) - List<SysRoleVo> selectRoleList(@Param(Constants.WRAPPER) Wrapper<SysRole> queryWrapper); - - @DataPermission({ - @DataColumn(key = "deptName", value = "d.dept_id") - }) - SysRoleVo selectRoleById(Long roleId); - - /** - * 鏍规嵁鐢ㄦ埛ID鏌ヨ瑙掕壊 - * - * @param userId 鐢ㄦ埛ID - * @return 瑙掕壊鍒楄〃 - */ - List<SysRoleVo> selectRolePermissionByUserId(Long userId); - - - /** - * 鏍规嵁鐢ㄦ埛ID鑾峰彇瑙掕壊閫夋嫨妗嗗垪琛� - * - * @param userId 鐢ㄦ埛ID - * @return 閫変腑瑙掕壊ID鍒楄〃 - */ - List<Long> selectRoleListByUserId(Long userId); - - /** - * 鏍规嵁鐢ㄦ埛ID鏌ヨ瑙掕壊 - * - * @param userName 鐢ㄦ埛鍚� - * @return 瑙掕壊鍒楄〃 - */ - List<SysRoleVo> selectRolesByUserName(String userName); - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysRoleMenuMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysRoleMenuMapper.java deleted file mode 100644 index 0bdb335..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysRoleMenuMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysRoleMenu; - -/** - * 瑙掕壊涓庤彍鍗曞叧鑱旇〃 鏁版嵁灞� - * - * @author Lion Li - */ -public interface SysRoleMenuMapper extends BaseMapperPlus<SysRoleMenu, SysRoleMenu> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysTenantMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysTenantMapper.java deleted file mode 100644 index 9e47b95..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysTenantMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysTenant; -import com.xmzs.system.domain.vo.SysTenantVo; - -/** - * 绉熸埛Mapper鎺ュ彛 - * - * @author Michelle.Chung - */ -public interface SysTenantMapper extends BaseMapperPlus<SysTenant, SysTenantVo> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysTenantPackageMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysTenantPackageMapper.java deleted file mode 100644 index 8e5e2cd..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysTenantPackageMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysTenantPackage; -import com.xmzs.system.domain.vo.SysTenantPackageVo; - -/** - * 绉熸埛濂楅Mapper鎺ュ彛 - * - * @author Michelle.Chung - */ -public interface SysTenantPackageMapper extends BaseMapperPlus<SysTenantPackage, SysTenantPackageVo> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysUserMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysUserMapper.java deleted file mode 100644 index e7ba499..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysUserMapper.java +++ /dev/null @@ -1,165 +0,0 @@ -package com.xmzs.system.mapper; - -import com.baomidou.mybatisplus.annotation.InterceptorIgnore; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.toolkit.Constants; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.mybatis.annotation.DataColumn; -import com.xmzs.common.mybatis.annotation.DataPermission; -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysUser; -import com.xmzs.system.domain.bo.SysUserBo; -import com.xmzs.system.domain.vo.SysUserVo; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 鐢ㄦ埛琛� 鏁版嵁灞� - * - * @author Lion Li - */ -public interface SysUserMapper extends BaseMapperPlus<SysUser, SysUserVo> { - - @DataPermission({ - @DataColumn(key = "deptName", value = "d.dept_id"), - @DataColumn(key = "userName", value = "u.user_id") - }) - Page<SysUserVo> selectPageUserList(@Param("page") Page<SysUser> page, @Param(Constants.WRAPPER) Wrapper<SysUser> queryWrapper); - - /** - * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ鐢ㄦ埛鍒楄〃 - * - * @param queryWrapper 鏌ヨ鏉′欢 - * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅 - */ - @DataPermission({ - @DataColumn(key = "deptName", value = "d.dept_id"), - @DataColumn(key = "userName", value = "u.user_id") - }) - List<SysUserVo> selectUserList(@Param(Constants.WRAPPER) Wrapper<SysUser> queryWrapper); - - /** - * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ宸查厤鐢ㄦ埛瑙掕壊鍒楄〃 - * - * @param queryWrapper 鏌ヨ鏉′欢 - * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅 - */ - @DataPermission({ - @DataColumn(key = "deptName", value = "d.dept_id"), - @DataColumn(key = "userName", value = "u.user_id") - }) - Page<SysUserVo> selectAllocatedList(@Param("page") Page<SysUser> page, @Param(Constants.WRAPPER) Wrapper<SysUser> queryWrapper); - - /** - * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ鏈垎閰嶇敤鎴疯鑹插垪琛� - * - * @param queryWrapper 鏌ヨ鏉′欢 - * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅 - */ - @DataPermission({ - @DataColumn(key = "deptName", value = "d.dept_id"), - @DataColumn(key = "userName", value = "u.user_id") - }) - Page<SysUserVo> selectUnallocatedList(@Param("page") Page<SysUser> page, @Param(Constants.WRAPPER) Wrapper<SysUser> queryWrapper); - - /** - * 閫氳繃鐢ㄦ埛鍚嶆煡璇㈢敤鎴� - * - * @param userName 鐢ㄦ埛鍚� - * @return 鐢ㄦ埛瀵硅薄淇℃伅 - */ - SysUserVo selectUserByUserName(String userName); - - /** - * 閫氳繃OpenId鏌ヨ鐢ㄦ埛 - * - * @param OpenId 寰俊鐢ㄦ埛鍞竴鏍囪瘑 - * @return 鐢ㄦ埛瀵硅薄淇℃伅 - */ - SysUserVo selectUserByOpenId(String OpenId); - - /** - * 閫氳繃鎵嬫満鍙锋煡璇㈢敤鎴� - * - * @param phonenumber 鎵嬫満鍙� - * @return 鐢ㄦ埛瀵硅薄淇℃伅 - */ - SysUserVo selectUserByPhonenumber(String phonenumber); - - /** - * 閫氳繃閭鏌ヨ鐢ㄦ埛 - * - * @param email 閭 - * @return 鐢ㄦ埛瀵硅薄淇℃伅 - */ - SysUserVo selectUserByEmail(String email); - - /** - * 閫氳繃鐢ㄦ埛鍚嶆煡璇㈢敤鎴�(涓嶈蛋绉熸埛鎻掍欢) - * - * @param userName 鐢ㄦ埛鍚� - * @param tenantId 绉熸埛id - * @return 鐢ㄦ埛瀵硅薄淇℃伅 - */ - @InterceptorIgnore(tenantLine = "true") - SysUserVo selectTenantUserByUserName(String userName, String tenantId); - - /** - * 閫氳繃鎵嬫満鍙锋煡璇㈢敤鎴�(涓嶈蛋绉熸埛鎻掍欢) - * - * @param phonenumber 鎵嬫満鍙� - * @param tenantId 绉熸埛id - * @return 鐢ㄦ埛瀵硅薄淇℃伅 - */ - @InterceptorIgnore(tenantLine = "true") - SysUserVo selectTenantUserByPhonenumber(String phonenumber, String tenantId); - - /** - * 閫氳繃閭鏌ヨ鐢ㄦ埛(涓嶈蛋绉熸埛鎻掍欢) - * - * @param email 閭 - * @param tenantId 绉熸埛id - * @return 鐢ㄦ埛瀵硅薄淇℃伅 - */ - @InterceptorIgnore(tenantLine = "true") - SysUserVo selectTenantUserByEmail(String email, String tenantId); - - /** - * 閫氳繃鐢ㄦ埛ID鏌ヨ鐢ㄦ埛 - * - * @param userId 鐢ㄦ埛ID - * @return 鐢ㄦ埛瀵硅薄淇℃伅 - */ -// @DataPermission({ -// @DataColumn(key = "deptName", value = "d.dept_id"), -// @DataColumn(key = "userName", value = "u.user_id") -// }) - @InterceptorIgnore(dataPermission = "true") - SysUserVo selectUserById(Long userId); - - @Override -// @DataPermission({ -// @DataColumn(key = "deptName", value = "dept_id"), -// @DataColumn(key = "userName", value = "user_id") -// }) - @InterceptorIgnore(dataPermission = "true") - int update(@Param(Constants.ENTITY) SysUser user, @Param(Constants.WRAPPER) Wrapper<SysUser> updateWrapper); - - @Override -// @DataPermission({ -// @DataColumn(key = "deptName", value = "dept_id"), -// @DataColumn(key = "userName", value = "user_id") -// }) - @InterceptorIgnore(dataPermission = "true") - int updateById(@Param(Constants.ENTITY) SysUser user); - - - /** - * 灏忕▼搴� -淇敼鐢ㄦ埛淇℃伅 - * - * @param user - * - */ - void updateXcxUser(SysUserBo user); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysUserPostMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysUserPostMapper.java deleted file mode 100644 index 215698a..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysUserPostMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysUserPost; - -/** - * 鐢ㄦ埛涓庡矖浣嶅叧鑱旇〃 鏁版嵁灞� - * - * @author Lion Li - */ -public interface SysUserPostMapper extends BaseMapperPlus<SysUserPost, SysUserPost> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysUserRoleMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysUserRoleMapper.java deleted file mode 100644 index 241cc52..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/SysUserRoleMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.SysUserRole; - -import java.util.List; - -/** - * 鐢ㄦ埛涓庤鑹插叧鑱旇〃 鏁版嵁灞� - * - * @author Lion Li - */ -public interface SysUserRoleMapper extends BaseMapperPlus<SysUserRole, SysUserRole> { - - List<Long> selectUserIdsByRoleId(Long roleId); - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/VoiceRoleMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/VoiceRoleMapper.java deleted file mode 100644 index 88a4267..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/mapper/VoiceRoleMapper.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.xmzs.system.mapper; - -import com.xmzs.common.mybatis.core.mapper.BaseMapperPlus; -import com.xmzs.system.domain.VoiceRole; -import com.xmzs.system.domain.vo.VoiceRoleVo; - -/** - * 閰嶉煶瑙掕壊Mapper鎺ュ彛 - * - * @author Lion Li - * @date 2024-03-19 - */ -public interface VoiceRoleMapper extends BaseMapperPlus<VoiceRole, VoiceRoleVo> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/runner/SystemApplicationRunner.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/runner/SystemApplicationRunner.java deleted file mode 100644 index 418598a..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/runner/SystemApplicationRunner.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.xmzs.system.runner; - -import com.xmzs.system.service.ISysOssConfigService; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.boot.ApplicationArguments; -import org.springframework.boot.ApplicationRunner; -import org.springframework.stereotype.Component; - -/** - * 鍒濆鍖� system 妯″潡瀵瑰簲涓氬姟鏁版嵁 - * - * @author Lion Li - */ -@Slf4j -@RequiredArgsConstructor -@Component -public class SystemApplicationRunner implements ApplicationRunner { - - private final ISysOssConfigService ossConfigService; - - @Override - public void run(ApplicationArguments args) throws Exception { - ossConfigService.init(); - log.info("鍒濆鍖朞SS閰嶇疆鎴愬姛"); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ChatService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ChatService.java deleted file mode 100644 index f12c1d3..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ChatService.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.system.domain.bo.ChatMessageBo; - -/** - * @author hncboy - * @date 2023/3/22 19:41 - * 鑱婂ぉ鐩稿叧涓氬姟鎺ュ彛 - */ -public interface ChatService { - - - /** - * 鏍规嵁娑堣�楃殑tokens鎵i櫎浣欓 - * - * @param chatMessageBo - * @return 缁撴灉 - */ - - void deductToken(ChatMessageBo chatMessageBo); - - /** - * 鎵i櫎鐢ㄦ埛鐨勪綑棰� - * - */ - void deductUserBalance(Long userId, Double numberCost); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/IChatCostService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/IChatCostService.java deleted file mode 100644 index dc1b337..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/IChatCostService.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.system.domain.bo.ChatMessageBo; - -public interface IChatCostService { - - /** - * 鏍规嵁娑堣�楃殑tokens鎵i櫎浣欓 - * - * @param chatMessageBo - * @return 缁撴灉 - */ - - void deductToken(ChatMessageBo chatMessageBo); - - /** - * 鎵i櫎鐢ㄦ埛鐨勪綑棰� - * - */ - void deductUserBalance(Long userId, Double numberCost); - - - /** - * 鎵i櫎浠诲姟璐圭敤骞朵笖淇濆瓨璁板綍 - * - * @param type 浠诲姟绫诲瀷 - * @param prompt 浠诲姟鎻忚堪 - * @param cost 鎵i櫎璐圭敤 - */ - void taskDeduct(String type,String prompt, double cost); - - - /** - * 鍒ゆ柇鐢ㄦ埛鏄惁浠樿垂 - */ - void checkUserGrade(); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/IChatMessageService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/IChatMessageService.java deleted file mode 100644 index 41a2c33..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/IChatMessageService.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.bo.ChatMessageBo; -import com.xmzs.system.domain.vo.ChatMessageVo; - -import java.util.Collection; -import java.util.List; - -/** - * 鑱婂ぉ娑堟伅Service鎺ュ彛 - * - * @author Lion Li - * @date 2023-11-26 - */ -public interface IChatMessageService { - - /** - * 鏌ヨ鑱婂ぉ娑堟伅 - */ - ChatMessageVo queryById(Long id); - - /** - * 鏌ヨ鑱婂ぉ娑堟伅鍒楄〃 - */ - TableDataInfo<ChatMessageVo> queryPageList(ChatMessageBo bo, PageQuery pageQuery); - - /** - * 鏌ヨ鑱婂ぉ娑堟伅鍒楄〃 - */ - List<ChatMessageVo> queryList(ChatMessageBo bo); - - /** - * 鏂板鑱婂ぉ娑堟伅 - */ - Boolean insertByBo(ChatMessageBo bo); - - /** - * 淇敼鑱婂ぉ娑堟伅 - */ - Boolean updateByBo(ChatMessageBo bo); - - /** - * 鏍¢獙骞舵壒閲忓垹闄よ亰澶╂秷鎭俊鎭� - */ - Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/IChatService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/IChatService.java deleted file mode 100644 index a62e520..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/IChatService.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.system.domain.bo.ChatMessageBo; - -/** - * @author hncboy - * @date 2023/3/22 19:41 - * 鑱婂ぉ鐩稿叧涓氬姟鎺ュ彛 - */ -public interface IChatService { - - - /** - * 鏍规嵁娑堣�楃殑tokens鎵i櫎浣欓 - * - * @param chatMessageBo - * @return 缁撴灉 - */ - - void deductToken(ChatMessageBo chatMessageBo); - - /** - * 鎵i櫎鐢ㄦ埛鐨勪綑棰� - * - */ - void deductUserBalance(Long userId, Double numberCost); - - /** - * 鎵i櫎mj浠诲姟璐圭敤 - * - */ - void mjTaskDeduct(String prompt, double cost); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/IChatTokenService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/IChatTokenService.java deleted file mode 100644 index 5e168ca..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/IChatTokenService.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.system.domain.ChatToken; - -/** - * 鑱婂ぉ娑堟伅Service鎺ュ彛 - * - * @author Lion Li - * @date 2023-11-26 - */ -public interface IChatTokenService { - - /** - * 鏌ヨ鐢ㄦ埛token - */ - ChatToken queryByUserId(Long userId,String modelName); - - /** - * 娓呯┖鐢ㄦ埛token - */ - void resetToken(Long userId,String modelName); - - void editToken(ChatToken chatToken); - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/IPaymentOrdersService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/IPaymentOrdersService.java deleted file mode 100644 index bfc07d1..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/IPaymentOrdersService.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.bo.PaymentOrdersBo; -import com.xmzs.system.domain.vo.PaymentOrdersVo; - -import java.util.Collection; -import java.util.List; - -/** - * 鏀粯璁㈠崟Service鎺ュ彛 - * - * @author Lion Li - * @date 2023-12-29 - */ -public interface IPaymentOrdersService { - - /** - * 鏌ヨ鏀粯璁㈠崟 - */ - PaymentOrdersVo queryById(Long id); - - /** - * 鏌ヨ鏀粯璁㈠崟鍒楄〃 - */ - TableDataInfo<PaymentOrdersVo> queryPageList(PaymentOrdersBo bo, PageQuery pageQuery); - - /** - * 鏌ヨ鏀粯璁㈠崟鍒楄〃 - */ - List<PaymentOrdersVo> queryList(PaymentOrdersBo bo); - - /** - * 鏂板鏀粯璁㈠崟 - */ - Boolean insertByBo(PaymentOrdersBo bo); - - /** - * 淇敼鏀粯璁㈠崟 - */ - Boolean updateByBo(PaymentOrdersBo bo); - - /** - * 鏍¢獙骞舵壒閲忓垹闄ゆ敮浠樿鍗曚俊鎭� - */ - Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISseService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISseService.java deleted file mode 100644 index 3f5288c..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISseService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.xmzs.system.service; - - -import com.xmzs.common.chat.domain.request.ChatRequest; -import com.xmzs.common.chat.domain.request.Dall3Request; -import com.xmzs.common.chat.entity.Tts.TextToSpeech; -import com.xmzs.common.chat.entity.files.UploadFileResponse; -import com.xmzs.common.chat.entity.images.Item; -import com.xmzs.common.chat.entity.whisper.WhisperResponse; -import org.springframework.core.io.Resource; -import org.springframework.http.ResponseEntity; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; - -import java.util.List; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @date 2023-04-08 - */ -public interface ISseService { - - /** - * 瀹㈡埛绔彂閫佹秷鎭埌鏈嶅姟绔� - * @param chatRequest - */ - SseEmitter sseChat(ChatRequest chatRequest); - - /** - * 璇煶杞枃瀛� - * @param file - */ - WhisperResponse speechToTextTranscriptionsV2(MultipartFile file); - - /** - * 鏂囧瓧杞闊� - */ - ResponseEntity<Resource> textToSpeed(TextToSpeech textToSpeech); - - /** - * 瀹㈡埛绔彂閫佹秷鎭埌鏈嶅姟绔� - * @param chatRequest - */ - String chat(ChatRequest chatRequest); - - /** - * 缁樼敾鎺ュ彛 - * @param request - */ - List<Item> dall3(Dall3Request request); - - - /** - * 鍒ゆ柇鐢ㄦ埛鏄惁浠樿垂 - */ - void checkUserGrade(); - - UploadFileResponse upload(MultipartFile file); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysConfigService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysConfigService.java deleted file mode 100644 index 3fd4685..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysConfigService.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.bo.SysConfigBo; -import com.xmzs.system.domain.vo.SysConfigVo; - -import java.util.List; - -/** - * 鍙傛暟閰嶇疆 鏈嶅姟灞� - * - * @author Lion Li - */ -public interface ISysConfigService { - - - TableDataInfo<SysConfigVo> selectPageConfigList(SysConfigBo config, PageQuery pageQuery); - - /** - * 鏌ヨ鍙傛暟閰嶇疆淇℃伅 - * - * @param configId 鍙傛暟閰嶇疆ID - * @return 鍙傛暟閰嶇疆淇℃伅 - */ - SysConfigVo selectConfigById(Long configId); - - /** - * 鏍规嵁閿悕鏌ヨ鍙傛暟閰嶇疆淇℃伅 - * - * @param configKey 鍙傛暟閿悕 - * @return 鍙傛暟閿�� - */ - String selectConfigByKey(String configKey); - - /** - * 鑾峰彇娉ㄥ唽寮�鍏� - * @param tenantId 绉熸埛id - * @return true寮�鍚紝false鍏抽棴 - */ - boolean selectRegisterEnabled(String tenantId); - - /** - * 鏌ヨ鍙傛暟閰嶇疆鍒楄〃 - * - * @param config 鍙傛暟閰嶇疆淇℃伅 - * @return 鍙傛暟閰嶇疆闆嗗悎 - */ - List<SysConfigVo> selectConfigList(SysConfigBo config); - - /** - * 鏂板鍙傛暟閰嶇疆 - * - * @param bo 鍙傛暟閰嶇疆淇℃伅 - * @return 缁撴灉 - */ - String insertConfig(SysConfigBo bo); - - /** - * 淇敼鍙傛暟閰嶇疆 - * - * @param bo 鍙傛暟閰嶇疆淇℃伅 - * @return 缁撴灉 - */ - String updateConfig(SysConfigBo bo); - - /** - * 鎵归噺鍒犻櫎鍙傛暟淇℃伅 - * - * @param configIds 闇�瑕佸垹闄ょ殑鍙傛暟ID - */ - void deleteConfigByIds(Long[] configIds); - - /** - * 閲嶇疆鍙傛暟缂撳瓨鏁版嵁 - */ - void resetConfigCache(); - - /** - * 鏍¢獙鍙傛暟閿悕鏄惁鍞竴 - * - * @param config 鍙傛暟淇℃伅 - * @return 缁撴灉 - */ - boolean checkConfigKeyUnique(SysConfigBo config); - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysDataScopeService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysDataScopeService.java deleted file mode 100644 index 3224f95..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysDataScopeService.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xmzs.system.service; - -/** - * 閫氱敤 鏁版嵁鏉冮檺 鏈嶅姟 - * - * @author Lion Li - */ -public interface ISysDataScopeService { - - /** - * 鑾峰彇瑙掕壊鑷畾涔夋潈闄� - * - * @param roleId 瑙掕壊id - * @return 閮ㄩ棬id缁� - */ - String getRoleCustom(Long roleId); - - /** - * 鑾峰彇閮ㄩ棬鍙婁互涓嬫潈闄� - * - * @param deptId 閮ㄩ棬id - * @return 閮ㄩ棬id缁� - */ - String getDeptAndChild(Long deptId); - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysDeptService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysDeptService.java deleted file mode 100644 index 41449c3..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysDeptService.java +++ /dev/null @@ -1,118 +0,0 @@ -package com.xmzs.system.service; - -import cn.hutool.core.lang.tree.Tree; -import com.xmzs.system.domain.SysDept; -import com.xmzs.system.domain.bo.SysDeptBo; -import com.xmzs.system.domain.vo.SysDeptVo; - -import java.util.List; - -/** - * 閮ㄩ棬绠$悊 鏈嶅姟灞� - * - * @author Lion Li - */ -public interface ISysDeptService { - /** - * 鏌ヨ閮ㄩ棬绠$悊鏁版嵁 - * - * @param dept 閮ㄩ棬淇℃伅 - * @return 閮ㄩ棬淇℃伅闆嗗悎 - */ - List<SysDeptVo> selectDeptList(SysDeptBo dept); - - /** - * 鏌ヨ閮ㄩ棬鏍戠粨鏋勪俊鎭� - * - * @param dept 閮ㄩ棬淇℃伅 - * @return 閮ㄩ棬鏍戜俊鎭泦鍚� - */ - List<Tree<Long>> selectDeptTreeList(SysDeptBo dept); - - /** - * 鏋勫缓鍓嶇鎵�闇�瑕佷笅鎷夋爲缁撴瀯 - * - * @param depts 閮ㄩ棬鍒楄〃 - * @return 涓嬫媺鏍戠粨鏋勫垪琛� - */ - List<Tree<Long>> buildDeptTreeSelect(List<SysDept> depts); - - /** - * 鏍规嵁瑙掕壊ID鏌ヨ閮ㄩ棬鏍戜俊鎭� - * - * @param roleId 瑙掕壊ID - * @return 閫変腑閮ㄩ棬鍒楄〃 - */ - List<Long> selectDeptListByRoleId(Long roleId); - - /** - * 鏍规嵁閮ㄩ棬ID鏌ヨ淇℃伅 - * - * @param deptId 閮ㄩ棬ID - * @return 閮ㄩ棬淇℃伅 - */ - SysDeptVo selectDeptById(Long deptId); - - /** - * 鏍规嵁ID鏌ヨ鎵�鏈夊瓙閮ㄩ棬鏁帮紙姝e父鐘舵�侊級 - * - * @param deptId 閮ㄩ棬ID - * @return 瀛愰儴闂ㄦ暟 - */ - long selectNormalChildrenDeptById(Long deptId); - - /** - * 鏄惁瀛樺湪閮ㄩ棬瀛愯妭鐐� - * - * @param deptId 閮ㄩ棬ID - * @return 缁撴灉 - */ - boolean hasChildByDeptId(Long deptId); - - /** - * 鏌ヨ閮ㄩ棬鏄惁瀛樺湪鐢ㄦ埛 - * - * @param deptId 閮ㄩ棬ID - * @return 缁撴灉 true 瀛樺湪 false 涓嶅瓨鍦� - */ - boolean checkDeptExistUser(Long deptId); - - /** - * 鏍¢獙閮ㄩ棬鍚嶇О鏄惁鍞竴 - * - * @param dept 閮ㄩ棬淇℃伅 - * @return 缁撴灉 - */ - boolean checkDeptNameUnique(SysDeptBo dept); - - /** - * 鏍¢獙閮ㄩ棬鏄惁鏈夋暟鎹潈闄� - * - * @param deptId 閮ㄩ棬id - */ - void checkDeptDataScope(Long deptId); - - /** - * 鏂板淇濆瓨閮ㄩ棬淇℃伅 - * - * @param bo 閮ㄩ棬淇℃伅 - * @return 缁撴灉 - */ - int insertDept(SysDeptBo bo); - - /** - * 淇敼淇濆瓨閮ㄩ棬淇℃伅 - * - * @param bo 閮ㄩ棬淇℃伅 - * @return 缁撴灉 - */ - int updateDept(SysDeptBo bo); - - /** - * 鍒犻櫎閮ㄩ棬绠$悊淇℃伅 - * - * @param deptId 閮ㄩ棬ID - * @return 缁撴灉 - */ - int deleteDeptById(Long deptId); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysDictDataService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysDictDataService.java deleted file mode 100644 index 8894e46..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysDictDataService.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.bo.SysDictDataBo; -import com.xmzs.system.domain.vo.SysDictDataVo; - -import java.util.List; - -/** - * 瀛楀吀 涓氬姟灞� - * - * @author Lion Li - */ -public interface ISysDictDataService { - - - TableDataInfo<SysDictDataVo> selectPageDictDataList(SysDictDataBo dictData, PageQuery pageQuery); - - /** - * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ瀛楀吀鏁版嵁 - * - * @param dictData 瀛楀吀鏁版嵁淇℃伅 - * @return 瀛楀吀鏁版嵁闆嗗悎淇℃伅 - */ - List<SysDictDataVo> selectDictDataList(SysDictDataBo dictData); - - /** - * 鏍规嵁瀛楀吀绫诲瀷鍜屽瓧鍏搁敭鍊兼煡璇㈠瓧鍏告暟鎹俊鎭� - * - * @param dictType 瀛楀吀绫诲瀷 - * @param dictValue 瀛楀吀閿�� - * @return 瀛楀吀鏍囩 - */ - String selectDictLabel(String dictType, String dictValue); - - /** - * 鏍规嵁瀛楀吀鏁版嵁ID鏌ヨ淇℃伅 - * - * @param dictCode 瀛楀吀鏁版嵁ID - * @return 瀛楀吀鏁版嵁 - */ - SysDictDataVo selectDictDataById(Long dictCode); - - /** - * 鎵归噺鍒犻櫎瀛楀吀鏁版嵁淇℃伅 - * - * @param dictCodes 闇�瑕佸垹闄ょ殑瀛楀吀鏁版嵁ID - */ - void deleteDictDataByIds(Long[] dictCodes); - - /** - * 鏂板淇濆瓨瀛楀吀鏁版嵁淇℃伅 - * - * @param bo 瀛楀吀鏁版嵁淇℃伅 - * @return 缁撴灉 - */ - List<SysDictDataVo> insertDictData(SysDictDataBo bo); - - /** - * 淇敼淇濆瓨瀛楀吀鏁版嵁淇℃伅 - * - * @param bo 瀛楀吀鏁版嵁淇℃伅 - * @return 缁撴灉 - */ - List<SysDictDataVo> updateDictData(SysDictDataBo bo); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysDictTypeService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysDictTypeService.java deleted file mode 100644 index 513a953..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysDictTypeService.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.bo.SysDictTypeBo; -import com.xmzs.system.domain.vo.SysDictDataVo; -import com.xmzs.system.domain.vo.SysDictTypeVo; - -import java.util.List; - -/** - * 瀛楀吀 涓氬姟灞� - * - * @author Lion Li - */ -public interface ISysDictTypeService { - - - TableDataInfo<SysDictTypeVo> selectPageDictTypeList(SysDictTypeBo dictType, PageQuery pageQuery); - - /** - * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ瀛楀吀绫诲瀷 - * - * @param dictType 瀛楀吀绫诲瀷淇℃伅 - * @return 瀛楀吀绫诲瀷闆嗗悎淇℃伅 - */ - List<SysDictTypeVo> selectDictTypeList(SysDictTypeBo dictType); - - /** - * 鏍规嵁鎵�鏈夊瓧鍏哥被鍨� - * - * @return 瀛楀吀绫诲瀷闆嗗悎淇℃伅 - */ - List<SysDictTypeVo> selectDictTypeAll(); - - /** - * 鏍规嵁瀛楀吀绫诲瀷鏌ヨ瀛楀吀鏁版嵁 - * - * @param dictType 瀛楀吀绫诲瀷 - * @return 瀛楀吀鏁版嵁闆嗗悎淇℃伅 - */ - List<SysDictDataVo> selectDictDataByType(String dictType); - - /** - * 鏍规嵁瀛楀吀绫诲瀷ID鏌ヨ淇℃伅 - * - * @param dictId 瀛楀吀绫诲瀷ID - * @return 瀛楀吀绫诲瀷 - */ - SysDictTypeVo selectDictTypeById(Long dictId); - - /** - * 鏍规嵁瀛楀吀绫诲瀷鏌ヨ淇℃伅 - * - * @param dictType 瀛楀吀绫诲瀷 - * @return 瀛楀吀绫诲瀷 - */ - SysDictTypeVo selectDictTypeByType(String dictType); - - /** - * 鎵归噺鍒犻櫎瀛楀吀淇℃伅 - * - * @param dictIds 闇�瑕佸垹闄ょ殑瀛楀吀ID - */ - void deleteDictTypeByIds(Long[] dictIds); - - /** - * 閲嶇疆瀛楀吀缂撳瓨鏁版嵁 - */ - void resetDictCache(); - - /** - * 鏂板淇濆瓨瀛楀吀绫诲瀷淇℃伅 - * - * @param bo 瀛楀吀绫诲瀷淇℃伅 - * @return 缁撴灉 - */ - List<SysDictTypeVo> insertDictType(SysDictTypeBo bo); - - /** - * 淇敼淇濆瓨瀛楀吀绫诲瀷淇℃伅 - * - * @param bo 瀛楀吀绫诲瀷淇℃伅 - * @return 缁撴灉 - */ - List<SysDictDataVo> updateDictType(SysDictTypeBo bo); - - /** - * 鏍¢獙瀛楀吀绫诲瀷绉版槸鍚﹀敮涓� - * - * @param dictType 瀛楀吀绫诲瀷 - * @return 缁撴灉 - */ - boolean checkDictTypeUnique(SysDictTypeBo dictType); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysLogininforService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysLogininforService.java deleted file mode 100644 index a0ff962..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysLogininforService.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.bo.SysLogininforBo; -import com.xmzs.system.domain.vo.SysLogininforVo; - -import java.util.List; - -/** - * 绯荤粺璁块棶鏃ュ織鎯呭喌淇℃伅 鏈嶅姟灞� - * - * @author Lion Li - */ -public interface ISysLogininforService { - - - TableDataInfo<SysLogininforVo> selectPageLogininforList(SysLogininforBo logininfor, PageQuery pageQuery); - - /** - * 鏂板绯荤粺鐧诲綍鏃ュ織 - * - * @param bo 璁块棶鏃ュ織瀵硅薄 - */ - void insertLogininfor(SysLogininforBo bo); - - /** - * 鏌ヨ绯荤粺鐧诲綍鏃ュ織闆嗗悎 - * - * @param logininfor 璁块棶鏃ュ織瀵硅薄 - * @return 鐧诲綍璁板綍闆嗗悎 - */ - List<SysLogininforVo> selectLogininforList(SysLogininforBo logininfor); - - /** - * 鎵归噺鍒犻櫎绯荤粺鐧诲綍鏃ュ織 - * - * @param infoIds 闇�瑕佸垹闄ょ殑鐧诲綍鏃ュ織ID - * @return 缁撴灉 - */ - int deleteLogininforByIds(Long[] infoIds); - - /** - * 娓呯┖绯荤粺鐧诲綍鏃ュ織 - */ - void cleanLogininfor(); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysMenuService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysMenuService.java deleted file mode 100644 index 8b687ee..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysMenuService.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.xmzs.system.service; - -import cn.hutool.core.lang.tree.Tree; -import com.xmzs.system.domain.SysMenu; -import com.xmzs.system.domain.bo.SysMenuBo; -import com.xmzs.system.domain.vo.RouterVo; -import com.xmzs.system.domain.vo.SysMenuVo; - -import java.util.List; -import java.util.Set; - -/** - * 鑿滃崟 涓氬姟灞� - * - * @author Lion Li - */ -public interface ISysMenuService { - - /** - * 鏍规嵁鐢ㄦ埛鏌ヨ绯荤粺鑿滃崟鍒楄〃 - * - * @param userId 鐢ㄦ埛ID - * @return 鑿滃崟鍒楄〃 - */ - List<SysMenuVo> selectMenuList(Long userId); - - /** - * 鏍规嵁鐢ㄦ埛鏌ヨ绯荤粺鑿滃崟鍒楄〃 - * - * @param menu 鑿滃崟淇℃伅 - * @param userId 鐢ㄦ埛ID - * @return 鑿滃崟鍒楄〃 - */ - List<SysMenuVo> selectMenuList(SysMenuBo menu, Long userId); - - /** - * 鏍规嵁鐢ㄦ埛ID鏌ヨ鏉冮檺 - * - * @param userId 鐢ㄦ埛ID - * @return 鏉冮檺鍒楄〃 - */ - Set<String> selectMenuPermsByUserId(Long userId); - - /** - * 鏍规嵁瑙掕壊ID鏌ヨ鏉冮檺 - * - * @param roleId 瑙掕壊ID - * @return 鏉冮檺鍒楄〃 - */ - Set<String> selectMenuPermsByRoleId(Long roleId); - - /** - * 鏍规嵁鐢ㄦ埛ID鏌ヨ鑿滃崟鏍戜俊鎭� - * - * @param userId 鐢ㄦ埛ID - * @return 鑿滃崟鍒楄〃 - */ - List<SysMenu> selectMenuTreeByUserId(Long userId); - - /** - * 鏍规嵁瑙掕壊ID鏌ヨ鑿滃崟鏍戜俊鎭� - * - * @param roleId 瑙掕壊ID - * @return 閫変腑鑿滃崟鍒楄〃 - */ - List<Long> selectMenuListByRoleId(Long roleId); - - /** - * 鏍规嵁绉熸埛濂楅ID鏌ヨ鑿滃崟鏍戜俊鎭� - * - * @param packageId 绉熸埛濂楅ID - * @return 閫変腑鑿滃崟鍒楄〃 - */ - List<Long> selectMenuListByPackageId(Long packageId); - - /** - * 鏋勫缓鍓嶇璺敱鎵�闇�瑕佺殑鑿滃崟 - * - * @param menus 鑿滃崟鍒楄〃 - * @return 璺敱鍒楄〃 - */ - List<RouterVo> buildMenus(List<SysMenu> menus); - - /** - * 鏋勫缓鍓嶇鎵�闇�瑕佷笅鎷夋爲缁撴瀯 - * - * @param menus 鑿滃崟鍒楄〃 - * @return 涓嬫媺鏍戠粨鏋勫垪琛� - */ - List<Tree<Long>> buildMenuTreeSelect(List<SysMenuVo> menus); - - /** - * 鏍规嵁鑿滃崟ID鏌ヨ淇℃伅 - * - * @param menuId 鑿滃崟ID - * @return 鑿滃崟淇℃伅 - */ - SysMenuVo selectMenuById(Long menuId); - - /** - * 鏄惁瀛樺湪鑿滃崟瀛愯妭鐐� - * - * @param menuId 鑿滃崟ID - * @return 缁撴灉 true 瀛樺湪 false 涓嶅瓨鍦� - */ - boolean hasChildByMenuId(Long menuId); - - /** - * 鏌ヨ鑿滃崟鏄惁瀛樺湪瑙掕壊 - * - * @param menuId 鑿滃崟ID - * @return 缁撴灉 true 瀛樺湪 false 涓嶅瓨鍦� - */ - boolean checkMenuExistRole(Long menuId); - - /** - * 鏂板淇濆瓨鑿滃崟淇℃伅 - * - * @param bo 鑿滃崟淇℃伅 - * @return 缁撴灉 - */ - int insertMenu(SysMenuBo bo); - - /** - * 淇敼淇濆瓨鑿滃崟淇℃伅 - * - * @param bo 鑿滃崟淇℃伅 - * @return 缁撴灉 - */ - int updateMenu(SysMenuBo bo); - - /** - * 鍒犻櫎鑿滃崟绠$悊淇℃伅 - * - * @param menuId 鑿滃崟ID - * @return 缁撴灉 - */ - int deleteMenuById(Long menuId); - - /** - * 鏍¢獙鑿滃崟鍚嶇О鏄惁鍞竴 - * - * @param menu 鑿滃崟淇℃伅 - * @return 缁撴灉 - */ - boolean checkMenuNameUnique(SysMenuBo menu); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysModelService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysModelService.java deleted file mode 100644 index ea5ed71..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysModelService.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.bo.SysModelBo; -import com.xmzs.system.domain.vo.SysModelVo; - -import java.util.Collection; -import java.util.List; - -/** - * 绯荤粺妯″瀷Service鎺ュ彛 - * - * @author Lion Li - * @date 2024-04-04 - */ -public interface ISysModelService { - - /** - * 鏌ヨ绯荤粺妯″瀷 - */ - SysModelVo queryById(Long id); - - /** - * 鏌ヨ绯荤粺妯″瀷鍒楄〃 - */ - TableDataInfo<SysModelVo> queryPageList(SysModelBo bo, PageQuery pageQuery); - - /** - * 鏌ヨ绯荤粺妯″瀷鍒楄〃 - */ - List<SysModelVo> queryList(SysModelBo bo); - - /** - * 鏂板绯荤粺妯″瀷 - */ - Boolean insertByBo(SysModelBo bo); - - /** - * 淇敼绯荤粺妯″瀷 - */ - Boolean updateByBo(SysModelBo bo); - - /** - * 鏍¢獙骞舵壒閲忓垹闄ょ郴缁熸ā鍨嬩俊鎭� - */ - Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysNoticeService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysNoticeService.java deleted file mode 100644 index 87295ec..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysNoticeService.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.bo.SysNoticeBo; -import com.xmzs.system.domain.vo.SysNoticeVo; - -import java.util.List; - -/** - * 鍏憡 鏈嶅姟灞� - * - * @author Lion Li - */ -public interface ISysNoticeService { - - - TableDataInfo<SysNoticeVo> selectPageNoticeList(SysNoticeBo notice, PageQuery pageQuery); - - /** - * 鏌ヨ鍏憡淇℃伅 - * - * @param noticeId 鍏憡ID - * @return 鍏憡淇℃伅 - */ - SysNoticeVo selectNoticeById(Long noticeId); - - /** - * 鏌ヨ鍏憡鍒楄〃 - * - * @param notice 鍏憡淇℃伅 - * @return 鍏憡闆嗗悎 - */ - List<SysNoticeVo> selectNoticeList(SysNoticeBo notice); - - /** - * 鏂板鍏憡 - * - * @param bo 鍏憡淇℃伅 - * @return 缁撴灉 - */ - int insertNotice(SysNoticeBo bo); - - /** - * 淇敼鍏憡 - * - * @param bo 鍏憡淇℃伅 - * @return 缁撴灉 - */ - int updateNotice(SysNoticeBo bo); - - /** - * 鍒犻櫎鍏憡淇℃伅 - * - * @param noticeId 鍏憡ID - * @return 缁撴灉 - */ - int deleteNoticeById(Long noticeId); - - /** - * 鎵归噺鍒犻櫎鍏憡淇℃伅 - * - * @param noticeIds 闇�瑕佸垹闄ょ殑鍏憡ID - * @return 缁撴灉 - */ - int deleteNoticeByIds(Long[] noticeIds); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysOperLogService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysOperLogService.java deleted file mode 100644 index b0781ba..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysOperLogService.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.bo.SysOperLogBo; -import com.xmzs.system.domain.vo.SysOperLogVo; - -import java.util.List; - -/** - * 鎿嶄綔鏃ュ織 鏈嶅姟灞� - * - * @author Lion Li - */ -public interface ISysOperLogService { - - TableDataInfo<SysOperLogVo> selectPageOperLogList(SysOperLogBo operLog, PageQuery pageQuery); - - /** - * 鏂板鎿嶄綔鏃ュ織 - * - * @param bo 鎿嶄綔鏃ュ織瀵硅薄 - */ - void insertOperlog(SysOperLogBo bo); - - /** - * 鏌ヨ绯荤粺鎿嶄綔鏃ュ織闆嗗悎 - * - * @param operLog 鎿嶄綔鏃ュ織瀵硅薄 - * @return 鎿嶄綔鏃ュ織闆嗗悎 - */ - List<SysOperLogVo> selectOperLogList(SysOperLogBo operLog); - - /** - * 鎵归噺鍒犻櫎绯荤粺鎿嶄綔鏃ュ織 - * - * @param operIds 闇�瑕佸垹闄ょ殑鎿嶄綔鏃ュ織ID - * @return 缁撴灉 - */ - int deleteOperLogByIds(Long[] operIds); - - /** - * 鏌ヨ鎿嶄綔鏃ュ織璇︾粏 - * - * @param operId 鎿嶄綔ID - * @return 鎿嶄綔鏃ュ織瀵硅薄 - */ - SysOperLogVo selectOperLogById(Long operId); - - /** - * 娓呯┖鎿嶄綔鏃ュ織 - */ - void cleanOperLog(); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysOssConfigService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysOssConfigService.java deleted file mode 100644 index c73f54b..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysOssConfigService.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.bo.SysOssConfigBo; -import com.xmzs.system.domain.vo.SysOssConfigVo; - -import java.util.Collection; - -/** - * 瀵硅薄瀛樺偍閰嶇疆Service鎺ュ彛 - * - * @author Lion Li - * @author 瀛よ垷鐑熼洦 - * @date 2021-08-13 - */ -public interface ISysOssConfigService { - - /** - * 鍒濆鍖朞SS閰嶇疆 - */ - void init(); - - /** - * 鏌ヨ鍗曚釜 - */ - SysOssConfigVo queryById(Long ossConfigId); - - /** - * 鏌ヨ鍒楄〃 - */ - TableDataInfo<SysOssConfigVo> queryPageList(SysOssConfigBo bo, PageQuery pageQuery); - - - /** - * 鏍规嵁鏂板涓氬姟瀵硅薄鎻掑叆瀵硅薄瀛樺偍閰嶇疆 - * - * @param bo 瀵硅薄瀛樺偍閰嶇疆鏂板涓氬姟瀵硅薄 - * @return - */ - Boolean insertByBo(SysOssConfigBo bo); - - /** - * 鏍规嵁缂栬緫涓氬姟瀵硅薄淇敼瀵硅薄瀛樺偍閰嶇疆 - * - * @param bo 瀵硅薄瀛樺偍閰嶇疆缂栬緫涓氬姟瀵硅薄 - * @return - */ - Boolean updateByBo(SysOssConfigBo bo); - - /** - * 鏍¢獙骞跺垹闄ゆ暟鎹� - * - * @param ids 涓婚敭闆嗗悎 - * @param isValid 鏄惁鏍¢獙,true-鍒犻櫎鍓嶆牎楠�,false-涓嶆牎楠� - * @return - */ - Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); - - /** - * 鍚敤鍋滅敤鐘舵�� - */ - int updateOssConfigStatus(SysOssConfigBo bo); - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysOssService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysOssService.java deleted file mode 100644 index 8237b06..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysOssService.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.bo.SysOssBo; -import com.xmzs.system.domain.vo.SysOssVo; -import jakarta.servlet.http.HttpServletResponse; -import org.springframework.web.multipart.MultipartFile; - -import java.io.IOException; -import java.util.Collection; -import java.util.List; - -/** - * 鏂囦欢涓婁紶 鏈嶅姟灞� - * - * @author Lion Li - */ -public interface ISysOssService { - - TableDataInfo<SysOssVo> queryPageList(SysOssBo sysOss, PageQuery pageQuery); - - List<SysOssVo> listByIds(Collection<Long> ossIds); - - SysOssVo getById(Long ossId); - - SysOssVo upload(MultipartFile file); - - void download(Long ossId, HttpServletResponse response) throws IOException; - - Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysPermissionService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysPermissionService.java deleted file mode 100644 index 953f76b..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysPermissionService.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.xmzs.system.service; - -import java.util.Set; - -/** - * 鐢ㄦ埛鏉冮檺澶勭悊 - * - * @author Lion Li - */ -public interface ISysPermissionService { - - /** - * 鑾峰彇瑙掕壊鏁版嵁鏉冮檺 - * - * @param userId 鐢ㄦ埛id - * @return 瑙掕壊鏉冮檺淇℃伅 - */ - Set<String> getRolePermission(Long userId); - - /** - * 鑾峰彇鑿滃崟鏁版嵁鏉冮檺 - * - * @param userId 鐢ㄦ埛id - * @return 鑿滃崟鏉冮檺淇℃伅 - */ - Set<String> getMenuPermission(Long userId); - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysPostService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysPostService.java deleted file mode 100644 index 13e2ce2..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysPostService.java +++ /dev/null @@ -1,106 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.bo.SysPostBo; -import com.xmzs.system.domain.vo.SysPostVo; - -import java.util.List; - -/** - * 宀椾綅淇℃伅 鏈嶅姟灞� - * - * @author Lion Li - */ -public interface ISysPostService { - - - TableDataInfo<SysPostVo> selectPagePostList(SysPostBo post, PageQuery pageQuery); - - /** - * 鏌ヨ宀椾綅淇℃伅闆嗗悎 - * - * @param post 宀椾綅淇℃伅 - * @return 宀椾綅鍒楄〃 - */ - List<SysPostVo> selectPostList(SysPostBo post); - - /** - * 鏌ヨ鎵�鏈夊矖浣� - * - * @return 宀椾綅鍒楄〃 - */ - List<SysPostVo> selectPostAll(); - - /** - * 閫氳繃宀椾綅ID鏌ヨ宀椾綅淇℃伅 - * - * @param postId 宀椾綅ID - * @return 瑙掕壊瀵硅薄淇℃伅 - */ - SysPostVo selectPostById(Long postId); - - /** - * 鏍规嵁鐢ㄦ埛ID鑾峰彇宀椾綅閫夋嫨妗嗗垪琛� - * - * @param userId 鐢ㄦ埛ID - * @return 閫変腑宀椾綅ID鍒楄〃 - */ - List<Long> selectPostListByUserId(Long userId); - - /** - * 鏍¢獙宀椾綅鍚嶇О - * - * @param post 宀椾綅淇℃伅 - * @return 缁撴灉 - */ - boolean checkPostNameUnique(SysPostBo post); - - /** - * 鏍¢獙宀椾綅缂栫爜 - * - * @param post 宀椾綅淇℃伅 - * @return 缁撴灉 - */ - boolean checkPostCodeUnique(SysPostBo post); - - /** - * 閫氳繃宀椾綅ID鏌ヨ宀椾綅浣跨敤鏁伴噺 - * - * @param postId 宀椾綅ID - * @return 缁撴灉 - */ - long countUserPostById(Long postId); - - /** - * 鍒犻櫎宀椾綅淇℃伅 - * - * @param postId 宀椾綅ID - * @return 缁撴灉 - */ - int deletePostById(Long postId); - - /** - * 鎵归噺鍒犻櫎宀椾綅淇℃伅 - * - * @param postIds 闇�瑕佸垹闄ょ殑宀椾綅ID - * @return 缁撴灉 - */ - int deletePostByIds(Long[] postIds); - - /** - * 鏂板淇濆瓨宀椾綅淇℃伅 - * - * @param bo 宀椾綅淇℃伅 - * @return 缁撴灉 - */ - int insertPost(SysPostBo bo); - - /** - * 淇敼淇濆瓨宀椾綅淇℃伅 - * - * @param bo 宀椾綅淇℃伅 - * @return 缁撴灉 - */ - int updatePost(SysPostBo bo); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysRoleService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysRoleService.java deleted file mode 100644 index a9f7eeb..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysRoleService.java +++ /dev/null @@ -1,183 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.SysUserRole; -import com.xmzs.system.domain.bo.SysRoleBo; -import com.xmzs.system.domain.vo.SysRoleVo; - -import java.util.List; -import java.util.Set; - -/** - * 瑙掕壊涓氬姟灞� - * - * @author Lion Li - */ -public interface ISysRoleService { - - - TableDataInfo<SysRoleVo> selectPageRoleList(SysRoleBo role, PageQuery pageQuery); - - /** - * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ瑙掕壊鏁版嵁 - * - * @param role 瑙掕壊淇℃伅 - * @return 瑙掕壊鏁版嵁闆嗗悎淇℃伅 - */ - List<SysRoleVo> selectRoleList(SysRoleBo role); - - /** - * 鏍规嵁鐢ㄦ埛ID鏌ヨ瑙掕壊鍒楄〃 - * - * @param userId 鐢ㄦ埛ID - * @return 瑙掕壊鍒楄〃 - */ - List<SysRoleVo> selectRolesByUserId(Long userId); - - /** - * 鏍规嵁鐢ㄦ埛ID鏌ヨ瑙掕壊鏉冮檺 - * - * @param userId 鐢ㄦ埛ID - * @return 鏉冮檺鍒楄〃 - */ - Set<String> selectRolePermissionByUserId(Long userId); - - /** - * 鏌ヨ鎵�鏈夎鑹� - * - * @return 瑙掕壊鍒楄〃 - */ - List<SysRoleVo> selectRoleAll(); - - /** - * 鏍规嵁鐢ㄦ埛ID鑾峰彇瑙掕壊閫夋嫨妗嗗垪琛� - * - * @param userId 鐢ㄦ埛ID - * @return 閫変腑瑙掕壊ID鍒楄〃 - */ - List<Long> selectRoleListByUserId(Long userId); - - /** - * 閫氳繃瑙掕壊ID鏌ヨ瑙掕壊 - * - * @param roleId 瑙掕壊ID - * @return 瑙掕壊瀵硅薄淇℃伅 - */ - SysRoleVo selectRoleById(Long roleId); - - /** - * 鏍¢獙瑙掕壊鍚嶇О鏄惁鍞竴 - * - * @param role 瑙掕壊淇℃伅 - * @return 缁撴灉 - */ - boolean checkRoleNameUnique(SysRoleBo role); - - /** - * 鏍¢獙瑙掕壊鏉冮檺鏄惁鍞竴 - * - * @param role 瑙掕壊淇℃伅 - * @return 缁撴灉 - */ - boolean checkRoleKeyUnique(SysRoleBo role); - - /** - * 鏍¢獙瑙掕壊鏄惁鍏佽鎿嶄綔 - * - * @param roleId 瑙掕壊ID - */ - void checkRoleAllowed(Long roleId); - - /** - * 鏍¢獙瑙掕壊鏄惁鏈夋暟鎹潈闄� - * - * @param roleId 瑙掕壊id - */ - void checkRoleDataScope(Long roleId); - - /** - * 閫氳繃瑙掕壊ID鏌ヨ瑙掕壊浣跨敤鏁伴噺 - * - * @param roleId 瑙掕壊ID - * @return 缁撴灉 - */ - long countUserRoleByRoleId(Long roleId); - - /** - * 鏂板淇濆瓨瑙掕壊淇℃伅 - * - * @param bo 瑙掕壊淇℃伅 - * @return 缁撴灉 - */ - int insertRole(SysRoleBo bo); - - /** - * 淇敼淇濆瓨瑙掕壊淇℃伅 - * - * @param bo 瑙掕壊淇℃伅 - * @return 缁撴灉 - */ - int updateRole(SysRoleBo bo); - - /** - * 淇敼瑙掕壊鐘舵�� - * - * @param roleId 瑙掕壊ID - * @param status 瑙掕壊鐘舵�� - * @return 缁撴灉 - */ - int updateRoleStatus(Long roleId, String status); - - /** - * 淇敼鏁版嵁鏉冮檺淇℃伅 - * - * @param bo 瑙掕壊淇℃伅 - * @return 缁撴灉 - */ - int authDataScope(SysRoleBo bo); - - /** - * 閫氳繃瑙掕壊ID鍒犻櫎瑙掕壊 - * - * @param roleId 瑙掕壊ID - * @return 缁撴灉 - */ - int deleteRoleById(Long roleId); - - /** - * 鎵归噺鍒犻櫎瑙掕壊淇℃伅 - * - * @param roleIds 闇�瑕佸垹闄ょ殑瑙掕壊ID - * @return 缁撴灉 - */ - int deleteRoleByIds(Long[] roleIds); - - /** - * 鍙栨秷鎺堟潈鐢ㄦ埛瑙掕壊 - * - * @param userRole 鐢ㄦ埛鍜岃鑹插叧鑱斾俊鎭� - * @return 缁撴灉 - */ - int deleteAuthUser(SysUserRole userRole); - - /** - * 鎵归噺鍙栨秷鎺堟潈鐢ㄦ埛瑙掕壊 - * - * @param roleId 瑙掕壊ID - * @param userIds 闇�瑕佸彇娑堟巿鏉冪殑鐢ㄦ埛鏁版嵁ID - * @return 缁撴灉 - */ - int deleteAuthUsers(Long roleId, Long[] userIds); - - /** - * 鎵归噺閫夋嫨鎺堟潈鐢ㄦ埛瑙掕壊 - * - * @param roleId 瑙掕壊ID - * @param userIds 闇�瑕佸垹闄ょ殑鐢ㄦ埛鏁版嵁ID - * @return 缁撴灉 - */ - int insertAuthUsers(Long roleId, Long[] userIds); - - void cleanOnlineUserByRole(Long roleId); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysTenantPackageService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysTenantPackageService.java deleted file mode 100644 index 4e93b6d..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysTenantPackageService.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.bo.SysTenantPackageBo; -import com.xmzs.system.domain.vo.SysTenantPackageVo; - -import java.util.Collection; -import java.util.List; - -/** - * 绉熸埛濂楅Service鎺ュ彛 - * - * @author Michelle.Chung - */ -public interface ISysTenantPackageService { - - /** - * 鏌ヨ绉熸埛濂楅 - */ - SysTenantPackageVo queryById(Long packageId); - - /** - * 鏌ヨ绉熸埛濂楅鍒楄〃 - */ - TableDataInfo<SysTenantPackageVo> queryPageList(SysTenantPackageBo bo, PageQuery pageQuery); - - /** - * 鏌ヨ绉熸埛濂楅宸插惎鐢ㄥ垪琛� - */ - List<SysTenantPackageVo> selectList(); - - /** - * 鏌ヨ绉熸埛濂楅鍒楄〃 - */ - List<SysTenantPackageVo> queryList(SysTenantPackageBo bo); - - /** - * 鏂板绉熸埛濂楅 - */ - Boolean insertByBo(SysTenantPackageBo bo); - - /** - * 淇敼绉熸埛濂楅 - */ - Boolean updateByBo(SysTenantPackageBo bo); - - /** - * 淇敼濂楅鐘舵�� - */ - int updatePackageStatus(SysTenantPackageBo bo); - - /** - * 鏍¢獙骞舵壒閲忓垹闄ょ鎴峰椁愪俊鎭� - */ - Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysTenantService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysTenantService.java deleted file mode 100644 index 9879b21..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysTenantService.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.bo.SysTenantBo; -import com.xmzs.system.domain.vo.SysTenantVo; - -import java.util.Collection; -import java.util.List; - -/** - * 绉熸埛Service鎺ュ彛 - * - * @author Michelle.Chung - */ -public interface ISysTenantService { - - /** - * 鏌ヨ绉熸埛 - */ - SysTenantVo queryById(Long id); - - /** - * 鍩轰簬绉熸埛ID鏌ヨ绉熸埛 - */ - SysTenantVo queryByTenantId(String tenantId); - - /** - * 鏌ヨ绉熸埛鍒楄〃 - */ - TableDataInfo<SysTenantVo> queryPageList(SysTenantBo bo, PageQuery pageQuery); - - /** - * 鏌ヨ绉熸埛鍒楄〃 - */ - List<SysTenantVo> queryList(SysTenantBo bo); - - /** - * 鏂板绉熸埛 - */ - Boolean insertByBo(SysTenantBo bo); - - /** - * 淇敼绉熸埛 - */ - Boolean updateByBo(SysTenantBo bo); - - /** - * 淇敼绉熸埛鐘舵�� - */ - int updateTenantStatus(SysTenantBo bo); - - /** - * 鏍¢獙绉熸埛鏄惁鍏佽鎿嶄綔 - */ - void checkTenantAllowed(String tenantId); - - /** - * 鏍¢獙骞舵壒閲忓垹闄ょ鎴蜂俊鎭� - */ - Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); - - /** - * 鏍¢獙浼佷笟鍚嶇О鏄惁鍞竴 - */ - boolean checkCompanyNameUnique(SysTenantBo bo); - - /** - * 鏍¢獙璐﹀彿浣欓 - */ - boolean checkAccountBalance(String tenantId); - - /** - * 鏍¢獙鏈夋晥鏈� - */ - boolean checkExpireTime(String tenantId); - - /** - * 鍚屾绉熸埛濂楅 - */ - Boolean syncTenantPackage(String tenantId, String packageId); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysUserService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysUserService.java deleted file mode 100644 index bfc22bd..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/ISysUserService.java +++ /dev/null @@ -1,230 +0,0 @@ -package com.xmzs.system.service; - -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.SysUser; -import com.xmzs.system.domain.bo.SysUserBo; -import com.xmzs.system.domain.vo.SysUserVo; - -import java.util.List; - -/** - * 鐢ㄦ埛 涓氬姟灞� - * - * @author Lion Li - */ -public interface ISysUserService { - - - TableDataInfo<SysUserVo> selectPageUserList(SysUserBo user, PageQuery pageQuery); - - /** - * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ鐢ㄦ埛鍒楄〃 - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅 - */ - List<SysUserVo> selectUserList(SysUserBo user); - - /** - * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ宸插垎閰嶇敤鎴疯鑹插垪琛� - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅 - */ - TableDataInfo<SysUserVo> selectAllocatedList(SysUserBo user, PageQuery pageQuery); - - /** - * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ鏈垎閰嶇敤鎴疯鑹插垪琛� - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅 - */ - TableDataInfo<SysUserVo> selectUnallocatedList(SysUserBo user, PageQuery pageQuery); - - /** - * 閫氳繃鐢ㄦ埛鍚嶆煡璇㈢敤鎴� - * - * @param userName 鐢ㄦ埛鍚� - * @return 鐢ㄦ埛瀵硅薄淇℃伅 - */ - SysUserVo selectUserByUserName(String userName); - - /** - * 閫氳繃OpenId鏌ヨ鐢ㄦ埛 - * - * @Date 2023/5/18 - * @param openId - * @return SysUserVo - **/ - SysUserVo selectUserByOpenId(String openId); - - /** - * 閫氳繃鎵嬫満鍙锋煡璇㈢敤鎴� - * - * @param phonenumber 鎵嬫満鍙� - * @return 鐢ㄦ埛瀵硅薄淇℃伅 - */ - SysUserVo selectUserByPhonenumber(String phonenumber); - - /** - * 閫氳繃鐢ㄦ埛ID鏌ヨ鐢ㄦ埛 - * - * @param userId 鐢ㄦ埛ID - * @return 鐢ㄦ埛瀵硅薄淇℃伅 - */ - SysUserVo selectUserById(Long userId); - - /** - * 鏍规嵁鐢ㄦ埛ID鏌ヨ鐢ㄦ埛鎵�灞炶鑹茬粍 - * - * @param userName 鐢ㄦ埛鍚� - * @return 缁撴灉 - */ - String selectUserRoleGroup(String userName); - - /** - * 鏍规嵁鐢ㄦ埛ID鏌ヨ鐢ㄦ埛鎵�灞炲矖浣嶇粍 - * - * @param userName 鐢ㄦ埛鍚� - * @return 缁撴灉 - */ - String selectUserPostGroup(String userName); - - /** - * 鏍¢獙鐢ㄦ埛鍚嶇О鏄惁鍞竴 - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 缁撴灉 - */ - boolean checkUserNameUnique(SysUserBo user); - - /** - * 鏍¢獙鎵嬫満鍙风爜鏄惁鍞竴 - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 缁撴灉 - */ - boolean checkPhoneUnique(SysUserBo user); - - /** - * 鏍¢獙email鏄惁鍞竴 - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 缁撴灉 - */ - boolean checkEmailUnique(SysUserBo user); - - /** - * 鏍¢獙鐢ㄦ埛鏄惁鍏佽鎿嶄綔 - * - * @param userId 鐢ㄦ埛ID - */ - void checkUserAllowed(Long userId); - - /** - * 鏍¢獙鐢ㄦ埛鏄惁鏈夋暟鎹潈闄� - * - * @param userId 鐢ㄦ埛id - */ - void checkUserDataScope(Long userId); - - /** - * 鏂板鐢ㄦ埛淇℃伅 - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 缁撴灉 - */ - int insertUser(SysUserBo user); - - /** - * 娉ㄥ唽鐢ㄦ埛淇℃伅 - * - * @Date 2023/5/18 - * @param user - * @param tenantId - * @return SysUser - **/ - SysUser registerUser(SysUserBo user, String tenantId); - - /** - * 淇敼鐢ㄦ埛淇℃伅 - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 缁撴灉 - */ - int updateUser(SysUserBo user); - - /** - * 灏忕▼搴� - 淇敼鐢ㄦ埛淇℃伅 - * - * @param user 鐢ㄦ埛淇℃伅 - * - */ - SysUserVo updateXcxUser(SysUserBo user); - - /** - * 鐢ㄦ埛鎺堟潈瑙掕壊 - * - * @param userId 鐢ㄦ埛ID - * @param roleIds 瑙掕壊缁� - */ - void insertUserAuth(Long userId, Long[] roleIds); - - /** - * 淇敼鐢ㄦ埛鐘舵�� - * - * @param userId 鐢ㄦ埛ID - * @param status 甯愬彿鐘舵�� - * @return 缁撴灉 - */ - int updateUserStatus(Long userId, String status); - - /** - * 淇敼鐢ㄦ埛鍩烘湰淇℃伅 - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 缁撴灉 - */ - int updateUserProfile(SysUserBo user); - - /** - * 淇敼鐢ㄦ埛澶村儚 - * - * @param userId 鐢ㄦ埛ID - * @param avatar 澶村儚鍦板潃 - * @return 缁撴灉 - */ - boolean updateUserAvatar(Long userId, String avatar); - - boolean updateUserName(Long userId, String nickName); - - /** - * 閲嶇疆鐢ㄦ埛瀵嗙爜 - * - * @param userId 鐢ㄦ埛ID - * @param password 瀵嗙爜 - * @return 缁撴灉 - */ - - int resetUserPwd(Long userId, String password); - - - - /** - * 閫氳繃鐢ㄦ埛ID鍒犻櫎鐢ㄦ埛 - * - * @param userId 鐢ㄦ埛ID - * @return 缁撴灉 - */ - int deleteUserById(Long userId); - - /** - * 鎵归噺鍒犻櫎鐢ㄦ埛淇℃伅 - * - * @param userIds 闇�瑕佸垹闄ょ殑鐢ㄦ埛ID - * @return 缁撴灉 - */ - int deleteUserByIds(Long[] userIds); - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/SseService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/SseService.java deleted file mode 100644 index 297b3b1..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/SseService.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.xmzs.system.service; - - -import com.xmzs.common.chat.domain.request.ChatRequest; -import com.xmzs.common.chat.domain.request.Dall3Request; -import com.xmzs.common.chat.entity.images.Item; -import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; - -import java.util.List; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @date 2023-04-08 - */ -public interface SseService { - - /** - * 瀹㈡埛绔彂閫佹秷鎭埌鏈嶅姟绔� - * @param chatRequest - */ - SseEmitter sseChat(ChatRequest chatRequest); - - /** - * 缁樼敾鎺ュ彛 - * @param request - */ - List<Item> dall3(Dall3Request request); - - - /** - * mj缁樼敾鎺ュ彛 - */ - void mjTask(); - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/SysLoginService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/SysLoginService.java deleted file mode 100644 index 29dbacb..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/SysLoginService.java +++ /dev/null @@ -1,418 +0,0 @@ -package com.xmzs.system.service; - -import cn.binarywang.wx.miniapp.api.WxMaService; -import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; -import cn.binarywang.wx.miniapp.util.WxMaConfigHolder; -import cn.dev33.satoken.exception.NotLoginException; -import cn.dev33.satoken.secure.BCrypt; -import cn.dev33.satoken.stp.StpUtil; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.RandomUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.xmzs.common.core.constant.Constants; -import com.xmzs.common.core.constant.GlobalConstants; -import com.xmzs.common.core.constant.TenantConstants; -import com.xmzs.common.core.domain.dto.RoleDTO; -import com.xmzs.common.core.domain.model.LoginUser; -import com.xmzs.common.core.domain.model.VisitorLoginBody; -import com.xmzs.common.core.domain.model.VisitorLoginUser; -import com.xmzs.common.core.enums.*; -import com.xmzs.common.core.exception.user.CaptchaException; -import com.xmzs.common.core.exception.user.CaptchaExpireException; -import com.xmzs.common.core.exception.user.UserException; -import com.xmzs.common.core.utils.*; -import com.xmzs.common.log.event.LogininforEvent; -import com.xmzs.common.redis.utils.RedisUtils; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.common.tenant.exception.TenantException; -import com.xmzs.common.tenant.helper.TenantHelper; -import com.xmzs.system.domain.SysUser; -import com.xmzs.system.domain.bo.SysUserBo; -import com.xmzs.system.domain.vo.SysTenantVo; -import com.xmzs.system.domain.vo.SysUserVo; -import com.xmzs.system.mapper.SysUserMapper; -import com.xmzs.web.domain.vo.LoginVo; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import me.chanjar.weixin.common.error.WxErrorException; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Service; - -import java.time.Duration; -import java.util.Date; -import java.util.List; -import java.util.function.Supplier; - -/** - * 鐧诲綍鏍¢獙鏂规硶 - * - * @author Lion Li - */ -@RequiredArgsConstructor -@Slf4j -@Service -public class SysLoginService { - - private final SysUserMapper userMapper; - private final ISysPermissionService permissionService; - private final ISysTenantService tenantService; - private final WxMaService wxMaService; - private final ISysUserService userService; - - @Value("${user.password.maxRetryCount}") - private Integer maxRetryCount; - - @Value("${user.password.lockTime}") - private Integer lockTime; - - /** - * 鐧诲綍楠岃瘉 - * - * @param username 鐢ㄦ埛鍚� - * @param password 瀵嗙爜 - * @param code 楠岃瘉鐮� - * @param uuid 鍞竴鏍囪瘑 - * @return 缁撴灉 - */ - public String login(String tenantId, String username, String password, String code, String uuid) { - SysUserVo user = loadUserByUsername(tenantId, username); - checkLogin(LoginType.PASSWORD, tenantId, username, () -> !BCrypt.checkpw(password, user.getPassword())); - // 姝ゅ鍙牴鎹櫥褰曠敤鎴风殑鏁版嵁涓嶅悓 鑷鍒涘缓 loginUser - LoginUser loginUser = buildLoginUser(user); - // 鐢熸垚token - LoginHelper.loginByDevice(loginUser, DeviceType.PC); - - recordLogininfor(loginUser.getTenantId(), username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")); - recordLoginInfo(user.getUserId()); - return StpUtil.getTokenValue(); - } - - public String smsLogin(String tenantId, String phonenumber, String smsCode) { - // 鏍¢獙绉熸埛 - checkTenant(tenantId); - // 閫氳繃鎵嬫満鍙锋煡鎵剧敤鎴� - SysUserVo user = loadUserByPhonenumber(tenantId, phonenumber); - - checkLogin(LoginType.SMS, tenantId, user.getUserName(), () -> !validateSmsCode(tenantId, phonenumber, smsCode)); - // 姝ゅ鍙牴鎹櫥褰曠敤鎴风殑鏁版嵁涓嶅悓 鑷鍒涘缓 loginUser - LoginUser loginUser = buildLoginUser(user); - // 鐢熸垚token - LoginHelper.loginByDevice(loginUser, DeviceType.APP); - - recordLogininfor(loginUser.getTenantId(), user.getUserName(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")); - recordLoginInfo(user.getUserId()); - return StpUtil.getTokenValue(); - } - - public String emailLogin(String tenantId, String email, String emailCode) { - // 鏍¢獙绉熸埛 - checkTenant(tenantId); - // 閫氳繃鎵嬫満鍙锋煡鎵剧敤鎴� - SysUserVo user = loadUserByEmail(tenantId, email); - - checkLogin(LoginType.EMAIL, tenantId, user.getUserName(), () -> !validateEmailCode(tenantId, email, emailCode)); - // 姝ゅ鍙牴鎹櫥褰曠敤鎴风殑鏁版嵁涓嶅悓 鑷鍒涘缓 loginUser - LoginUser loginUser = buildLoginUser(user); - // 鐢熸垚token - LoginHelper.loginByDevice(loginUser, DeviceType.APP); - - recordLogininfor(loginUser.getTenantId(), user.getUserName(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")); - recordLoginInfo(user.getUserId()); - return StpUtil.getTokenValue(); - } - - - /** - * 娓稿鐧诲綍 - * - * @param loginBody - * @return String - * @Date 2023/5/18 - **/ - public LoginVo visitorLogin(VisitorLoginBody loginBody) { - String openid = ""; - // PC绔父瀹㈢櫥褰� - if(LoginUserType.PC.getCode().equals(loginBody.getType())){ - openid = loginBody.getCode(); - }else { - // 灏忕▼搴忓尶鍚嶇櫥褰� - try { - WxMaJscode2SessionResult session = wxMaService.getUserService().getSessionInfo(loginBody.getCode()); - openid = session.getOpenid(); - } catch ( - WxErrorException e) { - log.error(e.getMessage(), e); - } finally { - // 娓呯悊ThreadLocal - WxMaConfigHolder.remove(); - } - } - // 浣跨敤 openid 鏌ヨ缁戝畾鐢ㄦ埛 濡傛湭缁戝畾鐢ㄦ埛 鍒欐牴鎹笟鍔¤嚜琛屽鐞� 渚嬪 鍒涘缓榛樿鐢ㄦ埛 - SysUserVo user = userService.selectUserByOpenId(openid); - VisitorLoginUser loginUser = new VisitorLoginUser(); - if (ObjectUtil.isNull(user)) { - SysUserBo sysUser = new SysUserBo(); - // 鏀逛负鑷 - String name = "娓稿" + RandomUtil.randomInt(10000); - // 璁剧疆榛樿鐢ㄦ埛鍚� - sysUser.setUserName(name); - // 璁剧疆榛樿鏄电О - sysUser.setNickName(name); - // 璁剧疆榛樿瀵嗙爜 - sysUser.setPassword(BCrypt.hashpw("123456")); - // 璁剧疆寰俊openId - sysUser.setOpenId(openid); - // 娉ㄥ唽鐢ㄦ埛,璁剧疆榛樿绉熸埛涓�0 - SysUser registerUser = userService.registerUser(sysUser, "0"); - // 鏋勫缓鐧诲綍鐢ㄦ埛淇℃伅 - loginUser.setTenantId("0"); - loginUser.setUserId(registerUser.getUserId()); - loginUser.setUsername(registerUser.getUserName()); - loginUser.setUserType(UserType.APP_USER.getUserType()); - loginUser.setOpenid(openid); - loginUser.setNickName(registerUser.getNickName()); - } else { - // 姝ゅ鍙牴鎹櫥褰曠敤鎴风殑鏁版嵁涓嶅悓 鑷鍒涘缓 loginUser - loginUser.setTenantId(user.getTenantId()); - loginUser.setUserId(user.getUserId()); - loginUser.setUsername(user.getUserName()); - loginUser.setUserType(user.getUserType()); - loginUser.setNickName(user.getNickName()); - loginUser.setAvatar(user.getWxAvatar()); - loginUser.setOpenid(openid); - } - // 鐢熸垚token - LoginHelper.loginByDevice(loginUser, DeviceType.XCX); - recordLogininfor(loginUser.getTenantId(), loginUser.getUsername(), Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")); - LoginVo loginVo = new LoginVo(); - // 鐢熸垚浠ょ墝 - loginVo.setToken(StpUtil.getTokenValue()); - loginVo.setUserInfo(loginUser); - return loginVo; - } - - /** - * 閫�鍑虹櫥褰� - */ - public void logout() { - try { - LoginUser loginUser = LoginHelper.getLoginUser(); - if (TenantHelper.isEnable() && LoginHelper.isSuperAdmin()) { - // 瓒呯骇绠$悊鍛� 鐧诲嚭娓呴櫎鍔ㄦ�佺鎴� - TenantHelper.clearDynamic(); - } - StpUtil.logout(); - recordLogininfor(loginUser.getTenantId(), loginUser.getUsername(), Constants.LOGOUT, MessageUtils.message("user.logout.success")); - } catch (NotLoginException ignored) { - } - } - - /** - * 璁板綍鐧诲綍淇℃伅 - * - * @param tenantId 绉熸埛ID - * @param username 鐢ㄦ埛鍚� - * @param status 鐘舵�� - * @param message 娑堟伅鍐呭 - */ - private void recordLogininfor(String tenantId, String username, String status, String message) { - LogininforEvent logininforEvent = new LogininforEvent(); - logininforEvent.setTenantId(tenantId); - logininforEvent.setUsername(username); - logininforEvent.setStatus(status); - logininforEvent.setMessage(message); - logininforEvent.setRequest(ServletUtils.getRequest()); - SpringUtils.context().publishEvent(logininforEvent); - } - - /** - * 鏍¢獙鐭俊楠岃瘉鐮� - */ - private boolean validateSmsCode(String tenantId, String phonenumber, String smsCode) { - String code = RedisUtils.getCacheObject(GlobalConstants.CAPTCHA_CODE_KEY + phonenumber); - if (StringUtils.isBlank(code)) { - recordLogininfor(tenantId, phonenumber, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")); - throw new CaptchaExpireException(); - } - return code.equals(smsCode); - } - - /** - * 鏍¢獙閭楠岃瘉鐮� - */ - private boolean validateEmailCode(String tenantId, String email, String emailCode) { - String code = RedisUtils.getCacheObject(GlobalConstants.CAPTCHA_CODE_KEY + email); - if (StringUtils.isBlank(code)) { - recordLogininfor(tenantId, email, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")); - throw new CaptchaExpireException(); - } - return code.equals(emailCode); - } - - /** - * 鏍¢獙楠岃瘉鐮� - * - * @param username 鐢ㄦ埛鍚� - * @param code 楠岃瘉鐮� - * @param uuid 鍞竴鏍囪瘑 - */ - public void validateCaptcha(String tenantId, String username, String code, String uuid) { - String verifyKey = GlobalConstants.CAPTCHA_CODE_KEY + StringUtils.defaultString(uuid, ""); - String captcha = RedisUtils.getCacheObject(verifyKey); - RedisUtils.deleteObject(verifyKey); - if (captcha == null) { - recordLogininfor(tenantId, username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")); - throw new CaptchaExpireException(); - } - if (!code.equalsIgnoreCase(captcha)) { - recordLogininfor(tenantId, username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")); - throw new CaptchaException(); - } - } - - private SysUserVo loadUserByUsername(String tenantId, String username) { - - SysUser user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>() - .select(SysUser::getUserName, SysUser::getStatus) - .eq(TenantHelper.isEnable(), SysUser::getTenantId, tenantId) - .eq(SysUser::getUserName, username)); - if (ObjectUtil.isNull(user)) { - log.info("鐧诲綍鐢ㄦ埛锛歿} 涓嶅瓨鍦�.", username); - throw new UserException("user.not.exists", username); - } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { - log.info("鐧诲綍鐢ㄦ埛锛歿} 宸茶鍋滅敤.", username); - throw new UserException("user.blocked", username); - } - if (TenantHelper.isEnable()) { - return userMapper.selectTenantUserByUserName(username, tenantId); - } - return userMapper.selectUserByUserName(username); - } - - private SysUserVo loadUserByPhonenumber(String tenantId, String phonenumber) { - SysUser user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>() - .select(SysUser::getPhonenumber, SysUser::getStatus) - .eq(TenantHelper.isEnable(), SysUser::getTenantId, tenantId) - .eq(SysUser::getPhonenumber, phonenumber)); - if (ObjectUtil.isNull(user)) { - log.info("鐧诲綍鐢ㄦ埛锛歿} 涓嶅瓨鍦�.", phonenumber); - throw new UserException("user.not.exists", phonenumber); - } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { - log.info("鐧诲綍鐢ㄦ埛锛歿} 宸茶鍋滅敤.", phonenumber); - throw new UserException("user.blocked", phonenumber); - } - if (TenantHelper.isEnable()) { - return userMapper.selectTenantUserByPhonenumber(phonenumber, tenantId); - } - return userMapper.selectUserByPhonenumber(phonenumber); - } - - private SysUserVo loadUserByEmail(String tenantId, String email) { - SysUser user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>() - .select(SysUser::getPhonenumber, SysUser::getStatus) - .eq(TenantHelper.isEnable(), SysUser::getTenantId, tenantId) - .eq(SysUser::getEmail, email)); - if (ObjectUtil.isNull(user)) { - log.info("鐧诲綍鐢ㄦ埛锛歿} 涓嶅瓨鍦�.", email); - throw new UserException("user.not.exists", email); - } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { - log.info("鐧诲綍鐢ㄦ埛锛歿} 宸茶鍋滅敤.", email); - throw new UserException("user.blocked", email); - } - if (TenantHelper.isEnable()) { - return userMapper.selectTenantUserByEmail(email, tenantId); - } - return userMapper.selectUserByEmail(email); - } - - /** - * 鏋勫缓鐧诲綍鐢ㄦ埛 - */ - private LoginUser buildLoginUser(SysUserVo user) { - LoginUser loginUser = new LoginUser(); - loginUser.setTenantId(user.getTenantId()); - loginUser.setUserId(user.getUserId()); - loginUser.setDeptId(user.getDeptId()); - loginUser.setUsername(user.getUserName()); - loginUser.setAvatar(user.getAvatar()); - loginUser.setUserType(user.getUserType()); - loginUser.setMenuPermission(permissionService.getMenuPermission(user.getUserId())); - loginUser.setRolePermission(permissionService.getRolePermission(user.getUserId())); - loginUser.setDeptName(ObjectUtil.isNull(user.getDept()) ? "" : user.getDept().getDeptName()); - List<RoleDTO> roles = BeanUtil.copyToList(user.getRoles(), RoleDTO.class); - loginUser.setRoles(roles); - return loginUser; - } - - /** - * 璁板綍鐧诲綍淇℃伅 - * - * @param userId 鐢ㄦ埛ID - */ - public void recordLoginInfo(Long userId) { - SysUser sysUser = new SysUser(); - sysUser.setUserId(userId); - sysUser.setLoginIp(ServletUtils.getClientIP()); - sysUser.setLoginDate(DateUtils.getNowDate()); - sysUser.setUpdateBy(userId); - userMapper.updateById(sysUser); - } - - /** - * 鐧诲綍鏍¢獙 - */ - private void checkLogin(LoginType loginType, String tenantId, String username, Supplier<Boolean> supplier) { - String errorKey = GlobalConstants.PWD_ERR_CNT_KEY + username; - String loginFail = Constants.LOGIN_FAIL; - - // 鑾峰彇鐢ㄦ埛鐧诲綍閿欒娆℃暟(鍙嚜瀹氫箟闄愬埗绛栫暐 渚嬪: key + username + ip) - Integer errorNumber = RedisUtils.getCacheObject(errorKey); - // 閿佸畾鏃堕棿鍐呯櫥褰� 鍒欒涪鍑� - if (ObjectUtil.isNotNull(errorNumber) && errorNumber.equals(maxRetryCount)) { - recordLogininfor(tenantId, username, loginFail, MessageUtils.message(loginType.getRetryLimitExceed(), maxRetryCount, lockTime)); - throw new UserException(loginType.getRetryLimitExceed(), maxRetryCount, lockTime); - } - - if (supplier.get()) { - // 鏄惁绗竴娆� - errorNumber = ObjectUtil.isNull(errorNumber) ? 1 : errorNumber + 1; - // 杈惧埌瑙勫畾閿欒娆℃暟 鍒欓攣瀹氱櫥褰� - if (errorNumber.equals(maxRetryCount)) { - RedisUtils.setCacheObject(errorKey, errorNumber, Duration.ofMinutes(lockTime)); - recordLogininfor(tenantId, username, loginFail, MessageUtils.message(loginType.getRetryLimitExceed(), maxRetryCount, lockTime)); - throw new UserException(loginType.getRetryLimitExceed(), maxRetryCount, lockTime); - } else { - // 鏈揪鍒拌瀹氶敊璇鏁� 鍒欓�掑 - RedisUtils.setCacheObject(errorKey, errorNumber); - recordLogininfor(tenantId, username, loginFail, MessageUtils.message(loginType.getRetryLimitCount(), errorNumber)); - throw new UserException(loginType.getRetryLimitCount(), errorNumber); - } - } - - // 鐧诲綍鎴愬姛 娓呯┖閿欒娆℃暟 - RedisUtils.deleteObject(errorKey); - } - - private void checkTenant(String tenantId) { - if (!TenantHelper.isEnable()) { - return; - } - if (TenantConstants.DEFAULT_TENANT_ID.equals(tenantId)) { - return; - } - SysTenantVo tenant = tenantService.queryByTenantId(tenantId); - if (ObjectUtil.isNull(tenant)) { - log.info("鐧诲綍绉熸埛锛歿} 涓嶅瓨鍦�.", tenantId); - throw new TenantException("tenant.not.exists"); - } else if (TenantStatus.DISABLE.getCode().equals(tenant.getStatus())) { - log.info("鐧诲綍绉熸埛锛歿} 宸茶鍋滅敤.", tenantId); - throw new TenantException("tenant.blocked"); - } else if (ObjectUtil.isNotNull(tenant.getExpireTime()) - && new Date().after(tenant.getExpireTime())) { - log.info("鐧诲綍绉熸埛锛歿} 宸茶秴杩囨湁鏁堟湡.", tenantId); - throw new TenantException("tenant.expired"); - } - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/SysRegisterService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/SysRegisterService.java deleted file mode 100644 index 985e8a5..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/SysRegisterService.java +++ /dev/null @@ -1,145 +0,0 @@ -package com.xmzs.system.service; - -import cn.dev33.satoken.secure.BCrypt; -import com.xmzs.common.chat.constant.OpenAIConst; -import com.xmzs.common.core.constant.Constants; -import com.xmzs.common.core.constant.GlobalConstants; -import com.xmzs.common.core.domain.model.RegisterBody; -import com.xmzs.common.core.exception.base.BaseException; -import com.xmzs.common.core.exception.user.CaptchaException; -import com.xmzs.common.core.exception.user.CaptchaExpireException; -import com.xmzs.common.core.exception.user.UserException; -import com.xmzs.common.core.utils.MessageUtils; -import com.xmzs.common.core.utils.ServletUtils; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.log.event.LogininforEvent; -import com.xmzs.common.redis.utils.RedisUtils; -import com.xmzs.system.domain.SysUser; -import com.xmzs.system.domain.SysUserRole; -import com.xmzs.system.domain.bo.SysUserBo; -import com.xmzs.system.domain.vo.SysUserVo; -import com.xmzs.system.mapper.SysUserRoleMapper; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; - -import java.math.BigDecimal; - -/** - * 娉ㄥ唽鏍¢獙鏂规硶 - * - * @author Lion Li - */ -@RequiredArgsConstructor -@Service -public class SysRegisterService { - - private final ISysUserService userService; - - private final SysUserRoleMapper userRoleMapper; - - /** - * 娉ㄥ唽 - */ - public void register(RegisterBody registerBody) { - String tenantId = Constants.TENANT_ID; - if(StringUtils.isNotBlank(registerBody.getTenantId())){ - tenantId = registerBody.getTenantId(); - } - String username = registerBody.getUsername(); - String password = registerBody.getPassword(); - // 妫�鏌ラ獙璇佺爜鏄惁姝g‘ - validateEmail(username,registerBody.getCode()); - SysUserBo sysUser = new SysUserBo(); - sysUser.setUserName(username); - sysUser.setNickName(username); - sysUser.setPassword(BCrypt.hashpw(password)); - if (!userService.checkUserNameUnique(sysUser)) { - throw new UserException("user.register.save.error", username); - } - // 璁剧疆榛樿浣欓 - sysUser.setUserBalance(new BigDecimal(OpenAIConst.USER_BALANCE)); - SysUser user = userService.registerUser(sysUser, tenantId); - if (user == null) { - throw new UserException("user.register.error"); - } - // 璁剧疆榛樿瑙掕壊 - SysUserRole sysRole = new SysUserRole(); - sysRole.setUserId(user.getUserId()); - sysRole.setRoleId(1L); - userRoleMapper.insert(sysRole); - recordLogininfor(tenantId, username, Constants.REGISTER, MessageUtils.message("user.register.success")); - } - - /** - * 閲嶇疆瀵嗙爜 - */ - public void resetPassWord(RegisterBody registerBody) { - String username = registerBody.getUsername(); - String password = registerBody.getPassword(); - SysUserVo user = userService.selectUserByUserName(username); - if(user == null){ - throw new UserException(String.format("鐢ㄦ埛銆�%s銆�,鏈敞鍐�!",username)); - } - // 妫�鏌ラ獙璇佺爜鏄惁姝g‘ - validateEmail(username,registerBody.getCode()); - userService.resetUserPwd(user.getUserId(),BCrypt.hashpw(password)); - } - - /** - * 鏍¢獙閭楠岃瘉鐮� - * - * @param username 鐢ㄦ埛鍚� - */ - public void validateEmail(String username,String code) { - String key = GlobalConstants.CAPTCHA_CODE_KEY + username; - String captcha = RedisUtils.getCacheObject(key); - if(code.equals(captcha)){ - RedisUtils.deleteObject(captcha); - }else { - throw new BaseException("楠岃瘉鐮侀敊璇�,璇烽噸璇曪紒"); - } - } - - - /** - * 鏍¢獙楠岃瘉鐮� - * - * @param username 鐢ㄦ埛鍚� - * @param code 楠岃瘉鐮� - * @param uuid 鍞竴鏍囪瘑 - */ - public void validateCaptcha(String tenantId, String username, String code, String uuid) { - String verifyKey = GlobalConstants.CAPTCHA_CODE_KEY + StringUtils.defaultString(uuid, ""); - String captcha = RedisUtils.getCacheObject(verifyKey); - RedisUtils.deleteObject(verifyKey); - if (captcha == null) { - recordLogininfor(tenantId, username, Constants.REGISTER, MessageUtils.message("user.jcaptcha.expire")); - throw new CaptchaExpireException(); - } - if (!code.equalsIgnoreCase(captcha)) { - recordLogininfor(tenantId, username, Constants.REGISTER, MessageUtils.message("user.jcaptcha.error")); - throw new CaptchaException(); - } - } - - /** - * 璁板綍鐧诲綍淇℃伅 - * - * @param tenantId 绉熸埛ID - * @param username 鐢ㄦ埛鍚� - * @param status 鐘舵�� - * @param message 娑堟伅鍐呭 - * @return - */ - private void recordLogininfor(String tenantId, String username, String status, String message) { - LogininforEvent logininforEvent = new LogininforEvent(); - logininforEvent.setTenantId(tenantId); - logininforEvent.setUsername(username); - logininforEvent.setStatus(status); - logininforEvent.setMessage(message); - logininforEvent.setRequest(ServletUtils.getRequest()); - SpringUtils.context().publishEvent(logininforEvent); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/TextReviewService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/TextReviewService.java deleted file mode 100644 index 3117bf9..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/TextReviewService.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.xmzs.system.service; - -import com.alibaba.fastjson.JSONObject; -import lombok.extern.slf4j.Slf4j; -import okhttp3.*; -import org.springframework.beans.factory.annotation.Value; - -import java.io.IOException; -import java.net.URLEncoder; - - -/** - * 鏂囨湰瀹℃牳鏈嶅姟 - * - * @author: wangle - * @date: 2023/5/27 - */ -//@Service -@Slf4j -public class TextReviewService { - @Value("${baidu.textReview.apiKey}") - private String API_KEY; - @Value("${baidu.textReview.secretKey}") - private String SECRET_KEY; - - static final OkHttpClient HTTP_CLIENT = new OkHttpClient().newBuilder().build(); - - /** - * 鏂囨湰鍐呭瀹℃牳 - * - * @param msg - * @return String - * @Date 2023/5/27 - **/ - public String textReview(String msg) { - String conclusionType = ""; - try { - String text = URLEncoder.encode(msg); - MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); - RequestBody body = RequestBody.create(mediaType, "text=" + text); - Request request = new Request.Builder() - .url("https://aip.baidubce.com/rest/2.0/solution/v1/text_censor/v2/user_defined?access_token=" + getAccessToken()) - .method("POST", body) - .addHeader("Content-Type", "application/x-www-form-urlencoded") - .addHeader("Accept", "application/json") - .build(); - Response response = HTTP_CLIENT.newCall(request).execute(); - JSONObject jsonObject = JSONObject.parseObject(response.body().string()); - conclusionType = jsonObject.getString("conclusionType"); - } catch (IOException e) { - log.info("鍙戠敓閿欒{}", e.getMessage()); - } - return conclusionType; - } - - /** - * 浠庣敤鎴风殑AK锛孲K鐢熸垚閴存潈绛惧悕锛圓ccess Token锛� - * - * @return 閴存潈绛惧悕锛圓ccess Token锛� - * @throws IOException IO寮傚父 - */ - public String getAccessToken() throws IOException { - MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded"); - RequestBody body = RequestBody.create(mediaType, "grant_type=client_credentials&client_id=" + API_KEY - + "&client_secret=" + SECRET_KEY); - Request request = new Request.Builder() - .url("https://aip.baidubce.com/oauth/2.0/token") - .method("POST", body) - .addHeader("Content-Type", "application/x-www-form-urlencoded") - .build(); - Response response = HTTP_CLIENT.newCall(request).execute(); - return JSONObject.parseObject(response.body().string()).getString("access_token"); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/ChatCostServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/ChatCostServiceImpl.java deleted file mode 100644 index 67aea20..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/ChatCostServiceImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -package com.xmzs.system.service.impl; - -import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; -import com.xmzs.common.core.domain.model.LoginUser; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.exception.base.BaseException; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.system.domain.ChatToken; -import com.xmzs.system.domain.SysUser; -import com.xmzs.system.domain.bo.ChatMessageBo; -import com.xmzs.system.domain.bo.SysModelBo; -import com.xmzs.system.domain.vo.SysModelVo; -import com.xmzs.system.mapper.SysUserMapper; -import com.xmzs.system.service.IChatCostService; -import com.xmzs.system.service.IChatMessageService; -import com.xmzs.system.service.IChatTokenService; -import com.xmzs.system.service.ISysModelService; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * @author hncboy - * @date 2023/3/22 19:41 - * 鑱婂ぉ鐩稿叧涓氬姟瀹炵幇绫� - */ -@Slf4j -@Service -@RequiredArgsConstructor -public class ChatCostServiceImpl implements IChatCostService { - - private final SysUserMapper sysUserMapper; - - private final IChatMessageService chatMessageService; - - private final IChatTokenService chatTokenService; - - private final ISysModelService sysModelService; - - /** - * 鏍规嵁娑堣�楃殑tokens鎵i櫎浣欓 - * - * @param chatMessageBo - */ - public void deductToken(ChatMessageBo chatMessageBo) { - // 璁$畻鎬籺oken鏁� - ChatToken chatToken = chatTokenService.queryByUserId(chatMessageBo.getUserId(), chatMessageBo.getModelName()); - if (chatToken == null) { - chatToken = new ChatToken(); - chatToken.setToken(0); - } - int totalTokens = chatToken.getToken() + chatMessageBo.getTotalTokens(); - // 濡傛灉鎬籺oken鏁板ぇ浜庣瓑浜�1000,杩涜璐圭敤鎵i櫎 - if (totalTokens >= 1000) { - // 璁$畻璐圭敤 - int token1 = totalTokens / 1000; - int token2 = totalTokens % 1000; - if (token2 > 0) { - // 淇濆瓨鍓╀綑tokens - chatToken.setToken(token2); - chatTokenService.editToken(chatToken); - } else { - chatTokenService.resetToken(chatMessageBo.getUserId(), chatMessageBo.getModelName()); - } - // 鎵i櫎鐢ㄦ埛浣欓 - - SysModelBo sysModelBo = new SysModelBo(); - sysModelBo.setModelName(chatMessageBo.getModelName()); - List<SysModelVo> sysModelList = sysModelService.queryList(sysModelBo); - double modelPrice = sysModelList.get(0).getModelPrice(); - Double numberCost = token1 * modelPrice; - deductUserBalance(chatMessageBo.getUserId(), numberCost); - chatMessageBo.setDeductCost(numberCost); - } else { - // 鎵i櫎鐢ㄦ埛浣欓 - deductUserBalance(chatMessageBo.getUserId(), 0.0); - chatMessageBo.setDeductCost(0d); - chatMessageBo.setRemark("涓嶆弧1kToken,璁″叆涓嬩竴娆�!"); - chatToken.setToken(totalTokens); - chatToken.setModelName(chatMessageBo.getModelName()); - chatToken.setUserId(chatMessageBo.getUserId()); - chatTokenService.editToken(chatToken); - } - // 淇濆瓨娑堟伅璁板綍 - chatMessageService.insertByBo(chatMessageBo); - } - - - - /** - * 浠庣敤鎴蜂綑棰濅腑鎵i櫎璐圭敤 - * - * @param userId 鐢ㄦ埛ID - * @param numberCost 瑕佹墸闄ょ殑璐圭敤 - */ - @Override - public void deductUserBalance(Long userId, Double numberCost) { - SysUser sysUser = sysUserMapper.selectById(userId); - if (sysUser == null) { - return; - } - - Double userBalance = sysUser.getUserBalance(); - if (userBalance < numberCost || userBalance == 0) { - throw new ServiceException("浣欓涓嶈冻锛岃鑱旂郴绠$悊鍛樺厖鍊�!"); - } - sysUserMapper.update(null, - new LambdaUpdateWrapper<SysUser>() - .set(SysUser::getUserBalance, Math.max(userBalance - numberCost, 0)) - .eq(SysUser::getUserId, userId)); - } - - - - /** - * 鎵i櫎浠诲姟璐圭敤 - * - */ - @Override - public void taskDeduct(String type,String prompt, double cost) { - // 鍒ゆ柇鐢ㄦ埛鏄惁浠樿垂 - checkUserGrade(); - // 鎵i櫎璐圭敤 - deductUserBalance(getUserId(), cost); - // 淇濆瓨娑堟伅璁板綍 - ChatMessageBo chatMessageBo = new ChatMessageBo(); - chatMessageBo.setUserId(getUserId()); - chatMessageBo.setModelName(type); - chatMessageBo.setContent(prompt); - chatMessageBo.setDeductCost(cost); - chatMessageBo.setTotalTokens(0); - chatMessageService.insertByBo(chatMessageBo); - } - - /** - * 鍒ゆ柇鐢ㄦ埛鏄惁浠樿垂 - */ - @Override - public void checkUserGrade() { - SysUser sysUser = sysUserMapper.selectById(getUserId()); - if("0".equals(sysUser.getUserGrade())){ - throw new BaseException("鍏嶈垂鐢ㄦ埛鏆傛椂涓嶆敮鎸佹妯″瀷,璇峰垏鎹pt-3.5-turbo妯″瀷鎴栬�呯偣鍑汇�婅繘鍏ュ競鍦洪�夎喘鎮ㄧ殑鍟嗗搧銆嬪厖鍊煎悗浣跨敤!"); - } - } - - /** - * 鑾峰彇鐢ㄦ埛Id - * - * @return - */ - public Long getUserId() { - LoginUser loginUser = LoginHelper.getLoginUser(); - if (loginUser == null) { - throw new BaseException("鐢ㄦ埛鏈櫥褰曪紒"); - } - return loginUser.getUserId(); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/ChatMessageServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/ChatMessageServiceImpl.java deleted file mode 100644 index a7b4d96..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/ChatMessageServiceImpl.java +++ /dev/null @@ -1,113 +0,0 @@ -package com.xmzs.system.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.ChatMessage; -import com.xmzs.system.domain.bo.ChatMessageBo; -import com.xmzs.system.domain.vo.ChatMessageVo; -import com.xmzs.system.mapper.ChatMessageMapper; -import com.xmzs.system.service.IChatMessageService; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * 鑱婂ぉ娑堟伅Service涓氬姟灞傚鐞� - * - * @author Lion Li - * @date 2023-11-26 - */ -@RequiredArgsConstructor -@Service -public class ChatMessageServiceImpl implements IChatMessageService { - - private final ChatMessageMapper baseMapper; - - /** - * 鏌ヨ鑱婂ぉ娑堟伅 - */ - @Override - public ChatMessageVo queryById(Long id){ - return baseMapper.selectVoById(id); - } - - /** - * 鏌ヨ鑱婂ぉ娑堟伅鍒楄〃 - */ - @Override - public TableDataInfo<ChatMessageVo> queryPageList(ChatMessageBo bo, PageQuery pageQuery) { - LambdaQueryWrapper<ChatMessage> lqw = buildQueryWrapper(bo); - Page<ChatMessageVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(result); - } - - /** - * 鏌ヨ鑱婂ぉ娑堟伅鍒楄〃 - */ - @Override - public List<ChatMessageVo> queryList(ChatMessageBo bo) { - LambdaQueryWrapper<ChatMessage> lqw = buildQueryWrapper(bo); - return baseMapper.selectVoList(lqw); - } - - private LambdaQueryWrapper<ChatMessage> buildQueryWrapper(ChatMessageBo bo) { - Map<String, Object> params = bo.getParams(); - LambdaQueryWrapper<ChatMessage> lqw = Wrappers.lambdaQuery(); - lqw.eq(bo.getUserId() != null, ChatMessage::getUserId, bo.getUserId()); - lqw.eq(StringUtils.isNotBlank(bo.getContent()), ChatMessage::getContent, bo.getContent()); - lqw.eq(bo.getDeductCost() != null, ChatMessage::getDeductCost, bo.getDeductCost()); - lqw.eq(bo.getTotalTokens() != null, ChatMessage::getTotalTokens, bo.getTotalTokens()); - lqw.like(StringUtils.isNotBlank(bo.getModelName()), ChatMessage::getModelName, bo.getModelName()); - return lqw; - } - - /** - * 鏂板鑱婂ぉ娑堟伅 - */ - @Override - public Boolean insertByBo(ChatMessageBo bo) { - ChatMessage add = MapstructUtils.convert(bo, ChatMessage.class); - validEntityBeforeSave(add); - boolean flag = baseMapper.insert(add) > 0; - if (flag) { - bo.setId(add.getId()); - } - return flag; - } - - /** - * 淇敼鑱婂ぉ娑堟伅 - */ - @Override - public Boolean updateByBo(ChatMessageBo bo) { - ChatMessage update = MapstructUtils.convert(bo, ChatMessage.class); - validEntityBeforeSave(update); - return baseMapper.updateById(update) > 0; - } - - /** - * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙 - */ - private void validEntityBeforeSave(ChatMessage entity){ - //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫 - } - - /** - * 鎵归噺鍒犻櫎鑱婂ぉ娑堟伅 - */ - @Override - public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { - if(isValid){ - //TODO 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠� - } - return baseMapper.deleteBatchIds(ids) > 0; - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/ChatServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/ChatServiceImpl.java deleted file mode 100644 index 37be027..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/ChatServiceImpl.java +++ /dev/null @@ -1,136 +0,0 @@ -package com.xmzs.system.service.impl; - -import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; -import com.xmzs.common.chat.constant.OpenAIConst; -import com.xmzs.common.chat.entity.chat.ChatCompletion; -import com.xmzs.common.core.domain.model.LoginUser; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.exception.base.BaseException; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.system.domain.ChatToken; -import com.xmzs.system.domain.SysUser; -import com.xmzs.system.domain.bo.ChatMessageBo; -import com.xmzs.system.mapper.SysUserMapper; -import com.xmzs.system.service.IChatMessageService; -import com.xmzs.system.service.IChatService; -import com.xmzs.system.service.IChatTokenService; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; - -/** - * @author hncboy - * @date 2023/3/22 19:41 - * 鑱婂ぉ鐩稿叧涓氬姟瀹炵幇绫� - */ -@Slf4j -@Service -@RequiredArgsConstructor -public class ChatServiceImpl implements IChatService { - - private final SysUserMapper sysUserMapper; - - private final IChatMessageService chatMessageService; - - private final IChatTokenService chatTokenService; - - - /** - * 鏍规嵁娑堣�楃殑tokens鎵i櫎浣欓 - * - * @param chatMessageBo - */ - public void deductToken(ChatMessageBo chatMessageBo) { - // 璁$畻鎬籺oken鏁� - ChatToken chatToken = chatTokenService.queryByUserId(chatMessageBo.getUserId(), chatMessageBo.getModelName()); - if (chatToken == null) { - chatToken = new ChatToken(); - chatToken.setToken(0); - } - int totalTokens = chatToken.getToken() + chatMessageBo.getTotalTokens(); - // 濡傛灉鎬籺oken鏁板ぇ浜庣瓑浜�1000,杩涜璐圭敤鎵i櫎 - if (totalTokens >= 1000) { - // 璁$畻璐圭敤 - int token1 = totalTokens / 1000; - int token2 = totalTokens % 1000; - if (token2 > 0) { - // 淇濆瓨鍓╀綑tokens - chatToken.setToken(token2); - chatTokenService.editToken(chatToken); - } else { - chatTokenService.resetToken(chatMessageBo.getUserId(), chatMessageBo.getModelName()); - } - // 鎵i櫎鐢ㄦ埛浣欓 - Double numberCost = token1 * ChatCompletion.getModelCost(chatMessageBo.getModelName()); - deductUserBalance(chatMessageBo.getUserId(), numberCost); - chatMessageBo.setDeductCost(numberCost); - } else { - // 鎵i櫎鐢ㄦ埛浣欓 - deductUserBalance(chatMessageBo.getUserId(), 0.0); - chatMessageBo.setDeductCost(0d); - chatMessageBo.setRemark("涓嶆弧1kToken,璁″叆涓嬩竴娆�!"); - chatToken.setToken(totalTokens); - chatToken.setModelName(chatMessageBo.getModelName()); - chatToken.setUserId(chatMessageBo.getUserId()); - chatTokenService.editToken(chatToken); - } - // 淇濆瓨娑堟伅璁板綍 - chatMessageService.insertByBo(chatMessageBo); - } - - /** - * 浠庣敤鎴蜂綑棰濅腑鎵i櫎璐圭敤 - * - * @param userId 鐢ㄦ埛ID - * @param numberCost 瑕佹墸闄ょ殑璐圭敤 - */ - @Override - public void deductUserBalance(Long userId, Double numberCost) { - SysUser sysUser = sysUserMapper.selectById(userId); - if (sysUser == null) { - return; - } - - Double userBalance = sysUser.getUserBalance(); - if (userBalance < numberCost || userBalance < OpenAIConst.GPT4_COST) { - throw new ServiceException("浣欓涓嶈冻锛岃鑱旂郴绠$悊鍛樺厖鍊�!"); - } - - sysUserMapper.update(null, - new LambdaUpdateWrapper<SysUser>() - .set(SysUser::getUserBalance, Math.max(userBalance - numberCost, 0)) - .eq(SysUser::getUserId, userId)); - } - - /** - * 鎵i櫎mj浠诲姟璐圭敤 - * - * @param prompt - * @param cost - */ - @Override - public void mjTaskDeduct(String prompt, double cost) { - deductUserBalance(getUserId(), cost); - // 淇濆瓨娑堟伅璁板綍 - ChatMessageBo chatMessageBo = new ChatMessageBo(); - chatMessageBo.setUserId(getUserId()); - chatMessageBo.setModelName("mj"); - chatMessageBo.setContent(prompt); - chatMessageBo.setDeductCost(cost); - chatMessageBo.setTotalTokens(0); - chatMessageService.insertByBo(chatMessageBo); - } - - /** - * 鑾峰彇鐢ㄦ埛Id - * - * @return - */ - public Long getUserId() { - LoginUser loginUser = LoginHelper.getLoginUser(); - if (loginUser == null) { - throw new BaseException("鐢ㄦ埛鏈櫥褰曪紒"); - } - return loginUser.getUserId(); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/ChatTokenServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/ChatTokenServiceImpl.java deleted file mode 100644 index 23d4de0..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/ChatTokenServiceImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.xmzs.system.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.xmzs.system.domain.ChatToken; -import com.xmzs.system.mapper.ChatTokenMapper; -import com.xmzs.system.service.IChatTokenService; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; - -/** - * 鑱婂ぉ娑堟伅Service涓氬姟灞傚鐞� - * - * @author Lion Li - * @date 2023-11-26 - */ -@RequiredArgsConstructor -@Service -public class ChatTokenServiceImpl implements IChatTokenService { - - private final ChatTokenMapper baseMapper; - - @Override - public ChatToken queryByUserId(Long userId,String modelName) { - return baseMapper.selectOne( - new LambdaQueryWrapper<ChatToken>() - .eq(ChatToken::getUserId, userId) - .eq(ChatToken::getModelName, modelName) - .last("limit 1") - ); - } - - /** - * 娓呯┖鐢ㄦ埛token - * - */ - @Override - public void resetToken(Long userId,String modelName) { - ChatToken chatToken = queryByUserId(userId, modelName); - chatToken.setToken(0); - baseMapper.updateById(chatToken); - } - - /** - * 澧炲姞鐢ㄦ埛token - * - */ - @Override - public void editToken(ChatToken chatToken) { - if(chatToken.getId() == null){ - baseMapper.insert(chatToken); - }else { - baseMapper.updateById(chatToken); - } - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/PaymentOrdersServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/PaymentOrdersServiceImpl.java deleted file mode 100644 index 7f6712a..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/PaymentOrdersServiceImpl.java +++ /dev/null @@ -1,114 +0,0 @@ -package com.xmzs.system.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.PaymentOrders; -import com.xmzs.system.domain.bo.PaymentOrdersBo; -import com.xmzs.system.domain.vo.PaymentOrdersVo; -import com.xmzs.system.mapper.PaymentOrdersMapper; -import com.xmzs.system.service.IPaymentOrdersService; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * 鏀粯璁㈠崟Service涓氬姟灞傚鐞� - * - * @author Lion Li - * @date 2023-12-29 - */ -@RequiredArgsConstructor -@Service -public class PaymentOrdersServiceImpl implements IPaymentOrdersService { - - private final PaymentOrdersMapper baseMapper; - - /** - * 鏌ヨ鏀粯璁㈠崟 - */ - @Override - public PaymentOrdersVo queryById(Long id){ - return baseMapper.selectVoById(id); - } - - /** - * 鏌ヨ鏀粯璁㈠崟鍒楄〃 - */ - @Override - public TableDataInfo<PaymentOrdersVo> queryPageList(PaymentOrdersBo bo, PageQuery pageQuery) { - LambdaQueryWrapper<PaymentOrders> lqw = buildQueryWrapper(bo); - Page<PaymentOrdersVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(result); - } - - /** - * 鏌ヨ鏀粯璁㈠崟鍒楄〃 - */ - @Override - public List<PaymentOrdersVo> queryList(PaymentOrdersBo bo) { - LambdaQueryWrapper<PaymentOrders> lqw = buildQueryWrapper(bo); - return baseMapper.selectVoList(lqw); - } - - private LambdaQueryWrapper<PaymentOrders> buildQueryWrapper(PaymentOrdersBo bo) { - Map<String, Object> params = bo.getParams(); - LambdaQueryWrapper<PaymentOrders> lqw = Wrappers.lambdaQuery(); - lqw.eq(StringUtils.isNotBlank(bo.getOrderNo()), PaymentOrders::getOrderNo, bo.getOrderNo()); - lqw.like(StringUtils.isNotBlank(bo.getOrderName()), PaymentOrders::getOrderName, bo.getOrderName()); - lqw.eq(bo.getAmount() != null, PaymentOrders::getAmount, bo.getAmount()); - lqw.eq(StringUtils.isNotBlank(bo.getPaymentStatus()), PaymentOrders::getPaymentStatus, bo.getPaymentStatus()); - lqw.eq(StringUtils.isNotBlank(bo.getPaymentMethod()), PaymentOrders::getPaymentMethod, bo.getPaymentMethod()); - lqw.eq(bo.getUserId() != null, PaymentOrders::getUserId, bo.getUserId()); - return lqw; - } - - /** - * 鏂板鏀粯璁㈠崟 - */ - @Override - public Boolean insertByBo(PaymentOrdersBo bo) { - PaymentOrders add = MapstructUtils.convert(bo, PaymentOrders.class); - validEntityBeforeSave(add); - boolean flag = baseMapper.insert(add) > 0; - if (flag) { - bo.setId(add.getId()); - } - return flag; - } - - /** - * 淇敼鏀粯璁㈠崟 - */ - @Override - public Boolean updateByBo(PaymentOrdersBo bo) { - PaymentOrders update = MapstructUtils.convert(bo, PaymentOrders.class); - validEntityBeforeSave(update); - return baseMapper.updateById(update) > 0; - } - - /** - * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙 - */ - private void validEntityBeforeSave(PaymentOrders entity){ - //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫 - } - - /** - * 鎵归噺鍒犻櫎鏀粯璁㈠崟 - */ - @Override - public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { - if(isValid){ - //TODO 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠� - } - return baseMapper.deleteBatchIds(ids) > 0; - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SseServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SseServiceImpl.java deleted file mode 100644 index b0b29d1..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SseServiceImpl.java +++ /dev/null @@ -1,353 +0,0 @@ -package com.xmzs.system.service.impl; - -import cn.hutool.core.collection.CollectionUtil; -import com.xmzs.common.chat.config.LocalCache; -import com.xmzs.common.chat.constant.OpenAIConst; -import com.xmzs.common.chat.domain.request.ChatRequest; -import com.xmzs.common.chat.domain.request.Dall3Request; -import com.xmzs.common.chat.entity.Tts.TextToSpeech; -import com.xmzs.common.chat.entity.chat.*; -import com.xmzs.common.chat.entity.files.UploadFileResponse; -import com.xmzs.common.chat.entity.images.Image; -import com.xmzs.common.chat.entity.images.ImageResponse; -import com.xmzs.common.chat.entity.images.Item; -import com.xmzs.common.chat.entity.whisper.WhisperResponse; -import com.xmzs.common.chat.openai.OpenAiStreamClient; -import com.xmzs.common.chat.utils.TikTokensUtil; -import com.xmzs.common.core.domain.model.LoginUser; -import com.xmzs.common.core.exception.base.BaseException; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.system.domain.SysUser; -import com.xmzs.system.domain.bo.ChatMessageBo; -import com.xmzs.system.domain.bo.SysModelBo; -import com.xmzs.system.domain.vo.SysModelVo; -import com.xmzs.system.listener.SSEEventSourceListener; -import com.xmzs.system.mapper.SysUserMapper; -import com.xmzs.system.service.IChatCostService; -import com.xmzs.system.service.IChatMessageService; -import com.xmzs.system.service.ISseService; -import com.xmzs.system.service.ISysModelService; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import okhttp3.ResponseBody; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.core.io.InputStreamResource; -import org.springframework.core.io.Resource; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Service; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.Collections; -import java.util.List; -import java.util.Objects; - -/** - * 鎻忚堪锛� - * - * @author https:www.unfbx.com - * @date 2023-04-08 - */ -@Service -@Slf4j -@RequiredArgsConstructor -public class SseServiceImpl implements ISseService { - - private final OpenAiStreamClient openAiStreamClient; - - private final IChatCostService chatService; - - private final SysUserMapper sysUserMapper; - - private final IChatMessageService chatMessageService; - - private final ISysModelService sysModelService; - - @Value("${chat.apiKey}") - private String apiKey; - @Value("${chat.apiHost}") - private String apiHost; - - @Override - public SseEmitter sseChat(ChatRequest chatRequest) { - LocalCache.CACHE.put("userId",getUserId()); - SseEmitter sseEmitter = new SseEmitter(0L); - SSEEventSourceListener openAIEventSourceListener = new SSEEventSourceListener(sseEmitter); - // 鑾峰彇瀵硅瘽娑堟伅鍒楄〃 - List<Message> msgList = chatRequest.getMessages(); - - // 鍥炬枃璇嗗埆涓婁笅鏂囦俊鎭� - List<Content> contentList = chatRequest.getImageContent(); - // 娑堟伅璁板綍 - Message message = msgList.get(msgList.size() - 1); - ChatMessageBo chatMessageBo = new ChatMessageBo(); - chatMessageBo.setUserId(getUserId()); - chatMessageBo.setModelName(chatRequest.getModel()); - chatMessageBo.setContent(message.getContent()); - try{ - if(!chatRequest.getModel().startsWith("gpt-3.5")){ - // 鍒ゆ柇鐢ㄦ埛鏄惁浠樿垂 - checkUserGrade(); - } - //鏍规嵁妯″瀷鍚嶇О鏌ヨ妯″瀷淇℃伅 - SysModelBo sysModelBo = new SysModelBo(); - sysModelBo.setModelName(chatRequest.getModel()); - List<SysModelVo> sysModelList = sysModelService.queryList(sysModelBo); - if (CollectionUtil.isEmpty(sysModelList)) { - // 濡傛灉妯″瀷涓嶅瓨鍦ㄩ粯璁や娇鐢╰oken鎵h垂鏂瑰紡 - processByToken(chatRequest.getModel(), msgList, chatMessageBo); - } else { - // 妯″瀷璁剧疆榛樿鎻愮ず璇� - SysModelVo firstModel = sysModelList.get(0); - if (StringUtils.isNotEmpty(firstModel.getSystemPrompt())) { - Message sysMessage = Message.builder().content(firstModel.getSystemPrompt()).role(Message.Role.SYSTEM).build(); - // 鍋囪 msgList 涓嶄负绌哄苟涓旇嚦灏戞湁涓�涓厓绱� - if (msgList.get(0).equals(sysMessage)) { - // 濡傛灉绗竴涓厓绱犱笌sysMessage鐩哥瓑锛屾浛鎹㈢涓�涓厓绱� - msgList.set(0, sysMessage); - } else { - // 濡傛灉涓嶇浉绛夛紝灏唖ysMessage鎻掑叆鍒板垪琛ㄧ殑绗竴涓綅缃� - msgList.add(0, sysMessage); - } - } - // 璁¤垂绫诲瀷: 1 token鎵h垂 2 娆℃暟鎵h垂 - if ("2".equals(firstModel.getModelType())) { - processByModelPrice(firstModel, chatMessageBo); - } else { - processByToken(chatRequest.getModel(), msgList, chatMessageBo); - } - } - } catch (Exception e) { - sendErrorEvent(sseEmitter, e.getMessage()); - return sseEmitter; - } - // 鍥炬枃璇嗗埆妯″瀷 - if (ChatCompletion.Model.GPT_4_VISION_PREVIEW.getName().equals(chatRequest.getModel())) { - MessagePicture messagePicture = MessagePicture.builder().role(Message.Role.USER.getName()).content(contentList).build(); - ChatCompletionWithPicture chatCompletion = ChatCompletionWithPicture - .builder() - .messages(Collections.singletonList(messagePicture)) - .model(chatRequest.getModel()) - .temperature(chatRequest.getTemperature()) - .topP(chatRequest.getTop_p()) - .stream(true) - .build(); - openAiStreamClient.streamChatCompletion(chatCompletion, openAIEventSourceListener); - } else { - ChatCompletion completion = ChatCompletion - .builder() - .messages(msgList) - .model(chatRequest.getModel()) - .temperature(chatRequest.getTemperature()) - .topP(chatRequest.getTop_p()) - .stream(true) - .build(); - openAiStreamClient.streamChatCompletion(completion, openAIEventSourceListener); - } - return sseEmitter; - } - - /** - * 鏍规嵁娆℃暟鎵i櫎浣欓 - * - * @param model 妯″瀷淇℃伅 - * @param chatMessageBo 瀵硅瘽淇℃伅 - */ - private void processByModelPrice(SysModelVo model, ChatMessageBo chatMessageBo) { - double cost = model.getModelPrice(); - chatService.deductUserBalance(getUserId(), cost); - chatMessageBo.setDeductCost(cost); - chatMessageService.insertByBo(chatMessageBo); - } - - /** - * 鏍规嵁token鎵i櫎浣欓 - * - * @param modelName 妯″瀷鍚嶇О - * @param msgList 娑堟伅鍒楄〃 - * @param chatMessageBo 娑堟伅璁板綍 - */ - private void processByToken(String modelName, List<Message> msgList, ChatMessageBo chatMessageBo) { - int tokens = TikTokensUtil.tokens(modelName, msgList); - chatMessageBo.setTotalTokens(tokens); - chatService.deductToken(chatMessageBo); - } - - /** - * 鏂囧瓧杞闊� - * - */ - @Override - public ResponseEntity<Resource> textToSpeed(TextToSpeech textToSpeech) { - try (ResponseBody body = openAiStreamClient.textToSpeech(textToSpeech)) { - if (body != null) { - // 灏哛esponseBody杞崲涓篒nputStreamResource - InputStreamResource resource = new InputStreamResource(body.byteStream()); - - // 鍒涘缓骞惰繑鍥濺esponseEntity - return ResponseEntity.ok() - .contentType(MediaType.parseMediaType("audio/mpeg")) // 鍋囪鏄疢P3鏂囦欢 - .body(resource); - - } else { - // 濡傛灉ResponseBody涓虹┖锛岃繑鍥�404鐘舵�佺爜 - return ResponseEntity.notFound().build(); - } - } - } - - /** - * 璇煶杞枃瀛� - * - */ - @Override - public WhisperResponse speechToTextTranscriptionsV2(MultipartFile file) { - // 纭繚鏂囦欢涓嶄负绌� - if (file.isEmpty()) { - throw new IllegalStateException("Cannot convert an empty MultipartFile"); - } - // 鍒涘缓涓�涓枃浠跺璞� - File fileA = new File(System.getProperty("java.io.tmpdir") + File.separator + file.getOriginalFilename()); - try { - // 灏� MultipartFile 鐨勫唴瀹瑰啓鍏ユ枃浠� - file.transferTo(fileA); - } catch (IOException e) { - throw new RuntimeException("Failed to convert MultipartFile to File", e); - } - return openAiStreamClient.speechToTextTranscriptions(fileA); - } - - @Override - public String chat(ChatRequest chatRequest) { - Message message = Message.builder().role(Message.Role.USER).content(chatRequest.getPrompt()).build(); - ChatCompletion chatCompletion = ChatCompletion - .builder() - .messages(Collections.singletonList(message)) - .model(chatRequest.getModel()) - .build(); - ChatCompletionResponse chatCompletionResponse = openAiStreamClient.chatCompletion(chatCompletion); - return chatCompletionResponse.getChoices().get(0).getMessage().getContent(); - } - - /** - * dall-e-3缁樼敾鎺ュ彛 - * - * @param request - * @return - */ - public List<Item> dall3(Dall3Request request) { - checkUserGrade(); - // DALL3 缁樺浘妯″瀷 - Image image = Image.builder() - .responseFormat(com.xmzs.common.chat.entity.images.ResponseFormat.URL.getName()) - .model(Image.Model.DALL_E_3.getName()) - .prompt(request.getPrompt()) - .n(1) - .quality(request.getQuality()) - .size(request.getSize()) - .style(request.getStyle()) - .build(); - ImageResponse imageResponse = openAiStreamClient.genImages(image); - - // 鎵i櫎璐圭敤 - if(Objects.equals(request.getSize(), "1792x1024") || Objects.equals(request.getSize(), "1024x1792")){ - chatService.deductUserBalance(getUserId(),OpenAIConst.DALL3_HD_COST); - }else { - chatService.deductUserBalance(getUserId(),OpenAIConst.DALL3_COST); - } - // 淇濆瓨娑堟伅璁板綍 - ChatMessageBo chatMessageBo = new ChatMessageBo(); - chatMessageBo.setUserId(getUserId()); - chatMessageBo.setModelName(Image.Model.DALL_E_3.getName()); - chatMessageBo.setContent(request.getPrompt()); - chatMessageBo.setDeductCost(OpenAIConst.GPT4_COST); - chatMessageBo.setTotalTokens(0); - chatMessageService.insertByBo(chatMessageBo); - return imageResponse.getData(); - } - - /** - * 鍒ゆ柇鐢ㄦ埛鏄惁浠樿垂 - */ - @Override - public void checkUserGrade() { - SysUser sysUser = sysUserMapper.selectById(getUserId()); - if("0".equals(sysUser.getUserGrade())){ - throw new BaseException("鍏嶈垂鐢ㄦ埛鏆傛椂涓嶆敮鎸佹妯″瀷,璇峰垏鎹pt-3.5-turbo妯″瀷鎴栬�呯偣鍑汇�婅繘鍏ュ競鍦洪�夎喘鎮ㄧ殑鍟嗗搧銆嬪厖鍊煎悗浣跨敤!"); - } - } - - /** - * 鑾峰彇鐢ㄦ埛Id - * - * @return - */ - public Long getUserId(){ - LoginUser loginUser = LoginHelper.getLoginUser(); - if (loginUser == null) { - throw new BaseException("鐢ㄦ埛鏈櫥褰曪紒"); - } - return loginUser.getUserId(); - } - - @Override - public UploadFileResponse upload(MultipartFile file) { - return openAiStreamClient.uploadFile("fine-tune", convertMultiPartToFile(file)); - } - - private File convertMultiPartToFile(MultipartFile multipartFile) { - File file = null; - try { - // 鑾峰彇鍘熷鏂囦欢鍚� - String originalFileName = multipartFile.getOriginalFilename(); - // 榛樿鎵╁睍鍚� - String extension = ".tmp"; - // 灏濊瘯浠庡師濮嬫枃浠跺悕涓幏鍙栨墿灞曞悕 - if (originalFileName != null && originalFileName.contains(".")) { - extension = originalFileName.substring(originalFileName.lastIndexOf(".")); - } - - // 浣跨敤鍘熷鏂囦欢鐨勬墿灞曞悕鍒涘缓涓存椂鏂囦欢 - Path tempFile = Files.createTempFile(null, extension); - file = tempFile.toFile(); - - // 灏哅ultipartFile鐨勫唴瀹瑰啓鍏ユ枃浠� - try (InputStream inputStream = multipartFile.getInputStream(); - FileOutputStream outputStream = new FileOutputStream(file)) { - int read; - byte[] bytes = new byte[1024]; - while ((read = inputStream.read(bytes)) != -1) { - outputStream.write(bytes, 0, read); - } - } catch (IOException e) { - // 澶勭悊鏂囦欢鍐欏叆寮傚父 - e.printStackTrace(); - } - } catch (IOException e) { - // 澶勭悊涓存椂鏂囦欢鍒涘缓寮傚父 - e.printStackTrace(); - } - return file; - } - - // 鍙戦�丼SE閿欒浜嬩欢鐨勫皝瑁呮柟娉� - private void sendErrorEvent(SseEmitter sseEmitter, String errorMessage) { - SseEmitter.SseEventBuilder event = SseEmitter.event() - .name("error") - .data(errorMessage); - try { - sseEmitter.send(event); - } catch (IOException e) { - log.error("鍙戦�佷簨浠跺け璐�: {}", e.getMessage()); - } - sseEmitter.complete(); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysConfigServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysConfigServiceImpl.java deleted file mode 100644 index 0aeb006..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysConfigServiceImpl.java +++ /dev/null @@ -1,216 +0,0 @@ -package com.xmzs.system.service.impl; - -import cn.hutool.core.convert.Convert; -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.dynamic.datasource.annotation.DS; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.constant.CacheNames; -import com.xmzs.common.core.constant.UserConstants; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.service.ConfigService; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.redis.utils.CacheUtils; -import com.xmzs.common.tenant.helper.TenantHelper; -import com.xmzs.system.domain.SysConfig; -import com.xmzs.system.domain.bo.SysConfigBo; -import com.xmzs.system.domain.vo.SysConfigVo; -import com.xmzs.system.mapper.SysConfigMapper; -import com.xmzs.system.service.ISysConfigService; -import lombok.RequiredArgsConstructor; -import org.springframework.cache.annotation.CachePut; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.stereotype.Service; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; - -/** - * 鍙傛暟閰嶇疆 鏈嶅姟灞傚疄鐜� - * - * @author Lion Li - */ -@RequiredArgsConstructor -@Service -public class SysConfigServiceImpl implements ISysConfigService, ConfigService { - - private final SysConfigMapper baseMapper; - - @Override - public TableDataInfo<SysConfigVo> selectPageConfigList(SysConfigBo config, PageQuery pageQuery) { - LambdaQueryWrapper<SysConfig> lqw = buildQueryWrapper(config); - Page<SysConfigVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(page); - } - - /** - * 鏌ヨ鍙傛暟閰嶇疆淇℃伅 - * - * @param configId 鍙傛暟閰嶇疆ID - * @return 鍙傛暟閰嶇疆淇℃伅 - */ - @Override - @DS("master") - public SysConfigVo selectConfigById(Long configId) { - return baseMapper.selectVoById(configId); - } - - /** - * 鏍规嵁閿悕鏌ヨ鍙傛暟閰嶇疆淇℃伅 - * - * @param configKey 鍙傛暟key - * @return 鍙傛暟閿�� - */ - @Cacheable(cacheNames = CacheNames.SYS_CONFIG, key = "#configKey") - @Override - public String selectConfigByKey(String configKey) { - SysConfig retConfig = baseMapper.selectOne(new LambdaQueryWrapper<SysConfig>() - .eq(SysConfig::getConfigKey, configKey)); - if (ObjectUtil.isNotNull(retConfig)) { - return retConfig.getConfigValue(); - } - return StringUtils.EMPTY; - } - - /** - * 鑾峰彇娉ㄥ唽寮�鍏� - * @param tenantId 绉熸埛id - * @return true寮�鍚紝false鍏抽棴 - */ - @Override - public boolean selectRegisterEnabled(String tenantId) { - SysConfig retConfig = baseMapper.selectOne(new LambdaQueryWrapper<SysConfig>() - .eq(SysConfig::getConfigKey, "sys.account.registerUser") - .eq(TenantHelper.isEnable(),SysConfig::getTenantId, tenantId)); - if (ObjectUtil.isNull(retConfig)) { - return false; - } - return Convert.toBool(retConfig.getConfigValue()); - } - - /** - * 鏌ヨ鍙傛暟閰嶇疆鍒楄〃 - * - * @param config 鍙傛暟閰嶇疆淇℃伅 - * @return 鍙傛暟閰嶇疆闆嗗悎 - */ - @Override - public List<SysConfigVo> selectConfigList(SysConfigBo config) { - LambdaQueryWrapper<SysConfig> lqw = buildQueryWrapper(config); - return baseMapper.selectVoList(lqw); - } - - private LambdaQueryWrapper<SysConfig> buildQueryWrapper(SysConfigBo bo) { - Map<String, Object> params = bo.getParams(); - LambdaQueryWrapper<SysConfig> lqw = Wrappers.lambdaQuery(); - lqw.like(StringUtils.isNotBlank(bo.getConfigName()), SysConfig::getConfigName, bo.getConfigName()); - lqw.eq(StringUtils.isNotBlank(bo.getConfigType()), SysConfig::getConfigType, bo.getConfigType()); - lqw.like(StringUtils.isNotBlank(bo.getConfigKey()), SysConfig::getConfigKey, bo.getConfigKey()); - lqw.between(params.get("beginTime") != null && params.get("endTime") != null, - SysConfig::getCreateTime, params.get("beginTime"), params.get("endTime")); - return lqw; - } - - /** - * 鏂板鍙傛暟閰嶇疆 - * - * @param bo 鍙傛暟閰嶇疆淇℃伅 - * @return 缁撴灉 - */ - @CachePut(cacheNames = CacheNames.SYS_CONFIG, key = "#bo.configKey") - @Override - public String insertConfig(SysConfigBo bo) { - SysConfig config = MapstructUtils.convert(bo, SysConfig.class); - int row = baseMapper.insert(config); - if (row > 0) { - return config.getConfigValue(); - } - throw new ServiceException("鎿嶄綔澶辫触"); - } - - /** - * 淇敼鍙傛暟閰嶇疆 - * - * @param bo 鍙傛暟閰嶇疆淇℃伅 - * @return 缁撴灉 - */ - @CachePut(cacheNames = CacheNames.SYS_CONFIG, key = "#bo.configKey") - @Override - public String updateConfig(SysConfigBo bo) { - int row = 0; - SysConfig config = MapstructUtils.convert(bo, SysConfig.class); - if (config.getConfigId() != null) { - SysConfig temp = baseMapper.selectById(config.getConfigId()); - if (!StringUtils.equals(temp.getConfigKey(), config.getConfigKey())) { - CacheUtils.evict(CacheNames.SYS_CONFIG, temp.getConfigKey()); - } - row = baseMapper.updateById(config); - } else { - row = baseMapper.update(config, new LambdaQueryWrapper<SysConfig>() - .eq(SysConfig::getConfigKey, config.getConfigKey())); - } - if (row > 0) { - return config.getConfigValue(); - } - throw new ServiceException("鎿嶄綔澶辫触"); - } - - /** - * 鎵归噺鍒犻櫎鍙傛暟淇℃伅 - * - * @param configIds 闇�瑕佸垹闄ょ殑鍙傛暟ID - */ - @Override - public void deleteConfigByIds(Long[] configIds) { - for (Long configId : configIds) { - SysConfig config = baseMapper.selectById(configId); - if (StringUtils.equals(UserConstants.YES, config.getConfigType())) { - throw new ServiceException(String.format("鍐呯疆鍙傛暟銆�%1$s銆戜笉鑳藉垹闄� ", config.getConfigKey())); - } - CacheUtils.evict(CacheNames.SYS_CONFIG, config.getConfigKey()); - } - baseMapper.deleteBatchIds(Arrays.asList(configIds)); - } - - /** - * 閲嶇疆鍙傛暟缂撳瓨鏁版嵁 - */ - @Override - public void resetConfigCache() { - CacheUtils.clear(CacheNames.SYS_CONFIG); - } - - /** - * 鏍¢獙鍙傛暟閿悕鏄惁鍞竴 - * - * @param config 鍙傛暟閰嶇疆淇℃伅 - * @return 缁撴灉 - */ - @Override - public boolean checkConfigKeyUnique(SysConfigBo config) { - long configId = ObjectUtil.isNull(config.getConfigId()) ? -1L : config.getConfigId(); - SysConfig info = baseMapper.selectOne(new LambdaQueryWrapper<SysConfig>().eq(SysConfig::getConfigKey, config.getConfigKey())); - if (ObjectUtil.isNotNull(info) && info.getConfigId() != configId) { - return false; - } - return true; - } - - /** - * 鏍规嵁鍙傛暟 key 鑾峰彇鍙傛暟鍊� - * - * @param configKey 鍙傛暟 key - * @return 鍙傛暟鍊� - */ - @Override - public String getConfigValue(String configKey) { - return SpringUtils.getAopProxy(this).selectConfigByKey(configKey); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysDataScopeServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysDataScopeServiceImpl.java deleted file mode 100644 index a2f28cd..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysDataScopeServiceImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.xmzs.system.service.impl; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.convert.Convert; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.xmzs.common.core.utils.StreamUtils; -import com.xmzs.common.mybatis.helper.DataBaseHelper; -import com.xmzs.system.domain.SysDept; -import com.xmzs.system.domain.SysRoleDept; -import com.xmzs.system.mapper.SysDeptMapper; -import com.xmzs.system.mapper.SysRoleDeptMapper; -import com.xmzs.system.service.ISysDataScopeService; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * 鏁版嵁鏉冮檺 瀹炵幇 - * <p> - * 娉ㄦ剰: 姝ervice鍐呬笉鍏佽璋冪敤鏍囨敞`鏁版嵁鏉冮檺`娉ㄨВ鐨勬柟娉� - * 渚嬪: deptMapper.selectList 姝� selectList 鏂规硶鏍囨敞浜哷鏁版嵁鏉冮檺`娉ㄨВ 浼氬嚭鐜板惊鐜В鏋愮殑闂 - * - * @author Lion Li - */ -@RequiredArgsConstructor -@Service("sdss") -public class SysDataScopeServiceImpl implements ISysDataScopeService { - - private final SysRoleDeptMapper roleDeptMapper; - private final SysDeptMapper deptMapper; - - @Override - public String getRoleCustom(Long roleId) { - List<SysRoleDept> list = roleDeptMapper.selectList( - new LambdaQueryWrapper<SysRoleDept>() - .select(SysRoleDept::getDeptId) - .eq(SysRoleDept::getRoleId, roleId)); - if (CollUtil.isNotEmpty(list)) { - return StreamUtils.join(list, rd -> Convert.toStr(rd.getDeptId())); - } - return null; - } - - @Override - public String getDeptAndChild(Long deptId) { - List<SysDept> deptList = deptMapper.selectList(new LambdaQueryWrapper<SysDept>() - .select(SysDept::getDeptId) - .apply(DataBaseHelper.findInSet(deptId, "ancestors"))); - List<Long> ids = StreamUtils.toList(deptList, SysDept::getDeptId); - ids.add(deptId); - List<SysDept> list = deptMapper.selectList(new LambdaQueryWrapper<SysDept>() - .select(SysDept::getDeptId) - .in(SysDept::getDeptId, ids)); - if (CollUtil.isNotEmpty(list)) { - return StreamUtils.join(list, d -> Convert.toStr(d.getDeptId())); - } - return null; - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysDeptServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysDeptServiceImpl.java deleted file mode 100644 index 0402cf7..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysDeptServiceImpl.java +++ /dev/null @@ -1,325 +0,0 @@ -package com.xmzs.system.service.impl; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.convert.Convert; -import cn.hutool.core.lang.tree.Tree; -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.xmzs.common.core.constant.CacheNames; -import com.xmzs.common.core.constant.UserConstants; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.service.DeptService; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.core.utils.TreeBuildUtils; -import com.xmzs.common.mybatis.helper.DataBaseHelper; -import com.xmzs.common.redis.utils.CacheUtils; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.system.domain.SysDept; -import com.xmzs.system.domain.SysRole; -import com.xmzs.system.domain.SysUser; -import com.xmzs.system.domain.bo.SysDeptBo; -import com.xmzs.system.domain.vo.SysDeptVo; -import com.xmzs.system.mapper.SysDeptMapper; -import com.xmzs.system.mapper.SysRoleMapper; -import com.xmzs.system.mapper.SysUserMapper; -import com.xmzs.system.service.ISysDeptService; -import lombok.RequiredArgsConstructor; -import org.springframework.cache.annotation.CacheEvict; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -/** - * 閮ㄩ棬绠$悊 鏈嶅姟瀹炵幇 - * - * @author Lion Li - */ -@RequiredArgsConstructor -@Service -public class SysDeptServiceImpl implements ISysDeptService, DeptService { - - private final SysDeptMapper baseMapper; - private final SysRoleMapper roleMapper; - private final SysUserMapper userMapper; - - /** - * 鏌ヨ閮ㄩ棬绠$悊鏁版嵁 - * - * @param dept 閮ㄩ棬淇℃伅 - * @return 閮ㄩ棬淇℃伅闆嗗悎 - */ - @Override - public List<SysDeptVo> selectDeptList(SysDeptBo dept) { - LambdaQueryWrapper<SysDept> lqw = buildQueryWrapper(dept); - return baseMapper.selectDeptList(lqw); - } - - /** - * 鏌ヨ閮ㄩ棬鏍戠粨鏋勪俊鎭� - * - * @param bo 閮ㄩ棬淇℃伅 - * @return 閮ㄩ棬鏍戜俊鎭泦鍚� - */ - @Override - public List<Tree<Long>> selectDeptTreeList(SysDeptBo bo) { - LambdaQueryWrapper<SysDept> lqw = buildQueryWrapper(bo); - List<SysDept> depts = baseMapper.selectList(lqw); - return buildDeptTreeSelect(depts); - } - - private LambdaQueryWrapper<SysDept> buildQueryWrapper(SysDeptBo bo) { - LambdaQueryWrapper<SysDept> lqw = Wrappers.lambdaQuery(); - lqw.eq(SysDept::getDelFlag, "0"); - lqw.eq(ObjectUtil.isNotNull(bo.getDeptId()), SysDept::getDeptId, bo.getDeptId()); - lqw.eq(ObjectUtil.isNotNull(bo.getParentId()), SysDept::getParentId, bo.getParentId()); - lqw.like(StringUtils.isNotBlank(bo.getDeptName()), SysDept::getDeptName, bo.getDeptName()); - lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysDept::getStatus, bo.getStatus()); - lqw.orderByAsc(SysDept::getParentId); - lqw.orderByAsc(SysDept::getOrderNum); - return lqw; - } - - /** - * 鏋勫缓鍓嶇鎵�闇�瑕佷笅鎷夋爲缁撴瀯 - * - * @param depts 閮ㄩ棬鍒楄〃 - * @return 涓嬫媺鏍戠粨鏋勫垪琛� - */ - @Override - public List<Tree<Long>> buildDeptTreeSelect(List<SysDept> depts) { - if (CollUtil.isEmpty(depts)) { - return CollUtil.newArrayList(); - } - return TreeBuildUtils.build(depts, (dept, tree) -> - tree.setId(dept.getDeptId()) - .setParentId(dept.getParentId()) - .setName(dept.getDeptName()) - .setWeight(dept.getOrderNum())); - } - - /** - * 鏍规嵁瑙掕壊ID鏌ヨ閮ㄩ棬鏍戜俊鎭� - * - * @param roleId 瑙掕壊ID - * @return 閫変腑閮ㄩ棬鍒楄〃 - */ - @Override - public List<Long> selectDeptListByRoleId(Long roleId) { - SysRole role = roleMapper.selectById(roleId); - return baseMapper.selectDeptListByRoleId(roleId, role.getDeptCheckStrictly()); - } - - /** - * 鏍规嵁閮ㄩ棬ID鏌ヨ淇℃伅 - * - * @param deptId 閮ㄩ棬ID - * @return 閮ㄩ棬淇℃伅 - */ - @Cacheable(cacheNames = CacheNames.SYS_DEPT, key = "#deptId") - @Override - public SysDeptVo selectDeptById(Long deptId) { - SysDeptVo dept = baseMapper.selectVoById(deptId); - if (ObjectUtil.isNull(dept)) { - return null; - } - SysDeptVo parentDept = baseMapper.selectVoOne(new LambdaQueryWrapper<SysDept>() - .select(SysDept::getDeptName).eq(SysDept::getDeptId, dept.getParentId())); - dept.setParentName(ObjectUtil.isNotNull(parentDept) ? parentDept.getDeptName() : null); - return dept; - } - - /** - * 閫氳繃閮ㄩ棬ID鏌ヨ閮ㄩ棬鍚嶇О - * - * @param deptIds 閮ㄩ棬ID涓查�楀彿鍒嗛殧 - * @return 閮ㄩ棬鍚嶇О涓查�楀彿鍒嗛殧 - */ - @Override - public String selectDeptNameByIds(String deptIds) { - List<String> list = new ArrayList<>(); - for (Long id : StringUtils.splitTo(deptIds, Convert::toLong)) { - SysDeptVo vo = SpringUtils.getAopProxy(this).selectDeptById(id); - if (ObjectUtil.isNotNull(vo)) { - list.add(vo.getDeptName()); - } - } - return String.join(StringUtils.SEPARATOR, list); - } - - /** - * 鏍规嵁ID鏌ヨ鎵�鏈夊瓙閮ㄩ棬鏁帮紙姝e父鐘舵�侊級 - * - * @param deptId 閮ㄩ棬ID - * @return 瀛愰儴闂ㄦ暟 - */ - @Override - public long selectNormalChildrenDeptById(Long deptId) { - return baseMapper.selectCount(new LambdaQueryWrapper<SysDept>() - .eq(SysDept::getStatus, UserConstants.DEPT_NORMAL) - .apply(DataBaseHelper.findInSet(deptId, "ancestors"))); - } - - /** - * 鏄惁瀛樺湪瀛愯妭鐐� - * - * @param deptId 閮ㄩ棬ID - * @return 缁撴灉 - */ - @Override - public boolean hasChildByDeptId(Long deptId) { - return baseMapper.exists(new LambdaQueryWrapper<SysDept>() - .eq(SysDept::getParentId, deptId)); - } - - /** - * 鏌ヨ閮ㄩ棬鏄惁瀛樺湪鐢ㄦ埛 - * - * @param deptId 閮ㄩ棬ID - * @return 缁撴灉 true 瀛樺湪 false 涓嶅瓨鍦� - */ - @Override - public boolean checkDeptExistUser(Long deptId) { - return userMapper.exists(new LambdaQueryWrapper<SysUser>() - .eq(SysUser::getDeptId, deptId)); - } - - /** - * 鏍¢獙閮ㄩ棬鍚嶇О鏄惁鍞竴 - * - * @param dept 閮ㄩ棬淇℃伅 - * @return 缁撴灉 - */ - @Override - public boolean checkDeptNameUnique(SysDeptBo dept) { - boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysDept>() - .eq(SysDept::getDeptName, dept.getDeptName()) - .eq(SysDept::getParentId, dept.getParentId()) - .ne(ObjectUtil.isNotNull(dept.getDeptId()), SysDept::getDeptId, dept.getDeptId())); - return !exist; - } - - /** - * 鏍¢獙閮ㄩ棬鏄惁鏈夋暟鎹潈闄� - * - * @param deptId 閮ㄩ棬id - */ - @Override - public void checkDeptDataScope(Long deptId) { - if (ObjectUtil.isNull(deptId)) { - return; - } - if (LoginHelper.isSuperAdmin()) { - return; - } - SysDeptVo dept = baseMapper.selectDeptById(deptId); - if (ObjectUtil.isNull(dept)) { - throw new ServiceException("娌℃湁鏉冮檺璁块棶閮ㄩ棬鏁版嵁锛�"); - } - } - - /** - * 鏂板淇濆瓨閮ㄩ棬淇℃伅 - * - * @param bo 閮ㄩ棬淇℃伅 - * @return 缁撴灉 - */ - @Override - public int insertDept(SysDeptBo bo) { - SysDept info = baseMapper.selectById(bo.getParentId()); - // 濡傛灉鐖惰妭鐐逛笉涓烘甯哥姸鎬�,鍒欎笉鍏佽鏂板瀛愯妭鐐� - if (!UserConstants.DEPT_NORMAL.equals(info.getStatus())) { - throw new ServiceException("閮ㄩ棬鍋滅敤锛屼笉鍏佽鏂板"); - } - SysDept dept = MapstructUtils.convert(bo, SysDept.class); - dept.setAncestors(info.getAncestors() + StringUtils.SEPARATOR + dept.getParentId()); - return baseMapper.insert(dept); - } - - /** - * 淇敼淇濆瓨閮ㄩ棬淇℃伅 - * - * @param bo 閮ㄩ棬淇℃伅 - * @return 缁撴灉 - */ - @CacheEvict(cacheNames = CacheNames.SYS_DEPT, key = "#bo.deptId") - @Override - public int updateDept(SysDeptBo bo) { - SysDept dept = MapstructUtils.convert(bo, SysDept.class); - SysDept oldDept = baseMapper.selectById(dept.getDeptId()); - if (!oldDept.getParentId().equals(dept.getParentId())) { - // 濡傛灉鏄柊鐖堕儴闂� 鍒欐牎楠屾槸鍚﹀叿鏈夋柊鐖堕儴闂ㄦ潈闄� 閬垮厤瓒婃潈 - this.checkDeptDataScope(dept.getParentId()); - SysDept newParentDept = baseMapper.selectById(dept.getParentId()); - if (ObjectUtil.isNotNull(newParentDept) && ObjectUtil.isNotNull(oldDept)) { - String newAncestors = newParentDept.getAncestors() + StringUtils.SEPARATOR + newParentDept.getDeptId(); - String oldAncestors = oldDept.getAncestors(); - dept.setAncestors(newAncestors); - updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors); - } - } - int result = baseMapper.updateById(dept); - if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()) && StringUtils.isNotEmpty(dept.getAncestors()) - && !StringUtils.equals(UserConstants.DEPT_NORMAL, dept.getAncestors())) { - // 濡傛灉璇ラ儴闂ㄦ槸鍚敤鐘舵�侊紝鍒欏惎鐢ㄨ閮ㄩ棬鐨勬墍鏈変笂绾ч儴闂� - updateParentDeptStatusNormal(dept); - } - return result; - } - - /** - * 淇敼璇ラ儴闂ㄧ殑鐖剁骇閮ㄩ棬鐘舵�� - * - * @param dept 褰撳墠閮ㄩ棬 - */ - private void updateParentDeptStatusNormal(SysDept dept) { - String ancestors = dept.getAncestors(); - Long[] deptIds = Convert.toLongArray(ancestors); - baseMapper.update(null, new LambdaUpdateWrapper<SysDept>() - .set(SysDept::getStatus, UserConstants.DEPT_NORMAL) - .in(SysDept::getDeptId, Arrays.asList(deptIds))); - } - - /** - * 淇敼瀛愬厓绱犲叧绯� - * - * @param deptId 琚慨鏀圭殑閮ㄩ棬ID - * @param newAncestors 鏂扮殑鐖禝D闆嗗悎 - * @param oldAncestors 鏃х殑鐖禝D闆嗗悎 - */ - private void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors) { - List<SysDept> children = baseMapper.selectList(new LambdaQueryWrapper<SysDept>() - .apply(DataBaseHelper.findInSet(deptId, "ancestors"))); - List<SysDept> list = new ArrayList<>(); - for (SysDept child : children) { - SysDept dept = new SysDept(); - dept.setDeptId(child.getDeptId()); - dept.setAncestors(child.getAncestors().replaceFirst(oldAncestors, newAncestors)); - list.add(dept); - } - if (CollUtil.isNotEmpty(list)) { - if (baseMapper.updateBatchById(list)) { - list.forEach(dept -> CacheUtils.evict(CacheNames.SYS_DEPT, dept.getDeptId())); - } - } - } - - /** - * 鍒犻櫎閮ㄩ棬绠$悊淇℃伅 - * - * @param deptId 閮ㄩ棬ID - * @return 缁撴灉 - */ - @CacheEvict(cacheNames = CacheNames.SYS_DEPT, key = "#deptId") - @Override - public int deleteDeptById(Long deptId) { - return baseMapper.deleteById(deptId); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysDictDataServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysDictDataServiceImpl.java deleted file mode 100644 index 8d5c50f..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysDictDataServiceImpl.java +++ /dev/null @@ -1,139 +0,0 @@ -package com.xmzs.system.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.constant.CacheNames; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.redis.utils.CacheUtils; -import com.xmzs.system.domain.SysDictData; -import com.xmzs.system.domain.bo.SysDictDataBo; -import com.xmzs.system.domain.vo.SysDictDataVo; -import com.xmzs.system.mapper.SysDictDataMapper; -import com.xmzs.system.service.ISysDictDataService; -import lombok.RequiredArgsConstructor; -import org.springframework.cache.annotation.CachePut; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * 瀛楀吀 涓氬姟灞傚鐞� - * - * @author Lion Li - */ -@RequiredArgsConstructor -@Service -public class SysDictDataServiceImpl implements ISysDictDataService { - - private final SysDictDataMapper baseMapper; - - @Override - public TableDataInfo<SysDictDataVo> selectPageDictDataList(SysDictDataBo dictData, PageQuery pageQuery) { - LambdaQueryWrapper<SysDictData> lqw = buildQueryWrapper(dictData); - Page<SysDictDataVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(page); - } - - /** - * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ瀛楀吀鏁版嵁 - * - * @param dictData 瀛楀吀鏁版嵁淇℃伅 - * @return 瀛楀吀鏁版嵁闆嗗悎淇℃伅 - */ - @Override - public List<SysDictDataVo> selectDictDataList(SysDictDataBo dictData) { - LambdaQueryWrapper<SysDictData> lqw = buildQueryWrapper(dictData); - return baseMapper.selectVoList(lqw); - } - - private LambdaQueryWrapper<SysDictData> buildQueryWrapper(SysDictDataBo bo) { - LambdaQueryWrapper<SysDictData> lqw = Wrappers.lambdaQuery(); - lqw.eq(bo.getDictSort() != null, SysDictData::getDictSort, bo.getDictSort()); - lqw.like(StringUtils.isNotBlank(bo.getDictLabel()), SysDictData::getDictLabel, bo.getDictLabel()); - lqw.eq(StringUtils.isNotBlank(bo.getDictType()), SysDictData::getDictType, bo.getDictType()); - lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysDictData::getStatus, bo.getStatus()); - lqw.orderByAsc(SysDictData::getDictSort); - return lqw; - } - - /** - * 鏍规嵁瀛楀吀绫诲瀷鍜屽瓧鍏搁敭鍊兼煡璇㈠瓧鍏告暟鎹俊鎭� - * - * @param dictType 瀛楀吀绫诲瀷 - * @param dictValue 瀛楀吀閿�� - * @return 瀛楀吀鏍囩 - */ - @Override - public String selectDictLabel(String dictType, String dictValue) { - return baseMapper.selectOne(new LambdaQueryWrapper<SysDictData>() - .select(SysDictData::getDictLabel) - .eq(SysDictData::getDictType, dictType) - .eq(SysDictData::getDictValue, dictValue)) - .getDictLabel(); - } - - /** - * 鏍规嵁瀛楀吀鏁版嵁ID鏌ヨ淇℃伅 - * - * @param dictCode 瀛楀吀鏁版嵁ID - * @return 瀛楀吀鏁版嵁 - */ - @Override - public SysDictDataVo selectDictDataById(Long dictCode) { - return baseMapper.selectVoById(dictCode); - } - - /** - * 鎵归噺鍒犻櫎瀛楀吀鏁版嵁淇℃伅 - * - * @param dictCodes 闇�瑕佸垹闄ょ殑瀛楀吀鏁版嵁ID - */ - @Override - public void deleteDictDataByIds(Long[] dictCodes) { - for (Long dictCode : dictCodes) { - SysDictData data = baseMapper.selectById(dictCode); - baseMapper.deleteById(dictCode); - CacheUtils.evict(CacheNames.SYS_DICT, data.getDictType()); - } - } - - /** - * 鏂板淇濆瓨瀛楀吀鏁版嵁淇℃伅 - * - * @param bo 瀛楀吀鏁版嵁淇℃伅 - * @return 缁撴灉 - */ - @CachePut(cacheNames = CacheNames.SYS_DICT, key = "#bo.dictType") - @Override - public List<SysDictDataVo> insertDictData(SysDictDataBo bo) { - SysDictData data = MapstructUtils.convert(bo, SysDictData.class); - int row = baseMapper.insert(data); - if (row > 0) { - return baseMapper.selectDictDataByType(data.getDictType()); - } - throw new ServiceException("鎿嶄綔澶辫触"); - } - - /** - * 淇敼淇濆瓨瀛楀吀鏁版嵁淇℃伅 - * - * @param bo 瀛楀吀鏁版嵁淇℃伅 - * @return 缁撴灉 - */ - @CachePut(cacheNames = CacheNames.SYS_DICT, key = "#bo.dictType") - @Override - public List<SysDictDataVo> updateDictData(SysDictDataBo bo) { - SysDictData data = MapstructUtils.convert(bo, SysDictData.class); - int row = baseMapper.updateById(data); - if (row > 0) { - return baseMapper.selectDictDataByType(data.getDictType()); - } - throw new ServiceException("鎿嶄綔澶辫触"); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysDictTypeServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysDictTypeServiceImpl.java deleted file mode 100644 index d43157f..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysDictTypeServiceImpl.java +++ /dev/null @@ -1,268 +0,0 @@ -package com.xmzs.system.service.impl; - -import cn.dev33.satoken.context.SaHolder; -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.constant.CacheConstants; -import com.xmzs.common.core.constant.CacheNames; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.service.DictService; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.core.utils.StreamUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.redis.utils.CacheUtils; -import com.xmzs.system.domain.SysDictData; -import com.xmzs.system.domain.SysDictType; -import com.xmzs.system.domain.bo.SysDictTypeBo; -import com.xmzs.system.domain.vo.SysDictDataVo; -import com.xmzs.system.domain.vo.SysDictTypeVo; -import com.xmzs.system.mapper.SysDictDataMapper; -import com.xmzs.system.mapper.SysDictTypeMapper; -import com.xmzs.system.service.ISysDictTypeService; -import lombok.RequiredArgsConstructor; -import org.springframework.cache.annotation.CachePut; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * 瀛楀吀 涓氬姟灞傚鐞� - * - * @author Lion Li - */ -@RequiredArgsConstructor -@Service -public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService { - - private final SysDictTypeMapper baseMapper; - private final SysDictDataMapper dictDataMapper; - - @Override - public TableDataInfo<SysDictTypeVo> selectPageDictTypeList(SysDictTypeBo dictType, PageQuery pageQuery) { - LambdaQueryWrapper<SysDictType> lqw = buildQueryWrapper(dictType); - Page<SysDictTypeVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(page); - } - - /** - * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ瀛楀吀绫诲瀷 - * - * @param dictType 瀛楀吀绫诲瀷淇℃伅 - * @return 瀛楀吀绫诲瀷闆嗗悎淇℃伅 - */ - @Override - public List<SysDictTypeVo> selectDictTypeList(SysDictTypeBo dictType) { - LambdaQueryWrapper<SysDictType> lqw = buildQueryWrapper(dictType); - return baseMapper.selectVoList(lqw); - } - - private LambdaQueryWrapper<SysDictType> buildQueryWrapper(SysDictTypeBo bo) { - Map<String, Object> params = bo.getParams(); - LambdaQueryWrapper<SysDictType> lqw = Wrappers.lambdaQuery(); - lqw.like(StringUtils.isNotBlank(bo.getDictName()), SysDictType::getDictName, bo.getDictName()); - lqw.like(StringUtils.isNotBlank(bo.getDictType()), SysDictType::getDictType, bo.getDictType()); - lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysDictType::getStatus, bo.getStatus()); - lqw.between(params.get("beginTime") != null && params.get("endTime") != null, - SysDictType::getCreateTime, params.get("beginTime"), params.get("endTime")); - return lqw; - } - - /** - * 鏍规嵁鎵�鏈夊瓧鍏哥被鍨� - * - * @return 瀛楀吀绫诲瀷闆嗗悎淇℃伅 - */ - @Override - public List<SysDictTypeVo> selectDictTypeAll() { - return baseMapper.selectVoList(); - } - - /** - * 鏍规嵁瀛楀吀绫诲瀷鏌ヨ瀛楀吀鏁版嵁 - * - * @param dictType 瀛楀吀绫诲瀷 - * @return 瀛楀吀鏁版嵁闆嗗悎淇℃伅 - */ - // @Cacheable(cacheNames = CacheNames.SYS_DICT, key = "#dictType") - @Override - public List<SysDictDataVo> selectDictDataByType(String dictType) { - List<SysDictDataVo> dictDatas = dictDataMapper.selectDictDataByType(dictType); - if (CollUtil.isNotEmpty(dictDatas)) { - return dictDatas; - } - return null; - } - - /** - * 鏍规嵁瀛楀吀绫诲瀷ID鏌ヨ淇℃伅 - * - * @param dictId 瀛楀吀绫诲瀷ID - * @return 瀛楀吀绫诲瀷 - */ - @Override - public SysDictTypeVo selectDictTypeById(Long dictId) { - return baseMapper.selectVoById(dictId); - } - - /** - * 鏍规嵁瀛楀吀绫诲瀷鏌ヨ淇℃伅 - * - * @param dictType 瀛楀吀绫诲瀷 - * @return 瀛楀吀绫诲瀷 - */ - @Cacheable(cacheNames = CacheNames.SYS_DICT, key = "#dictType") - @Override - public SysDictTypeVo selectDictTypeByType(String dictType) { - return baseMapper.selectVoById(new LambdaQueryWrapper<SysDictType>().eq(SysDictType::getDictType, dictType)); - } - - /** - * 鎵归噺鍒犻櫎瀛楀吀绫诲瀷淇℃伅 - * - * @param dictIds 闇�瑕佸垹闄ょ殑瀛楀吀ID - */ - @Override - public void deleteDictTypeByIds(Long[] dictIds) { - for (Long dictId : dictIds) { - SysDictType dictType = baseMapper.selectById(dictId); - if (dictDataMapper.exists(new LambdaQueryWrapper<SysDictData>() - .eq(SysDictData::getDictType, dictType.getDictType()))) { - throw new ServiceException(String.format("%1$s宸插垎閰�,涓嶈兘鍒犻櫎", dictType.getDictName())); - } - CacheUtils.evict(CacheNames.SYS_DICT, dictType.getDictType()); - } - baseMapper.deleteBatchIds(Arrays.asList(dictIds)); - } - - /** - * 閲嶇疆瀛楀吀缂撳瓨鏁版嵁 - */ - @Override - public void resetDictCache() { - CacheUtils.clear(CacheNames.SYS_DICT); - } - - /** - * 鏂板淇濆瓨瀛楀吀绫诲瀷淇℃伅 - * - * @param bo 瀛楀吀绫诲瀷淇℃伅 - * @return 缁撴灉 - */ - @CachePut(cacheNames = CacheNames.SYS_DICT, key = "#bo.dictType") - @Override - public List<SysDictTypeVo> insertDictType(SysDictTypeBo bo) { - SysDictType dict = MapstructUtils.convert(bo, SysDictType.class); - int row = baseMapper.insert(dict); - if (row > 0) { - return new ArrayList<>(); - } - throw new ServiceException("鎿嶄綔澶辫触"); - } - - /** - * 淇敼淇濆瓨瀛楀吀绫诲瀷淇℃伅 - * - * @param bo 瀛楀吀绫诲瀷淇℃伅 - * @return 缁撴灉 - */ - @CachePut(cacheNames = CacheNames.SYS_DICT, key = "#bo.dictType") - @Override - @Transactional(rollbackFor = Exception.class) - public List<SysDictDataVo> updateDictType(SysDictTypeBo bo) { - SysDictType dict = MapstructUtils.convert(bo, SysDictType.class); - SysDictType oldDict = baseMapper.selectById(dict.getDictId()); - dictDataMapper.update(null, new LambdaUpdateWrapper<SysDictData>() - .set(SysDictData::getDictType, dict.getDictType()) - .eq(SysDictData::getDictType, oldDict.getDictType())); - int row = baseMapper.updateById(dict); - if (row > 0) { - CacheUtils.evict(CacheNames.SYS_DICT, oldDict.getDictType()); - return dictDataMapper.selectDictDataByType(dict.getDictType()); - } - throw new ServiceException("鎿嶄綔澶辫触"); - } - - /** - * 鏍¢獙瀛楀吀绫诲瀷绉版槸鍚﹀敮涓� - * - * @param dictType 瀛楀吀绫诲瀷 - * @return 缁撴灉 - */ - @Override - public boolean checkDictTypeUnique(SysDictTypeBo dictType) { - boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysDictType>() - .eq(SysDictType::getDictType, dictType.getDictType()) - .ne(ObjectUtil.isNotNull(dictType.getDictId()), SysDictType::getDictId, dictType.getDictId())); - return !exist; - } - - /** - * 鏍规嵁瀛楀吀绫诲瀷鍜屽瓧鍏稿�艰幏鍙栧瓧鍏告爣绛� - * - * @param dictType 瀛楀吀绫诲瀷 - * @param dictValue 瀛楀吀鍊� - * @param separator 鍒嗛殧绗� - * @return 瀛楀吀鏍囩 - */ - @SuppressWarnings("unchecked cast") - @Override - public String getDictLabel(String dictType, String dictValue, String separator) { - // 浼樺厛浠庢湰鍦扮紦瀛樿幏鍙� - List<SysDictDataVo> datas = (List<SysDictDataVo>) SaHolder.getStorage().get(CacheConstants.SYS_DICT_KEY + dictType); - if (ObjectUtil.isNull(datas)) { - datas = SpringUtils.getAopProxy(this).selectDictDataByType(dictType); - SaHolder.getStorage().set(CacheConstants.SYS_DICT_KEY + dictType, datas); - } - - Map<String, String> map = StreamUtils.toMap(datas, SysDictDataVo::getDictValue, SysDictDataVo::getDictLabel); - if (StringUtils.containsAny(dictValue, separator)) { - return Arrays.stream(dictValue.split(separator)) - .map(v -> map.getOrDefault(v, StringUtils.EMPTY)) - .collect(Collectors.joining(separator)); - } else { - return map.getOrDefault(dictValue, StringUtils.EMPTY); - } - } - - /** - * 鏍规嵁瀛楀吀绫诲瀷鍜屽瓧鍏告爣绛捐幏鍙栧瓧鍏稿�� - * - * @param dictType 瀛楀吀绫诲瀷 - * @param dictLabel 瀛楀吀鏍囩 - * @param separator 鍒嗛殧绗� - * @return 瀛楀吀鍊� - */ - @SuppressWarnings("unchecked cast") - @Override - public String getDictValue(String dictType, String dictLabel, String separator) { - // 浼樺厛浠庢湰鍦扮紦瀛樿幏鍙� - List<SysDictDataVo> datas = (List<SysDictDataVo>) SaHolder.getStorage().get(CacheConstants.SYS_DICT_KEY + dictType); - if (ObjectUtil.isNull(datas)) { - datas = SpringUtils.getAopProxy(this).selectDictDataByType(dictType); - SaHolder.getStorage().set(CacheConstants.SYS_DICT_KEY + dictType, datas); - } - - Map<String, String> map = StreamUtils.toMap(datas, SysDictDataVo::getDictLabel, SysDictDataVo::getDictValue); - if (StringUtils.containsAny(dictLabel, separator)) { - return Arrays.stream(dictLabel.split(separator)) - .map(l -> map.getOrDefault(l, StringUtils.EMPTY)) - .collect(Collectors.joining(separator)); - } else { - return map.getOrDefault(dictLabel, StringUtils.EMPTY); - } - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysLogininforServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysLogininforServiceImpl.java deleted file mode 100644 index 59843f5..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysLogininforServiceImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -package com.xmzs.system.service.impl; - -import cn.hutool.http.useragent.UserAgent; -import cn.hutool.http.useragent.UserAgentUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.constant.Constants; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.ServletUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.core.utils.ip.AddressUtils; -import com.xmzs.common.log.event.LogininforEvent; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.SysLogininfor; -import com.xmzs.system.domain.bo.SysLogininforBo; -import com.xmzs.system.domain.vo.SysLogininforVo; -import com.xmzs.system.mapper.SysLogininforMapper; -import com.xmzs.system.service.ISysLogininforService; -import jakarta.servlet.http.HttpServletRequest; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.context.event.EventListener; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Service; - -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/** - * 绯荤粺璁块棶鏃ュ織鎯呭喌淇℃伅 鏈嶅姟灞傚鐞� - * - * @author Lion Li - */ -@RequiredArgsConstructor -@Slf4j -@Service -public class SysLogininforServiceImpl implements ISysLogininforService { - - private final SysLogininforMapper baseMapper; - - /** - * 璁板綍鐧诲綍淇℃伅 - * - * @param logininforEvent 鐧诲綍浜嬩欢 - */ - @Async - @EventListener - public void recordLogininfor(LogininforEvent logininforEvent) { - HttpServletRequest request = logininforEvent.getRequest(); - final UserAgent userAgent = UserAgentUtil.parse(request.getHeader("User-Agent")); - final String ip = ServletUtils.getClientIP(request); - - String address = AddressUtils.getRealAddressByIP(ip); - StringBuilder s = new StringBuilder(); - s.append(getBlock(ip)); - s.append(address); - s.append(getBlock(logininforEvent.getUsername())); - s.append(getBlock(logininforEvent.getStatus())); - s.append(getBlock(logininforEvent.getMessage())); - // 鎵撳嵃淇℃伅鍒版棩蹇� - log.info(s.toString(), logininforEvent.getArgs()); - // 鑾峰彇瀹㈡埛绔搷浣滅郴缁� - String os = userAgent.getOs().getName(); - // 鑾峰彇瀹㈡埛绔祻瑙堝櫒 - String browser = userAgent.getBrowser().getName(); - // 灏佽瀵硅薄 - SysLogininforBo logininfor = new SysLogininforBo(); - logininfor.setTenantId(logininforEvent.getTenantId()); - logininfor.setUserName(logininforEvent.getUsername()); - logininfor.setIpaddr(ip); - logininfor.setLoginLocation(address); - logininfor.setBrowser(browser); - logininfor.setOs(os); - logininfor.setMsg(logininforEvent.getMessage()); - // 鏃ュ織鐘舵�� - if (StringUtils.equalsAny(logininforEvent.getStatus(), Constants.LOGIN_SUCCESS, Constants.LOGOUT, Constants.REGISTER)) { - logininfor.setStatus(Constants.SUCCESS); - } else if (Constants.LOGIN_FAIL.equals(logininforEvent.getStatus())) { - logininfor.setStatus(Constants.FAIL); - } - // 鎻掑叆鏁版嵁 - insertLogininfor(logininfor); - } - - private String getBlock(Object msg) { - if (msg == null) { - msg = ""; - } - return "[" + msg.toString() + "]"; - } - - @Override - public TableDataInfo<SysLogininforVo> selectPageLogininforList(SysLogininforBo logininfor, PageQuery pageQuery) { - Map<String, Object> params = logininfor.getParams(); - LambdaQueryWrapper<SysLogininfor> lqw = new LambdaQueryWrapper<SysLogininfor>() - .like(StringUtils.isNotBlank(logininfor.getIpaddr()), SysLogininfor::getIpaddr, logininfor.getIpaddr()) - .eq(StringUtils.isNotBlank(logininfor.getStatus()), SysLogininfor::getStatus, logininfor.getStatus()) - .like(StringUtils.isNotBlank(logininfor.getUserName()), SysLogininfor::getUserName, logininfor.getUserName()) - .between(params.get("beginTime") != null && params.get("endTime") != null, - SysLogininfor::getLoginTime, params.get("beginTime"), params.get("endTime")); - if (StringUtils.isBlank(pageQuery.getOrderByColumn())) { - pageQuery.setOrderByColumn("info_id"); - pageQuery.setIsAsc("desc"); - } - Page<SysLogininforVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(page); - } - - /** - * 鏂板绯荤粺鐧诲綍鏃ュ織 - * - * @param bo 璁块棶鏃ュ織瀵硅薄 - */ - @Override - public void insertLogininfor(SysLogininforBo bo) { - SysLogininfor logininfor = MapstructUtils.convert(bo, SysLogininfor.class); - logininfor.setLoginTime(new Date()); - baseMapper.insert(logininfor); - } - - /** - * 鏌ヨ绯荤粺鐧诲綍鏃ュ織闆嗗悎 - * - * @param logininfor 璁块棶鏃ュ織瀵硅薄 - * @return 鐧诲綍璁板綍闆嗗悎 - */ - @Override - public List<SysLogininforVo> selectLogininforList(SysLogininforBo logininfor) { - Map<String, Object> params = logininfor.getParams(); - return baseMapper.selectVoList(new LambdaQueryWrapper<SysLogininfor>() - .like(StringUtils.isNotBlank(logininfor.getIpaddr()), SysLogininfor::getIpaddr, logininfor.getIpaddr()) - .eq(StringUtils.isNotBlank(logininfor.getStatus()), SysLogininfor::getStatus, logininfor.getStatus()) - .like(StringUtils.isNotBlank(logininfor.getUserName()), SysLogininfor::getUserName, logininfor.getUserName()) - .between(params.get("beginTime") != null && params.get("endTime") != null, - SysLogininfor::getLoginTime, params.get("beginTime"), params.get("endTime")) - .orderByDesc(SysLogininfor::getInfoId)); - } - - /** - * 鎵归噺鍒犻櫎绯荤粺鐧诲綍鏃ュ織 - * - * @param infoIds 闇�瑕佸垹闄ょ殑鐧诲綍鏃ュ織ID - * @return 缁撴灉 - */ - @Override - public int deleteLogininforByIds(Long[] infoIds) { - return baseMapper.deleteBatchIds(Arrays.asList(infoIds)); - } - - /** - * 娓呯┖绯荤粺鐧诲綍鏃ュ織 - */ - @Override - public void cleanLogininfor() { - baseMapper.delete(new LambdaQueryWrapper<>()); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysMenuServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysMenuServiceImpl.java deleted file mode 100644 index 52a4631..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysMenuServiceImpl.java +++ /dev/null @@ -1,365 +0,0 @@ -package com.xmzs.system.service.impl; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.convert.Convert; -import cn.hutool.core.lang.tree.Tree; -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.xmzs.common.core.constant.UserConstants; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.StreamUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.core.utils.TreeBuildUtils; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.system.domain.SysMenu; -import com.xmzs.system.domain.SysRole; -import com.xmzs.system.domain.SysRoleMenu; -import com.xmzs.system.domain.SysTenantPackage; -import com.xmzs.system.domain.bo.SysMenuBo; -import com.xmzs.system.domain.vo.MetaVo; -import com.xmzs.system.domain.vo.RouterVo; -import com.xmzs.system.domain.vo.SysMenuVo; -import com.xmzs.system.mapper.SysMenuMapper; -import com.xmzs.system.mapper.SysRoleMapper; -import com.xmzs.system.mapper.SysRoleMenuMapper; -import com.xmzs.system.mapper.SysTenantPackageMapper; -import com.xmzs.system.service.ISysMenuService; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; - -import java.util.*; - -/** - * 鑿滃崟 涓氬姟灞傚鐞� - * - * @author Lion Li - */ -@RequiredArgsConstructor -@Service -public class SysMenuServiceImpl implements ISysMenuService { - - private final SysMenuMapper baseMapper; - private final SysRoleMapper roleMapper; - private final SysRoleMenuMapper roleMenuMapper; - private final SysTenantPackageMapper tenantPackageMapper; - - /** - * 鏍规嵁鐢ㄦ埛鏌ヨ绯荤粺鑿滃崟鍒楄〃 - * - * @param userId 鐢ㄦ埛ID - * @return 鑿滃崟鍒楄〃 - */ - @Override - public List<SysMenuVo> selectMenuList(Long userId) { - return selectMenuList(new SysMenuBo(), userId); - } - - /** - * 鏌ヨ绯荤粺鑿滃崟鍒楄〃 - * - * @param menu 鑿滃崟淇℃伅 - * @return 鑿滃崟鍒楄〃 - */ - @Override - public List<SysMenuVo> selectMenuList(SysMenuBo menu, Long userId) { - List<SysMenuVo> menuList; - // 绠$悊鍛樻樉绀烘墍鏈夎彍鍗曚俊鎭� - if (LoginHelper.isSuperAdmin(userId)) { - menuList = baseMapper.selectVoList(new LambdaQueryWrapper<SysMenu>() - .like(StringUtils.isNotBlank(menu.getMenuName()), SysMenu::getMenuName, menu.getMenuName()) - .eq(StringUtils.isNotBlank(menu.getVisible()), SysMenu::getVisible, menu.getVisible()) - .eq(StringUtils.isNotBlank(menu.getStatus()), SysMenu::getStatus, menu.getStatus()) - .orderByAsc(SysMenu::getParentId) - .orderByAsc(SysMenu::getOrderNum)); - } else { - QueryWrapper<SysMenu> wrapper = Wrappers.query(); - wrapper.eq("sur.user_id", userId) - .like(StringUtils.isNotBlank(menu.getMenuName()), "m.menu_name", menu.getMenuName()) - .eq(StringUtils.isNotBlank(menu.getVisible()), "m.visible", menu.getVisible()) - .eq(StringUtils.isNotBlank(menu.getStatus()), "m.status", menu.getStatus()) - .orderByAsc("m.parent_id") - .orderByAsc("m.order_num"); - List<SysMenu> list = baseMapper.selectMenuListByUserId(wrapper); - menuList = MapstructUtils.convert(list, SysMenuVo.class); - } - return menuList; - } - - /** - * 鏍规嵁鐢ㄦ埛ID鏌ヨ鏉冮檺 - * - * @param userId 鐢ㄦ埛ID - * @return 鏉冮檺鍒楄〃 - */ - @Override - public Set<String> selectMenuPermsByUserId(Long userId) { - List<String> perms = baseMapper.selectMenuPermsByUserId(userId); - Set<String> permsSet = new HashSet<>(); - for (String perm : perms) { - if (StringUtils.isNotEmpty(perm)) { - permsSet.addAll(StringUtils.splitList(perm.trim())); - } - } - return permsSet; - } - - /** - * 鏍规嵁瑙掕壊ID鏌ヨ鏉冮檺 - * - * @param roleId 瑙掕壊ID - * @return 鏉冮檺鍒楄〃 - */ - @Override - public Set<String> selectMenuPermsByRoleId(Long roleId) { - List<String> perms = baseMapper.selectMenuPermsByRoleId(roleId); - Set<String> permsSet = new HashSet<>(); - for (String perm : perms) { - if (StringUtils.isNotEmpty(perm)) { - permsSet.addAll(StringUtils.splitList(perm.trim())); - } - } - return permsSet; - } - - /** - * 鏍规嵁鐢ㄦ埛ID鏌ヨ鑿滃崟 - * - * @param userId 鐢ㄦ埛鍚嶇О - * @return 鑿滃崟鍒楄〃 - */ - @Override - public List<SysMenu> selectMenuTreeByUserId(Long userId) { - List<SysMenu> menus; - if (LoginHelper.isSuperAdmin(userId)) { - menus = baseMapper.selectMenuTreeAll(); - } else { - menus = baseMapper.selectMenuTreeByUserId(userId); - } - return getChildPerms(menus, 0); - } - - /** - * 鏍规嵁瑙掕壊ID鏌ヨ鑿滃崟鏍戜俊鎭� - * - * @param roleId 瑙掕壊ID - * @return 閫変腑鑿滃崟鍒楄〃 - */ - @Override - public List<Long> selectMenuListByRoleId(Long roleId) { - SysRole role = roleMapper.selectById(roleId); - return baseMapper.selectMenuListByRoleId(roleId, role.getMenuCheckStrictly()); - } - - /** - * 鏍规嵁绉熸埛濂楅ID鏌ヨ鑿滃崟鏍戜俊鎭� - * - * @param packageId 绉熸埛濂楅ID - * @return 閫変腑鑿滃崟鍒楄〃 - */ - @Override - public List<Long> selectMenuListByPackageId(Long packageId) { - SysTenantPackage tenantPackage = tenantPackageMapper.selectById(packageId); - List<Long> menuIds = StringUtils.splitTo(tenantPackage.getMenuIds(), Convert::toLong); - if (CollUtil.isEmpty(menuIds)) { - return List.of(); - } - List<Long> parentIds = null; - if (tenantPackage.getMenuCheckStrictly()) { - parentIds = baseMapper.selectObjs(new LambdaQueryWrapper<SysMenu>() - .select(SysMenu::getParentId) - .in(SysMenu::getMenuId, menuIds), Convert::toLong); - } - return baseMapper.selectObjs(new LambdaQueryWrapper<SysMenu>() - .in(SysMenu::getMenuId, menuIds) - .notIn(CollUtil.isNotEmpty(parentIds), SysMenu::getMenuId, parentIds), Convert::toLong); - } - - /** - * 鏋勫缓鍓嶇璺敱鎵�闇�瑕佺殑鑿滃崟 - * - * @param menus 鑿滃崟鍒楄〃 - * @return 璺敱鍒楄〃 - */ - @Override - public List<RouterVo> buildMenus(List<SysMenu> menus) { - List<RouterVo> routers = new LinkedList<>(); - for (SysMenu menu : menus) { - RouterVo router = new RouterVo(); - router.setHidden("1".equals(menu.getVisible())); - router.setName(menu.getRouteName()); - router.setPath(menu.getRouterPath()); - router.setComponent(menu.getComponentInfo()); - router.setQuery(menu.getQueryParam()); - router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath())); - List<SysMenu> cMenus = menu.getChildren(); - if (CollUtil.isNotEmpty(cMenus) && UserConstants.TYPE_DIR.equals(menu.getMenuType())) { - router.setAlwaysShow(true); - router.setRedirect("noRedirect"); - router.setChildren(buildMenus(cMenus)); - } else if (menu.isMenuFrame()) { - router.setMeta(null); - List<RouterVo> childrenList = new ArrayList<>(); - RouterVo children = new RouterVo(); - children.setPath(menu.getPath()); - children.setComponent(menu.getComponentInfo()); - children.setName(StringUtils.capitalize(menu.getPath())); - children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()), menu.getPath())); - children.setQuery(menu.getQueryParam()); - childrenList.add(children); - router.setChildren(childrenList); - } else if (menu.getParentId().intValue() == 0 && menu.isInnerLink()) { - router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon())); - router.setPath("/"); - List<RouterVo> childrenList = new ArrayList<>(); - RouterVo children = new RouterVo(); - String routerPath = SysMenu.innerLinkReplaceEach(menu.getPath()); - children.setPath(routerPath); - children.setComponent(UserConstants.INNER_LINK); - children.setName(StringUtils.capitalize(routerPath)); - children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), menu.getPath())); - childrenList.add(children); - router.setChildren(childrenList); - } - routers.add(router); - } - return routers; - } - - /** - * 鏋勫缓鍓嶇鎵�闇�瑕佷笅鎷夋爲缁撴瀯 - * - * @param menus 鑿滃崟鍒楄〃 - * @return 涓嬫媺鏍戠粨鏋勫垪琛� - */ - @Override - public List<Tree<Long>> buildMenuTreeSelect(List<SysMenuVo> menus) { - if (CollUtil.isEmpty(menus)) { - return CollUtil.newArrayList(); - } - return TreeBuildUtils.build(menus, (menu, tree) -> - tree.setId(menu.getMenuId()) - .setParentId(menu.getParentId()) - .setName(menu.getMenuName()) - .setWeight(menu.getOrderNum())); - } - - /** - * 鏍规嵁鑿滃崟ID鏌ヨ淇℃伅 - * - * @param menuId 鑿滃崟ID - * @return 鑿滃崟淇℃伅 - */ - @Override - public SysMenuVo selectMenuById(Long menuId) { - return baseMapper.selectVoById(menuId); - } - - /** - * 鏄惁瀛樺湪鑿滃崟瀛愯妭鐐� - * - * @param menuId 鑿滃崟ID - * @return 缁撴灉 - */ - @Override - public boolean hasChildByMenuId(Long menuId) { - return baseMapper.exists(new LambdaQueryWrapper<SysMenu>().eq(SysMenu::getParentId, menuId)); - } - - /** - * 鏌ヨ鑿滃崟浣跨敤鏁伴噺 - * - * @param menuId 鑿滃崟ID - * @return 缁撴灉 - */ - @Override - public boolean checkMenuExistRole(Long menuId) { - return roleMenuMapper.exists(new LambdaQueryWrapper<SysRoleMenu>().eq(SysRoleMenu::getMenuId, menuId)); - } - - /** - * 鏂板淇濆瓨鑿滃崟淇℃伅 - * - * @param bo 鑿滃崟淇℃伅 - * @return 缁撴灉 - */ - @Override - public int insertMenu(SysMenuBo bo) { - SysMenu menu = MapstructUtils.convert(bo, SysMenu.class); - return baseMapper.insert(menu); - } - - /** - * 淇敼淇濆瓨鑿滃崟淇℃伅 - * - * @param bo 鑿滃崟淇℃伅 - * @return 缁撴灉 - */ - @Override - public int updateMenu(SysMenuBo bo) { - SysMenu menu = MapstructUtils.convert(bo, SysMenu.class); - return baseMapper.updateById(menu); - } - - /** - * 鍒犻櫎鑿滃崟绠$悊淇℃伅 - * - * @param menuId 鑿滃崟ID - * @return 缁撴灉 - */ - @Override - public int deleteMenuById(Long menuId) { - return baseMapper.deleteById(menuId); - } - - /** - * 鏍¢獙鑿滃崟鍚嶇О鏄惁鍞竴 - * - * @param menu 鑿滃崟淇℃伅 - * @return 缁撴灉 - */ - @Override - public boolean checkMenuNameUnique(SysMenuBo menu) { - boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysMenu>() - .eq(SysMenu::getMenuName, menu.getMenuName()) - .eq(SysMenu::getParentId, menu.getParentId()) - .ne(ObjectUtil.isNotNull(menu.getMenuId()), SysMenu::getMenuId, menu.getMenuId())); - return !exist; - } - - /** - * 鏍规嵁鐖惰妭鐐圭殑ID鑾峰彇鎵�鏈夊瓙鑺傜偣 - * - * @param list 鍒嗙被琛� - * @param parentId 浼犲叆鐨勭埗鑺傜偣ID - * @return String - */ - private List<SysMenu> getChildPerms(List<SysMenu> list, int parentId) { - List<SysMenu> returnList = new ArrayList<>(); - for (SysMenu t : list) { - // 涓�銆佹牴鎹紶鍏ョ殑鏌愪釜鐖惰妭鐐笽D,閬嶅巻璇ョ埗鑺傜偣鐨勬墍鏈夊瓙鑺傜偣 - if (t.getParentId() == parentId) { - recursionFn(list, t); - returnList.add(t); - } - } - return returnList; - } - - /** - * 閫掑綊鍒楄〃 - */ - private void recursionFn(List<SysMenu> list, SysMenu t) { - // 寰楀埌瀛愯妭鐐瑰垪琛� - List<SysMenu> childList = StreamUtils.filter(list, n -> n.getParentId().equals(t.getMenuId())); - t.setChildren(childList); - for (SysMenu tChild : childList) { - // 鍒ゆ柇鏄惁鏈夊瓙鑺傜偣 - if (list.stream().anyMatch(n -> n.getParentId().equals(tChild.getMenuId()))) { - recursionFn(list, tChild); - } - } - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysModelServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysModelServiceImpl.java deleted file mode 100644 index d298efc..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysModelServiceImpl.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.xmzs.system.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.SysModel; -import com.xmzs.system.domain.bo.SysModelBo; -import com.xmzs.system.domain.vo.SysModelVo; -import com.xmzs.system.mapper.SysModelMapper; -import com.xmzs.system.service.ISysModelService; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; - -import java.util.Collection; -import java.util.List; - -/** - * 绯荤粺妯″瀷Service涓氬姟灞傚鐞� - * - * @author Lion Li - * @date 2024-04-04 - */ -@RequiredArgsConstructor -@Service -public class SysModelServiceImpl implements ISysModelService { - - private final SysModelMapper baseMapper; - - /** - * 鏌ヨ绯荤粺妯″瀷 - */ - @Override - public SysModelVo queryById(Long id){ - return baseMapper.selectVoById(id); - } - - /** - * 鏌ヨ绯荤粺妯″瀷鍒楄〃 - */ - @Override - public TableDataInfo<SysModelVo> queryPageList(SysModelBo bo, PageQuery pageQuery) { - LambdaQueryWrapper<SysModel> lqw = buildQueryWrapper(bo); - Page<SysModelVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(result); - } - - /** - * 鏌ヨ绯荤粺妯″瀷鍒楄〃 - */ - @Override - public List<SysModelVo> queryList(SysModelBo bo) { - LambdaQueryWrapper<SysModel> lqw = buildQueryWrapper(bo); - return baseMapper.selectVoList(lqw); - } - - private LambdaQueryWrapper<SysModel> buildQueryWrapper(SysModelBo bo) { - LambdaQueryWrapper<SysModel> lqw = Wrappers.lambdaQuery(); - lqw.like(StringUtils.isNotBlank(bo.getModelName()), SysModel::getModelName, bo.getModelName()); - lqw.like(StringUtils.isNotBlank(bo.getModelShow()), SysModel::getModelShow, bo.getModelShow()); - lqw.eq(StringUtils.isNotBlank(bo.getModelDescribe()), SysModel::getModelDescribe, bo.getModelDescribe()); - lqw.eq(StringUtils.isNotBlank(bo.getModelType()), SysModel::getModelType, bo.getModelType()); - return lqw; - } - - /** - * 鏂板绯荤粺妯″瀷 - */ - @Override - public Boolean insertByBo(SysModelBo bo) { - SysModel add = MapstructUtils.convert(bo, SysModel.class); - validEntityBeforeSave(add); - boolean flag = baseMapper.insert(add) > 0; - if (flag) { - bo.setId(add.getId()); - } - return flag; - } - - /** - * 淇敼绯荤粺妯″瀷 - */ - @Override - public Boolean updateByBo(SysModelBo bo) { - SysModel update = MapstructUtils.convert(bo, SysModel.class); - validEntityBeforeSave(update); - return baseMapper.updateById(update) > 0; - } - - /** - * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙 - */ - private void validEntityBeforeSave(SysModel entity){ - //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫 - } - - /** - * 鎵归噺鍒犻櫎绯荤粺妯″瀷 - */ - @Override - public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { - if(isValid){ - //TODO 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠� - } - return baseMapper.deleteBatchIds(ids) > 0; - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysNoticeServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysNoticeServiceImpl.java deleted file mode 100644 index dec307d..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysNoticeServiceImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -package com.xmzs.system.service.impl; - -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.SysNotice; -import com.xmzs.system.domain.bo.SysNoticeBo; -import com.xmzs.system.domain.vo.SysNoticeVo; -import com.xmzs.system.domain.vo.SysUserVo; -import com.xmzs.system.mapper.SysNoticeMapper; -import com.xmzs.system.mapper.SysUserMapper; -import com.xmzs.system.service.ISysNoticeService; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; - -import java.util.Arrays; -import java.util.List; - -/** - * 鍏憡 鏈嶅姟灞傚疄鐜� - * - * @author Lion Li - */ -@RequiredArgsConstructor -@Service -public class SysNoticeServiceImpl implements ISysNoticeService { - - private final SysNoticeMapper baseMapper; - private final SysUserMapper userMapper; - - @Override - public TableDataInfo<SysNoticeVo> selectPageNoticeList(SysNoticeBo notice, PageQuery pageQuery) { - LambdaQueryWrapper<SysNotice> lqw = buildQueryWrapper(notice); - Page<SysNoticeVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(page); - } - - /** - * 鏌ヨ鍏憡淇℃伅 - * - * @param noticeId 鍏憡ID - * @return 鍏憡淇℃伅 - */ - @Override - public SysNoticeVo selectNoticeById(Long noticeId) { - return baseMapper.selectVoById(noticeId); - } - - /** - * 鏌ヨ鍏憡鍒楄〃 - * - * @param notice 鍏憡淇℃伅 - * @return 鍏憡闆嗗悎 - */ - @Override - public List<SysNoticeVo> selectNoticeList(SysNoticeBo notice) { - LambdaQueryWrapper<SysNotice> lqw = buildQueryWrapper(notice); - return baseMapper.selectVoList(lqw); - } - - private LambdaQueryWrapper<SysNotice> buildQueryWrapper(SysNoticeBo bo) { - LambdaQueryWrapper<SysNotice> lqw = Wrappers.lambdaQuery(); - lqw.like(StringUtils.isNotBlank(bo.getNoticeTitle()), SysNotice::getNoticeTitle, bo.getNoticeTitle()); - lqw.eq(StringUtils.isNotBlank(bo.getNoticeType()), SysNotice::getNoticeType, bo.getNoticeType()); - if (StringUtils.isNotBlank(bo.getCreateByName())) { - SysUserVo sysUser = userMapper.selectUserByUserName(bo.getCreateByName()); - lqw.eq(SysNotice::getCreateBy, ObjectUtil.isNotNull(sysUser) ? sysUser.getUserId() : null); - } - return lqw; - } - - /** - * 鏂板鍏憡 - * - * @param bo 鍏憡淇℃伅 - * @return 缁撴灉 - */ - @Override - public int insertNotice(SysNoticeBo bo) { - SysNotice notice = MapstructUtils.convert(bo, SysNotice.class); - return baseMapper.insert(notice); - } - - /** - * 淇敼鍏憡 - * - * @param bo 鍏憡淇℃伅 - * @return 缁撴灉 - */ - @Override - public int updateNotice(SysNoticeBo bo) { - SysNotice notice = MapstructUtils.convert(bo, SysNotice.class); - return baseMapper.updateById(notice); - } - - /** - * 鍒犻櫎鍏憡瀵硅薄 - * - * @param noticeId 鍏憡ID - * @return 缁撴灉 - */ - @Override - public int deleteNoticeById(Long noticeId) { - return baseMapper.deleteById(noticeId); - } - - /** - * 鎵归噺鍒犻櫎鍏憡淇℃伅 - * - * @param noticeIds 闇�瑕佸垹闄ょ殑鍏憡ID - * @return 缁撴灉 - */ - @Override - public int deleteNoticeByIds(Long[] noticeIds) { - return baseMapper.deleteBatchIds(Arrays.asList(noticeIds)); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysOperLogServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysOperLogServiceImpl.java deleted file mode 100644 index 50b7643..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysOperLogServiceImpl.java +++ /dev/null @@ -1,144 +0,0 @@ -package com.xmzs.system.service.impl; - -import cn.hutool.core.util.ArrayUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.core.utils.ip.AddressUtils; -import com.xmzs.common.log.event.OperLogEvent; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.SysOperLog; -import com.xmzs.system.domain.bo.SysOperLogBo; -import com.xmzs.system.domain.vo.SysOperLogVo; -import com.xmzs.system.mapper.SysOperLogMapper; -import com.xmzs.system.service.ISysOperLogService; -import lombok.RequiredArgsConstructor; -import org.springframework.context.event.EventListener; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Service; - -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Map; - -/** - * 鎿嶄綔鏃ュ織 鏈嶅姟灞傚鐞� - * - * @author Lion Li - */ -@RequiredArgsConstructor -@Service -public class SysOperLogServiceImpl implements ISysOperLogService { - - private final SysOperLogMapper baseMapper; - - /** - * 鎿嶄綔鏃ュ織璁板綍 - * - * @param operLogEvent 鎿嶄綔鏃ュ織浜嬩欢 - */ - @Async - @EventListener - public void recordOper(OperLogEvent operLogEvent) { - SysOperLogBo operLog = MapstructUtils.convert(operLogEvent, SysOperLogBo.class); - // 杩滅▼鏌ヨ鎿嶄綔鍦扮偣 - operLog.setOperLocation(AddressUtils.getRealAddressByIP(operLog.getOperIp())); - insertOperlog(operLog); - } - - @Override - public TableDataInfo<SysOperLogVo> selectPageOperLogList(SysOperLogBo operLog, PageQuery pageQuery) { - Map<String, Object> params = operLog.getParams(); - LambdaQueryWrapper<SysOperLog> lqw = new LambdaQueryWrapper<SysOperLog>() - .like(StringUtils.isNotBlank(operLog.getTitle()), SysOperLog::getTitle, operLog.getTitle()) - .eq(operLog.getBusinessType() != null && operLog.getBusinessType() > 0, - SysOperLog::getBusinessType, operLog.getBusinessType()) - .func(f -> { - if (ArrayUtil.isNotEmpty(operLog.getBusinessTypes())) { - f.in(SysOperLog::getBusinessType, Arrays.asList(operLog.getBusinessTypes())); - } - }) - .eq(operLog.getStatus() != null, - SysOperLog::getStatus, operLog.getStatus()) - .like(StringUtils.isNotBlank(operLog.getOperName()), SysOperLog::getOperName, operLog.getOperName()) - .between(params.get("beginTime") != null && params.get("endTime") != null, - SysOperLog::getOperTime, params.get("beginTime"), params.get("endTime")); - if (StringUtils.isBlank(pageQuery.getOrderByColumn())) { - pageQuery.setOrderByColumn("oper_id"); - pageQuery.setIsAsc("desc"); - } - Page<SysOperLogVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(page); - } - - /** - * 鏂板鎿嶄綔鏃ュ織 - * - * @param bo 鎿嶄綔鏃ュ織瀵硅薄 - */ - @Override - public void insertOperlog(SysOperLogBo bo) { - SysOperLog operLog = MapstructUtils.convert(bo, SysOperLog.class); - operLog.setOperTime(new Date()); - baseMapper.insert(operLog); - } - - /** - * 鏌ヨ绯荤粺鎿嶄綔鏃ュ織闆嗗悎 - * - * @param operLog 鎿嶄綔鏃ュ織瀵硅薄 - * @return 鎿嶄綔鏃ュ織闆嗗悎 - */ - @Override - public List<SysOperLogVo> selectOperLogList(SysOperLogBo operLog) { - Map<String, Object> params = operLog.getParams(); - return baseMapper.selectVoList(new LambdaQueryWrapper<SysOperLog>() - .like(StringUtils.isNotBlank(operLog.getTitle()), SysOperLog::getTitle, operLog.getTitle()) - .eq(operLog.getBusinessType() != null && operLog.getBusinessType() > 0, - SysOperLog::getBusinessType, operLog.getBusinessType()) - .func(f -> { - if (ArrayUtil.isNotEmpty(operLog.getBusinessTypes())) { - f.in(SysOperLog::getBusinessType, Arrays.asList(operLog.getBusinessTypes())); - } - }) - .eq(operLog.getStatus() != null && operLog.getStatus() > 0, - SysOperLog::getStatus, operLog.getStatus()) - .like(StringUtils.isNotBlank(operLog.getOperName()), SysOperLog::getOperName, operLog.getOperName()) - .between(params.get("beginTime") != null && params.get("endTime") != null, - SysOperLog::getOperTime, params.get("beginTime"), params.get("endTime")) - .orderByDesc(SysOperLog::getOperId)); - } - - /** - * 鎵归噺鍒犻櫎绯荤粺鎿嶄綔鏃ュ織 - * - * @param operIds 闇�瑕佸垹闄ょ殑鎿嶄綔鏃ュ織ID - * @return 缁撴灉 - */ - @Override - public int deleteOperLogByIds(Long[] operIds) { - return baseMapper.deleteBatchIds(Arrays.asList(operIds)); - } - - /** - * 鏌ヨ鎿嶄綔鏃ュ織璇︾粏 - * - * @param operId 鎿嶄綔ID - * @return 鎿嶄綔鏃ュ織瀵硅薄 - */ - @Override - public SysOperLogVo selectOperLogById(Long operId) { - return baseMapper.selectVoById(operId); - } - - /** - * 娓呯┖鎿嶄綔鏃ュ織 - */ - @Override - public void cleanOperLog() { - baseMapper.delete(new LambdaQueryWrapper<>()); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysOssConfigServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysOssConfigServiceImpl.java deleted file mode 100644 index d6f08ca..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysOssConfigServiceImpl.java +++ /dev/null @@ -1,186 +0,0 @@ -package com.xmzs.system.service.impl; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.constant.CacheNames; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.StreamUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.json.utils.JsonUtils; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.oss.constant.OssConstant; -import com.xmzs.common.redis.utils.CacheUtils; -import com.xmzs.common.redis.utils.RedisUtils; -import com.xmzs.common.tenant.core.TenantEntity; -import com.xmzs.common.tenant.helper.TenantHelper; -import com.xmzs.system.domain.SysOssConfig; -import com.xmzs.system.domain.bo.SysOssConfigBo; -import com.xmzs.system.domain.vo.SysOssConfigVo; -import com.xmzs.system.mapper.SysOssConfigMapper; -import com.xmzs.system.service.ISysOssConfigService; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * 瀵硅薄瀛樺偍閰嶇疆Service涓氬姟灞傚鐞� - * - * @author Lion Li - * @author 瀛よ垷鐑熼洦 - * @date 2021-08-13 - */ -@Slf4j -@RequiredArgsConstructor -@Service -public class SysOssConfigServiceImpl implements ISysOssConfigService { - - private final SysOssConfigMapper baseMapper; - - /** - * 椤圭洰鍚姩鏃讹紝鍒濆鍖栧弬鏁板埌缂撳瓨锛屽姞杞介厤缃被 - */ - @Override - public void init() { - List<SysOssConfig> list = TenantHelper.ignore(() -> - baseMapper.selectList( - new LambdaQueryWrapper<SysOssConfig>().orderByAsc(TenantEntity::getTenantId)) - ); - Map<String, List<SysOssConfig>> map = StreamUtils.groupByKey(list, SysOssConfig::getTenantId); - try { - for (String tenantId : map.keySet()) { - TenantHelper.setDynamic(tenantId); - // 鍔犺浇OSS鍒濆鍖栭厤缃� - for (SysOssConfig config : map.get(tenantId)) { - String configKey = config.getConfigKey(); - if ("0".equals(config.getStatus())) { - RedisUtils.setCacheObject(OssConstant.DEFAULT_CONFIG_KEY, configKey); - } - CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), JsonUtils.toJsonString(config)); - } - } - } finally { - TenantHelper.clearDynamic(); - } - } - - @Override - public SysOssConfigVo queryById(Long ossConfigId) { - return baseMapper.selectVoById(ossConfigId); - } - - @Override - public TableDataInfo<SysOssConfigVo> queryPageList(SysOssConfigBo bo, PageQuery pageQuery) { - LambdaQueryWrapper<SysOssConfig> lqw = buildQueryWrapper(bo); - Page<SysOssConfigVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(result); - } - - - private LambdaQueryWrapper<SysOssConfig> buildQueryWrapper(SysOssConfigBo bo) { - LambdaQueryWrapper<SysOssConfig> lqw = Wrappers.lambdaQuery(); - lqw.eq(StringUtils.isNotBlank(bo.getConfigKey()), SysOssConfig::getConfigKey, bo.getConfigKey()); - lqw.like(StringUtils.isNotBlank(bo.getBucketName()), SysOssConfig::getBucketName, bo.getBucketName()); - lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysOssConfig::getStatus, bo.getStatus()); - return lqw; - } - - @Override - public Boolean insertByBo(SysOssConfigBo bo) { - SysOssConfig config = MapstructUtils.convert(bo, SysOssConfig.class); - validEntityBeforeSave(config); - boolean flag = baseMapper.insert(config) > 0; - if (flag) { - CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), JsonUtils.toJsonString(config)); - } - return flag; - } - - @Override - public Boolean updateByBo(SysOssConfigBo bo) { - SysOssConfig config = MapstructUtils.convert(bo, SysOssConfig.class); - validEntityBeforeSave(config); - LambdaUpdateWrapper<SysOssConfig> luw = new LambdaUpdateWrapper<>(); - luw.set(ObjectUtil.isNull(config.getPrefix()), SysOssConfig::getPrefix, ""); - luw.set(ObjectUtil.isNull(config.getRegion()), SysOssConfig::getRegion, ""); - luw.set(ObjectUtil.isNull(config.getExt1()), SysOssConfig::getExt1, ""); - luw.set(ObjectUtil.isNull(config.getRemark()), SysOssConfig::getRemark, ""); - luw.eq(SysOssConfig::getOssConfigId, config.getOssConfigId()); - boolean flag = baseMapper.update(config, luw) > 0; - if (flag) { - CacheUtils.put(CacheNames.SYS_OSS_CONFIG, config.getConfigKey(), JsonUtils.toJsonString(config)); - } - return flag; - } - - /** - * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙 - */ - private void validEntityBeforeSave(SysOssConfig entity) { - if (StringUtils.isNotEmpty(entity.getConfigKey()) - && !checkConfigKeyUnique(entity)) { - throw new ServiceException("鎿嶄綔閰嶇疆'" + entity.getConfigKey() + "'澶辫触, 閰嶇疆key宸插瓨鍦�!"); - } - } - - @Override - public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { - if (isValid) { - if (CollUtil.containsAny(ids, OssConstant.SYSTEM_DATA_IDS)) { - throw new ServiceException("绯荤粺鍐呯疆, 涓嶅彲鍒犻櫎!"); - } - } - List<SysOssConfig> list = CollUtil.newArrayList(); - for (Long configId : ids) { - SysOssConfig config = baseMapper.selectById(configId); - list.add(config); - } - boolean flag = baseMapper.deleteBatchIds(ids) > 0; - if (flag) { - list.forEach(sysOssConfig -> - CacheUtils.evict(CacheNames.SYS_OSS_CONFIG, sysOssConfig.getConfigKey())); - } - return flag; - } - - /** - * 鍒ゆ柇configKey鏄惁鍞竴 - */ - private boolean checkConfigKeyUnique(SysOssConfig sysOssConfig) { - long ossConfigId = ObjectUtil.isNull(sysOssConfig.getOssConfigId()) ? -1L : sysOssConfig.getOssConfigId(); - SysOssConfig info = baseMapper.selectOne(new LambdaQueryWrapper<SysOssConfig>() - .select(SysOssConfig::getOssConfigId, SysOssConfig::getConfigKey) - .eq(SysOssConfig::getConfigKey, sysOssConfig.getConfigKey())); - if (ObjectUtil.isNotNull(info) && info.getOssConfigId() != ossConfigId) { - return false; - } - return true; - } - - /** - * 鍚敤绂佺敤鐘舵�� - */ - @Override - @Transactional(rollbackFor = Exception.class) - public int updateOssConfigStatus(SysOssConfigBo bo) { - SysOssConfig sysOssConfig = MapstructUtils.convert(bo, SysOssConfig.class); - int row = baseMapper.update(null, new LambdaUpdateWrapper<SysOssConfig>() - .set(SysOssConfig::getStatus, "1")); - row += baseMapper.updateById(sysOssConfig); - if (row > 0) { - RedisUtils.setCacheObject(OssConstant.DEFAULT_CONFIG_KEY, sysOssConfig.getConfigKey()); - } - return row; - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysOssServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysOssServiceImpl.java deleted file mode 100644 index d9a9b0a..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysOssServiceImpl.java +++ /dev/null @@ -1,174 +0,0 @@ -package com.xmzs.system.service.impl; - -import cn.hutool.core.convert.Convert; -import cn.hutool.core.io.IoUtil; -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.constant.CacheNames; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.service.OssService; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.core.utils.StreamUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.core.utils.file.FileUtils; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.oss.core.OssClient; -import com.xmzs.common.oss.entity.UploadResult; -import com.xmzs.common.oss.enumd.AccessPolicyType; -import com.xmzs.common.oss.factory.OssFactory; -import com.xmzs.system.domain.SysOss; -import com.xmzs.system.domain.bo.SysOssBo; -import com.xmzs.system.domain.vo.SysOssVo; -import com.xmzs.system.mapper.SysOssMapper; -import com.xmzs.system.service.ISysOssService; -import jakarta.servlet.http.HttpServletResponse; -import lombok.RequiredArgsConstructor; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.http.MediaType; -import org.springframework.stereotype.Service; -import org.springframework.web.multipart.MultipartFile; - -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * 鏂囦欢涓婁紶 鏈嶅姟灞傚疄鐜� - * - * @author Lion Li - */ -@RequiredArgsConstructor -@Service -public class SysOssServiceImpl implements ISysOssService, OssService { - - private final SysOssMapper baseMapper; - - @Override - public TableDataInfo<SysOssVo> queryPageList(SysOssBo bo, PageQuery pageQuery) { - LambdaQueryWrapper<SysOss> lqw = buildQueryWrapper(bo); - Page<SysOssVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); - List<SysOssVo> filterResult = StreamUtils.toList(result.getRecords(), this::matchingUrl); - result.setRecords(filterResult); - return TableDataInfo.build(result); - } - - @Override - public List<SysOssVo> listByIds(Collection<Long> ossIds) { - List<SysOssVo> list = new ArrayList<>(); - for (Long id : ossIds) { - SysOssVo vo = SpringUtils.getAopProxy(this).getById(id); - if (ObjectUtil.isNotNull(vo)) { - list.add(this.matchingUrl(vo)); - } - } - return list; - } - - @Override - public String selectUrlByIds(String ossIds) { - List<String> list = new ArrayList<>(); - for (Long id : StringUtils.splitTo(ossIds, Convert::toLong)) { - SysOssVo vo = SpringUtils.getAopProxy(this).getById(id); - if (ObjectUtil.isNotNull(vo)) { - list.add(this.matchingUrl(vo).getUrl()); - } - } - return String.join(StringUtils.SEPARATOR, list); - } - - private LambdaQueryWrapper<SysOss> buildQueryWrapper(SysOssBo bo) { - Map<String, Object> params = bo.getParams(); - LambdaQueryWrapper<SysOss> lqw = Wrappers.lambdaQuery(); - lqw.like(StringUtils.isNotBlank(bo.getFileName()), SysOss::getFileName, bo.getFileName()); - lqw.like(StringUtils.isNotBlank(bo.getOriginalName()), SysOss::getOriginalName, bo.getOriginalName()); - lqw.eq(StringUtils.isNotBlank(bo.getFileSuffix()), SysOss::getFileSuffix, bo.getFileSuffix()); - lqw.eq(StringUtils.isNotBlank(bo.getUrl()), SysOss::getUrl, bo.getUrl()); - lqw.between(params.get("beginCreateTime") != null && params.get("endCreateTime") != null, - SysOss::getCreateTime, params.get("beginCreateTime"), params.get("endCreateTime")); - lqw.eq(ObjectUtil.isNotNull(bo.getCreateBy()), SysOss::getCreateBy, bo.getCreateBy()); - lqw.eq(StringUtils.isNotBlank(bo.getService()), SysOss::getService, bo.getService()); - return lqw; - } - - @Cacheable(cacheNames = CacheNames.SYS_OSS, key = "#ossId") - @Override - public SysOssVo getById(Long ossId) { - return baseMapper.selectVoById(ossId); - } - - @Override - public void download(Long ossId, HttpServletResponse response) throws IOException { - SysOssVo sysOss = SpringUtils.getAopProxy(this).getById(ossId); - if (ObjectUtil.isNull(sysOss)) { - throw new ServiceException("鏂囦欢鏁版嵁涓嶅瓨鍦�!"); - } - FileUtils.setAttachmentResponseHeader(response, sysOss.getOriginalName()); - response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE + "; charset=UTF-8"); - OssClient storage = OssFactory.instance(); - try(InputStream inputStream = storage.getObjectContent(sysOss.getUrl())) { - int available = inputStream.available(); - IoUtil.copy(inputStream, response.getOutputStream(), available); - response.setContentLength(available); - } catch (Exception e) { - throw new ServiceException(e.getMessage()); - } - } - - @Override - public SysOssVo upload(MultipartFile file) { - String originalfileName = file.getOriginalFilename(); - String suffix = StringUtils.substring(originalfileName, originalfileName.lastIndexOf("."), originalfileName.length()); - OssClient storage = OssFactory.instance(); - UploadResult uploadResult; - try { - uploadResult = storage.uploadSuffix(file.getBytes(), suffix, file.getContentType()); - } catch (IOException e) { - throw new ServiceException(e.getMessage()); - } - // 淇濆瓨鏂囦欢淇℃伅 - SysOss oss = new SysOss(); - oss.setUrl(uploadResult.getUrl()); - oss.setFileSuffix(suffix); - oss.setFileName(uploadResult.getFilename()); - oss.setOriginalName(originalfileName); - oss.setService(storage.getConfigKey()); - baseMapper.insert(oss); - SysOssVo sysOssVo = MapstructUtils.convert(oss, SysOssVo.class); - return this.matchingUrl(sysOssVo); - } - - @Override - public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { - if (isValid) { - // 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠� - } - List<SysOss> list = baseMapper.selectBatchIds(ids); - for (SysOss sysOss : list) { - OssClient storage = OssFactory.instance(sysOss.getService()); - storage.delete(sysOss.getUrl()); - } - return baseMapper.deleteBatchIds(ids) > 0; - } - - /** - * 鍖归厤Url - * - * @param oss OSS瀵硅薄 - * @return oss 鍖归厤Url鐨凮SS瀵硅薄 - */ - private SysOssVo matchingUrl(SysOssVo oss) { - OssClient storage = OssFactory.instance(oss.getService()); - // 浠呬慨鏀规《绫诲瀷涓� private 鐨刄RL锛屼复鏃禪RL鏃堕暱涓�120s - if (AccessPolicyType.PRIVATE == storage.getAccessPolicy()) { - oss.setUrl(storage.getPrivateUrl(oss.getFileName(), 120)); - } - return oss; - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysPermissionServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysPermissionServiceImpl.java deleted file mode 100644 index f4ccf3a..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysPermissionServiceImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.xmzs.system.service.impl; - -import com.xmzs.common.core.constant.TenantConstants; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.system.service.ISysMenuService; -import com.xmzs.system.service.ISysPermissionService; -import com.xmzs.system.service.ISysRoleService; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; - -import java.util.HashSet; -import java.util.Set; - -/** - * 鐢ㄦ埛鏉冮檺澶勭悊 - * - * @author ruoyi - */ -@RequiredArgsConstructor -@Service -public class SysPermissionServiceImpl implements ISysPermissionService { - - private final ISysRoleService roleService; - private final ISysMenuService menuService; - - /** - * 鑾峰彇瑙掕壊鏁版嵁鏉冮檺 - * - * @param userId 鐢ㄦ埛id - * @return 瑙掕壊鏉冮檺淇℃伅 - */ - @Override - public Set<String> getRolePermission(Long userId) { - Set<String> roles = new HashSet<>(); - // 绠$悊鍛樻嫢鏈夋墍鏈夋潈闄� - if (LoginHelper.isSuperAdmin(userId)) { - roles.add(TenantConstants.SUPER_ADMIN_ROLE_KEY); - } else { - roles.addAll(roleService.selectRolePermissionByUserId(userId)); - } - return roles; - } - - /** - * 鑾峰彇鑿滃崟鏁版嵁鏉冮檺 - * - * @param userId 鐢ㄦ埛id - * @return 鑿滃崟鏉冮檺淇℃伅 - */ - @Override - public Set<String> getMenuPermission(Long userId) { - Set<String> perms = new HashSet<>(); - // 绠$悊鍛樻嫢鏈夋墍鏈夋潈闄� - if (LoginHelper.isSuperAdmin(userId)) { - perms.add("*:*:*"); - } else { - perms.addAll(menuService.selectMenuPermsByUserId(userId)); - } - return perms; - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysPostServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysPostServiceImpl.java deleted file mode 100644 index 90b0ed1..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysPostServiceImpl.java +++ /dev/null @@ -1,188 +0,0 @@ -package com.xmzs.system.service.impl; - -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.SysPost; -import com.xmzs.system.domain.SysUserPost; -import com.xmzs.system.domain.bo.SysPostBo; -import com.xmzs.system.domain.vo.SysPostVo; -import com.xmzs.system.mapper.SysPostMapper; -import com.xmzs.system.mapper.SysUserPostMapper; -import com.xmzs.system.service.ISysPostService; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; - -import java.util.Arrays; -import java.util.List; - -/** - * 宀椾綅淇℃伅 鏈嶅姟灞傚鐞� - * - * @author Lion Li - */ -@RequiredArgsConstructor -@Service -public class SysPostServiceImpl implements ISysPostService { - - private final SysPostMapper baseMapper; - private final SysUserPostMapper userPostMapper; - - @Override - public TableDataInfo<SysPostVo> selectPagePostList(SysPostBo post, PageQuery pageQuery) { - LambdaQueryWrapper<SysPost> lqw = buildQueryWrapper(post); - Page<SysPostVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(page); - } - - /** - * 鏌ヨ宀椾綅淇℃伅闆嗗悎 - * - * @param post 宀椾綅淇℃伅 - * @return 宀椾綅淇℃伅闆嗗悎 - */ - @Override - public List<SysPostVo> selectPostList(SysPostBo post) { - LambdaQueryWrapper<SysPost> lqw = buildQueryWrapper(post); - return baseMapper.selectVoList(lqw); - } - - private LambdaQueryWrapper<SysPost> buildQueryWrapper(SysPostBo bo) { - LambdaQueryWrapper<SysPost> lqw = Wrappers.lambdaQuery(); - lqw.like(StringUtils.isNotBlank(bo.getPostCode()), SysPost::getPostCode, bo.getPostCode()); - lqw.like(StringUtils.isNotBlank(bo.getPostName()), SysPost::getPostName, bo.getPostName()); - lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysPost::getStatus, bo.getStatus()); - lqw.orderByAsc(SysPost::getPostSort); - return lqw; - } - - /** - * 鏌ヨ鎵�鏈夊矖浣� - * - * @return 宀椾綅鍒楄〃 - */ - @Override - public List<SysPostVo> selectPostAll() { - return baseMapper.selectVoList(new QueryWrapper<>()); - } - - /** - * 閫氳繃宀椾綅ID鏌ヨ宀椾綅淇℃伅 - * - * @param postId 宀椾綅ID - * @return 瑙掕壊瀵硅薄淇℃伅 - */ - @Override - public SysPostVo selectPostById(Long postId) { - return baseMapper.selectVoById(postId); - } - - /** - * 鏍规嵁鐢ㄦ埛ID鑾峰彇宀椾綅閫夋嫨妗嗗垪琛� - * - * @param userId 鐢ㄦ埛ID - * @return 閫変腑宀椾綅ID鍒楄〃 - */ - @Override - public List<Long> selectPostListByUserId(Long userId) { - return baseMapper.selectPostListByUserId(userId); - } - - /** - * 鏍¢獙宀椾綅鍚嶇О鏄惁鍞竴 - * - * @param post 宀椾綅淇℃伅 - * @return 缁撴灉 - */ - @Override - public boolean checkPostNameUnique(SysPostBo post) { - boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysPost>() - .eq(SysPost::getPostName, post.getPostName()) - .ne(ObjectUtil.isNotNull(post.getPostId()), SysPost::getPostId, post.getPostId())); - return !exist; - } - - /** - * 鏍¢獙宀椾綅缂栫爜鏄惁鍞竴 - * - * @param post 宀椾綅淇℃伅 - * @return 缁撴灉 - */ - @Override - public boolean checkPostCodeUnique(SysPostBo post) { - boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysPost>() - .eq(SysPost::getPostCode, post.getPostCode()) - .ne(ObjectUtil.isNotNull(post.getPostId()), SysPost::getPostId, post.getPostId())); - return !exist; - } - - /** - * 閫氳繃宀椾綅ID鏌ヨ宀椾綅浣跨敤鏁伴噺 - * - * @param postId 宀椾綅ID - * @return 缁撴灉 - */ - @Override - public long countUserPostById(Long postId) { - return userPostMapper.selectCount(new LambdaQueryWrapper<SysUserPost>().eq(SysUserPost::getPostId, postId)); - } - - /** - * 鍒犻櫎宀椾綅淇℃伅 - * - * @param postId 宀椾綅ID - * @return 缁撴灉 - */ - @Override - public int deletePostById(Long postId) { - return baseMapper.deleteById(postId); - } - - /** - * 鎵归噺鍒犻櫎宀椾綅淇℃伅 - * - * @param postIds 闇�瑕佸垹闄ょ殑宀椾綅ID - * @return 缁撴灉 - */ - @Override - public int deletePostByIds(Long[] postIds) { - for (Long postId : postIds) { - SysPost post = baseMapper.selectById(postId); - if (countUserPostById(postId) > 0) { - throw new ServiceException(String.format("%1$s宸插垎閰�,涓嶈兘鍒犻櫎", post.getPostName())); - } - } - return baseMapper.deleteBatchIds(Arrays.asList(postIds)); - } - - /** - * 鏂板淇濆瓨宀椾綅淇℃伅 - * - * @param bo 宀椾綅淇℃伅 - * @return 缁撴灉 - */ - @Override - public int insertPost(SysPostBo bo) { - SysPost post = MapstructUtils.convert(bo, SysPost.class); - return baseMapper.insert(post); - } - - /** - * 淇敼淇濆瓨宀椾綅淇℃伅 - * - * @param bo 宀椾綅淇℃伅 - * @return 缁撴灉 - */ - @Override - public int updatePost(SysPostBo bo) { - SysPost post = MapstructUtils.convert(bo, SysPost.class); - return baseMapper.updateById(post); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysRoleServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysRoleServiceImpl.java deleted file mode 100644 index 4a744e7..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysRoleServiceImpl.java +++ /dev/null @@ -1,458 +0,0 @@ -package com.xmzs.system.service.impl; - -import cn.dev33.satoken.exception.NotLoginException; -import cn.dev33.satoken.stp.StpUtil; -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.constant.UserConstants; -import com.xmzs.common.core.domain.model.LoginUser; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.StreamUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.system.domain.SysRole; -import com.xmzs.system.domain.SysRoleDept; -import com.xmzs.system.domain.SysRoleMenu; -import com.xmzs.system.domain.SysUserRole; -import com.xmzs.system.domain.bo.SysRoleBo; -import com.xmzs.system.domain.vo.SysRoleVo; -import com.xmzs.system.mapper.SysRoleDeptMapper; -import com.xmzs.system.mapper.SysRoleMapper; -import com.xmzs.system.mapper.SysRoleMenuMapper; -import com.xmzs.system.mapper.SysUserRoleMapper; -import com.xmzs.system.service.ISysRoleService; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.*; - -/** - * 瑙掕壊 涓氬姟灞傚鐞� - * - * @author Lion Li - */ -@RequiredArgsConstructor -@Service -public class SysRoleServiceImpl implements ISysRoleService { - - private final SysRoleMapper baseMapper; - private final SysRoleMenuMapper roleMenuMapper; - private final SysUserRoleMapper userRoleMapper; - private final SysRoleDeptMapper roleDeptMapper; - - @Override - public TableDataInfo<SysRoleVo> selectPageRoleList(SysRoleBo role, PageQuery pageQuery) { - Page<SysRoleVo> page = baseMapper.selectPageRoleList(pageQuery.build(), this.buildQueryWrapper(role)); - return TableDataInfo.build(page); - } - - /** - * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ瑙掕壊鏁版嵁 - * - * @param role 瑙掕壊淇℃伅 - * @return 瑙掕壊鏁版嵁闆嗗悎淇℃伅 - */ - @Override - public List<SysRoleVo> selectRoleList(SysRoleBo role) { - return baseMapper.selectRoleList(this.buildQueryWrapper(role)); - } - - private Wrapper<SysRole> buildQueryWrapper(SysRoleBo bo) { - Map<String, Object> params = bo.getParams(); - QueryWrapper<SysRole> wrapper = Wrappers.query(); - wrapper.eq("r.del_flag", UserConstants.ROLE_NORMAL) - .eq(ObjectUtil.isNotNull(bo.getRoleId()), "r.role_id", bo.getRoleId()) - .like(StringUtils.isNotBlank(bo.getRoleName()), "r.role_name", bo.getRoleName()) - .eq(StringUtils.isNotBlank(bo.getStatus()), "r.status", bo.getStatus()) - .like(StringUtils.isNotBlank(bo.getRoleKey()), "r.role_key", bo.getRoleKey()) - .between(params.get("beginTime") != null && params.get("endTime") != null, - "r.create_time", params.get("beginTime"), params.get("endTime")) - .orderByAsc("r.role_sort").orderByAsc("r.create_time");; - return wrapper; - } - - /** - * 鏍规嵁鐢ㄦ埛ID鏌ヨ瑙掕壊 - * - * @param userId 鐢ㄦ埛ID - * @return 瑙掕壊鍒楄〃 - */ - @Override - public List<SysRoleVo> selectRolesByUserId(Long userId) { - List<SysRoleVo> userRoles = baseMapper.selectRolePermissionByUserId(userId); - List<SysRoleVo> roles = selectRoleAll(); - for (SysRoleVo role : roles) { - for (SysRoleVo userRole : userRoles) { - if (role.getRoleId().longValue() == userRole.getRoleId().longValue()) { - role.setFlag(true); - break; - } - } - } - return roles; - } - - /** - * 鏍规嵁鐢ㄦ埛ID鏌ヨ鏉冮檺 - * - * @param userId 鐢ㄦ埛ID - * @return 鏉冮檺鍒楄〃 - */ - @Override - public Set<String> selectRolePermissionByUserId(Long userId) { - List<SysRoleVo> perms = baseMapper.selectRolePermissionByUserId(userId); - Set<String> permsSet = new HashSet<>(); - for (SysRoleVo perm : perms) { - if (ObjectUtil.isNotNull(perm)) { - permsSet.addAll(StringUtils.splitList(perm.getRoleKey().trim())); - } - } - return permsSet; - } - - /** - * 鏌ヨ鎵�鏈夎鑹� - * - * @return 瑙掕壊鍒楄〃 - */ - @Override - public List<SysRoleVo> selectRoleAll() { - return this.selectRoleList(new SysRoleBo()); - } - - /** - * 鏍规嵁鐢ㄦ埛ID鑾峰彇瑙掕壊閫夋嫨妗嗗垪琛� - * - * @param userId 鐢ㄦ埛ID - * @return 閫変腑瑙掕壊ID鍒楄〃 - */ - @Override - public List<Long> selectRoleListByUserId(Long userId) { - return baseMapper.selectRoleListByUserId(userId); - } - - /** - * 閫氳繃瑙掕壊ID鏌ヨ瑙掕壊 - * - * @param roleId 瑙掕壊ID - * @return 瑙掕壊瀵硅薄淇℃伅 - */ - @Override - public SysRoleVo selectRoleById(Long roleId) { - return baseMapper.selectRoleById(roleId); - } - - /** - * 鏍¢獙瑙掕壊鍚嶇О鏄惁鍞竴 - * - * @param role 瑙掕壊淇℃伅 - * @return 缁撴灉 - */ - @Override - public boolean checkRoleNameUnique(SysRoleBo role) { - boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysRole>() - .eq(SysRole::getRoleName, role.getRoleName()) - .ne(ObjectUtil.isNotNull(role.getRoleId()), SysRole::getRoleId, role.getRoleId())); - return !exist; - } - - /** - * 鏍¢獙瑙掕壊鏉冮檺鏄惁鍞竴 - * - * @param role 瑙掕壊淇℃伅 - * @return 缁撴灉 - */ - @Override - public boolean checkRoleKeyUnique(SysRoleBo role) { - boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysRole>() - .eq(SysRole::getRoleKey, role.getRoleKey()) - .ne(ObjectUtil.isNotNull(role.getRoleId()), SysRole::getRoleId, role.getRoleId())); - return !exist; - } - - /** - * 鏍¢獙瑙掕壊鏄惁鍏佽鎿嶄綔 - * - * @param roleId 瑙掕壊ID - */ - @Override - public void checkRoleAllowed(Long roleId) { - if (ObjectUtil.isNotNull(roleId) && LoginHelper.isSuperAdmin(roleId)) { - throw new ServiceException("涓嶅厑璁告搷浣滆秴绾х鐞嗗憳瑙掕壊"); - } - } - - /** - * 鏍¢獙瑙掕壊鏄惁鏈夋暟鎹潈闄� - * - * @param roleId 瑙掕壊id - */ - @Override - public void checkRoleDataScope(Long roleId) { - if (ObjectUtil.isNull(roleId)) { - return; - } - if (LoginHelper.isSuperAdmin()) { - return; - } - List<SysRoleVo> roles = this.selectRoleList(new SysRoleBo(roleId)); - if (CollUtil.isEmpty(roles)) { - throw new ServiceException("娌℃湁鏉冮檺璁块棶瑙掕壊鏁版嵁锛�"); - } - - } - - /** - * 閫氳繃瑙掕壊ID鏌ヨ瑙掕壊浣跨敤鏁伴噺 - * - * @param roleId 瑙掕壊ID - * @return 缁撴灉 - */ - @Override - public long countUserRoleByRoleId(Long roleId) { - return userRoleMapper.selectCount(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getRoleId, roleId)); - } - - /** - * 鏂板淇濆瓨瑙掕壊淇℃伅 - * - * @param bo 瑙掕壊淇℃伅 - * @return 缁撴灉 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public int insertRole(SysRoleBo bo) { - SysRole role = MapstructUtils.convert(bo, SysRole.class); - // 鏂板瑙掕壊淇℃伅 - baseMapper.insert(role); - bo.setRoleId(role.getRoleId()); - return insertRoleMenu(bo); - } - - /** - * 淇敼淇濆瓨瑙掕壊淇℃伅 - * - * @param bo 瑙掕壊淇℃伅 - * @return 缁撴灉 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public int updateRole(SysRoleBo bo) { - SysRole role = MapstructUtils.convert(bo, SysRole.class); - // 淇敼瑙掕壊淇℃伅 - baseMapper.updateById(role); - // 鍒犻櫎瑙掕壊涓庤彍鍗曞叧鑱� - roleMenuMapper.delete(new LambdaQueryWrapper<SysRoleMenu>().eq(SysRoleMenu::getRoleId, role.getRoleId())); - return insertRoleMenu(bo); - } - - /** - * 淇敼瑙掕壊鐘舵�� - * - * @param roleId 瑙掕壊ID - * @param status 瑙掕壊鐘舵�� - * @return 缁撴灉 - */ - @Override - public int updateRoleStatus(Long roleId, String status) { - return baseMapper.update(null, - new LambdaUpdateWrapper<SysRole>() - .set(SysRole::getStatus, status) - .eq(SysRole::getRoleId, roleId)); - } - - /** - * 淇敼鏁版嵁鏉冮檺淇℃伅 - * - * @param bo 瑙掕壊淇℃伅 - * @return 缁撴灉 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public int authDataScope(SysRoleBo bo) { - SysRole role = MapstructUtils.convert(bo, SysRole.class); - // 淇敼瑙掕壊淇℃伅 - baseMapper.updateById(role); - // 鍒犻櫎瑙掕壊涓庨儴闂ㄥ叧鑱� - roleDeptMapper.delete(new LambdaQueryWrapper<SysRoleDept>().eq(SysRoleDept::getRoleId, role.getRoleId())); - // 鏂板瑙掕壊鍜岄儴闂ㄤ俊鎭紙鏁版嵁鏉冮檺锛� - return insertRoleDept(bo); - } - - /** - * 鏂板瑙掕壊鑿滃崟淇℃伅 - * - * @param role 瑙掕壊瀵硅薄 - */ - private int insertRoleMenu(SysRoleBo role) { - int rows = 1; - // 鏂板鐢ㄦ埛涓庤鑹茬鐞� - List<SysRoleMenu> list = new ArrayList<SysRoleMenu>(); - for (Long menuId : role.getMenuIds()) { - SysRoleMenu rm = new SysRoleMenu(); - rm.setRoleId(role.getRoleId()); - rm.setMenuId(menuId); - list.add(rm); - } - if (list.size() > 0) { - rows = roleMenuMapper.insertBatch(list) ? list.size() : 0; - } - return rows; - } - - /** - * 鏂板瑙掕壊閮ㄩ棬淇℃伅(鏁版嵁鏉冮檺) - * - * @param role 瑙掕壊瀵硅薄 - */ - private int insertRoleDept(SysRoleBo role) { - int rows = 1; - // 鏂板瑙掕壊涓庨儴闂紙鏁版嵁鏉冮檺锛夌鐞� - List<SysRoleDept> list = new ArrayList<SysRoleDept>(); - for (Long deptId : role.getDeptIds()) { - SysRoleDept rd = new SysRoleDept(); - rd.setRoleId(role.getRoleId()); - rd.setDeptId(deptId); - list.add(rd); - } - if (list.size() > 0) { - rows = roleDeptMapper.insertBatch(list) ? list.size() : 0; - } - return rows; - } - - /** - * 閫氳繃瑙掕壊ID鍒犻櫎瑙掕壊 - * - * @param roleId 瑙掕壊ID - * @return 缁撴灉 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public int deleteRoleById(Long roleId) { - // 鍒犻櫎瑙掕壊涓庤彍鍗曞叧鑱� - roleMenuMapper.delete(new LambdaQueryWrapper<SysRoleMenu>().eq(SysRoleMenu::getRoleId, roleId)); - // 鍒犻櫎瑙掕壊涓庨儴闂ㄥ叧鑱� - roleDeptMapper.delete(new LambdaQueryWrapper<SysRoleDept>().eq(SysRoleDept::getRoleId, roleId)); - return baseMapper.deleteById(roleId); - } - - /** - * 鎵归噺鍒犻櫎瑙掕壊淇℃伅 - * - * @param roleIds 闇�瑕佸垹闄ょ殑瑙掕壊ID - * @return 缁撴灉 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public int deleteRoleByIds(Long[] roleIds) { - for (Long roleId : roleIds) { - checkRoleAllowed(roleId); - checkRoleDataScope(roleId); - SysRole role = baseMapper.selectById(roleId); - if (countUserRoleByRoleId(roleId) > 0) { - throw new ServiceException(String.format("%1$s宸插垎閰�,涓嶈兘鍒犻櫎", role.getRoleName())); - } - } - List<Long> ids = Arrays.asList(roleIds); - // 鍒犻櫎瑙掕壊涓庤彍鍗曞叧鑱� - roleMenuMapper.delete(new LambdaQueryWrapper<SysRoleMenu>().in(SysRoleMenu::getRoleId, ids)); - // 鍒犻櫎瑙掕壊涓庨儴闂ㄥ叧鑱� - roleDeptMapper.delete(new LambdaQueryWrapper<SysRoleDept>().in(SysRoleDept::getRoleId, ids)); - return baseMapper.deleteBatchIds(ids); - } - - /** - * 鍙栨秷鎺堟潈鐢ㄦ埛瑙掕壊 - * - * @param userRole 鐢ㄦ埛鍜岃鑹插叧鑱斾俊鎭� - * @return 缁撴灉 - */ - @Override - public int deleteAuthUser(SysUserRole userRole) { - int rows = userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>() - .eq(SysUserRole::getRoleId, userRole.getRoleId()) - .eq(SysUserRole::getUserId, userRole.getUserId())); - if (rows > 0) { - cleanOnlineUserByRole(userRole.getRoleId()); - } - return rows; - } - - /** - * 鎵归噺鍙栨秷鎺堟潈鐢ㄦ埛瑙掕壊 - * - * @param roleId 瑙掕壊ID - * @param userIds 闇�瑕佸彇娑堟巿鏉冪殑鐢ㄦ埛鏁版嵁ID - * @return 缁撴灉 - */ - @Override - public int deleteAuthUsers(Long roleId, Long[] userIds) { - int rows = userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>() - .eq(SysUserRole::getRoleId, roleId) - .in(SysUserRole::getUserId, Arrays.asList(userIds))); - if (rows > 0) { - cleanOnlineUserByRole(roleId); - } - return rows; - } - - /** - * 鎵归噺閫夋嫨鎺堟潈鐢ㄦ埛瑙掕壊 - * - * @param roleId 瑙掕壊ID - * @param userIds 闇�瑕佹巿鏉冪殑鐢ㄦ埛鏁版嵁ID - * @return 缁撴灉 - */ - @Override - public int insertAuthUsers(Long roleId, Long[] userIds) { - // 鏂板鐢ㄦ埛涓庤鑹茬鐞� - int rows = 1; - List<SysUserRole> list = StreamUtils.toList(List.of(userIds), userId -> { - SysUserRole ur = new SysUserRole(); - ur.setUserId(userId); - ur.setRoleId(roleId); - return ur; - }); - if (CollUtil.isNotEmpty(list)) { - rows = userRoleMapper.insertBatch(list) ? list.size() : 0; - } - if (rows > 0) { - cleanOnlineUserByRole(roleId); - } - return rows; - } - - @Override - public void cleanOnlineUserByRole(Long roleId) { - List<String> keys = StpUtil.searchTokenValue("", 0, -1, false); - if (CollUtil.isEmpty(keys)) { - return; - } - // 瑙掕壊鍏宠仈鐨勫湪绾跨敤鎴烽噺杩囧ぇ浼氬鑷磖edis闃诲鍗¢】 璋ㄦ厧鎿嶄綔 - keys.parallelStream().forEach(key -> { - String token = StringUtils.substringAfterLast(key, ":"); - // 濡傛灉宸茬粡杩囨湡鍒欒烦杩� - if (StpUtil.stpLogic.getTokenActivityTimeoutByToken(token) < -1) { - return; - } - LoginUser loginUser = LoginHelper.getLoginUser(token); - if (loginUser.getRoles().stream().anyMatch(r -> r.getRoleId().equals(roleId))) { - try { - StpUtil.logoutByTokenValue(token); - } catch (NotLoginException ignored) { - } - } - }); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysSensitiveServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysSensitiveServiceImpl.java deleted file mode 100644 index ac396fb..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysSensitiveServiceImpl.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.xmzs.system.service.impl; - -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.common.sensitive.core.SensitiveService; -import org.springframework.stereotype.Service; - -/** - * 鑴辨晱鏈嶅姟 - * 榛樿绠$悊鍛樹笉杩囨护 - * 闇�鑷鏍规嵁涓氬姟閲嶅啓瀹炵幇 - * - * @author Lion Li - * @version 3.6.0 - */ -@Service -public class SysSensitiveServiceImpl implements SensitiveService { - - /** - * 鏄惁鑴辨晱 - */ - @Override - public boolean isSensitive() { - return !LoginHelper.isSuperAdmin() || !LoginHelper.isTenantAdmin(); - } - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysTenantPackageServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysTenantPackageServiceImpl.java deleted file mode 100644 index dd765d8..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysTenantPackageServiceImpl.java +++ /dev/null @@ -1,146 +0,0 @@ -package com.xmzs.system.service.impl; - -import cn.hutool.core.collection.CollUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.constant.TenantConstants; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.SysTenant; -import com.xmzs.system.domain.SysTenantPackage; -import com.xmzs.system.domain.bo.SysTenantPackageBo; -import com.xmzs.system.domain.vo.SysTenantPackageVo; -import com.xmzs.system.mapper.SysTenantMapper; -import com.xmzs.system.mapper.SysTenantPackageMapper; -import com.xmzs.system.service.ISysTenantPackageService; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Arrays; -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * 绉熸埛濂楅Service涓氬姟灞傚鐞� - * - * @author Michelle.Chung - */ -@RequiredArgsConstructor -@Service -public class SysTenantPackageServiceImpl implements ISysTenantPackageService { - - private final SysTenantPackageMapper baseMapper; - private final SysTenantMapper tenantMapper; - - /** - * 鏌ヨ绉熸埛濂楅 - */ - @Override - public SysTenantPackageVo queryById(Long packageId){ - return baseMapper.selectVoById(packageId); - } - - /** - * 鏌ヨ绉熸埛濂楅鍒楄〃 - */ - @Override - public TableDataInfo<SysTenantPackageVo> queryPageList(SysTenantPackageBo bo, PageQuery pageQuery) { - LambdaQueryWrapper<SysTenantPackage> lqw = buildQueryWrapper(bo); - Page<SysTenantPackageVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(result); - } - - @Override - public List<SysTenantPackageVo> selectList() { - return baseMapper.selectVoList(new LambdaQueryWrapper<SysTenantPackage>() - .eq(SysTenantPackage::getStatus, TenantConstants.NORMAL)); - } - - /** - * 鏌ヨ绉熸埛濂楅鍒楄〃 - */ - @Override - public List<SysTenantPackageVo> queryList(SysTenantPackageBo bo) { - LambdaQueryWrapper<SysTenantPackage> lqw = buildQueryWrapper(bo); - return baseMapper.selectVoList(lqw); - } - - private LambdaQueryWrapper<SysTenantPackage> buildQueryWrapper(SysTenantPackageBo bo) { - Map<String, Object> params = bo.getParams(); - LambdaQueryWrapper<SysTenantPackage> lqw = Wrappers.lambdaQuery(); - lqw.like(StringUtils.isNotBlank(bo.getPackageName()), SysTenantPackage::getPackageName, bo.getPackageName()); - lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysTenantPackage::getStatus, bo.getStatus()); - return lqw; - } - - /** - * 鏂板绉熸埛濂楅 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public Boolean insertByBo(SysTenantPackageBo bo) { - SysTenantPackage add = MapstructUtils.convert(bo, SysTenantPackage.class); - // 淇濆瓨鑿滃崟id - List<Long> menuIds = Arrays.asList(bo.getMenuIds()); - if (CollUtil.isNotEmpty(menuIds)) { - add.setMenuIds(StringUtils.join(menuIds, ", ")); - } else { - add.setMenuIds(""); - } - boolean flag = baseMapper.insert(add) > 0; - if (flag) { - bo.setPackageId(add.getPackageId()); - } - return flag; - } - - /** - * 淇敼绉熸埛濂楅 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public Boolean updateByBo(SysTenantPackageBo bo) { - SysTenantPackage update = MapstructUtils.convert(bo, SysTenantPackage.class); - // 淇濆瓨鑿滃崟id - List<Long> menuIds = Arrays.asList(bo.getMenuIds()); - if (CollUtil.isNotEmpty(menuIds)) { - update.setMenuIds(StringUtils.join(menuIds, ", ")); - } else { - update.setMenuIds(""); - } - return baseMapper.updateById(update) > 0; - } - - /** - * 淇敼濂楅鐘舵�� - * - * @param bo 濂楅淇℃伅 - * @return 缁撴灉 - */ - @Override - public int updatePackageStatus(SysTenantPackageBo bo) { - SysTenantPackage tenantPackage = MapstructUtils.convert(bo, SysTenantPackage.class); - return baseMapper.updateById(tenantPackage); - } - - /** - * 鎵归噺鍒犻櫎绉熸埛濂楅 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { - if(isValid){ - boolean exists = tenantMapper.exists(new LambdaQueryWrapper<SysTenant>().in(SysTenant::getPackageId, ids)); - if (exists) { - throw new ServiceException("绉熸埛濂楅宸茶浣跨敤"); - } - } - return baseMapper.deleteBatchIds(ids) > 0; - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysTenantServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysTenantServiceImpl.java deleted file mode 100644 index a95ee8e..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysTenantServiceImpl.java +++ /dev/null @@ -1,367 +0,0 @@ -package com.xmzs.system.service.impl; - -import cn.dev33.satoken.secure.BCrypt; -import cn.hutool.core.convert.Convert; -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.RandomUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.constant.CacheNames; -import com.xmzs.common.core.constant.Constants; -import com.xmzs.common.core.constant.TenantConstants; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.SpringUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.system.domain.*; -import com.xmzs.system.domain.bo.SysTenantBo; -import com.xmzs.system.domain.vo.SysTenantVo; -import com.xmzs.system.mapper.*; -import com.xmzs.system.service.ISysTenantService; -import lombok.RequiredArgsConstructor; -import org.springframework.cache.annotation.CacheEvict; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Date; -import java.util.List; - -/** - * 绉熸埛Service涓氬姟灞傚鐞� - * - * @author Michelle.Chung - */ -@RequiredArgsConstructor -@Service -public class SysTenantServiceImpl implements ISysTenantService { - - private final SysTenantMapper baseMapper; - private final SysTenantPackageMapper tenantPackageMapper; - private final SysUserMapper userMapper; - private final SysDeptMapper deptMapper; - private final SysRoleMapper roleMapper; - private final SysRoleMenuMapper roleMenuMapper; - private final SysRoleDeptMapper roleDeptMapper; - private final SysUserRoleMapper userRoleMapper; - private final SysDictTypeMapper dictTypeMapper; - private final SysDictDataMapper dictDataMapper; - private final SysConfigMapper configMapper; - - /** - * 鏌ヨ绉熸埛 - */ - @Override - public SysTenantVo queryById(Long id) { - return baseMapper.selectVoById(id); - } - - /** - * 鍩轰簬绉熸埛ID鏌ヨ绉熸埛 - */ - @Cacheable(cacheNames = CacheNames.SYS_TENANT, key = "#tenantId") - @Override - public SysTenantVo queryByTenantId(String tenantId) { - return baseMapper.selectVoOne(new LambdaQueryWrapper<SysTenant>().eq(SysTenant::getTenantId, tenantId)); - } - - /** - * 鏌ヨ绉熸埛鍒楄〃 - */ - @Override - public TableDataInfo<SysTenantVo> queryPageList(SysTenantBo bo, PageQuery pageQuery) { - LambdaQueryWrapper<SysTenant> lqw = buildQueryWrapper(bo); - Page<SysTenantVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(result); - } - - /** - * 鏌ヨ绉熸埛鍒楄〃 - */ - @Override - public List<SysTenantVo> queryList(SysTenantBo bo) { - LambdaQueryWrapper<SysTenant> lqw = buildQueryWrapper(bo); - return baseMapper.selectVoList(lqw); - } - - private LambdaQueryWrapper<SysTenant> buildQueryWrapper(SysTenantBo bo) { - LambdaQueryWrapper<SysTenant> lqw = Wrappers.lambdaQuery(); - lqw.eq(StringUtils.isNotBlank(bo.getTenantId()), SysTenant::getTenantId, bo.getTenantId()); - lqw.like(StringUtils.isNotBlank(bo.getContactUserName()), SysTenant::getContactUserName, bo.getContactUserName()); - lqw.eq(StringUtils.isNotBlank(bo.getContactPhone()), SysTenant::getContactPhone, bo.getContactPhone()); - lqw.like(StringUtils.isNotBlank(bo.getCompanyName()), SysTenant::getCompanyName, bo.getCompanyName()); - lqw.eq(StringUtils.isNotBlank(bo.getLicenseNumber()), SysTenant::getLicenseNumber, bo.getLicenseNumber()); - lqw.eq(StringUtils.isNotBlank(bo.getAddress()), SysTenant::getAddress, bo.getAddress()); - lqw.eq(StringUtils.isNotBlank(bo.getIntro()), SysTenant::getIntro, bo.getIntro()); - lqw.like(StringUtils.isNotBlank(bo.getDomain()), SysTenant::getDomain, bo.getDomain()); - lqw.eq(bo.getPackageId() != null, SysTenant::getPackageId, bo.getPackageId()); - lqw.eq(bo.getExpireTime() != null, SysTenant::getExpireTime, bo.getExpireTime()); - lqw.eq(bo.getAccountCount() != null, SysTenant::getAccountCount, bo.getAccountCount()); - lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysTenant::getStatus, bo.getStatus()); - return lqw; - } - - /** - * 鏂板绉熸埛 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public Boolean insertByBo(SysTenantBo bo) { - SysTenant add = MapstructUtils.convert(bo, SysTenant.class); - - // 鑾峰彇鎵�鏈夌鎴风紪鍙� - List<String> tenantIds = baseMapper.selectObjs( - new LambdaQueryWrapper<SysTenant>().select(SysTenant::getTenantId), Convert::toStr); - String tenantId = generateTenantId(tenantIds); - add.setTenantId(tenantId); - boolean flag = baseMapper.insert(add) > 0; - if (!flag) { - throw new ServiceException("鍒涘缓绉熸埛澶辫触"); - } - bo.setId(add.getId()); - - // 鏍规嵁濂楅鍒涘缓瑙掕壊 - Long roleId = createTenantRole(tenantId, bo.getPackageId()); - - // 鍒涘缓閮ㄩ棬: 鍏徃鍚嶆槸閮ㄩ棬鍚嶇О - SysDept dept = new SysDept(); - dept.setTenantId(tenantId); - dept.setDeptName(bo.getCompanyName()); - dept.setLeader(bo.getUsername()); - dept.setParentId(Constants.TOP_PARENT_ID); - dept.setAncestors(Constants.TOP_PARENT_ID.toString()); - deptMapper.insert(dept); - Long deptId = dept.getDeptId(); - - // 瑙掕壊鍜岄儴闂ㄥ叧鑱旇〃 - SysRoleDept roleDept = new SysRoleDept(); - roleDept.setRoleId(roleId); - roleDept.setDeptId(deptId); - roleDeptMapper.insert(roleDept); - - // 鍒涘缓绯荤粺鐢ㄦ埛 - SysUser user = new SysUser(); - user.setTenantId(tenantId); - user.setUserName(bo.getUsername()); - user.setNickName(bo.getUsername()); - user.setPassword(BCrypt.hashpw(bo.getPassword())); - user.setDeptId(deptId); - userMapper.insert(user); - - // 鐢ㄦ埛鍜岃鑹插叧鑱旇〃 - SysUserRole userRole = new SysUserRole(); - userRole.setUserId(user.getUserId()); - userRole.setRoleId(roleId); - userRoleMapper.insert(userRole); - - String defaultTenantId = TenantConstants.DEFAULT_TENANT_ID; - List<SysDictType> dictTypeList = dictTypeMapper.selectList( - new LambdaQueryWrapper<SysDictType>().eq(SysDictType::getTenantId, defaultTenantId)); - List<SysDictData> dictDataList = dictDataMapper.selectList( - new LambdaQueryWrapper<SysDictData>().eq(SysDictData::getTenantId, defaultTenantId)); - for (SysDictType dictType : dictTypeList) { - dictType.setDictId(null); - dictType.setTenantId(tenantId); - } - for (SysDictData dictData : dictDataList) { - dictData.setDictCode(null); - dictData.setTenantId(tenantId); - } - dictTypeMapper.insertBatch(dictTypeList); - dictDataMapper.insertBatch(dictDataList); - - List<SysConfig> sysConfigList = configMapper.selectList( - new LambdaQueryWrapper<SysConfig>().eq(SysConfig::getTenantId, defaultTenantId)); - for (SysConfig config : sysConfigList) { - config.setConfigId(null); - config.setTenantId(tenantId); - } - configMapper.insertBatch(sysConfigList); - return true; - } - - /** - * 鐢熸垚绉熸埛id - * - * @param tenantIds 宸叉湁绉熸埛id鍒楄〃 - * @return 绉熸埛id - */ - private String generateTenantId(List<String> tenantIds) { - // 闅忔満鐢熸垚6浣� - String numbers = RandomUtil.randomNumbers(6); - // 鍒ゆ柇鏄惁瀛樺湪锛屽鏋滃瓨鍦ㄥ垯閲嶆柊鐢熸垚 - if (tenantIds.contains(numbers)) { - generateTenantId(tenantIds); - } - return numbers; - } - - /** - * 鏍规嵁绉熸埛鑿滃崟鍒涘缓绉熸埛瑙掕壊 - * - * @param tenantId 绉熸埛缂栧彿 - * @param packageId 绉熸埛濂楅id - * @return 瑙掕壊id - */ - private Long createTenantRole(String tenantId, Long packageId) { - // 鑾峰彇绉熸埛濂楅 - SysTenantPackage tenantPackage = tenantPackageMapper.selectById(packageId); - if (ObjectUtil.isNull(tenantPackage)) { - throw new ServiceException("濂楅涓嶅瓨鍦�"); - } - // 鑾峰彇濂楅鑿滃崟id - List<Long> menuIds = StringUtils.splitTo(tenantPackage.getMenuIds(), Convert::toLong); - - // 鍒涘缓瑙掕壊 - SysRole role = new SysRole(); - role.setTenantId(tenantId); - role.setRoleName(TenantConstants.TENANT_ADMIN_ROLE_NAME); - role.setRoleKey(TenantConstants.TENANT_ADMIN_ROLE_KEY); - role.setRoleSort(1); - role.setStatus(TenantConstants.NORMAL); - roleMapper.insert(role); - Long roleId = role.getRoleId(); - - // 鍒涘缓瑙掕壊鑿滃崟 - List<SysRoleMenu> roleMenus = new ArrayList<>(menuIds.size()); - menuIds.forEach(menuId -> { - SysRoleMenu roleMenu = new SysRoleMenu(); - roleMenu.setRoleId(roleId); - roleMenu.setMenuId(menuId); - roleMenus.add(roleMenu); - }); - roleMenuMapper.insertBatch(roleMenus); - - return roleId; - } - - /** - * 淇敼绉熸埛 - */ - @CacheEvict(cacheNames = CacheNames.SYS_TENANT, key = "#bo.tenantId") - @Override - public Boolean updateByBo(SysTenantBo bo) { - SysTenant tenant = MapstructUtils.convert(bo, SysTenant.class); - tenant.setTenantId(null); - tenant.setPackageId(null); - return baseMapper.updateById(tenant) > 0; - } - - /** - * 淇敼绉熸埛鐘舵�� - * - * @param bo 绉熸埛淇℃伅 - * @return 缁撴灉 - */ - @CacheEvict(cacheNames = CacheNames.SYS_TENANT, key = "#bo.tenantId") - @Override - public int updateTenantStatus(SysTenantBo bo) { - SysTenant tenant = MapstructUtils.convert(bo, SysTenant.class); - return baseMapper.updateById(tenant); - } - - /** - * 鏍¢獙绉熸埛鏄惁鍏佽鎿嶄綔 - * - * @param tenantId 绉熸埛ID - */ - @Override - public void checkTenantAllowed(String tenantId) { - if (ObjectUtil.isNotNull(tenantId) && TenantConstants.DEFAULT_TENANT_ID.equals(tenantId)) { - throw new ServiceException("涓嶅厑璁告搷浣滅鐞嗙鎴�"); - } - } - - /** - * 鎵归噺鍒犻櫎绉熸埛 - */ - @CacheEvict(cacheNames = CacheNames.SYS_TENANT, allEntries = true) - @Override - public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { - if (isValid) { - // 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠� - if (ids.contains(TenantConstants.SUPER_ADMIN_ID)) { - throw new ServiceException("瓒呯绉熸埛涓嶈兘鍒犻櫎"); - } - } - return baseMapper.deleteBatchIds(ids) > 0; - } - - /** - * 鏍¢獙浼佷笟鍚嶇О鏄惁鍞竴 - */ - @Override - public boolean checkCompanyNameUnique(SysTenantBo bo) { - boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysTenant>() - .eq(SysTenant::getCompanyName, bo.getCompanyName()) - .ne(ObjectUtil.isNotNull(bo.getTenantId()), SysTenant::getTenantId, bo.getTenantId())); - return !exist; - } - - /** - * 鏍¢獙璐﹀彿浣欓 - */ - @Override - public boolean checkAccountBalance(String tenantId) { - SysTenantVo tenant = SpringUtils.getAopProxy(this).queryByTenantId(tenantId); - // 濡傛灉浣欓涓�-1浠h〃涓嶉檺鍒� - if (tenant.getAccountCount() == -1) { - return true; - } - Long userNumber = userMapper.selectCount(new LambdaQueryWrapper<>()); - // 濡傛灉浣欓澶т簬0浠h〃杩樻湁鍙敤鍚嶉 - return tenant.getAccountCount() - userNumber > 0; - } - - /** - * 鏍¢獙鏈夋晥鏈� - */ - @Override - public boolean checkExpireTime(String tenantId) { - SysTenantVo tenant = SpringUtils.getAopProxy(this).queryByTenantId(tenantId); - // 濡傛灉鏈缃繃鏈熸椂闂翠唬琛ㄤ笉闄愬埗 - if (ObjectUtil.isNull(tenant.getExpireTime())) { - return true; - } - // 濡傛灉褰撳墠鏃堕棿鍦ㄨ繃鏈熸椂闂翠箣鍓嶅垯閫氳繃 - return new Date().before(tenant.getExpireTime()); - } - - /** - * 鍚屾绉熸埛濂楅 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public Boolean syncTenantPackage(String tenantId, String packageId) { - SysTenantPackage tenantPackage = tenantPackageMapper.selectById(packageId); - List<SysRole> roles = roleMapper.selectList( - new LambdaQueryWrapper<SysRole>().eq(SysRole::getTenantId, tenantId)); - List<Long> roleIds = new ArrayList<>(roles.size() - 1); - List<Long> menuIds = StringUtils.splitTo(tenantPackage.getMenuIds(), Convert::toLong); - roles.forEach(item -> { - if (TenantConstants.TENANT_ADMIN_ROLE_KEY.equals(item.getRoleKey())) { - List<SysRoleMenu> roleMenus = new ArrayList<>(menuIds.size()); - menuIds.forEach(menuId -> { - SysRoleMenu roleMenu = new SysRoleMenu(); - roleMenu.setRoleId(item.getRoleId()); - roleMenu.setMenuId(menuId); - roleMenus.add(roleMenu); - }); - roleMenuMapper.delete(new LambdaQueryWrapper<SysRoleMenu>().eq(SysRoleMenu::getRoleId, item.getRoleId())); - roleMenuMapper.insertBatch(roleMenus); - } else { - roleIds.add(item.getRoleId()); - } - }); - if (!roleIds.isEmpty()) { - roleMenuMapper.delete( - new LambdaQueryWrapper<SysRoleMenu>().in(SysRoleMenu::getRoleId, roleIds).notIn(!menuIds.isEmpty(), SysRoleMenu::getMenuId, menuIds)); - } - return true; - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysUserServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysUserServiceImpl.java deleted file mode 100644 index 8a44a32..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/service/impl/SysUserServiceImpl.java +++ /dev/null @@ -1,560 +0,0 @@ -package com.xmzs.system.service.impl; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.ArrayUtil; -import cn.hutool.core.util.ObjectUtil; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.xmzs.common.core.constant.CacheNames; -import com.xmzs.common.core.constant.UserConstants; -import com.xmzs.common.core.exception.ServiceException; -import com.xmzs.common.core.service.UserService; -import com.xmzs.common.core.utils.MapstructUtils; -import com.xmzs.common.core.utils.StreamUtils; -import com.xmzs.common.core.utils.StringUtils; -import com.xmzs.common.mybatis.core.page.PageQuery; -import com.xmzs.common.mybatis.core.page.TableDataInfo; -import com.xmzs.common.mybatis.helper.DataBaseHelper; -import com.xmzs.common.satoken.utils.LoginHelper; -import com.xmzs.system.domain.SysDept; -import com.xmzs.system.domain.SysUser; -import com.xmzs.system.domain.SysUserPost; -import com.xmzs.system.domain.SysUserRole; -import com.xmzs.system.domain.bo.SysUserBo; -import com.xmzs.system.domain.vo.SysPostVo; -import com.xmzs.system.domain.vo.SysRoleVo; -import com.xmzs.system.domain.vo.SysUserVo; -import com.xmzs.system.mapper.*; -import com.xmzs.system.service.ISysUserService; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; -import java.util.Map; - -/** - * 鐢ㄦ埛 涓氬姟灞傚鐞� - * - * @author Lion Li - */ -@Slf4j -@RequiredArgsConstructor -@Service -public class SysUserServiceImpl implements ISysUserService, UserService { - - private final SysUserMapper baseMapper; - private final SysDeptMapper deptMapper; - private final SysRoleMapper roleMapper; - private final SysPostMapper postMapper; - private final SysUserRoleMapper userRoleMapper; - private final SysUserPostMapper userPostMapper; - - @Override - public TableDataInfo<SysUserVo> selectPageUserList(SysUserBo user, PageQuery pageQuery) { - Page<SysUserVo> page = baseMapper.selectPageUserList(pageQuery.build(), this.buildQueryWrapper(user)); - return TableDataInfo.build(page); - } - - /** - * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ鐢ㄦ埛鍒楄〃 - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅 - */ - @Override - public List<SysUserVo> selectUserList(SysUserBo user) { - return baseMapper.selectUserList(this.buildQueryWrapper(user)); - } - - private Wrapper<SysUser> buildQueryWrapper(SysUserBo user) { - Map<String, Object> params = user.getParams(); - QueryWrapper<SysUser> wrapper = Wrappers.query(); - wrapper.eq("u.del_flag", UserConstants.USER_NORMAL) - .eq(ObjectUtil.isNotNull(user.getUserId()), "u.user_id", user.getUserId()) - .eq(ObjectUtil.isNotNull(user.getUserGrade()), "u.user_grade", user.getUserGrade()) - .like(StringUtils.isNotBlank(user.getUserName()), "u.user_name", user.getUserName()) - .eq(StringUtils.isNotBlank(user.getStatus()), "u.status", user.getStatus()) - .like(StringUtils.isNotBlank(user.getPhonenumber()), "u.phonenumber", user.getPhonenumber()) - .between(params.get("beginTime") != null && params.get("endTime") != null, - "u.create_time", params.get("beginTime"), params.get("endTime")) - .and(ObjectUtil.isNotNull(user.getDeptId()), w -> { - List<SysDept> deptList = deptMapper.selectList(new LambdaQueryWrapper<SysDept>() - .select(SysDept::getDeptId) - .apply(DataBaseHelper.findInSet(user.getDeptId(), "ancestors"))); - List<Long> ids = StreamUtils.toList(deptList, SysDept::getDeptId); - ids.add(user.getDeptId()); - w.in("u.dept_id", ids); - }); - return wrapper; - } - - /** - * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ宸插垎閰嶇敤鎴疯鑹插垪琛� - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅 - */ - @Override - public TableDataInfo<SysUserVo> selectAllocatedList(SysUserBo user, PageQuery pageQuery) { - QueryWrapper<SysUser> wrapper = Wrappers.query(); - wrapper.eq("u.del_flag", UserConstants.USER_NORMAL) - .eq(ObjectUtil.isNotNull(user.getRoleId()), "r.role_id", user.getRoleId()) - .like(StringUtils.isNotBlank(user.getUserName()), "u.user_name", user.getUserName()) - .eq(StringUtils.isNotBlank(user.getStatus()), "u.status", user.getStatus()) - .like(StringUtils.isNotBlank(user.getPhonenumber()), "u.phonenumber", user.getPhonenumber()); - Page<SysUserVo> page = baseMapper.selectAllocatedList(pageQuery.build(), wrapper); - return TableDataInfo.build(page); - } - - /** - * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ鏈垎閰嶇敤鎴疯鑹插垪琛� - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅 - */ - @Override - public TableDataInfo<SysUserVo> selectUnallocatedList(SysUserBo user, PageQuery pageQuery) { - List<Long> userIds = userRoleMapper.selectUserIdsByRoleId(user.getRoleId()); - QueryWrapper<SysUser> wrapper = Wrappers.query(); - wrapper.eq("u.del_flag", UserConstants.USER_NORMAL) - .and(w -> w.ne("r.role_id", user.getRoleId()).or().isNull("r.role_id")) - .notIn(CollUtil.isNotEmpty(userIds), "u.user_id", userIds) - .like(StringUtils.isNotBlank(user.getUserName()), "u.user_name", user.getUserName()) - .like(StringUtils.isNotBlank(user.getPhonenumber()), "u.phonenumber", user.getPhonenumber()); - Page<SysUserVo> page = baseMapper.selectUnallocatedList(pageQuery.build(), wrapper); - return TableDataInfo.build(page); - } - - /** - * 閫氳繃鐢ㄦ埛鍚嶆煡璇㈢敤鎴� - * - * @param userName 鐢ㄦ埛鍚� - * @return 鐢ㄦ埛瀵硅薄淇℃伅 - */ - @Override - public SysUserVo selectUserByUserName(String userName) { - return baseMapper.selectUserByUserName(userName); - } - - /** - * 閫氳繃OpenId鏌ヨ鐢ㄦ埛 - * - * @param openId 鐢ㄦ埛鍚� - * @return 鐢ㄦ埛瀵硅薄淇℃伅 - */ - @Override - public SysUserVo selectUserByOpenId(String openId) { - return baseMapper.selectUserByOpenId(openId); - } - - - /** - * 閫氳繃鎵嬫満鍙锋煡璇㈢敤鎴� - * - * @param phonenumber 鎵嬫満鍙� - * @return 鐢ㄦ埛瀵硅薄淇℃伅 - */ - @Override - public SysUserVo selectUserByPhonenumber(String phonenumber) { - return baseMapper.selectUserByPhonenumber(phonenumber); - } - - /** - * 閫氳繃鐢ㄦ埛ID鏌ヨ鐢ㄦ埛 - * - * @param userId 鐢ㄦ埛ID - * @return 鐢ㄦ埛瀵硅薄淇℃伅 - */ - @Override - public SysUserVo selectUserById(Long userId) { - return baseMapper.selectUserById(userId); - } - - /** - * 鏌ヨ鐢ㄦ埛鎵�灞炶鑹茬粍 - * - * @param userName 鐢ㄦ埛鍚� - * @return 缁撴灉 - */ - @Override - public String selectUserRoleGroup(String userName) { - List<SysRoleVo> list = roleMapper.selectRolesByUserName(userName); - if (CollUtil.isEmpty(list)) { - return StringUtils.EMPTY; - } - return StreamUtils.join(list, SysRoleVo::getRoleName); - } - - /** - * 鏌ヨ鐢ㄦ埛鎵�灞炲矖浣嶇粍 - * - * @param userName 鐢ㄦ埛鍚� - * @return 缁撴灉 - */ - @Override - public String selectUserPostGroup(String userName) { - List<SysPostVo> list = postMapper.selectPostsByUserName(userName); - if (CollUtil.isEmpty(list)) { - return StringUtils.EMPTY; - } - return StreamUtils.join(list, SysPostVo::getPostName); - } - - /** - * 鏍¢獙鐢ㄦ埛鍚嶇О鏄惁鍞竴 - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 缁撴灉 - */ - @Override - public boolean checkUserNameUnique(SysUserBo user) { - boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysUser>() - .eq(SysUser::getUserName, user.getUserName()) - .ne(ObjectUtil.isNotNull(user.getUserId()), SysUser::getUserId, user.getUserId())); - return !exist; - } - - /** - * 鏍¢獙鎵嬫満鍙风爜鏄惁鍞竴 - * - * @param user 鐢ㄦ埛淇℃伅 - */ - @Override - public boolean checkPhoneUnique(SysUserBo user) { - boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysUser>() - .eq(SysUser::getPhonenumber, user.getPhonenumber()) - .ne(ObjectUtil.isNotNull(user.getUserId()), SysUser::getUserId, user.getUserId())); - return !exist; - } - - /** - * 鏍¢獙email鏄惁鍞竴 - * - * @param user 鐢ㄦ埛淇℃伅 - */ - @Override - public boolean checkEmailUnique(SysUserBo user) { - boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysUser>() - .eq(SysUser::getEmail, user.getEmail()) - .ne(ObjectUtil.isNotNull(user.getUserId()), SysUser::getUserId, user.getUserId())); - return !exist; - } - - /** - * 鏍¢獙鐢ㄦ埛鏄惁鍏佽鎿嶄綔 - * - * @param userId 鐢ㄦ埛ID - */ - @Override - public void checkUserAllowed(Long userId) { - if (ObjectUtil.isNotNull(userId) && LoginHelper.isSuperAdmin(userId)) { - throw new ServiceException("涓嶅厑璁告搷浣滆秴绾х鐞嗗憳鐢ㄦ埛"); - } - } - - /** - * 鏍¢獙鐢ㄦ埛鏄惁鏈夋暟鎹潈闄� - * - * @param userId 鐢ㄦ埛id - */ - @Override - public void checkUserDataScope(Long userId) { - if (ObjectUtil.isNull(userId)) { - return; - } - if (LoginHelper.isSuperAdmin()) { - return; - } - if (ObjectUtil.isNull(baseMapper.selectUserById(userId))) { - throw new ServiceException("娌℃湁鏉冮檺璁块棶鐢ㄦ埛鏁版嵁锛�"); - } - } - - /** - * 鏂板淇濆瓨鐢ㄦ埛淇℃伅 - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 缁撴灉 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public int insertUser(SysUserBo user) { - SysUser sysUser = MapstructUtils.convert(user, SysUser.class); - // 鏂板鐢ㄦ埛淇℃伅 - int rows = baseMapper.insert(sysUser); - user.setUserId(sysUser.getUserId()); - // 鏂板鐢ㄦ埛宀椾綅鍏宠仈 - insertUserPost(user, false); - // 鏂板鐢ㄦ埛涓庤鑹茬鐞� - insertUserRole(user, false); - return rows; - } - - /** - * 娉ㄥ唽鐢ㄦ埛淇℃伅 - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 缁撴灉 - */ - @Override - public SysUser registerUser(SysUserBo user, String tenantId) { - user.setCreateBy(user.getUserId()); - user.setUpdateBy(user.getUserId()); - SysUser sysUser = MapstructUtils.convert(user, SysUser.class); - if (sysUser != null) { - sysUser.setTenantId(tenantId); - } - baseMapper.insert(sysUser); - return sysUser; - } - - /** - * 淇敼淇濆瓨鐢ㄦ埛淇℃伅 - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 缁撴灉 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public int updateUser(SysUserBo user) { - // 鏂板鐢ㄦ埛涓庤鑹茬鐞� - //insertUserRole(user, true); - // 鏂板鐢ㄦ埛涓庡矖浣嶇鐞� - //insertUserPost(user, true); - SysUser sysUser = MapstructUtils.convert(user, SysUser.class); - // 闃叉閿欒鏇存柊鍚庡鑷寸殑鏁版嵁璇垹闄� - int flag = baseMapper.updateById(sysUser); - if (flag < 1) { - throw new ServiceException("淇敼鐢ㄦ埛" + user.getUserName() + "淇℃伅澶辫触"); - } - return flag; - } - - /** - * 灏忕▼搴� - 淇敼鐢ㄦ埛淇℃伅 - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 缁撴灉 - */ - @Override - public SysUserVo updateXcxUser(SysUserBo user) { - baseMapper.updateXcxUser(user); - return baseMapper.selectUserByOpenId(user.getOpenId()); - } - - /** - * 鐢ㄦ埛鎺堟潈瑙掕壊 - * - * @param userId 鐢ㄦ埛ID - * @param roleIds 瑙掕壊缁� - */ - @Override - @Transactional(rollbackFor = Exception.class) - public void insertUserAuth(Long userId, Long[] roleIds) { - insertUserRole(userId, roleIds, true); - } - - /** - * 淇敼鐢ㄦ埛鐘舵�� - * - * @param userId 鐢ㄦ埛ID - * @param status 甯愬彿鐘舵�� - * @return 缁撴灉 - */ - @Override - public int updateUserStatus(Long userId, String status) { - return baseMapper.update(null, - new LambdaUpdateWrapper<SysUser>() - .set(SysUser::getStatus, status) - .eq(SysUser::getUserId, userId)); - } - - /** - * 淇敼鐢ㄦ埛鍩烘湰淇℃伅 - * - * @param user 鐢ㄦ埛淇℃伅 - * @return 缁撴灉 - */ - @Override - public int updateUserProfile(SysUserBo user) { - return baseMapper.update(null, - new LambdaUpdateWrapper<SysUser>() - .set(ObjectUtil.isNotNull(user.getNickName()), SysUser::getNickName, user.getNickName()) - .set(SysUser::getPhonenumber, user.getPhonenumber()) - .set(SysUser::getEmail, user.getEmail()) - .set(SysUser::getSex, user.getSex()) - .eq(SysUser::getUserId, user.getUserId())); - } - - /** - * 淇敼鐢ㄦ埛澶村儚 - * - * @param userId 鐢ㄦ埛ID - * @param avatar 澶村儚鍦板潃 - * @return 缁撴灉 - */ - @Override - public boolean updateUserAvatar(Long userId, String avatar) { - return baseMapper.update(null, - new LambdaUpdateWrapper<SysUser>() - .set(SysUser::getAvatar, avatar) - .eq(SysUser::getUserId, userId)) > 0; - } - - @Override - public boolean updateUserName(Long userId, String nickName) { - return baseMapper.update(null, - new LambdaUpdateWrapper<SysUser>() - .set(SysUser::getNickName, nickName) - .eq(SysUser::getUserId, userId)) > 0; - } - - /** - * 閲嶇疆鐢ㄦ埛瀵嗙爜 - * - * @param userId 鐢ㄦ埛ID - * @param password 瀵嗙爜 - * @return 缁撴灉 - */ - @Override - public int resetUserPwd(Long userId, String password) { - return baseMapper.update(null, - new LambdaUpdateWrapper<SysUser>() - .set(SysUser::getPassword, password) - .eq(SysUser::getUserId, userId)); - } - - - /** - * 鏂板鐢ㄦ埛瑙掕壊淇℃伅 - * - * @param user 鐢ㄦ埛瀵硅薄 - * @param clear 娓呴櫎宸插瓨鍦ㄧ殑鍏宠仈鏁版嵁 - */ - private void insertUserRole(SysUserBo user, boolean clear) { - this.insertUserRole(user.getUserId(), user.getRoleIds(), clear); - } - - /** - * 鏂板鐢ㄦ埛宀椾綅淇℃伅 - * - * @param user 鐢ㄦ埛瀵硅薄 - * @param clear 娓呴櫎宸插瓨鍦ㄧ殑鍏宠仈鏁版嵁 - */ - private void insertUserPost(SysUserBo user, boolean clear) { - Long[] posts = user.getPostIds(); - if (ArrayUtil.isNotEmpty(posts)) { - if (clear) { - // 鍒犻櫎鐢ㄦ埛涓庡矖浣嶅叧鑱� - userPostMapper.delete(new LambdaQueryWrapper<SysUserPost>().eq(SysUserPost::getUserId, user.getUserId())); - } - // 鏂板鐢ㄦ埛涓庡矖浣嶇鐞� - List<SysUserPost> list = StreamUtils.toList(List.of(posts), postId -> { - SysUserPost up = new SysUserPost(); - up.setUserId(user.getUserId()); - up.setPostId(postId); - return up; - }); - userPostMapper.insertBatch(list); - } - } - - /** - * 鏂板鐢ㄦ埛瑙掕壊淇℃伅 - * - * @param userId 鐢ㄦ埛ID - * @param roleIds 瑙掕壊缁� - * @param clear 娓呴櫎宸插瓨鍦ㄧ殑鍏宠仈鏁版嵁 - */ - private void insertUserRole(Long userId, Long[] roleIds, boolean clear) { - if (ArrayUtil.isNotEmpty(roleIds)) { - // 鍒ゆ柇鏄惁鍏锋湁姝よ鑹茬殑鎿嶄綔鏉冮檺 - List<SysRoleVo> roles = roleMapper.selectRoleList(new LambdaQueryWrapper<>()); - if (CollUtil.isEmpty(roles)) { - throw new ServiceException("娌℃湁鏉冮檺璁块棶瑙掕壊鐨勬暟鎹�"); - } - List<Long> roleList = StreamUtils.toList(roles, SysRoleVo::getRoleId); - if (!LoginHelper.isSuperAdmin(userId)) { - roleList.remove(UserConstants.SUPER_ADMIN_ID); - } - List<Long> canDoRoleList = StreamUtils.filter(List.of(roleIds), roleList::contains); - if (CollUtil.isEmpty(canDoRoleList)) { - throw new ServiceException("娌℃湁鏉冮檺璁块棶瑙掕壊鐨勬暟鎹�"); - } - if (clear) { - // 鍒犻櫎鐢ㄦ埛涓庤鑹插叧鑱� - userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getUserId, userId)); - } - // 鏂板鐢ㄦ埛涓庤鑹茬鐞� - List<SysUserRole> list = StreamUtils.toList(canDoRoleList, roleId -> { - SysUserRole ur = new SysUserRole(); - ur.setUserId(userId); - ur.setRoleId(roleId); - return ur; - }); - userRoleMapper.insertBatch(list); - } - } - - /** - * 閫氳繃鐢ㄦ埛ID鍒犻櫎鐢ㄦ埛 - * - * @param userId 鐢ㄦ埛ID - * @return 缁撴灉 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public int deleteUserById(Long userId) { - // 鍒犻櫎鐢ㄦ埛涓庤鑹插叧鑱� - userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getUserId, userId)); - // 鍒犻櫎鐢ㄦ埛涓庡矖浣嶈〃 - userPostMapper.delete(new LambdaQueryWrapper<SysUserPost>().eq(SysUserPost::getUserId, userId)); - // 闃叉鏇存柊澶辫触瀵艰嚧鐨勬暟鎹垹闄� - int flag = baseMapper.deleteById(userId); - if (flag < 1) { - throw new ServiceException("鍒犻櫎鐢ㄦ埛澶辫触!"); - } - return flag; - } - - /** - * 鎵归噺鍒犻櫎鐢ㄦ埛淇℃伅 - * - * @param userIds 闇�瑕佸垹闄ょ殑鐢ㄦ埛ID - * @return 缁撴灉 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public int deleteUserByIds(Long[] userIds) { - for (Long userId : userIds) { - checkUserAllowed(userId); - checkUserDataScope(userId); - } - List<Long> ids = List.of(userIds); - // 鍒犻櫎鐢ㄦ埛涓庤鑹插叧鑱� - userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().in(SysUserRole::getUserId, ids)); - // 鍒犻櫎鐢ㄦ埛涓庡矖浣嶈〃 - userPostMapper.delete(new LambdaQueryWrapper<SysUserPost>().in(SysUserPost::getUserId, ids)); - // 闃叉鏇存柊澶辫触瀵艰嚧鐨勬暟鎹垹闄� - int flag = baseMapper.deleteBatchIds(ids); - if (flag < 1) { - throw new ServiceException("鍒犻櫎鐢ㄦ埛澶辫触!"); - } - return flag; - } - - @Cacheable(cacheNames = CacheNames.SYS_USER_NAME, key = "#userId") - @Override - public String selectUserNameById(Long userId) { - SysUser sysUser = baseMapper.selectOne(new LambdaQueryWrapper<SysUser>() - .select(SysUser::getUserName).eq(SysUser::getUserId, userId)); - return ObjectUtil.isNull(sysUser) ? null : sysUser.getUserName(); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/util/BotUtil.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/util/BotUtil.java deleted file mode 100644 index f2074d1..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/util/BotUtil.java +++ /dev/null @@ -1,107 +0,0 @@ -//package com.xmzs.system.util; -// -// -//import com.xmzs.system.cofing.GptConfig; -//import com.xmzs.system.domain.ChatMessage; -//import jakarta.annotation.PostConstruct; -//import lombok.Getter; -//import lombok.RequiredArgsConstructor; -//import org.springframework.stereotype.Component; -// -//import java.util.*; -// -///** -// * bot宸ュ叿绫� -// * -// * @author ashinnotfound -// * @date 2023/2/1 -// */ -//@Component -//@RequiredArgsConstructor -//public class BotUtil { -// -// private final GptConfig gptConfig; -// -// private GptClient gptClient; -// -// private Tokenizer tokenizer; -// -// private final Map<String, List<ChatMessage>> PROMPT_MAP = new HashMap<>(); -// private final Map<OpenAiService, Integer> COUNT_FOR_OPEN_AI_SERVICE = new HashMap<>(); -// @Getter -// private ChatCompletionRequest.ChatCompletionRequestBuilder completionRequestBuilder; -// private final List<ChatMessage> BASIC_PROMPT_LIST = new ArrayList<>(); -// -// @PostConstruct -// public void init() { -// completionRequestBuilder = ChatCompletionRequest.builder().model(gptConfig.getModel()).temperature(gptConfig.getTemperature()).maxTokens(gptConfig.getMaxToken()); -// for (OpenAiService openAiService : gptClient.getOpenAiServiceList()) { -// COUNT_FOR_OPEN_AI_SERVICE.put(openAiService, 0); -// } -// for (String prompt : gptConfig.getBasicPrompt()){ -// BASIC_PROMPT_LIST.add(new ChatMessage("system", prompt)); -// } -// } -// -// public OpenAiService getOpenAiService() { -// //鑾峰彇浣跨敤娆℃暟鏈�灏忕殑openAiService 鍚﹀垯鑾峰彇map涓殑绗竴涓� -// Optional<OpenAiService> openAiServiceToUse = COUNT_FOR_OPEN_AI_SERVICE.entrySet().stream() -// .min(Map.Entry.comparingByValue()) -// .map(Map.Entry::getKey); -// if (openAiServiceToUse.isPresent()) { -// COUNT_FOR_OPEN_AI_SERVICE.put(openAiServiceToUse.get(), COUNT_FOR_OPEN_AI_SERVICE.get(openAiServiceToUse.get()) + 1); -// return openAiServiceToUse.get(); -// } else { -// COUNT_FOR_OPEN_AI_SERVICE.put(COUNT_FOR_OPEN_AI_SERVICE.keySet().iterator().next(), COUNT_FOR_OPEN_AI_SERVICE.get(COUNT_FOR_OPEN_AI_SERVICE.keySet().iterator().next()) + 1); -// return COUNT_FOR_OPEN_AI_SERVICE.keySet().iterator().next(); -// } -// } -// -// public List<ChatMessage> buildPrompt(String sessionId, String newPrompt) { -// if (!PROMPT_MAP.containsKey(sessionId)) { -// if (!BASIC_PROMPT_LIST.isEmpty()){ -// List<ChatMessage> promptList = new ArrayList<>(BASIC_PROMPT_LIST); -// PROMPT_MAP.put(sessionId, promptList); -// } -// } -// List<ChatMessage> promptList = PROMPT_MAP.getOrDefault(sessionId, new ArrayList<>()); -// promptList.add(new ChatMessage("user", newPrompt)); -// if (tokenizer.countMessageTokens(gptConfig.getModel(), promptList) > gptConfig.getMaxToken()){ -// List<ChatMessage> tempChatMessage = deleteFirstPrompt(sessionId); -// if (tempChatMessage != null){ -// return buildPrompt(sessionId, newPrompt); -// } -// return null; -// } -// return promptList; -// } -// -// public boolean isPromptEmpty(String sessionId){ -// if (!PROMPT_MAP.containsKey(sessionId)){ -// return true; -// } -// return PROMPT_MAP.get(sessionId).size() == BASIC_PROMPT_LIST.size(); -// } -// public List<ChatMessage> deleteFirstPrompt(String sessionId) { -// if (!isPromptEmpty(sessionId)){ -// int index = BASIC_PROMPT_LIST.size(); -// List<ChatMessage> promptList = PROMPT_MAP.get(sessionId); -// //闂� -// promptList.remove(index); -// //绛� -// if (index < promptList.size()){ -// promptList.remove(index); -// return promptList; -// }else { -// // 宸茬粡鏄垵濮嬭亰澶╄褰� -// return null; -// } -// } -// // 宸茬粡鏄垵濮嬭亰澶╄褰� -// return null; -// } -// -// public void resetPrompt(String sessionId) { -// PROMPT_MAP.remove(sessionId); -// } -//} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/util/OrderNumberGenerator.java b/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/util/OrderNumberGenerator.java deleted file mode 100644 index 819fe98..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/xmzs/system/util/OrderNumberGenerator.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.xmzs.system.util; - -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.concurrent.ThreadLocalRandom; -public class OrderNumberGenerator { - // 璁㈠崟缂栧彿鍓嶇紑 - private static final String PREFIX = "NO"; - - // 鏃堕棿鏍煎紡鍖� - private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyyMMddHHmm"); - - // 鐢熸垚璁㈠崟缂栧彿 - public static String generate() { - // 鑾峰彇褰撳墠鏃ユ湡鏃堕棿瀛楃涓� - String dateTimeStr = DATE_FORMAT.format(new Date()); - - // 鐢熸垚闅忔満鏁� (杩欓噷涓句緥鐢熸垚涓�涓�5浣嶉殢鏈烘暟) - int randomNum = ThreadLocalRandom.current().nextInt(10000, 99999); - - // 鎷兼帴璁㈠崟缂栧彿 - return dateTimeStr + randomNum; - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/builder/AbstractBuilder.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/builder/AbstractBuilder.java new file mode 100644 index 0000000..1876337 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/builder/AbstractBuilder.java @@ -0,0 +1,16 @@ +package org.ruoyi.system.builder; + +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage; +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +public abstract class AbstractBuilder { + protected final Logger logger = LoggerFactory.getLogger(getClass()); + + public abstract WxCpXmlOutMessage build(String content, WxCpXmlMessage wxMessage, WxCpService service); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/builder/ImageBuilder.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/builder/ImageBuilder.java new file mode 100644 index 0000000..048372e --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/builder/ImageBuilder.java @@ -0,0 +1,25 @@ +package org.ruoyi.system.builder; + +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage; +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutImageMessage; +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage; + + +/** + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +public class ImageBuilder extends AbstractBuilder { + + @Override + public WxCpXmlOutMessage build(String content, WxCpXmlMessage wxMessage, + WxCpService service) { + + WxCpXmlOutImageMessage m = WxCpXmlOutMessage.IMAGE().mediaId(content) + .fromUser(wxMessage.getToUserName()).toUser(wxMessage.getFromUserName()) + .build(); + + return m; + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/builder/TextBuilder.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/builder/TextBuilder.java new file mode 100644 index 0000000..c60fe8f --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/builder/TextBuilder.java @@ -0,0 +1,22 @@ +package org.ruoyi.system.builder; + +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage; +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage; +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutTextMessage; + +/** + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +public class TextBuilder extends AbstractBuilder { + + @Override + public WxCpXmlOutMessage build(String content, WxCpXmlMessage wxMessage, + WxCpService service) { + WxCpXmlOutTextMessage m = WxCpXmlOutMessage.TEXT().content(content) + .fromUser(wxMessage.getToUserName()).toUser(wxMessage.getFromUserName()) + .build(); + return m; + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/cofing/OkHttpConfig.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/cofing/OkHttpConfig.java index 90127bf..b7406c1 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/cofing/OkHttpConfig.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/cofing/OkHttpConfig.java @@ -26,6 +26,7 @@ public void init() { initializeOkHttpUtil("suno"); initializeOkHttpUtil("luma"); + initializeOkHttpUtil("ppt"); } private void initializeOkHttpUtil(String modelName) { diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/cofing/WxCpConfiguration.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/cofing/WxCpConfiguration.java new file mode 100644 index 0000000..784c939 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/cofing/WxCpConfiguration.java @@ -0,0 +1,130 @@ +package org.ruoyi.system.cofing; + + +import com.google.common.collect.Maps; +import jakarta.annotation.PostConstruct; +import lombok.val; +import me.chanjar.weixin.common.api.WxConsts; +import me.chanjar.weixin.cp.api.impl.WxCpServiceImpl; +import me.chanjar.weixin.cp.config.impl.WxCpDefaultConfigImpl; +import me.chanjar.weixin.cp.constant.WxCpConsts; +import me.chanjar.weixin.cp.message.WxCpMessageRouter; +import org.ruoyi.system.handler.wxcp.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Configuration; +import me.chanjar.weixin.cp.api.WxCpService; + +import java.util.Map; +import java.util.stream.Collectors; + +/** + * 鍗曞疄渚嬮厤缃� + * + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +@Configuration +@EnableConfigurationProperties(WxCpProperties.class) +public class WxCpConfiguration { + private LogHandler logHandler; + private NullHandler nullHandler; + private LocationHandler locationHandler; + private MenuHandler menuHandler; + private MsgHandler msgHandler; + private UnsubscribeHandler unsubscribeHandler; + private SubscribeHandler subscribeHandler; + + private WxCpProperties properties; + + private static Map<Integer, WxCpMessageRouter> routers = Maps.newHashMap(); + private static Map<Integer, WxCpService> cpServices = Maps.newHashMap(); + + @Autowired + public WxCpConfiguration(LogHandler logHandler, NullHandler nullHandler, LocationHandler locationHandler, + MenuHandler menuHandler, MsgHandler msgHandler, UnsubscribeHandler unsubscribeHandler, + SubscribeHandler subscribeHandler, WxCpProperties properties) { + this.logHandler = logHandler; + this.nullHandler = nullHandler; + this.locationHandler = locationHandler; + this.menuHandler = menuHandler; + this.msgHandler = msgHandler; + this.unsubscribeHandler = unsubscribeHandler; + this.subscribeHandler = subscribeHandler; + this.properties = properties; + } + + + public static Map<Integer, WxCpMessageRouter> getRouters() { + return routers; + } + + public static WxCpService getCpService(Integer agentId) { + return cpServices.get(agentId); + } + + @PostConstruct + public void initServices() { + cpServices = this.properties.getAppConfigs().stream().map(a -> { + val configStorage = new WxCpDefaultConfigImpl(); + configStorage.setCorpId(this.properties.getCorpId()); + configStorage.setAgentId(a.getAgentId()); + configStorage.setCorpSecret(a.getSecret()); + configStorage.setToken(a.getToken()); + configStorage.setAesKey(a.getAesKey()); + val service = new WxCpServiceImpl(); + service.setWxCpConfigStorage(configStorage); + routers.put(a.getAgentId(), this.newRouter(service)); + return service; + }).collect(Collectors.toMap(service -> service.getWxCpConfigStorage().getAgentId(), a -> a)); + } + + private WxCpMessageRouter newRouter(WxCpService wxCpService) { + final val newRouter = new WxCpMessageRouter(wxCpService); + + // 璁板綍鎵�鏈変簨浠剁殑鏃ュ織 锛堝紓姝ユ墽琛岋級 + newRouter.rule().handler(this.logHandler).next(); + + // 鑷畾涔夎彍鍗曚簨浠� + newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT) + .event(WxConsts.MenuButtonType.CLICK).handler(this.menuHandler).end(); + + // 鐐瑰嚮鑿滃崟閾炬帴浜嬩欢锛堣繖閲屼娇鐢ㄤ簡涓�涓┖鐨勫鐞嗗櫒锛屽彲浠ユ牴鎹嚜宸遍渶瑕佽繘琛屾墿灞曪級 + newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT) + .event(WxConsts.MenuButtonType.VIEW).handler(this.nullHandler).end(); + + // 鍏虫敞浜嬩欢 + newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT) + .event(WxConsts.EventType.SUBSCRIBE).handler(this.subscribeHandler) + .end(); + + // 鍙栨秷鍏虫敞浜嬩欢 + newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT) + .event(WxConsts.EventType.UNSUBSCRIBE) + .handler(this.unsubscribeHandler).end(); + + // 涓婃姤鍦扮悊浣嶇疆浜嬩欢 + newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT) + .event(WxConsts.EventType.LOCATION).handler(this.locationHandler) + .end(); + + // 鎺ユ敹鍦扮悊浣嶇疆娑堟伅 + newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.LOCATION) + .handler(this.locationHandler).end(); + + // 鎵爜浜嬩欢锛堣繖閲屼娇鐢ㄤ簡涓�涓┖鐨勫鐞嗗櫒锛屽彲浠ユ牴鎹嚜宸遍渶瑕佽繘琛屾墿灞曪級 + newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT) + .event(WxConsts.EventType.SCAN).handler(this.nullHandler).end(); + + newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT) + .event(WxCpConsts.EventType.CHANGE_CONTACT).handler(new ContactChangeHandler()).end(); + + newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT) + .event(WxCpConsts.EventType.ENTER_AGENT).handler(new EnterAgentHandler()).end(); + + // 榛樿 + newRouter.rule().async(false).handler(this.msgHandler).end(); + + return newRouter; + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/cofing/WxCpProperties.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/cofing/WxCpProperties.java new file mode 100644 index 0000000..7b27f15 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/cofing/WxCpProperties.java @@ -0,0 +1,48 @@ +package org.ruoyi.system.cofing; + +import lombok.Data; +import lombok.Getter; +import lombok.Setter; +import org.springframework.boot.context.properties.ConfigurationProperties; + +import java.util.List; + +/** + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +@Data +@ConfigurationProperties(prefix = "wechat.cp") +public class WxCpProperties { + /** + * 璁剧疆浼佷笟寰俊鐨刢orpId + */ + private String corpId; + + private List<AppConfig> appConfigs; + + @Getter + @Setter + public static class AppConfig { + /** + * 璁剧疆浼佷笟寰俊搴旂敤鐨凙gentId + */ + private Integer agentId; + + /** + * 璁剧疆浼佷笟寰俊搴旂敤鐨凷ecret + */ + private String secret; + + /** + * 璁剧疆浼佷笟寰俊搴旂敤鐨則oken + */ + private String token; + + /** + * 璁剧疆浼佷笟寰俊搴旂敤鐨凟ncodingAESKey + */ + private String aesKey; + + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/ChatConfigController.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/ChatConfigController.java index 5e304c8..4af2348 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/ChatConfigController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/ChatConfigController.java @@ -36,8 +36,8 @@ */ @GetMapping("/list") @SaCheckPermission("system:config:list") - public R<List<ChatConfigVo>> list(ChatConfigBo bo) { - return R.ok(chatConfigService.queryList(bo)); + public List<ChatConfigVo> list(ChatConfigBo bo) { + return chatConfigService.queryList(bo); } /** @@ -46,7 +46,8 @@ * @param id 涓婚敭 */ @GetMapping("/{id}") - public R<ChatConfigVo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖") @PathVariable Long id) { + public R<ChatConfigVo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖") + @PathVariable Long id) { return R.ok(chatConfigService.queryById(id)); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/ChatStoreController.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/ChatStoreController.java new file mode 100644 index 0000000..a5a6bb0 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/ChatStoreController.java @@ -0,0 +1,42 @@ +package org.ruoyi.system.controller.system; + +import lombok.RequiredArgsConstructor; +import org.ruoyi.common.core.domain.R; +import org.ruoyi.common.web.core.BaseController; +import org.ruoyi.system.domain.bo.ChatAppStoreBo; +import org.ruoyi.system.domain.bo.ChatMessageBo; +import org.ruoyi.system.domain.vo.ChatAppStoreVo; +import org.ruoyi.system.service.IChatAppStoreService; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 搴旂敤鍟嗗簵 + * + * @author Lion Li + * @date 2024-03-19 + */ +@RequiredArgsConstructor +@RestController +@RequestMapping("/system/store") +public class ChatStoreController extends BaseController { + + private final IChatAppStoreService appStoreService; + + /** + * 搴旂敤鍟嗗簵 + */ + @GetMapping("/appList") + public R<List<ChatAppStoreVo>> appList(ChatAppStoreBo bo) { + return R.ok(appStoreService.queryList(bo)); + } + + /** + * 鏀惰棌搴旂敤 + */ + @PostMapping("/copyApp") + public R<String> copyApp() { + return R.ok(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/ChatVoucherController.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/ChatVoucherController.java index fcda82d..cd9fae7 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/ChatVoucherController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/ChatVoucherController.java @@ -15,6 +15,7 @@ import org.ruoyi.common.mybatis.core.page.PageQuery; import org.ruoyi.common.mybatis.core.page.TableDataInfo; import org.ruoyi.common.web.core.BaseController; +import org.ruoyi.common.wechat.web.utils.UUIDShortUtil; import org.ruoyi.system.domain.bo.ChatVoucherBo; import org.ruoyi.system.domain.vo.ChatVoucherVo; import org.ruoyi.system.service.IChatVoucherService; @@ -22,7 +23,6 @@ import org.springframework.web.bind.annotation.*; import java.util.List; -import java.util.UUID; /** * 鐢ㄦ埛鍏戞崲璁板綍 @@ -78,7 +78,7 @@ @RepeatSubmit() @PostMapping() public R<Void> add(@Validated(AddGroup.class) @RequestBody ChatVoucherBo bo) { - bo.setCode(UUID.randomUUID().toString().replace("-", "")); + bo.setCode(UUIDShortUtil.generateShortUuid()); return toAjax(chatVoucherService.insertByBo(bo)); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/WeChatController.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/WeChatController.java new file mode 100644 index 0000000..a2702b2 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/WeChatController.java @@ -0,0 +1,81 @@ +package org.ruoyi.system.controller.system; + +import cn.dev33.satoken.annotation.SaIgnore; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.ruoyi.common.core.exception.ServiceException; +import org.ruoyi.common.wechat.itchat4j.api.WechatTools; +import org.ruoyi.common.wechat.itchat4j.controller.LoginController; +import org.ruoyi.common.wechat.itchat4j.core.MsgCenter; +import org.ruoyi.common.wechat.itchat4j.face.IMsgHandlerFace; +import org.ruoyi.common.wechat.web.base.BaseException; +import org.ruoyi.system.domain.bo.WxRobConfigBo; +import org.ruoyi.system.domain.vo.WxRobConfigVo; +import org.ruoyi.system.handler.MyMsgHandler; +import org.ruoyi.system.service.ISseService; +import org.ruoyi.system.service.IWxRobConfigService; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * 涓汉寰俊鎵╁睍鎺у埗鍣� + * + * @author WangLe + */ +@SaIgnore +@Slf4j +@Validated +@RequiredArgsConstructor +@RestController +public class WeChatController { + + private final ISseService sseService; + + private final IWxRobConfigService wxRobConfigService; + + /** + * 鐧诲綍绗竴姝ワ紝鑾峰彇浜岀淮鐮侀摼鎺� + * @throws BaseException + */ + @PostMapping("/getQr") + public String getQr(@RequestParam String uniqueKey) { + LoginController login = new LoginController(uniqueKey); + try { + return login.login_1(); + } catch (BaseException e) { + throw new ServiceException("鑾峰彇浜岀淮鐮佸け璐ワ細"+ e.getMessage()); + } + } + + @PostMapping("/wxLogin") + public Boolean wxLogin(@RequestParam String uniqueKey) { + LoginController login = new LoginController(uniqueKey); + return login.login_2(); + } + + @PostMapping("/wxInit") + public Boolean wxInit(@RequestParam String uniqueKey) { + LoginController login = new LoginController(uniqueKey); + // 寮�鍚秷鎭鐞嗙嚎绋� + WxRobConfigBo wxRobConfigBo = new WxRobConfigBo(); + wxRobConfigBo.setUniqueKey(uniqueKey); + List<WxRobConfigVo> wxRobConfigVos = wxRobConfigService.queryList(wxRobConfigBo); + //鏌ヨ鏈哄櫒浜哄搴旂殑鐢ㄦ埛 + start(uniqueKey,new MyMsgHandler(uniqueKey,sseService,wxRobConfigVos.get(0))); + return login.login_3(); + } + + @PostMapping("/wxLogout") + public void wxLogout(@RequestParam String uniqueKey) { + WechatTools.logout(uniqueKey); + } + + public void start(String uniqueKey,IMsgHandlerFace msgHandler) { + log.info("7.+++寮�鍚秷鎭鐞嗙嚎绋媅"+uniqueKey+"]+++"); + new Thread(() -> MsgCenter.handleMsg(uniqueKey,msgHandler)).start(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/WxRobConfigController.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/WxRobConfigController.java new file mode 100644 index 0000000..c534683 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/system/WxRobConfigController.java @@ -0,0 +1,114 @@ +package org.ruoyi.system.controller.system; + +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.RequiredArgsConstructor; +import org.ruoyi.common.core.domain.R; +import org.ruoyi.common.core.validate.AddGroup; +import org.ruoyi.common.core.validate.EditGroup; +import org.ruoyi.common.excel.utils.ExcelUtil; +import org.ruoyi.common.idempotent.annotation.RepeatSubmit; +import org.ruoyi.common.log.annotation.Log; +import org.ruoyi.common.log.enums.BusinessType; +import org.ruoyi.common.mybatis.core.page.PageQuery; +import org.ruoyi.common.mybatis.core.page.TableDataInfo; +import org.ruoyi.common.satoken.utils.LoginHelper; +import org.ruoyi.common.web.core.BaseController; +import org.ruoyi.common.wechat.web.utils.UUIDShortUtil; +import org.ruoyi.system.domain.bo.WxRobConfigBo; +import org.ruoyi.system.domain.vo.WxRobConfigVo; +import org.ruoyi.system.service.IWxRobConfigService; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 鏈哄櫒浜� + * + * @author Lion Li + * @date 2024-05-01 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/system/robConfig") +public class WxRobConfigController extends BaseController { + + private final IWxRobConfigService wxRobConfigService; + + /** + * 鏌ヨ鏈哄櫒浜哄垪琛� + */ + @GetMapping("/list") + public TableDataInfo<WxRobConfigVo> list(WxRobConfigBo bo, PageQuery pageQuery) { + return wxRobConfigService.queryPageList(bo, pageQuery); + } + + /** + * 鏌ヨ褰撳墠鐢ㄦ埛缁戝畾鐨勬満鍣ㄤ汉淇℃伅 + * @param bo 鏌ヨ鍙傛暟 + * @return 鏈哄櫒浜轰俊鎭� + */ + @GetMapping("/getRobConfig") + public R<List<WxRobConfigVo>> botList(WxRobConfigBo bo) { + bo.setUserId(LoginHelper.getUserId()); + return R.ok(wxRobConfigService.queryList(bo)); + } + + /** + * 瀵煎嚭鏈哄櫒浜哄垪琛� + */ + @Log(title = "鏈哄櫒浜�", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(WxRobConfigBo bo, HttpServletResponse response) { + List<WxRobConfigVo> list = wxRobConfigService.queryList(bo); + ExcelUtil.exportExcel(list, "鏈哄櫒浜�", WxRobConfigVo.class, response); + } + + /** + * 鑾峰彇鏈哄櫒浜鸿缁嗕俊鎭� + * + * @param id 涓婚敭 + */ + @GetMapping("/{id}") + public R<WxRobConfigVo> getInfo(@NotNull(message = "涓婚敭涓嶈兘涓虹┖") + @PathVariable Long id) { + return R.ok(wxRobConfigService.queryById(id)); + } + + /** + * 鏂板鏈哄櫒浜� + */ + @Log(title = "鏈哄櫒浜�", businessType = BusinessType.INSERT) + @RepeatSubmit() + @PostMapping() + public R<Void> add(@Validated(AddGroup.class) @RequestBody WxRobConfigBo bo) { + String uniKey = UUIDShortUtil.generateShortUuid(); + bo.setUniqueKey(uniKey); + return toAjax(wxRobConfigService.insertByBo(bo)); + } + + /** + * 淇敼鏈哄櫒浜� + */ + @Log(title = "鏈哄櫒浜�", businessType = BusinessType.UPDATE) + @RepeatSubmit() + @PutMapping() + public R<Void> edit(@Validated(EditGroup.class) @RequestBody WxRobConfigBo bo) { + return toAjax(wxRobConfigService.updateByBo(bo)); + } + + /** + * 鍒犻櫎鏈哄櫒浜� + * + * @param ids 涓婚敭涓� + */ + @Log(title = "鍒犻櫎鏈哄櫒浜�", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public R<Void> remove(@NotEmpty(message = "涓婚敭涓嶈兘涓虹┖") + @PathVariable Long[] ids) { + return toAjax(wxRobConfigService.deleteWithValidByIds(List.of(ids), true)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/wxsingle/WxJsController.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/wxsingle/WxJsController.java new file mode 100644 index 0000000..a6ff01f --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/wxsingle/WxJsController.java @@ -0,0 +1,62 @@ +package org.ruoyi.system.controller.wxsingle; + + +import me.chanjar.weixin.common.bean.WxJsapiSignature; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.cp.api.WxCpService; +import org.ruoyi.system.cofing.WxCpConfiguration; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; + +import java.nio.charset.StandardCharsets; +import java.util.Formatter; +import java.util.HashMap; +import java.util.Map; + +/** + * @author <a href="https://github.com/0katekate0">Wang_Wong</a> + */ +//@RestController +//@RequiredArgsConstructor +//@RequestMapping("/wx/cp/js/{corpId}/{agentId}/getJsConf") +public class WxJsController { + @PostMapping("/getJsConf") + public Map getJsConf( + @PathVariable String corpId, + @PathVariable Integer agentId, + String uri) throws WxErrorException { + + final WxCpService wxCpService = WxCpConfiguration.getCpService(agentId); + if (wxCpService == null) { + throw new IllegalArgumentException(String.format("鏈壘鍒板搴攁gentId=[%d]鐨勯厤缃紝璇锋牳瀹烇紒", agentId)); + } + + WxJsapiSignature wxJsapiSignature = wxCpService.createJsapiSignature(uri); + String signature = wxJsapiSignature.getSignature(); + String nonceStr = wxJsapiSignature.getNonceStr(); + long timestamp = wxJsapiSignature.getTimestamp(); + + Map res = new HashMap<String, String>(); + res.put("appId", corpId); // 蹇呭~锛屼紒涓氬井淇$殑corpID + res.put("timestamp", timestamp); // 蹇呭~锛岀敓鎴愮鍚嶇殑鏃堕棿鎴� + res.put("nonceStr", nonceStr); // 蹇呭~锛岀敓鎴愮鍚嶇殑闅忔満涓� + res.put("signature", signature); // 蹇呭~锛岀鍚嶏紝瑙� 闄勫綍-JS-SDK浣跨敤鏉冮檺绛惧悕绠楁硶 + return res; + } + + + public static String genNonce() { + return bytesToHex(Long.toString(System.nanoTime()).getBytes(StandardCharsets.UTF_8)); + } + + public static String bytesToHex(final byte[] hash) { + Formatter formatter = new Formatter(); + for (byte b : hash) { + formatter.format("%02x", b); + } + String result = formatter.toString(); + formatter.close(); + return result; + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/wxsingle/WxPortalController.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/wxsingle/WxPortalController.java new file mode 100644 index 0000000..1ca67d1 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/controller/wxsingle/WxPortalController.java @@ -0,0 +1,85 @@ +package org.ruoyi.system.controller.wxsingle; + +import lombok.extern.slf4j.Slf4j; +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage; +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage; +import me.chanjar.weixin.cp.util.crypto.WxCpCryptUtil; +import org.apache.commons.lang3.StringUtils; +import org.ruoyi.common.core.utils.JsonUtils; +import org.ruoyi.system.cofing.WxCpConfiguration; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.*; + +/** + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +@RestController +@RequestMapping("/wx/cp") +@Slf4j +public class WxPortalController { + + @Value("${wechat.cp.appConfigs[0].agentId}") + private Integer agentId; + + + @GetMapping(produces = "text/plain;charset=utf-8") + public String authGet( + @RequestParam(name = "msg_signature", required = false) String signature, + @RequestParam(name = "timestamp", required = false) String timestamp, + @RequestParam(name = "nonce", required = false) String nonce, + @RequestParam(name = "echostr", required = false) String echostr) { + log.info("\n鎺ユ敹鍒版潵鑷井淇℃湇鍔″櫒鐨勮璇佹秷鎭細signature = [{}], timestamp = [{}], nonce = [{}], echostr = [{}]", + signature, timestamp, nonce, echostr); + + if (StringUtils.isAnyBlank(signature, timestamp, nonce, echostr)) { + throw new IllegalArgumentException("璇锋眰鍙傛暟闈炴硶锛岃鏍稿疄!"); + } + + final WxCpService wxCpService = WxCpConfiguration.getCpService(agentId); + if (wxCpService == null) { + throw new IllegalArgumentException(String.format("鏈壘鍒板搴攁gentId=[%d]鐨勯厤缃紝璇锋牳瀹烇紒", agentId)); + } + + if (wxCpService.checkSignature(signature, timestamp, nonce, echostr)) { + return new WxCpCryptUtil(wxCpService.getWxCpConfigStorage()).decrypt(echostr); + } + + return "闈炴硶璇锋眰"; + } + + @PostMapping(produces = "application/xml; charset=UTF-8") + public String post( + @RequestBody String requestBody, + @RequestParam("msg_signature") String signature, + @RequestParam("timestamp") String timestamp, + @RequestParam("nonce") String nonce) { + log.info("\n鎺ユ敹寰俊璇锋眰锛歔signature=[{}], timestamp=[{}], nonce=[{}], requestBody=[\n{}\n] ", + signature, timestamp, nonce, requestBody); + + final WxCpService wxCpService = WxCpConfiguration.getCpService(1000002); + WxCpXmlMessage inMessage = WxCpXmlMessage.fromEncryptedXml(requestBody, wxCpService.getWxCpConfigStorage(), + timestamp, nonce, signature); + log.debug("\n娑堟伅瑙e瘑鍚庡唴瀹逛负锛歕n{} ", JsonUtils.toJson(inMessage)); + WxCpXmlOutMessage outMessage = this.route(1000002, inMessage); + if (outMessage == null) { + return ""; + } + + String out = outMessage.toEncryptedXml(wxCpService.getWxCpConfigStorage()); + log.debug("\n缁勮鍥炲淇℃伅锛歿}", out); + return out; + } + + private WxCpXmlOutMessage route(Integer agentId, WxCpXmlMessage message) { + try { + return WxCpConfiguration.getRouters().get(agentId).route(message); + } catch (Exception e) { + log.error(e.getMessage(), e); + } + + return null; + } + + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/ChatAppStore.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/ChatAppStore.java new file mode 100644 index 0000000..b98cbea --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/ChatAppStore.java @@ -0,0 +1,58 @@ +package org.ruoyi.system.domain; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import org.ruoyi.common.mybatis.core.domain.BaseEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serial; + +/** + * 搴旂敤甯傚満 + * + * @author Lion Li + * @date 2024-03-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("chat_app_store") +public class ChatAppStore extends BaseEntity { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * 涓婚敭 + */ + @TableId(value = "id") + private Long id; + + /** + * 鍚嶇О + */ + private String name; + + /** + * 鎻忚堪 + */ + private String description; + + /** + * 澶村儚 + */ + private String avatar; + + /** + * 搴旂敤鍦板潃 + */ + private String appUrl; + + + /** + * 澶囨敞 + */ + private String remark; + + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/ChatConfig.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/ChatConfig.java index 4717461..bad6bf4 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/ChatConfig.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/ChatConfig.java @@ -10,8 +10,7 @@ import java.io.Serial; /** - * 瀵硅瘽閰嶇疆淇℃伅 -瀵硅薄 chat_config + * 瀵硅瘽閰嶇疆淇℃伅瀵硅薄 chat_config * * @author Lion Li * @date 2024-04-13 diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/Cover.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/Cover.java new file mode 100644 index 0000000..4ce348d --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/Cover.java @@ -0,0 +1,58 @@ +package org.ruoyi.system.domain; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.ruoyi.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; + +/** + * 缈诲敱瀵硅薄 + * + * @author NSL + * @date 2024-12-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("chat_cover") +public class Cover extends BaseEntity { + @Serial + private static final long serialVersionUID = 1L; + + @TableId(value = "id") + private Long id; + /** + * 姝屾洸鍚嶇О + */ + private String coverMusicName; + /** + * 姝屾洸鍦板潃 + */ + private String coverMusicUrl; + /** + * 姝屾墜鎬у埆 鏋氫妇 FEMALE 濂虫�� MALE 鐢锋�� + */ + private String coverSingerGender; + /** + * 姝屾墜濮撳悕 + */ + private String coverSingerName; + /** + * 鐢ㄦ埛鎬у埆 FEMALE MALE + */ + private String userGender; + /** + * 鐢ㄦ埛id + */ + private Long userId; + /** + * 鏈娑堣垂閲戦 + */ + private String cost; + /** + * 缈诲敱鍚庣殑URL + */ + private String coverUrl; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/CoverPromptAudio.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/CoverPromptAudio.java new file mode 100644 index 0000000..b44b938 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/CoverPromptAudio.java @@ -0,0 +1,38 @@ +package org.ruoyi.system.domain; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.ruoyi.common.mybatis.core.domain.BaseEntity; + +import java.io.Serial; + +/** + * 缈诲敱鐢ㄦ埛鍙傝�冮煶棰戝璞� + * + * @author NSL + * @since 2024-12-25 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("chat_cover_prompt_audio") +public class CoverPromptAudio extends BaseEntity { + @Serial + private static final long serialVersionUID = 1L; + + @TableId(value = "id") + private Long id; + /** + * 缈诲敱涓昏〃id + */ + private Long coverId; + /** + * 鐢ㄦ埛id + */ + private Long userId; + /** + * 鍙傝�冮煶棰� + */ + private String promptAudioUrl; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/VoiceRole.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/VoiceRole.java deleted file mode 100644 index a74ef97..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/VoiceRole.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.ruoyi.system.domain; - -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import org.ruoyi.common.mybatis.core.domain.BaseEntity; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.io.Serial; - -/** - * 閰嶉煶瑙掕壊瀵硅薄 voice_role - * - * @author Lion Li - * @date 2024-03-19 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("chat_audio_role") -public class VoiceRole extends BaseEntity { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * id - */ - @TableId(value = "id") - private Long id; - - /** - * 瑙掕壊鍚嶇О - */ - private String name; - - /** - * 瑙掕壊鎻忚堪 - */ - private String description; - - /** - * 澶村儚 - */ - private String avatar; - - /** - * 瑙掕壊id - */ - private String voiceId; - - /** - * 闊抽鍦板潃 - */ - private String fileUrl; - - - /** - * 澶囨敞 - */ - private String remark; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/bo/ChatAppStoreBo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/bo/ChatAppStoreBo.java new file mode 100644 index 0000000..5af1096 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/bo/ChatAppStoreBo.java @@ -0,0 +1,59 @@ +package org.ruoyi.system.domain.bo; + +import org.ruoyi.common.mybatis.core.domain.BaseEntity; +import org.ruoyi.system.domain.ChatAppStore; +import io.github.linpeilie.annotations.AutoMapper; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 搴旂敤甯傚満涓氬姟瀵硅薄 voice_role + * + * @author Lion Li + * @date 2024-03-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@AutoMapper(target = ChatAppStore.class, reverseConvertGenerate = false) +public class ChatAppStoreBo extends BaseEntity { + + /** + * id + */ + @NotNull(message = "id涓嶈兘涓虹┖") + private Long id; + + /** + * 瑙掕壊鍚嶇О + */ + @NotBlank(message = "鍚嶇О涓嶈兘涓虹┖") + private String name; + + /** + * 瑙掕壊鎻忚堪 + */ + @NotBlank(message = "鎻忚堪涓嶈兘涓虹┖") + private String description; + + /** + * 澶村儚 + */ + @NotBlank(message = "澶村儚涓嶈兘涓虹┖") + private String avatar; + + /** + * 闊抽鍦板潃 + */ + @NotBlank(message = "搴旂敤鍦板潃涓嶈兘涓虹┖") + private String appUrl; + + /** + * 澶囨敞 + */ + @NotBlank(message = "澶囨敞涓嶈兘涓虹┖") + private String remark; + + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/bo/VoiceRoleBo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/bo/VoiceRoleBo.java deleted file mode 100644 index 2243af6..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/bo/VoiceRoleBo.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.ruoyi.system.domain.bo; - -import org.ruoyi.common.mybatis.core.domain.BaseEntity; -import org.ruoyi.system.domain.VoiceRole; -import io.github.linpeilie.annotations.AutoMapper; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.NotNull; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 閰嶉煶瑙掕壊涓氬姟瀵硅薄 voice_role - * - * @author Lion Li - * @date 2024-03-19 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@AutoMapper(target = VoiceRole.class, reverseConvertGenerate = false) -public class VoiceRoleBo extends BaseEntity { - - /** - * id - */ - @NotNull(message = "id涓嶈兘涓虹┖") - private Long id; - - /** - * 瑙掕壊鍚嶇О - */ - @NotBlank(message = "瑙掕壊鍚嶇О涓嶈兘涓虹┖") - private String name; - - /** - * 瑙掕壊鎻忚堪 - */ - @NotBlank(message = "瑙掕壊鎻忚堪涓嶈兘涓虹┖") - private String description; - - /** - * 澶村儚 - */ - @NotBlank(message = "澶村儚涓嶈兘涓虹┖") - private String avatar; - - /** - * 瑙掕壊id - */ - @NotBlank(message = "瑙掕壊id涓嶈兘涓虹┖") - private String voiceId; - - /** - * 闊抽鍦板潃 - */ - @NotBlank(message = "闊抽鍦板潃涓嶈兘涓虹┖") - private String fileUrl; - - - /** - * 澶囨敞 - */ - @NotBlank(message = "澶囨敞涓嶈兘涓虹┖") - private String remark; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/request/translation/TranslationRequest.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/request/translation/TranslationRequest.java new file mode 100644 index 0000000..5148f34 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/request/translation/TranslationRequest.java @@ -0,0 +1,34 @@ +package org.ruoyi.system.domain.request.translation; + +import lombok.Data; + +/** + * 鎻忚堪锛氱炕璇戣姹傚璞� + * + * @author ageerle@163.com + * date 2025/1/13 + */ + +@Data +public class TranslationRequest { + /** + * 鎻愮ず璇� + */ + private String prompt; + + /** + * 妯″瀷鍚嶇О + */ + private String model; + + /** + * 婧愯瑷� + */ + private String sourceLanguage; + + /** + * 鐩爣璇█ + */ + private String targetLanguage; + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ChatAppStoreVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ChatAppStoreVo.java new file mode 100644 index 0000000..ff46912 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ChatAppStoreVo.java @@ -0,0 +1,65 @@ +package org.ruoyi.system.domain.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.ruoyi.system.domain.ChatAppStore; + +import java.io.Serial; +import java.io.Serializable; + + + +/** + * 搴旂敤甯傚満瑙嗗浘瀵硅薄 + * + * @author Lion Li + * @date 2024-03-19 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = ChatAppStore.class) +public class ChatAppStoreVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + /** + * id + */ + @ExcelProperty(value = "id") + private Long id; + + /** + * 瑙掕壊鍚嶇О + */ + @ExcelProperty(value = "鍚嶇О") + private String name; + + /** + * 瑙掕壊鎻忚堪 + */ + @ExcelProperty(value = "鎻忚堪") + private String description; + + /** + * 澶村儚 + */ + @ExcelProperty(value = "澶村儚") + private String avatar; + + /** + * 闊抽鍦板潃 + */ + @ExcelProperty(value = "搴旂敤鍦板潃") + private String appUrl; + + /** + * 澶囨敞 + */ + @ExcelProperty(value = "澶囨敞") + private String remark; + + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/VoiceRoleVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/VoiceRoleVo.java deleted file mode 100644 index d843085..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/VoiceRoleVo.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.ruoyi.system.domain.vo; - -import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; -import com.alibaba.excel.annotation.ExcelProperty; -import io.github.linpeilie.annotations.AutoMapper; -import lombok.Data; -import org.ruoyi.system.domain.VoiceRole; - -import java.io.Serial; -import java.io.Serializable; - - - -/** - * 閰嶉煶瑙掕壊瑙嗗浘瀵硅薄 voice_role - * - * @author Lion Li - * @date 2024-03-19 - */ -@Data -@ExcelIgnoreUnannotated -@AutoMapper(target = VoiceRole.class) -public class VoiceRoleVo implements Serializable { - - @Serial - private static final long serialVersionUID = 1L; - - /** - * id - */ - @ExcelProperty(value = "id") - private Long id; - - /** - * 瑙掕壊鍚嶇О - */ - @ExcelProperty(value = "瑙掕壊鍚嶇О") - private String name; - - /** - * 瑙掕壊鎻忚堪 - */ - @ExcelProperty(value = "瑙掕壊鎻忚堪") - private String description; - - /** - * 澶村儚 - */ - @ExcelProperty(value = "澶村儚") - private String avatar; - - /** - * 瑙掕壊id - */ - @ExcelProperty(value = "瑙掕壊id") - private String voiceId; - - /** - * 闊抽鍦板潃 - */ - @ExcelProperty(value = "闊抽鍦板潃") - private String fileUrl; - - /** - * 闊抽棰勫鐞嗭紙瀹為獙鎬э級 - */ - @ExcelProperty(value = "闊抽棰勫鐞�") - private String preProcess; - - /** - * 澶囨敞 - */ - @ExcelProperty(value = "澶囨敞") - private String remark; - - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/CoverCallbackVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/CoverCallbackVo.java new file mode 100644 index 0000000..fe0cc46 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/CoverCallbackVo.java @@ -0,0 +1,24 @@ +package org.ruoyi.system.domain.vo.cover; + +import lombok.Data; + +/** + * 缈诲敱鍥炶皟VO + * + * @author NSL + * @since 2024-12-26 + */ +@Data +public class CoverCallbackVo { + /** 鏈璇锋眰鐨勮鍗曞彿 */ + private String orderId; + + /** 鐢ㄦ埛ID */ + private String userId; + + /** 鏈娑堣垂閲戦 */ + private String cost; + + /** 缈诲敱鍚庣殑URL */ + private String coverUrl; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/CoverParamVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/CoverParamVo.java new file mode 100644 index 0000000..b07909e --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/CoverParamVo.java @@ -0,0 +1,60 @@ +package org.ruoyi.system.domain.vo.cover; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * 缈诲敱姝屾洸鍏ュ弬 + * + * @author NSL + * @since 2024-12-25 + */ +@Data +public class CoverParamVo implements Serializable { + + /** + * 姝屾洸鍚嶇О + */ + @ExcelProperty(value = "姝屾洸鍚嶇О") + private String coverMusicName; + /** + * 姝屾洸鍦板潃 + */ + @ExcelProperty(value = "姝屾洸鍦板潃") + private String coverMusicUrl; + /** + * 姝屾墜鎬у埆 鏋氫妇 FEMALE 濂虫�� MALE 鐢锋�� + */ + @ExcelProperty(value = "姝屾墜鎬у埆") + private String coverSingerGender; + /** + * 姝屾墜濮撳悕 + */ + @ExcelProperty(value = "姝屾墜濮撳悕") + private String coverSingerName; + /** + * 鍙傝�冮煶棰戯細鐢ㄦ埛棣栨缈诲敱锛屽繀濉紱绗簩娆″強涔嬪悗缈诲敱锛氳嫢涓虹┖鍒欐部鐢ㄦ渶杩戜竴娆″弬鑰冮煶棰戣缁冩ā鍨嬶紝鑻ヤ笉涓虹┖鍒欎娇鐢ㄨ鍙傝�冮煶棰戣缁冩ā鍨嬨�� + * 鍙浼� + */ + @ExcelProperty(value = "鍙傝�冮煶棰�") + private List<String> promptAudioUrl; + /** + * 鐢ㄦ埛鎬у埆 FEMALE MALE + */ + @ExcelProperty(value = "鐢ㄦ埛鎬у埆") + private String userGender; + /** + * 鐢ㄦ埛id + */ + @ExcelProperty(value = "鐢ㄦ埛id") + private String userId; + + /** + * 涓氬姟涓婚敭id + */ + @ExcelProperty(value = "涓氬姟涓婚敭id") + private String orderId; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/CoverPromptAudioVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/CoverPromptAudioVo.java new file mode 100644 index 0000000..c6d554e --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/CoverPromptAudioVo.java @@ -0,0 +1,44 @@ +package org.ruoyi.system.domain.vo.cover; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.ruoyi.system.domain.Cover; + +import java.io.Serial; +import java.io.Serializable; + +/** + * 缈诲敱鐢ㄦ埛鍙傝�冮煶棰戣鍥惧璞� + * + * @author NSL + * @since 2024-12-25 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = Cover.class) +public class CoverPromptAudioVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + @ExcelProperty(value = "id") + private Long id; + /** + * 鐢ㄦ埛id + */ + @ExcelProperty(value = "鐢ㄦ埛id") + private Long userId; + /** + * 缈诲敱涓昏〃id + */ + @ExcelProperty(value = "缈诲敱涓昏〃id") + private Long coverId; + /** + * 缈诲敱鍚庣殑URL + */ + @ExcelProperty(value = "鍙傝�冮煶棰�") + private String promptAudioUrl; + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/CoverVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/CoverVo.java new file mode 100644 index 0000000..cffb757 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/CoverVo.java @@ -0,0 +1,68 @@ +package org.ruoyi.system.domain.vo.cover; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.github.linpeilie.annotations.AutoMapper; +import lombok.Data; +import org.ruoyi.system.domain.Cover; + +import java.io.Serial; +import java.io.Serializable; + +/** + * 缈诲敱瑙嗗浘瀵硅薄 + * + * @author NSL + * @date 2024-12-25 + */ +@Data +@ExcelIgnoreUnannotated +@AutoMapper(target = Cover.class) +public class CoverVo implements Serializable { + + @Serial + private static final long serialVersionUID = 1L; + + @ExcelProperty(value = "id") + private Long id; + /** + * 姝屾洸鍚嶇О + */ + @ExcelProperty(value = "姝屾洸鍚嶇О") + private String coverMusicName; + /** + * 姝屾洸鍦板潃 + */ + @ExcelProperty(value = "姝屾洸鍦板潃") + private String coverMusicUrl; + /** + * 姝屾墜鎬у埆 鏋氫妇 FEMALE 濂虫�� MALE 鐢锋�� + */ + @ExcelProperty(value = "姝屾墜鎬у埆") + private String coverSingerGender; + /** + * 姝屾墜濮撳悕 + */ + @ExcelProperty(value = "姝屾墜濮撳悕") + private String coverSingerName; + /** + * 鐢ㄦ埛鎬у埆 FEMALE MALE + */ + @ExcelProperty(value = "鐢ㄦ埛鎬у埆") + private String userGender; + /** + * 鐢ㄦ埛id + */ + @ExcelProperty(value = "鐢ㄦ埛id") + private Long userId; + /** + * 鏈娑堣垂閲戦 + */ + @ExcelProperty(value = "鏈娑堣垂閲戦") + private String cost; + /** + * 缈诲敱鍚庣殑URL + */ + @ExcelProperty(value = "缈诲敱鍚庣殑URL") + private String coverUrl; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/MusicVo.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/MusicVo.java new file mode 100644 index 0000000..5d96094 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/cover/MusicVo.java @@ -0,0 +1,35 @@ +package org.ruoyi.system.domain.vo.cover; + +import lombok.Data; + +/** + * @author NSL + * @since 2024-12-25 + */ +@Data +public class MusicVo { + /** + * 姝屾洸鍚嶇О + */ + private String musicName; + + /** + * 闊充箰鍦板潃 + */ + private String mp3Url; + + /** + * 姝屾洸鍥剧墖 + */ + private String pic; + + /** + * 姝屾墜鎴栦箰闃熷悕 + */ + private String singerName; + + /** + * 姝屾墜鎬у埆 + */ + private String singerGender; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptAllQueryDto.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptAllQueryDto.java new file mode 100644 index 0000000..cda0115 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptAllQueryDto.java @@ -0,0 +1,29 @@ +package org.ruoyi.system.domain.vo.ppt; + +import lombok.Data; + +/** + * 鏌ヨ鎵�鏈塒PT鍒楄〃鏌ヨ鍙傛暟 + * + * @author NSL + * @since 2024/12/31 + */ +@Data +public class PptAllQueryDto { + // 鍒嗛〉 + private Integer page; + // 姣忛〉澶у皬锛堟渶澶т笉瓒呰繃100锛� + private Integer size; + // ppt id锛堥潪蹇呭~锛� + private String id; + // 绗笁鏂圭敤鎴稩D锛堥潪蹇呭~锛� + private String uid; + // 妯℃澘ID锛堥潪蹇呭~锛� + private String templateId; + // 鍒涘缓寮�濮嬫椂闂达紙闈炲繀濉級 + private String startDate; + // 鍒涘缓缁撴潫鏃堕棿锛堥潪蹇呭~锛� + private String endDate; + // 鎸夋椂闂村�掑簭杩斿洖锛堥潪蹇呭~锛� + private boolean desc; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptGenerateContentDto.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptGenerateContentDto.java new file mode 100644 index 0000000..82bc517 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptGenerateContentDto.java @@ -0,0 +1,27 @@ +package org.ruoyi.system.domain.vo.ppt; + +import lombok.Data; + +/** + * 鐢熸垚澶х翰鍐呭鍙傛暟 + * + * @author NSL + * @since 2024/12/31 + */ +@Data +public class PptGenerateContentDto { + // 妯℃澘ID锛堥潪蹇呭~锛� + private String templateId; + + // 澶х翰 markdown 鏂囨湰 + private String outlineMarkdown; + + // 寮傛鐢熸垚PPT锛堣繖閲屽繀椤讳负 true 鎵嶄細娴佸紡鐢熸垚锛� + private boolean asyncGenPptx = false; + + // 鐢ㄦ埛瑕佹眰 + private String prompt; + + // 鏂囦欢鏁版嵁url锛岃皟鐢ㄨВ鏋愭枃浠跺唴瀹规帴鍙h繑鍥� + private String dataUrl; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptGenerateOutlineDto.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptGenerateOutlineDto.java new file mode 100644 index 0000000..bb54754 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptGenerateOutlineDto.java @@ -0,0 +1,25 @@ +package org.ruoyi.system.domain.vo.ppt; + +import lombok.Data; + +/** + * 鐢熸垚PPT澶х翰鍙傛暟 + * + * @author NSL + * @since 2024/12/31 + */ +@Data +public class PptGenerateOutlineDto { + // 鏄惁娴佸紡鐢熸垚锛堥粯璁ゆ祦寮忥級 + private boolean stream = true; + // 绡囧箙闀垮害锛歴hort/medium/long, 榛樿 medium, 鍒嗗埆瀵瑰簲: 10-15椤�/20-30椤�/25-35椤� + private String length = "medium"; + // 璇█: zh/zh-Hant/en/ja/ko/ar/de/fr/it/pt/es/ru + private String lang; + // 鐢ㄦ埛瑕佹眰锛堝皬浜�50瀛楋級 + private String prompt; + // 鏂瑰紡涓�锛氶�氳繃涓婚鍒涘缓 涓婚锛堜笌dataUrl鍙悓鏃跺瓨鍦級 + private String subject; + // 鏂瑰紡浜岋細閫氳繃鏂囦欢鍐呭鍒涘缓 鏂囦欢鏁版嵁url锛岄�氳繃瑙f瀽鏂囦欢鍐呭鎺ュ彛杩斿洖锛堜笌subject鍙悓鏃跺瓨鍦級 + private String dataUrl; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptGeneratePptxDto.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptGeneratePptxDto.java new file mode 100644 index 0000000..427e9d6 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptGeneratePptxDto.java @@ -0,0 +1,24 @@ +package org.ruoyi.system.domain.vo.ppt; + +import lombok.Data; + +/** + * 鐢熸垚PPT鍙傛暟 + * + * @author NSL + * @since 2024/12/31 + */ +@Data +public class PptGeneratePptxDto { + // 妯℃澘ID锛堥潪蹇呭~锛� + private String templateId; + + // 鏄惁杩斿洖PPT鏁版嵁缁撴瀯 + private boolean pptxProperty; + + // 澶х翰鍐呭markdown + private String outlineContentMarkdown; + + // 澶囨敞锛圥PT椤甸潰澶囨敞锛岄潪蹇呭~锛屾暟缁� ["鍐呭椤甸潰涓�澶囨敞", "鍐呭椤甸潰浜屽娉�"]锛� + private String notes; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptTemplateFilterDto.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptTemplateFilterDto.java new file mode 100644 index 0000000..2c44146 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptTemplateFilterDto.java @@ -0,0 +1,24 @@ +package org.ruoyi.system.domain.vo.ppt; + +import lombok.Data; + +/** + * PPT妯℃澘绛涢�夋煡璇㈠弬鏁� + * + * @author NSL + * @since 2024/12/31 + */ +@Data +public class PptTemplateFilterDto { + // 妯℃澘绫诲瀷锛堝繀浼狅級锛�1绯荤粺妯℃澘銆�4鐢ㄦ埛鑷畾涔夋ā鏉� + private Integer type; + + // 绫荤洰绛涢�� ['骞寸粓鎬荤粨', '鏁欒偛鍩硅', '鍖诲鍖荤枟', '鍟嗕笟璁″垝涔�', '浼佷笟浠嬬粛', '姣曚笟绛旇京', '钀ラ攢鎺ㄥ箍', '鏅氫細琛ㄥ桨', '涓汉绠�鍘�'] + private String category; + + // 椋庢牸绛涢�� ['鎵佸钩绠�绾�', '鍟嗗姟绉戞妧', '鏂囪壓娓呮柊', '鍗¢�氭墜缁�', '涓浗椋�', '鍒涙剰鏃跺皻', '鍒涙剰瓒e懗'] + private String style; + + // 涓婚棰滆壊绛涢�� ['#FA920A', '#589AFD', '#7664FA', '#65E5EC', '#61D328', '#F5FD59', '#E05757', '#8F5A0B', '#FFFFFF', '#000000'] + private String themeColor; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptTemplateQueryDto.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptTemplateQueryDto.java new file mode 100644 index 0000000..c219984 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/domain/vo/ppt/PptTemplateQueryDto.java @@ -0,0 +1,19 @@ +package org.ruoyi.system.domain.vo.ppt; + +import lombok.Data; + +/** + * 鍒嗛〉鏌ヨ PPT 妯℃澘鏌ヨ鍙傛暟 + * + * @author NSL + * @since 2024/12/31 + */ +@Data +public class PptTemplateQueryDto { + // 鍒嗛〉 + private Integer page; + // 姣忛〉澶у皬锛堟渶澶т笉瓒呰繃100锛� + private Integer size; + // 妯″瀷绛涢�夊弬鏁� + private PptTemplateFilterDto filters; +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/MyMsgHandler.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/MyMsgHandler.java new file mode 100644 index 0000000..26936ed --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/MyMsgHandler.java @@ -0,0 +1,230 @@ +package org.ruoyi.system.handler; + +import com.jfinal.kit.PropKit; +import org.ruoyi.common.chat.domain.request.ChatRequest; +import org.ruoyi.common.chat.entity.chat.ChatCompletion; +import org.ruoyi.common.chat.entity.images.Item; +import org.ruoyi.common.wechat.itchat4j.beans.BaseMsg; +import org.ruoyi.common.wechat.itchat4j.core.CoreManage; +import org.ruoyi.common.wechat.itchat4j.face.IMsgHandlerFace; +import org.ruoyi.common.wechat.itchat4j.utils.LogInterface; +import org.ruoyi.common.wechat.itchat4j.utils.enums.SendMsgType; +import org.ruoyi.common.wechat.itchat4j.utils.tools.CommonTools; +import org.ruoyi.common.wechat.web.constant.ConfigKeys; +import org.ruoyi.common.wechat.web.model.WxRobConfig; +import org.ruoyi.common.wechat.web.model.WxRobKeyword; +import org.ruoyi.system.domain.vo.WxRobConfigVo; +import org.ruoyi.system.service.ISseService; +import org.apache.commons.lang3.StringUtils; + +import java.io.File; +import java.util.List; +import java.util.regex.Matcher; + +/** + * 娑堟伅澶勭悊瀹炵幇 榛樿鏂规 + * @author WesleyOne + * @create 2018/12/11 + */ +public class MyMsgHandler implements IMsgHandlerFace,LogInterface { + private String uniqueKey; + private final ISseService sseService; + private WxRobConfigVo robConfigVo; + + public MyMsgHandler(String uniqueKey,ISseService sseService,WxRobConfigVo robConfigVo){ + this.uniqueKey = uniqueKey; + this.sseService = sseService; + this.robConfigVo = robConfigVo; + } + + private String getDownloadPath(String fileName) { + String download_path = PropKit.get("download_path"); + return download_path+ File.separator + uniqueKey +File.separator + fileName; + } + + @Override + public void textMsgHandle(BaseMsg msg) { + String fromNickName = msg.getFromNickName(); + String fromUserName = msg.getFromUserName(); + boolean groupMsg = msg.isGroupMsg(); + String text = msg.getText().trim(); + + if (groupMsg && text.contains("@" + fromNickName)) { + handleGroupMessage(fromNickName, fromUserName, text); + } else { + respondWithChatGPT(fromUserName, text); + } + } + + private void handleGroupMessage(String fromNickName, String fromUserName, String text) { + String prompt = text.replace("@" + fromNickName + " ", ""); + if (prompt.startsWith("鐢�")) { + generateAndSendImage(fromUserName, prompt.replaceFirst("鐢� ", "")); + } else { + respondWithChatGPT(fromUserName, prompt); + } + } + + private void generateAndSendImage(String fromUserName, String prompt) { + List<Item> items = sseService.wxDall(prompt,robConfigVo.getUserId().toString()); + WxRobKeyword robKeyword = new WxRobKeyword(); + robKeyword.setTypeData(SendMsgType.IMG.toValue()); + robKeyword.setValueData(items.get(0).getUrl()); + sendDataByType(fromUserName, robKeyword); + } + + + + private void respondWithChatGPT(String fromUserName, String prompt) { + ChatRequest chatBO = new ChatRequest(); + //chatBO.setPrompt(prompt); + chatBO.setModel(ChatCompletion.Model.GPT_3_5_TURBO.getName()); + String chat = sseService.chat(chatBO,robConfigVo.getUserId().toString()); + WxRobKeyword robKeyword = new WxRobKeyword(); + robKeyword.setTypeData(SendMsgType.TEXT.toValue()); + robKeyword.setValueData(chat); + sendDataByType(fromUserName, robKeyword); + } + + private boolean sendDataByType(String fromUserName, WxRobKeyword robKeyword) { + String data; + String type; + if (robKeyword != null){ + data = robKeyword.getValueData(); + type = robKeyword.getTypeData(); + CoreManage.addSendMsg4UserName(uniqueKey,fromUserName,data,SendMsgType.fromValue(type)); + return true; + } + return false; + } + + + @Override + public void sysMsgHandle(BaseMsg msg) { + String fromNickName = msg.getFromNickName(); + String fromUserName = msg.getFromUserName(); + boolean groupMsg = msg.isGroupMsg(); + + /** + * 缇ら噷鐨勬柊浜鸿繘缇ゆ秷鎭鐞� + * 浼樺厛鍙戜笓闂ㄨ繖涓兢鐨勬杩庤瘝 + * 娌℃湁鍙戦�氱敤鐨� + * 娆㈣繋璇嶅唴瀹瑰疄璐ㄥ氨鏄湪鏈�鍓嶉潰鍔犱笂@鏄电О\n + * + * 娆㈣繋璇嶇殑鍏抽敭瀛� + * @see ConfigKeys#DEAFAULT_WELCOME + */ + + // 瑙f瀽鏂颁汉鍚嶅瓧 + String text = msg.getContent(); + String newNickName = ""; + Matcher matcher = CommonTools.getMatcher("閭�璇穃"(.+?)\"鍔犲叆浜嗙兢鑱�", text); + if (matcher.find()){ + newNickName = matcher.group(1); + }else{ + matcher = CommonTools.getMatcher("\"(.+?)\"閫氳繃鎵弿(.+?)鍒嗕韩鐨勪簩缁寸爜鍔犲叆缇よ亰", text); + if (matcher.find()){ + newNickName = matcher.group(1); + } + } + + if (StringUtils.isNotEmpty(newNickName)){ + + WxRobConfig robConfig = WxRobConfig.dao.findFirst("SELECT * FROM wx_rob_config WHERE unique_key = ? LIMIT 1", uniqueKey); + if(robConfig != null && robConfig.getEnable()){ + // 鍒ゆ柇鏄惁瑕佸洖澶� + boolean isOpen = false; + // 鍒ゆ柇鏄兢鑱婄殑璇濇槸鍚﹀厑璁稿洖澶� 鏄电О鍏抽敭瀛� + if (robConfig.getToGroup() && groupMsg){ + isOpen = true; + } + if (isOpen){ + WxRobKeyword robKeyword = WxRobKeyword.dao.findFirst("SELECT * FROM wx_rob_keyword WHERE unique_key = ? AND key_data = ? AND nick_name = ? AND enable = 1 AND to_group = ? ORDER BY id DESC LIMIT 1", uniqueKey, ConfigKeys.DEAFAULT_WELCOME,fromNickName,msg.isGroupMsg()?1:0); + if (sendSysWelcomeMsg(fromUserName, newNickName, robKeyword)){ return;} + } + + // 娌℃湁涓撻棬鐨勫叧閿瓧锛屽垯浣跨敤榛樿鍏抽敭瀛� + isOpen = false; + // 鍒ゆ柇鏄兢鑱婄殑璇濇槸鍚﹀厑璁稿洖澶� 鏄电О鍏抽敭瀛� + if (robConfig.getDefaultGroup() && groupMsg){ + isOpen = true; + } + if (isOpen){ + WxRobKeyword defaultRobKeyword = WxRobKeyword.dao.findFirst("SELECT * FROM wx_rob_keyword WHERE unique_key = ? AND key_data = ? AND nick_name = ? AND enable = 1 AND to_group = ? ORDER BY id DESC LIMIT 1", uniqueKey, ConfigKeys.DEAFAULT_WELCOME, ConfigKeys.DEAFAULT_KEYWORD,msg.isGroupMsg()?1:0); + if (sendSysWelcomeMsg(fromUserName, newNickName, defaultRobKeyword)){ return;} + } + } + } + + } + + /** + * 鍙戦�佹杩庡唴瀹� + * @param fromUserName + * @param newNickName + * @param robKeyword + * @return + */ + private boolean sendSysWelcomeMsg(String fromUserName, String newNickName, WxRobKeyword robKeyword) { + if (robKeyword != null){ + if (robKeyword.getTypeData().equals(SendMsgType.TEXT.toValue())){ + robKeyword.setValueData(String.format("@%s\n%s",newNickName,robKeyword.getValueData())); + } + if (sendDataByType(fromUserName, robKeyword)) { + return true; + } + } + return false; + } + + @Override + public void picMsgHandle(BaseMsg msg) { +// // 杩欓噷浣跨敤鏀跺埌鍥剧墖鐨勬椂闂翠綔涓烘枃浠跺悕 +// String fileName = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(new Date()) + ".jpg"; +// // 淇濆瓨鍥剧墖鐨勮矾寰� +// String picPath = getDownloadPath(fileName); +// // 璋冪敤姝ゆ柟娉曟潵淇濆瓨鍥剧墖 +// DownloadTools.getDownloadFn(msg, MsgTypeEnum.PIC.getType(), picPath, this.uniqueKey); +// CoreManage.addSendMsg4UserName(uniqueKey,msg.getFromUserName(),"鍥剧墖淇濆瓨鎴愬姛",SendMsgType.TEXT); + return; + } + + @Override + public void voiceMsgHandle(BaseMsg msg) { +// // 杩欓噷浣跨敤鏀跺埌璇煶鐨勬椂闂翠綔涓烘枃浠跺悕 +// String fileName = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(new Date()) + ".mp3"; +// // 淇濆瓨璇煶鐨勮矾寰� +// String voicePath = getDownloadPath(fileName); +// // 璋冪敤姝ゆ柟娉曟潵淇濆瓨璇煶 +// DownloadTools.getDownloadFn(msg, MsgTypeEnum.VOICE.getType(), voicePath, this.uniqueKey); +// CoreManage.addSendMsg4UserName(uniqueKey,msg.getFromUserName(),"澹伴煶淇濆瓨鎴愬姛",SendMsgType.TEXT); + return; + } + + @Override + public void videoMsgHandle(BaseMsg msg) { +// // 杩欓噷浣跨敤鏀跺埌灏忚棰戠殑鏃堕棿浣滀负鏂囦欢鍚� +// String fileName = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(new Date()) + ".mp4"; +// // 淇濆瓨灏忚棰戠殑璺緞 +// String viedoPath = getDownloadPath(fileName); +// // 璋冪敤姝ゆ柟娉曟潵淇濆瓨灏忚棰� +// DownloadTools.getDownloadFn(msg, MsgTypeEnum.VIEDO.getType(), viedoPath,this.uniqueKey); +// CoreManage.addSendMsg4UserName(uniqueKey,msg.getFromUserName(),"瑙嗛淇濆瓨鎴愬姛",SendMsgType.TEXT); + return; + } + + @Override + public void nameCardMsgHandle(BaseMsg msg) { + return ; + } + + @Override + public void verifyAddFriendMsgHandle(BaseMsg msg) { + return ; + } + + @Override + public void mediaMsgHandle(BaseMsg msg) { + return ; + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/AbstractHandler.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/AbstractHandler.java new file mode 100644 index 0000000..fa2ad94 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/AbstractHandler.java @@ -0,0 +1,9 @@ +package org.ruoyi.system.handler.wxcp; + +import me.chanjar.weixin.cp.message.WxCpMessageHandler; + +/** + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +public abstract class AbstractHandler implements WxCpMessageHandler { +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/ContactChangeHandler.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/ContactChangeHandler.java new file mode 100644 index 0000000..7beb820 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/ContactChangeHandler.java @@ -0,0 +1,33 @@ +package org.ruoyi.system.handler.wxcp; + + +import lombok.extern.slf4j.Slf4j; +import me.chanjar.weixin.common.session.WxSessionManager; +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage; +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage; +import org.ruoyi.common.core.utils.JsonUtils; +import org.ruoyi.system.builder.TextBuilder; +import org.springframework.stereotype.Component; + +import java.util.Map; + +/** + * 閫氳褰曞彉鏇翠簨浠跺鐞嗗櫒. + * + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +@Slf4j +@Component +public class ContactChangeHandler extends AbstractHandler { + + @Override + public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService cpService, + WxSessionManager sessionManager) { + String content = "鏀跺埌閫氳褰曞彉鏇翠簨浠讹紝鍐呭锛�" + JsonUtils.toJson(wxMessage); + log.info(content); + + return new TextBuilder().build(content, wxMessage, cpService); + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/EnterAgentHandler.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/EnterAgentHandler.java new file mode 100644 index 0000000..82806aa --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/EnterAgentHandler.java @@ -0,0 +1,29 @@ +package org.ruoyi.system.handler.wxcp; + +import lombok.extern.slf4j.Slf4j; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.session.WxSessionManager; +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage; +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage; + +import java.util.Map; + +/** + * <pre> + * + * Created by Binary Wang on 2018/8/27. + * </pre> + * + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +@Slf4j +public class EnterAgentHandler extends AbstractHandler { + private static final int TEST_AGENT = 1000002; + + @Override + public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService wxCpService, WxSessionManager sessionManager) throws WxErrorException { + // do something + return null; + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/LocationHandler.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/LocationHandler.java new file mode 100644 index 0000000..4569617 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/LocationHandler.java @@ -0,0 +1,44 @@ +package org.ruoyi.system.handler.wxcp; + +import lombok.extern.slf4j.Slf4j; +import me.chanjar.weixin.common.api.WxConsts; +import me.chanjar.weixin.common.session.WxSessionManager; +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage; +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage; +import org.ruoyi.system.builder.TextBuilder; +import org.springframework.stereotype.Component; + +import java.util.Map; + +/** + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +@Slf4j +@Component +public class LocationHandler extends AbstractHandler { + + @Override + public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService cpService, + WxSessionManager sessionManager) { + if (wxMessage.getMsgType().equals(WxConsts.XmlMsgType.LOCATION)) { + //TODO 鎺ユ敹澶勭悊鐢ㄦ埛鍙戦�佺殑鍦扮悊浣嶇疆娑堟伅 + try { + String content = "鎰熻阿鍙嶉锛屾偍鐨勭殑鍦扮悊浣嶇疆宸叉敹鍒帮紒"; + return new TextBuilder().build(content, wxMessage, null); + } catch (Exception e) { + log.error("浣嶇疆娑堟伅鎺ユ敹澶勭悊澶辫触", e); + return null; + } + } + + //涓婃姤鍦扮悊浣嶇疆浜嬩欢 + log.info("\n涓婃姤鍦扮悊浣嶇疆锛岀含搴� : {}\n缁忓害 : {}\n绮惧害 : {}", + wxMessage.getLatitude(), wxMessage.getLongitude(), String.valueOf(wxMessage.getPrecision())); + + //TODO 鍙互灏嗙敤鎴峰湴鐞嗕綅缃俊鎭繚瀛樺埌鏈湴鏁版嵁搴擄紝浠ヤ究浠ュ悗浣跨敤 + + return null; + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/LogHandler.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/LogHandler.java new file mode 100644 index 0000000..af32e16 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/LogHandler.java @@ -0,0 +1,26 @@ +package org.ruoyi.system.handler.wxcp; + +import lombok.extern.slf4j.Slf4j; +import me.chanjar.weixin.common.session.WxSessionManager; +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage; +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage; +import org.ruoyi.common.core.utils.JsonUtils; +import org.springframework.stereotype.Component; + +import java.util.Map; + +/** + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +@Slf4j +@Component +public class LogHandler extends AbstractHandler { + @Override + public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService cpService, + WxSessionManager sessionManager) { + log.info("\n鎺ユ敹鍒拌姹傛秷鎭紝鍐呭锛歿}", JsonUtils.toJson(wxMessage)); + return null; + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/MenuHandler.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/MenuHandler.java new file mode 100644 index 0000000..fe4617d --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/MenuHandler.java @@ -0,0 +1,34 @@ +package org.ruoyi.system.handler.wxcp; + +import me.chanjar.weixin.common.api.WxConsts.MenuButtonType; +import me.chanjar.weixin.common.session.WxSessionManager; +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage; +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage; +import org.springframework.stereotype.Component; + +import java.util.Map; + +/** + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +@Component +public class MenuHandler extends AbstractHandler { + + @Override + public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService cpService, + WxSessionManager sessionManager) { + + String msg = String.format("type:%s, event:%s, key:%s", + wxMessage.getMsgType(), wxMessage.getEvent(), + wxMessage.getEventKey()); + if (MenuButtonType.VIEW.equals(wxMessage.getEvent())) { + return null; + } + + return WxCpXmlOutMessage.TEXT().content(msg) + .fromUser(wxMessage.getToUserName()).toUser(wxMessage.getFromUserName()) + .build(); + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/MsgHandler.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/MsgHandler.java new file mode 100644 index 0000000..155f042 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/MsgHandler.java @@ -0,0 +1,44 @@ +package org.ruoyi.system.handler.wxcp; + +import lombok.RequiredArgsConstructor; +import me.chanjar.weixin.common.api.WxConsts; +import me.chanjar.weixin.common.session.WxSessionManager; +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage; +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage; +import org.ruoyi.system.builder.TextBuilder; +import org.ruoyi.system.service.ISseService; +import org.springframework.stereotype.Component; + +import java.util.Map; + +/** + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +@Component +@RequiredArgsConstructor +public class MsgHandler extends AbstractHandler { + + private final ISseService sseService; + + + + @Override + public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService cpService, + WxSessionManager sessionManager) { + final String msgType = wxMessage.getMsgType(); + if (msgType == null) { + // 濡傛灉msgType娌℃湁锛屽氨鑷繁鏍规嵁鍏蜂綋鎶ユ枃鍐呭鍋氬鐞� + } + + if (!msgType.equals(WxConsts.XmlMsgType.EVENT)) { + //TODO 鍙互閫夋嫨灏嗘秷鎭繚瀛樺埌鏈湴 + } + //TODO 缁勮鍥炲娑堟伅 + String content = sseService.wxCpChat(wxMessage.getContent()); + + return new TextBuilder().build(content, wxMessage, cpService); + + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/NullHandler.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/NullHandler.java new file mode 100644 index 0000000..b755444 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/NullHandler.java @@ -0,0 +1,23 @@ +package org.ruoyi.system.handler.wxcp; + +import me.chanjar.weixin.common.session.WxSessionManager; +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage; +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage; +import org.springframework.stereotype.Component; + +import java.util.Map; + +/** + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +@Component +public class NullHandler extends AbstractHandler { + + @Override + public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService cpService, + WxSessionManager sessionManager) { + return null; + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/ScanHandler.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/ScanHandler.java new file mode 100644 index 0000000..8a797a1 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/ScanHandler.java @@ -0,0 +1,8 @@ +package org.ruoyi.system.handler.wxcp; + +/** + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +public abstract class ScanHandler extends AbstractHandler { + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/SubscribeHandler.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/SubscribeHandler.java new file mode 100644 index 0000000..6146c00 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/SubscribeHandler.java @@ -0,0 +1,63 @@ +package org.ruoyi.system.handler.wxcp; + +import lombok.extern.slf4j.Slf4j; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.session.WxSessionManager; +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.bean.WxCpUser; +import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage; +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage; +import org.ruoyi.system.builder.TextBuilder; +import org.springframework.stereotype.Component; + +import java.util.Map; + +/** + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +@Slf4j +@Component +public class SubscribeHandler extends AbstractHandler { + + @Override + public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService cpService, + WxSessionManager sessionManager) throws WxErrorException { + + log.info("鏂板叧娉ㄧ敤鎴� OPENID: " + wxMessage.getFromUserName()); + + // 鑾峰彇寰俊鐢ㄦ埛鍩烘湰淇℃伅 + WxCpUser userWxInfo = cpService.getUserService().getById(wxMessage.getFromUserName()); + + if (userWxInfo != null) { + // TODO 鍙互娣诲姞鍏虫敞鐢ㄦ埛鍒版湰鍦� + } + + WxCpXmlOutMessage responseResult = null; + try { + responseResult = handleSpecial(wxMessage); + } catch (Exception e) { + log.error(e.getMessage(), e); + } + + if (responseResult != null) { + return responseResult; + } + + try { + return new TextBuilder().build("鎰熻阿鍏虫敞", wxMessage, cpService); + } catch (Exception e) { + log.error(e.getMessage(), e); + } + + return null; + } + + /** + * 澶勭悊鐗规畩璇锋眰锛屾瘮濡傚鏋滄槸鎵爜杩涙潵鐨勶紝鍙互鍋氱浉搴斿鐞� + */ + private WxCpXmlOutMessage handleSpecial(WxCpXmlMessage wxMessage) { + //TODO + return null; + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/UnsubscribeHandler.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/UnsubscribeHandler.java new file mode 100644 index 0000000..b89713f --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/handler/wxcp/UnsubscribeHandler.java @@ -0,0 +1,28 @@ +package org.ruoyi.system.handler.wxcp; + +import lombok.extern.slf4j.Slf4j; +import me.chanjar.weixin.common.session.WxSessionManager; +import me.chanjar.weixin.cp.api.WxCpService; +import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage; +import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage; +import org.springframework.stereotype.Component; + +import java.util.Map; + +/** + * @author <a href="https://github.com/binarywang">Binary Wang</a> + */ +@Slf4j +@Component +public class UnsubscribeHandler extends AbstractHandler { + + @Override + public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService cpService, + WxSessionManager sessionManager) { + String openId = wxMessage.getFromUserName(); + log.info("鍙栨秷鍏虫敞鐢ㄦ埛 OPENID: " + openId); + // TODO 鍙互鏇存柊鏈湴鏁版嵁搴撲负鍙栨秷鍏虫敞鐘舵�� + return null; + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/listener/SSEEventSourceListener.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/listener/SSEEventSourceListener.java index 7c35d57..787cba4 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/listener/SSEEventSourceListener.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/listener/SSEEventSourceListener.java @@ -104,8 +104,8 @@ if(completionResponse == null || CollectionUtil.isEmpty(completionResponse.getChoices())){ return; } - String content = "completionResponse.getChoices().get(0).getDelta().getContent()"; - if(StringUtils.isEmpty(content)){ + Object content = completionResponse.getChoices().get(0).getDelta().getContent(); + if(content == null){ return; } if(StringUtils.isEmpty(modelName)){ diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/mapper/ChatAppStoreMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/mapper/ChatAppStoreMapper.java new file mode 100644 index 0000000..db27f68 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/mapper/ChatAppStoreMapper.java @@ -0,0 +1,15 @@ +package org.ruoyi.system.mapper; + +import org.ruoyi.common.mybatis.core.mapper.BaseMapperPlus; +import org.ruoyi.system.domain.ChatAppStore; +import org.ruoyi.system.domain.vo.ChatAppStoreVo; + +/** + * 搴旂敤甯傚満Mapper鎺ュ彛 + * + * @author Lion Li + * @date 2024-03-19 + */ +public interface ChatAppStoreMapper extends BaseMapperPlus<ChatAppStore, ChatAppStoreVo> { + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/mapper/CoverMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/mapper/CoverMapper.java new file mode 100644 index 0000000..1a6f792 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/mapper/CoverMapper.java @@ -0,0 +1,15 @@ +package org.ruoyi.system.mapper; + +import org.ruoyi.common.mybatis.core.mapper.BaseMapperPlus; +import org.ruoyi.system.domain.Cover; +import org.ruoyi.system.domain.vo.cover.CoverVo; + +/** + * 缈诲敱Mapper鎺ュ彛 + * + * @author NSL + * @since 2024-12-25 + */ +public interface CoverMapper extends BaseMapperPlus<Cover, CoverVo> { + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/mapper/CoverPromptAudioMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/mapper/CoverPromptAudioMapper.java new file mode 100644 index 0000000..2bf27ec --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/mapper/CoverPromptAudioMapper.java @@ -0,0 +1,23 @@ +package org.ruoyi.system.mapper; + +import org.ruoyi.common.mybatis.core.mapper.BaseMapperPlus; +import org.ruoyi.system.domain.CoverPromptAudio; +import org.ruoyi.system.domain.vo.cover.CoverPromptAudioVo; + +import java.util.List; + +/** + * 缈诲敱鐢ㄦ埛鍙傝�冮煶棰慚apper鎺ュ彛 + * + * @author NSL + * @since 2024-12-25 + */ +public interface CoverPromptAudioMapper extends BaseMapperPlus<CoverPromptAudio, CoverPromptAudioVo> { + + /** + * 鑾峰彇鏈�杩戜竴娆$炕鍞辫褰� + * @param userId 鐢ㄦ埛id + * @return 缈诲敱璁板綍 + */ + List<CoverPromptAudioVo> selectLatestVoByUserId(Long userId); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/mapper/VoiceRoleMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/mapper/VoiceRoleMapper.java deleted file mode 100644 index bd7e22e..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/mapper/VoiceRoleMapper.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.ruoyi.system.mapper; - -import org.ruoyi.common.mybatis.core.mapper.BaseMapperPlus; -import org.ruoyi.system.domain.VoiceRole; -import org.ruoyi.system.domain.vo.VoiceRoleVo; - -/** - * 閰嶉煶瑙掕壊Mapper鎺ュ彛 - * - * @author Lion Li - * @date 2024-03-19 - */ -public interface VoiceRoleMapper extends BaseMapperPlus<VoiceRole, VoiceRoleVo> { - -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/response/rolelist/ChatAppStoreVO.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/response/rolelist/ChatAppStoreVO.java new file mode 100644 index 0000000..0d22f20 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/response/rolelist/ChatAppStoreVO.java @@ -0,0 +1,19 @@ +package org.ruoyi.system.response.rolelist; + +import lombok.Data; + +@Data +public class ChatAppStoreVO { + + + private String name; + + private String description; + + private String voicesId; + + private String avatar; + + private String appUrl; + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/response/rolelist/RoleListVO.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/response/rolelist/RoleListVO.java deleted file mode 100644 index cff2472..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/response/rolelist/RoleListVO.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.ruoyi.system.response.rolelist; - -import lombok.Data; - -/** - * 鎻忚堪锛� - * - * @author ageerle@163.com - * date 2024/4/27 - */ -@Data -public class RoleListVO { - - - private String name; - - private String description; - - private String voicesId; - - private String avatar; - - private String previewAudio; - - public RoleListVO(String name, String description, String voicesId, String previewAudio,String avatar) { - this.name = name; - this.description = description; - this.voicesId = voicesId; - this.previewAudio = previewAudio; - this.avatar = avatar; - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/IChatAppStoreService.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/IChatAppStoreService.java new file mode 100644 index 0000000..44b4967 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/IChatAppStoreService.java @@ -0,0 +1,71 @@ +package org.ruoyi.system.service; + +import org.ruoyi.system.domain.vo.ChatAppStoreVo; +import org.ruoyi.system.domain.bo.ChatAppStoreBo; +import org.ruoyi.common.mybatis.core.page.TableDataInfo; +import org.ruoyi.common.mybatis.core.page.PageQuery; +import org.ruoyi.system.request.RoleListDto; +import org.ruoyi.system.request.RoleRequest; +import org.ruoyi.system.request.SimpleGenerateRequest; +import org.ruoyi.system.response.SimpleGenerateDataResponse; +import org.ruoyi.system.response.rolelist.ChatAppStoreVO; + +import java.util.Collection; +import java.util.List; + +/** + * 搴旂敤甯傚満Service鎺ュ彛 + * + * @author Lion Li + * @date 2024-03-19 + */ +public interface IChatAppStoreService { + + /** + * 鏌ヨ搴旂敤甯傚満 + */ + ChatAppStoreVo queryById(Long id); + + /** + * 鏌ヨ搴旂敤甯傚満鍒楄〃 + */ + TableDataInfo<ChatAppStoreVo> queryPageList(ChatAppStoreBo bo, PageQuery pageQuery); + + /** + * 鏌ヨ搴旂敤甯傚満鍒楄〃 + */ + List<ChatAppStoreVo> queryList(ChatAppStoreBo bo); + + /** + * 鏂板搴旂敤甯傚満 + */ + Boolean insertByBo(RoleRequest roleRequest); + + /** + * 鐢熸垚闊抽 + */ + SimpleGenerateDataResponse simpleGenerate(SimpleGenerateRequest simpleGenerateRequest); + + /** + * 淇敼搴旂敤甯傚満 + */ + Boolean updateByBo(ChatAppStoreBo bo); + + /** + * 鏍¢獙骞舵壒閲忓垹闄ゅ簲鐢ㄥ競鍦轰俊鎭� + */ + Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); + + /** + * 鏌ヨ甯傚満瑙掕壊 + * + * @return 瑙掕壊鍒楄〃 + */ + List<ChatAppStoreVO> roleList(); + + /** + * 鏀惰棌甯傚満瑙掕壊 + * + */ + void copyRole(RoleListDto roleListDto); +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/ICoverPromptAudioService.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/ICoverPromptAudioService.java new file mode 100644 index 0000000..d610a68 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/ICoverPromptAudioService.java @@ -0,0 +1,11 @@ +package org.ruoyi.system.service; + +/** + * 缈诲敱鐢ㄦ埛鍙傝�冮煶棰慡ervice鎺ュ彛 + * + * @author NSL + * @since 2024-12-25 + */ +public interface ICoverPromptAudioService { + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/ICoverService.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/ICoverService.java new file mode 100644 index 0000000..f6c22bd --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/ICoverService.java @@ -0,0 +1,49 @@ +package org.ruoyi.system.service; + +import org.ruoyi.common.mybatis.core.page.PageQuery; +import org.ruoyi.common.mybatis.core.page.TableDataInfo; +import org.ruoyi.system.domain.vo.cover.CoverCallbackVo; +import org.ruoyi.system.domain.vo.cover.CoverParamVo; +import org.ruoyi.system.domain.vo.cover.CoverVo; +import org.ruoyi.system.domain.vo.cover.MusicVo; + +import java.util.List; + +/** + * 缈诲敱Service鎺ュ彛 + * + * @author NSL + * @since 2024-12-25 + */ +public interface ICoverService { + + /** + * 鏌ユ壘姝屾洸 + * + * @param musicName 姝屾洸鍚嶇О + * @return 鍖归厤鐨勬瓕鏇蹭俊鎭泦鍚� + */ + List<MusicVo> searchMusic(String musicName); + + /** + * 缈诲敱鍥炶皟 + * + * @param coverCallbackVo 鍥炶皟淇℃伅 + */ + void callback(CoverCallbackVo coverCallbackVo); + + /** + * 缈诲敱姝屾洸 + * + * @param coverParamVo 缈诲敱淇℃伅 + */ + void saveCoverTask(CoverParamVo coverParamVo); + + /** + * 鏌ヨ鐢ㄦ埛鐨勭炕鍞辫褰� + * + * @return 缈诲敱璁板綍 + */ + TableDataInfo<CoverVo> searchCoverRecord(PageQuery pageQuery); + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/IPptService.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/IPptService.java new file mode 100644 index 0000000..eb284ab --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/IPptService.java @@ -0,0 +1,63 @@ +package org.ruoyi.system.service; + +import com.alibaba.fastjson.JSONObject; +import org.ruoyi.system.domain.vo.ppt.*; +import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; + +/** + * AI_PPT Service鎺ュ彛 + * + * @author NSL + * @since 2024-12-30 + */ +public interface IPptService { + /** + * 鍚屾娴佸紡鐢熸垚 PPT + * + * @param title ppt 鏍囬 + */ + void syncStreamGeneratePpt(String title); + + /** + * 鏌ヨ PPT 鍒楄〃 + * + * @param pptQueryVo 鏌ヨ鍙傛暟 + */ + void selectPptList(PptAllQueryDto pptQueryVo); + + /** + * 鍒嗛〉鏌ヨ PPT 妯℃澘 + * @param pptQueryVo 鏌ヨ鍙傛暟 + */ + JSONObject getPptTemplates(PptTemplateQueryDto pptQueryVo); + + /** + * 鐢熸垚澶х翰 + * @param generateOutlineDto 鐢熸垚澶х翰鍙傛暟 + */ + SseEmitter generateOutline(PptGenerateOutlineDto generateOutlineDto); + + /** + * 鐢熸垚澶х翰鍐呭 + * @param generateContentDto 鐢熸垚澶х翰鍐呭鍙傛暟 + */ + SseEmitter generateContent(PptGenerateContentDto generateContentDto); + + /** + * 鐢熸垚ppt + * @param generatePptxDto 鐢熸垚PPT鍙傛暟 + */ + JSONObject generatePptx(PptGeneratePptxDto generatePptxDto); + + /** + * 鑾峰彇API Token + * @return 鏂囧澶歍oken + */ + String getApiToken(); + + /** + * 鐢熸垚PPT鎴愬姛鍥炶皟鎺ュ彛 + */ + void successCallback(); + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/ISseService.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/ISseService.java index e6f8921..7230c78 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/ISseService.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/ISseService.java @@ -8,6 +8,7 @@ import org.ruoyi.common.chat.entity.files.UploadFileResponse; import org.ruoyi.common.chat.entity.images.Item; import org.ruoyi.common.chat.entity.whisper.WhisperResponse; +import org.ruoyi.system.domain.request.translation.TranslationRequest; import org.springframework.core.io.Resource; import org.springframework.http.ResponseEntity; import org.springframework.web.multipart.MultipartFile; @@ -59,4 +60,23 @@ UploadFileResponse upload(MultipartFile file); + + /** + * 鏂囨湰缈昏瘧 + * @param + */ + String translation(TranslationRequest translationRequest); + + /** + * 璋冪敤鏈湴妯″瀷 + * @param chatRequest + */ + SseEmitter ollamaChat(ChatRequest chatRequest); + + /** + * 浼佷笟搴旂敤鍥炲 + * @param prompt 鎻愮ず璇� + * @return 鍥炲鍐呭 + */ + String wxCpChat(String prompt); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/IVoiceRoleService.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/IVoiceRoleService.java deleted file mode 100644 index e078296..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/IVoiceRoleService.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.ruoyi.system.service; - -import org.ruoyi.system.domain.vo.VoiceRoleVo; -import org.ruoyi.system.domain.bo.VoiceRoleBo; -import org.ruoyi.common.mybatis.core.page.TableDataInfo; -import org.ruoyi.common.mybatis.core.page.PageQuery; -import org.ruoyi.system.request.RoleListDto; -import org.ruoyi.system.request.RoleRequest; -import org.ruoyi.system.request.SimpleGenerateRequest; -import org.ruoyi.system.response.SimpleGenerateDataResponse; -import org.ruoyi.system.response.rolelist.RoleListVO; - -import java.util.Collection; -import java.util.List; - -/** - * 閰嶉煶瑙掕壊Service鎺ュ彛 - * - * @author Lion Li - * @date 2024-03-19 - */ -public interface IVoiceRoleService { - - /** - * 鏌ヨ閰嶉煶瑙掕壊 - */ - VoiceRoleVo queryById(Long id); - - /** - * 鏌ヨ閰嶉煶瑙掕壊鍒楄〃 - */ - TableDataInfo<VoiceRoleVo> queryPageList(VoiceRoleBo bo, PageQuery pageQuery); - - /** - * 鏌ヨ閰嶉煶瑙掕壊鍒楄〃 - */ - List<VoiceRoleVo> queryList(VoiceRoleBo bo); - - /** - * 鏂板閰嶉煶瑙掕壊 - */ - Boolean insertByBo(RoleRequest roleRequest); - - /** - * 鐢熸垚闊抽 - */ - SimpleGenerateDataResponse simpleGenerate(SimpleGenerateRequest simpleGenerateRequest); - - /** - * 淇敼閰嶉煶瑙掕壊 - */ - Boolean updateByBo(VoiceRoleBo bo); - - /** - * 鏍¢獙骞舵壒閲忓垹闄ら厤闊宠鑹蹭俊鎭� - */ - Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); - - /** - * 鏌ヨ甯傚満瑙掕壊 - * - * @return 瑙掕壊鍒楄〃 - */ - List<RoleListVO> roleList(); - - /** - * 鏀惰棌甯傚満瑙掕壊 - * - */ - void copyRole(RoleListDto roleListDto); -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/SysLoginService.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/SysLoginService.java index 9caac08..29f9616 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/SysLoginService.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/SysLoginService.java @@ -27,6 +27,7 @@ import org.ruoyi.common.satoken.utils.LoginHelper; import org.ruoyi.common.tenant.exception.TenantException; import org.ruoyi.common.tenant.helper.TenantHelper; +import org.ruoyi.common.wechat.web.utils.UUIDShortUtil; import org.ruoyi.system.domain.SysUser; import org.ruoyi.system.domain.bo.SysUserBo; import org.ruoyi.system.domain.vo.LoginVo; @@ -43,7 +44,6 @@ import java.time.Duration; import java.util.Date; import java.util.List; -import java.util.UUID; import java.util.function.Supplier; /** @@ -159,7 +159,7 @@ if (ObjectUtil.isNull(user)) { SysUserBo sysUser = new SysUserBo(); // 鏀逛负鑷 - String name = "鐢ㄦ埛" + UUID.randomUUID(); + String name = "鐢ㄦ埛" + UUIDShortUtil.generateShortUuid();; // 璁剧疆榛樿鐢ㄦ埛鍚� sysUser.setUserName(name); // 璁剧疆榛樿鏄电О diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/ChatAppStoreImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/ChatAppStoreImpl.java new file mode 100644 index 0000000..25a7686 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/ChatAppStoreImpl.java @@ -0,0 +1,259 @@ +package org.ruoyi.system.service.impl; + +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import org.ruoyi.common.core.domain.model.LoginUser; +import org.ruoyi.common.core.exception.base.BaseException; +import org.ruoyi.common.core.utils.MapstructUtils; +import org.ruoyi.common.core.utils.StringUtils; +import org.ruoyi.common.mybatis.core.page.PageQuery; +import org.ruoyi.common.mybatis.core.page.TableDataInfo; +import org.ruoyi.common.satoken.utils.LoginHelper; +import org.ruoyi.system.domain.ChatAppStore; +import org.ruoyi.system.domain.bo.ChatAppStoreBo; +import org.ruoyi.system.domain.vo.ChatAppStoreVo; +import org.ruoyi.system.mapper.ChatAppStoreMapper; +import org.ruoyi.system.request.RoleListDto; +import org.ruoyi.system.request.RoleRequest; +import org.ruoyi.system.request.SimpleGenerateRequest; +import org.ruoyi.system.response.RoleResponse; +import org.ruoyi.system.response.SimpleGenerateDataResponse; +import org.ruoyi.system.response.SimpleGenerateResponse; +import org.ruoyi.system.response.rolelist.ContentResponse; +import org.ruoyi.system.response.rolelist.RoleListResponse; +import org.ruoyi.system.response.rolelist.ChatAppStoreVO; +import org.ruoyi.system.service.IChatCostService; +import org.ruoyi.system.service.IChatAppStoreService; +import org.ruoyi.system.util.AudioOkHttpUtil; +import org.springframework.stereotype.Service; + +import java.io.IOException; +import java.util.*; + +/** + * 搴旂敤甯傚満Service涓氬姟灞傚鐞� + * + * @author Lion Li + * @date 2024-03-19 + */ +@RequiredArgsConstructor +@Service +@Slf4j +public class ChatAppStoreImpl implements IChatAppStoreService { + + private final ChatAppStoreMapper baseMapper; + + private final IChatCostService chatService; + + private final AudioOkHttpUtil audioOkHttpUtil; + + /** + * 鏌ヨ搴旂敤甯傚満 + */ + @Override + public ChatAppStoreVo queryById(Long id) { + return baseMapper.selectVoById(id); + } + + /** + * 鏌ヨ搴旂敤甯傚満鍒楄〃 + */ + @Override + public TableDataInfo<ChatAppStoreVo> queryPageList(ChatAppStoreBo bo, PageQuery pageQuery) { + LambdaQueryWrapper<ChatAppStore> lqw = buildQueryWrapper(bo); + Page<ChatAppStoreVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); + return TableDataInfo.build(result); + } + + /** + * 鏌ヨ搴旂敤甯傚満鍒楄〃 + */ + @Override + public List<ChatAppStoreVo> queryList(ChatAppStoreBo bo) { + LambdaQueryWrapper<ChatAppStore> lqw = buildQueryWrapper(bo); + return baseMapper.selectVoList(lqw); + } + + private LambdaQueryWrapper<ChatAppStore> buildQueryWrapper(ChatAppStoreBo bo) { + Map<String, Object> params = bo.getParams(); + LambdaQueryWrapper<ChatAppStore> lqw = Wrappers.lambdaQuery(); + lqw.like(StringUtils.isNotBlank(bo.getName()), ChatAppStore::getName, bo.getName()); + lqw.eq(StringUtils.isNotBlank(bo.getDescription()), ChatAppStore::getDescription, bo.getDescription()); + lqw.eq(StringUtils.isNotBlank(bo.getAvatar()), ChatAppStore::getAvatar, bo.getAvatar()); + lqw.eq(bo.getCreateBy()!=null, ChatAppStore::getCreateBy, bo.getCreateBy()); + return lqw; + } + + /** + * 鏂板搴旂敤甯傚満 + */ + @Override + public Boolean insertByBo(RoleRequest roleRequest) { + try { + String prompt = convertFileToBase64(roleRequest.getPrompt()); + roleRequest.setPrompt("data:audio/x-m4a;base64," + prompt); + + String avatar = convertFileToBase64(roleRequest.getAvatar()); + roleRequest.setAvatar("data:image/png;base64," + avatar); + + } catch (IOException e) { + log.error("杞崲base64鍑虹幇閿欒锛歿}", e.getMessage()); + } + // 鍒涘缓涓�涓猂equest瀵硅薄鏉ラ厤缃綘鐨勮姹� + String json = JSONUtil.toJsonStr(roleRequest); + Request postRequest = audioOkHttpUtil.createPostRequest("api/tts/voice", json); + String body = audioOkHttpUtil.executeRequest(postRequest); + RoleResponse bean = JSONUtil.toBean(body, RoleResponse.class); + ChatAppStore addVoiceRole = new ChatAppStore(); + addVoiceRole.setName(roleRequest.getName()); + addVoiceRole.setDescription(roleRequest.getDescription()); + addVoiceRole.setAvatar(bean.getData().getMetadata().getAvatar()); + + return baseMapper.insert(addVoiceRole) > 0; + } + + private static String convertFileToBase64(String fileUrl) throws IOException { + OkHttpClient client = new OkHttpClient(); + Request request = new Request.Builder().url(fileUrl).build(); + Response response = client.newCall(request).execute(); + if (!response.isSuccessful()) throw new IOException("Failed to download file: " + response); + byte[] fileData = response.body().bytes(); + return Base64.getEncoder().encodeToString(fileData); + } + + /** + * 淇敼搴旂敤甯傚満 + */ + @Override + public Boolean updateByBo(ChatAppStoreBo bo) { + ChatAppStore update = MapstructUtils.convert(bo, ChatAppStore.class); + validEntityBeforeSave(update); + return baseMapper.updateById(update) > 0; + } + + /** + * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙 + */ + private void validEntityBeforeSave(ChatAppStore entity) { + //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫 + } + + /** + * 鎵归噺鍒犻櫎搴旂敤甯傚満 + */ + @Override + public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { + if (isValid) { + //TODO 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠� + } + return baseMapper.deleteBatchIds(ids) > 0; + } + + /** + * 瀹炴椂鐢熸垚璇煶 + * + * @param simpleGenerateRequest 鐢熸垚璇煶瀵硅薄 + * @return 鐢熸垚鐨勮闊充俊鎭� + */ + @Override + public SimpleGenerateDataResponse simpleGenerate(SimpleGenerateRequest simpleGenerateRequest) { + double charge = calculateCharge(simpleGenerateRequest.getText()); + // 鎵i櫎璐圭敤骞朵笖淇濆瓨娑堟伅璁板綍 + chatService.taskDeduct(simpleGenerateRequest.getModel(), simpleGenerateRequest.getText(), charge); + // 鍒涘缓涓�涓猂equest瀵硅薄鏉ラ厤缃綘鐨勮姹� + String json = JSONUtil.toJsonStr(simpleGenerateRequest); + Request postRequest = audioOkHttpUtil.createPostRequest("api/tts/simple-generate", json); + String body = audioOkHttpUtil.executeRequest(postRequest); + SimpleGenerateResponse bean = JSONUtil.toBean(body, SimpleGenerateResponse.class); + return bean.getData(); + } + + /** + * 鏌ヨ甯傚満瑙掕壊 + * + * @return 瑙掕壊鍒楄〃 + */ + @Override + public List<ChatAppStoreVO> roleList() { + Request postRequest = audioOkHttpUtil.createGetRequest("api/tts/voice"); + String body = audioOkHttpUtil.executeRequest(postRequest); + RoleListResponse bean = JSONUtil.toBean(body, RoleListResponse.class); + List<ChatAppStoreVO> roleList = new ArrayList<>(); + for (ContentResponse element : bean.getData()) { + String name = element.getName(); + String description = element.getMetadata().getDescription(); + String voicesId = element.getId(); + String avatar = element.getMetadata().getAvatar(); + String previewAudio; + if (element.getMetadata().getPrompts() == null) { + // 浠嶫SON涓В鏋愬嚭鐨勬暟鎹病鏈塸rompts + previewAudio = element.getMetadata().getPreviewAudio(); + } else { + previewAudio = element.getMetadata().getPrompts().get(0).getPromptOriginAudioStorageUrl(); + } + //roleList.add(new ChatAppStoreVO()); + } + return roleList; + + } + + /** + * 鏀惰棌甯傚満瑙掕壊 + */ + @Override + public void copyRole(RoleListDto roleListDto) { + // 淇濆瓨鑷虫暟鎹簱 + ChatAppStore voiceRole = new ChatAppStore(); + voiceRole.setName(roleListDto.getName()); + voiceRole.setDescription(roleListDto.getDescription()); + voiceRole.setAvatar(roleListDto.getAvatar()); + baseMapper.insert(voiceRole); + } + + /** + * 鏍规嵁鏂囨湰闀垮害璁$畻鎵i櫎鐨勯噾棰濄�� + * + * @param text 杈撳叆鐨勬枃鏈� + * @return 鎵i櫎鐨勯噾棰� + */ + public static double calculateCharge(String text) { + if (text == null || text.isEmpty()) { + return 0.0; + } + + int length = text.length(); + double charge = 0.0; + + while (length > 0) { + if (length >= 500) { + // 瀵逛簬姣�500涓瓧绗︼紝鎵i櫎0.5鍏� + charge += (length / 500) * 0.5; + length %= 500; // 澶勭悊鍓╀綑瀛楃 + } else if (length >= 100) { + // 瀵逛簬100鍒�499涓瓧绗︼紝鎵i櫎0.2鍏� + charge += 0.2; + break; // 澶勭悊瀹屾瘯锛岄��鍑哄惊鐜� + } else { + // 瀵逛簬灏戜簬100涓瓧绗︼紝鎵i櫎0.1鍏� + charge += 0.1; + break; // 澶勭悊瀹屾瘯锛岄��鍑哄惊鐜� + } + } + return charge; + } + + public Long getUserId() { + LoginUser loginUser = LoginHelper.getLoginUser(); + if (loginUser == null) { + throw new BaseException("鐢ㄦ埛鏈櫥褰曪紒"); + } + return loginUser.getUserId(); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/CoverPromptAudioServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/CoverPromptAudioServiceImpl.java new file mode 100644 index 0000000..51200fc --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/CoverPromptAudioServiceImpl.java @@ -0,0 +1,22 @@ +package org.ruoyi.system.service.impl; + +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.ruoyi.system.mapper.CoverPromptAudioMapper; +import org.ruoyi.system.service.ICoverPromptAudioService; +import org.springframework.stereotype.Service; + +/** + * 缈诲敱鐢ㄦ埛鍙傝�冮煶棰慡ervice涓氬姟灞傚鐞� + * + * @author NSL + * @since 2024-12-25 + */ +@Service +@Slf4j +public class CoverPromptAudioServiceImpl implements ICoverPromptAudioService { + + @Resource + private CoverPromptAudioMapper coverPromptAudioMapper; + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/CoverServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/CoverServiceImpl.java new file mode 100644 index 0000000..b2dbba6 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/CoverServiceImpl.java @@ -0,0 +1,134 @@ +package org.ruoyi.system.service.impl; + +import cn.dev33.satoken.exception.NotLoginException; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.lang.TypeReference; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import okhttp3.Request; +import org.apache.commons.lang3.math.NumberUtils; +import org.ruoyi.common.core.exception.base.BaseException; +import org.ruoyi.common.core.service.ConfigService; +import org.ruoyi.common.mybatis.core.page.PageQuery; +import org.ruoyi.common.mybatis.core.page.TableDataInfo; +import org.ruoyi.common.wechat.itchat4j.utils.enums.ResultEnum; +import org.ruoyi.system.cofing.OkHttpConfig; +import org.ruoyi.system.domain.Cover; +import org.ruoyi.system.domain.CoverPromptAudio; +import org.ruoyi.system.domain.model.ApiResult; +import org.ruoyi.system.domain.vo.cover.*; +import org.ruoyi.system.mapper.CoverMapper; +import org.ruoyi.system.mapper.CoverPromptAudioMapper; +import org.ruoyi.system.service.IChatCostService; +import org.ruoyi.system.service.ICoverService; +import org.ruoyi.system.util.WeChatScanHttpUtil; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import static org.ruoyi.common.satoken.utils.LoginHelper.getLoginUser; + +/** + * 缈诲敱Service涓氬姟灞傚鐞� + * + * @author NSL + * @since 2024-12-25 + */ +@RequiredArgsConstructor +@Service +@Slf4j +public class CoverServiceImpl implements ICoverService { + + private final CoverMapper coverMapper; + private final CoverPromptAudioMapper coverPromptAudioMapper; + private final ConfigService configService; + private final IChatCostService chatCostService; + private final WeChatScanHttpUtil weChatScanHttpUtil; + private final OkHttpConfig okHttpConfig; + + @Override + public List<MusicVo> searchMusic(String musicName) { + Map<String, String> queryMap = new HashMap<>(); + queryMap.put("keyword", musicName); + String json = JSONUtil.toJsonStr(queryMap); + Request postRequest = weChatScanHttpUtil.createPostRequest(getKey("search_music_url"), json); + String body = weChatScanHttpUtil.executeRequest(postRequest); + ApiResult apiResult = JSONUtil.toBean(body, ApiResult.class); + Object data = apiResult.getData(); + Map<String, List<MusicVo>> userMap = JSONUtil.toBean(JSONUtil.toJsonStr(data), new TypeReference<>() {}, true); + return userMap.get("musicList"); + } + + @Override + public void callback(CoverCallbackVo coverCallbackVo) { + Cover cover = BeanUtil.copyProperties(coverCallbackVo, Cover.class); + coverMapper.insertOrUpdate(cover); + } + + @Override + public void saveCoverTask(CoverParamVo coverParamVo) { + Long userId = null; + try { + userId = getLoginUser().getUserId(); + } catch (Exception e) { + throw new NotLoginException(NotLoginException.NOT_TOKEN_MESSAGE, NotLoginException.NOT_TOKEN, NotLoginException.NOT_TOKEN); + } + List<String> promptAudioUrl = coverParamVo.getPromptAudioUrl(); + Cover cover = BeanUtil.copyProperties(coverParamVo, Cover.class); + cover.setUserId(userId); + coverMapper.insertOrUpdate(cover); + if (CollUtil.isEmpty(promptAudioUrl)) { + // 鏌ヨ鐢ㄦ埛鏈�杩戜竴娆$炕鍞辫褰� + List<CoverPromptAudioVo> coverPromptAudioVoList = coverPromptAudioMapper.selectLatestVoByUserId(userId); + if (CollUtil.isEmpty(coverPromptAudioVoList)) { + throw new BaseException("鏈煡璇㈠埌缈诲敱璁板綍锛岃涓婁紶鍙傝�冮煶棰戯紒"); + } + List<String> promptAudioUrlList = coverPromptAudioVoList.stream().map(CoverPromptAudioVo::getPromptAudioUrl).collect(Collectors.toList()); + coverParamVo.setPromptAudioUrl(promptAudioUrlList); + } else { + // 淇濆瓨鐢ㄦ埛缈诲敱璁板綍 + for (String audioUrl : promptAudioUrl) { + CoverPromptAudio coverPromptAudio = new CoverPromptAudio(); + coverPromptAudio.setPromptAudioUrl(audioUrl); + coverPromptAudio.setUserId(userId); + coverPromptAudio.setCoverId(cover.getId()); + coverPromptAudioMapper.insertOrUpdate(coverPromptAudio); + } + } + coverParamVo.setUserId(String.valueOf(userId)); + coverParamVo.setOrderId(String.valueOf(cover.getId())); + coverParamVo.setUserGender(""); + log.info("鍙戣捣缈诲敱浠诲姟,鍏ュ弬{}", JSONUtil.toJsonStr(coverParamVo)); + // 璋冪敤缈诲敱API + Request postRequest = weChatScanHttpUtil.createPostRequest(getKey("cover_url"), JSONUtil.toJsonStr(coverParamVo)); + String body = weChatScanHttpUtil.executeRequest(postRequest); + ApiResult apiResult = JSONUtil.toBean(body, ApiResult.class); + if (ResultEnum.SUCCESS.getCode().equals(String.valueOf(apiResult.getCode()))) { + // 鎵h垂 + chatCostService.taskDeduct("cover", "token", NumberUtils.toDouble(okHttpConfig.getGenerate(), 2.5)); + } + log.info("璋冪敤缈诲敱缁撴灉,鍑哄弬{}", body); + } + + @Override + public TableDataInfo<CoverVo> searchCoverRecord(PageQuery pageQuery) { + LambdaQueryWrapper<Cover> queryWrapper = Wrappers.lambdaQuery(); + queryWrapper.eq(Cover::getUserId, getLoginUser().getUserId()); + queryWrapper.orderByDesc(Cover::getCreateTime); + Page<CoverVo> result = coverMapper.selectVoPage(pageQuery.build(), queryWrapper); + return TableDataInfo.build(result); + } + + public String getKey(String key) { + return configService.getConfigValue("cover", key); + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/PptServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/PptServiceImpl.java new file mode 100644 index 0000000..dcb3c2c --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/PptServiceImpl.java @@ -0,0 +1,140 @@ +package org.ruoyi.system.service.impl; + +import cn.dev33.satoken.exception.NotLoginException; +import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONUtil; +import com.alibaba.fastjson.JSONObject; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.math.NumberUtils; +import org.ruoyi.common.core.constant.Constants; +import org.ruoyi.common.core.domain.model.LoginUser; +import org.ruoyi.common.core.exception.base.BaseException; +import org.ruoyi.common.core.service.ConfigService; +import org.ruoyi.common.redis.utils.RedisUtils; +import org.ruoyi.common.satoken.utils.LoginHelper; +import org.ruoyi.system.cofing.OkHttpConfig; +import org.ruoyi.system.domain.vo.ppt.*; +import org.ruoyi.system.service.IChatCostService; +import org.ruoyi.system.service.IPptService; +import org.ruoyi.system.util.HttpUtils; +import org.ruoyi.system.util.WddPptApi; +import org.springframework.stereotype.Service; +import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; + +import javax.swing.filechooser.FileSystemView; +import java.io.File; +import java.time.Duration; + +import static org.ruoyi.common.satoken.utils.LoginHelper.getLoginUser; + +/** + * AI-PPTService涓氬姟灞傚鐞� + * + * @author NSL + * @since 2024-12-30 + */ +@RequiredArgsConstructor +@Service +@Slf4j +public class PptServiceImpl implements IPptService { + + private final OkHttpConfig okHttpConfig; + private final ConfigService configService; + private final IChatCostService chatCostService; + + @Override + public void syncStreamGeneratePpt(String title) { + // 鍒涘缓 api token (鏈夋晥鏈�2灏忔椂锛屽悓涓�涓� uid 鍒涘缓鏃朵箣鍓嶇殑 token 浼氬湪10绉掑唴澶辨晥) + String apiToken = getApiToken(); + // 鐢熸垚澶х翰 + System.out.println("\n\n========== 姝e湪鐢熸垚澶х翰 =========="); + String outline = WddPptApi.generateOutline(apiToken, title, null, null); + + // 鐢熸垚澶х翰鍐呭 + System.out.println("\n\n========== 姝e湪鐢熸垚澶х翰鍐呭 =========="); + String markdown = WddPptApi.generateContent(apiToken, outline, null, null); + + // 闅忔満涓�涓ā鏉� + System.out.println("\n\n========== 闅忔満閫夋嫨妯℃澘 =========="); + String templateId = WddPptApi.randomOneTemplateId(apiToken); + System.out.println(templateId); + + // 鐢熸垚PPT + System.out.println("\n\n========== 姝e湪鐢熸垚PPT =========="); + JSONObject pptInfo = WddPptApi.generatePptx(apiToken, templateId, markdown, false); + String pptId = pptInfo.getString("id"); + System.out.println("pptId: " + pptId); + System.out.println("ppt涓婚锛�" + pptInfo.getString("subject")); + System.out.println("ppt灏侀潰锛�" + pptInfo.getString("coverUrl") + "?token=" + apiToken); + + // 涓嬭浇PPT鍒版闈� + System.out.println("\n\n========== 姝e湪涓嬭浇PPT =========="); + JSONObject result = WddPptApi.downloadPptx(apiToken, pptId); + String url = result.getString("fileUrl"); + System.out.println("ppt閾炬帴锛�" + url); + String savePath = FileSystemView.getFileSystemView().getHomeDirectory().getAbsolutePath() + File.separator + pptId + ".pptx"; + try { + HttpUtils.download(url, new File(savePath)); + } catch (Exception e) { + + } + System.out.println("ppt涓嬭浇瀹屾垚锛屼繚瀛樿矾寰勶細" + savePath); + } + + @Override + public void selectPptList(PptAllQueryDto pptQueryVo) { + String apiToken = getApiToken(); + // todo 鏃犳潈闄愯闂� + JSONObject jsonObject = WddPptApi.listAllPptx(apiToken, JSONUtil.toJsonStr(pptQueryVo)); + System.out.println(jsonObject); + } + + @Override + public JSONObject getPptTemplates(PptTemplateQueryDto pptQueryVo) { + return WddPptApi.getPptTemplates(getApiToken(), JSONUtil.toJsonStr(pptQueryVo)); + } + + @Override + public SseEmitter generateOutline(PptGenerateOutlineDto generateOutlineDto) { + return WddPptApi.sseGenerateOutline(getApiToken(), generateOutlineDto.getSubject(), generateOutlineDto.getDataUrl(), generateOutlineDto.getPrompt()); + } + + @Override + public SseEmitter generateContent(PptGenerateContentDto generateContentDto) { + return WddPptApi.sseGenerateContent(getApiToken(), generateContentDto.getOutlineMarkdown(), generateContentDto.getDataUrl(), generateContentDto.getPrompt()); + } + + @Override + public JSONObject generatePptx(PptGeneratePptxDto generatePptxDto) { + return WddPptApi.generatePptx(getApiToken(), generatePptxDto.getTemplateId(), generatePptxDto.getOutlineContentMarkdown(), generatePptxDto.isPptxProperty()); + } + + public String getKey(String key) { + return configService.getConfigValue("ppt", key); + } + + @Override + public String getApiToken() { + LoginUser loginUser = null; + try { + loginUser = LoginHelper.getLoginUser(); + } catch (Exception e) { + throw new NotLoginException(NotLoginException.NOT_TOKEN_MESSAGE, NotLoginException.NOT_TOKEN, NotLoginException.NOT_TOKEN); + } + String userId = String.valueOf(loginUser.getUserId()); + // 鍒涘缓 api token (鏈夋晥鏈�2灏忔椂锛屽悓涓�涓� uid 鍒涘缓鏃朵箣鍓嶇殑 token 浼氬湪10绉掑唴澶辨晥) + String apiToken = RedisUtils.getCacheObject(Constants.WDD_TOKEN_KEY + userId); + if (StrUtil.isEmpty(apiToken)) { + apiToken = WddPptApi.createApiToken(getKey("apiKey"), userId, null); + RedisUtils.setCacheObject(Constants.WDD_TOKEN_KEY, apiToken, Duration.ofMinutes(Constants.WDD_TOKEN_EXPIRATION)); + } + return apiToken; + } + + @Override + public void successCallback() { + // 鎵h垂 + chatCostService.taskDeduct("ppt", "AI-PPT", NumberUtils.toDouble(okHttpConfig.getGenerate(), 1.1)); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/SseServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/SseServiceImpl.java index 610b025..7ada900 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/SseServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/SseServiceImpl.java @@ -3,6 +3,16 @@ import cn.dev33.satoken.stp.StpUtil; import cn.hutool.core.collection.CollectionUtil; import com.alibaba.fastjson.JSONObject; +import com.azure.ai.openai.OpenAIClient; +import com.azure.ai.openai.OpenAIClientBuilder; +import com.azure.ai.openai.models.*; +import com.azure.core.credential.AzureKeyCredential; +import io.github.ollama4j.OllamaAPI; +import io.github.ollama4j.models.chat.OllamaChatMessageRole; +import io.github.ollama4j.models.chat.OllamaChatRequestBuilder; +import io.github.ollama4j.models.chat.OllamaChatRequestModel; +import io.github.ollama4j.models.generate.OllamaStreamHandler; +import io.github.ollama4j.utils.Options; import jakarta.servlet.http.HttpServletRequest; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -12,7 +22,10 @@ import org.ruoyi.common.chat.domain.request.ChatRequest; import org.ruoyi.common.chat.domain.request.Dall3Request; import org.ruoyi.common.chat.entity.Tts.TextToSpeech; -import org.ruoyi.common.chat.entity.chat.*; +import org.ruoyi.common.chat.entity.chat.ChatCompletion; +import org.ruoyi.common.chat.entity.chat.ChatCompletionResponse; +import org.ruoyi.common.chat.entity.chat.Content; +import org.ruoyi.common.chat.entity.chat.Message; import org.ruoyi.common.chat.entity.files.UploadFileResponse; import org.ruoyi.common.chat.entity.images.Image; import org.ruoyi.common.chat.entity.images.ImageResponse; @@ -25,18 +38,17 @@ import org.ruoyi.common.core.exception.base.BaseException; import org.ruoyi.common.core.service.ConfigService; import org.ruoyi.common.core.utils.StringUtils; -import org.ruoyi.common.redis.utils.RedisUtils; import org.ruoyi.common.satoken.utils.LoginHelper; import org.ruoyi.system.domain.bo.ChatMessageBo; import org.ruoyi.system.domain.bo.SysModelBo; -import org.ruoyi.system.domain.bo.SysPackagePlanBo; +import org.ruoyi.system.domain.request.translation.TranslationRequest; import org.ruoyi.system.domain.vo.SysModelVo; -import org.ruoyi.system.domain.vo.SysPackagePlanVo; import org.ruoyi.system.domain.vo.SysUserVo; import org.ruoyi.system.listener.SSEEventSourceListener; import org.ruoyi.system.service.*; import org.springframework.core.io.InputStreamResource; import org.springframework.core.io.Resource; +import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; @@ -50,8 +62,11 @@ import java.net.URLEncoder; import java.nio.file.Files; import java.nio.file.Path; -import java.util.Arrays; +import java.util.ArrayList; import java.util.List; +import java.util.concurrent.CompletableFuture; + +import io.github.ollama4j.utils.OptionsBuilder; @Service @Slf4j @@ -87,12 +102,13 @@ try { if (StpUtil.isLogin()) { SysUserVo sysUserVo = userService.selectUserById(getUserId()); - if (!checkModel(sysUserVo.getUserPlan(), chatRequest.getModel())) { - throw new BaseException("褰撳墠濂楅涓嶆敮鎸佹妯″瀷!"); - } +// if (!checkModel(sysUserVo.getUserPlan(), chatRequest.getModel())) { +// throw new BaseException("褰撳墠濂楅涓嶆敮鎸佹妯″瀷!"); +// } LocalCache.CACHE.put("userId", getUserId()); - Object content = messages.get(0).getContent(); + Object content = messages.get(messages.size() - 1).getContent(); + String chatString = ""; if (content instanceof List<?> listContent) { if (!listContent.isEmpty() && listContent.get(0) instanceof Content) { @@ -144,28 +160,28 @@ processByToken(chatRequest.getModel(), chatString, chatMessageBo); } } - } else { - if (checkModel("Visitor", chatRequest.getModel())) { - // 鍒濆璇锋眰娆℃暟 - int number = 1; - // 鑾峰彇璇锋眰IP - String realIp = getClientIpAddress(request); - // 鏍规嵁IP鑾峰彇娆℃暟 - Integer requestNumber = RedisUtils.getCacheObject(realIp); - if (requestNumber == null) { - // 璁板綍ip浣跨敤娆℃暟 - RedisUtils.setCacheObject(realIp, number); - } else { - String configValue = configService.getConfigValue("mail", "free"); - if (requestNumber > Integer.parseInt(configValue)) { - throw new BaseException("鍓╀綑娆℃暟涓嶈冻锛岃鍏呭�煎悗浣跨敤"); - } - RedisUtils.setCacheObject(realIp, requestNumber + 1); - } - } else { - throw new BaseException("褰撳墠濂楅涓嶆敮鎸佹妯″瀷!"); - } } + +// else { +// +// // 鍒濆璇锋眰娆℃暟 +// int number = 1; +// // 鑾峰彇璇锋眰IP +// String realIp = getClientIpAddress(request); +// // 鏍规嵁IP鑾峰彇娆℃暟 +// Integer requestNumber = RedisUtils.getCacheObject(realIp); +// if (requestNumber == null) { +// // 璁板綍ip浣跨敤娆℃暟 +// RedisUtils.setCacheObject(realIp, number); +// } else { +// String configValue = configService.getConfigValue("mail", "free"); +// if (requestNumber > Integer.parseInt(configValue)) { +// throw new BaseException("鍓╀綑娆℃暟涓嶈冻锛岃鍏呭�煎悗浣跨敤"); +// } +// RedisUtils.setCacheObject(realIp, requestNumber + 1); +// } +// +// } ChatCompletion completion = ChatCompletion .builder() .messages(messages) @@ -184,31 +200,31 @@ } - /** - * 鏌ュ綋鍓嶇敤鎴锋槸鍚﹀彲浠ヨ皟鐢ㄦ妯″瀷 - * - * @param planId - * @return - */ - public Boolean checkModel(String planId, String modelName) { - SysPackagePlanBo sysPackagePlanBo = new SysPackagePlanBo(); - if (modelName.startsWith("gpt-4-gizmo")) { - modelName = "gpt-4-gizmo"; - } - if (StringUtils.isEmpty(planId)) { - sysPackagePlanBo.setName("Visitor"); - } else if ("Visitor".equals(planId) || "Free".equals(planId)) { - sysPackagePlanBo.setName(planId); - } else { - // sysPackagePlanBo.setId(Long.valueOf(planId)); - return true; - } - - SysPackagePlanVo sysPackagePlanVo = sysPackagePlanService.queryList(sysPackagePlanBo).get(0); - // 灏嗗瓧绗︿覆杞崲涓烘暟缁� - String[] array = sysPackagePlanVo.getPlanDetail().split(","); - return Arrays.asList(array).contains(modelName); - } +// /** +// * 鏌ュ綋鍓嶇敤鎴锋槸鍚﹀彲浠ヨ皟鐢ㄦ妯″瀷 +// * +// * @param planId +// * @return +// */ +// public Boolean checkModel(String planId, String modelName) { +// SysPackagePlanBo sysPackagePlanBo = new SysPackagePlanBo(); +// if (modelName.startsWith("gpt-4-gizmo")) { +// modelName = "gpt-4-gizmo"; +// } +// if (StringUtils.isEmpty(planId)) { +// sysPackagePlanBo.setName("Visitor"); +// } else if ("Visitor".equals(planId) || "Free".equals(planId)) { +// sysPackagePlanBo.setName(planId); +// } else { +// // sysPackagePlanBo.setId(Long.valueOf(planId)); +// return true; +// } +// +// SysPackagePlanVo sysPackagePlanVo = sysPackagePlanService.queryList(sysPackagePlanBo).get(0); +// // 灏嗗瓧绗︿覆杞崲涓烘暟缁� +// String[] array = sysPackagePlanVo.getPlanDetail().split(","); +// return Arrays.asList(array).contains(modelName); +// } /** * 鏍规嵁娆℃暟鎵i櫎浣欓 @@ -241,23 +257,21 @@ */ @Override public ResponseEntity<Resource> textToSpeed(TextToSpeech textToSpeech) { + ResponseBody body = openAiStreamClient.textToSpeech(textToSpeech); + if (body != null) { + // 灏哛esponseBody杞崲涓篒nputStreamResource + InputStreamResource resource = new InputStreamResource(body.byteStream()); - try (ResponseBody body = openAiStreamClient.textToSpeech(textToSpeech)) { - if (body != null) { - // 灏哛esponseBody杞崲涓篒nputStreamResource - InputStreamResource resource = new InputStreamResource(body.byteStream()); - - // 鍒涘缓骞惰繑鍥濺esponseEntity - return ResponseEntity.ok() - .contentType(MediaType.parseMediaType("audio/mpeg")) - .body(resource); - - } else { - // 濡傛灉ResponseBody涓虹┖锛岃繑鍥�404鐘舵�佺爜 - return ResponseEntity.notFound().build(); - } + // 鍒涘缓骞惰繑鍥濺esponseEntity + return ResponseEntity.ok() + .contentType(MediaType.parseMediaType("audio/mpeg")) + .body(resource); + } else { + // 濡傛灉ResponseBody涓虹┖锛岃繑鍥�404鐘舵�佺爜 + return ResponseEntity.notFound().build(); } } + /** * 璇煶杞枃瀛� @@ -309,6 +323,7 @@ * @param request * @return */ + @Override public List<Item> dall3(Dall3Request request) { openAiStreamClient = chatConfig.getOpenAiStreamClient(); chatService.checkUserGrade(); @@ -521,4 +536,100 @@ return "unknown"; } + + + @Override + public String translation(TranslationRequest translationRequest) { + + ChatMessageBo chatMessageBo = new ChatMessageBo(); + chatMessageBo.setUserId(getUserId()); + chatMessageBo.setModelName(translationRequest.getModel()); + chatMessageBo.setContent(translationRequest.getPrompt()); + chatMessageBo.setDeductCost(0.01); + chatMessageBo.setTotalTokens(0); + chatMessageService.insertByBo(chatMessageBo); + + openAiStreamClient = chatConfig.getOpenAiStreamClient(); + + List<Message> messageList = new ArrayList<>(); + + Message sysMessage = Message.builder().role(Message.Role.SYSTEM).content("浣滀负鑻辨眽缈昏瘧锛屾偍鐨勪换鍔℃槸鍑嗙‘鍦板湪涓ょ璇█涔嬮棿缈昏瘧鏂囨湰銆傜炕璇戞椂锛岃娉ㄦ剰涓婁笅鏂囷紝鍑嗙‘瑙i噴鎴愯鍜岃皻璇�傚鏋滆繛缁敹鍒板涓嫳鏂囧崟璇嶏紝璇烽粯璁ゅ皢鍏剁炕璇戞垚涓枃鍙ュ瓙銆備絾濡傛灉鍓嶉潰鏈�'phrase:鈥欙紝鍒欏簲缈昏瘧涓虹煭璇�;濡傛灉鏈�'norma!:'锛屽垯缈昏瘧涓哄涓棤鍏崇殑鍗曡瘝銆傛偍鐨勭炕璇戝簲鎺ヨ繎姣嶈鑰呯殑姘村钩锛屽苟鑰冭檻鐢ㄦ埛瑕佹眰鐨勭壒瀹氳瑷�椋庢牸鎴栬姘斻�傞伩鍏嶄娇鐢ㄥ啋鐘�ц瘝姹囷紝蹇呰鏃剁敤x鏇挎崲銆傛彁渚涚炕璇戞椂锛岃鐢ㄤ腑鏂囪В閲婃瘡鍙ヨ瘽鐨勬椂鎬併�佷粠鍙ャ�佷富璇�佽皳璇�佸璇�佺壒娈婄煭璇拰璋氳瀵逛簬闇�瑕佺炕璇戠殑鐭鎴栧崟璇嶏紝璇锋彁渚涙潵婧�(璇嶅吀)銆傚鏋滆姹傜炕璇戝涓煭璇紝璇风敤|绗﹀彿鍒嗛殧銆傝璁颁綇:鎮ㄦ槸鑻辨眽缈昏瘧锛屼笉鏄眽姹夌炕璇戞垨鑻辫嫳缈昏瘧銆傛彁浜ゅ墠璇蜂粩缁嗘鏌ュ拰淇绛旀,鍥炲鎺у埗鍦�50瀛椾互鍐�").build(); + messageList.add(sysMessage); + Message message = Message.builder().role(Message.Role.USER).content(translationRequest.getPrompt()).build(); + messageList.add(message); + ChatCompletionResponse chatCompletionResponse = null; + try { + ChatCompletion chatCompletion = ChatCompletion + .builder() + .messages(messageList) + .model(translationRequest.getModel()) + .stream(false) + .build(); + chatCompletionResponse = openAiStreamClient.chatCompletion(chatCompletion); + }catch (Exception e) { + log.error(e.getMessage()); + } + + return chatCompletionResponse.getChoices().get(0).getMessage().getContent().toString(); + } + + @Override + public SseEmitter ollamaChat(ChatRequest chatRequest) { + final SseEmitter emitter = new SseEmitter(); + String host = "http://localhost:11434/"; + + List<Message> msgList = chatRequest.getMessages(); + Message message = msgList.get(msgList.size() - 1); + + OllamaAPI ollamaAPI = new OllamaAPI(host); + + ollamaAPI.setRequestTimeoutSeconds(100); + + OllamaChatRequestBuilder builder = OllamaChatRequestBuilder.getInstance("qwen2.5:7b"); + + OllamaChatRequestModel requestModel = builder + .withMessage(OllamaChatMessageRole.USER, + message.getContent().toString()) + .build(); + + + // 寮傛鎵ц Ollama API 璋冪敤 + CompletableFuture.runAsync(() -> { + try { + StringBuilder response = new StringBuilder(); + OllamaStreamHandler streamHandler = (s) -> { + String substr = s.substring(response.length()); + response.append(substr); + System.out.println(substr); + try { + emitter.send(substr); + } catch (IOException e) { + sendErrorEvent(emitter, e.getMessage()); + } + }; + ollamaAPI.chat(requestModel, streamHandler); + emitter.complete(); + } catch (Exception e) { + sendErrorEvent(emitter, e.getMessage()); + } + }); + + + return emitter; + } + + @Override + public String wxCpChat(String prompt) { + List<Message> messageList = new ArrayList<>(); + Message message = Message.builder().role(Message.Role.USER).content(prompt).build(); + messageList.add(message); + ChatCompletion chatCompletion = ChatCompletion + .builder() + .messages(messageList) + .model("gpt-4o-mini") + .stream(false) + .build(); + ChatCompletionResponse chatCompletionResponse = openAiStreamClient.chatCompletion(chatCompletion); + return chatCompletionResponse.getChoices().get(0).getMessage().getContent().toString(); + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/VoiceRoleServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/VoiceRoleServiceImpl.java deleted file mode 100644 index b242b89..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/service/impl/VoiceRoleServiceImpl.java +++ /dev/null @@ -1,264 +0,0 @@ -package org.ruoyi.system.service.impl; - -import cn.hutool.json.JSONUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import okhttp3.OkHttpClient; -import okhttp3.Request; -import okhttp3.Response; -import org.ruoyi.common.core.domain.model.LoginUser; -import org.ruoyi.common.core.exception.base.BaseException; -import org.ruoyi.common.core.utils.MapstructUtils; -import org.ruoyi.common.core.utils.StringUtils; -import org.ruoyi.common.mybatis.core.page.PageQuery; -import org.ruoyi.common.mybatis.core.page.TableDataInfo; -import org.ruoyi.common.satoken.utils.LoginHelper; -import org.ruoyi.system.domain.VoiceRole; -import org.ruoyi.system.domain.bo.VoiceRoleBo; -import org.ruoyi.system.domain.vo.VoiceRoleVo; -import org.ruoyi.system.mapper.VoiceRoleMapper; -import org.ruoyi.system.request.RoleListDto; -import org.ruoyi.system.request.RoleRequest; -import org.ruoyi.system.request.SimpleGenerateRequest; -import org.ruoyi.system.response.RoleResponse; -import org.ruoyi.system.response.SimpleGenerateDataResponse; -import org.ruoyi.system.response.SimpleGenerateResponse; -import org.ruoyi.system.response.rolelist.ContentResponse; -import org.ruoyi.system.response.rolelist.RoleListResponse; -import org.ruoyi.system.response.rolelist.RoleListVO; -import org.ruoyi.system.service.IChatCostService; -import org.ruoyi.system.service.IVoiceRoleService; -import org.ruoyi.system.util.AudioOkHttpUtil; -import org.springframework.stereotype.Service; - -import java.io.IOException; -import java.util.*; - -/** - * 閰嶉煶瑙掕壊Service涓氬姟灞傚鐞� - * - * @author Lion Li - * @date 2024-03-19 - */ -@RequiredArgsConstructor -@Service -@Slf4j -public class VoiceRoleServiceImpl implements IVoiceRoleService { - - private final VoiceRoleMapper baseMapper; - - private final IChatCostService chatService; - - private final AudioOkHttpUtil audioOkHttpUtil; - - /** - * 鏌ヨ閰嶉煶瑙掕壊 - */ - @Override - public VoiceRoleVo queryById(Long id) { - return baseMapper.selectVoById(id); - } - - /** - * 鏌ヨ閰嶉煶瑙掕壊鍒楄〃 - */ - @Override - public TableDataInfo<VoiceRoleVo> queryPageList(VoiceRoleBo bo, PageQuery pageQuery) { - LambdaQueryWrapper<VoiceRole> lqw = buildQueryWrapper(bo); - Page<VoiceRoleVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); - return TableDataInfo.build(result); - } - - /** - * 鏌ヨ閰嶉煶瑙掕壊鍒楄〃 - */ - @Override - public List<VoiceRoleVo> queryList(VoiceRoleBo bo) { - LambdaQueryWrapper<VoiceRole> lqw = buildQueryWrapper(bo); - return baseMapper.selectVoList(lqw); - } - - private LambdaQueryWrapper<VoiceRole> buildQueryWrapper(VoiceRoleBo bo) { - Map<String, Object> params = bo.getParams(); - LambdaQueryWrapper<VoiceRole> lqw = Wrappers.lambdaQuery(); - lqw.like(StringUtils.isNotBlank(bo.getName()), VoiceRole::getName, bo.getName()); - lqw.eq(StringUtils.isNotBlank(bo.getDescription()), VoiceRole::getDescription, bo.getDescription()); - lqw.eq(StringUtils.isNotBlank(bo.getAvatar()), VoiceRole::getAvatar, bo.getAvatar()); - lqw.eq(bo.getCreateBy()!=null, VoiceRole::getCreateBy, bo.getCreateBy()); - lqw.eq(StringUtils.isNotBlank(bo.getVoiceId()), VoiceRole::getVoiceId, bo.getVoiceId()); - lqw.eq(StringUtils.isNotBlank(bo.getFileUrl()), VoiceRole::getFileUrl, bo.getFileUrl()); - return lqw; - } - - /** - * 鏂板閰嶉煶瑙掕壊 - */ - @Override - public Boolean insertByBo(RoleRequest roleRequest) { - try { - String prompt = convertFileToBase64(roleRequest.getPrompt()); - roleRequest.setPrompt("data:audio/x-m4a;base64," + prompt); - - String avatar = convertFileToBase64(roleRequest.getAvatar()); - roleRequest.setAvatar("data:image/png;base64," + avatar); - - } catch (IOException e) { - log.error("杞崲base64鍑虹幇閿欒锛歿}", e.getMessage()); - } - // 鍒涘缓涓�涓猂equest瀵硅薄鏉ラ厤缃綘鐨勮姹� - String json = JSONUtil.toJsonStr(roleRequest); - Request postRequest = audioOkHttpUtil.createPostRequest("api/tts/voice", json); - String body = audioOkHttpUtil.executeRequest(postRequest); - RoleResponse bean = JSONUtil.toBean(body, RoleResponse.class); - VoiceRole addVoiceRole = new VoiceRole(); - addVoiceRole.setName(roleRequest.getName()); - addVoiceRole.setDescription(roleRequest.getDescription()); - addVoiceRole.setAvatar(bean.getData().getMetadata().getAvatar()); - addVoiceRole.setVoiceId(bean.getData().getId()); - addVoiceRole.setFileUrl(bean.getData().getMetadata().getPrompts().get(0).getPromptOriginAudioStorageUrl()); - return baseMapper.insert(addVoiceRole) > 0; - } - - private static String convertFileToBase64(String fileUrl) throws IOException { - OkHttpClient client = new OkHttpClient(); - Request request = new Request.Builder().url(fileUrl).build(); - Response response = client.newCall(request).execute(); - if (!response.isSuccessful()) throw new IOException("Failed to download file: " + response); - byte[] fileData = response.body().bytes(); - return Base64.getEncoder().encodeToString(fileData); - } - - /** - * 淇敼閰嶉煶瑙掕壊 - */ - @Override - public Boolean updateByBo(VoiceRoleBo bo) { - VoiceRole update = MapstructUtils.convert(bo, VoiceRole.class); - validEntityBeforeSave(update); - return baseMapper.updateById(update) > 0; - } - - /** - * 淇濆瓨鍓嶇殑鏁版嵁鏍¢獙 - */ - private void validEntityBeforeSave(VoiceRole entity) { - //TODO 鍋氫竴浜涙暟鎹牎楠�,濡傚敮涓�绾︽潫 - } - - /** - * 鎵归噺鍒犻櫎閰嶉煶瑙掕壊 - */ - @Override - public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { - if (isValid) { - //TODO 鍋氫竴浜涗笟鍔′笂鐨勬牎楠�,鍒ゆ柇鏄惁闇�瑕佹牎楠� - } - return baseMapper.deleteBatchIds(ids) > 0; - } - - /** - * 瀹炴椂鐢熸垚璇煶 - * - * @param simpleGenerateRequest 鐢熸垚璇煶瀵硅薄 - * @return 鐢熸垚鐨勮闊充俊鎭� - */ - @Override - public SimpleGenerateDataResponse simpleGenerate(SimpleGenerateRequest simpleGenerateRequest) { - double charge = calculateCharge(simpleGenerateRequest.getText()); - // 鎵i櫎璐圭敤骞朵笖淇濆瓨娑堟伅璁板綍 - chatService.taskDeduct(simpleGenerateRequest.getModel(), simpleGenerateRequest.getText(), charge); - // 鍒涘缓涓�涓猂equest瀵硅薄鏉ラ厤缃綘鐨勮姹� - String json = JSONUtil.toJsonStr(simpleGenerateRequest); - Request postRequest = audioOkHttpUtil.createPostRequest("api/tts/simple-generate", json); - String body = audioOkHttpUtil.executeRequest(postRequest); - SimpleGenerateResponse bean = JSONUtil.toBean(body, SimpleGenerateResponse.class); - return bean.getData(); - } - - /** - * 鏌ヨ甯傚満瑙掕壊 - * - * @return 瑙掕壊鍒楄〃 - */ - @Override - public List<RoleListVO> roleList() { - Request postRequest = audioOkHttpUtil.createGetRequest("api/tts/voice"); - String body = audioOkHttpUtil.executeRequest(postRequest); - RoleListResponse bean = JSONUtil.toBean(body, RoleListResponse.class); - List<RoleListVO> roleList = new ArrayList<>(); - for (ContentResponse element : bean.getData()) { - String name = element.getName(); - String description = element.getMetadata().getDescription(); - String voicesId = element.getId(); - String avatar = element.getMetadata().getAvatar(); - String previewAudio; - if (element.getMetadata().getPrompts() == null) { - // 浠嶫SON涓В鏋愬嚭鐨勬暟鎹病鏈塸rompts - previewAudio = element.getMetadata().getPreviewAudio(); - } else { - previewAudio = element.getMetadata().getPrompts().get(0).getPromptOriginAudioStorageUrl(); - } - roleList.add(new RoleListVO(name, description, voicesId, previewAudio, avatar)); - } - return roleList; - - } - - /** - * 鏀惰棌甯傚満瑙掕壊 - */ - @Override - public void copyRole(RoleListDto roleListDto) { - // 淇濆瓨鑷虫暟鎹簱 - VoiceRole voiceRole = new VoiceRole(); - voiceRole.setName(roleListDto.getName()); - voiceRole.setDescription(roleListDto.getDescription()); - voiceRole.setFileUrl(roleListDto.getPreviewAudio()); - voiceRole.setVoiceId(roleListDto.getVoicesId()); - voiceRole.setAvatar(roleListDto.getAvatar()); - baseMapper.insert(voiceRole); - } - - /** - * 鏍规嵁鏂囨湰闀垮害璁$畻鎵i櫎鐨勯噾棰濄�� - * - * @param text 杈撳叆鐨勬枃鏈� - * @return 鎵i櫎鐨勯噾棰� - */ - public static double calculateCharge(String text) { - if (text == null || text.isEmpty()) { - return 0.0; - } - - int length = text.length(); - double charge = 0.0; - - while (length > 0) { - if (length >= 500) { - // 瀵逛簬姣�500涓瓧绗︼紝鎵i櫎0.5鍏� - charge += (length / 500) * 0.5; - length %= 500; // 澶勭悊鍓╀綑瀛楃 - } else if (length >= 100) { - // 瀵逛簬100鍒�499涓瓧绗︼紝鎵i櫎0.2鍏� - charge += 0.2; - break; // 澶勭悊瀹屾瘯锛岄��鍑哄惊鐜� - } else { - // 瀵逛簬灏戜簬100涓瓧绗︼紝鎵i櫎0.1鍏� - charge += 0.1; - break; // 澶勭悊瀹屾瘯锛岄��鍑哄惊鐜� - } - } - return charge; - } - - public Long getUserId() { - LoginUser loginUser = LoginHelper.getLoginUser(); - if (loginUser == null) { - throw new BaseException("鐢ㄦ埛鏈櫥褰曪紒"); - } - return loginUser.getUserId(); - } -} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/util/HttpUtils.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/util/HttpUtils.java new file mode 100644 index 0000000..24ddccb --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/util/HttpUtils.java @@ -0,0 +1,634 @@ +package org.ruoyi.system.util; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import org.apache.commons.io.IOUtils; +import org.apache.http.Header; +import org.apache.http.HttpEntity; +import org.apache.http.HttpEntityEnclosingRequest; +import org.apache.http.client.HttpClient; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.*; +import org.apache.http.config.Registry; +import org.apache.http.config.RegistryBuilder; +import org.apache.http.conn.socket.ConnectionSocketFactory; +import org.apache.http.conn.socket.PlainConnectionSocketFactory; +import org.apache.http.conn.ssl.SSLConnectionSocketFactory; +import org.apache.http.entity.*; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; + +import javax.net.ssl.SSLContext; +import javax.net.ssl.X509TrustManager; +import java.io.*; +import java.net.HttpURLConnection; +import java.net.SocketException; +import java.net.URL; +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.security.SecureRandom; +import java.security.cert.X509Certificate; +import java.util.*; +import java.util.concurrent.*; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Consumer; +import java.util.function.Function; + +/** + * HttpUtils + * + * @author NSL + * @since 2024-12-30 + */ +public class HttpUtils { + + public static final String CHARSET_DEFAULT = "UTF-8"; + public static final String CONTENT_TYPE = "Content-Type"; + public static final String CONTENT_TYPE_JSON = "application/json"; + public static final String CONTENT_TYPE_FORM_DATA = "application/x-www-form-urlencoded"; + private static final PoolingHttpClientConnectionManager CONNECTION_MANAGER; + private static final int MAX_CONNECT_TIMEOUT = 8000; + private static final int MAX_SOCKET_TIMEOUT = 90000; + + static { + CONNECTION_MANAGER = new PoolingHttpClientConnectionManager(getDefaultRegistry()); + CONNECTION_MANAGER.setMaxTotal(500); + CONNECTION_MANAGER.setDefaultMaxPerRoute(50); + CONNECTION_MANAGER.setValidateAfterInactivity(2000); + } + + public static HttpResponse get(String url) { + return get(url, null); + } + + public static HttpResponse get(String url, Map<String, Object> params) { + String urlLinks = getUrlLinks(params); + if (urlLinks != null) { + if (url.contains("?")) { + url = url + "&" + urlLinks; + } else { + url = url + "?" + urlLinks; + } + } + return request(HttpRequest.build(url, "GET")); + } + + public static void download(String url, File destFile) throws Exception { + HttpRequest request = HttpRequest.build(url, "GET"); + request.setResponseHandler(entity -> { + try { + if (!destFile.getParentFile().exists()) { + destFile.getParentFile().mkdirs(); + } + try (FileOutputStream fs = new FileOutputStream(destFile)) { + entity.writeTo(fs); + } + return destFile; + } catch (Exception e) { + return e; + } + }); + HttpResponse response = request(request); + if (response.getResponse() instanceof Exception) { + throw (Exception) response.getResponse(); + } + } + + public static HttpResponse postJson(String url, String bodyJson) { + HttpRequest request = HttpRequest.build(url, "POST").setBody(bodyJson); + if (request.getHeaders() == null) { + request.setHeaders(Collections.singletonMap(CONTENT_TYPE, CONTENT_TYPE_JSON)); + } else { + request.getHeaders().put(CONTENT_TYPE, CONTENT_TYPE_JSON); + } + return request(request); + } + + public static HttpResponse postForm(String url, Map<String, Object> params) { + String urlLinks = getUrlLinks(params); + HttpRequest request = HttpRequest.build(url, "POST").setBody(urlLinks != null ? urlLinks : ""); + if (request.getHeaders() == null) { + request.setHeaders(Collections.singletonMap(CONTENT_TYPE, CONTENT_TYPE_FORM_DATA)); + } else { + request.getHeaders().put(CONTENT_TYPE, CONTENT_TYPE_FORM_DATA); + } + return request(request); + } + + public static HttpResponse requestWithEventStream(ExecutorService executorService, long firstReadTimeout, HttpRequest request, Consumer<String> dataConsumer) throws ExecutionException, InterruptedException, TimeoutException { + return requestWithEventStream(executorService, firstReadTimeout, request, dataConsumer, null); + } + + public static HttpResponse requestWithEventStream(ExecutorService executorService, long firstReadTimeout, HttpRequest request, Consumer<String> dataConsumer, Consumer<Future<?>> futureConsumer) throws ExecutionException, InterruptedException, TimeoutException { + // status: 0 start 1 run 2 timeout + AtomicInteger status = new AtomicInteger(0); + Future<HttpResponse> submit = executorService.submit(() -> { + if (request.getMaxSocketTimeout() == null) { + request.setMaxSocketTimeout(30_000); + } + request.setResponseHandler(entity -> { + StringBuilder sb = new StringBuilder(); + try { + try (InputStream is = entity.getContent()) { + try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) { + String line; + while ((line = bufferedReader.readLine()) != null) { + if (status.get() == 2) { + throw new TimeoutException(); + } + status.set(1); + sb.append(line).append("\n"); + if (line.startsWith("data:")) { + dataConsumer.accept(line.substring(line.startsWith("data: ") ? 6 : 5)); + } + } + } + } + } catch (Exception e) { + throw new RuntimeException("eventStream 璇锋眰寮傚父", e); + } + return sb.toString(); + }); + return request(request); + }); + if (futureConsumer != null) { + futureConsumer.accept(submit); + } + try { + HttpResponse httpResponse = submit.get(firstReadTimeout, TimeUnit.MILLISECONDS); + if (httpResponse != null) { + return httpResponse; + } + } catch (TimeoutException e) { + if (status.get() == 0) { + status.set(2); + submit.cancel(true); + throw e; + } + } + return submit.get(); + } + + public static HttpResponse requestWithEventStream(HttpRequest request, Consumer<String> dataConsumer) { + if (request.getMaxSocketTimeout() == null) { + request.setMaxSocketTimeout(30_000); + } + request.setResponseHandler(entity -> { + StringBuilder sb = new StringBuilder(); + try { + try (InputStream is = entity.getContent()) { + try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) { + String line; + while ((line = bufferedReader.readLine()) != null) { + sb.append(line).append("\n"); + if (line.startsWith("data:")) { + dataConsumer.accept(line.substring(line.startsWith("data: ") ? 6 : 5)); + } + } + } + } + } catch (Exception e) { + throw new RuntimeException("eventStream 璇锋眰寮傚父", e); + } + return sb.toString(); + }); + return request(request); + } + + public static int getUrlHttpStatus(String _url) { + HttpURLConnection urlConnection = null; + try { + URL url = new URL(_url); + urlConnection = (HttpURLConnection) url.openConnection(); + urlConnection.connect(); + return urlConnection.getResponseCode(); + } catch (Exception ignored) { + return -1; + } finally { + if (urlConnection != null) { + urlConnection.disconnect(); + } + } + } + + public static String getUrlLinks(Map<String, Object> params) { + if (params == null || params.isEmpty()) { + return null; + } + StringBuilder sb = new StringBuilder(); + try { + String[] sortedKeys = params.keySet().toArray(new String[0]); + Arrays.sort(sortedKeys); + for (String key : sortedKeys) { + if (key == null || key.isEmpty()) { + continue; + } + Object value = params.get(key); + sb.append(key).append("="); + if (value != null) { + sb.append(URLEncoder.encode(value.toString(), "UTF-8")); + } + sb.append("&"); + } + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } + if (sb.length() > 0) { + sb.setLength(sb.length() - 1); + } + return sb.toString(); + } + + @SuppressWarnings("unchecked") + public static Map<String, Object> parseUrlLinks(String params) { + Map<String, Object> result = new LinkedHashMap<>(); + if (params == null || params.isEmpty()) { + return result; + } + for (String param : params.split("&")) { + String[] split = param.split("="); + String key = split[0]; + String value = ""; + if (split.length > 1) { + value = split[1]; + } + if (result.containsKey(key)) { + Object o = result.get(key); + if (o instanceof List) { + ((List<Object>) o).add(value); + } else { + List<Object> list = new ArrayList<>(); + list.add(o); + list.add(value); + result.put(key, list); + } + } else { + result.put(key, value); + } + } + return result; + } + + /** + * 閫氱敤鎺ュ彛璇锋眰 + */ + public static HttpResponse request(HttpRequest request) { + return request(request, 0); + } + + private static HttpResponse request(HttpRequest request, int retryCount) { + HttpRequestBase requestBase = toRequest(request); + Map<String, String> headers = request.getHeaders(); + ContentType contentType = null; + if (headers != null && !headers.isEmpty()) { + for (Map.Entry<String, String> entry : headers.entrySet()) { + String key = entry.getKey(); + if (key == null || key.isEmpty()) { + continue; + } + String value = entry.getValue(); + if (CONTENT_TYPE.equalsIgnoreCase(key) && value != null) { + contentType = ContentType.parse(value); + } + requestBase.setHeader(key, value); + } + } + + // body + setBodyEntity(requestBase, contentType, request.getBody()); + + try { + HttpClient client = getHttpClient(request, requestBase); + org.apache.http.HttpResponse response; + long startTime = System.currentTimeMillis(); + response = client.execute(requestBase); + HttpResponse httpResponse = new HttpResponse(); + httpResponse.setReqTime(System.currentTimeMillis() - startTime); + httpResponse.setStatus(response.getStatusLine().getStatusCode()); + Header[] allHeaders = response.getAllHeaders(); + if (allHeaders != null && allHeaders.length > 0) { + httpResponse.setHeaders(new HashMap<>()); + for (Header header : allHeaders) { + httpResponse.getHeaders().put(header.getName(), header.getValue()); + } + } + HttpEntity entity = response.getEntity(); + if (request.responseHandler != null) { + httpResponse.setResponse(request.responseHandler.apply(entity)); + } else { + String charset = null; + if (entity.getContentType() != null && entity.getContentType().getValue() != null) { + contentType = ContentType.parse(entity.getContentType().getValue()); + if (contentType.getCharset() != null) { + charset = contentType.getCharset().name(); + } + } + if (charset == null) { + charset = CHARSET_DEFAULT; + } + httpResponse.setResponse(IOUtils.toString(entity.getContent(), charset)); + } + return httpResponse; + } catch (Exception e) { + requestBase.abort(); + if (request.getMaxRetryCount() > retryCount) { + return request(request, retryCount + 1); + } else if (e instanceof SocketException && "Connection reset".equals(e.getMessage()) && retryCount == 0 && request.getMaxRetryCount() == 0) { + // 閬囧埌 Connection reset 榛樿閲嶈瘯涓�娆� + return request(request, retryCount + 1); + } else { + throw new RuntimeException("璇锋眰寮傚父", e); + } + } finally { + requestBase.releaseConnection(); + } + } + + private static void setBodyEntity(HttpRequestBase requestBase, ContentType contentType, Object body) { + if (body != null && requestBase instanceof HttpEntityEnclosingRequest) { + HttpEntityEnclosingRequest entityRequest = (HttpEntityEnclosingRequest) requestBase; + if (body instanceof HttpEntity) { + entityRequest.setEntity((HttpEntity) body); + } else if (body instanceof String) { + entityRequest.setEntity(getStringEntity((String) body, contentType)); + } else if (body instanceof byte[]) { + entityRequest.setEntity(new ByteArrayEntity((byte[]) body, contentType)); + } else if (body instanceof File) { + entityRequest.setEntity(new FileEntity((File) body, contentType)); + } else if (body instanceof InputStream) { + entityRequest.setEntity(new InputStreamEntity((InputStream) body, contentType)); + } else if (ContentType.APPLICATION_JSON.equals(contentType)) { + entityRequest.setEntity(getStringEntity(JSON.toJSONString(body), contentType)); + } else { + entityRequest.setEntity(getStringEntity(body.toString(), contentType)); + } + } + } + + private static StringEntity getStringEntity(String body, ContentType contentType) { + if (contentType != null && contentType.getCharset() != null) { + return new StringEntity(body, contentType); + } else { + return new StringEntity(body, CHARSET_DEFAULT); + } + } + + public static HttpRequestBase toRequest(HttpRequest request) { + String url = request.getUrl(); + String method = request.getMethod(); + if (url == null || url.isEmpty()) { + throw new RuntimeException("url涓嶈兘涓虹┖"); + } + if (method == null || method.isEmpty()) { + method = "GET"; + } + switch (method.toUpperCase()) { + case "GET": + return new HttpGet(url); + case "POST": + return new HttpPost(url); + case "PUT": + return new HttpPut(url); + case "PATCH": + return new HttpPatch(url); + case "DELETE": + return new HttpDelete(url); + default: + throw new RuntimeException("涓嶆敮鎸佺殑璇锋眰鏂瑰紡锛�" + method); + } + } + + private static HttpClient getHttpClient(HttpRequest req, HttpRequestBase request) { + RequestConfig.Builder customReqConf = RequestConfig.custom(); + if (req.getMaxSocketTimeout() != null) { + customReqConf.setSocketTimeout(req.getMaxSocketTimeout()); + } else { + customReqConf.setSocketTimeout(MAX_SOCKET_TIMEOUT); + } + customReqConf.setConnectTimeout(MAX_CONNECT_TIMEOUT); + customReqConf.setConnectionRequestTimeout(MAX_CONNECT_TIMEOUT); + if (req.getRequestConfigConsumer() != null) { + req.getRequestConfigConsumer().accept(customReqConf); + } + request.setConfig(customReqConf.build()); + return HttpClients.custom().setConnectionManager(CONNECTION_MANAGER).build(); + } + + private static Registry<ConnectionSocketFactory> getDefaultRegistry() { + try { + // ssl: TLS / TLSv1.2 / TLSv1.3 + SSLContext context = SSLContext.getInstance("TLS"); + context.init(null, new X509TrustManager[]{new X509TrustManager() { + public void checkClientTrusted(X509Certificate[] x509Certificates, String s) { + } + + public void checkServerTrusted(X509Certificate[] x509Certificates, String s) { + } + + public X509Certificate[] getAcceptedIssuers() { + return new X509Certificate[0]; + } + }}, new SecureRandom()); + return RegistryBuilder.<ConnectionSocketFactory>create().register("http", PlainConnectionSocketFactory.getSocketFactory()).register("https", new SSLConnectionSocketFactory(context)).build(); + } catch (Exception e) { + return RegistryBuilder.<ConnectionSocketFactory>create().register("http", PlainConnectionSocketFactory.getSocketFactory()).register("https", SSLConnectionSocketFactory.getSocketFactory()).build(); + } + } + + public static String toParamLinks(Map<String, Object> params, boolean encode) { + List<String> keys = new ArrayList<>(params.keySet()); + Collections.sort(keys); + StringBuilder sb = new StringBuilder(); + try { + for (String key : keys) { + if (key == null || "".equals(key)) { + continue; + } + Object value = params.get(key); + if (value == null || "".equals(value)) { + continue; + } + if (encode) { + sb.append(key).append("=").append(URLEncoder.encode(value.toString(), "UTF-8")).append("&"); + } else { + sb.append(key).append("=").append(value).append("&"); + } + } + } catch (UnsupportedEncodingException e) { + throw new RuntimeException("缂栫爜澶辫触", e); + } + if (sb.length() > 0) { + sb.setLength(sb.length() - 1); + } + return sb.toString(); + } + + public static class HttpRequest implements Serializable { + + private String url; + private String method; + private Map<String, String> headers; + private Object body; + private int maxRetryCount = 0; + private Integer maxSocketTimeout; + private Consumer<RequestConfig.Builder> requestConfigConsumer; + private Function<HttpEntity, Object> responseHandler; + + public static HttpRequest build(String url, String method) { + HttpRequest request = new HttpRequest(); + request.url = url; + request.method = method; + return request; + } + + public static HttpRequest get(String url) { + return build(url, "GET"); + } + + public static HttpRequest postJson(String url) { + return build(url, "POST").setContentType(CONTENT_TYPE_JSON); + } + + public static HttpRequest postFormData(String url) { + return build(url, "POST").setContentType(CONTENT_TYPE_FORM_DATA); + } + + public String getUrl() { + return url; + } + + public HttpRequest setUrl(String url) { + this.url = url; + return this; + } + + public String getMethod() { + return method; + } + + public HttpRequest setMethod(String method) { + this.method = method; + return this; + } + + public Map<String, String> getHeaders() { + return headers; + } + + public HttpRequest setHeaders(Map<String, String> headers) { + this.headers = headers; + return this; + } + + public HttpRequest setContentType(String contentType) { + if (this.headers == null) { + this.headers = new HashMap<>(); + } + this.headers.put(CONTENT_TYPE, contentType); + return this; + } + + public HttpRequest addHeaders(String key, Object value) { + if (headers == null) { + headers = new HashMap<>(); + } + headers.put(key, value != null ? value.toString() : null); + return this; + } + + public Object getBody() { + return body; + } + + public HttpRequest setBody(Object body) { + this.body = body; + return this; + } + + public void setMaxRetryCount(int maxRetryCount) { + this.maxRetryCount = maxRetryCount; + } + + public int getMaxRetryCount() { + return maxRetryCount; + } + + public HttpRequest setMaxSocketTimeout(Integer maxSocketTimeout) { + this.maxSocketTimeout = maxSocketTimeout; + return this; + } + + public Integer getMaxSocketTimeout() { + return maxSocketTimeout; + } + + public Consumer<RequestConfig.Builder> getRequestConfigConsumer() { + return requestConfigConsumer; + } + + public void setRequestConfigConsumer(Consumer<RequestConfig.Builder> requestConfigConsumer) { + this.requestConfigConsumer = requestConfigConsumer; + } + + public Function<HttpEntity, Object> getResponseHandler() { + return responseHandler; + } + + public HttpRequest setResponseHandler(Function<HttpEntity, Object> responseHandler) { + this.responseHandler = responseHandler; + return this; + } + } + + public static class HttpResponse implements Serializable { + + private int status; + private long reqTime; + private Object response; + private Map<String, String> headers; + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + public long getReqTime() { + return reqTime; + } + + public void setReqTime(long reqTime) { + this.reqTime = reqTime; + } + + public Object getResponse() { + return response; + } + + public String getResponseToString() { + if (response == null) { + return null; + } + return response instanceof String ? (String) response : String.valueOf(response); + } + + public JSONObject getResponseToJson() { + return JSON.parseObject(getResponseToString()); + } + + public void setResponse(Object response) { + this.response = response; + } + + public Map<String, String> getHeaders() { + return headers; + } + + public void setHeaders(Map<String, String> headers) { + this.headers = headers; + } + } + +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/util/WddPptApi.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/util/WddPptApi.java new file mode 100644 index 0000000..9693975 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/util/WddPptApi.java @@ -0,0 +1,438 @@ +package org.ruoyi.system.util; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.mime.MultipartEntityBuilder; +import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * 鏂囧澶歅PT-API + * + * @author NSL + * @since 2024-12-30 + */ +public class WddPptApi { + + public static final String BASE_URL = "https://docmee.cn"; + private static Long DEFAULT_TIME_OUT = 5 * 60 * 1000L; + + public static String createApiToken(String apiKey, String uid, Integer limit) { + String url = BASE_URL + "/api/user/createApiToken"; + JSONObject body = new JSONObject(); + body.put("uid", uid); + body.put("limit", limit); + HttpUtils.HttpRequest httpRequest = HttpUtils.HttpRequest.postJson(url); + httpRequest.setBody(body.toJSONString()); + httpRequest.addHeaders("Api-Key", apiKey); + HttpUtils.HttpResponse response = HttpUtils.request(httpRequest); + if (response.getStatus() != 200) { + throw new RuntimeException("鍒涘缓apiToken澶辫触锛宧ttpStatus=" + response.getStatus()); + } + JSONObject result = response.getResponseToJson(); + if (result.getIntValue("code") != 0) { + throw new RuntimeException("鍒涘缓apiToken寮傚父锛�" + result.getString("message")); + } + return result.getJSONObject("data").getString("token"); + } + + public static String parseFileData(String apiToken, File file, String content, String fileUrl) { + String url = BASE_URL + "/api/ppt/parseFileData"; + HttpUtils.HttpRequest httpRequest = new HttpUtils.HttpRequest(); + httpRequest.setUrl(url); + httpRequest.setMethod("POST"); + httpRequest.addHeaders("token", apiToken); + MultipartEntityBuilder multipartEntity = MultipartEntityBuilder.create(); + multipartEntity.setCharset(StandardCharsets.UTF_8); + if (file != null) { + multipartEntity.addBinaryBody("file", file); + } + if (content != null) { + multipartEntity.addTextBody("content", content, ContentType.create("text/plain", StandardCharsets.UTF_8)); + } + if (fileUrl != null) { + multipartEntity.addTextBody("fileUrl", fileUrl, ContentType.create("text/plain", StandardCharsets.UTF_8)); + } + httpRequest.setBody(multipartEntity.build()); + HttpUtils.HttpResponse response = HttpUtils.request(httpRequest); + if (response.getStatus() != 200) { + throw new RuntimeException("瑙f瀽鏂囦欢鎴栧唴瀹瑰け璐ワ紝httpStatus=" + response.getStatus()); + } + JSONObject result = response.getResponseToJson(); + if (result.getIntValue("code") != 0) { + throw new RuntimeException("瑙f瀽鏂囦欢鎴栧唴瀹瑰紓甯革紝" + result.getString("message")); + } + return result.getJSONObject("data").getString("dataUrl"); + } + + /** + * 鐢熶骇澶х翰 + */ + public static String generateOutline(String apiToken, String subject, String dataUrl, String prompt) { + String url = BASE_URL + "/api/ppt/generateOutline"; + JSONObject body = new JSONObject(); + body.put("subject", subject); + body.put("dataUrl", dataUrl); + body.put("prompt", prompt); + HttpUtils.HttpRequest httpRequest = HttpUtils.HttpRequest.postJson(url); + httpRequest.setBody(body.toJSONString()); + httpRequest.addHeaders("token", apiToken); + StringBuilder sb = new StringBuilder(); + HttpUtils.HttpResponse response = HttpUtils.requestWithEventStream(httpRequest, data -> { + if (data == null || data.isEmpty()) { + return; + } + JSONObject json = JSONObject.parseObject(data); + if (Objects.equals(json.getInteger("status"), -1)) { + throw new RuntimeException(json.getString("error")); + } + String text = json.getString("text"); + sb.append(text); + // 鎵撳嵃杈撳嚭 + System.out.print(text); + }); + if (response.getStatus() != 200) { + throw new RuntimeException("鐢熸垚澶х翰澶辫触锛宧ttpStatus=" + response.getStatus()); + } + if (response.getHeaders().getOrDefault("Content-Type", response.getHeaders().get("content-type")).contains("application/json")) { + JSONObject result = response.getResponseToJson(); + throw new RuntimeException("鐢熸垚澶х翰澶辫触锛�" + result.getString("message")); + } + return sb.toString(); + } + + /** + * 鐢熶骇澶х翰 + */ + public static SseEmitter sseGenerateOutline(String apiToken, String subject, String dataUrl, String prompt) { + String url = BASE_URL + "/api/ppt/generateOutline"; + JSONObject body = new JSONObject(); + body.put("subject", subject); + body.put("dataUrl", dataUrl); + body.put("prompt", prompt); + HttpUtils.HttpRequest httpRequest = HttpUtils.HttpRequest.postJson(url); + httpRequest.setBody(body.toJSONString()); + httpRequest.addHeaders("token", apiToken); + SseEmitter sseEmitter = new SseEmitter(DEFAULT_TIME_OUT); + StringBuilder sb = new StringBuilder(); + new Thread(() -> { + HttpUtils.HttpResponse response = HttpUtils.requestWithEventStream(httpRequest, data -> { + if (data == null || data.isEmpty()) { + return; + } + JSONObject json = JSONObject.parseObject(data); + Integer status = json.getInteger("status"); + if (Objects.equals(status, -1)) { + throw new RuntimeException(json.getString("error")); + } + String text = json.getString("text"); + try { + sseEmitter.send(SseEmitter.event().data(text)); + } catch (IOException e) { + throw new RuntimeException(e); + } + sb.append(text); + // status 4 琛ㄧず鐢熸垚瀹屾垚 + if (status == 4) { + // 鎵撳嵃杈撳嚭 + System.out.print(sb); + sseEmitter.complete(); + } + }); + if (response.getStatus() != 200) { + throw new RuntimeException("鐢熸垚澶х翰澶辫触锛宧ttpStatus=" + response.getStatus()); + } + if (response.getHeaders().getOrDefault("Content-Type", response.getHeaders().get("content-type")).contains("application/json")) { + JSONObject result = response.getResponseToJson(); + throw new RuntimeException("鐢熸垚澶х翰澶辫触锛�" + result.getString("message")); + } + }).start(); + return sseEmitter; + } + + /** + * 鐢熸垚澶х翰鍐呭 + */ + public static String generateContent(String apiToken, String outlineMarkdown, String dataUrl, String prompt) { + String url = BASE_URL + "/api/ppt/generateContent"; + JSONObject body = new JSONObject(); + body.put("outlineMarkdown", outlineMarkdown); + body.put("dataUrl", dataUrl); + body.put("prompt", prompt); + HttpUtils.HttpRequest httpRequest = HttpUtils.HttpRequest.postJson(url); + httpRequest.setBody(body.toJSONString()); + httpRequest.addHeaders("token", apiToken); + StringBuilder sb = new StringBuilder(); + HttpUtils.HttpResponse response = HttpUtils.requestWithEventStream(httpRequest, data -> { + if (data == null || data.isEmpty()) { + return; + } + JSONObject json = JSONObject.parseObject(data); + if (Objects.equals(json.getInteger("status"), -1)) { + throw new RuntimeException(json.getString("error")); + } + String text = json.getString("text"); + sb.append(text); + // 鎵撳嵃杈撳嚭 + System.out.print(text); + }); + if (response.getStatus() != 200) { + throw new RuntimeException("鐢熸垚澶х翰鍐呭澶辫触锛宧ttpStatus=" + response.getStatus()); + } + if (response.getHeaders().getOrDefault("Content-Type", response.getHeaders().get("content-type")).contains("application/json")) { + JSONObject result = response.getResponseToJson(); + throw new RuntimeException("鐢熸垚澶х翰鍐呭澶辫触锛�" + result.getString("message")); + } + return sb.toString(); + } + + /** + * 娴佸紡鐢熸垚澶х翰鍐呭 + */ + public static SseEmitter sseGenerateContent(String apiToken, String outlineMarkdown, String dataUrl, String prompt) { + String url = BASE_URL + "/api/ppt/generateContent"; + JSONObject body = new JSONObject(); + body.put("outlineMarkdown", outlineMarkdown); + body.put("dataUrl", dataUrl); + body.put("prompt", prompt); + HttpUtils.HttpRequest httpRequest = HttpUtils.HttpRequest.postJson(url); + httpRequest.setBody(body.toJSONString()); + httpRequest.addHeaders("token", apiToken); + SseEmitter sseEmitter = new SseEmitter(DEFAULT_TIME_OUT); + StringBuilder sb = new StringBuilder(); + new Thread(() -> { + HttpUtils.HttpResponse response = HttpUtils.requestWithEventStream(httpRequest, data -> { + if (data == null || data.isEmpty()) { + return; + } + JSONObject json = JSONObject.parseObject(data); + Integer status = json.getInteger("status"); + if (Objects.equals(status, -1)) { + throw new RuntimeException(json.getString("error")); + } + String text = json.getString("text"); + try { + sseEmitter.send(text); + } catch (IOException e) { + throw new RuntimeException(e); + } + sb.append(text); + // status 4 琛ㄧず鐢熸垚瀹屾垚 + if (status == 4) { + // 鎵撳嵃杈撳嚭 + System.out.print(sb); + sseEmitter.complete(); + } + }); + if (response.getStatus() != 200) { + throw new RuntimeException("鐢熸垚澶х翰鍐呭澶辫触锛宧ttpStatus=" + response.getStatus()); + } + if (response.getHeaders().getOrDefault("Content-Type", response.getHeaders().get("content-type")).contains("application/json")) { + JSONObject result = response.getResponseToJson(); + throw new RuntimeException("鐢熸垚澶х翰鍐呭澶辫触锛�" + result.getString("message")); + } + }).start(); + return sseEmitter; + } + + public static Map<String, String> asyncGenerateContent(String apiToken, String outlineMarkdown, String dataUrl, String templateId, String prompt) { + String url = BASE_URL + "/api/ppt/generateContent"; + JSONObject body = new JSONObject(); + body.put("asyncGenPptx", true); + body.put("templateId", templateId); + body.put("outlineMarkdown", outlineMarkdown); + body.put("dataUrl", dataUrl); + body.put("prompt", prompt); + HttpUtils.HttpRequest httpRequest = HttpUtils.HttpRequest.postJson(url); + httpRequest.setBody(body.toJSONString()); + httpRequest.addHeaders("token", apiToken); + Map<String, String> pptInfo = new HashMap<>(); + StringBuilder sb = new StringBuilder(); + HttpUtils.HttpResponse response = HttpUtils.requestWithEventStream(httpRequest, data -> { + if (data == null || data.isEmpty()) { + return; + } + JSONObject json = JSONObject.parseObject(data); + if (Objects.equals(json.getInteger("status"), -1)) { + throw new RuntimeException(json.getString("error")); + } + if (json.getString("pptId") != null) { + pptInfo.put("id", json.getString("pptId")); + } + String text = json.getString("text"); + sb.append(text); + // 鎵撳嵃杈撳嚭 + System.out.print(text); + }); + if (response.getStatus() != 200) { + throw new RuntimeException("鐢熸垚澶х翰鍐呭澶辫触锛宧ttpStatus=" + response.getStatus()); + } + if (response.getHeaders().getOrDefault("Content-Type", response.getHeaders().get("content-type")).contains("application/json")) { + JSONObject result = response.getResponseToJson(); + throw new RuntimeException("鐢熸垚澶х翰鍐呭澶辫触锛�" + result.getString("message")); + } + pptInfo.put("markdown", sb.toString()); + return pptInfo; + } + + public static String randomOneTemplateId(String apiToken) { + String url = BASE_URL + "/api/ppt/randomTemplates"; + JSONObject body = new JSONObject(); + body.put("size", 1); + JSONObject filters = new JSONObject(); + filters.put("type", 1); + body.put("filters", filters); + HttpUtils.HttpRequest httpRequest = HttpUtils.HttpRequest.postJson(url); + httpRequest.setBody(body.toJSONString()); + httpRequest.addHeaders("token", apiToken); + HttpUtils.HttpResponse response = HttpUtils.request(httpRequest); + if (response.getStatus() != 200) { + throw new RuntimeException("鑾峰彇妯℃澘澶辫触锛宧ttpStatus=" + response.getStatus()); + } + JSONObject result = response.getResponseToJson(); + if (result.getIntValue("code") != 0) { + throw new RuntimeException("鑾峰彇妯℃澘寮傚父锛�" + result.getString("message")); + } + JSONArray data = result.getJSONArray("data"); + JSONObject template = data.getJSONObject(0); + return template.getString("id"); + } + + /** + * 鐢熸垚PPT + */ + public static JSONObject generatePptx(String apiToken, String templateId, String markdown, boolean pptxProperty) { + String url = BASE_URL + "/api/ppt/generatePptx"; + JSONObject body = new JSONObject(); + body.put("templateId", templateId); + body.put("outlineContentMarkdown", markdown); + body.put("pptxProperty", pptxProperty); + HttpUtils.HttpRequest httpRequest = HttpUtils.HttpRequest.postJson(url); + httpRequest.setBody(body.toJSONString()); + httpRequest.addHeaders("token", apiToken); + HttpUtils.HttpResponse response = HttpUtils.request(httpRequest); + if (response.getStatus() != 200) { + throw new RuntimeException("鐢熸垚PPT澶辫触锛宧ttpStatus=" + response.getStatus()); + } + JSONObject result = response.getResponseToJson(); + if (result.getIntValue("code") != 0) { + throw new RuntimeException("鐢熸垚PPT寮傚父锛�" + result.getString("message")); + } + return result.getJSONObject("data").getJSONObject("pptInfo"); + } + + public static JSONObject downloadPptx(String apiToken, String id) { + String url = BASE_URL + "/api/ppt/downloadPptx"; + JSONObject body = new JSONObject(); + body.put("id", id); + HttpUtils.HttpRequest httpRequest = HttpUtils.HttpRequest.postJson(url); + httpRequest.setBody(body.toJSONString()); + httpRequest.addHeaders("token", apiToken); + HttpUtils.HttpResponse response = HttpUtils.request(httpRequest); + if (response.getStatus() != 200) { + throw new RuntimeException("涓嬭浇PPT澶辫触锛宧ttpStatus=" + response.getStatus()); + } + JSONObject result = response.getResponseToJson(); + if (result.getIntValue("code") != 0) { + throw new RuntimeException("涓嬭浇PPT寮傚父锛�" + result.getString("message")); + } + return result.getJSONObject("data"); + } + + public static JSONObject directGeneratePptx(String apiToken, boolean stream, String templateId, String subject, String dataUrl, String prompt, boolean pptxProperty) { + String url = BASE_URL + "/api/ppt/directGeneratePptx"; + JSONObject body = new JSONObject(); + body.put("stream", stream); + body.put("templateId", templateId); + body.put("subject", subject); + body.put("dataUrl", dataUrl); + body.put("prompt", prompt); + body.put("pptxProperty", pptxProperty); + HttpUtils.HttpRequest httpRequest = HttpUtils.HttpRequest.postJson(url); + httpRequest.setBody(body.toJSONString()); + httpRequest.addHeaders("token", apiToken); + if (stream) { + // 娴佸紡鐢熸垚 + JSONObject[] pptInfo = new JSONObject[1]; + HttpUtils.HttpResponse response = HttpUtils.requestWithEventStream(httpRequest, data -> { + if (data == null || data.isEmpty()) { + return; + } + JSONObject json = JSONObject.parseObject(data); + if (Objects.equals(json.getInteger("status"), -1)) { + throw new RuntimeException(json.getString("error")); + } + if (Objects.equals(json.getInteger("status"), 4) && json.containsKey("result")) { + pptInfo[0] = json.getJSONObject("result"); + } + String text = json.getString("text"); + // 鎵撳嵃杈撳嚭 + System.out.print(text); + }); + if (response.getStatus() != 200) { + throw new RuntimeException("鐢熸垚PPT澶辫触锛宧ttpStatus=" + response.getStatus()); + } + if (response.getHeaders().getOrDefault("Content-Type", response.getHeaders().get("content-type")).contains("application/json")) { + JSONObject result = response.getResponseToJson(); + throw new RuntimeException("鐢熸垚PPT澶辫触锛�" + result.getString("message")); + } + return pptInfo[0]; + } else { + // 闈炴祦寮忕敓鎴� + HttpUtils.HttpResponse response = HttpUtils.request(httpRequest); + if (response.getStatus() != 200) { + throw new RuntimeException("鐢熸垚PPT澶辫触锛宧ttpStatus=" + response.getStatus()); + } + JSONObject result = response.getResponseToJson(); + if (result.getIntValue("code") != 0) { + throw new RuntimeException("鐢熸垚PPT寮傚父锛�" + result.getString("message")); + } + return result.getJSONObject("data").getJSONObject("pptInfo"); + } + } + + /** + * 鏌ヨ鎵�鏈塒PT鍒楄〃 + */ + public static JSONObject listAllPptx(String apiToken, String body) { + String url = BASE_URL + "/api/ppt/listAllPptx"; + HttpUtils.HttpRequest httpRequest = HttpUtils.HttpRequest.postJson(url); + httpRequest.setBody(body); + httpRequest.addHeaders("token", apiToken); + HttpUtils.HttpResponse response = HttpUtils.request(httpRequest); + if (response.getStatus() != 200) { + throw new RuntimeException("鏌ヨ鎵�鏈塒PT鍒楄〃澶辫触锛宧ttpStatus=" + response.getStatus()); + } + JSONObject result = response.getResponseToJson(); + if (result.getIntValue("code") != 0) { + throw new RuntimeException("鏌ヨ鎵�鏈塒PT鍒楄〃寮傚父锛�" + result.getString("message")); + } + return result; + } + + /** + * 鍒嗛〉鏌ヨ PPT 妯℃澘 + */ + public static JSONObject getPptTemplates(String apiToken, String body) { + String url = BASE_URL + "/api/ppt/templates"; + HttpUtils.HttpRequest httpRequest = HttpUtils.HttpRequest.postJson(url); + httpRequest.setBody(body); + httpRequest.addHeaders("token", apiToken); + HttpUtils.HttpResponse response = HttpUtils.request(httpRequest); + if (response.getStatus() != 200) { + throw new RuntimeException("鍒嗛〉鏌ヨ PPT 妯℃澘澶辫触锛宧ttpStatus=" + response.getStatus()); + } + JSONObject result = response.getResponseToJson(); + if (result.getIntValue("code") != 0) { + throw new RuntimeException("鍒嗛〉鏌ヨ PPT 妯℃澘寮傚父锛�" + result.getString("message")); + } + return result; + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/util/WeChatScanHttpUtil.java b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/util/WeChatScanHttpUtil.java new file mode 100644 index 0000000..b303d77 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/ruoyi/system/util/WeChatScanHttpUtil.java @@ -0,0 +1,59 @@ +package org.ruoyi.system.util; + +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import okhttp3.*; +import org.ruoyi.common.core.service.ConfigService; +import org.springframework.stereotype.Component; + +import java.io.IOException; +import java.util.concurrent.TimeUnit; + +/** + * 缁樺0缇庨煶HTTP璇锋眰宸ュ叿绫� + * + * @author NSL + * @since 2024-12-25 + */ +@RequiredArgsConstructor +@Component +@Slf4j +public class WeChatScanHttpUtil { + + private final ConfigService configService; + + private static final String TOKEN = "token"; + + private final OkHttpClient client = new OkHttpClient.Builder() + .connectTimeout(300, TimeUnit.SECONDS) + .writeTimeout(300, TimeUnit.SECONDS) + .readTimeout(300, TimeUnit.SECONDS) + .build(); + + public String executeRequest(Request request) { + try (Response response = client.newCall(request).execute()) { + if (!response.isSuccessful()) { + throw new IOException("Unexpected code " + response); + } + return response.body() != null ? response.body().string() : null; + } catch (IOException e) { + // 杩欓噷搴旀牴鎹疄闄呮儏鍐典娇鐢ㄩ�傚綋鐨勬棩蹇楄褰曟柟寮� + log.error("璇锋眰澶辫触: {}",e.getMessage()); + return null; + } + } + + public Request createPostRequest(String url, String json) { + RequestBody body = RequestBody.create(json, MediaType.get("application/json; charset=utf-8")); + return new Request.Builder() + .url(url) + .post(body) + .header("Content-Type", "application/json") + .header(TOKEN, getKey(TOKEN)) + .build(); + } + + public String getKey(String key) { + return configService.getConfigValue("cover", key); + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/package-info.md b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/package-info.md deleted file mode 100644 index c938b1e..0000000 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/package-info.md +++ /dev/null @@ -1,3 +0,0 @@ -java鍖呬娇鐢� `.` 鍒嗗壊 resource 鐩綍浣跨敤 `/` 鍒嗗壊 -<br> -姝ゆ枃浠剁洰鐨� 闃叉鏂囦欢澶圭矘杩炴壘涓嶅埌 `xml` 鏂囦欢 \ No newline at end of file diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CoverMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CoverMapper.xml new file mode 100644 index 0000000..b574532 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CoverMapper.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE mapper +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="org.ruoyi.system.mapper.CoverMapper"> + +</mapper> diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CoverPromptAudioMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CoverPromptAudioMapper.xml new file mode 100644 index 0000000..0871a29 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CoverPromptAudioMapper.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE mapper +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="org.ruoyi.system.mapper.CoverPromptAudioMapper"> + + <select id="selectLatestVoByUserId" resultType="org.ruoyi.system.domain.vo.cover.CoverPromptAudioVo"> + SELECT + user_id, + cover_id, + prompt_audio_url + FROM + chat_cover_prompt_audio + WHERE + cover_id = ( SELECT cover_id FROM chat_cover_prompt_audio WHERE user_id = #{userId} ORDER BY create_time DESC LIMIT 1 ) + </select> +</mapper> diff --git a/script/bin/ry.bat b/script/bin/ry.bat deleted file mode 100644 index 94434a9..0000000 --- a/script/bin/ry.bat +++ /dev/null @@ -1,68 +0,0 @@ -rem 浣跨敤鑰呭簲鏍规嵁鑷韩骞冲彴缂栫爜鑷杞崲 闃叉涔辩爜 渚嬪 win浣跨敤gbk缂栫爜 -@echo off - -rem jar骞崇骇鐩綍 -set AppName=ruoyi-admin.jar - -rem JVM鍙傛暟 -set JVM_OPTS="-Dname=%AppName% -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC" - - -ECHO. - ECHO. [1] 鍚姩%AppName% - ECHO. [2] 鍏抽棴%AppName% - ECHO. [3] 閲嶅惎%AppName% - ECHO. [4] 鍚姩鐘舵�� %AppName% - ECHO. [5] 閫� 鍑� -ECHO. - -ECHO.璇疯緭鍏ラ�夋嫨椤圭洰鐨勫簭鍙�: -set /p ID= - IF "%id%"=="1" GOTO start - IF "%id%"=="2" GOTO stop - IF "%id%"=="3" GOTO restart - IF "%id%"=="4" GOTO status - IF "%id%"=="5" EXIT -PAUSE -:start - for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do ( - set pid=%%a - set image_name=%%b - ) - if defined pid ( - echo %%is running - PAUSE - ) - -start javaw %JVM_OPTS% -jar %AppName% - -echo starting鈥︹�� -echo Start %AppName% success... -goto:eof - -rem 鍑芥暟stop閫氳繃jps鍛戒护鏌ユ壘pid骞剁粨鏉熻繘绋� -:stop - for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do ( - set pid=%%a - set image_name=%%b - ) - if not defined pid (echo process %AppName% does not exists) else ( - echo prepare to kill %image_name% - echo start kill %pid% ... - rem 鏍规嵁杩涚▼ID锛宬ill杩涚▼ - taskkill /f /pid %pid% - ) -goto:eof -:restart - call :stop - call :start -goto:eof -:status - for /f "usebackq tokens=1-2" %%a in (`jps -l ^| findstr %AppName%`) do ( - set pid=%%a - set image_name=%%b - ) - if not defined pid (echo process %AppName% is dead ) else ( - echo %image_name% is running - ) -goto:eof diff --git a/script/bin/ry.sh b/script/bin/ry.sh deleted file mode 100644 index 0cf5ce9..0000000 --- a/script/bin/ry.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/sh -# ./ry.sh start 鍚姩 stop 鍋滄 restart 閲嶅惎 status 鐘舵�� -AppName=ruoyi-admin.jar - -# JVM鍙傛暟 -JVM_OPTS="-Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms512m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC" -APP_HOME=`pwd` -LOG_PATH=$APP_HOME/logs/$AppName.log - -if [ "$1" = "" ]; -then - echo -e "\033[0;31m 鏈緭鍏ユ搷浣滃悕 \033[0m \033[0;34m {start|stop|restart|status} \033[0m" - exit 1 -fi - -if [ "$AppName" = "" ]; -then - echo -e "\033[0;31m 鏈緭鍏ュ簲鐢ㄥ悕 \033[0m" - exit 1 -fi - -function start() -{ - PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'` - - if [ x"$PID" != x"" ]; then - echo "$AppName is running..." - else - nohup java $JVM_OPTS -jar $AppName > /dev/null 2>&1 & - echo "Start $AppName success..." - fi -} - -function stop() -{ - echo "Stop $AppName" - - PID="" - query(){ - PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'` - } - - query - if [ x"$PID" != x"" ]; then - kill -TERM $PID - echo "$AppName (pid:$PID) exiting..." - while [ x"$PID" != x"" ] - do - sleep 1 - query - done - echo "$AppName exited." - else - echo "$AppName already stopped." - fi -} - -function restart() -{ - stop - sleep 2 - start -} - -function status() -{ - PID=`ps -ef |grep java|grep $AppName|grep -v grep|wc -l` - if [ $PID != 0 ];then - echo "$AppName is running..." - else - echo "$AppName is not running..." - fi -} - -case $1 in - start) - start;; - stop) - stop;; - restart) - restart;; - status) - status;; - *) - -esac diff --git a/script/docker/.env b/script/docker/.env deleted file mode 100644 index 69c2a7e..0000000 --- a/script/docker/.env +++ /dev/null @@ -1,5 +0,0 @@ -CHAT_API_KEY= sk-xx -CHAT_API_HOST=https://api.pandarobot.chat/ -MAIL_PASS=your_mail_pass -PAY_PID=your_pay_pid -PAY_KEY=your_pay_key diff --git a/script/docker/milvus/docker-compose.yml b/script/docker/milvus/docker-compose.yml new file mode 100644 index 0000000..37506be --- /dev/null +++ b/script/docker/milvus/docker-compose.yml @@ -0,0 +1,63 @@ +version: '3.5' + +services: + etcd: + container_name: milvus-etcd + image: quay.io/coreos/etcd:v3.5.5 + environment: + - ETCD_AUTO_COMPACTION_MODE=revision + - ETCD_AUTO_COMPACTION_RETENTION=1000 + - ETCD_QUOTA_BACKEND_BYTES=4294967296 + - ETCD_SNAPSHOT_COUNT=50000 + volumes: + - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/etcd:/etcd + command: etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd + healthcheck: + test: ["CMD", "etcdctl", "endpoint", "health"] + interval: 30s + timeout: 20s + retries: 3 + + minio: + container_name: milvus-minio + image: minio/minio:RELEASE.2023-03-20T20-16-18Z + environment: + MINIO_ACCESS_KEY: minioadmin + MINIO_SECRET_KEY: minioadmin + ports: + - "9001:9001" + - "9000:9000" + volumes: + - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/minio:/minio_data + command: minio server /minio_data --console-address ":9001" + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] + interval: 30s + timeout: 20s + retries: 3 + + standalone: + container_name: milvus-standalone + image: milvusdb/milvus:v2.3.1 + command: ["milvus", "run", "standalone"] + environment: + ETCD_ENDPOINTS: etcd:2379 + MINIO_ADDRESS: minio:9000 + volumes: + - ${DOCKER_VOLUME_DIRECTORY:-.}/volumes/milvus:/var/lib/milvus + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:9091/healthz"] + interval: 30s + start_period: 90s + timeout: 20s + retries: 3 + ports: + - "19530:19530" + - "9091:9091" + depends_on: + - "etcd" + - "minio" + +networks: + default: + name: milvus diff --git a/script/docker/ruoyi-ai.sql b/script/docker/ruoyi-ai.sql new file mode 100644 index 0000000..c60acaa --- /dev/null +++ b/script/docker/ruoyi-ai.sql @@ -0,0 +1,2594 @@ +/* + Navicat MySQL Data Transfer + + Source Server : ry-vue + Source Server Type : MySQL + Source Server Version : 50740 + Source Host : 127.0.0.1:3306 + Source Schema : ry-vue + + Target Server Type : MySQL + Target Server Version : 50740 + File Encoding : 65001 + + Date: 27/05/2024 17:34:48 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for chat_config +-- ---------------------------- +DROP TABLE IF EXISTS `chat_config`; +CREATE TABLE `chat_config` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '涓婚敭', + `category` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '閰嶇疆绫诲瀷', + `config_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '閰嶇疆鍚嶇О', + `config_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '閰嶇疆鍊�', + `config_dict` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '璇存槑', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鍒涘缓鑰�', + `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + `version` int(11) NULL DEFAULT NULL COMMENT '鐗堟湰', + `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 1浠h〃鍒犻櫎锛�', + `update_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏇存柊IP', + `tenant_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '绉熸埛Id', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `unique_category_key`(`category`, `config_name`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1794956871156207618 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '閰嶇疆淇℃伅琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of chat_config +-- ---------------------------- +INSERT INTO `chat_config` VALUES (1779450794448789505, 'chat', 'apiKey', 'sk-xx', 'API 瀵嗛挜', 103, '2024-04-14 18:05:05', '1', '1', '2024-04-23 23:56:54', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1779450794872414210, 'chat', 'apiHost', 'https://api.pandarobot.chat/', 'API 鍦板潃', 103, '2024-04-14 18:05:05', '1', '1', '2024-04-23 23:56:54', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1779497340548784129, 'pay', 'pid', '1000', '鍟嗘埛PID', 103, '2024-04-14 21:10:02', '1', '1', '2024-04-28 17:46:31', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1779497340938854401, 'pay', 'key', 'xx', '鍟嗘埛瀵嗛挜', 103, '2024-04-14 21:10:02', '1', '1', '2024-04-28 17:46:31', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1779497341135986690, 'pay', 'payUrl', 'https://pay.pandarobot.chat/mapi.php', '鏀粯鍦板潃', 103, '2024-04-14 21:10:02', '1', '1', '2024-04-28 17:46:31', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1779497341400227842, 'pay', 'notify_url', 'https://www.pandarobot.chat/pay/notifyUrl', '鍥炶皟鍦板潃', 103, '2024-04-14 21:10:02', '1', '1', '2024-04-28 17:46:31', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1779497341588971522, 'pay', 'return_url', 'https://www.pandarobot.chat/pay/returnUrl', '璺宠浆閫氱煡', 103, '2024-04-14 21:10:02', '1', '1', '2024-04-28 17:46:31', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1779513580331835394, 'mail', 'host', 'smtp.163.com', '涓绘満鍦板潃', 103, '2024-04-14 22:14:34', '1', '1', '2024-04-28 17:46:46', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1779513580658991106, 'mail', 'port', '465', '涓绘満绔彛', 103, '2024-04-14 22:14:34', '1', '1', '2024-04-28 17:46:46', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1779513580919037953, 'mail', 'from', 'ageerle@163.com', '鍙戦�佹柟', 103, '2024-04-14 22:14:34', '1', '1', '2024-04-28 17:46:46', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1779513581107781634, 'mail', 'user', 'ageerle@163.com', '鐢ㄦ埛鍚�', 103, '2024-04-14 22:14:34', '1', '1', '2024-04-28 17:46:46', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1779513581309108225, 'mail', 'pass', 'xx', '鎺堟潈鐮�', 103, '2024-04-14 22:14:34', '1', '1', '2024-04-28 17:46:46', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1779726450625687553, 'mj', 'apiKey', 'sk-xx', 'API 瀵嗛挜', 103, '2024-04-15 12:20:26', '1', '1', '2024-04-23 23:56:58', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1779726451036729346, 'mj', 'apiHost', 'https://api.pandarobot.chat/', 'API 鍦板潃', 103, '2024-04-15 12:20:26', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1782331509679181825, 'mj', 'imagine', '0.3', '鏂囩敓鍥�', 103, '2024-04-22 16:52:01', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1782331509939228674, 'mj', 'blend', '0.3', '鍥剧敓鍥�', 103, '2024-04-22 16:52:01', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1782331510199275522, 'mj', 'describe', '0.1', '鍥剧敓鏂�', 103, '2024-04-22 16:52:01', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1782331510392213505, 'mj', 'change', '0.3', '鍙樺寲浠锋牸', 103, '2024-04-22 16:52:01', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1782331510652260353, 'mj', 'upsample', '0.1', '鏀惧ぇ浠锋牸', 103, '2024-04-22 16:52:01', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1782331510845198338, 'mj', 'inpaint', '0.3', '灞�閮ㄩ噸缁�', 103, '2024-04-22 16:52:01', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1782331511117828098, 'mj', 'faceSwapping', '0.3', '鎹㈣劯浠锋牸', 103, '2024-04-22 16:52:01', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1782331511306571778, 'mj', 'shorten', '0.1', '鎻愮ず璇嶅垎鏋�', 103, '2024-04-22 16:52:01', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1782766864937119746, 'mail', 'amount', '1', '娉ㄥ唽棰濆害', 103, '2024-04-23 21:41:57', '1', '1', '2024-04-28 17:46:47', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1784166479104135169, 'audio', 'apiKey', 'xx', 'API 瀵嗛挜', 103, '2024-04-27 18:23:31', '1', '1', '2024-04-27 18:24:31', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1784166479615840258, 'audio', 'apiHost', 'https://v1.reecho.cn/', 'API 鍦板潃', 103, '2024-04-27 18:23:32', '1', '1', '2024-04-27 18:24:31', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1786058372188569602, 'review', 'enabled', 'false', '鏂囨湰瀹℃牳', 103, '2024-05-02 23:41:14', '1', '1', '2024-05-03 01:18:50', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1786058372637360129, 'review', 'apiKey', 'xx', 'apiKey', 103, '2024-05-02 23:41:14', '1', '1', '2024-05-03 01:18:50', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1786058372897406977, 'review', 'secretKey', 'xx', 'secretKey', 103, '2024-05-02 23:41:14', '1', '1', '2024-05-03 01:18:50', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1792069350789324801, 'weixin', 'appId', 'xx', '搴旂敤ID', 103, '2024-05-19 13:46:43', '1', '1', '2024-05-19 22:34:39', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1792069351246503938, 'weixin', 'appSecret', 'xx', '搴旂敤瀵嗛挜', 103, '2024-05-19 13:46:43', '1', '1', '2024-05-19 22:34:39', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1792069351246503939, 'weixin', 'mchId', 'xx', '鍟嗘埛ID', 103, '2024-05-19 13:46:43', '1', '1', '2024-05-19 22:34:39', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1792183360796790785, 'weixin', 'notifyUrl', 'https://www.pandarobot.chat/pay/notify/wxOrder', '鍥炶皟鍦板潃', 103, '2024-05-19 21:19:45', '1', '1', '2024-05-19 22:34:40', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1792183361065226241, 'weixin', 'enabled', 'false', '寮�鍚敮浠�', 103, '2024-05-19 21:19:45', '1', '1', '2024-05-19 22:34:40', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1792207511704100866, 'sys', 'name', '鐔婄尗鍔╂墜鍚庡彴绠$悊绯荤粺', '缃戠珯鍚嶇О', 103, '2024-05-19 22:55:43', '1', '1', '2024-05-19 23:24:19', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1792207512089976834, 'sys', 'logoImage', 'http://panda-1253683406.cos.ap-guangzhou.myqcloud.com/panda/2024/05/19/4c106628754b4bd882a4c002eaa317f5.jpg', '缃戠珯logo', 103, '2024-05-19 22:55:43', '1', '1', '2024-05-19 23:24:19', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1792207512412938241, 'sys', 'copyright', 'Copyright 漏 婧邯缃戠粶绉戞妧宸ヤ綔瀹� 閯侷CP澶�2023007672鍙�-1', '鐗堟潈淇℃伅', 103, '2024-05-19 22:55:43', '1', '1', '2024-05-19 23:24:20', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1792207512740093954, 'sys', 'customImage', 'http://panda-1253683406.cos.ap-guangzhou.myqcloud.com/panda/2024/05/19/2faba7a5fa174d7c8d573ce3f031ec51.jpg', '瀹㈡湇浜岀淮鐮�', 103, '2024-05-19 22:55:43', '1', '1', '2024-05-19 23:24:20', NULL, NULL, '0', NULL, 0); +INSERT INTO `chat_config` VALUES (1792207512740093955, 'sys', 'activate', 'false', '绯荤粺婵�娲荤姸鎬�', 103, '2024-05-19 22:55:43', '1', '1', '2024-05-27 13:03:23', NULL, NULL, '0', NULL, 0); + +-- ---------------------------- +-- Table structure for chat_message +-- ---------------------------- +DROP TABLE IF EXISTS `chat_message`; +CREATE TABLE `chat_message` ( + `id` bigint(20) NOT NULL COMMENT '涓婚敭', + `user_id` bigint(20) NOT NULL COMMENT '鐢ㄦ埛id', + `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '娑堟伅鍐呭', + `deduct_cost` double(20, 2) NULL DEFAULT 0.00 COMMENT '鎵i櫎閲戦\r\n\r\n', + `total_tokens` int(20) NULL DEFAULT NULL COMMENT '绱 Tokens', + `model_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '妯″瀷鍚嶇О', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鑱婂ぉ娑堟伅琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of chat_message +-- ---------------------------- + +-- ---------------------------- +-- Table structure for chat_sensitive_word +-- ---------------------------- +DROP TABLE IF EXISTS `chat_sensitive_word`; +CREATE TABLE `chat_sensitive_word` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '涓婚敭', + `word` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鏁忔劅璇嶅唴瀹�', + `status` int(11) NOT NULL COMMENT '鐘舵�� 1 鍚敤 2 鍋滅敤', + `is_deleted` int(11) NULL DEFAULT 0 COMMENT '鏄惁鍒犻櫎 0 鍚� NULL 鏄�', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '鍒涘缓鏃堕棿', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '鏇存柊鏃堕棿', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鏁忔劅璇嶈〃' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of chat_sensitive_word +-- ---------------------------- + +-- ---------------------------- +-- Table structure for chat_token +-- ---------------------------- +DROP TABLE IF EXISTS `chat_token`; +CREATE TABLE `chat_token` ( + `id` bigint(20) NOT NULL COMMENT '涓婚敭', + `user_id` bigint(20) NOT NULL COMMENT '鐢ㄦ埛', + `token` int(10) NULL DEFAULT NULL COMMENT '寰呯粨绠梩oken', + `model_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '妯″瀷鍚嶇О', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'token淇℃伅' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of chat_token +-- ---------------------------- + +-- ---------------------------- +-- Table structure for chat_voucher +-- ---------------------------- +DROP TABLE IF EXISTS `chat_voucher`; +CREATE TABLE `chat_voucher` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '涓婚敭', + `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鍏戞崲鐮�', + `amount` double(10, 2) NOT NULL COMMENT '鍏戞崲閲戦', + `user_id` bigint(20) NULL DEFAULT NULL COMMENT '鐢ㄦ埛id', + `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '鍏戞崲鐘舵��', + `balance_before` double(10, 2) NULL DEFAULT NULL COMMENT '鍏戞崲鍓嶄綑棰�', + `balance_after` double(10, 2) NULL DEFAULT NULL COMMENT '鍏戞崲鍚庝綑棰�', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鍒涘缓鑰�', + `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1786392743269474307 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐢ㄦ埛鍏戞崲璁板綍' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of chat_voucher +-- ---------------------------- + +-- ---------------------------- +-- Table structure for gen_table +-- ---------------------------- +DROP TABLE IF EXISTS `gen_table`; +CREATE TABLE `gen_table` ( + `table_id` bigint(20) NOT NULL COMMENT '缂栧彿', + `table_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '琛ㄥ悕绉�', + `table_comment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '琛ㄦ弿杩�', + `sub_table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鍏宠仈瀛愯〃鐨勮〃鍚�', + `sub_table_fk_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '瀛愯〃鍏宠仈鐨勫閿悕', + `class_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '瀹炰綋绫诲悕绉�', + `tpl_category` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'crud' COMMENT '浣跨敤鐨勬ā鏉匡紙crud鍗曡〃鎿嶄綔 tree鏍戣〃鎿嶄綔锛�', + `package_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鐢熸垚鍖呰矾寰�', + `module_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鐢熸垚妯″潡鍚�', + `business_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鐢熸垚涓氬姟鍚�', + `function_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鐢熸垚鍔熻兘鍚�', + `function_author` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鐢熸垚鍔熻兘浣滆��', + `gen_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鐢熸垚浠g爜鏂瑰紡锛�0zip鍘嬬缉鍖� 1鑷畾涔夎矾寰勶級', + `gen_path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '/' COMMENT '鐢熸垚璺緞锛堜笉濉粯璁ら」鐩矾寰勶級', + `options` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鍏跺畠鐢熸垚閫夐」', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + PRIMARY KEY (`table_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '浠g爜鐢熸垚涓氬姟琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of gen_table +-- ---------------------------- +INSERT INTO `gen_table` VALUES (1661288222902505474, 'sys_notice', '閫氱煡鍏憡琛�', NULL, NULL, 'SysNotice', 'crud', 'org.dromara.system', 'system', 'notice', '閫氱煡鍏憡', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:11', 1, '2023-05-20 18:05:11', NULL); +INSERT INTO `gen_table` VALUES (1661288223338713089, 'sys_oper_log', '鎿嶄綔鏃ュ織璁板綍', NULL, NULL, 'SysOperLog', 'crud', 'org.dromara.system', 'system', 'operLog', '鎿嶄綔鏃ュ織璁板綍', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:11', 1, '2023-05-20 18:05:11', NULL); +INSERT INTO `gen_table` VALUES (1661288223477125122, 'sys_oss', 'OSS瀵硅薄瀛樺偍琛�', NULL, NULL, 'SysOss', 'crud', 'org.dromara.system', 'system', 'oss', 'OSS瀵硅薄瀛樺偍', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:11', 1, '2023-05-20 18:05:11', NULL); +INSERT INTO `gen_table` VALUES (1661288223586177025, 'sys_oss_config', '瀵硅薄瀛樺偍閰嶇疆琛�', NULL, NULL, 'SysOssConfig', 'crud', 'org.dromara.system', 'system', 'ossConfig', '瀵硅薄瀛樺偍閰嶇疆', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:11', 1, '2023-05-20 18:05:11', NULL); +INSERT INTO `gen_table` VALUES (1661288223728783361, 'sys_post', '宀椾綅淇℃伅琛�', NULL, NULL, 'SysPost', 'crud', 'org.dromara.system', 'system', 'post', '宀椾綅淇℃伅', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:11', 1, '2023-05-20 18:05:11', NULL); +INSERT INTO `gen_table` VALUES (1661288223821058050, 'sys_role', '瑙掕壊淇℃伅琛�', NULL, NULL, 'SysRole', 'crud', 'org.dromara.system', 'system', 'role', '瑙掕壊淇℃伅', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:11', 1, '2023-05-20 18:05:11', NULL); +INSERT INTO `gen_table` VALUES (1661288223925915650, 'sys_user_post', '鐢ㄦ埛涓庡矖浣嶅叧鑱旇〃', NULL, NULL, 'SysUserPost', 'crud', 'org.dromara.system', 'system', 'userPost', '鐢ㄦ埛涓庡矖浣嶅叧鑱�', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:11', 1, '2023-05-20 18:05:11', NULL); +INSERT INTO `gen_table` VALUES (1661288223967858689, 'sys_user_role', '鐢ㄦ埛鍜岃鑹插叧鑱旇〃', NULL, NULL, 'SysUserRole', 'crud', 'org.dromara.system', 'system', 'userRole', '鐢ㄦ埛鍜岃鑹插叧鑱�', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:11', 1, '2023-05-20 18:05:11', NULL); +INSERT INTO `gen_table` VALUES (1661288385096241154, 'sys_config', '鍙傛暟閰嶇疆琛�', NULL, NULL, 'SysConfig', 'crud', 'org.dromara.system', 'system', 'config', '鍙傛暟閰嶇疆', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:10', 1, '2023-05-20 18:05:10', NULL); +INSERT INTO `gen_table` VALUES (1680196323445579778, 'sys_file_detail', '鏂囦欢璁板綍琛�', NULL, NULL, 'SysFileDetail', 'crud', 'org.ruoyi.system', 'system', 'fileDetail', '鏂囦欢璁板綍', 'Lion Li', '0', '/', NULL, 103, 1, '2023-07-15 20:40:00', 1, '2023-07-15 20:40:00', NULL); +INSERT INTO `gen_table` VALUES (1680196323521077249, 'sys_file_detail', '鏂囦欢璁板綍琛�', NULL, NULL, 'SysFileDetail', 'crud', 'org.ruoyi.system', 'system', 'fileDetail', '鏂囦欢璁板綍', 'Lion Li', '0', '/', NULL, 103, 1, '2023-07-15 20:40:00', 1, '2023-07-15 20:40:00', NULL); +INSERT INTO `gen_table` VALUES (1680199147407806465, 'sys_file_info', '鏂囦欢璁板綍琛�', NULL, NULL, 'SysFileInfo', 'crud', 'org.ruoyi.system', 'system', 'fileInfo', '鏂囦欢璁板綍', 'Lion Li', '0', '/', NULL, 103, 1, '2023-07-15 20:53:56', 1, '2023-07-15 20:53:56', NULL); +INSERT INTO `gen_table` VALUES (1680481752850145282, 'sd_model_param', '妯″瀷鍙傛暟淇℃伅琛�', NULL, NULL, 'SdModelParam', 'crud', 'org.ruoyi.system', 'system', 'modelParam', '妯″瀷鍙傛暟淇℃伅', 'Lion Li', '0', '/', NULL, 103, 1, '2023-07-16 15:18:34', 1, '2023-07-16 15:18:34', NULL); +INSERT INTO `gen_table` VALUES (1740573614897897473, 'payment_orders', '鏀粯璁㈠崟琛�', NULL, NULL, 'PaymentOrders', 'crud', 'org.ruoyi.system', 'system', 'orders', '鏀粯璁㈠崟', 'Lion Li', '0', '/', NULL, 103, 1, '2023-12-27 23:04:45', 1, '2023-12-27 23:04:45', NULL); +INSERT INTO `gen_table` VALUES (1775895242171076610, 'sys_model', '绯荤粺妯″瀷', NULL, NULL, 'SysModel', 'crud', 'org.ruoyi.system', 'system', 'model', '绯荤粺妯″瀷', 'Lion Li', '0', '/', NULL, 103, 1, '2024-04-04 22:27:08', 1, '2024-04-04 22:27:08', NULL); +INSERT INTO `gen_table` VALUES (1785390411861803009, 'wx_rob_config', '寰俊鏈哄櫒浜虹鐞�', NULL, NULL, 'WxRobConfig', 'crud', 'org.ruoyi.system', 'system', 'robConfig', 'robot', 'Lion Li', '0', '/', '{\"treeCode\":null,\"treeName\":null,\"treeParentCode\":null,\"parentMenuId\":null}', 103, 1, '2024-05-01 01:10:04', 1, '2024-05-03 21:00:51', NULL); +INSERT INTO `gen_table` VALUES (1785390413745045505, 'wx_rob_keyword', '', NULL, NULL, 'WxRobKeyword', 'crud', 'org.ruoyi.system', 'system', 'robKeyword', '', 'Lion Li', '0', '/', NULL, 103, 1, '2024-04-30 23:51:44', 1, '2024-04-30 23:51:44', NULL); +INSERT INTO `gen_table` VALUES (1785390414860730369, 'wx_rob_relation', '', NULL, NULL, 'WxRobRelation', 'crud', 'org.ruoyi.system', 'system', 'robRelation', '', 'Lion Li', '0', '/', NULL, 103, 1, '2024-04-30 23:51:44', 1, '2024-04-30 23:51:44', NULL); +INSERT INTO `gen_table` VALUES (1786379560181882881, 'chat_voucher', '鐢ㄦ埛鍏戞崲璁板綍', NULL, NULL, 'ChatVoucher', 'crud', 'org.ruoyi.system', 'system', 'voucher', '鐢ㄦ埛鍏戞崲璁板綍', 'Lion Li', '0', '/', NULL, 103, 1, '2024-05-03 20:57:18', 1, '2024-05-03 20:57:18', NULL); +INSERT INTO `gen_table` VALUES (1789155611035381761, 'sys_notice_state', '鐢ㄦ埛闃呰鐘舵�佽〃', NULL, NULL, 'SysNoticeState', 'crud', 'org.ruoyi.system', 'system', 'noticeState', '鐢ㄦ埛闃呰鐘舵��', 'Lion Li', '0', '/', NULL, 103, 1, '2024-05-11 12:48:14', 1, '2024-05-11 12:48:14', NULL); + +-- ---------------------------- +-- Table structure for gen_table_column +-- ---------------------------- +DROP TABLE IF EXISTS `gen_table_column`; +CREATE TABLE `gen_table_column` ( + `column_id` bigint(20) NOT NULL COMMENT '缂栧彿', + `table_id` bigint(20) NULL DEFAULT NULL COMMENT '褰掑睘琛ㄧ紪鍙�', + `column_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鍒楀悕绉�', + `column_comment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鍒楁弿杩�', + `column_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鍒楃被鍨�', + `java_type` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'JAVA绫诲瀷', + `java_field` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'JAVA瀛楁鍚�', + `is_pk` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄惁涓婚敭锛�1鏄級', + `is_increment` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄惁鑷锛�1鏄級', + `is_required` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄惁蹇呭~锛�1鏄級', + `is_insert` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄惁涓烘彃鍏ュ瓧娈碉紙1鏄級', + `is_edit` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄惁缂栬緫瀛楁锛�1鏄級', + `is_list` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄惁鍒楄〃瀛楁锛�1鏄級', + `is_query` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄惁鏌ヨ瀛楁锛�1鏄級', + `query_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'EQ' COMMENT '鏌ヨ鏂瑰紡锛堢瓑浜庛�佷笉绛変簬銆佸ぇ浜庛�佸皬浜庛�佽寖鍥达級', + `html_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄剧ず绫诲瀷锛堟枃鏈銆佹枃鏈煙銆佷笅鎷夋銆佸閫夋銆佸崟閫夋銆佹棩鏈熸帶浠讹級', + `dict_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '瀛楀吀绫诲瀷', + `sort` int(11) NULL DEFAULT NULL COMMENT '鎺掑簭', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + PRIMARY KEY (`column_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '浠g爜鐢熸垚涓氬姟琛ㄥ瓧娈�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of gen_table_column +-- ---------------------------- +INSERT INTO `gen_table_column` VALUES (1661288223078666241, 1661288222902505474, 'notice_id', '鍏憡ID', 'bigint(20)', 'Long', 'noticeId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223108026369, 1661288222902505474, 'tenant_id', '绉熸埛缂栧彿', 'varchar(20)', 'String', 'tenantId', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223108026370, 1661288222902505474, 'notice_title', '鍏憡鏍囬', 'varchar(50)', 'String', 'noticeTitle', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223108026371, 1661288222902505474, 'notice_type', '鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛�', 'char(1)', 'String', 'noticeType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 4, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223108026372, 1661288222902505474, 'notice_content', '鍏憡鍐呭', 'longblob', 'String', 'noticeContent', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'editor', '', 5, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223120609282, 1661288222902505474, 'status', '鍏憡鐘舵�侊紙0姝e父 1鍏抽棴锛�', 'char(1)', 'String', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 6, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223120609283, 1661288222902505474, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 7, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223120609284, 1661288222902505474, 'create_by', '鍒涘缓鑰�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 8, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223120609285, 1661288222902505474, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 9, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223120609286, 1661288222902505474, 'update_by', '鏇存柊鑰�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 10, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223120609287, 1661288222902505474, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 11, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223120609288, 1661288222902505474, 'remark', '澶囨敞', 'varchar(255)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'input', '', 12, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223363878913, 1661288223338713089, 'oper_id', '鏃ュ織涓婚敭', 'bigint(20)', 'Long', 'operId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223363878914, 1661288223338713089, 'tenant_id', '绉熸埛缂栧彿', 'varchar(20)', 'String', 'tenantId', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223363878915, 1661288223338713089, 'title', '妯″潡鏍囬', 'varchar(50)', 'String', 'title', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223363878916, 1661288223338713089, 'business_type', '涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�', 'int(2)', 'Integer', 'businessType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 4, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223401627649, 1661288223338713089, 'method', '鏂规硶鍚嶇О', 'varchar(100)', 'String', 'method', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223401627650, 1661288223338713089, 'request_method', '璇锋眰鏂瑰紡', 'varchar(10)', 'String', 'requestMethod', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223401627651, 1661288223338713089, 'operator_type', '鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級', 'int(1)', 'Integer', 'operatorType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 7, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223401627652, 1661288223338713089, 'oper_name', '鎿嶄綔浜哄憳', 'varchar(50)', 'String', 'operName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 8, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223401627653, 1661288223338713089, 'dept_name', '閮ㄩ棬鍚嶇О', 'varchar(50)', 'String', 'deptName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 9, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223401627654, 1661288223338713089, 'oper_url', '璇锋眰URL', 'varchar(255)', 'String', 'operUrl', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 10, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223401627655, 1661288223338713089, 'oper_ip', '涓绘満鍦板潃', 'varchar(128)', 'String', 'operIp', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 11, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223401627656, 1661288223338713089, 'oper_location', '鎿嶄綔鍦扮偣', 'varchar(255)', 'String', 'operLocation', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 12, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223401627657, 1661288223338713089, 'oper_param', '璇锋眰鍙傛暟', 'varchar(2000)', 'String', 'operParam', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 13, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223401627658, 1661288223338713089, 'json_result', '杩斿洖鍙傛暟', 'varchar(2000)', 'String', 'jsonResult', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 14, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223401627659, 1661288223338713089, 'status', '鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛�', 'int(1)', 'Integer', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 15, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223401627660, 1661288223338713089, 'error_msg', '閿欒娑堟伅', 'varchar(2000)', 'String', 'errorMsg', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 16, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223401627661, 1661288223338713089, 'oper_time', '鎿嶄綔鏃堕棿', 'datetime', 'Date', 'operTime', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'datetime', '', 17, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223401627662, 1661288223338713089, 'cost_time', '娑堣�楁椂闂�', 'bigint(20)', 'Long', 'costTime', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 18, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223502290946, 1661288223477125122, 'oss_id', '瀵硅薄瀛樺偍涓婚敭', 'bigint(20)', 'Long', 'ossId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223502290947, 1661288223477125122, 'tenant_id', '绉熸埛缂栧彿', 'varchar(20)', 'String', 'tenantId', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223502290948, 1661288223477125122, 'file_name', '鏂囦欢鍚�', 'varchar(255)', 'String', 'fileName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223502290949, 1661288223477125122, 'original_name', '鍘熷悕', 'varchar(255)', 'String', 'originalName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223502290950, 1661288223477125122, 'file_suffix', '鏂囦欢鍚庣紑鍚�', 'varchar(10)', 'String', 'fileSuffix', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223502290951, 1661288223477125122, 'url', 'URL鍦板潃', 'varchar(500)', 'String', 'url', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 6, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223502290952, 1661288223477125122, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 7, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223502290953, 1661288223477125122, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 8, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223502290954, 1661288223477125122, 'create_by', '涓婁紶浜�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 9, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223502290955, 1661288223477125122, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 10, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223502290956, 1661288223477125122, 'update_by', '鏇存柊浜�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 11, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223502290957, 1661288223477125122, 'service', '鏈嶅姟鍟�', 'varchar(20)', 'String', 'service', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 12, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223611342850, 1661288223586177025, 'oss_config_id', '涓诲缓', 'bigint(20)', 'Long', 'ossConfigId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223611342851, 1661288223586177025, 'tenant_id', '绉熸埛缂栧彿', 'varchar(20)', 'String', 'tenantId', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223611342852, 1661288223586177025, 'config_key', '閰嶇疆key', 'varchar(20)', 'String', 'configKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223611342853, 1661288223586177025, 'access_key', 'accessKey', 'varchar(255)', 'String', 'accessKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223611342854, 1661288223586177025, 'secret_key', '绉橀挜', 'varchar(255)', 'String', 'secretKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223611342855, 1661288223586177025, 'bucket_name', '妗跺悕绉�', 'varchar(255)', 'String', 'bucketName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 6, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223611342856, 1661288223586177025, 'prefix', '鍓嶇紑', 'varchar(255)', 'String', 'prefix', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223611342857, 1661288223586177025, 'endpoint', '璁块棶绔欑偣', 'varchar(255)', 'String', 'endpoint', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 8, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223611342858, 1661288223586177025, 'domain', '鑷畾涔夊煙鍚�', 'varchar(255)', 'String', 'domain', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 9, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223611342859, 1661288223586177025, 'is_https', '鏄惁https锛圷=鏄�,N=鍚︼級', 'char(1)', 'String', 'isHttps', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 10, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223611342860, 1661288223586177025, 'region', '鍩�', 'varchar(255)', 'String', 'region', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 11, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223653285889, 1661288223586177025, 'access_policy', '妗舵潈闄愮被鍨�(0=private 1=public 2=custom)', 'char(1)', 'String', 'accessPolicy', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 12, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223653285890, 1661288223586177025, 'status', '鏄惁榛樿锛�0=鏄�,1=鍚︼級', 'char(1)', 'String', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 13, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223653285891, 1661288223586177025, 'ext1', '鎵╁睍瀛楁', 'varchar(255)', 'String', 'ext1', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 14, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223653285892, 1661288223586177025, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 15, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223653285893, 1661288223586177025, 'create_by', '鍒涘缓鑰�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 16, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223653285894, 1661288223586177025, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 17, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223653285895, 1661288223586177025, 'update_by', '鏇存柊鑰�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 18, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223653285896, 1661288223586177025, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 19, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223653285897, 1661288223586177025, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 20, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223749754881, 1661288223728783361, 'post_id', '宀椾綅ID', 'bigint(20)', 'Long', 'postId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223749754882, 1661288223728783361, 'tenant_id', '绉熸埛缂栧彿', 'varchar(20)', 'String', 'tenantId', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223749754883, 1661288223728783361, 'post_code', '宀椾綅缂栫爜', 'varchar(64)', 'String', 'postCode', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223749754884, 1661288223728783361, 'post_name', '宀椾綅鍚嶇О', 'varchar(50)', 'String', 'postName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223749754885, 1661288223728783361, 'post_sort', '鏄剧ず椤哄簭', 'int(4)', 'Integer', 'postSort', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223749754886, 1661288223728783361, 'status', '鐘舵�侊紙0姝e父 1鍋滅敤锛�', 'char(1)', 'String', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 6, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223749754887, 1661288223728783361, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 7, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223749754888, 1661288223728783361, 'create_by', '鍒涘缓鑰�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 8, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223749754889, 1661288223728783361, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 9, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223749754890, 1661288223728783361, 'update_by', '鏇存柊鑰�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 10, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223749754891, 1661288223728783361, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 11, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223749754892, 1661288223728783361, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 12, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223846223874, 1661288223821058050, 'role_id', '瑙掕壊ID', 'bigint(20)', 'Long', 'roleId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223846223875, 1661288223821058050, 'tenant_id', '绉熸埛缂栧彿', 'varchar(20)', 'String', 'tenantId', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223846223876, 1661288223821058050, 'role_name', '瑙掕壊鍚嶇О', 'varchar(30)', 'String', 'roleName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223846223877, 1661288223821058050, 'role_key', '瑙掕壊鏉冮檺瀛楃涓�', 'varchar(100)', 'String', 'roleKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223846223878, 1661288223821058050, 'role_sort', '鏄剧ず椤哄簭', 'int(4)', 'Integer', 'roleSort', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223846223879, 1661288223821058050, 'data_scope', '鏁版嵁鑼冨洿锛�1锛氬叏閮ㄦ暟鎹潈闄� 2锛氳嚜瀹氭暟鎹潈闄� 3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺 4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶級', 'char(1)', 'String', 'dataScope', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223846223880, 1661288223821058050, 'menu_check_strictly', '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�', 'tinyint(1)', 'Integer', 'menuCheckStrictly', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223846223881, 1661288223821058050, 'dept_check_strictly', '閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�', 'tinyint(1)', 'Integer', 'deptCheckStrictly', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 8, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223846223882, 1661288223821058050, 'status', '瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛�', 'char(1)', 'String', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 9, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223846223883, 1661288223821058050, 'del_flag', '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', 'char(1)', 'String', 'delFlag', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 10, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223846223884, 1661288223821058050, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 11, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223846223885, 1661288223821058050, 'create_by', '鍒涘缓鑰�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 12, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223846223886, 1661288223821058050, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 13, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223846223887, 1661288223821058050, 'update_by', '鏇存柊鑰�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 14, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223846223888, 1661288223821058050, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 15, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223846223889, 1661288223821058050, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 16, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223951081474, 1661288223925915650, 'user_id', '鐢ㄦ埛ID', 'bigint(20)', 'Long', 'userId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223951081475, 1661288223925915650, 'post_id', '宀椾綅ID', 'bigint(20)', 'Long', 'postId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); +INSERT INTO `gen_table_column` VALUES (1661288223993024514, 1661288223967858689, 'user_id', '鐢ㄦ埛ID', 'bigint(20)', 'Long', 'userId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:13', 1, '2023-05-24 16:29:13'); +INSERT INTO `gen_table_column` VALUES (1661288223993024515, 1661288223967858689, 'role_id', '瑙掕壊ID', 'bigint(20)', 'Long', 'roleId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:13', 1, '2023-05-24 16:29:13'); +INSERT INTO `gen_table_column` VALUES (1661288385121406978, 1661288385096241154, 'config_id', '鍙傛暟涓婚敭', 'bigint(20)', 'Long', 'configId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); +INSERT INTO `gen_table_column` VALUES (1661288385121406979, 1661288385096241154, 'tenant_id', '绉熸埛缂栧彿', 'varchar(20)', 'String', 'tenantId', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); +INSERT INTO `gen_table_column` VALUES (1661288385121406980, 1661288385096241154, 'config_name', '鍙傛暟鍚嶇О', 'varchar(100)', 'String', 'configName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); +INSERT INTO `gen_table_column` VALUES (1661288385121406981, 1661288385096241154, 'config_key', '鍙傛暟閿悕', 'varchar(100)', 'String', 'configKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); +INSERT INTO `gen_table_column` VALUES (1661288385121406982, 1661288385096241154, 'config_value', '鍙傛暟閿��', 'varchar(500)', 'String', 'configValue', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 5, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); +INSERT INTO `gen_table_column` VALUES (1661288385121406983, 1661288385096241154, 'config_type', '绯荤粺鍐呯疆锛圷鏄� N鍚︼級', 'char(1)', 'String', 'configType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 6, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); +INSERT INTO `gen_table_column` VALUES (1661288385121406984, 1661288385096241154, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 7, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); +INSERT INTO `gen_table_column` VALUES (1661288385142378498, 1661288385096241154, 'create_by', '鍒涘缓鑰�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 8, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); +INSERT INTO `gen_table_column` VALUES (1661288385142378499, 1661288385096241154, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 9, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); +INSERT INTO `gen_table_column` VALUES (1661288385142378500, 1661288385096241154, 'update_by', '鏇存柊鑰�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 10, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); +INSERT INTO `gen_table_column` VALUES (1661288385142378501, 1661288385096241154, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 11, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); +INSERT INTO `gen_table_column` VALUES (1661288385142378502, 1661288385096241154, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 12, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); +INSERT INTO `gen_table_column` VALUES (1680196323806289921, 1680196323521077249, 'id', '鏂囦欢id', 'bigint(20) unsigned', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323806289922, 1680196323521077249, 'url', '鏂囦欢璁块棶鍦板潃', 'varchar(512)', 'String', 'url', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 2, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323835650050, 1680196323445579778, 'id', '鏂囦欢id', 'bigint(20) unsigned', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323835650051, 1680196323445579778, 'url', '鏂囦欢璁块棶鍦板潃', 'varchar(512)', 'String', 'url', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 2, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323835650052, 1680196323445579778, 'size', '鏂囦欢澶у皬锛屽崟浣嶅瓧鑺�', 'bigint(20)', 'Long', 'size', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323873398785, 1680196323445579778, 'filename', '鏂囦欢鍚嶇О', 'varchar(256)', 'String', 'filename', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323873398786, 1680196323445579778, 'original_filename', '鍘熷鏂囦欢鍚�', 'varchar(256)', 'String', 'originalFilename', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 5, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323873398787, 1680196323445579778, 'base_path', '鍩虹瀛樺偍璺緞', 'varchar(256)', 'String', 'basePath', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323873398788, 1680196323445579778, 'path', '瀛樺偍璺緞', 'varchar(256)', 'String', 'path', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323873398789, 1680196323445579778, 'ext', '鏂囦欢鎵╁睍鍚�', 'varchar(32)', 'String', 'ext', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 8, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323873398790, 1680196323445579778, 'object_id', '鏂囦欢鎵�灞炲璞d', 'varchar(32)', 'String', 'objectId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 9, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323873398791, 1680196323445579778, 'file_type', '鏂囦欢绫诲瀷', 'varchar(32)', 'String', 'fileType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 10, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323932119041, 1680196323445579778, 'attr', '闄勫姞灞炴��', 'text', 'String', 'attr', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 11, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323932119042, 1680196323445579778, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 12, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323940507649, 1680196323445579778, 'create_by', '鍒涘缓鑰�', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 13, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323940507650, 1680196323445579778, 'update_by', '鏇存柊鑰�', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 14, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323940507651, 1680196323445579778, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 15, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323940507652, 1680196323445579778, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 16, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323940507653, 1680196323445579778, 'version', '鐗堟湰', 'int(11)', 'Long', 'version', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 17, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323940507654, 1680196323445579778, 'del_flag', '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 1浠h〃鍒犻櫎锛�', 'char(1)', 'String', 'delFlag', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 18, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323961479170, 1680196323521077249, 'size', '鏂囦欢澶у皬锛屽崟浣嶅瓧鑺�', 'bigint(20)', 'Long', 'size', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323961479171, 1680196323521077249, 'filename', '鏂囦欢鍚嶇О', 'varchar(256)', 'String', 'filename', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323961479172, 1680196323521077249, 'original_filename', '鍘熷鏂囦欢鍚�', 'varchar(256)', 'String', 'originalFilename', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 5, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323961479173, 1680196323521077249, 'base_path', '鍩虹瀛樺偍璺緞', 'varchar(256)', 'String', 'basePath', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323961479174, 1680196323521077249, 'path', '瀛樺偍璺緞', 'varchar(256)', 'String', 'path', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323961479175, 1680196323521077249, 'ext', '鏂囦欢鎵╁睍鍚�', 'varchar(32)', 'String', 'ext', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 8, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323961479176, 1680196323521077249, 'object_id', '鏂囦欢鎵�灞炲璞d', 'varchar(32)', 'String', 'objectId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 9, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323961479177, 1680196323521077249, 'file_type', '鏂囦欢绫诲瀷', 'varchar(32)', 'String', 'fileType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 10, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323961479178, 1680196323521077249, 'attr', '闄勫姞灞炴��', 'text', 'String', 'attr', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 11, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323999227905, 1680196323445579778, 'update_ip', '鏇存柊IP', 'varchar(128)', 'String', 'updateIp', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 19, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196323999227906, 1680196323445579778, 'tenant_id', '绉熸埛Id', 'bigint(20)', 'Long', 'tenantId', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'input', '', 20, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196324020199425, 1680196323521077249, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 12, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196324020199426, 1680196323521077249, 'create_by', '鍒涘缓鑰�', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 13, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196324020199427, 1680196323521077249, 'update_by', '鏇存柊鑰�', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 14, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196324020199428, 1680196323521077249, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 15, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196324020199429, 1680196323521077249, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 16, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196324020199430, 1680196323521077249, 'version', '鐗堟湰', 'int(11)', 'Long', 'version', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 17, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196324020199431, 1680196323521077249, 'del_flag', '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 1浠h〃鍒犻櫎锛�', 'char(1)', 'String', 'delFlag', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 18, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196324020199432, 1680196323521077249, 'update_ip', '鏇存柊IP', 'varchar(128)', 'String', 'updateIp', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 19, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680196324020199433, 1680196323521077249, 'tenant_id', '绉熸埛Id', 'bigint(20)', 'Long', 'tenantId', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'input', '', 20, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); +INSERT INTO `gen_table_column` VALUES (1680199147667853313, 1680199147407806465, 'id', '鏂囦欢id', 'bigint(20) unsigned', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147667853314, 1680199147407806465, 'url', '鏂囦欢璁块棶鍦板潃', 'varchar(512)', 'String', 'url', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 2, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147667853315, 1680199147407806465, 'size', '鏂囦欢澶у皬锛屽崟浣嶅瓧鑺�', 'bigint(20)', 'Long', 'size', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147667853316, 1680199147407806465, 'filename', '鏂囦欢鍚嶇О', 'varchar(256)', 'String', 'filename', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147667853317, 1680199147407806465, 'original_filename', '鍘熷鏂囦欢鍚�', 'varchar(256)', 'String', 'originalFilename', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 5, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147667853318, 1680199147407806465, 'base_path', '鍩虹瀛樺偍璺緞', 'varchar(256)', 'String', 'basePath', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147734962178, 1680199147407806465, 'path', '瀛樺偍璺緞', 'varchar(256)', 'String', 'path', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147734962179, 1680199147407806465, 'ext', '鏂囦欢鎵╁睍鍚�', 'varchar(32)', 'String', 'ext', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 8, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147734962180, 1680199147407806465, 'object_id', '鏂囦欢鎵�灞炲璞d', 'varchar(32)', 'String', 'objectId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 9, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147734962181, 1680199147407806465, 'file_type', '鏂囦欢绫诲瀷', 'varchar(32)', 'String', 'fileType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 10, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147734962182, 1680199147407806465, 'attr', '闄勫姞灞炴��', 'text', 'String', 'attr', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 11, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147734962183, 1680199147407806465, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 12, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147734962184, 1680199147407806465, 'create_by', '鍒涘缓鑰�', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 13, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147734962185, 1680199147407806465, 'update_by', '鏇存柊鑰�', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 14, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147734962186, 1680199147407806465, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 15, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147734962187, 1680199147407806465, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 16, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147734962188, 1680199147407806465, 'version', '鐗堟湰', 'int(11)', 'Long', 'version', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 17, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147734962189, 1680199147407806465, 'del_flag', '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 1浠h〃鍒犻櫎锛�', 'char(1)', 'String', 'delFlag', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 18, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147734962190, 1680199147407806465, 'update_ip', '鏇存柊IP', 'varchar(128)', 'String', 'updateIp', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 19, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680199147734962191, 1680199147407806465, 'tenant_id', '绉熸埛Id', 'bigint(20)', 'Long', 'tenantId', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'input', '', 20, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); +INSERT INTO `gen_table_column` VALUES (1680481753240215553, 1680481752850145282, 'id', 'id', 'bigint(20) unsigned', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215554, 1680481752850145282, 'prompt', '鎻忚堪璇�', 'text', 'String', 'prompt', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 2, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215555, 1680481752850145282, 'negative_prompt', '璐熼潰璇�', 'text', 'String', 'negativePrompt', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 3, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215556, 1680481752850145282, 'model_name', '妯″瀷鍚嶇О', 'varchar(256)', 'String', 'modelName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215557, 1680481752850145282, 'steps', '杩唬姝ユ暟', 'int(10)', 'Integer', 'steps', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215558, 1680481752850145282, 'seed', '绉嶅瓙', 'varchar(256)', 'String', 'seed', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215559, 1680481752850145282, 'width', '鍥剧墖瀹藉害', 'varchar(256)', 'String', 'width', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215560, 1680481752850145282, 'height', '鍥剧墖楂樺害', 'varchar(32)', 'String', 'height', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 8, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215561, 1680481752850145282, 'sampler_name', '閲囨牱鏂规硶', 'varchar(32)', 'String', 'samplerName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 9, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215562, 1680481752850145282, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 10, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215563, 1680481752850145282, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 11, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215564, 1680481752850145282, 'create_by', '鍒涘缓鑰�', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 12, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215565, 1680481752850145282, 'update_by', '鏇存柊鑰�', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 13, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215566, 1680481752850145282, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 14, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215567, 1680481752850145282, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 15, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215568, 1680481752850145282, 'version', '鐗堟湰', 'int(11)', 'Long', 'version', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 16, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215569, 1680481752850145282, 'del_flag', '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 1浠h〃鍒犻櫎锛�', 'char(1)', 'String', 'delFlag', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 17, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215570, 1680481752850145282, 'update_ip', '鏇存柊IP', 'varchar(128)', 'String', 'updateIp', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 18, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1680481753240215571, 1680481752850145282, 'tenant_id', '绉熸埛Id', 'bigint(20)', 'Long', 'tenantId', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'input', '', 19, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); +INSERT INTO `gen_table_column` VALUES (1740573615225053185, 1740573614897897473, 'id', '涓婚敭', 'int(11)', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); +INSERT INTO `gen_table_column` VALUES (1740573615225053186, 1740573614897897473, 'order_no', '璁㈠崟缂栧彿', 'varchar(20)', 'String', 'orderNo', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); +INSERT INTO `gen_table_column` VALUES (1740573615225053187, 1740573614897897473, 'order_name', '璁㈠崟鍚嶇О', 'varchar(100)', 'String', 'orderName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); +INSERT INTO `gen_table_column` VALUES (1740573615225053188, 1740573614897897473, 'amount', '閲戦', 'decimal(10,2)', 'BigDecimal', 'amount', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); +INSERT INTO `gen_table_column` VALUES (1740573615225053189, 1740573614897897473, 'payment_status', '鏀粯鐘舵��', 'char(1)', 'String', 'paymentStatus', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 5, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); +INSERT INTO `gen_table_column` VALUES (1740573615225053190, 1740573614897897473, 'payment_method', '鏀粯鏂瑰紡', 'char(1)', 'String', 'paymentMethod', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); +INSERT INTO `gen_table_column` VALUES (1740573615225053191, 1740573614897897473, 'user_id', '鐢ㄦ埛ID', 'timestamp', 'Date', 'userId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'datetime', '', 7, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); +INSERT INTO `gen_table_column` VALUES (1740573615225053192, 1740573614897897473, 'create_by', '鍒涘缓鑰�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 8, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); +INSERT INTO `gen_table_column` VALUES (1740573615225053193, 1740573614897897473, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 9, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); +INSERT INTO `gen_table_column` VALUES (1740573615225053194, 1740573614897897473, 'update_by', '鏇存柊鑰�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 10, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); +INSERT INTO `gen_table_column` VALUES (1740573615225053195, 1740573614897897473, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 11, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); +INSERT INTO `gen_table_column` VALUES (1740573615225053196, 1740573614897897473, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 12, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); +INSERT INTO `gen_table_column` VALUES (1775895242624061441, 1775895242171076610, 'id', '涓婚敭', 'bigint(20)', 'Long', 'id', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); +INSERT INTO `gen_table_column` VALUES (1775895242624061442, 1775895242171076610, 'model_name', '妯″瀷鍚嶇О', 'varchar(50)', 'String', 'modelName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 2, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); +INSERT INTO `gen_table_column` VALUES (1775895242624061443, 1775895242171076610, 'model_no', '妯″瀷缂栧彿', 'varchar(255)', 'String', 'modelNo', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); +INSERT INTO `gen_table_column` VALUES (1775895242624061444, 1775895242171076610, 'model_describe', '妯″瀷鎻忚堪', 'varchar(255)', 'String', 'modelDescribe', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); +INSERT INTO `gen_table_column` VALUES (1775895242624061445, 1775895242171076610, 'model_price', '妯″瀷浠锋牸', 'double', 'Long', 'modelPrice', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); +INSERT INTO `gen_table_column` VALUES (1775895242624061446, 1775895242171076610, 'model_type', '璁¤垂绫诲瀷', 'char(1)', 'String', 'modelType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 6, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); +INSERT INTO `gen_table_column` VALUES (1775895242624061447, 1775895242171076610, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 7, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); +INSERT INTO `gen_table_column` VALUES (1775895242624061448, 1775895242171076610, 'create_by', '鍒涘缓鑰�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 8, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); +INSERT INTO `gen_table_column` VALUES (1775895242624061449, 1775895242171076610, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 9, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); +INSERT INTO `gen_table_column` VALUES (1775895242624061450, 1775895242171076610, 'update_by', '鏇存柊鑰�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 10, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); +INSERT INTO `gen_table_column` VALUES (1775895242624061451, 1775895242171076610, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 11, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); +INSERT INTO `gen_table_column` VALUES (1775895242624061452, 1775895242171076610, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 12, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); +INSERT INTO `gen_table_column` VALUES (1785390412381896706, 1785390411861803009, 'id', '涓婚敭', 'int(11) unsigned', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); +INSERT INTO `gen_table_column` VALUES (1785390412381896707, 1785390411861803009, 'user_id', '鐢ㄦ埛id', 'bigint(20)', 'Long', 'userId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); +INSERT INTO `gen_table_column` VALUES (1785390412381896708, 1785390411861803009, 'unique_key', '鏈哄櫒鍞竴鐮�', 'varchar(16)', 'String', 'uniqueKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); +INSERT INTO `gen_table_column` VALUES (1785390412381896709, 1785390411861803009, 'remark', '澶囨敞锛堝井淇″彿锛�', 'varchar(64)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'input', '', 4, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); +INSERT INTO `gen_table_column` VALUES (1785390412444811265, 1785390411861803009, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 5, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); +INSERT INTO `gen_table_column` VALUES (1785390412444811266, 1785390411861803009, 'update_time', '淇敼鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 6, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); +INSERT INTO `gen_table_column` VALUES (1785390412444811267, 1785390411861803009, 'to_friend', '鎸囧畾濂藉弸鍥炲寮�鍏�', 'bit(1)', 'Integer', 'toFriend', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); +INSERT INTO `gen_table_column` VALUES (1785390412444811268, 1785390411861803009, 'to_group', '鎸囧畾缇ゅ洖澶嶅紑鍏�', 'bit(1)', 'Integer', 'toGroup', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 8, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); +INSERT INTO `gen_table_column` VALUES (1785390412444811269, 1785390411861803009, 'default_friend', '榛樿濂藉弸鍥炲寮�鍏�', 'bit(1)', 'Integer', 'defaultFriend', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 9, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); +INSERT INTO `gen_table_column` VALUES (1785390412444811270, 1785390411861803009, 'default_group', '榛樿缇ゅ洖澶嶅紑鍏�', 'bit(1)', 'Integer', 'defaultGroup', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 10, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); +INSERT INTO `gen_table_column` VALUES (1785390412444811271, 1785390411861803009, 'from_out', '瀵瑰鎺ュ彛寮�鍏�', 'bit(1)', 'Integer', 'fromOut', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 11, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); +INSERT INTO `gen_table_column` VALUES (1785390412444811272, 1785390411861803009, 'enable', '鏈哄櫒鍚敤1绂佺敤0', 'bit(1)', 'Integer', 'enable', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 12, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); +INSERT INTO `gen_table_column` VALUES (1785390414135115778, 1785390413745045505, 'id', '', 'int(11) unsigned', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); +INSERT INTO `gen_table_column` VALUES (1785390414135115779, 1785390413745045505, 'unique_key', '鏈哄櫒鍞竴鐮�', 'varchar(16)', 'String', 'uniqueKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); +INSERT INTO `gen_table_column` VALUES (1785390414135115780, 1785390413745045505, 'key_data', '鍏抽敭璇�', 'varchar(64)', 'String', 'keyData', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); +INSERT INTO `gen_table_column` VALUES (1785390414135115781, 1785390413745045505, 'value_data', '鍥炲鍐呭', 'varchar(1024)', 'String', 'valueData', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 4, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); +INSERT INTO `gen_table_column` VALUES (1785390414135115782, 1785390413745045505, 'type_data', '鍥炲绫诲瀷', 'varchar(64)', 'String', 'typeData', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); +INSERT INTO `gen_table_column` VALUES (1785390414135115783, 1785390413745045505, 'nick_name', '鐩爣鏄电О', 'varchar(64)', 'String', 'nickName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 6, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); +INSERT INTO `gen_table_column` VALUES (1785390414135115784, 1785390413745045505, 'to_group', '缇�1濂藉弸0', 'bit(1)', 'Integer', 'toGroup', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); +INSERT INTO `gen_table_column` VALUES (1785390414135115785, 1785390413745045505, 'enable', '鍚敤1绂佺敤0', 'bit(1)', 'Integer', 'enable', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 8, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); +INSERT INTO `gen_table_column` VALUES (1785390414135115786, 1785390413745045505, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 9, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); +INSERT INTO `gen_table_column` VALUES (1785390415250800642, 1785390414860730369, 'id', '', 'int(11) unsigned', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2024-05-01 03:27:01', 1, '2024-05-01 03:27:01'); +INSERT INTO `gen_table_column` VALUES (1785390415250800643, 1785390414860730369, 'out_key', '澶栨帴鍞竴鐮�', 'varchar(16)', 'String', 'outKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 103, 1, '2024-05-01 03:27:01', 1, '2024-05-01 03:27:01'); +INSERT INTO `gen_table_column` VALUES (1785390415250800644, 1785390414860730369, 'unique_key', '鏈哄櫒鍞竴鐮�', 'varchar(16)', 'String', 'uniqueKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2024-05-01 03:27:01', 1, '2024-05-01 03:27:01'); +INSERT INTO `gen_table_column` VALUES (1785390415250800645, 1785390414860730369, 'nick_name', '鐩爣鏄电О', 'varchar(64)', 'String', 'nickName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 103, 1, '2024-05-01 03:27:01', 1, '2024-05-01 03:27:01'); +INSERT INTO `gen_table_column` VALUES (1785390415250800646, 1785390414860730369, 'to_group', '缇�1濂藉弸0', 'bit(1)', 'Integer', 'toGroup', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2024-05-01 03:27:01', 1, '2024-05-01 03:27:01'); +INSERT INTO `gen_table_column` VALUES (1785390415250800647, 1785390414860730369, 'enable', '鍚敤1绂佺敤0', 'bit(1)', 'Integer', 'enable', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2024-05-01 03:27:01', 1, '2024-05-01 03:27:01'); +INSERT INTO `gen_table_column` VALUES (1785390415250800648, 1785390414860730369, 'white_list', 'IP鐧藉悕鍗�', 'varchar(255)', 'String', 'whiteList', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2024-05-01 03:27:01', 1, '2024-05-01 03:27:01'); +INSERT INTO `gen_table_column` VALUES (1785390415250800649, 1785390414860730369, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 8, 103, 1, '2024-05-01 03:27:01', 1, '2024-05-01 03:27:01'); +INSERT INTO `gen_table_column` VALUES (1786379560827805698, 1786379560181882881, 'id', '涓婚敭', 'bigint(20)', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); +INSERT INTO `gen_table_column` VALUES (1786379560827805699, 1786379560181882881, 'user_id', '鐢ㄦ埛id', 'bigint(20)', 'Long', 'userId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); +INSERT INTO `gen_table_column` VALUES (1786379560827805700, 1786379560181882881, 'code', '鍏戞崲鐮�', 'varchar(255)', 'String', 'code', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); +INSERT INTO `gen_table_column` VALUES (1786379560827805701, 1786379560181882881, 'amount', '鍏戞崲閲戦', 'double(10,2)', 'BigDecimal', 'amount', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); +INSERT INTO `gen_table_column` VALUES (1786379560827805702, 1786379560181882881, 'status', '鍏戞崲鐘舵��', 'char(1)', 'String', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 5, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); +INSERT INTO `gen_table_column` VALUES (1786379560827805703, 1786379560181882881, 'balance_before', '鍏戞崲鍓嶄綑棰�', 'double(10,2)', 'BigDecimal', 'balanceBefore', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); +INSERT INTO `gen_table_column` VALUES (1786379560827805704, 1786379560181882881, 'balance_after', '鍏戞崲鍚庝綑棰�', 'double(10,2)', 'BigDecimal', 'balanceAfter', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); +INSERT INTO `gen_table_column` VALUES (1786379560827805705, 1786379560181882881, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 8, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); +INSERT INTO `gen_table_column` VALUES (1786379560827805706, 1786379560181882881, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 9, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); +INSERT INTO `gen_table_column` VALUES (1786379560827805707, 1786379560181882881, 'create_by', '鍒涘缓鑰�', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 10, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); +INSERT INTO `gen_table_column` VALUES (1786379560827805708, 1786379560181882881, 'update_by', '鏇存柊鑰�', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 11, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); +INSERT INTO `gen_table_column` VALUES (1786379560827805709, 1786379560181882881, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 12, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); +INSERT INTO `gen_table_column` VALUES (1786379560890720257, 1786379560181882881, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 13, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); +INSERT INTO `gen_table_column` VALUES (1789155611425452034, 1789155611035381761, 'id', 'ID', 'bigint(20)', 'Long', 'id', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); +INSERT INTO `gen_table_column` VALUES (1789155611425452035, 1789155611035381761, 'user_id', '鐢ㄦ埛ID', 'bigint(20)', 'Long', 'userId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); +INSERT INTO `gen_table_column` VALUES (1789155611425452036, 1789155611035381761, 'notice_id', '鍏憡ID', 'bigint(20)', 'Long', 'noticeId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); +INSERT INTO `gen_table_column` VALUES (1789155611425452037, 1789155611035381761, 'read_status', '闃呰鐘舵�侊紙0鏈 1宸茶锛�', 'char(1)', 'String', 'readStatus', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 4, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); +INSERT INTO `gen_table_column` VALUES (1789155611425452038, 1789155611035381761, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 5, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); +INSERT INTO `gen_table_column` VALUES (1789155611425452039, 1789155611035381761, 'create_by', '鍒涘缓鑰�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 6, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); +INSERT INTO `gen_table_column` VALUES (1789155611425452040, 1789155611035381761, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 7, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); +INSERT INTO `gen_table_column` VALUES (1789155611425452041, 1789155611035381761, 'update_by', '鏇存柊鑰�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 8, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); +INSERT INTO `gen_table_column` VALUES (1789155611425452042, 1789155611035381761, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 9, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); +INSERT INTO `gen_table_column` VALUES (1789155611425452043, 1789155611035381761, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 10, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); + +-- ---------------------------- +-- Table structure for knowledge_attach +-- ---------------------------- +DROP TABLE IF EXISTS `knowledge_attach`; +CREATE TABLE `knowledge_attach` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `kid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐭ヨ瘑搴揑D', + `doc_id` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鏂囨。ID', + `doc_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鏂囨。鍚嶇О', + `doc_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鏂囨。绫诲瀷', + `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '鏂囨。鍐呭', + `create_time` datetime NULL DEFAULT NULL, + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `idx_kname`(`kid`, `doc_name`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 74 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐭ヨ瘑搴撻檮浠�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of knowledge_attach +-- ---------------------------- + +-- ---------------------------- +-- Table structure for knowledge_fragment +-- ---------------------------- +DROP TABLE IF EXISTS `knowledge_fragment`; +CREATE TABLE `knowledge_fragment` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `kid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐭ヨ瘑搴揑D', + `doc_id` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏂囨。ID', + `fid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐭ヨ瘑鐗囨ID', + `idx` int(11) NOT NULL COMMENT '鐗囨绱㈠紩涓嬫爣', + `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鏂囨。鍐呭', + `create_time` datetime NULL DEFAULT NULL, + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 5133 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐭ヨ瘑鐗囨' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of knowledge_fragment +-- ---------------------------- + +-- ---------------------------- +-- Table structure for knowledge_info +-- ---------------------------- +DROP TABLE IF EXISTS `knowledge_info`; +CREATE TABLE `knowledge_info` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `kid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐭ヨ瘑搴揑D', + `uid` bigint(20) NOT NULL DEFAULT 0 COMMENT '鐢ㄦ埛ID', + `kname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐭ヨ瘑搴撳悕绉�', + `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鎻忚堪', + `create_time` datetime NULL DEFAULT NULL, + `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `idx_kid`(`kid`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 69 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐭ヨ瘑搴�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of knowledge_info +-- ---------------------------- + +-- ---------------------------- +-- Table structure for knowledge_share +-- ---------------------------- +DROP TABLE IF EXISTS `knowledge_share`; +CREATE TABLE `knowledge_share` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `kid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐭ヨ瘑搴揑D', + `uid` int(11) NOT NULL DEFAULT 0 COMMENT '鐢ㄦ埛ID', + `kname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鐭ヨ瘑搴撳悕绉�', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐭ヨ瘑搴撳垎浜〃' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of knowledge_share +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_audio_role +-- ---------------------------- +DROP TABLE IF EXISTS `sys_audio_role`; +CREATE TABLE `sys_audio_role` ( + `id` bigint(20) NOT NULL COMMENT 'id', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '瑙掕壊鍚嶇О', + `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '瑙掕壊鎻忚堪', + `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶村儚', + `voice_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '瑙掕壊id', + `file_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '闊抽鍦板潃', + `create_dept` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `voice_id`(`create_by`, `voice_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '搴旂敤甯傚満' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_audio_role +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_config +-- ---------------------------- +DROP TABLE IF EXISTS `sys_config`; +CREATE TABLE `sys_config` ( + `config_id` bigint(20) NOT NULL COMMENT '鍙傛暟涓婚敭', + `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', + `config_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鍙傛暟鍚嶇О', + `config_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鍙傛暟閿悕', + `config_value` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鍙傛暟閿��', + `config_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'N' COMMENT '绯荤粺鍐呯疆锛圷鏄� N鍚︼級', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + PRIMARY KEY (`config_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鍙傛暟閰嶇疆琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_config +-- ---------------------------- +INSERT INTO `sys_config` VALUES (1, '000000', '涓绘鏋堕〉-榛樿鐨偆鏍峰紡鍚嶇О', 'sys.index.skinName', 'skin-blue', 'Y', 103, 1, '2023-05-14 15:19:42', NULL, NULL, '钃濊壊 skin-blue銆佺豢鑹� skin-green銆佺传鑹� skin-purple銆佺孩鑹� skin-red銆侀粍鑹� skin-yellow'); +INSERT INTO `sys_config` VALUES (2, '000000', '鐢ㄦ埛绠$悊-璐﹀彿鍒濆瀵嗙爜', 'sys.user.initPassword', '123456', 'Y', 103, 1, '2023-05-14 15:19:42', NULL, NULL, '鍒濆鍖栧瘑鐮� 123456'); +INSERT INTO `sys_config` VALUES (3, '000000', '涓绘鏋堕〉-渚ц竟鏍忎富棰�', 'sys.index.sideTheme', 'theme-dark', 'Y', 103, 1, '2023-05-14 15:19:42', NULL, NULL, '娣辫壊涓婚theme-dark锛屾祬鑹蹭富棰榯heme-light'); +INSERT INTO `sys_config` VALUES (5, '000000', '璐﹀彿鑷姪-鏄惁寮�鍚敤鎴锋敞鍐屽姛鑳�', 'sys.account.registerUser', 'false', 'Y', 103, 1, '2023-05-14 15:19:42', NULL, NULL, '鏄惁寮�鍚敞鍐岀敤鎴峰姛鑳斤紙true寮�鍚紝false鍏抽棴锛�'); +INSERT INTO `sys_config` VALUES (11, '000000', 'OSS棰勮鍒楄〃璧勬簮寮�鍏�', 'sys.oss.previewListResource', 'true', 'Y', 103, 1, '2023-05-14 15:19:42', NULL, NULL, 'true:寮�鍚�, false:鍏抽棴'); + +-- ---------------------------- +-- Table structure for sys_dept +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dept`; +CREATE TABLE `sys_dept` ( + `dept_id` bigint(20) NOT NULL COMMENT '閮ㄩ棬id', + `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', + `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '鐖堕儴闂╥d', + `ancestors` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '绁栫骇鍒楄〃', + `dept_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '閮ㄩ棬鍚嶇О', + `order_num` int(4) NULL DEFAULT 0 COMMENT '鏄剧ず椤哄簭', + `leader` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '璐熻矗浜�', + `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鑱旂郴鐢佃瘽', + `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '閭', + `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '閮ㄩ棬鐘舵�侊紙0姝e父 1鍋滅敤锛�', + `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + PRIMARY KEY (`dept_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '閮ㄩ棬琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_dept +-- ---------------------------- +INSERT INTO `sys_dept` VALUES (100, '000000', 0, '0', '鐔婄尗绉戞妧', 0, 'ageerle', '15888888888', 'ageerle@163.com', '0', '0', 103, 1, '2023-05-14 15:19:39', 1, '2023-12-29 11:18:24'); +INSERT INTO `sys_dept` VALUES (101, '000000', 100, '0,100', '娣卞湷鎬诲叕鍙�', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); +INSERT INTO `sys_dept` VALUES (102, '000000', 100, '0,100', '闀挎矙鍒嗗叕鍙�', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); +INSERT INTO `sys_dept` VALUES (103, '000000', 101, '0,100,101', '鐮斿彂閮ㄩ棬', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); +INSERT INTO `sys_dept` VALUES (104, '000000', 101, '0,100,101', '甯傚満閮ㄩ棬', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); +INSERT INTO `sys_dept` VALUES (105, '000000', 101, '0,100,101', '娴嬭瘯閮ㄩ棬', 3, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); +INSERT INTO `sys_dept` VALUES (106, '000000', 101, '0,100,101', '璐㈠姟閮ㄩ棬', 4, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); +INSERT INTO `sys_dept` VALUES (107, '000000', 101, '0,100,101', '杩愮淮閮ㄩ棬', 5, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); +INSERT INTO `sys_dept` VALUES (108, '000000', 102, '0,100,102', '甯傚満閮ㄩ棬', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); +INSERT INTO `sys_dept` VALUES (109, '000000', 102, '0,100,102', '璐㈠姟閮ㄩ棬', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); +INSERT INTO `sys_dept` VALUES (1729685491964084226, '911866', 0, '0', '5126', 0, 'admin', NULL, NULL, '0', '2', 103, 1, '2023-11-29 10:15:32', 1, '2023-11-29 10:15:32'); + +-- ---------------------------- +-- Table structure for sys_dict_data +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dict_data`; +CREATE TABLE `sys_dict_data` ( + `dict_code` bigint(20) NOT NULL COMMENT '瀛楀吀缂栫爜', + `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', + `dict_sort` int(4) NULL DEFAULT 0 COMMENT '瀛楀吀鎺掑簭', + `dict_label` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '瀛楀吀鏍囩', + `dict_value` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '瀛楀吀閿��', + `dict_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '瀛楀吀绫诲瀷', + `css_class` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏍峰紡灞炴�э紙鍏朵粬鏍峰紡鎵╁睍锛�', + `list_class` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '琛ㄦ牸鍥炴樉鏍峰紡', + `is_default` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'N' COMMENT '鏄惁榛樿锛圷鏄� N鍚︼級', + `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鐘舵�侊紙0姝e父 1鍋滅敤锛�', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + PRIMARY KEY (`dict_code`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '瀛楀吀鏁版嵁琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_dict_data +-- ---------------------------- +INSERT INTO `sys_dict_data` VALUES (1, '000000', 1, '鐢�', '0', 'sys_user_sex', '', '', 'Y', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鎬у埆鐢�'); +INSERT INTO `sys_dict_data` VALUES (2, '000000', 2, '濂�', '1', 'sys_user_sex', '', '', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鎬у埆濂�'); +INSERT INTO `sys_dict_data` VALUES (3, '000000', 3, '鏈煡', '2', 'sys_user_sex', '', '', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鎬у埆鏈煡'); +INSERT INTO `sys_dict_data` VALUES (4, '000000', 1, '鏄剧ず', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鏄剧ず鑿滃崟'); +INSERT INTO `sys_dict_data` VALUES (5, '000000', 2, '闅愯棌', '1', 'sys_show_hide', '', 'danger', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '闅愯棌鑿滃崟'); +INSERT INTO `sys_dict_data` VALUES (6, '000000', 1, '姝e父', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '姝e父鐘舵��'); +INSERT INTO `sys_dict_data` VALUES (7, '000000', 2, '鍋滅敤', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鍋滅敤鐘舵��'); +INSERT INTO `sys_dict_data` VALUES (12, '000000', 1, '鏄�', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '绯荤粺榛樿鏄�'); +INSERT INTO `sys_dict_data` VALUES (13, '000000', 2, '鍚�', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '绯荤粺榛樿鍚�'); +INSERT INTO `sys_dict_data` VALUES (14, '000000', 1, '閫氱煡', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '閫氱煡'); +INSERT INTO `sys_dict_data` VALUES (15, '000000', 2, '鍏憡', '2', 'sys_notice_type', '', 'success', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鍏憡'); +INSERT INTO `sys_dict_data` VALUES (16, '000000', 1, '姝e父', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '姝e父鐘舵��'); +INSERT INTO `sys_dict_data` VALUES (17, '000000', 2, '鍏抽棴', '1', 'sys_notice_status', '', 'danger', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鍏抽棴鐘舵��'); +INSERT INTO `sys_dict_data` VALUES (18, '000000', 1, '鏂板', '1', 'sys_oper_type', '', 'info', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鏂板鎿嶄綔'); +INSERT INTO `sys_dict_data` VALUES (19, '000000', 2, '淇敼', '2', 'sys_oper_type', '', 'info', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '淇敼鎿嶄綔'); +INSERT INTO `sys_dict_data` VALUES (20, '000000', 3, '鍒犻櫎', '3', 'sys_oper_type', '', 'danger', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鍒犻櫎鎿嶄綔'); +INSERT INTO `sys_dict_data` VALUES (21, '000000', 4, '鎺堟潈', '4', 'sys_oper_type', '', 'primary', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鎺堟潈鎿嶄綔'); +INSERT INTO `sys_dict_data` VALUES (22, '000000', 5, '瀵煎嚭', '5', 'sys_oper_type', '', 'warning', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '瀵煎嚭鎿嶄綔'); +INSERT INTO `sys_dict_data` VALUES (23, '000000', 6, '瀵煎叆', '6', 'sys_oper_type', '', 'warning', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '瀵煎叆鎿嶄綔'); +INSERT INTO `sys_dict_data` VALUES (24, '000000', 7, '寮洪��', '7', 'sys_oper_type', '', 'danger', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '寮洪��鎿嶄綔'); +INSERT INTO `sys_dict_data` VALUES (25, '000000', 8, '鐢熸垚浠g爜', '8', 'sys_oper_type', '', 'warning', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鐢熸垚鎿嶄綔'); +INSERT INTO `sys_dict_data` VALUES (26, '000000', 9, '娓呯┖鏁版嵁', '9', 'sys_oper_type', '', 'danger', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '娓呯┖鎿嶄綔'); +INSERT INTO `sys_dict_data` VALUES (27, '000000', 1, '鎴愬姛', '0', 'sys_common_status', '', 'primary', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '姝e父鐘舵��'); +INSERT INTO `sys_dict_data` VALUES (28, '000000', 2, '澶辫触', '1', 'sys_common_status', '', 'danger', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鍋滅敤鐘舵��'); +INSERT INTO `sys_dict_data` VALUES (29, '000000', 99, '鍏朵粬', '0', 'sys_oper_type', '', 'info', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鍏朵粬鎿嶄綔'); +INSERT INTO `sys_dict_data` VALUES (1775756996568993793, '000000', 1, '鍏嶈垂鐢ㄦ埛', '0', 'sys_user_grade', '', 'info', 'N', '0', 103, 1, '2024-04-04 13:27:15', 1, '2024-04-04 13:30:09', ''); +INSERT INTO `sys_dict_data` VALUES (1775757116970684418, '000000', 2, '楂樼骇浼氬憳', '1', 'sys_user_grade', '', 'success', 'N', '0', 103, 1, '2024-04-04 13:27:43', 1, '2024-04-04 13:30:15', ''); +INSERT INTO `sys_dict_data` VALUES (1776109770934677506, '000000', 0, 'token璁¤垂', '1', 'sys_model_billing', '', 'primary', 'N', '0', 103, 1, '2024-04-05 12:49:03', 1, '2024-04-21 00:05:41', ''); +INSERT INTO `sys_dict_data` VALUES (1776109853377916929, '000000', 0, '娆℃暟璁¤垂', '2', 'sys_model_billing', '', 'success', 'N', '0', 103, 1, '2024-04-05 12:49:22', 1, '2024-04-05 12:49:22', ''); +INSERT INTO `sys_dict_data` VALUES (1780264338471858177, '000000', 0, '鏈敮浠�', '1', 'pay_state', '', 'info', 'N', '0', 103, 1, '2024-04-16 23:57:49', 1, '2024-04-16 23:58:29', ''); +INSERT INTO `sys_dict_data` VALUES (1780264431589601282, '000000', 2, '宸叉敮浠�', '2', 'pay_state', '', 'success', 'N', '0', 103, 1, '2024-04-16 23:58:11', 1, '2024-04-16 23:58:21', ''); + +-- ---------------------------- +-- Table structure for sys_dict_type +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dict_type`; +CREATE TABLE `sys_dict_type` ( + `dict_id` bigint(20) NOT NULL COMMENT '瀛楀吀涓婚敭', + `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', + `dict_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '瀛楀吀鍚嶇О', + `dict_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '瀛楀吀绫诲瀷', + `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鐘舵�侊紙0姝e父 1鍋滅敤锛�', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + PRIMARY KEY (`dict_id`) USING BTREE, + UNIQUE INDEX `tenant_id`(`tenant_id`, `dict_type`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '瀛楀吀绫诲瀷琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_dict_type +-- ---------------------------- +INSERT INTO `sys_dict_type` VALUES (1, '000000', '鐢ㄦ埛鎬у埆', 'sys_user_sex', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鐢ㄦ埛鎬у埆鍒楄〃'); +INSERT INTO `sys_dict_type` VALUES (2, '000000', '鑿滃崟鐘舵��', 'sys_show_hide', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鑿滃崟鐘舵�佸垪琛�'); +INSERT INTO `sys_dict_type` VALUES (3, '000000', '绯荤粺寮�鍏�', 'sys_normal_disable', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '绯荤粺寮�鍏冲垪琛�'); +INSERT INTO `sys_dict_type` VALUES (6, '000000', '绯荤粺鏄惁', 'sys_yes_no', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '绯荤粺鏄惁鍒楄〃'); +INSERT INTO `sys_dict_type` VALUES (7, '000000', '閫氱煡绫诲瀷', 'sys_notice_type', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '閫氱煡绫诲瀷鍒楄〃'); +INSERT INTO `sys_dict_type` VALUES (8, '000000', '閫氱煡鐘舵��', 'sys_notice_status', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '閫氱煡鐘舵�佸垪琛�'); +INSERT INTO `sys_dict_type` VALUES (9, '000000', '鎿嶄綔绫诲瀷', 'sys_oper_type', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鎿嶄綔绫诲瀷鍒楄〃'); +INSERT INTO `sys_dict_type` VALUES (10, '000000', '绯荤粺鐘舵��', 'sys_common_status', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鐧诲綍鐘舵�佸垪琛�'); +INSERT INTO `sys_dict_type` VALUES (1729685494468083714, '911866', '鐢ㄦ埛鎬у埆', 'sys_user_sex', '0', 103, 1, '2023-05-14 15:19:41', 1, '2023-05-14 15:19:41', '鐢ㄦ埛鎬у埆鍒楄〃'); +INSERT INTO `sys_dict_type` VALUES (1729685494468083715, '911866', '鑿滃崟鐘舵��', 'sys_show_hide', '0', 103, 1, '2023-05-14 15:19:41', 1, '2023-05-14 15:19:41', '鑿滃崟鐘舵�佸垪琛�'); +INSERT INTO `sys_dict_type` VALUES (1729685494468083716, '911866', '绯荤粺寮�鍏�', 'sys_normal_disable', '0', 103, 1, '2023-05-14 15:19:41', 1, '2023-05-14 15:19:41', '绯荤粺寮�鍏冲垪琛�'); +INSERT INTO `sys_dict_type` VALUES (1729685494468083717, '911866', '绯荤粺鏄惁', 'sys_yes_no', '0', 103, 1, '2023-05-14 15:19:41', 1, '2023-05-14 15:19:41', '绯荤粺鏄惁鍒楄〃'); +INSERT INTO `sys_dict_type` VALUES (1729685494468083718, '911866', '閫氱煡绫诲瀷', 'sys_notice_type', '0', 103, 1, '2023-05-14 15:19:41', 1, '2023-05-14 15:19:41', '閫氱煡绫诲瀷鍒楄〃'); +INSERT INTO `sys_dict_type` VALUES (1729685494468083719, '911866', '閫氱煡鐘舵��', 'sys_notice_status', '0', 103, 1, '2023-05-14 15:19:41', 1, '2023-05-14 15:19:41', '閫氱煡鐘舵�佸垪琛�'); +INSERT INTO `sys_dict_type` VALUES (1729685494468083720, '911866', '鎿嶄綔绫诲瀷', 'sys_oper_type', '0', 103, 1, '2023-05-14 15:19:41', 1, '2023-05-14 15:19:41', '鎿嶄綔绫诲瀷鍒楄〃'); +INSERT INTO `sys_dict_type` VALUES (1729685494468083721, '911866', '绯荤粺鐘舵��', 'sys_common_status', '0', 103, 1, '2023-05-14 15:19:41', 1, '2023-05-14 15:19:41', '鐧诲綍鐘舵�佸垪琛�'); +INSERT INTO `sys_dict_type` VALUES (1775756736895438849, '000000', '鐢ㄦ埛绛夌骇', 'sys_user_grade', '0', 103, 1, '2024-04-04 13:26:13', 1, '2024-04-04 13:26:13', ''); +INSERT INTO `sys_dict_type` VALUES (1776109665045278721, '000000', '妯″瀷璁¤垂鏂瑰紡', 'sys_model_billing', '0', 103, 1, '2024-04-05 12:48:37', 1, '2024-04-08 11:22:18', '妯″瀷璁¤垂鏂瑰紡'); +INSERT INTO `sys_dict_type` VALUES (1780263881368219649, '000000', '鏀粯鐘舵��', 'pay_state', '0', 103, 1, '2024-04-16 23:56:00', 1, '2024-04-16 23:56:00', '鏀粯鐘舵��'); + +-- ---------------------------- +-- Table structure for sys_file_info +-- ---------------------------- +DROP TABLE IF EXISTS `sys_file_info`; +CREATE TABLE `sys_file_info` ( + `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '鏂囦欢id', + `url` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '鏂囦欢璁块棶鍦板潃', + `size` bigint(20) NULL DEFAULT NULL COMMENT '鏂囦欢澶у皬锛屽崟浣嶅瓧鑺�', + `filename` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '鏂囦欢鍚嶇О', + `original_filename` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '鍘熷鏂囦欢鍚�', + `base_path` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '鍩虹瀛樺偍璺緞', + `path` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '瀛樺偍璺緞', + `ext` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '鏂囦欢鎵╁睍鍚�', + `user_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '鏂囦欢鎵�灞炵敤鎴�', + `file_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '鏂囦欢绫诲瀷', + `attr` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '闄勫姞灞炴��', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鍒涘缓鑰�', + `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + `version` int(11) NULL DEFAULT NULL COMMENT '鐗堟湰', + `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 1浠h〃鍒犻櫎锛�', + `update_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏇存柊IP', + `tenant_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '绉熸埛Id', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1688133688718106627 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '鏂囦欢璁板綍琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_file_info +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_logininfor +-- ---------------------------- +DROP TABLE IF EXISTS `sys_logininfor`; +CREATE TABLE `sys_logininfor` ( + `info_id` bigint(20) NOT NULL COMMENT '璁块棶ID', + `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', + `user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鐢ㄦ埛璐﹀彿', + `ipaddr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鐧诲綍IP鍦板潃', + `login_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鐧诲綍鍦扮偣', + `browser` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '娴忚鍣ㄧ被鍨�', + `os` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鎿嶄綔绯荤粺', + `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鐧诲綍鐘舵�侊紙0鎴愬姛 1澶辫触锛�', + `msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鎻愮ず娑堟伅', + `login_time` datetime NULL DEFAULT NULL COMMENT '璁块棶鏃堕棿', + PRIMARY KEY (`info_id`) USING BTREE, + INDEX `idx_sys_logininfor_s`(`status`) USING BTREE, + INDEX `idx_sys_logininfor_lt`(`login_time`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '绯荤粺璁块棶璁板綍' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_logininfor +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_menu +-- ---------------------------- +DROP TABLE IF EXISTS `sys_menu`; +CREATE TABLE `sys_menu` ( + `menu_id` bigint(20) NOT NULL COMMENT '鑿滃崟ID', + `menu_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鑿滃崟鍚嶇О', + `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '鐖惰彍鍗旾D', + `order_num` int(11) NULL DEFAULT 0 COMMENT '鏄剧ず椤哄簭', + `path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '璺敱鍦板潃', + `component` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '缁勪欢璺緞', + `query_param` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '璺敱鍙傛暟', + `is_frame` int(11) NULL DEFAULT 1 COMMENT '鏄惁涓哄閾撅紙0鏄� 1鍚︼級', + `is_cache` int(11) NULL DEFAULT 0 COMMENT '鏄惁缂撳瓨锛�0缂撳瓨 1涓嶇紦瀛橈級', + `menu_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鑿滃崟绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛�', + `visible` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鏄剧ず鐘舵�侊紙0鏄剧ず 1闅愯棌锛�', + `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鑿滃崟鐘舵�侊紙0姝e父 1鍋滅敤锛�', + `perms` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏉冮檺鏍囪瘑', + `icon` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '#' COMMENT '鑿滃崟鍥炬爣', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '澶囨敞', + PRIMARY KEY (`menu_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鑿滃崟鏉冮檺琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_menu +-- ---------------------------- +INSERT INTO `sys_menu` VALUES (1, '绯荤粺绠$悊', 0, 1, 'system', NULL, '', 1, 0, 'M', '0', '0', '', 'system', 103, 1, '2023-05-14 15:19:39', NULL, NULL, '绯荤粺绠$悊鐩綍'); +INSERT INTO `sys_menu` VALUES (2, '绯荤粺鐩戞帶', 0, 3, 'monitor', NULL, '', 1, 0, 'M', '0', '0', '', 'monitor', 103, 1, '2023-05-14 15:19:39', NULL, NULL, '绯荤粺鐩戞帶鐩綍'); +INSERT INTO `sys_menu` VALUES (6, '绉熸埛绠$悊', 0, 2, 'tenant', NULL, '', 1, 0, 'M', '1', '1', '', 'chart', 103, 1, '2023-05-14 15:19:39', 1, '2024-04-04 22:35:33', '绉熸埛绠$悊鐩綍'); +INSERT INTO `sys_menu` VALUES (100, '鐢ㄦ埛绠$悊', 1775500307898949634, 1, 'user', 'system/user/index', '', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 103, 1, '2023-05-14 15:19:39', 1, '2024-04-03 20:27:27', '鐢ㄦ埛绠$悊鑿滃崟'); +INSERT INTO `sys_menu` VALUES (101, '瑙掕壊绠$悊', 1, 2, 'role', 'system/role/index', '', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 103, 1, '2023-05-14 15:19:39', NULL, NULL, '瑙掕壊绠$悊鑿滃崟'); +INSERT INTO `sys_menu` VALUES (102, '鑿滃崟绠$悊', 1, 3, 'menu', 'system/menu/index', '', 1, 0, 'C', '0', '0', 'system:menu:list', 'tree-table', 103, 1, '2023-05-14 15:19:39', NULL, NULL, '鑿滃崟绠$悊鑿滃崟'); +INSERT INTO `sys_menu` VALUES (103, '閮ㄩ棬绠$悊', 1, 4, 'dept', 'system/dept/index', '', 1, 0, 'C', '1', '1', 'system:dept:list', 'tree', 103, 1, '2023-05-14 15:19:39', 1, '2024-04-04 22:36:07', '閮ㄩ棬绠$悊鑿滃崟'); +INSERT INTO `sys_menu` VALUES (104, '宀椾綅绠$悊', 1, 5, 'post', 'system/post/index', '', 1, 0, 'C', '1', '1', 'system:post:list', 'post', 103, 1, '2023-05-14 15:19:39', 1, '2024-04-04 22:36:15', '宀椾綅绠$悊鑿滃崟'); +INSERT INTO `sys_menu` VALUES (105, '瀛楀吀绠$悊', 1, 6, 'dict', 'system/dict/index', '', 1, 0, 'C', '0', '0', 'system:dict:list', 'dict', 103, 1, '2023-05-14 15:19:40', NULL, NULL, '瀛楀吀绠$悊鑿滃崟'); +INSERT INTO `sys_menu` VALUES (106, '绯荤粺鍙傛暟', 1, 10, 'config', 'system/config/index', '', 1, 0, 'C', '0', '0', 'system:config:list', 'edit', 103, 1, '2023-05-14 15:19:40', 1, '2024-05-19 23:13:49', '鍙傛暟璁剧疆鑿滃崟'); +INSERT INTO `sys_menu` VALUES (107, '閫氱煡鍏憡', 1775500307898949634, 14, 'notice', 'system/notice/index', '', 1, 0, 'C', '0', '0', 'system:notice:list', 'message', 103, 1, '2023-05-14 15:19:40', 1, '2024-05-02 22:35:07', '閫氱煡鍏憡鑿滃崟'); +INSERT INTO `sys_menu` VALUES (108, '鏃ュ織绠$悊', 1, 9, 'log', '', '', 1, 0, 'M', '0', '0', '', 'log', 103, 1, '2023-05-14 15:19:40', NULL, NULL, '鏃ュ織绠$悊鑿滃崟'); +INSERT INTO `sys_menu` VALUES (109, '鍦ㄧ嚎鐢ㄦ埛', 2, 1, 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 103, 1, '2023-05-14 15:19:40', NULL, NULL, '鍦ㄧ嚎鐢ㄦ埛鑿滃崟'); +INSERT INTO `sys_menu` VALUES (113, '缂撳瓨鐩戞帶', 2, 5, 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 103, 1, '2023-05-14 15:19:40', NULL, NULL, '缂撳瓨鐩戞帶鑿滃崟'); +INSERT INTO `sys_menu` VALUES (115, '浠g爜鐢熸垚', 1, 2, 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 103, 1, '2023-05-14 15:19:40', 1, '2023-12-29 11:33:01', '浠g爜鐢熸垚鑿滃崟'); +INSERT INTO `sys_menu` VALUES (118, '瀛樺偍绠$悊', 1775500307898949634, 10, 'oss', 'system/oss/config', '', 1, 0, 'C', '0', '0', 'system:oss:list', 'redis', 103, 1, '2023-05-14 15:19:40', 1, '2024-04-07 19:56:55', '鏂囦欢绠$悊鑿滃崟'); +INSERT INTO `sys_menu` VALUES (121, '绉熸埛绠$悊', 6, 1, 'tenant', 'system/tenant/index', '', 1, 0, 'C', '0', '0', 'system:tenant:list', 'list', 103, 1, '2023-05-14 15:19:40', NULL, NULL, '绉熸埛绠$悊鑿滃崟'); +INSERT INTO `sys_menu` VALUES (122, '绉熸埛濂楅绠$悊', 6, 2, 'tenantPackage', 'system/tenantPackage/index', '', 1, 0, 'C', '0', '0', 'system:tenantPackage:list', 'form', 103, 1, '2023-05-14 15:19:40', NULL, NULL, '绉熸埛濂楅绠$悊鑿滃崟'); +INSERT INTO `sys_menu` VALUES (500, '鎿嶄綔鏃ュ織', 108, 1, 'operlog', 'monitor/operlog/index', '', 1, 0, 'C', '0', '0', 'monitor:operlog:list', 'form', 103, 1, '2023-05-14 15:19:40', NULL, NULL, '鎿嶄綔鏃ュ織鑿滃崟'); +INSERT INTO `sys_menu` VALUES (501, '鐧诲綍鏃ュ織', 108, 2, 'logininfor', 'monitor/logininfor/index', '', 1, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', 103, 1, '2023-05-14 15:19:40', NULL, NULL, '鐧诲綍鏃ュ織鑿滃崟'); +INSERT INTO `sys_menu` VALUES (1001, '鐢ㄦ埛鏌ヨ', 100, 1, '', '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1002, '鐢ㄦ埛鏂板', 100, 2, '', '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1003, '鐢ㄦ埛淇敼', 100, 3, '', '', '', 1, 0, 'F', '0', '0', 'system:user:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1004, '鐢ㄦ埛鍒犻櫎', 100, 4, '', '', '', 1, 0, 'F', '0', '0', 'system:user:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1005, '鐢ㄦ埛瀵煎嚭', 100, 5, '', '', '', 1, 0, 'F', '0', '0', 'system:user:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1006, '鐢ㄦ埛瀵煎叆', 100, 6, '', '', '', 1, 0, 'F', '0', '0', 'system:user:import', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1007, '閲嶇疆瀵嗙爜', 100, 7, '', '', '', 1, 0, 'F', '0', '0', 'system:user:resetPwd', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1008, '瑙掕壊鏌ヨ', 101, 1, '', '', '', 1, 0, 'F', '0', '0', 'system:role:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1009, '瑙掕壊鏂板', 101, 2, '', '', '', 1, 0, 'F', '0', '0', 'system:role:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1010, '瑙掕壊淇敼', 101, 3, '', '', '', 1, 0, 'F', '0', '0', 'system:role:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1011, '瑙掕壊鍒犻櫎', 101, 4, '', '', '', 1, 0, 'F', '0', '0', 'system:role:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1012, '瑙掕壊瀵煎嚭', 101, 5, '', '', '', 1, 0, 'F', '0', '0', 'system:role:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1013, '鑿滃崟鏌ヨ', 102, 1, '', '', '', 1, 0, 'F', '0', '0', 'system:menu:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1014, '鑿滃崟鏂板', 102, 2, '', '', '', 1, 0, 'F', '0', '0', 'system:menu:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1015, '鑿滃崟淇敼', 102, 3, '', '', '', 1, 0, 'F', '0', '0', 'system:menu:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1016, '鑿滃崟鍒犻櫎', 102, 4, '', '', '', 1, 0, 'F', '0', '0', 'system:menu:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1017, '閮ㄩ棬鏌ヨ', 103, 1, '', '', '', 1, 0, 'F', '0', '0', 'system:dept:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1018, '閮ㄩ棬鏂板', 103, 2, '', '', '', 1, 0, 'F', '0', '0', 'system:dept:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1019, '閮ㄩ棬淇敼', 103, 3, '', '', '', 1, 0, 'F', '0', '0', 'system:dept:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1020, '閮ㄩ棬鍒犻櫎', 103, 4, '', '', '', 1, 0, 'F', '0', '0', 'system:dept:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1021, '宀椾綅鏌ヨ', 104, 1, '', '', '', 1, 0, 'F', '0', '0', 'system:post:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1022, '宀椾綅鏂板', 104, 2, '', '', '', 1, 0, 'F', '0', '0', 'system:post:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1023, '宀椾綅淇敼', 104, 3, '', '', '', 1, 0, 'F', '0', '0', 'system:post:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1024, '宀椾綅鍒犻櫎', 104, 4, '', '', '', 1, 0, 'F', '0', '0', 'system:post:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1025, '宀椾綅瀵煎嚭', 104, 5, '', '', '', 1, 0, 'F', '0', '0', 'system:post:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1026, '瀛楀吀鏌ヨ', 105, 1, '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1027, '瀛楀吀鏂板', 105, 2, '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1028, '瀛楀吀淇敼', 105, 3, '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1029, '瀛楀吀鍒犻櫎', 105, 4, '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1030, '瀛楀吀瀵煎嚭', 105, 5, '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1031, '鍙傛暟鏌ヨ', 106, 1, '#', '', '', 1, 0, 'F', '0', '0', 'system:config:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1032, '鍙傛暟鏂板', 106, 2, '#', '', '', 1, 0, 'F', '0', '0', 'system:config:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1033, '鍙傛暟淇敼', 106, 3, '#', '', '', 1, 0, 'F', '0', '0', 'system:config:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1034, '鍙傛暟鍒犻櫎', 106, 4, '#', '', '', 1, 0, 'F', '0', '0', 'system:config:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1035, '鍙傛暟瀵煎嚭', 106, 5, '#', '', '', 1, 0, 'F', '0', '0', 'system:config:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1036, '鍏憡鏌ヨ', 107, 1, '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1037, '鍏憡鏂板', 107, 2, '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1038, '鍏憡淇敼', 107, 3, '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1039, '鍏憡鍒犻櫎', 107, 4, '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1040, '鎿嶄綔鏌ヨ', 500, 1, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1041, '鎿嶄綔鍒犻櫎', 500, 2, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1042, '鏃ュ織瀵煎嚭', 500, 4, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1043, '鐧诲綍鏌ヨ', 501, 1, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1044, '鐧诲綍鍒犻櫎', 501, 2, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1045, '鏃ュ織瀵煎嚭', 501, 3, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1046, '鍦ㄧ嚎鏌ヨ', 109, 1, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1047, '鎵归噺寮洪��', 109, 2, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1048, '鍗曟潯寮洪��', 109, 3, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1050, '璐︽埛瑙i攣', 501, 4, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:unlock', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1055, '鐢熸垚鏌ヨ', 115, 1, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1056, '鐢熸垚淇敼', 115, 2, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1057, '鐢熸垚鍒犻櫎', 115, 3, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1058, '瀵煎叆浠g爜', 115, 2, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1059, '棰勮浠g爜', 115, 4, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1060, '鐢熸垚浠g爜', 115, 5, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1600, '鏂囦欢鏌ヨ', 118, 1, '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1601, '鏂囦欢涓婁紶', 118, 2, '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:upload', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1602, '鏂囦欢涓嬭浇', 118, 3, '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:download', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1603, '鏂囦欢鍒犻櫎', 118, 4, '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1605, '閰嶇疆缂栬緫', 118, 6, '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1606, '绉熸埛鏌ヨ', 121, 1, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1607, '绉熸埛鏂板', 121, 2, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1608, '绉熸埛淇敼', 121, 3, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1609, '绉熸埛鍒犻櫎', 121, 4, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1610, '绉熸埛瀵煎嚭', 121, 5, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1611, '绉熸埛濂楅鏌ヨ', 122, 1, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1612, '绉熸埛濂楅鏂板', 122, 2, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1613, '绉熸埛濂楅淇敼', 122, 3, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1614, '绉熸埛濂楅鍒犻櫎', 122, 4, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1615, '绉熸埛濂楅瀵煎嚭', 122, 5, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1775500307898949634, '杩愯惀绠$悊', 0, 0, 'operate', NULL, NULL, 1, 0, 'M', '0', '0', NULL, 'peoples', 103, 1, '2024-04-03 20:27:15', 1, '2024-04-03 20:27:15', ''); +INSERT INTO `sys_menu` VALUES (1775895273104068610, '绯荤粺妯″瀷', 1775500307898949634, 2, 'model', 'system/model/index', NULL, 1, 0, 'C', '0', '0', 'system:model:list', 'example', 103, 1, '2024-04-05 12:00:38', 1, '2024-04-05 12:14:02', '绯荤粺妯″瀷鑿滃崟'); +INSERT INTO `sys_menu` VALUES (1775895273104068611, '绯荤粺妯″瀷鏌ヨ', 1775895273104068610, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:model:query', '#', 103, 1, '2024-04-05 12:00:38', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1775895273104068612, '绯荤粺妯″瀷鏂板', 1775895273104068610, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:model:add', '#', 103, 1, '2024-04-05 12:00:38', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1775895273104068613, '绯荤粺妯″瀷淇敼', 1775895273104068610, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:model:edit', '#', 103, 1, '2024-04-05 12:00:38', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1775895273104068614, '绯荤粺妯″瀷鍒犻櫎', 1775895273104068610, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:model:remove', '#', 103, 1, '2024-04-05 12:00:38', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1775895273104068615, '绯荤粺妯″瀷瀵煎嚭', 1775895273104068610, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:model:export', '#', 103, 1, '2024-04-05 12:00:38', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1779024740525608962, '閰嶇疆绠$悊', 1775500307898949634, 4, 'chat', 'system/chatconfig/index', NULL, 1, 0, 'C', '0', '0', '', 'dict', 103, 1, '2024-04-13 13:56:30', 1, '2024-04-13 14:47:51', '瀵硅瘽閰嶇疆淇℃伅\r\n鑿滃崟'); +INSERT INTO `sys_menu` VALUES (1779024740525608963, '瀵硅瘽閰嶇疆淇℃伅\r\n鏌ヨ', 1779024740525608962, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:config:query', '#', 103, 1, '2024-04-13 13:56:30', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1779024740525608964, '瀵硅瘽閰嶇疆淇℃伅\r\n鏂板', 1779024740525608962, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:config:add', '#', 103, 1, '2024-04-13 13:56:30', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1779024740525608965, '瀵硅瘽閰嶇疆淇℃伅\r\n淇敼', 1779024740525608962, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:config:edit', '#', 103, 1, '2024-04-13 13:56:30', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1779024740525608966, '瀵硅瘽閰嶇疆淇℃伅\r\n鍒犻櫎', 1779024740525608962, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:config:remove', '#', 103, 1, '2024-04-13 13:56:30', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1779024740525608967, '瀵硅瘽閰嶇疆淇℃伅\r\n瀵煎嚭', 1779024740525608962, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:config:export', '#', 103, 1, '2024-04-13 13:56:30', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1780240077690507266, '鑱婂ぉ娑堟伅', 1775500307898949634, 0, 'chatMessage', 'system/message/index', NULL, 1, 0, 'C', '0', '0', 'system:message:list', 'log', 103, 1, '2024-04-16 22:24:48', 1, '2024-04-16 23:10:47', '鑱婂ぉ娑堟伅鑿滃崟'); +INSERT INTO `sys_menu` VALUES (1780240077690507267, '鑱婂ぉ娑堟伅鏌ヨ', 1780240077690507266, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:message:query', '#', 103, 1, '2024-04-16 22:24:48', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1780240077690507268, '鑱婂ぉ娑堟伅鏂板', 1780240077690507266, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:message:add', '#', 103, 1, '2024-04-16 22:24:48', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1780240077690507269, '鑱婂ぉ娑堟伅淇敼', 1780240077690507266, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:message:edit', '#', 103, 1, '2024-04-16 22:24:48', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1780240077690507270, '鑱婂ぉ娑堟伅鍒犻櫎', 1780240077690507266, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:message:remove', '#', 103, 1, '2024-04-16 22:24:48', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1780240077690507271, '鑱婂ぉ娑堟伅瀵煎嚭', 1780240077690507266, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:message:export', '#', 103, 1, '2024-04-16 22:24:48', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1780255628576018433, '鏀粯璁㈠崟', 1775500307898949634, 9, 'orders', 'system/orders/index', NULL, 1, 0, 'C', '0', '0', 'system:orders:list', 'documentation', 103, 1, '2024-04-16 23:32:48', 1, '2024-04-16 23:51:51', '鏀粯璁㈠崟鑿滃崟'); +INSERT INTO `sys_menu` VALUES (1780255628576018434, '鏀粯璁㈠崟鏌ヨ', 1780255628576018433, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:orders:query', '#', 103, 1, '2024-04-16 23:32:48', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1780255628576018435, '鏀粯璁㈠崟鏂板', 1780255628576018433, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:orders:add', '#', 103, 1, '2024-04-16 23:32:48', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1780255628576018436, '鏀粯璁㈠崟淇敼', 1780255628576018433, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:orders:edit', '#', 103, 1, '2024-04-16 23:32:48', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1780255628576018437, '鏀粯璁㈠崟鍒犻櫎', 1780255628576018433, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:orders:remove', '#', 103, 1, '2024-04-16 23:32:48', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1780255628576018438, '鏀粯璁㈠崟瀵煎嚭', 1780255628576018433, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:orders:export', '#', 103, 1, '2024-04-16 23:32:48', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1786379590171156481, '鍏戞崲绠$悊', 1775500307898949634, 12, 'voucher', 'system/voucher/index', NULL, 1, 0, 'C', '0', '0', 'system:voucher:list', 'druid', 103, 1, '2024-05-03 20:59:54', 1, '2024-05-03 21:11:41', '鐢ㄦ埛鍏戞崲璁板綍鑿滃崟'); +INSERT INTO `sys_menu` VALUES (1786379590171156482, '鐢ㄦ埛鍏戞崲璁板綍鏌ヨ', 1786379590171156481, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:voucher:query', '#', 103, 1, '2024-05-03 20:59:54', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1786379590171156483, '鐢ㄦ埛鍏戞崲璁板綍鏂板', 1786379590171156481, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:voucher:add', '#', 103, 1, '2024-05-03 20:59:54', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1786379590171156484, '鐢ㄦ埛鍏戞崲璁板綍淇敼', 1786379590171156481, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:voucher:edit', '#', 103, 1, '2024-05-03 20:59:55', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1786379590171156485, '鐢ㄦ埛鍏戞崲璁板綍鍒犻櫎', 1786379590171156481, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:voucher:remove', '#', 103, 1, '2024-05-03 20:59:55', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1786379590171156486, '鐢ㄦ埛鍏戞崲璁板綍瀵煎嚭', 1786379590171156481, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:voucher:export', '#', 103, 1, '2024-05-03 20:59:55', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1786380456739528706, '鏈哄櫒绠$悊', 1775500307898949634, 13, 'robConfig', 'system/robConfig/index', NULL, 1, 0, 'C', '0', '0', 'system:robConfig:list', 'people', 103, 1, '2024-05-03 21:02:57', 1, '2024-05-03 21:13:16', 'robot鑿滃崟'); +INSERT INTO `sys_menu` VALUES (1786380456739528707, 'robot鏌ヨ', 1786380456739528706, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:robConfig:query', '#', 103, 1, '2024-05-03 21:02:57', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1786380456739528708, 'robot鏂板', 1786380456739528706, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:robConfig:add', '#', 103, 1, '2024-05-03 21:02:57', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1786380456739528709, 'robot淇敼', 1786380456739528706, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:robConfig:edit', '#', 103, 1, '2024-05-03 21:02:58', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1786380456739528710, 'robot鍒犻櫎', 1786380456739528706, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:robConfig:remove', '#', 103, 1, '2024-05-03 21:02:58', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1786380456739528711, 'robot瀵煎嚭', 1786380456739528706, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:robConfig:export', '#', 103, 1, '2024-05-03 21:02:58', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1787078000285122561, '濂楅绠$悊', 1775500307898949634, 1, 'packagePlan', 'system/packagePlan/index', NULL, 1, 0, 'C', '0', '0', 'system:packagePlan:list', 'tool', 103, 1, '2024-05-05 19:13:53', 1, '2024-05-05 19:38:56', '濂楅绠$悊鑿滃崟'); +INSERT INTO `sys_menu` VALUES (1787078000285122562, '濂楅绠$悊鏌ヨ', 1787078000285122561, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:packagePlan:query', '#', 103, 1, '2024-05-05 19:13:53', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1787078000285122563, '濂楅绠$悊鏂板', 1787078000285122561, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:packagePlan:add', '#', 103, 1, '2024-05-05 19:13:53', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1787078000285122564, '濂楅绠$悊淇敼', 1787078000285122561, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:packagePlan:edit', '#', 103, 1, '2024-05-05 19:13:53', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1787078000285122565, '濂楅绠$悊鍒犻櫎', 1787078000285122561, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:packagePlan:remove', '#', 103, 1, '2024-05-05 19:13:53', NULL, NULL, ''); +INSERT INTO `sys_menu` VALUES (1787078000285122566, '濂楅绠$悊瀵煎嚭', 1787078000285122561, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:packagePlan:export', '#', 103, 1, '2024-05-05 19:13:53', NULL, NULL, ''); + +-- ---------------------------- +-- Table structure for sys_model +-- ---------------------------- +DROP TABLE IF EXISTS `sys_model`; +CREATE TABLE `sys_model` ( + `id` bigint(20) NOT NULL COMMENT '涓婚敭', + `model_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '妯″瀷鍚嶇О', + `model_describe` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '妯″瀷鎻忚堪', + `model_price` double NULL DEFAULT NULL COMMENT '妯″瀷浠锋牸', + `model_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '璁¤垂绫诲瀷', + `model_show` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄惁鏄剧ず', + `system_prompt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '绯荤粺鎻愮ず璇�', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '绯荤粺妯″瀷' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_model +-- ---------------------------- +INSERT INTO `sys_model` VALUES (1776114028757180417, 'gpt-3.5-turbo', 'gpt-3', 0.05, '1', '0', NULL, 103, 1, '2024-04-20 23:40:31', 1, '2024-04-23 21:45:19', 'GPT3.5鏈�鏂版ā鍨�,鐢ㄤ簬鏂囨湰鐢熸垚銆佸璇濈郴缁熴�佸唴瀹规憳瑕佺瓑'); +INSERT INTO `sys_model` VALUES (1781709495515783171, 'gpt-4-all', 'gpt-all', 0.2, '2', '0', NULL, 103, 1, '2024-04-20 23:40:41', 1, '2024-04-23 21:45:23', '鍚屾椂鎷ユ湁鑱旂綉鏌ヨ锛岄珮绾ф暟鎹垎鏋愶紝鐢诲浘 DALL.E鍔熻兘,GPT 浼氳嚜鍔ㄨ瘑鍒苟璋冨彇鐩稿叧鑳藉姏宸ュ叿'); +INSERT INTO `sys_model` VALUES (1781709617662304258, 'gpt-4-turbo-2024-04-09', 'gpt-4', 0.2, '1', '0', '浣跨敤涓枃鍥炲', 103, 1, '2024-04-20 23:40:50', 1, '2024-04-23 21:45:28', '鏈�鏂扮増GPT-4,鐩稿GPT-3.5鏇村厛杩涖�佹嫢鏈夋洿澶氱殑鍙傛暟鍜屾洿寮哄ぇ鐨勮瑷�澶勭悊鑳藉姏'); +INSERT INTO `sys_model` VALUES (1781715781896646657, 'suno-v3', 'suno-v3', 0.5, '2', '0', NULL, 103, 1, '2024-04-21 00:05:20', 1, '2024-04-23 19:34:36', 'SunoAI 鎺ㄥ嚭鐨勬枃鐢熸瓕妯″瀷锛屾敮鎸佺伒鎰熸ā寮忋�佹瓕璇嶆ā寮忥紝涔熸敮鎸佺敓鎴愮函闊充箰'); +INSERT INTO `sys_model` VALUES (1781728235120791553, 'stable-diffusion', 'stable-diffusion', 0.1, '2', '0', NULL, 103, 1, '2024-04-21 00:54:49', 1, '2024-04-23 19:34:40', '楂樼骇鍥惧儚鐢熸垚鍜屽鐞嗘ā鍨嬶紝鎿呴暱鍒涘缓閫肩湡鐨勮瑙夋晥鏋�'); +INSERT INTO `sys_model` VALUES (1781728766161620993, 'claude-3-opus-20240229', 'claude-3-opus-20240229', 0.2, '1', '0', NULL, 103, 1, '2024-04-21 00:56:55', 1, '2024-04-23 19:34:43', 'Claude妯″瀷鐨勬渶鏂扮増鏈紝鍏锋湁鏈�鍏堣繘鐨勮瑷�澶勭悊鎶�鏈�'); +INSERT INTO `sys_model` VALUES (1782734319650418690, 'gpt-4-1106-vision-preview', 'gpt-4-1106-vision-preview', 0.2, '2', '1', '', 103, 1, '2024-04-23 19:32:38', 1, '2024-04-23 19:38:38', 'GPT-4 鐨勪竴涓寘鍚瑙夊鐞嗚兘鍔涚殑棰勮鐗堟湰锛岀粨鍚堜簡瑙嗚淇℃伅澶勭悊鐨勮兘鍔�'); +INSERT INTO `sys_model` VALUES (1782736322308943873, 'dall-e-3', 'dall3', 0.3, '2', '1', '', 103, 1, '2024-04-23 19:40:36', 1, '2024-04-23 21:45:40', 'DALL路E 鏄竴涓笓娉ㄤ簬鍥惧儚鐢熸垚鐨勬ā鍨�'); +INSERT INTO `sys_model` VALUES (1782736729471004673, 'gpt-4-gizmo', 'gpt-4-gizmo', 0.2, '2', '1', NULL, 103, 1, '2024-04-23 19:42:13', 1, '2024-04-23 19:42:13', 'gpts鍟嗗簵涓殑妯″瀷,浣跨敤鏂瑰紡:gpt-4-gizmo-g-xxx'); +INSERT INTO `sys_model` VALUES (1782792839548735490, 'mj-type1', 'Midjourney1', 0.1, '2', '1', NULL, 103, 1, '2024-04-23 23:25:10', 1, '2024-04-23 23:28:04', '鍥剧敓鏂囥�佹斁澶с�佹彁绀鸿瘝鍒嗘瀽璐圭敤'); +INSERT INTO `sys_model` VALUES (1782793100841291778, 'mj-type2', 'Midjourney2', 0.3, '2', '1', NULL, 103, 1, '2024-04-23 23:26:13', 1, '2024-04-23 23:28:13', '鏂囩敓鍥撅紝鍥剧敓鍥撅紝鍙樺寲銆佹崲鑴歌垂鐢�'); +INSERT INTO `sys_model` VALUES (1790237707719991298, 'gpt-4o-2024-05-13', 'gpt-4o-2024-05-13', 0.2, '1', '0', NULL, 103, 1, '2024-05-14 12:28:25', 1, '2024-05-14 12:28:25', ' OpenAI 鏈�鍏堣繘鐨勫妯″紡妯″瀷锛屾瘮 GPT-4 Turbo 鏇村揩銆佹洿渚垮疁锛屽叿鏈夋洿寮虹殑瑙嗚鍔熻兘'); + +-- ---------------------------- +-- Table structure for sys_notice +-- ---------------------------- +DROP TABLE IF EXISTS `sys_notice`; +CREATE TABLE `sys_notice` ( + `notice_id` bigint(20) NOT NULL COMMENT '鍏憡ID', + `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', + `notice_title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鍏憡鏍囬', + `notice_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛�', + `notice_content` longblob NULL COMMENT '鍏憡鍐呭', + `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鍏憡鐘舵�侊紙0姝e父 1鍏抽棴锛�', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + PRIMARY KEY (`notice_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '閫氱煡鍏憡琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_notice +-- ---------------------------- +INSERT INTO `sys_notice` VALUES (1789324923280932865, '000000', '鍏憡', '1', 0x3C68313E3C7370616E207374796C653D226261636B67726F756E642D636F6C6F723A20726762283235352C203235352C2030293B223EE696B0E78988E69CACE58685E5AEB93C2F7370616E3E3C2F68313E3C703EE79BAEE5898DE694AFE68C81E69C80E5A49A3C7370616E207374796C653D226261636B67726F756E642D636F6C6F723A20726762283233302C20302C2030293B223E3530E4BABA3C2F7370616E3EE799BBE5BD95EFBC8CE4B880E4B8AAE794A8E688B7E58FAAE883BDE7BB91E5AE9AE4B880E4B8AAE5BEAEE4BFA1EFBC8CE4B894E4B88DE694AFE68C81E58887E68DA2E6A8A1E59E8BE380823C2F703E3C703EE5BC80E58F91E8AEA1E58892EFBC9A3C2F703E3C703E312E20E58FAFE4BBA5E98089E68BA9E79FA5E8AF86E5BA933C2F703E3C703E322E20E58FAFE4BBA5E58887E68DA2E6A8A1E59E8B3C2F703E3C703E332E3C733E20E5908CE4B880E4B8AAE794A8E688B7E58FAFE4BBA5E799BBE5BD95E5A49AE4B8AAE5BEAEE4BFA13C2F733E3C2F703E, '0', 103, 1, '2024-05-12 00:01:20', 1, '2024-05-12 00:01:20', ''); + +-- ---------------------------- +-- Table structure for sys_notice_state +-- ---------------------------- +DROP TABLE IF EXISTS `sys_notice_state`; +CREATE TABLE `sys_notice_state` ( + `id` bigint(20) NOT NULL COMMENT 'ID', + `user_id` bigint(20) NOT NULL COMMENT '鐢ㄦ埛ID', + `notice_id` bigint(20) NOT NULL COMMENT '鍏憡ID', + `read_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '闃呰鐘舵�侊紙0鏈 1宸茶锛�', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐢ㄦ埛闃呰鐘舵�佽〃' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_notice_state +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_oper_log +-- ---------------------------- +DROP TABLE IF EXISTS `sys_oper_log`; +CREATE TABLE `sys_oper_log` ( + `oper_id` bigint(20) NOT NULL COMMENT '鏃ュ織涓婚敭', + `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', + `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '妯″潡鏍囬', + `business_type` int(2) NULL DEFAULT 0 COMMENT '涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�', + `method` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鏂规硶鍚嶇О', + `request_method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '璇锋眰鏂瑰紡', + `operator_type` int(1) NULL DEFAULT 0 COMMENT '鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級', + `oper_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鎿嶄綔浜哄憳', + `dept_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '閮ㄩ棬鍚嶇О', + `oper_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '璇锋眰URL', + `oper_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '涓绘満鍦板潃', + `oper_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鎿嶄綔鍦扮偣', + `oper_param` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '璇锋眰鍙傛暟', + `json_result` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '杩斿洖鍙傛暟', + `status` int(1) NULL DEFAULT 0 COMMENT '鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛�', + `error_msg` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '閿欒娑堟伅', + `oper_time` datetime NULL DEFAULT NULL COMMENT '鎿嶄綔鏃堕棿', + `cost_time` bigint(20) NULL DEFAULT 0 COMMENT '娑堣�楁椂闂�', + PRIMARY KEY (`oper_id`) USING BTREE, + INDEX `idx_sys_oper_log_bt`(`business_type`) USING BTREE, + INDEX `idx_sys_oper_log_s`(`status`) USING BTREE, + INDEX `idx_sys_oper_log_ot`(`oper_time`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鎿嶄綔鏃ュ織璁板綍' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_oper_log +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_oss +-- ---------------------------- +DROP TABLE IF EXISTS `sys_oss`; +CREATE TABLE `sys_oss` ( + `oss_id` bigint(20) NOT NULL COMMENT '瀵硅薄瀛樺偍涓婚敭', + `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', + `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鏂囦欢鍚�', + `original_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鍘熷悕', + `file_suffix` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鏂囦欢鍚庣紑鍚�', + `url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'URL鍦板潃', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '涓婁紶浜�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊浜�', + `service` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'minio' COMMENT '鏈嶅姟鍟�', + PRIMARY KEY (`oss_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'OSS瀵硅薄瀛樺偍琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_oss +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_oss_config +-- ---------------------------- +DROP TABLE IF EXISTS `sys_oss_config`; +CREATE TABLE `sys_oss_config` ( + `oss_config_id` bigint(20) NOT NULL COMMENT '涓诲缓', + `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', + `config_key` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '閰嶇疆key', + `access_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'accessKey', + `secret_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '绉橀挜', + `bucket_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '妗跺悕绉�', + `prefix` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鍓嶇紑', + `endpoint` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '璁块棶绔欑偣', + `domain` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鑷畾涔夊煙鍚�', + `is_https` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'N' COMMENT '鏄惁https锛圷=鏄�,N=鍚︼級', + `region` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鍩�', + `access_policy` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '妗舵潈闄愮被鍨�(0=private 1=public 2=custom)', + `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '鏄惁榛樿锛�0=鏄�,1=鍚︼級', + `ext1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鎵╁睍瀛楁', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + PRIMARY KEY (`oss_config_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '瀵硅薄瀛樺偍閰嶇疆琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_oss_config +-- ---------------------------- +INSERT INTO `sys_oss_config` VALUES (1, '000000', 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '', 'N', '', '1', '1', '', 103, 1, '2023-05-14 15:19:42', 1, '2023-07-13 23:28:18', NULL); +INSERT INTO `sys_oss_config` VALUES (2, '000000', 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '', 'N', '', '1', '1', '', 103, 1, '2023-05-14 15:19:42', 1, '2023-05-14 15:19:42', NULL); +INSERT INTO `sys_oss_config` VALUES (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '', 'N', '', '1', '1', '', 103, 1, '2023-05-14 15:19:42', 1, '2023-07-13 23:35:23', NULL); +INSERT INTO `sys_oss_config` VALUES (4, '000000', 'qcloud', 'xx', 'xx', 'panda-1253683406', 'panda', 'cos.ap-guangzhou.myqcloud.com', '', 'N', 'ap-guangzhou', '1', '0', '', 103, 1, '2023-05-14 15:19:42', 1, '2023-11-13 23:58:09', ''); +INSERT INTO `sys_oss_config` VALUES (5, '000000', 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '', 'N', '', '1', '1', '', 103, 1, '2023-05-14 15:19:42', 1, '2023-05-14 15:19:42', NULL); + +-- ---------------------------- +-- Table structure for sys_package_plan +-- ---------------------------- +DROP TABLE IF EXISTS `sys_package_plan`; +CREATE TABLE `sys_package_plan` ( + `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '涓婚敭', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '濂楅鍚嶇О', + `price` double(10, 2) NOT NULL COMMENT '濂楅浠锋牸', + `duration` int(11) NOT NULL COMMENT '鏈夋晥鏃堕棿', + `plan_detail` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '璁″垝璇︽儏', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1787085903419211779 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '濂楅绠$悊' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_package_plan +-- ---------------------------- +INSERT INTO `sys_package_plan` VALUES (1787085620534378498, '鍒濈骇濂楅', 9.90, 30, '瑙i攣鍏ㄩ儴妯″瀷, dall路e 3, midjourney, gpt-3.5-turbo-1106, gpt-4-1106-preview, gpt-4-1106-vision-preview', 103, 1, '2024-05-05 19:43:09', 1, '2024-05-20 00:05:43', '鍒濈骇濂楅'); +INSERT INTO `sys_package_plan` VALUES (1787085808271425538, '涓骇濂楅', 30.00, 30, '瑙i攣鍏ㄩ儴妯″瀷, dall路e 3, midjourney, gpt-3.5-turbo-1106, gpt-4-1106-preview, gpt-4-1106-vision-preview', 103, 1, '2024-05-05 19:43:54', 1, '2024-05-05 22:29:42', '涓骇濂楅'); +INSERT INTO `sys_package_plan` VALUES (1787085903419211778, '楂樼骇濂楅', 60.00, 30, '瑙i攣鍏ㄩ儴妯″瀷, dall路e 3, midjourney, gpt-3.5-turbo-1106, gpt-4-1106-preview, gpt-4-1106-vision-preview', 103, 1, '2024-05-05 19:44:16', 1, '2024-05-05 22:29:45', '楂樼骇濂楅'); + +-- ---------------------------- +-- Table structure for sys_pay_order +-- ---------------------------- +DROP TABLE IF EXISTS `sys_pay_order`; +CREATE TABLE `sys_pay_order` ( + `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '涓婚敭', + `order_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '璁㈠崟缂栧彿', + `order_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '璁㈠崟鍚嶇О', + `amount` decimal(10, 2) NOT NULL COMMENT '閲戦', + `payment_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏀粯鐘舵��', + `payment_method` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏀粯鏂瑰紡', + `user_id` bigint(20) NULL DEFAULT NULL COMMENT '鐢ㄦ埛ID', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1794031846814027779 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鏀粯璁㈠崟琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_pay_order +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_post +-- ---------------------------- +DROP TABLE IF EXISTS `sys_post`; +CREATE TABLE `sys_post` ( + `post_id` bigint(20) NOT NULL COMMENT '宀椾綅ID', + `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', + `post_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '宀椾綅缂栫爜', + `post_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '宀椾綅鍚嶇О', + `post_sort` int(4) NOT NULL COMMENT '鏄剧ず椤哄簭', + `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐘舵�侊紙0姝e父 1鍋滅敤锛�', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + PRIMARY KEY (`post_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '宀椾綅淇℃伅琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_post +-- ---------------------------- +INSERT INTO `sys_post` VALUES (1, '000000', 'ceo', '钁d簨闀�', 1, '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL, ''); +INSERT INTO `sys_post` VALUES (2, '000000', 'se', '椤圭洰缁忕悊', 2, '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL, ''); +INSERT INTO `sys_post` VALUES (3, '000000', 'hr', '浜哄姏璧勬簮', 3, '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL, ''); +INSERT INTO `sys_post` VALUES (4, '000000', 'user', '鏅�氬憳宸�', 4, '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL, ''); + +-- ---------------------------- +-- Table structure for sys_role +-- ---------------------------- +DROP TABLE IF EXISTS `sys_role`; +CREATE TABLE `sys_role` ( + `role_id` bigint(20) NOT NULL COMMENT '瑙掕壊ID', + `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', + `role_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '瑙掕壊鍚嶇О', + `role_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '瑙掕壊鏉冮檺瀛楃涓�', + `role_sort` int(4) NOT NULL COMMENT '鏄剧ず椤哄簭', + `data_scope` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '鏁版嵁鑼冨洿锛�1锛氬叏閮ㄦ暟鎹潈闄� 2锛氳嚜瀹氭暟鎹潈闄� 3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺 4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶級', + `menu_check_strictly` tinyint(1) NULL DEFAULT 1 COMMENT '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�', + `dept_check_strictly` tinyint(1) NULL DEFAULT 1 COMMENT '閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�', + `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛�', + `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + PRIMARY KEY (`role_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '瑙掕壊淇℃伅琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_role +-- ---------------------------- +INSERT INTO `sys_role` VALUES (1, '000000', '瓒呯骇绠$悊鍛�', 'superadmin', 1, '1', 1, 1, '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL, '瓒呯骇绠$悊鍛�'); +INSERT INTO `sys_role` VALUES (2, '000000', '鏅�氳鑹�', 'common', 2, '2', 1, 1, '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL, '鏅�氳鑹�'); +INSERT INTO `sys_role` VALUES (3, '000000', '鏈儴闂ㄥ強浠ヤ笅', 'test1', 3, '4', 1, 1, '0', '0', 103, 1, '2023-05-14 15:20:00', 1, '2023-06-04 10:20:43', NULL); +INSERT INTO `sys_role` VALUES (4, '000000', '浠呮湰浜�', 'test2', 4, '5', 1, 1, '0', '0', 103, 1, '2023-05-14 15:20:00', 1, '2023-06-04 10:21:01', NULL); +INSERT INTO `sys_role` VALUES (1661661183933177857, '000000', '灏忕▼搴忕鐞嗗憳', 'xcxadmin', 1, '1', 1, 1, '0', '0', 103, 1, '2023-05-25 17:11:13', 1, '2023-05-25 17:11:13', ''); +INSERT INTO `sys_role` VALUES (1729685491108446210, '911866', '绠$悊鍛�', 'admin', 1, '1', 1, 1, '0', '0', 103, 1, '2023-11-29 10:15:32', 1, '2023-11-29 10:15:32', NULL); + +-- ---------------------------- +-- Table structure for sys_role_dept +-- ---------------------------- +DROP TABLE IF EXISTS `sys_role_dept`; +CREATE TABLE `sys_role_dept` ( + `role_id` bigint(20) NOT NULL COMMENT '瑙掕壊ID', + `dept_id` bigint(20) NOT NULL COMMENT '閮ㄩ棬ID', + PRIMARY KEY (`role_id`, `dept_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '瑙掕壊鍜岄儴闂ㄥ叧鑱旇〃' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_role_dept +-- ---------------------------- +INSERT INTO `sys_role_dept` VALUES (2, 100); +INSERT INTO `sys_role_dept` VALUES (2, 101); +INSERT INTO `sys_role_dept` VALUES (2, 105); +INSERT INTO `sys_role_dept` VALUES (1729685491108446210, 1729685491964084226); + +-- ---------------------------- +-- Table structure for sys_role_menu +-- ---------------------------- +DROP TABLE IF EXISTS `sys_role_menu`; +CREATE TABLE `sys_role_menu` ( + `role_id` bigint(20) NOT NULL COMMENT '瑙掕壊ID', + `menu_id` bigint(20) NOT NULL COMMENT '鑿滃崟ID', + PRIMARY KEY (`role_id`, `menu_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '瑙掕壊鍜岃彍鍗曞叧鑱旇〃' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_role_menu +-- ---------------------------- +INSERT INTO `sys_role_menu` VALUES (2, 1); +INSERT INTO `sys_role_menu` VALUES (2, 2); +INSERT INTO `sys_role_menu` VALUES (2, 3); +INSERT INTO `sys_role_menu` VALUES (2, 4); +INSERT INTO `sys_role_menu` VALUES (2, 100); +INSERT INTO `sys_role_menu` VALUES (2, 101); +INSERT INTO `sys_role_menu` VALUES (2, 102); +INSERT INTO `sys_role_menu` VALUES (2, 103); +INSERT INTO `sys_role_menu` VALUES (2, 104); +INSERT INTO `sys_role_menu` VALUES (2, 105); +INSERT INTO `sys_role_menu` VALUES (2, 106); +INSERT INTO `sys_role_menu` VALUES (2, 107); +INSERT INTO `sys_role_menu` VALUES (2, 108); +INSERT INTO `sys_role_menu` VALUES (2, 109); +INSERT INTO `sys_role_menu` VALUES (2, 110); +INSERT INTO `sys_role_menu` VALUES (2, 111); +INSERT INTO `sys_role_menu` VALUES (2, 112); +INSERT INTO `sys_role_menu` VALUES (2, 113); +INSERT INTO `sys_role_menu` VALUES (2, 114); +INSERT INTO `sys_role_menu` VALUES (2, 115); +INSERT INTO `sys_role_menu` VALUES (2, 116); +INSERT INTO `sys_role_menu` VALUES (2, 500); +INSERT INTO `sys_role_menu` VALUES (2, 501); +INSERT INTO `sys_role_menu` VALUES (2, 1000); +INSERT INTO `sys_role_menu` VALUES (2, 1001); +INSERT INTO `sys_role_menu` VALUES (2, 1002); +INSERT INTO `sys_role_menu` VALUES (2, 1003); +INSERT INTO `sys_role_menu` VALUES (2, 1004); +INSERT INTO `sys_role_menu` VALUES (2, 1005); +INSERT INTO `sys_role_menu` VALUES (2, 1006); +INSERT INTO `sys_role_menu` VALUES (2, 1007); +INSERT INTO `sys_role_menu` VALUES (2, 1008); +INSERT INTO `sys_role_menu` VALUES (2, 1009); +INSERT INTO `sys_role_menu` VALUES (2, 1010); +INSERT INTO `sys_role_menu` VALUES (2, 1011); +INSERT INTO `sys_role_menu` VALUES (2, 1012); +INSERT INTO `sys_role_menu` VALUES (2, 1013); +INSERT INTO `sys_role_menu` VALUES (2, 1014); +INSERT INTO `sys_role_menu` VALUES (2, 1015); +INSERT INTO `sys_role_menu` VALUES (2, 1016); +INSERT INTO `sys_role_menu` VALUES (2, 1017); +INSERT INTO `sys_role_menu` VALUES (2, 1018); +INSERT INTO `sys_role_menu` VALUES (2, 1019); +INSERT INTO `sys_role_menu` VALUES (2, 1020); +INSERT INTO `sys_role_menu` VALUES (2, 1021); +INSERT INTO `sys_role_menu` VALUES (2, 1022); +INSERT INTO `sys_role_menu` VALUES (2, 1023); +INSERT INTO `sys_role_menu` VALUES (2, 1024); +INSERT INTO `sys_role_menu` VALUES (2, 1025); +INSERT INTO `sys_role_menu` VALUES (2, 1026); +INSERT INTO `sys_role_menu` VALUES (2, 1027); +INSERT INTO `sys_role_menu` VALUES (2, 1028); +INSERT INTO `sys_role_menu` VALUES (2, 1029); +INSERT INTO `sys_role_menu` VALUES (2, 1030); +INSERT INTO `sys_role_menu` VALUES (2, 1031); +INSERT INTO `sys_role_menu` VALUES (2, 1032); +INSERT INTO `sys_role_menu` VALUES (2, 1033); +INSERT INTO `sys_role_menu` VALUES (2, 1034); +INSERT INTO `sys_role_menu` VALUES (2, 1035); +INSERT INTO `sys_role_menu` VALUES (2, 1036); +INSERT INTO `sys_role_menu` VALUES (2, 1037); +INSERT INTO `sys_role_menu` VALUES (2, 1038); +INSERT INTO `sys_role_menu` VALUES (2, 1039); +INSERT INTO `sys_role_menu` VALUES (2, 1040); +INSERT INTO `sys_role_menu` VALUES (2, 1041); +INSERT INTO `sys_role_menu` VALUES (2, 1042); +INSERT INTO `sys_role_menu` VALUES (2, 1043); +INSERT INTO `sys_role_menu` VALUES (2, 1044); +INSERT INTO `sys_role_menu` VALUES (2, 1045); +INSERT INTO `sys_role_menu` VALUES (2, 1046); +INSERT INTO `sys_role_menu` VALUES (2, 1047); +INSERT INTO `sys_role_menu` VALUES (2, 1048); +INSERT INTO `sys_role_menu` VALUES (2, 1050); +INSERT INTO `sys_role_menu` VALUES (2, 1055); +INSERT INTO `sys_role_menu` VALUES (2, 1056); +INSERT INTO `sys_role_menu` VALUES (2, 1057); +INSERT INTO `sys_role_menu` VALUES (2, 1058); +INSERT INTO `sys_role_menu` VALUES (2, 1059); +INSERT INTO `sys_role_menu` VALUES (2, 1060); +INSERT INTO `sys_role_menu` VALUES (3, 1); +INSERT INTO `sys_role_menu` VALUES (3, 100); +INSERT INTO `sys_role_menu` VALUES (3, 101); +INSERT INTO `sys_role_menu` VALUES (3, 102); +INSERT INTO `sys_role_menu` VALUES (3, 103); +INSERT INTO `sys_role_menu` VALUES (3, 104); +INSERT INTO `sys_role_menu` VALUES (3, 105); +INSERT INTO `sys_role_menu` VALUES (3, 106); +INSERT INTO `sys_role_menu` VALUES (3, 107); +INSERT INTO `sys_role_menu` VALUES (3, 108); +INSERT INTO `sys_role_menu` VALUES (3, 500); +INSERT INTO `sys_role_menu` VALUES (3, 501); +INSERT INTO `sys_role_menu` VALUES (3, 1001); +INSERT INTO `sys_role_menu` VALUES (3, 1002); +INSERT INTO `sys_role_menu` VALUES (3, 1003); +INSERT INTO `sys_role_menu` VALUES (3, 1004); +INSERT INTO `sys_role_menu` VALUES (3, 1005); +INSERT INTO `sys_role_menu` VALUES (3, 1006); +INSERT INTO `sys_role_menu` VALUES (3, 1007); +INSERT INTO `sys_role_menu` VALUES (3, 1008); +INSERT INTO `sys_role_menu` VALUES (3, 1009); +INSERT INTO `sys_role_menu` VALUES (3, 1010); +INSERT INTO `sys_role_menu` VALUES (3, 1011); +INSERT INTO `sys_role_menu` VALUES (3, 1012); +INSERT INTO `sys_role_menu` VALUES (3, 1013); +INSERT INTO `sys_role_menu` VALUES (3, 1014); +INSERT INTO `sys_role_menu` VALUES (3, 1015); +INSERT INTO `sys_role_menu` VALUES (3, 1016); +INSERT INTO `sys_role_menu` VALUES (3, 1017); +INSERT INTO `sys_role_menu` VALUES (3, 1018); +INSERT INTO `sys_role_menu` VALUES (3, 1019); +INSERT INTO `sys_role_menu` VALUES (3, 1020); +INSERT INTO `sys_role_menu` VALUES (3, 1021); +INSERT INTO `sys_role_menu` VALUES (3, 1022); +INSERT INTO `sys_role_menu` VALUES (3, 1023); +INSERT INTO `sys_role_menu` VALUES (3, 1024); +INSERT INTO `sys_role_menu` VALUES (3, 1025); +INSERT INTO `sys_role_menu` VALUES (3, 1026); +INSERT INTO `sys_role_menu` VALUES (3, 1027); +INSERT INTO `sys_role_menu` VALUES (3, 1028); +INSERT INTO `sys_role_menu` VALUES (3, 1029); +INSERT INTO `sys_role_menu` VALUES (3, 1030); +INSERT INTO `sys_role_menu` VALUES (3, 1031); +INSERT INTO `sys_role_menu` VALUES (3, 1032); +INSERT INTO `sys_role_menu` VALUES (3, 1033); +INSERT INTO `sys_role_menu` VALUES (3, 1034); +INSERT INTO `sys_role_menu` VALUES (3, 1035); +INSERT INTO `sys_role_menu` VALUES (3, 1036); +INSERT INTO `sys_role_menu` VALUES (3, 1037); +INSERT INTO `sys_role_menu` VALUES (3, 1038); +INSERT INTO `sys_role_menu` VALUES (3, 1039); +INSERT INTO `sys_role_menu` VALUES (3, 1040); +INSERT INTO `sys_role_menu` VALUES (3, 1041); +INSERT INTO `sys_role_menu` VALUES (3, 1042); +INSERT INTO `sys_role_menu` VALUES (3, 1043); +INSERT INTO `sys_role_menu` VALUES (3, 1044); +INSERT INTO `sys_role_menu` VALUES (3, 1045); +INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1); +INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 100); +INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 107); +INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1001); +INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1002); +INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1003); +INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1004); +INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1005); +INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1006); +INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1007); +INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1036); +INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1037); +INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1038); +INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1039); +INSERT INTO `sys_role_menu` VALUES (1729685491108446210, 1689201668374556674); +INSERT INTO `sys_role_menu` VALUES (1729685491108446210, 1689205943360188417); +INSERT INTO `sys_role_menu` VALUES (1729685491108446210, 1689243465037561858); +INSERT INTO `sys_role_menu` VALUES (1729685491108446210, 1689243466220355585); + +-- ---------------------------- +-- Table structure for sys_tenant +-- ---------------------------- +DROP TABLE IF EXISTS `sys_tenant`; +CREATE TABLE `sys_tenant` ( + `id` bigint(20) NOT NULL COMMENT 'id', + `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '绉熸埛缂栧彿', + `contact_user_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鑱旂郴浜�', + `contact_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鑱旂郴鐢佃瘽', + `company_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浼佷笟鍚嶇О', + `license_number` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '缁熶竴绀句細淇$敤浠g爜', + `address` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鍦板潃', + `intro` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浼佷笟绠�浠�', + `domain` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鍩熷悕', + `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + `package_id` bigint(20) NULL DEFAULT NULL COMMENT '绉熸埛濂楅缂栧彿', + `expire_time` datetime NULL DEFAULT NULL COMMENT '杩囨湡鏃堕棿', + `account_count` int(11) NULL DEFAULT -1 COMMENT '鐢ㄦ埛鏁伴噺锛�-1涓嶉檺鍒讹級', + `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛�', + `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '绉熸埛琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_tenant +-- ---------------------------- +INSERT INTO `sys_tenant` VALUES (1, '000000', '绠$悊缁�', '15888888888', 'XXX鏈夐檺鍏徃', NULL, NULL, '澶氱鎴烽�氱敤鍚庡彴绠$悊绠$悊绯荤粺', NULL, NULL, NULL, NULL, -1, '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); +INSERT INTO `sys_tenant` VALUES (1729685490647072769, '911866', '闄�', '11111111111', '5126', '', '', '', '', '', 1729685389795033090, NULL, 1, '0', '2', 103, 1, '2023-11-29 10:15:32', 1, '2023-11-29 10:15:32'); + +-- ---------------------------- +-- Table structure for sys_tenant_package +-- ---------------------------- +DROP TABLE IF EXISTS `sys_tenant_package`; +CREATE TABLE `sys_tenant_package` ( + `package_id` bigint(20) NOT NULL COMMENT '绉熸埛濂楅id', + `package_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '濂楅鍚嶇О', + `menu_ids` varchar(3000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鍏宠仈鑿滃崟id', + `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + `menu_check_strictly` tinyint(1) NULL DEFAULT 1 COMMENT '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�', + `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鐘舵�侊紙0姝e父 1鍋滅敤锛�', + `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + PRIMARY KEY (`package_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '绉熸埛濂楅琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_tenant_package +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_user +-- ---------------------------- +DROP TABLE IF EXISTS `sys_user`; +CREATE TABLE `sys_user` ( + `user_id` bigint(20) NOT NULL COMMENT '鐢ㄦ埛ID', + `open_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '寰俊鐢ㄦ埛鏍囪瘑', + `user_grade` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鐢ㄦ埛绛夌骇', + `user_balance` double(20, 2) NULL DEFAULT 0.00 COMMENT '璐︽埛浣欓', + `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', + `dept_id` bigint(20) NULL DEFAULT NULL COMMENT '閮ㄩ棬ID', + `user_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐢ㄦ埛璐﹀彿', + `nick_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐢ㄦ埛鏄电О', + `user_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'sys_user' COMMENT '鐢ㄦ埛绫诲瀷锛坰ys_user绯荤粺鐢ㄦ埛锛�', + `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鐢ㄦ埛閭', + `phonenumber` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鎵嬫満鍙风爜', + `sex` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鐢ㄦ埛鎬у埆锛�0鐢� 1濂� 2鏈煡锛�', + `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶村儚鍦板潃', + `wx_avatar` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '寰俊澶村儚鍦板潃', + `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '瀵嗙爜', + `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '甯愬彿鐘舵�侊紙0姝e父 1鍋滅敤锛�', + `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', + `login_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鏈�鍚庣櫥褰旾P', + `login_date` datetime NULL DEFAULT NULL COMMENT '鏈�鍚庣櫥褰曟椂闂�', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + PRIMARY KEY (`user_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐢ㄦ埛淇℃伅琛�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_user +-- ---------------------------- +INSERT INTO `sys_user` VALUES (1, NULL, '1', 90.00, '00000', 103, 'admin', '鐔婄尗鍔╂墜', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', NULL, NULL, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '0:0:0:0:0:0:0:1', '2024-05-19 23:22:53', 103, 1, '2023-05-14 15:19:39', 1, '2024-05-19 23:22:53', '绠$悊鍛�'); +INSERT INTO `sys_user` VALUES (1784521057603538945, NULL, '1', 99.99, '00000', NULL, 'ageerle@163.com', '鐔婄尗鍔╂墜', 'sys_user', 'ageerle@163.com', '15888888888', '0', 'http://panda-1253683406.cos.ap-guangzhou.myqcloud.com/panda/2024/05/01/62bddbd6c367496fbc6145a3c03ecbc4.jpg', NULL, '$2a$10$PShVg1L1GTMwmrfDZY3yAu5/S5qt6AtzFzPB2CAolJmYIKEOs85X6', '0', '0', '127.0.0.1', '2024-05-27 17:31:13', NULL, NULL, '2024-04-28 17:52:30', 1784521057603538945, '2024-05-27 17:31:13', NULL); + +-- ---------------------------- +-- Table structure for sys_user_post +-- ---------------------------- +DROP TABLE IF EXISTS `sys_user_post`; +CREATE TABLE `sys_user_post` ( + `user_id` bigint(20) NOT NULL COMMENT '鐢ㄦ埛ID', + `post_id` bigint(20) NOT NULL COMMENT '宀椾綅ID', + PRIMARY KEY (`user_id`, `post_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐢ㄦ埛涓庡矖浣嶅叧鑱旇〃' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_user_post +-- ---------------------------- +INSERT INTO `sys_user_post` VALUES (1, 1); +INSERT INTO `sys_user_post` VALUES (2, 2); +INSERT INTO `sys_user_post` VALUES (1661660085084250114, 2); +INSERT INTO `sys_user_post` VALUES (1661660804847788034, 1); + +-- ---------------------------- +-- Table structure for sys_user_role +-- ---------------------------- +DROP TABLE IF EXISTS `sys_user_role`; +CREATE TABLE `sys_user_role` ( + `user_id` bigint(20) NOT NULL COMMENT '鐢ㄦ埛ID', + `role_id` bigint(20) NOT NULL COMMENT '瑙掕壊ID', + PRIMARY KEY (`user_id`, `role_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐢ㄦ埛鍜岃鑹插叧鑱旇〃' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of sys_user_role +-- ---------------------------- +INSERT INTO `sys_user_role` VALUES (1, 1); +INSERT INTO `sys_user_role` VALUES (2, 2); +INSERT INTO `sys_user_role` VALUES (3, 3); +INSERT INTO `sys_user_role` VALUES (4, 4); +INSERT INTO `sys_user_role` VALUES (1661646824293031937, 1661661183933177857); +INSERT INTO `sys_user_role` VALUES (1661660085084250114, 1661661183933177857); +INSERT INTO `sys_user_role` VALUES (1661660804847788034, 2); +INSERT INTO `sys_user_role` VALUES (1713427806956404738, 1); +INSERT INTO `sys_user_role` VALUES (1713439839684689921, 1); +INSERT INTO `sys_user_role` VALUES (1713440206715650049, 1); +INSERT INTO `sys_user_role` VALUES (1713724795803299841, 1); +INSERT INTO `sys_user_role` VALUES (1714176194496339970, 1); +INSERT INTO `sys_user_role` VALUES (1714267685998907393, 1); +INSERT INTO `sys_user_role` VALUES (1714269581270667265, 1); +INSERT INTO `sys_user_role` VALUES (1714270420659949569, 1); +INSERT INTO `sys_user_role` VALUES (1714455864827723777, 1); +INSERT INTO `sys_user_role` VALUES (1714536425072115714, 1); +INSERT INTO `sys_user_role` VALUES (1714819715117105153, 1); +INSERT INTO `sys_user_role` VALUES (1714820415783976961, 1); +INSERT INTO `sys_user_role` VALUES (1714820611611836417, 1); +INSERT INTO `sys_user_role` VALUES (1714820755698761729, 1); +INSERT INTO `sys_user_role` VALUES (1714823588305190914, 1); +INSERT INTO `sys_user_role` VALUES (1714829502936530945, 1); +INSERT INTO `sys_user_role` VALUES (1714835527643185154, 1); +INSERT INTO `sys_user_role` VALUES (1714835835278606337, 1); +INSERT INTO `sys_user_role` VALUES (1714898663033290754, 1); +INSERT INTO `sys_user_role` VALUES (1714942733206175746, 1); +INSERT INTO `sys_user_role` VALUES (1714943378361434113, 1); +INSERT INTO `sys_user_role` VALUES (1714943388671033346, 1); +INSERT INTO `sys_user_role` VALUES (1714945928464711682, 1); +INSERT INTO `sys_user_role` VALUES (1714946100850606082, 1); +INSERT INTO `sys_user_role` VALUES (1714952355237347329, 1); +INSERT INTO `sys_user_role` VALUES (1714954192279584770, 1); +INSERT INTO `sys_user_role` VALUES (1714960721598758913, 1); +INSERT INTO `sys_user_role` VALUES (1714961357132283906, 1); +INSERT INTO `sys_user_role` VALUES (1714963426656403458, 1); +INSERT INTO `sys_user_role` VALUES (1714980339130318850, 1); +INSERT INTO `sys_user_role` VALUES (1714985002550444034, 1); +INSERT INTO `sys_user_role` VALUES (1714996959085084674, 1); +INSERT INTO `sys_user_role` VALUES (1715000784541990913, 1); +INSERT INTO `sys_user_role` VALUES (1715160830886297602, 1); +INSERT INTO `sys_user_role` VALUES (1715174792021426177, 1); +INSERT INTO `sys_user_role` VALUES (1715176760861278209, 1); +INSERT INTO `sys_user_role` VALUES (1715187418688405506, 1); +INSERT INTO `sys_user_role` VALUES (1715263570077564930, 1); +INSERT INTO `sys_user_role` VALUES (1715273299113820162, 1); +INSERT INTO `sys_user_role` VALUES (1715289765028577281, 1); +INSERT INTO `sys_user_role` VALUES (1715642509052624897, 1); +INSERT INTO `sys_user_role` VALUES (1715645217792868353, 1); +INSERT INTO `sys_user_role` VALUES (1715655140035543041, 1); +INSERT INTO `sys_user_role` VALUES (1715688813166346242, 1); +INSERT INTO `sys_user_role` VALUES (1715695623109623810, 1); +INSERT INTO `sys_user_role` VALUES (1716076523383177217, 1); +INSERT INTO `sys_user_role` VALUES (1716077329079615490, 1); +INSERT INTO `sys_user_role` VALUES (1716316658037178370, 1); +INSERT INTO `sys_user_role` VALUES (1716375479287824386, 1); +INSERT INTO `sys_user_role` VALUES (1716376929359380482, 1); +INSERT INTO `sys_user_role` VALUES (1716449431389487106, 1); +INSERT INTO `sys_user_role` VALUES (1716626232627707906, 1); +INSERT INTO `sys_user_role` VALUES (1716668774639484929, 1); +INSERT INTO `sys_user_role` VALUES (1716723582348050434, 1); +INSERT INTO `sys_user_role` VALUES (1717010625036828674, 1); +INSERT INTO `sys_user_role` VALUES (1717112818712723458, 1); +INSERT INTO `sys_user_role` VALUES (1717171039955599361, 1); +INSERT INTO `sys_user_role` VALUES (1717382776042569730, 1); +INSERT INTO `sys_user_role` VALUES (1717383874597896194, 1); +INSERT INTO `sys_user_role` VALUES (1717463477270102018, 1); +INSERT INTO `sys_user_role` VALUES (1717550755342467074, 1); +INSERT INTO `sys_user_role` VALUES (1718643906618605569, 1); +INSERT INTO `sys_user_role` VALUES (1719357065528623105, 1); +INSERT INTO `sys_user_role` VALUES (1719629669720145921, 1); +INSERT INTO `sys_user_role` VALUES (1719631746265530370, 1); +INSERT INTO `sys_user_role` VALUES (1719969371128086529, 1); +INSERT INTO `sys_user_role` VALUES (1719994192431955970, 1); +INSERT INTO `sys_user_role` VALUES (1720001597920264194, 1); +INSERT INTO `sys_user_role` VALUES (1720054174099718145, 1); +INSERT INTO `sys_user_role` VALUES (1720373256426635265, 1); +INSERT INTO `sys_user_role` VALUES (1720615324298264578, 1); +INSERT INTO `sys_user_role` VALUES (1720966085100191746, 1); +INSERT INTO `sys_user_role` VALUES (1721433118342397954, 1); +INSERT INTO `sys_user_role` VALUES (1721798759096270850, 1); +INSERT INTO `sys_user_role` VALUES (1721869407395332097, 1); +INSERT INTO `sys_user_role` VALUES (1721869952080232450, 1); +INSERT INTO `sys_user_role` VALUES (1722083875718737921, 1); +INSERT INTO `sys_user_role` VALUES (1722126825769185282, 1); +INSERT INTO `sys_user_role` VALUES (1722453238653169665, 1); +INSERT INTO `sys_user_role` VALUES (1722501722198552577, 1); +INSERT INTO `sys_user_role` VALUES (1722546398997819394, 1); +INSERT INTO `sys_user_role` VALUES (1722635856464097281, 1); +INSERT INTO `sys_user_role` VALUES (1722652602847768578, 1); +INSERT INTO `sys_user_role` VALUES (1722787874222682114, 1); +INSERT INTO `sys_user_role` VALUES (1722799180870889473, 1); +INSERT INTO `sys_user_role` VALUES (1722872660475817986, 1); +INSERT INTO `sys_user_role` VALUES (1722874592401600514, 1); +INSERT INTO `sys_user_role` VALUES (1722883137289367554, 1); +INSERT INTO `sys_user_role` VALUES (1722918534182645762, 1); +INSERT INTO `sys_user_role` VALUES (1723173295586848769, 1); +INSERT INTO `sys_user_role` VALUES (1723222687891107841, 1); +INSERT INTO `sys_user_role` VALUES (1723224404040921089, 1); +INSERT INTO `sys_user_role` VALUES (1723225015520112641, 1); +INSERT INTO `sys_user_role` VALUES (1723278284531478529, 1); +INSERT INTO `sys_user_role` VALUES (1723330835209564161, 1); +INSERT INTO `sys_user_role` VALUES (1723708198137147393, 1); +INSERT INTO `sys_user_role` VALUES (1723754683843260417, 1); +INSERT INTO `sys_user_role` VALUES (1723878185250369537, 1); +INSERT INTO `sys_user_role` VALUES (1723940614634254337, 1); +INSERT INTO `sys_user_role` VALUES (1723975861757325314, 1); +INSERT INTO `sys_user_role` VALUES (1724306907803725826, 1); +INSERT INTO `sys_user_role` VALUES (1724308252862492673, 1); +INSERT INTO `sys_user_role` VALUES (1724382895124295681, 1); +INSERT INTO `sys_user_role` VALUES (1724727778758406145, 1); +INSERT INTO `sys_user_role` VALUES (1724815478295425026, 1); +INSERT INTO `sys_user_role` VALUES (1725026071145107458, 1); +INSERT INTO `sys_user_role` VALUES (1725026978817658881, 1); +INSERT INTO `sys_user_role` VALUES (1725043562961457154, 1); +INSERT INTO `sys_user_role` VALUES (1725058936893362178, 1); +INSERT INTO `sys_user_role` VALUES (1725363117009162242, 1); +INSERT INTO `sys_user_role` VALUES (1725538633251049474, 1); +INSERT INTO `sys_user_role` VALUES (1725564937467875329, 1); +INSERT INTO `sys_user_role` VALUES (1725891713243021314, 1); +INSERT INTO `sys_user_role` VALUES (1725905000621932546, 1); +INSERT INTO `sys_user_role` VALUES (1726440708294049793, 1); +INSERT INTO `sys_user_role` VALUES (1726443526979584002, 1); +INSERT INTO `sys_user_role` VALUES (1726445663797116929, 1); +INSERT INTO `sys_user_role` VALUES (1726452867329687553, 1); +INSERT INTO `sys_user_role` VALUES (1726472827451998209, 1); +INSERT INTO `sys_user_role` VALUES (1726479651370696705, 1); +INSERT INTO `sys_user_role` VALUES (1726487492674195458, 1); +INSERT INTO `sys_user_role` VALUES (1726496513055784961, 1); +INSERT INTO `sys_user_role` VALUES (1726498781398302722, 1); +INSERT INTO `sys_user_role` VALUES (1726506873632587778, 1); +INSERT INTO `sys_user_role` VALUES (1726529248394739714, 1); +INSERT INTO `sys_user_role` VALUES (1726578079102664705, 1); +INSERT INTO `sys_user_role` VALUES (1726582181383634946, 1); +INSERT INTO `sys_user_role` VALUES (1726583555672506369, 1); +INSERT INTO `sys_user_role` VALUES (1726596448690372609, 1); +INSERT INTO `sys_user_role` VALUES (1726599361261207553, 1); +INSERT INTO `sys_user_role` VALUES (1726604511749079041, 1); +INSERT INTO `sys_user_role` VALUES (1726606973822304258, 1); +INSERT INTO `sys_user_role` VALUES (1726609379524083713, 1); +INSERT INTO `sys_user_role` VALUES (1726616151265640450, 1); +INSERT INTO `sys_user_role` VALUES (1726775811478126594, 1); +INSERT INTO `sys_user_role` VALUES (1726795490141667329, 1); +INSERT INTO `sys_user_role` VALUES (1726798403169681410, 1); +INSERT INTO `sys_user_role` VALUES (1726830794655399937, 1); +INSERT INTO `sys_user_role` VALUES (1726862038013313026, 1); +INSERT INTO `sys_user_role` VALUES (1726919220696186882, 1); +INSERT INTO `sys_user_role` VALUES (1727140184050630658, 1); +INSERT INTO `sys_user_role` VALUES (1727506163368722433, 1); +INSERT INTO `sys_user_role` VALUES (1727518983086931969, 1); +INSERT INTO `sys_user_role` VALUES (1727580969606840321, 1); +INSERT INTO `sys_user_role` VALUES (1727590505323429890, 1); +INSERT INTO `sys_user_role` VALUES (1727918393172164609, 1); +INSERT INTO `sys_user_role` VALUES (1728249002000121857, 1); +INSERT INTO `sys_user_role` VALUES (1728680561446486017, 1); +INSERT INTO `sys_user_role` VALUES (1728964404182577153, 1); +INSERT INTO `sys_user_role` VALUES (1729020459675611137, 1); +INSERT INTO `sys_user_role` VALUES (1729051002043691009, 1); +INSERT INTO `sys_user_role` VALUES (1729423744832172033, 1); +INSERT INTO `sys_user_role` VALUES (1729429590291050497, 1); +INSERT INTO `sys_user_role` VALUES (1729685493222375426, 1729685491108446210); +INSERT INTO `sys_user_role` VALUES (1730050324466036738, 1); +INSERT INTO `sys_user_role` VALUES (1730102403335254018, 1); +INSERT INTO `sys_user_role` VALUES (1730129923250122754, 1); +INSERT INTO `sys_user_role` VALUES (1730155108925763586, 1); +INSERT INTO `sys_user_role` VALUES (1730273428207366145, 1); +INSERT INTO `sys_user_role` VALUES (1730498722784669697, 1); +INSERT INTO `sys_user_role` VALUES (1730815105229713410, 1); +INSERT INTO `sys_user_role` VALUES (1730858886951923714, 1); +INSERT INTO `sys_user_role` VALUES (1731357405659824130, 1); +INSERT INTO `sys_user_role` VALUES (1731475532557090818, 1); +INSERT INTO `sys_user_role` VALUES (1731480953627901953, 1); +INSERT INTO `sys_user_role` VALUES (1731502381106495490, 1); +INSERT INTO `sys_user_role` VALUES (1731524458442162177, 1); +INSERT INTO `sys_user_role` VALUES (1731524630094053377, 1); +INSERT INTO `sys_user_role` VALUES (1731524650293821441, 1); +INSERT INTO `sys_user_role` VALUES (1731529253710233601, 1); +INSERT INTO `sys_user_role` VALUES (1731559936046432258, 1); +INSERT INTO `sys_user_role` VALUES (1731564032228884482, 1); +INSERT INTO `sys_user_role` VALUES (1731565926737281026, 1); +INSERT INTO `sys_user_role` VALUES (1731566918589513729, 1); +INSERT INTO `sys_user_role` VALUES (1731567740094283778, 1); +INSERT INTO `sys_user_role` VALUES (1731575439263563777, 1); +INSERT INTO `sys_user_role` VALUES (1731583864055824385, 1); +INSERT INTO `sys_user_role` VALUES (1731588155382464513, 1); +INSERT INTO `sys_user_role` VALUES (1731589827840212993, 1); +INSERT INTO `sys_user_role` VALUES (1731635461435719682, 1); +INSERT INTO `sys_user_role` VALUES (1731668049902731266, 1); +INSERT INTO `sys_user_role` VALUES (1731922694168412162, 1); +INSERT INTO `sys_user_role` VALUES (1731944975456305153, 1); +INSERT INTO `sys_user_role` VALUES (1731949019394506753, 1); +INSERT INTO `sys_user_role` VALUES (1731951425054343170, 1); +INSERT INTO `sys_user_role` VALUES (1732000242621513729, 1); +INSERT INTO `sys_user_role` VALUES (1732027163380056066, 1); +INSERT INTO `sys_user_role` VALUES (1732289382269353985, 1); +INSERT INTO `sys_user_role` VALUES (1732289439282528258, 1); +INSERT INTO `sys_user_role` VALUES (1732289699585228801, 1); +INSERT INTO `sys_user_role` VALUES (1732290827173527553, 1); +INSERT INTO `sys_user_role` VALUES (1732291549344595969, 1); +INSERT INTO `sys_user_role` VALUES (1732293265184030721, 1); +INSERT INTO `sys_user_role` VALUES (1732329664117506049, 1); +INSERT INTO `sys_user_role` VALUES (1732334104450990081, 1); +INSERT INTO `sys_user_role` VALUES (1732578671045672962, 1); +INSERT INTO `sys_user_role` VALUES (1732584047426174978, 1); +INSERT INTO `sys_user_role` VALUES (1732608690321129474, 1); +INSERT INTO `sys_user_role` VALUES (1732678147815014401, 1); +INSERT INTO `sys_user_role` VALUES (1732731410102910977, 1); +INSERT INTO `sys_user_role` VALUES (1733005266763939841, 1); +INSERT INTO `sys_user_role` VALUES (1733016149837774850, 1); +INSERT INTO `sys_user_role` VALUES (1733053523871432705, 1); +INSERT INTO `sys_user_role` VALUES (1733061400367497218, 1); +INSERT INTO `sys_user_role` VALUES (1733167090469732353, 1); +INSERT INTO `sys_user_role` VALUES (1733298702729641986, 1); +INSERT INTO `sys_user_role` VALUES (1733488544511983617, 1); +INSERT INTO `sys_user_role` VALUES (1733720554119659521, 1); +INSERT INTO `sys_user_role` VALUES (1733846657777827842, 1); +INSERT INTO `sys_user_role` VALUES (1733859832720031745, 1); +INSERT INTO `sys_user_role` VALUES (1734137817339559938, 1); +INSERT INTO `sys_user_role` VALUES (1734227535762849793, 1); +INSERT INTO `sys_user_role` VALUES (1734492373726560257, 1); +INSERT INTO `sys_user_role` VALUES (1734508040978726914, 1); +INSERT INTO `sys_user_role` VALUES (1734513545461661697, 1); +INSERT INTO `sys_user_role` VALUES (1734581580998451202, 1); +INSERT INTO `sys_user_role` VALUES (1734751884580298754, 1); +INSERT INTO `sys_user_role` VALUES (1734781716483612674, 1); +INSERT INTO `sys_user_role` VALUES (1734833221987278849, 1); +INSERT INTO `sys_user_role` VALUES (1734834063154946050, 1); +INSERT INTO `sys_user_role` VALUES (1734880697666576386, 1); +INSERT INTO `sys_user_role` VALUES (1734891995888427009, 1); +INSERT INTO `sys_user_role` VALUES (1735132534701367297, 1); +INSERT INTO `sys_user_role` VALUES (1735242647239991298, 1); +INSERT INTO `sys_user_role` VALUES (1735486862444273666, 1); +INSERT INTO `sys_user_role` VALUES (1735487912727355394, 1); +INSERT INTO `sys_user_role` VALUES (1735542352767426561, 1); +INSERT INTO `sys_user_role` VALUES (1735551915889598466, 1); +INSERT INTO `sys_user_role` VALUES (1735616653411557377, 1); +INSERT INTO `sys_user_role` VALUES (1735835864146714626, 1); +INSERT INTO `sys_user_role` VALUES (1735953007769100289, 1); +INSERT INTO `sys_user_role` VALUES (1735960189784891393, 1); +INSERT INTO `sys_user_role` VALUES (1736265950381547522, 1); +INSERT INTO `sys_user_role` VALUES (1736577606684844034, 1); +INSERT INTO `sys_user_role` VALUES (1736638822375563266, 1); +INSERT INTO `sys_user_role` VALUES (1736779069306511361, 1); +INSERT INTO `sys_user_role` VALUES (1737028378602053634, 1); +INSERT INTO `sys_user_role` VALUES (1737271234797314050, 1); +INSERT INTO `sys_user_role` VALUES (1737315322405920770, 1); +INSERT INTO `sys_user_role` VALUES (1737445221154234370, 1); +INSERT INTO `sys_user_role` VALUES (1737452907568635906, 1); +INSERT INTO `sys_user_role` VALUES (1737453186955419649, 1); +INSERT INTO `sys_user_role` VALUES (1737717777685880833, 1); +INSERT INTO `sys_user_role` VALUES (1737768515594166274, 1); +INSERT INTO `sys_user_role` VALUES (1738108912170246145, 1); +INSERT INTO `sys_user_role` VALUES (1738118086488825858, 1); +INSERT INTO `sys_user_role` VALUES (1738520430804279297, 1); +INSERT INTO `sys_user_role` VALUES (1738802060248817666, 1); +INSERT INTO `sys_user_role` VALUES (1738812447119712257, 1); +INSERT INTO `sys_user_role` VALUES (1738941480197234689, 1); +INSERT INTO `sys_user_role` VALUES (1738963430776840194, 1); +INSERT INTO `sys_user_role` VALUES (1739121784341995522, 1); +INSERT INTO `sys_user_role` VALUES (1739166931951886338, 1); +INSERT INTO `sys_user_role` VALUES (1739272055240073217, 1); +INSERT INTO `sys_user_role` VALUES (1739451838930427905, 1); +INSERT INTO `sys_user_role` VALUES (1739452037375533057, 1); +INSERT INTO `sys_user_role` VALUES (1739452376946384898, 1); +INSERT INTO `sys_user_role` VALUES (1739484503888961537, 1); +INSERT INTO `sys_user_role` VALUES (1739485282335006722, 1); +INSERT INTO `sys_user_role` VALUES (1739577551431999490, 1); +INSERT INTO `sys_user_role` VALUES (1739825609910591489, 1); +INSERT INTO `sys_user_role` VALUES (1739916453439152130, 1); +INSERT INTO `sys_user_role` VALUES (1740188388454629378, 1); +INSERT INTO `sys_user_role` VALUES (1741339991320580097, 1); +INSERT INTO `sys_user_role` VALUES (1741803737633542145, 1); +INSERT INTO `sys_user_role` VALUES (1741823858229923841, 1); +INSERT INTO `sys_user_role` VALUES (1741845883943227393, 1); +INSERT INTO `sys_user_role` VALUES (1742179775941201921, 1); +INSERT INTO `sys_user_role` VALUES (1742437553771458562, 1); +INSERT INTO `sys_user_role` VALUES (1742451201315254273, 1); +INSERT INTO `sys_user_role` VALUES (1742469913120419841, 1); +INSERT INTO `sys_user_role` VALUES (1742798283280568321, 1); +INSERT INTO `sys_user_role` VALUES (1742798987701342210, 1); +INSERT INTO `sys_user_role` VALUES (1742799476950126594, 1); +INSERT INTO `sys_user_role` VALUES (1742799839619010562, 1); +INSERT INTO `sys_user_role` VALUES (1742801019527057410, 1); +INSERT INTO `sys_user_role` VALUES (1742804073915699202, 1); +INSERT INTO `sys_user_role` VALUES (1742821280687149058, 1); +INSERT INTO `sys_user_role` VALUES (1742821467476283394, 1); +INSERT INTO `sys_user_role` VALUES (1742822775600009217, 1); +INSERT INTO `sys_user_role` VALUES (1742823890928357377, 1); +INSERT INTO `sys_user_role` VALUES (1742838225297821697, 1); +INSERT INTO `sys_user_role` VALUES (1742902317295423490, 1); +INSERT INTO `sys_user_role` VALUES (1742910854243373058, 1); +INSERT INTO `sys_user_role` VALUES (1742961994725150721, 1); +INSERT INTO `sys_user_role` VALUES (1742969861079388161, 1); +INSERT INTO `sys_user_role` VALUES (1743068363130228737, 1); +INSERT INTO `sys_user_role` VALUES (1743075924621479938, 1); +INSERT INTO `sys_user_role` VALUES (1743079200725225474, 1); +INSERT INTO `sys_user_role` VALUES (1743085878682144769, 1); +INSERT INTO `sys_user_role` VALUES (1743110774967586818, 1); +INSERT INTO `sys_user_role` VALUES (1743162481042870274, 1); +INSERT INTO `sys_user_role` VALUES (1743166491284033537, 1); +INSERT INTO `sys_user_role` VALUES (1743251016219447297, 1); +INSERT INTO `sys_user_role` VALUES (1743469820367142914, 1); +INSERT INTO `sys_user_role` VALUES (1743514389280522242, 1); +INSERT INTO `sys_user_role` VALUES (1743519646916083714, 1); +INSERT INTO `sys_user_role` VALUES (1743670356026654722, 1); +INSERT INTO `sys_user_role` VALUES (1743892570516815874, 1); +INSERT INTO `sys_user_role` VALUES (1743952049409146882, 1); +INSERT INTO `sys_user_role` VALUES (1744268693259993089, 1); +INSERT INTO `sys_user_role` VALUES (1744351384550567938, 1); +INSERT INTO `sys_user_role` VALUES (1744561041202278402, 1); +INSERT INTO `sys_user_role` VALUES (1744574752277196801, 1); +INSERT INTO `sys_user_role` VALUES (1744619123995373569, 1); +INSERT INTO `sys_user_role` VALUES (1744627110742913025, 1); +INSERT INTO `sys_user_role` VALUES (1744634408357916673, 1); +INSERT INTO `sys_user_role` VALUES (1744645281965207554, 1); +INSERT INTO `sys_user_role` VALUES (1744724410316156930, 1); +INSERT INTO `sys_user_role` VALUES (1744892307919400962, 1); +INSERT INTO `sys_user_role` VALUES (1744903174606090241, 1); +INSERT INTO `sys_user_role` VALUES (1744904968014983169, 1); +INSERT INTO `sys_user_role` VALUES (1744905787204497410, 1); +INSERT INTO `sys_user_role` VALUES (1744911513595473921, 1); +INSERT INTO `sys_user_role` VALUES (1744912178359103490, 1); +INSERT INTO `sys_user_role` VALUES (1744912486720139266, 1); +INSERT INTO `sys_user_role` VALUES (1744915552240463874, 1); +INSERT INTO `sys_user_role` VALUES (1744923917133869058, 1); +INSERT INTO `sys_user_role` VALUES (1744971513579761666, 1); +INSERT INTO `sys_user_role` VALUES (1744984070818426882, 1); +INSERT INTO `sys_user_role` VALUES (1744984147393835010, 1); +INSERT INTO `sys_user_role` VALUES (1744992401243041793, 1); +INSERT INTO `sys_user_role` VALUES (1745011131444424706, 1); +INSERT INTO `sys_user_role` VALUES (1745061549180514306, 1); +INSERT INTO `sys_user_role` VALUES (1745346479991091201, 1); +INSERT INTO `sys_user_role` VALUES (1745346822607007745, 1); +INSERT INTO `sys_user_role` VALUES (1745368346374217730, 1); +INSERT INTO `sys_user_role` VALUES (1745424741765259266, 1); +INSERT INTO `sys_user_role` VALUES (1745426757090582530, 1); +INSERT INTO `sys_user_role` VALUES (1745620173124575234, 1); +INSERT INTO `sys_user_role` VALUES (1745623876426571777, 1); +INSERT INTO `sys_user_role` VALUES (1745654577691664386, 1); +INSERT INTO `sys_user_role` VALUES (1745663259879972865, 1); +INSERT INTO `sys_user_role` VALUES (1745686038692012034, 1); +INSERT INTO `sys_user_role` VALUES (1745738268480675842, 1); +INSERT INTO `sys_user_role` VALUES (1745790952546017281, 1); +INSERT INTO `sys_user_role` VALUES (1746397384551211009, 1); +INSERT INTO `sys_user_role` VALUES (1746400980533551105, 1); +INSERT INTO `sys_user_role` VALUES (1746522414111039489, 1); +INSERT INTO `sys_user_role` VALUES (1746873386528223234, 1); +INSERT INTO `sys_user_role` VALUES (1747067318369333249, 1); +INSERT INTO `sys_user_role` VALUES (1747071365822361602, 1); +INSERT INTO `sys_user_role` VALUES (1747153912031948801, 1); +INSERT INTO `sys_user_role` VALUES (1747197655195922434, 1); +INSERT INTO `sys_user_role` VALUES (1747519480203390977, 1); +INSERT INTO `sys_user_role` VALUES (1747521265550831618, 1); +INSERT INTO `sys_user_role` VALUES (1747523421662162945, 1); +INSERT INTO `sys_user_role` VALUES (1747797864993075201, 1); +INSERT INTO `sys_user_role` VALUES (1747800427213697025, 1); +INSERT INTO `sys_user_role` VALUES (1747910191046275073, 1); +INSERT INTO `sys_user_role` VALUES (1747923453217419265, 1); +INSERT INTO `sys_user_role` VALUES (1748187110132232193, 1); +INSERT INTO `sys_user_role` VALUES (1748260926648823809, 1); +INSERT INTO `sys_user_role` VALUES (1748276826697445377, 1); +INSERT INTO `sys_user_role` VALUES (1748312313952808962, 1); +INSERT INTO `sys_user_role` VALUES (1748635584837529601, 1); +INSERT INTO `sys_user_role` VALUES (1748642479459610625, 1); +INSERT INTO `sys_user_role` VALUES (1748663294624346114, 1); +INSERT INTO `sys_user_role` VALUES (1748703876608503810, 1); +INSERT INTO `sys_user_role` VALUES (1748704145589219329, 1); +INSERT INTO `sys_user_role` VALUES (1748708285178523649, 1); +INSERT INTO `sys_user_role` VALUES (1748728575929430017, 1); +INSERT INTO `sys_user_role` VALUES (1748761666442047490, 1); +INSERT INTO `sys_user_role` VALUES (1748925826178035713, 1); +INSERT INTO `sys_user_role` VALUES (1749259130492235778, 1); +INSERT INTO `sys_user_role` VALUES (1749280237328871426, 1); +INSERT INTO `sys_user_role` VALUES (1749289400549322754, 1); +INSERT INTO `sys_user_role` VALUES (1749327661225291778, 1); +INSERT INTO `sys_user_role` VALUES (1749365593797636097, 1); +INSERT INTO `sys_user_role` VALUES (1749407786692325378, 1); +INSERT INTO `sys_user_role` VALUES (1749519043344805890, 1); +INSERT INTO `sys_user_role` VALUES (1749683041063219202, 1); +INSERT INTO `sys_user_role` VALUES (1749683546774646786, 1); +INSERT INTO `sys_user_role` VALUES (1749691765567860737, 1); +INSERT INTO `sys_user_role` VALUES (1749705571236917249, 1); +INSERT INTO `sys_user_role` VALUES (1749740828837359618, 1); +INSERT INTO `sys_user_role` VALUES (1749741179162406914, 1); +INSERT INTO `sys_user_role` VALUES (1749741340039131137, 1); +INSERT INTO `sys_user_role` VALUES (1749747618241130497, 1); +INSERT INTO `sys_user_role` VALUES (1749747701439344641, 1); +INSERT INTO `sys_user_role` VALUES (1749786825391157250, 1); +INSERT INTO `sys_user_role` VALUES (1749789665819963394, 1); +INSERT INTO `sys_user_role` VALUES (1749797707705823234, 1); +INSERT INTO `sys_user_role` VALUES (1749974903762210818, 1); +INSERT INTO `sys_user_role` VALUES (1749982777750081537, 1); +INSERT INTO `sys_user_role` VALUES (1749990634667134978, 1); +INSERT INTO `sys_user_role` VALUES (1749991325137653761, 1); +INSERT INTO `sys_user_role` VALUES (1749992779328016386, 1); +INSERT INTO `sys_user_role` VALUES (1749993573204905985, 1); +INSERT INTO `sys_user_role` VALUES (1749994406877351937, 1); +INSERT INTO `sys_user_role` VALUES (1749995279187726337, 1); +INSERT INTO `sys_user_role` VALUES (1749995486029828097, 1); +INSERT INTO `sys_user_role` VALUES (1749995707686211586, 1); +INSERT INTO `sys_user_role` VALUES (1750000406883749890, 1); +INSERT INTO `sys_user_role` VALUES (1750000942706085889, 1); +INSERT INTO `sys_user_role` VALUES (1750005079111913473, 1); +INSERT INTO `sys_user_role` VALUES (1750428606466117633, 1); +INSERT INTO `sys_user_role` VALUES (1750553534423126017, 1); +INSERT INTO `sys_user_role` VALUES (1750690119441469441, 1); +INSERT INTO `sys_user_role` VALUES (1750723725312413698, 1); +INSERT INTO `sys_user_role` VALUES (1750724537434525697, 1); +INSERT INTO `sys_user_role` VALUES (1750743381616119810, 1); +INSERT INTO `sys_user_role` VALUES (1750822931356192769, 1); +INSERT INTO `sys_user_role` VALUES (1750823004563574785, 1); +INSERT INTO `sys_user_role` VALUES (1751548639330177026, 1); +INSERT INTO `sys_user_role` VALUES (1751796140318658561, 1); +INSERT INTO `sys_user_role` VALUES (1751889049818763265, 1); +INSERT INTO `sys_user_role` VALUES (1751896081141600258, 1); +INSERT INTO `sys_user_role` VALUES (1751949653564723201, 1); +INSERT INTO `sys_user_role` VALUES (1751955373517443073, 1); +INSERT INTO `sys_user_role` VALUES (1751980511470292993, 1); +INSERT INTO `sys_user_role` VALUES (1752128867307884546, 1); +INSERT INTO `sys_user_role` VALUES (1752128948195037185, 1); +INSERT INTO `sys_user_role` VALUES (1752138835683708930, 1); +INSERT INTO `sys_user_role` VALUES (1752148500127682561, 1); +INSERT INTO `sys_user_role` VALUES (1752276638077816834, 1); +INSERT INTO `sys_user_role` VALUES (1752299834210521089, 1); +INSERT INTO `sys_user_role` VALUES (1752306117726703618, 1); +INSERT INTO `sys_user_role` VALUES (1752504006021222402, 1); +INSERT INTO `sys_user_role` VALUES (1752602885546840066, 1); +INSERT INTO `sys_user_role` VALUES (1752724639351050242, 1); +INSERT INTO `sys_user_role` VALUES (1753215436756357122, 1); +INSERT INTO `sys_user_role` VALUES (1753402656570216449, 1); +INSERT INTO `sys_user_role` VALUES (1753486557368029185, 1); +INSERT INTO `sys_user_role` VALUES (1753797902466551809, 1); +INSERT INTO `sys_user_role` VALUES (1753967757819908098, 1); +INSERT INTO `sys_user_role` VALUES (1754016754462887938, 1); +INSERT INTO `sys_user_role` VALUES (1754029247868440577, 1); +INSERT INTO `sys_user_role` VALUES (1754413960445562882, 1); +INSERT INTO `sys_user_role` VALUES (1754424078633537538, 1); +INSERT INTO `sys_user_role` VALUES (1754764137119354881, 1); +INSERT INTO `sys_user_role` VALUES (1755042084761899009, 1); +INSERT INTO `sys_user_role` VALUES (1755047141691625473, 1); +INSERT INTO `sys_user_role` VALUES (1756274975479173121, 1); +INSERT INTO `sys_user_role` VALUES (1756308183021260801, 1); +INSERT INTO `sys_user_role` VALUES (1757325877958938626, 1); +INSERT INTO `sys_user_role` VALUES (1758445439802675202, 1); +INSERT INTO `sys_user_role` VALUES (1759032628991234049, 1); +INSERT INTO `sys_user_role` VALUES (1759050804781125634, 1); +INSERT INTO `sys_user_role` VALUES (1759089524834045954, 1); +INSERT INTO `sys_user_role` VALUES (1759092949802029057, 1); +INSERT INTO `sys_user_role` VALUES (1759100324189573121, 1); +INSERT INTO `sys_user_role` VALUES (1759103449889771521, 1); +INSERT INTO `sys_user_role` VALUES (1759147026191749121, 1); +INSERT INTO `sys_user_role` VALUES (1759413482020147202, 1); +INSERT INTO `sys_user_role` VALUES (1759427862430486529, 1); +INSERT INTO `sys_user_role` VALUES (1759428010174844929, 1); +INSERT INTO `sys_user_role` VALUES (1759496088514465794, 1); +INSERT INTO `sys_user_role` VALUES (1759764705965510657, 1); +INSERT INTO `sys_user_role` VALUES (1759777481207320578, 1); +INSERT INTO `sys_user_role` VALUES (1759806155667279873, 1); +INSERT INTO `sys_user_role` VALUES (1759812015655227394, 1); +INSERT INTO `sys_user_role` VALUES (1759815447778693121, 1); +INSERT INTO `sys_user_role` VALUES (1759832486966726658, 1); +INSERT INTO `sys_user_role` VALUES (1759858071113830402, 1); +INSERT INTO `sys_user_role` VALUES (1759863475847827458, 1); +INSERT INTO `sys_user_role` VALUES (1759868018195173378, 1); +INSERT INTO `sys_user_role` VALUES (1759869729374736385, 1); +INSERT INTO `sys_user_role` VALUES (1760186079276175362, 1); +INSERT INTO `sys_user_role` VALUES (1760319626808922114, 1); +INSERT INTO `sys_user_role` VALUES (1760347236137963522, 1); +INSERT INTO `sys_user_role` VALUES (1760358546837868546, 1); +INSERT INTO `sys_user_role` VALUES (1760377107434180609, 1); +INSERT INTO `sys_user_role` VALUES (1760472305161998338, 1); +INSERT INTO `sys_user_role` VALUES (1760472829932343298, 1); +INSERT INTO `sys_user_role` VALUES (1760477732188721153, 1); +INSERT INTO `sys_user_role` VALUES (1760502088176504833, 1); +INSERT INTO `sys_user_role` VALUES (1760508166310203394, 1); +INSERT INTO `sys_user_role` VALUES (1760511294409543681, 1); +INSERT INTO `sys_user_role` VALUES (1760562604135682049, 1); +INSERT INTO `sys_user_role` VALUES (1760841877480280066, 1); +INSERT INTO `sys_user_role` VALUES (1760896840365510658, 1); +INSERT INTO `sys_user_role` VALUES (1760903600501428226, 1); +INSERT INTO `sys_user_role` VALUES (1761404022634844162, 1); +INSERT INTO `sys_user_role` VALUES (1761954868732891138, 1); +INSERT INTO `sys_user_role` VALUES (1761955584197267458, 1); +INSERT INTO `sys_user_role` VALUES (1762003524345401345, 1); +INSERT INTO `sys_user_role` VALUES (1762004833618366465, 1); +INSERT INTO `sys_user_role` VALUES (1762010183880937474, 1); +INSERT INTO `sys_user_role` VALUES (1762298283890839554, 1); +INSERT INTO `sys_user_role` VALUES (1762363188014747649, 1); +INSERT INTO `sys_user_role` VALUES (1762389902388367361, 1); +INSERT INTO `sys_user_role` VALUES (1762401081961746434, 1); +INSERT INTO `sys_user_role` VALUES (1762481911417540610, 1); +INSERT INTO `sys_user_role` VALUES (1762482221645041665, 1); +INSERT INTO `sys_user_role` VALUES (1762482243174404097, 1); +INSERT INTO `sys_user_role` VALUES (1762483838461153282, 1); +INSERT INTO `sys_user_role` VALUES (1762487212380262401, 1); +INSERT INTO `sys_user_role` VALUES (1762498553535008770, 1); +INSERT INTO `sys_user_role` VALUES (1762636163465138177, 1); +INSERT INTO `sys_user_role` VALUES (1762655625413185537, 1); +INSERT INTO `sys_user_role` VALUES (1762656108559257601, 1); +INSERT INTO `sys_user_role` VALUES (1762673833499217922, 1); +INSERT INTO `sys_user_role` VALUES (1762677825344163842, 1); +INSERT INTO `sys_user_role` VALUES (1762677876015550465, 1); +INSERT INTO `sys_user_role` VALUES (1762678082262061057, 1); +INSERT INTO `sys_user_role` VALUES (1762678138012749825, 1); +INSERT INTO `sys_user_role` VALUES (1762678144652333057, 1); +INSERT INTO `sys_user_role` VALUES (1762678174192816129, 1); +INSERT INTO `sys_user_role` VALUES (1762678472563019777, 1); +INSERT INTO `sys_user_role` VALUES (1762678534596775938, 1); +INSERT INTO `sys_user_role` VALUES (1762678534894571521, 1); +INSERT INTO `sys_user_role` VALUES (1762678581635895298, 1); +INSERT INTO `sys_user_role` VALUES (1762678844920745985, 1); +INSERT INTO `sys_user_role` VALUES (1762679194973163522, 1); +INSERT INTO `sys_user_role` VALUES (1762679425299173378, 1); +INSERT INTO `sys_user_role` VALUES (1762679810776682498, 1); +INSERT INTO `sys_user_role` VALUES (1762679862656028674, 1); +INSERT INTO `sys_user_role` VALUES (1762679937360777217, 1); +INSERT INTO `sys_user_role` VALUES (1762680184698884098, 1); +INSERT INTO `sys_user_role` VALUES (1762680290076577794, 1); +INSERT INTO `sys_user_role` VALUES (1762680350055124993, 1); +INSERT INTO `sys_user_role` VALUES (1762681014038614017, 1); +INSERT INTO `sys_user_role` VALUES (1762681042207559681, 1); +INSERT INTO `sys_user_role` VALUES (1762681082732924929, 1); +INSERT INTO `sys_user_role` VALUES (1762681088869191682, 1); +INSERT INTO `sys_user_role` VALUES (1762681283195490306, 1); +INSERT INTO `sys_user_role` VALUES (1762681876752420865, 1); +INSERT INTO `sys_user_role` VALUES (1762681980129431553, 1); +INSERT INTO `sys_user_role` VALUES (1762682038488977410, 1); +INSERT INTO `sys_user_role` VALUES (1762682208211488769, 1); +INSERT INTO `sys_user_role` VALUES (1762683406603833346, 1); +INSERT INTO `sys_user_role` VALUES (1762683500048732162, 1); +INSERT INTO `sys_user_role` VALUES (1762683740843724801, 1); +INSERT INTO `sys_user_role` VALUES (1762683806404890625, 1); +INSERT INTO `sys_user_role` VALUES (1762684131715108865, 1); +INSERT INTO `sys_user_role` VALUES (1762684408442703874, 1); +INSERT INTO `sys_user_role` VALUES (1762684686994821121, 1); +INSERT INTO `sys_user_role` VALUES (1762686405808017409, 1); +INSERT INTO `sys_user_role` VALUES (1762687370061729794, 1); +INSERT INTO `sys_user_role` VALUES (1762687537527705602, 1); +INSERT INTO `sys_user_role` VALUES (1762687814947360769, 1); +INSERT INTO `sys_user_role` VALUES (1762688734347186177, 1); +INSERT INTO `sys_user_role` VALUES (1762690035701305346, 1); +INSERT INTO `sys_user_role` VALUES (1762690104575971330, 1); +INSERT INTO `sys_user_role` VALUES (1762691273243283457, 1); +INSERT INTO `sys_user_role` VALUES (1762691277462753282, 1); +INSERT INTO `sys_user_role` VALUES (1762692468406013954, 1); +INSERT INTO `sys_user_role` VALUES (1762693304498573314, 1); +INSERT INTO `sys_user_role` VALUES (1762693710704332801, 1); +INSERT INTO `sys_user_role` VALUES (1762694382220791809, 1); +INSERT INTO `sys_user_role` VALUES (1762696242545610754, 1); +INSERT INTO `sys_user_role` VALUES (1762696275626086402, 1); +INSERT INTO `sys_user_role` VALUES (1762696945854894082, 1); +INSERT INTO `sys_user_role` VALUES (1762698940057702402, 1); +INSERT INTO `sys_user_role` VALUES (1762699511732948994, 1); +INSERT INTO `sys_user_role` VALUES (1762701338956320769, 1); +INSERT INTO `sys_user_role` VALUES (1762701352860438530, 1); +INSERT INTO `sys_user_role` VALUES (1762703221934575617, 1); +INSERT INTO `sys_user_role` VALUES (1762705239214444546, 1); +INSERT INTO `sys_user_role` VALUES (1762705858788642817, 1); +INSERT INTO `sys_user_role` VALUES (1762706220585111553, 1); +INSERT INTO `sys_user_role` VALUES (1762707979655237633, 1); +INSERT INTO `sys_user_role` VALUES (1762709372369686529, 1); +INSERT INTO `sys_user_role` VALUES (1762717698755186689, 1); +INSERT INTO `sys_user_role` VALUES (1762719280540471297, 1); +INSERT INTO `sys_user_role` VALUES (1762719395619590146, 1); +INSERT INTO `sys_user_role` VALUES (1762721161459322881, 1); +INSERT INTO `sys_user_role` VALUES (1762721300685049857, 1); +INSERT INTO `sys_user_role` VALUES (1762724284441612290, 1); +INSERT INTO `sys_user_role` VALUES (1762728759105474561, 1); +INSERT INTO `sys_user_role` VALUES (1762732886506131458, 1); +INSERT INTO `sys_user_role` VALUES (1762744418904354818, 1); +INSERT INTO `sys_user_role` VALUES (1762749711537188865, 1); +INSERT INTO `sys_user_role` VALUES (1762749741056700418, 1); +INSERT INTO `sys_user_role` VALUES (1762750396991320065, 1); +INSERT INTO `sys_user_role` VALUES (1762752966828797954, 1); +INSERT INTO `sys_user_role` VALUES (1762753464445218817, 1); +INSERT INTO `sys_user_role` VALUES (1762753558548623362, 1); +INSERT INTO `sys_user_role` VALUES (1762755306625478657, 1); +INSERT INTO `sys_user_role` VALUES (1762756726481268737, 1); +INSERT INTO `sys_user_role` VALUES (1762756744172843010, 1); +INSERT INTO `sys_user_role` VALUES (1762760948073410562, 1); +INSERT INTO `sys_user_role` VALUES (1762768424588062721, 1); +INSERT INTO `sys_user_role` VALUES (1762770353779159041, 1); +INSERT INTO `sys_user_role` VALUES (1762770690174922754, 1); +INSERT INTO `sys_user_role` VALUES (1762773352299671554, 1); +INSERT INTO `sys_user_role` VALUES (1762809323107954689, 1); +INSERT INTO `sys_user_role` VALUES (1762839585439133698, 1); +INSERT INTO `sys_user_role` VALUES (1762854389474177026, 1); +INSERT INTO `sys_user_role` VALUES (1762962461110611969, 1); +INSERT INTO `sys_user_role` VALUES (1763011242199920642, 1); +INSERT INTO `sys_user_role` VALUES (1763014994155843586, 1); +INSERT INTO `sys_user_role` VALUES (1763017291741048833, 1); +INSERT INTO `sys_user_role` VALUES (1763021759299760129, 1); +INSERT INTO `sys_user_role` VALUES (1763033286434140162, 1); +INSERT INTO `sys_user_role` VALUES (1763034914528735233, 1); +INSERT INTO `sys_user_role` VALUES (1763039329885138945, 1); +INSERT INTO `sys_user_role` VALUES (1763046791925248001, 1); +INSERT INTO `sys_user_role` VALUES (1763059898533851137, 1); +INSERT INTO `sys_user_role` VALUES (1763074956366229505, 1); +INSERT INTO `sys_user_role` VALUES (1763083906738335746, 1); +INSERT INTO `sys_user_role` VALUES (1763087371808059394, 1); +INSERT INTO `sys_user_role` VALUES (1763110723763351554, 1); +INSERT INTO `sys_user_role` VALUES (1763119583433633794, 1); +INSERT INTO `sys_user_role` VALUES (1763121912195100674, 1); +INSERT INTO `sys_user_role` VALUES (1763150617374142466, 1); +INSERT INTO `sys_user_role` VALUES (1763219512067928065, 1); +INSERT INTO `sys_user_role` VALUES (1763232955600777217, 1); +INSERT INTO `sys_user_role` VALUES (1763234635201425410, 1); +INSERT INTO `sys_user_role` VALUES (1763246126281568257, 1); +INSERT INTO `sys_user_role` VALUES (1763323873230106626, 1); +INSERT INTO `sys_user_role` VALUES (1763384782623387650, 1); +INSERT INTO `sys_user_role` VALUES (1763386804647014401, 1); +INSERT INTO `sys_user_role` VALUES (1763396269777661953, 1); +INSERT INTO `sys_user_role` VALUES (1763405607485353985, 1); +INSERT INTO `sys_user_role` VALUES (1763432831823425537, 1); +INSERT INTO `sys_user_role` VALUES (1763453676952268802, 1); +INSERT INTO `sys_user_role` VALUES (1763456811204653057, 1); +INSERT INTO `sys_user_role` VALUES (1763461579713064962, 1); +INSERT INTO `sys_user_role` VALUES (1763491204732379137, 1); +INSERT INTO `sys_user_role` VALUES (1763497378051612674, 1); +INSERT INTO `sys_user_role` VALUES (1763559058706096130, 1); +INSERT INTO `sys_user_role` VALUES (1763577018824876033, 1); +INSERT INTO `sys_user_role` VALUES (1763633124087521281, 1); +INSERT INTO `sys_user_role` VALUES (1763886812869775362, 1); +INSERT INTO `sys_user_role` VALUES (1763913997563285506, 1); +INSERT INTO `sys_user_role` VALUES (1764173595432013826, 1); +INSERT INTO `sys_user_role` VALUES (1764261292183998465, 1); +INSERT INTO `sys_user_role` VALUES (1764287995094585346, 1); +INSERT INTO `sys_user_role` VALUES (1764461290695774209, 1); +INSERT INTO `sys_user_role` VALUES (1764474718197993473, 1); +INSERT INTO `sys_user_role` VALUES (1764482496870305794, 1); +INSERT INTO `sys_user_role` VALUES (1764495637402439682, 1); +INSERT INTO `sys_user_role` VALUES (1764498159743619073, 1); +INSERT INTO `sys_user_role` VALUES (1764498751559913473, 1); +INSERT INTO `sys_user_role` VALUES (1764514945641828354, 1); +INSERT INTO `sys_user_role` VALUES (1764519088087453698, 1); +INSERT INTO `sys_user_role` VALUES (1764520899728986114, 1); +INSERT INTO `sys_user_role` VALUES (1764525084016988161, 1); +INSERT INTO `sys_user_role` VALUES (1764539443405475842, 1); +INSERT INTO `sys_user_role` VALUES (1764564174649249794, 1); +INSERT INTO `sys_user_role` VALUES (1764583176607977474, 1); +INSERT INTO `sys_user_role` VALUES (1764607755468505089, 1); +INSERT INTO `sys_user_role` VALUES (1764634462757920770, 1); +INSERT INTO `sys_user_role` VALUES (1764827973771915265, 1); +INSERT INTO `sys_user_role` VALUES (1764831906313596929, 1); +INSERT INTO `sys_user_role` VALUES (1764857801929715713, 1); +INSERT INTO `sys_user_role` VALUES (1764882243925913602, 1); +INSERT INTO `sys_user_role` VALUES (1764897874259816449, 1); +INSERT INTO `sys_user_role` VALUES (1764945289142677505, 1); +INSERT INTO `sys_user_role` VALUES (1764973230396354562, 1); +INSERT INTO `sys_user_role` VALUES (1765026702110044161, 1); +INSERT INTO `sys_user_role` VALUES (1765029529888829441, 1); +INSERT INTO `sys_user_role` VALUES (1765032464647532546, 1); +INSERT INTO `sys_user_role` VALUES (1765189908342321154, 1); +INSERT INTO `sys_user_role` VALUES (1765214567611838465, 1); +INSERT INTO `sys_user_role` VALUES (1765219002413035521, 1); +INSERT INTO `sys_user_role` VALUES (1765220951434801153, 1); +INSERT INTO `sys_user_role` VALUES (1765248990147325954, 1); +INSERT INTO `sys_user_role` VALUES (1765249652247572481, 1); +INSERT INTO `sys_user_role` VALUES (1765256689840893953, 1); +INSERT INTO `sys_user_role` VALUES (1765258070287003649, 1); +INSERT INTO `sys_user_role` VALUES (1765276219292069890, 1); +INSERT INTO `sys_user_role` VALUES (1765276256986279938, 1); +INSERT INTO `sys_user_role` VALUES (1765288006737539074, 1); +INSERT INTO `sys_user_role` VALUES (1765312970979094529, 1); +INSERT INTO `sys_user_role` VALUES (1765626857976840193, 1); +INSERT INTO `sys_user_role` VALUES (1765662415604236289, 1); +INSERT INTO `sys_user_role` VALUES (1765673187432546306, 1); +INSERT INTO `sys_user_role` VALUES (1765733893087510530, 1); +INSERT INTO `sys_user_role` VALUES (1765927148689326081, 1); +INSERT INTO `sys_user_role` VALUES (1765946481549279233, 1); +INSERT INTO `sys_user_role` VALUES (1765987575418880002, 1); +INSERT INTO `sys_user_role` VALUES (1765991619675848705, 1); +INSERT INTO `sys_user_role` VALUES (1765997037533822977, 1); +INSERT INTO `sys_user_role` VALUES (1766008273063411714, 1); +INSERT INTO `sys_user_role` VALUES (1766011496348286978, 1); +INSERT INTO `sys_user_role` VALUES (1766017335771561986, 1); +INSERT INTO `sys_user_role` VALUES (1766020112446947329, 1); +INSERT INTO `sys_user_role` VALUES (1766085955713269762, 1); +INSERT INTO `sys_user_role` VALUES (1766102635604639746, 1); +INSERT INTO `sys_user_role` VALUES (1766323008493355009, 1); +INSERT INTO `sys_user_role` VALUES (1766387294112612353, 1); +INSERT INTO `sys_user_role` VALUES (1766842982618136577, 1); +INSERT INTO `sys_user_role` VALUES (1767018925722730497, 1); +INSERT INTO `sys_user_role` VALUES (1767098572703563778, 1); +INSERT INTO `sys_user_role` VALUES (1767193870939488258, 1); +INSERT INTO `sys_user_role` VALUES (1767371461667356673, 1); +INSERT INTO `sys_user_role` VALUES (1767472876167397377, 1); +INSERT INTO `sys_user_role` VALUES (1767484503956684801, 1); +INSERT INTO `sys_user_role` VALUES (1767494435045146626, 1); +INSERT INTO `sys_user_role` VALUES (1767502928200368129, 1); +INSERT INTO `sys_user_role` VALUES (1767790695329333250, 1); +INSERT INTO `sys_user_role` VALUES (1767797421759823874, 1); +INSERT INTO `sys_user_role` VALUES (1767867514107756545, 1); +INSERT INTO `sys_user_role` VALUES (1768123513418842114, 1); +INSERT INTO `sys_user_role` VALUES (1768125846164897794, 1); +INSERT INTO `sys_user_role` VALUES (1768137512021688322, 1); +INSERT INTO `sys_user_role` VALUES (1768172797870768129, 1); +INSERT INTO `sys_user_role` VALUES (1768257272084463617, 1); +INSERT INTO `sys_user_role` VALUES (1768452168263172097, 1); +INSERT INTO `sys_user_role` VALUES (1768487959811096578, 1); +INSERT INTO `sys_user_role` VALUES (1768522172358754306, 1); +INSERT INTO `sys_user_role` VALUES (1768523379651411969, 1); +INSERT INTO `sys_user_role` VALUES (1768528826072596482, 1); +INSERT INTO `sys_user_role` VALUES (1768554562896560130, 1); +INSERT INTO `sys_user_role` VALUES (1768560191165988866, 1); +INSERT INTO `sys_user_role` VALUES (1768560307197214722, 1); +INSERT INTO `sys_user_role` VALUES (1768561334289989633, 1); +INSERT INTO `sys_user_role` VALUES (1768565063735083009, 1); +INSERT INTO `sys_user_role` VALUES (1768570261782167553, 1); +INSERT INTO `sys_user_role` VALUES (1768598711431626753, 1); +INSERT INTO `sys_user_role` VALUES (1768635967806668802, 1); +INSERT INTO `sys_user_role` VALUES (1768887604487946241, 1); +INSERT INTO `sys_user_role` VALUES (1768911351987077122, 1); +INSERT INTO `sys_user_role` VALUES (1769186172289449986, 1); +INSERT INTO `sys_user_role` VALUES (1769408371134857218, 1); +INSERT INTO `sys_user_role` VALUES (1769520576635371521, 1); +INSERT INTO `sys_user_role` VALUES (1769561862704758786, 1); +INSERT INTO `sys_user_role` VALUES (1769569234722521089, 1); +INSERT INTO `sys_user_role` VALUES (1769607528399273986, 1); +INSERT INTO `sys_user_role` VALUES (1769617177890553857, 1); +INSERT INTO `sys_user_role` VALUES (1769663440459694082, 1); +INSERT INTO `sys_user_role` VALUES (1769908456541233154, 1); +INSERT INTO `sys_user_role` VALUES (1769957357877043201, 1); +INSERT INTO `sys_user_role` VALUES (1770021611783168002, 1); +INSERT INTO `sys_user_role` VALUES (1770063295095087106, 1); +INSERT INTO `sys_user_role` VALUES (1770063700436819970, 1); +INSERT INTO `sys_user_role` VALUES (1770281104395837442, 1); +INSERT INTO `sys_user_role` VALUES (1770288338521661441, 1); +INSERT INTO `sys_user_role` VALUES (1770322814056333313, 1); +INSERT INTO `sys_user_role` VALUES (1770338641849679874, 1); +INSERT INTO `sys_user_role` VALUES (1770351581952802817, 1); +INSERT INTO `sys_user_role` VALUES (1770357305466486786, 1); +INSERT INTO `sys_user_role` VALUES (1770364755406028802, 1); +INSERT INTO `sys_user_role` VALUES (1770381062524436482, 1); +INSERT INTO `sys_user_role` VALUES (1770470677998534657, 1); +INSERT INTO `sys_user_role` VALUES (1770642413331218434, 1); +INSERT INTO `sys_user_role` VALUES (1770648858382630914, 1); +INSERT INTO `sys_user_role` VALUES (1770715116272680962, 1); +INSERT INTO `sys_user_role` VALUES (1770720646688997377, 1); +INSERT INTO `sys_user_role` VALUES (1770726609303175170, 1); +INSERT INTO `sys_user_role` VALUES (1770757521378181121, 1); +INSERT INTO `sys_user_role` VALUES (1770759021907214338, 1); +INSERT INTO `sys_user_role` VALUES (1771002145573240833, 1); +INSERT INTO `sys_user_role` VALUES (1771019340902629377, 1); +INSERT INTO `sys_user_role` VALUES (1771085212270788610, 1); +INSERT INTO `sys_user_role` VALUES (1771091102206066689, 1); +INSERT INTO `sys_user_role` VALUES (1771105696307806210, 1); +INSERT INTO `sys_user_role` VALUES (1771529088861274114, 1); +INSERT INTO `sys_user_role` VALUES (1772148936234565634, 1); +INSERT INTO `sys_user_role` VALUES (1772170742823714818, 1); +INSERT INTO `sys_user_role` VALUES (1772173596070313986, 1); +INSERT INTO `sys_user_role` VALUES (1772181791232819201, 1); +INSERT INTO `sys_user_role` VALUES (1772807697592832001, 1); +INSERT INTO `sys_user_role` VALUES (1772821509767254018, 1); +INSERT INTO `sys_user_role` VALUES (1772947270113251330, 1); +INSERT INTO `sys_user_role` VALUES (1773149840576434178, 1); +INSERT INTO `sys_user_role` VALUES (1773180693536919554, 1); +INSERT INTO `sys_user_role` VALUES (1773192472325345282, 1); +INSERT INTO `sys_user_role` VALUES (1773200350612377601, 1); +INSERT INTO `sys_user_role` VALUES (1773307685607395329, 1); +INSERT INTO `sys_user_role` VALUES (1773529379840282625, 1); +INSERT INTO `sys_user_role` VALUES (1773543535003914241, 1); +INSERT INTO `sys_user_role` VALUES (1773615949826052097, 1); +INSERT INTO `sys_user_role` VALUES (1773714968015278082, 1); +INSERT INTO `sys_user_role` VALUES (1773741523022123010, 1); +INSERT INTO `sys_user_role` VALUES (1773774290929848321, 1); +INSERT INTO `sys_user_role` VALUES (1773969452180258818, 1); +INSERT INTO `sys_user_role` VALUES (1774094144111198210, 1); +INSERT INTO `sys_user_role` VALUES (1774326191970926594, 1); +INSERT INTO `sys_user_role` VALUES (1774595110106685441, 1); +INSERT INTO `sys_user_role` VALUES (1774603290157113346, 1); +INSERT INTO `sys_user_role` VALUES (1774671916088287233, 1); +INSERT INTO `sys_user_role` VALUES (1774712059876728833, 1); +INSERT INTO `sys_user_role` VALUES (1775005868787359746, 1); +INSERT INTO `sys_user_role` VALUES (1775039514470637569, 1); +INSERT INTO `sys_user_role` VALUES (1775046202846208002, 1); +INSERT INTO `sys_user_role` VALUES (1775055115012399106, 1); +INSERT INTO `sys_user_role` VALUES (1775058985780371458, 1); +INSERT INTO `sys_user_role` VALUES (1775066829695082497, 1); +INSERT INTO `sys_user_role` VALUES (1775078808497283074, 1); +INSERT INTO `sys_user_role` VALUES (1775109977754427393, 1); +INSERT INTO `sys_user_role` VALUES (1775109977771204609, 1); +INSERT INTO `sys_user_role` VALUES (1775192704981786626, 1); +INSERT INTO `sys_user_role` VALUES (1775421589681987586, 1); +INSERT INTO `sys_user_role` VALUES (1776124571507613697, 1); +INSERT INTO `sys_user_role` VALUES (1776550027549597698, 1); +INSERT INTO `sys_user_role` VALUES (1776815081159254018, 1); +INSERT INTO `sys_user_role` VALUES (1776827459129171969, 1); +INSERT INTO `sys_user_role` VALUES (1776861348769947650, 1); +INSERT INTO `sys_user_role` VALUES (1776864185373548546, 1); +INSERT INTO `sys_user_role` VALUES (1776871215274516482, 1); +INSERT INTO `sys_user_role` VALUES (1776872376396275714, 1); +INSERT INTO `sys_user_role` VALUES (1776889562355589122, 1); +INSERT INTO `sys_user_role` VALUES (1777118704363757570, 1); +INSERT INTO `sys_user_role` VALUES (1777126438664527874, 1); +INSERT INTO `sys_user_role` VALUES (1777157190659727362, 1); +INSERT INTO `sys_user_role` VALUES (1777217669537062914, 1); +INSERT INTO `sys_user_role` VALUES (1777220647320936449, 1); +INSERT INTO `sys_user_role` VALUES (1777252116550508545, 1); +INSERT INTO `sys_user_role` VALUES (1777260896986193921, 1); +INSERT INTO `sys_user_role` VALUES (1777296499484254210, 1); +INSERT INTO `sys_user_role` VALUES (1777301747972038657, 1); +INSERT INTO `sys_user_role` VALUES (1777363539016409089, 1); +INSERT INTO `sys_user_role` VALUES (1777483372982820866, 1); +INSERT INTO `sys_user_role` VALUES (1777537906459402242, 1); +INSERT INTO `sys_user_role` VALUES (1777610641428570114, 1); +INSERT INTO `sys_user_role` VALUES (1777613556604067842, 1); +INSERT INTO `sys_user_role` VALUES (1777718773123244034, 1); +INSERT INTO `sys_user_role` VALUES (1777743939492503554, 1); +INSERT INTO `sys_user_role` VALUES (1777887539056467969, 1); +INSERT INTO `sys_user_role` VALUES (1777887799262699521, 1); +INSERT INTO `sys_user_role` VALUES (1777890253115088897, 1); +INSERT INTO `sys_user_role` VALUES (1777909423068274689, 1); +INSERT INTO `sys_user_role` VALUES (1777930481544585218, 1); +INSERT INTO `sys_user_role` VALUES (1777954050559303681, 1); +INSERT INTO `sys_user_role` VALUES (1778078614597525506, 1); +INSERT INTO `sys_user_role` VALUES (1778307871026307073, 1); +INSERT INTO `sys_user_role` VALUES (1778341191034462209, 1); +INSERT INTO `sys_user_role` VALUES (1778352526686281729, 1); +INSERT INTO `sys_user_role` VALUES (1778591039688138754, 1); +INSERT INTO `sys_user_role` VALUES (1778625241280274433, 1); +INSERT INTO `sys_user_role` VALUES (1778645603636338689, 1); +INSERT INTO `sys_user_role` VALUES (1779329016437530626, 1); +INSERT INTO `sys_user_role` VALUES (1779509451201306625, 1); +INSERT INTO `sys_user_role` VALUES (1781359789389049858, 1); +INSERT INTO `sys_user_role` VALUES (1781463900025450497, 1); +INSERT INTO `sys_user_role` VALUES (1781519961809940482, 1); +INSERT INTO `sys_user_role` VALUES (1781570458679963650, 1); +INSERT INTO `sys_user_role` VALUES (1781679536911609858, 1); +INSERT INTO `sys_user_role` VALUES (1781680345497923586, 1); +INSERT INTO `sys_user_role` VALUES (1781938051479711745, 1); +INSERT INTO `sys_user_role` VALUES (1781979644345659393, 1); +INSERT INTO `sys_user_role` VALUES (1781982608724537345, 1); +INSERT INTO `sys_user_role` VALUES (1782339521316294658, 1); +INSERT INTO `sys_user_role` VALUES (1782584811885596674, 1); +INSERT INTO `sys_user_role` VALUES (1782597966938411009, 1); +INSERT INTO `sys_user_role` VALUES (1782598345608564738, 1); +INSERT INTO `sys_user_role` VALUES (1782599696132509698, 1); +INSERT INTO `sys_user_role` VALUES (1782655923667505153, 1); +INSERT INTO `sys_user_role` VALUES (1782658558470557698, 1); +INSERT INTO `sys_user_role` VALUES (1782697212870037505, 1); +INSERT INTO `sys_user_role` VALUES (1782711689380270082, 1); +INSERT INTO `sys_user_role` VALUES (1782733890905083906, 1); +INSERT INTO `sys_user_role` VALUES (1782734018948796418, 1); +INSERT INTO `sys_user_role` VALUES (1782741134992379906, 1); +INSERT INTO `sys_user_role` VALUES (1782926062560382978, 1); +INSERT INTO `sys_user_role` VALUES (1782941277477834753, 1); +INSERT INTO `sys_user_role` VALUES (1782982532157050881, 1); +INSERT INTO `sys_user_role` VALUES (1783068876598317057, 1); +INSERT INTO `sys_user_role` VALUES (1783086777506107393, 1); +INSERT INTO `sys_user_role` VALUES (1783144268357079041, 1); +INSERT INTO `sys_user_role` VALUES (1783297415947915265, 1); +INSERT INTO `sys_user_role` VALUES (1783310569679523841, 1); +INSERT INTO `sys_user_role` VALUES (1783326930816372738, 1); +INSERT INTO `sys_user_role` VALUES (1783358421143293953, 1); +INSERT INTO `sys_user_role` VALUES (1783421941125910530, 1); +INSERT INTO `sys_user_role` VALUES (1783439451980206081, 1); +INSERT INTO `sys_user_role` VALUES (1783471940098494466, 1); +INSERT INTO `sys_user_role` VALUES (1783777388311777281, 1); +INSERT INTO `sys_user_role` VALUES (1783796572785643521, 1); +INSERT INTO `sys_user_role` VALUES (1783877442208960514, 1); +INSERT INTO `sys_user_role` VALUES (1784199358216048642, 1); +INSERT INTO `sys_user_role` VALUES (1784389326918029313, 1); +INSERT INTO `sys_user_role` VALUES (1784400528377286657, 1); +INSERT INTO `sys_user_role` VALUES (1784435756558880770, 1); +INSERT INTO `sys_user_role` VALUES (1784457537797656577, 1); +INSERT INTO `sys_user_role` VALUES (1784521057603538945, 1); +INSERT INTO `sys_user_role` VALUES (1784522252246724609, 1); +INSERT INTO `sys_user_role` VALUES (1784548227567202306, 1); +INSERT INTO `sys_user_role` VALUES (1784569508068995073, 1); +INSERT INTO `sys_user_role` VALUES (1784777389905162242, 1); +INSERT INTO `sys_user_role` VALUES (1784783910114308097, 1); +INSERT INTO `sys_user_role` VALUES (1784821184902344705, 1); +INSERT INTO `sys_user_role` VALUES (1784838825360633858, 1); +INSERT INTO `sys_user_role` VALUES (1784870260805087233, 1); +INSERT INTO `sys_user_role` VALUES (1784910451020279810, 1); +INSERT INTO `sys_user_role` VALUES (1785130539233193985, 1); +INSERT INTO `sys_user_role` VALUES (1785240710601125890, 1); +INSERT INTO `sys_user_role` VALUES (1785360485289439233, 1); +INSERT INTO `sys_user_role` VALUES (1785588726424023041, 1); +INSERT INTO `sys_user_role` VALUES (1785975035152019458, 1); +INSERT INTO `sys_user_role` VALUES (1786448824117735425, 1); +INSERT INTO `sys_user_role` VALUES (1787036511853850625, 1); +INSERT INTO `sys_user_role` VALUES (1787040098730356738, 1); +INSERT INTO `sys_user_role` VALUES (1787442869522636802, 1); +INSERT INTO `sys_user_role` VALUES (1787802087576530946, 1); +INSERT INTO `sys_user_role` VALUES (1787878100067119105, 1); +INSERT INTO `sys_user_role` VALUES (1788016335816716290, 1); +INSERT INTO `sys_user_role` VALUES (1788135951385718786, 1); +INSERT INTO `sys_user_role` VALUES (1788136924611047425, 1); +INSERT INTO `sys_user_role` VALUES (1788564791958401026, 1); +INSERT INTO `sys_user_role` VALUES (1788861563763126273, 1); +INSERT INTO `sys_user_role` VALUES (1789104577664217090, 1); +INSERT INTO `sys_user_role` VALUES (1789215891946434561, 1); +INSERT INTO `sys_user_role` VALUES (1789891068120231937, 1); +INSERT INTO `sys_user_role` VALUES (1789916787885961218, 1); +INSERT INTO `sys_user_role` VALUES (1790285085844664322, 1); +INSERT INTO `sys_user_role` VALUES (1790395963663413250, 1); +INSERT INTO `sys_user_role` VALUES (1790626495441698817, 1); +INSERT INTO `sys_user_role` VALUES (1790733204311015425, 1); +INSERT INTO `sys_user_role` VALUES (1790747738857832449, 1); +INSERT INTO `sys_user_role` VALUES (1790893072141549570, 1); +INSERT INTO `sys_user_role` VALUES (1790953693902045186, 1); +INSERT INTO `sys_user_role` VALUES (1790986267617689601, 1); +INSERT INTO `sys_user_role` VALUES (1791058271444172801, 1); +INSERT INTO `sys_user_role` VALUES (1791123542645178370, 1); +INSERT INTO `sys_user_role` VALUES (1791170948304764929, 1); +INSERT INTO `sys_user_role` VALUES (1791173160204533762, 1); +INSERT INTO `sys_user_role` VALUES (1791181681805524994, 1); +INSERT INTO `sys_user_role` VALUES (1791184448041287681, 1); +INSERT INTO `sys_user_role` VALUES (1791281872491544578, 1); +INSERT INTO `sys_user_role` VALUES (1791281970680201217, 1); +INSERT INTO `sys_user_role` VALUES (1791283037744693249, 1); +INSERT INTO `sys_user_role` VALUES (1791285337913589762, 1); +INSERT INTO `sys_user_role` VALUES (1791289816255856641, 1); +INSERT INTO `sys_user_role` VALUES (1791296357612683266, 1); +INSERT INTO `sys_user_role` VALUES (1791299213191315457, 1); +INSERT INTO `sys_user_role` VALUES (1791308308178829314, 1); +INSERT INTO `sys_user_role` VALUES (1791318977032781826, 1); +INSERT INTO `sys_user_role` VALUES (1791371260403687425, 1); +INSERT INTO `sys_user_role` VALUES (1791387421707116546, 1); +INSERT INTO `sys_user_role` VALUES (1791447204858470402, 1); +INSERT INTO `sys_user_role` VALUES (1791729117863124993, 1); +INSERT INTO `sys_user_role` VALUES (1793165965818912770, 1); +INSERT INTO `sys_user_role` VALUES (1793568337082740737, 1); +INSERT INTO `sys_user_role` VALUES (1794560044937154561, 1); +INSERT INTO `sys_user_role` VALUES (1794749939555143681, 1); + +-- ---------------------------- +-- Table structure for wx_rob_config +-- ---------------------------- +DROP TABLE IF EXISTS `wx_rob_config`; +CREATE TABLE `wx_rob_config` ( + `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '涓婚敭', + `user_id` bigint(20) NULL DEFAULT NULL COMMENT '鎵�灞炵敤鎴�', + `bot_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鏈哄櫒浜哄悕绉�', + `unique_key` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鏈哄櫒鍞竴鐮�', + `default_friend` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '\0' COMMENT '榛樿濂藉弸鍥炲寮�鍏�', + `default_group` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '\0' COMMENT '榛樿缇ゅ洖澶嶅紑鍏�', + `enable` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鏈哄櫒浜虹姸鎬� 0姝e父 1鍚敤', + `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', + `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', + `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', + `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', + `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', + `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `udx_wx_rob_config_uniquekey`(`unique_key`) USING BTREE, + UNIQUE INDEX `udx_wx_name`(`bot_name`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1791353611728023554 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '寰俊鏈哄櫒浜洪厤缃�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of wx_rob_config +-- ---------------------------- + +-- ---------------------------- +-- Table structure for wx_rob_keyword +-- ---------------------------- +DROP TABLE IF EXISTS `wx_rob_keyword`; +CREATE TABLE `wx_rob_keyword` ( + `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, + `unique_key` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鏈哄櫒鍞竴鐮�', + `key_data` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鍏抽敭璇�', + `value_data` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鍥炲鍐呭', + `type_data` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鍥炲绫诲瀷', + `nick_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鐩爣鏄电О', + `to_group` bit(1) NOT NULL DEFAULT b'1' COMMENT '缇�1濂藉弸0', + `enable` bit(1) NOT NULL DEFAULT b'1' COMMENT '鍚敤1绂佺敤0', + `create_time` datetime NOT NULL COMMENT '鍒涘缓鏃堕棿', + PRIMARY KEY (`id`) USING BTREE, + INDEX `idx_wx_rob_keyword_unikey`(`unique_key`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '寰俊鍏抽敭璇�' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of wx_rob_keyword +-- ---------------------------- + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/script/docker/ry-vue.sql b/script/docker/ry-vue.sql deleted file mode 100644 index 5473fab..0000000 --- a/script/docker/ry-vue.sql +++ /dev/null @@ -1,2594 +0,0 @@ -/* - Navicat MySQL Data Transfer - - Source Server : ry-vue - Source Server Type : MySQL - Source Server Version : 50740 - Source Host : 127.0.0.1:3306 - Source Schema : ry-vue - - Target Server Type : MySQL - Target Server Version : 50740 - File Encoding : 65001 - - Date: 27/05/2024 17:34:48 -*/ - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - --- ---------------------------- --- Table structure for chat_config --- ---------------------------- -DROP TABLE IF EXISTS `chat_config`; -CREATE TABLE `chat_config` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '涓婚敭', - `category` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '閰嶇疆绫诲瀷', - `config_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '閰嶇疆鍚嶇О', - `config_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '閰嶇疆鍊�', - `config_dict` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '璇存槑', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鍒涘缓鑰�', - `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - `version` int(11) NULL DEFAULT NULL COMMENT '鐗堟湰', - `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 1浠h〃鍒犻櫎锛�', - `update_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏇存柊IP', - `tenant_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '绉熸埛Id', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `unique_category_key`(`category`, `config_name`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1794956871156207618 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '閰嶇疆淇℃伅琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of chat_config --- ---------------------------- -INSERT INTO `chat_config` VALUES (1779450794448789505, 'chat', 'apiKey', 'sk-xx', 'API 瀵嗛挜', 103, '2024-04-14 18:05:05', '1', '1', '2024-04-23 23:56:54', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1779450794872414210, 'chat', 'apiHost', 'https://api.pandarobot.chat/', 'API 鍦板潃', 103, '2024-04-14 18:05:05', '1', '1', '2024-04-23 23:56:54', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1779497340548784129, 'pay', 'pid', '1000', '鍟嗘埛PID', 103, '2024-04-14 21:10:02', '1', '1', '2024-04-28 17:46:31', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1779497340938854401, 'pay', 'key', 'xx', '鍟嗘埛瀵嗛挜', 103, '2024-04-14 21:10:02', '1', '1', '2024-04-28 17:46:31', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1779497341135986690, 'pay', 'payUrl', 'https://pay.pandarobot.chat/mapi.php', '鏀粯鍦板潃', 103, '2024-04-14 21:10:02', '1', '1', '2024-04-28 17:46:31', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1779497341400227842, 'pay', 'notify_url', 'https://www.pandarobot.chat/pay/notifyUrl', '鍥炶皟鍦板潃', 103, '2024-04-14 21:10:02', '1', '1', '2024-04-28 17:46:31', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1779497341588971522, 'pay', 'return_url', 'https://www.pandarobot.chat/pay/returnUrl', '璺宠浆閫氱煡', 103, '2024-04-14 21:10:02', '1', '1', '2024-04-28 17:46:31', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1779513580331835394, 'mail', 'host', 'smtp.163.com', '涓绘満鍦板潃', 103, '2024-04-14 22:14:34', '1', '1', '2024-04-28 17:46:46', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1779513580658991106, 'mail', 'port', '465', '涓绘満绔彛', 103, '2024-04-14 22:14:34', '1', '1', '2024-04-28 17:46:46', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1779513580919037953, 'mail', 'from', 'ageerle@163.com', '鍙戦�佹柟', 103, '2024-04-14 22:14:34', '1', '1', '2024-04-28 17:46:46', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1779513581107781634, 'mail', 'user', 'ageerle@163.com', '鐢ㄦ埛鍚�', 103, '2024-04-14 22:14:34', '1', '1', '2024-04-28 17:46:46', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1779513581309108225, 'mail', 'pass', 'xx', '鎺堟潈鐮�', 103, '2024-04-14 22:14:34', '1', '1', '2024-04-28 17:46:46', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1779726450625687553, 'mj', 'apiKey', 'sk-xx', 'API 瀵嗛挜', 103, '2024-04-15 12:20:26', '1', '1', '2024-04-23 23:56:58', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1779726451036729346, 'mj', 'apiHost', 'https://api.pandarobot.chat/', 'API 鍦板潃', 103, '2024-04-15 12:20:26', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1782331509679181825, 'mj', 'imagine', '0.3', '鏂囩敓鍥�', 103, '2024-04-22 16:52:01', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1782331509939228674, 'mj', 'blend', '0.3', '鍥剧敓鍥�', 103, '2024-04-22 16:52:01', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1782331510199275522, 'mj', 'describe', '0.1', '鍥剧敓鏂�', 103, '2024-04-22 16:52:01', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1782331510392213505, 'mj', 'change', '0.3', '鍙樺寲浠锋牸', 103, '2024-04-22 16:52:01', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1782331510652260353, 'mj', 'upsample', '0.1', '鏀惧ぇ浠锋牸', 103, '2024-04-22 16:52:01', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1782331510845198338, 'mj', 'inpaint', '0.3', '灞�閮ㄩ噸缁�', 103, '2024-04-22 16:52:01', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1782331511117828098, 'mj', 'faceSwapping', '0.3', '鎹㈣劯浠锋牸', 103, '2024-04-22 16:52:01', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1782331511306571778, 'mj', 'shorten', '0.1', '鎻愮ず璇嶅垎鏋�', 103, '2024-04-22 16:52:01', '1', '1', '2024-04-23 23:56:59', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1782766864937119746, 'mail', 'amount', '1', '娉ㄥ唽棰濆害', 103, '2024-04-23 21:41:57', '1', '1', '2024-04-28 17:46:47', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1784166479104135169, 'audio', 'apiKey', 'xx', 'API 瀵嗛挜', 103, '2024-04-27 18:23:31', '1', '1', '2024-04-27 18:24:31', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1784166479615840258, 'audio', 'apiHost', 'https://v1.reecho.cn/', 'API 鍦板潃', 103, '2024-04-27 18:23:32', '1', '1', '2024-04-27 18:24:31', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1786058372188569602, 'review', 'enabled', 'false', '鏂囨湰瀹℃牳', 103, '2024-05-02 23:41:14', '1', '1', '2024-05-03 01:18:50', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1786058372637360129, 'review', 'apiKey', 'xx', 'apiKey', 103, '2024-05-02 23:41:14', '1', '1', '2024-05-03 01:18:50', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1786058372897406977, 'review', 'secretKey', 'xx', 'secretKey', 103, '2024-05-02 23:41:14', '1', '1', '2024-05-03 01:18:50', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1792069350789324801, 'weixin', 'appId', 'xx', '搴旂敤ID', 103, '2024-05-19 13:46:43', '1', '1', '2024-05-19 22:34:39', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1792069351246503938, 'weixin', 'appSecret', 'xx', '搴旂敤瀵嗛挜', 103, '2024-05-19 13:46:43', '1', '1', '2024-05-19 22:34:39', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1792069351246503939, 'weixin', 'mchId', 'xx', '鍟嗘埛ID', 103, '2024-05-19 13:46:43', '1', '1', '2024-05-19 22:34:39', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1792183360796790785, 'weixin', 'notifyUrl', 'https://www.pandarobot.chat/pay/notify/wxOrder', '鍥炶皟鍦板潃', 103, '2024-05-19 21:19:45', '1', '1', '2024-05-19 22:34:40', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1792183361065226241, 'weixin', 'enabled', 'false', '寮�鍚敮浠�', 103, '2024-05-19 21:19:45', '1', '1', '2024-05-19 22:34:40', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1792207511704100866, 'sys', 'name', '鐔婄尗鍔╂墜鍚庡彴绠$悊绯荤粺', '缃戠珯鍚嶇О', 103, '2024-05-19 22:55:43', '1', '1', '2024-05-19 23:24:19', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1792207512089976834, 'sys', 'logoImage', 'http://panda-1253683406.cos.ap-guangzhou.myqcloud.com/panda/2024/05/19/4c106628754b4bd882a4c002eaa317f5.jpg', '缃戠珯logo', 103, '2024-05-19 22:55:43', '1', '1', '2024-05-19 23:24:19', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1792207512412938241, 'sys', 'copyright', 'Copyright 漏 婧邯缃戠粶绉戞妧宸ヤ綔瀹� 閯侷CP澶�2023007672鍙�-1', '鐗堟潈淇℃伅', 103, '2024-05-19 22:55:43', '1', '1', '2024-05-19 23:24:20', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1792207512740093954, 'sys', 'customImage', 'http://panda-1253683406.cos.ap-guangzhou.myqcloud.com/panda/2024/05/19/2faba7a5fa174d7c8d573ce3f031ec51.jpg', '瀹㈡湇浜岀淮鐮�', 103, '2024-05-19 22:55:43', '1', '1', '2024-05-19 23:24:20', NULL, NULL, '0', NULL, 0); -INSERT INTO `chat_config` VALUES (1792207512740093955, 'sys', 'activate', 'false', '绯荤粺婵�娲荤姸鎬�', 103, '2024-05-19 22:55:43', '1', '1', '2024-05-27 13:03:23', NULL, NULL, '0', NULL, 0); - --- ---------------------------- --- Table structure for chat_message --- ---------------------------- -DROP TABLE IF EXISTS `chat_message`; -CREATE TABLE `chat_message` ( - `id` bigint(20) NOT NULL COMMENT '涓婚敭', - `user_id` bigint(20) NOT NULL COMMENT '鐢ㄦ埛id', - `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '娑堟伅鍐呭', - `deduct_cost` double(20, 2) NULL DEFAULT 0.00 COMMENT '鎵i櫎閲戦\r\n\r\n', - `total_tokens` int(20) NULL DEFAULT NULL COMMENT '绱 Tokens', - `model_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '妯″瀷鍚嶇О', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鑱婂ぉ娑堟伅琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of chat_message --- ---------------------------- - --- ---------------------------- --- Table structure for chat_sensitive_word --- ---------------------------- -DROP TABLE IF EXISTS `chat_sensitive_word`; -CREATE TABLE `chat_sensitive_word` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '涓婚敭', - `word` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鏁忔劅璇嶅唴瀹�', - `status` int(11) NOT NULL COMMENT '鐘舵�� 1 鍚敤 2 鍋滅敤', - `is_deleted` int(11) NULL DEFAULT 0 COMMENT '鏄惁鍒犻櫎 0 鍚� NULL 鏄�', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '鍒涘缓鏃堕棿', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '鏇存柊鏃堕棿', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鏁忔劅璇嶈〃' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of chat_sensitive_word --- ---------------------------- - --- ---------------------------- --- Table structure for chat_token --- ---------------------------- -DROP TABLE IF EXISTS `chat_token`; -CREATE TABLE `chat_token` ( - `id` bigint(20) NOT NULL COMMENT '涓婚敭', - `user_id` bigint(20) NOT NULL COMMENT '鐢ㄦ埛', - `token` int(10) NULL DEFAULT NULL COMMENT '寰呯粨绠梩oken', - `model_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '妯″瀷鍚嶇О', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'token淇℃伅' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of chat_token --- ---------------------------- - --- ---------------------------- --- Table structure for chat_voucher --- ---------------------------- -DROP TABLE IF EXISTS `chat_voucher`; -CREATE TABLE `chat_voucher` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '涓婚敭', - `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鍏戞崲鐮�', - `amount` double(10, 2) NOT NULL COMMENT '鍏戞崲閲戦', - `user_id` bigint(20) NULL DEFAULT NULL COMMENT '鐢ㄦ埛id', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '鍏戞崲鐘舵��', - `balance_before` double(10, 2) NULL DEFAULT NULL COMMENT '鍏戞崲鍓嶄綑棰�', - `balance_after` double(10, 2) NULL DEFAULT NULL COMMENT '鍏戞崲鍚庝綑棰�', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鍒涘缓鑰�', - `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1786392743269474307 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐢ㄦ埛鍏戞崲璁板綍' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of chat_voucher --- ---------------------------- - --- ---------------------------- --- Table structure for gen_table --- ---------------------------- -DROP TABLE IF EXISTS `gen_table`; -CREATE TABLE `gen_table` ( - `table_id` bigint(20) NOT NULL COMMENT '缂栧彿', - `table_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '琛ㄥ悕绉�', - `table_comment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '琛ㄦ弿杩�', - `sub_table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鍏宠仈瀛愯〃鐨勮〃鍚�', - `sub_table_fk_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '瀛愯〃鍏宠仈鐨勫閿悕', - `class_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '瀹炰綋绫诲悕绉�', - `tpl_category` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'crud' COMMENT '浣跨敤鐨勬ā鏉匡紙crud鍗曡〃鎿嶄綔 tree鏍戣〃鎿嶄綔锛�', - `package_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鐢熸垚鍖呰矾寰�', - `module_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鐢熸垚妯″潡鍚�', - `business_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鐢熸垚涓氬姟鍚�', - `function_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鐢熸垚鍔熻兘鍚�', - `function_author` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鐢熸垚鍔熻兘浣滆��', - `gen_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鐢熸垚浠g爜鏂瑰紡锛�0zip鍘嬬缉鍖� 1鑷畾涔夎矾寰勶級', - `gen_path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '/' COMMENT '鐢熸垚璺緞锛堜笉濉粯璁ら」鐩矾寰勶級', - `options` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鍏跺畠鐢熸垚閫夐」', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - PRIMARY KEY (`table_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '浠g爜鐢熸垚涓氬姟琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of gen_table --- ---------------------------- -INSERT INTO `gen_table` VALUES (1661288222902505474, 'sys_notice', '閫氱煡鍏憡琛�', NULL, NULL, 'SysNotice', 'crud', 'org.dromara.system', 'system', 'notice', '閫氱煡鍏憡', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:11', 1, '2023-05-20 18:05:11', NULL); -INSERT INTO `gen_table` VALUES (1661288223338713089, 'sys_oper_log', '鎿嶄綔鏃ュ織璁板綍', NULL, NULL, 'SysOperLog', 'crud', 'org.dromara.system', 'system', 'operLog', '鎿嶄綔鏃ュ織璁板綍', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:11', 1, '2023-05-20 18:05:11', NULL); -INSERT INTO `gen_table` VALUES (1661288223477125122, 'sys_oss', 'OSS瀵硅薄瀛樺偍琛�', NULL, NULL, 'SysOss', 'crud', 'org.dromara.system', 'system', 'oss', 'OSS瀵硅薄瀛樺偍', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:11', 1, '2023-05-20 18:05:11', NULL); -INSERT INTO `gen_table` VALUES (1661288223586177025, 'sys_oss_config', '瀵硅薄瀛樺偍閰嶇疆琛�', NULL, NULL, 'SysOssConfig', 'crud', 'org.dromara.system', 'system', 'ossConfig', '瀵硅薄瀛樺偍閰嶇疆', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:11', 1, '2023-05-20 18:05:11', NULL); -INSERT INTO `gen_table` VALUES (1661288223728783361, 'sys_post', '宀椾綅淇℃伅琛�', NULL, NULL, 'SysPost', 'crud', 'org.dromara.system', 'system', 'post', '宀椾綅淇℃伅', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:11', 1, '2023-05-20 18:05:11', NULL); -INSERT INTO `gen_table` VALUES (1661288223821058050, 'sys_role', '瑙掕壊淇℃伅琛�', NULL, NULL, 'SysRole', 'crud', 'org.dromara.system', 'system', 'role', '瑙掕壊淇℃伅', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:11', 1, '2023-05-20 18:05:11', NULL); -INSERT INTO `gen_table` VALUES (1661288223925915650, 'sys_user_post', '鐢ㄦ埛涓庡矖浣嶅叧鑱旇〃', NULL, NULL, 'SysUserPost', 'crud', 'org.dromara.system', 'system', 'userPost', '鐢ㄦ埛涓庡矖浣嶅叧鑱�', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:11', 1, '2023-05-20 18:05:11', NULL); -INSERT INTO `gen_table` VALUES (1661288223967858689, 'sys_user_role', '鐢ㄦ埛鍜岃鑹插叧鑱旇〃', NULL, NULL, 'SysUserRole', 'crud', 'org.dromara.system', 'system', 'userRole', '鐢ㄦ埛鍜岃鑹插叧鑱�', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:11', 1, '2023-05-20 18:05:11', NULL); -INSERT INTO `gen_table` VALUES (1661288385096241154, 'sys_config', '鍙傛暟閰嶇疆琛�', NULL, NULL, 'SysConfig', 'crud', 'org.dromara.system', 'system', 'config', '鍙傛暟閰嶇疆', 'Lion Li', '0', '/', NULL, 103, 1, '2023-05-20 18:05:10', 1, '2023-05-20 18:05:10', NULL); -INSERT INTO `gen_table` VALUES (1680196323445579778, 'sys_file_detail', '鏂囦欢璁板綍琛�', NULL, NULL, 'SysFileDetail', 'crud', 'org.ruoyi.system', 'system', 'fileDetail', '鏂囦欢璁板綍', 'Lion Li', '0', '/', NULL, 103, 1, '2023-07-15 20:40:00', 1, '2023-07-15 20:40:00', NULL); -INSERT INTO `gen_table` VALUES (1680196323521077249, 'sys_file_detail', '鏂囦欢璁板綍琛�', NULL, NULL, 'SysFileDetail', 'crud', 'org.ruoyi.system', 'system', 'fileDetail', '鏂囦欢璁板綍', 'Lion Li', '0', '/', NULL, 103, 1, '2023-07-15 20:40:00', 1, '2023-07-15 20:40:00', NULL); -INSERT INTO `gen_table` VALUES (1680199147407806465, 'sys_file_info', '鏂囦欢璁板綍琛�', NULL, NULL, 'SysFileInfo', 'crud', 'org.ruoyi.system', 'system', 'fileInfo', '鏂囦欢璁板綍', 'Lion Li', '0', '/', NULL, 103, 1, '2023-07-15 20:53:56', 1, '2023-07-15 20:53:56', NULL); -INSERT INTO `gen_table` VALUES (1680481752850145282, 'sd_model_param', '妯″瀷鍙傛暟淇℃伅琛�', NULL, NULL, 'SdModelParam', 'crud', 'org.ruoyi.system', 'system', 'modelParam', '妯″瀷鍙傛暟淇℃伅', 'Lion Li', '0', '/', NULL, 103, 1, '2023-07-16 15:18:34', 1, '2023-07-16 15:18:34', NULL); -INSERT INTO `gen_table` VALUES (1740573614897897473, 'payment_orders', '鏀粯璁㈠崟琛�', NULL, NULL, 'PaymentOrders', 'crud', 'org.ruoyi.system', 'system', 'orders', '鏀粯璁㈠崟', 'Lion Li', '0', '/', NULL, 103, 1, '2023-12-27 23:04:45', 1, '2023-12-27 23:04:45', NULL); -INSERT INTO `gen_table` VALUES (1775895242171076610, 'sys_model', '绯荤粺妯″瀷', NULL, NULL, 'SysModel', 'crud', 'org.ruoyi.system', 'system', 'model', '绯荤粺妯″瀷', 'Lion Li', '0', '/', NULL, 103, 1, '2024-04-04 22:27:08', 1, '2024-04-04 22:27:08', NULL); -INSERT INTO `gen_table` VALUES (1785390411861803009, 'wx_rob_config', '寰俊鏈哄櫒浜虹鐞�', NULL, NULL, 'WxRobConfig', 'crud', 'org.ruoyi.system', 'system', 'robConfig', 'robot', 'Lion Li', '0', '/', '{\"treeCode\":null,\"treeName\":null,\"treeParentCode\":null,\"parentMenuId\":null}', 103, 1, '2024-05-01 01:10:04', 1, '2024-05-03 21:00:51', NULL); -INSERT INTO `gen_table` VALUES (1785390413745045505, 'wx_rob_keyword', '', NULL, NULL, 'WxRobKeyword', 'crud', 'org.ruoyi.system', 'system', 'robKeyword', '', 'Lion Li', '0', '/', NULL, 103, 1, '2024-04-30 23:51:44', 1, '2024-04-30 23:51:44', NULL); -INSERT INTO `gen_table` VALUES (1785390414860730369, 'wx_rob_relation', '', NULL, NULL, 'WxRobRelation', 'crud', 'org.ruoyi.system', 'system', 'robRelation', '', 'Lion Li', '0', '/', NULL, 103, 1, '2024-04-30 23:51:44', 1, '2024-04-30 23:51:44', NULL); -INSERT INTO `gen_table` VALUES (1786379560181882881, 'chat_voucher', '鐢ㄦ埛鍏戞崲璁板綍', NULL, NULL, 'ChatVoucher', 'crud', 'org.ruoyi.system', 'system', 'voucher', '鐢ㄦ埛鍏戞崲璁板綍', 'Lion Li', '0', '/', NULL, 103, 1, '2024-05-03 20:57:18', 1, '2024-05-03 20:57:18', NULL); -INSERT INTO `gen_table` VALUES (1789155611035381761, 'sys_notice_state', '鐢ㄦ埛闃呰鐘舵�佽〃', NULL, NULL, 'SysNoticeState', 'crud', 'org.ruoyi.system', 'system', 'noticeState', '鐢ㄦ埛闃呰鐘舵��', 'Lion Li', '0', '/', NULL, 103, 1, '2024-05-11 12:48:14', 1, '2024-05-11 12:48:14', NULL); - --- ---------------------------- --- Table structure for gen_table_column --- ---------------------------- -DROP TABLE IF EXISTS `gen_table_column`; -CREATE TABLE `gen_table_column` ( - `column_id` bigint(20) NOT NULL COMMENT '缂栧彿', - `table_id` bigint(20) NULL DEFAULT NULL COMMENT '褰掑睘琛ㄧ紪鍙�', - `column_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鍒楀悕绉�', - `column_comment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鍒楁弿杩�', - `column_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鍒楃被鍨�', - `java_type` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'JAVA绫诲瀷', - `java_field` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'JAVA瀛楁鍚�', - `is_pk` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄惁涓婚敭锛�1鏄級', - `is_increment` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄惁鑷锛�1鏄級', - `is_required` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄惁蹇呭~锛�1鏄級', - `is_insert` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄惁涓烘彃鍏ュ瓧娈碉紙1鏄級', - `is_edit` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄惁缂栬緫瀛楁锛�1鏄級', - `is_list` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄惁鍒楄〃瀛楁锛�1鏄級', - `is_query` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄惁鏌ヨ瀛楁锛�1鏄級', - `query_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'EQ' COMMENT '鏌ヨ鏂瑰紡锛堢瓑浜庛�佷笉绛変簬銆佸ぇ浜庛�佸皬浜庛�佽寖鍥达級', - `html_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄剧ず绫诲瀷锛堟枃鏈銆佹枃鏈煙銆佷笅鎷夋銆佸閫夋銆佸崟閫夋銆佹棩鏈熸帶浠讹級', - `dict_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '瀛楀吀绫诲瀷', - `sort` int(11) NULL DEFAULT NULL COMMENT '鎺掑簭', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - PRIMARY KEY (`column_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '浠g爜鐢熸垚涓氬姟琛ㄥ瓧娈�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of gen_table_column --- ---------------------------- -INSERT INTO `gen_table_column` VALUES (1661288223078666241, 1661288222902505474, 'notice_id', '鍏憡ID', 'bigint(20)', 'Long', 'noticeId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223108026369, 1661288222902505474, 'tenant_id', '绉熸埛缂栧彿', 'varchar(20)', 'String', 'tenantId', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223108026370, 1661288222902505474, 'notice_title', '鍏憡鏍囬', 'varchar(50)', 'String', 'noticeTitle', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223108026371, 1661288222902505474, 'notice_type', '鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛�', 'char(1)', 'String', 'noticeType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 4, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223108026372, 1661288222902505474, 'notice_content', '鍏憡鍐呭', 'longblob', 'String', 'noticeContent', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'editor', '', 5, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223120609282, 1661288222902505474, 'status', '鍏憡鐘舵�侊紙0姝e父 1鍏抽棴锛�', 'char(1)', 'String', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 6, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223120609283, 1661288222902505474, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 7, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223120609284, 1661288222902505474, 'create_by', '鍒涘缓鑰�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 8, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223120609285, 1661288222902505474, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 9, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223120609286, 1661288222902505474, 'update_by', '鏇存柊鑰�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 10, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223120609287, 1661288222902505474, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 11, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223120609288, 1661288222902505474, 'remark', '澶囨敞', 'varchar(255)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'input', '', 12, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223363878913, 1661288223338713089, 'oper_id', '鏃ュ織涓婚敭', 'bigint(20)', 'Long', 'operId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223363878914, 1661288223338713089, 'tenant_id', '绉熸埛缂栧彿', 'varchar(20)', 'String', 'tenantId', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223363878915, 1661288223338713089, 'title', '妯″潡鏍囬', 'varchar(50)', 'String', 'title', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223363878916, 1661288223338713089, 'business_type', '涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�', 'int(2)', 'Integer', 'businessType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 4, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223401627649, 1661288223338713089, 'method', '鏂规硶鍚嶇О', 'varchar(100)', 'String', 'method', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223401627650, 1661288223338713089, 'request_method', '璇锋眰鏂瑰紡', 'varchar(10)', 'String', 'requestMethod', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223401627651, 1661288223338713089, 'operator_type', '鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級', 'int(1)', 'Integer', 'operatorType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 7, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223401627652, 1661288223338713089, 'oper_name', '鎿嶄綔浜哄憳', 'varchar(50)', 'String', 'operName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 8, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223401627653, 1661288223338713089, 'dept_name', '閮ㄩ棬鍚嶇О', 'varchar(50)', 'String', 'deptName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 9, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223401627654, 1661288223338713089, 'oper_url', '璇锋眰URL', 'varchar(255)', 'String', 'operUrl', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 10, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223401627655, 1661288223338713089, 'oper_ip', '涓绘満鍦板潃', 'varchar(128)', 'String', 'operIp', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 11, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223401627656, 1661288223338713089, 'oper_location', '鎿嶄綔鍦扮偣', 'varchar(255)', 'String', 'operLocation', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 12, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223401627657, 1661288223338713089, 'oper_param', '璇锋眰鍙傛暟', 'varchar(2000)', 'String', 'operParam', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 13, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223401627658, 1661288223338713089, 'json_result', '杩斿洖鍙傛暟', 'varchar(2000)', 'String', 'jsonResult', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 14, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223401627659, 1661288223338713089, 'status', '鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛�', 'int(1)', 'Integer', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 15, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223401627660, 1661288223338713089, 'error_msg', '閿欒娑堟伅', 'varchar(2000)', 'String', 'errorMsg', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 16, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223401627661, 1661288223338713089, 'oper_time', '鎿嶄綔鏃堕棿', 'datetime', 'Date', 'operTime', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'datetime', '', 17, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223401627662, 1661288223338713089, 'cost_time', '娑堣�楁椂闂�', 'bigint(20)', 'Long', 'costTime', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 18, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223502290946, 1661288223477125122, 'oss_id', '瀵硅薄瀛樺偍涓婚敭', 'bigint(20)', 'Long', 'ossId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223502290947, 1661288223477125122, 'tenant_id', '绉熸埛缂栧彿', 'varchar(20)', 'String', 'tenantId', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223502290948, 1661288223477125122, 'file_name', '鏂囦欢鍚�', 'varchar(255)', 'String', 'fileName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223502290949, 1661288223477125122, 'original_name', '鍘熷悕', 'varchar(255)', 'String', 'originalName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223502290950, 1661288223477125122, 'file_suffix', '鏂囦欢鍚庣紑鍚�', 'varchar(10)', 'String', 'fileSuffix', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223502290951, 1661288223477125122, 'url', 'URL鍦板潃', 'varchar(500)', 'String', 'url', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 6, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223502290952, 1661288223477125122, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 7, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223502290953, 1661288223477125122, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 8, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223502290954, 1661288223477125122, 'create_by', '涓婁紶浜�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 9, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223502290955, 1661288223477125122, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 10, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223502290956, 1661288223477125122, 'update_by', '鏇存柊浜�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 11, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223502290957, 1661288223477125122, 'service', '鏈嶅姟鍟�', 'varchar(20)', 'String', 'service', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 12, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223611342850, 1661288223586177025, 'oss_config_id', '涓诲缓', 'bigint(20)', 'Long', 'ossConfigId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223611342851, 1661288223586177025, 'tenant_id', '绉熸埛缂栧彿', 'varchar(20)', 'String', 'tenantId', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223611342852, 1661288223586177025, 'config_key', '閰嶇疆key', 'varchar(20)', 'String', 'configKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223611342853, 1661288223586177025, 'access_key', 'accessKey', 'varchar(255)', 'String', 'accessKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223611342854, 1661288223586177025, 'secret_key', '绉橀挜', 'varchar(255)', 'String', 'secretKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223611342855, 1661288223586177025, 'bucket_name', '妗跺悕绉�', 'varchar(255)', 'String', 'bucketName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 6, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223611342856, 1661288223586177025, 'prefix', '鍓嶇紑', 'varchar(255)', 'String', 'prefix', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223611342857, 1661288223586177025, 'endpoint', '璁块棶绔欑偣', 'varchar(255)', 'String', 'endpoint', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 8, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223611342858, 1661288223586177025, 'domain', '鑷畾涔夊煙鍚�', 'varchar(255)', 'String', 'domain', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 9, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223611342859, 1661288223586177025, 'is_https', '鏄惁https锛圷=鏄�,N=鍚︼級', 'char(1)', 'String', 'isHttps', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 10, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223611342860, 1661288223586177025, 'region', '鍩�', 'varchar(255)', 'String', 'region', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 11, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223653285889, 1661288223586177025, 'access_policy', '妗舵潈闄愮被鍨�(0=private 1=public 2=custom)', 'char(1)', 'String', 'accessPolicy', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 12, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223653285890, 1661288223586177025, 'status', '鏄惁榛樿锛�0=鏄�,1=鍚︼級', 'char(1)', 'String', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 13, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223653285891, 1661288223586177025, 'ext1', '鎵╁睍瀛楁', 'varchar(255)', 'String', 'ext1', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 14, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223653285892, 1661288223586177025, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 15, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223653285893, 1661288223586177025, 'create_by', '鍒涘缓鑰�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 16, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223653285894, 1661288223586177025, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 17, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223653285895, 1661288223586177025, 'update_by', '鏇存柊鑰�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 18, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223653285896, 1661288223586177025, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 19, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223653285897, 1661288223586177025, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 20, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223749754881, 1661288223728783361, 'post_id', '宀椾綅ID', 'bigint(20)', 'Long', 'postId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223749754882, 1661288223728783361, 'tenant_id', '绉熸埛缂栧彿', 'varchar(20)', 'String', 'tenantId', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223749754883, 1661288223728783361, 'post_code', '宀椾綅缂栫爜', 'varchar(64)', 'String', 'postCode', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223749754884, 1661288223728783361, 'post_name', '宀椾綅鍚嶇О', 'varchar(50)', 'String', 'postName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223749754885, 1661288223728783361, 'post_sort', '鏄剧ず椤哄簭', 'int(4)', 'Integer', 'postSort', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223749754886, 1661288223728783361, 'status', '鐘舵�侊紙0姝e父 1鍋滅敤锛�', 'char(1)', 'String', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 6, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223749754887, 1661288223728783361, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 7, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223749754888, 1661288223728783361, 'create_by', '鍒涘缓鑰�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 8, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223749754889, 1661288223728783361, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 9, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223749754890, 1661288223728783361, 'update_by', '鏇存柊鑰�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 10, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223749754891, 1661288223728783361, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 11, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223749754892, 1661288223728783361, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 12, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223846223874, 1661288223821058050, 'role_id', '瑙掕壊ID', 'bigint(20)', 'Long', 'roleId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223846223875, 1661288223821058050, 'tenant_id', '绉熸埛缂栧彿', 'varchar(20)', 'String', 'tenantId', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223846223876, 1661288223821058050, 'role_name', '瑙掕壊鍚嶇О', 'varchar(30)', 'String', 'roleName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223846223877, 1661288223821058050, 'role_key', '瑙掕壊鏉冮檺瀛楃涓�', 'varchar(100)', 'String', 'roleKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223846223878, 1661288223821058050, 'role_sort', '鏄剧ず椤哄簭', 'int(4)', 'Integer', 'roleSort', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223846223879, 1661288223821058050, 'data_scope', '鏁版嵁鑼冨洿锛�1锛氬叏閮ㄦ暟鎹潈闄� 2锛氳嚜瀹氭暟鎹潈闄� 3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺 4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶級', 'char(1)', 'String', 'dataScope', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223846223880, 1661288223821058050, 'menu_check_strictly', '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�', 'tinyint(1)', 'Integer', 'menuCheckStrictly', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223846223881, 1661288223821058050, 'dept_check_strictly', '閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�', 'tinyint(1)', 'Integer', 'deptCheckStrictly', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 8, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223846223882, 1661288223821058050, 'status', '瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛�', 'char(1)', 'String', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 9, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223846223883, 1661288223821058050, 'del_flag', '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', 'char(1)', 'String', 'delFlag', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 10, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223846223884, 1661288223821058050, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 11, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223846223885, 1661288223821058050, 'create_by', '鍒涘缓鑰�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 12, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223846223886, 1661288223821058050, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 13, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223846223887, 1661288223821058050, 'update_by', '鏇存柊鑰�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 14, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223846223888, 1661288223821058050, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 15, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223846223889, 1661288223821058050, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 16, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223951081474, 1661288223925915650, 'user_id', '鐢ㄦ埛ID', 'bigint(20)', 'Long', 'userId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223951081475, 1661288223925915650, 'post_id', '宀椾綅ID', 'bigint(20)', 'Long', 'postId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:12', 1, '2023-05-24 16:29:12'); -INSERT INTO `gen_table_column` VALUES (1661288223993024514, 1661288223967858689, 'user_id', '鐢ㄦ埛ID', 'bigint(20)', 'Long', 'userId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:13', 1, '2023-05-24 16:29:13'); -INSERT INTO `gen_table_column` VALUES (1661288223993024515, 1661288223967858689, 'role_id', '瑙掕壊ID', 'bigint(20)', 'Long', 'roleId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:13', 1, '2023-05-24 16:29:13'); -INSERT INTO `gen_table_column` VALUES (1661288385121406978, 1661288385096241154, 'config_id', '鍙傛暟涓婚敭', 'bigint(20)', 'Long', 'configId', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); -INSERT INTO `gen_table_column` VALUES (1661288385121406979, 1661288385096241154, 'tenant_id', '绉熸埛缂栧彿', 'varchar(20)', 'String', 'tenantId', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 2, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); -INSERT INTO `gen_table_column` VALUES (1661288385121406980, 1661288385096241154, 'config_name', '鍙傛暟鍚嶇О', 'varchar(100)', 'String', 'configName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); -INSERT INTO `gen_table_column` VALUES (1661288385121406981, 1661288385096241154, 'config_key', '鍙傛暟閿悕', 'varchar(100)', 'String', 'configKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); -INSERT INTO `gen_table_column` VALUES (1661288385121406982, 1661288385096241154, 'config_value', '鍙傛暟閿��', 'varchar(500)', 'String', 'configValue', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 5, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); -INSERT INTO `gen_table_column` VALUES (1661288385121406983, 1661288385096241154, 'config_type', '绯荤粺鍐呯疆锛圷鏄� N鍚︼級', 'char(1)', 'String', 'configType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 6, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); -INSERT INTO `gen_table_column` VALUES (1661288385121406984, 1661288385096241154, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 7, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); -INSERT INTO `gen_table_column` VALUES (1661288385142378498, 1661288385096241154, 'create_by', '鍒涘缓鑰�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 8, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); -INSERT INTO `gen_table_column` VALUES (1661288385142378499, 1661288385096241154, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 9, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); -INSERT INTO `gen_table_column` VALUES (1661288385142378500, 1661288385096241154, 'update_by', '鏇存柊鑰�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 10, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); -INSERT INTO `gen_table_column` VALUES (1661288385142378501, 1661288385096241154, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 11, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); -INSERT INTO `gen_table_column` VALUES (1661288385142378502, 1661288385096241154, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 12, 103, 1, '2023-05-24 16:29:51', 1, '2023-05-24 16:29:51'); -INSERT INTO `gen_table_column` VALUES (1680196323806289921, 1680196323521077249, 'id', '鏂囦欢id', 'bigint(20) unsigned', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323806289922, 1680196323521077249, 'url', '鏂囦欢璁块棶鍦板潃', 'varchar(512)', 'String', 'url', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 2, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323835650050, 1680196323445579778, 'id', '鏂囦欢id', 'bigint(20) unsigned', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323835650051, 1680196323445579778, 'url', '鏂囦欢璁块棶鍦板潃', 'varchar(512)', 'String', 'url', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 2, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323835650052, 1680196323445579778, 'size', '鏂囦欢澶у皬锛屽崟浣嶅瓧鑺�', 'bigint(20)', 'Long', 'size', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323873398785, 1680196323445579778, 'filename', '鏂囦欢鍚嶇О', 'varchar(256)', 'String', 'filename', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323873398786, 1680196323445579778, 'original_filename', '鍘熷鏂囦欢鍚�', 'varchar(256)', 'String', 'originalFilename', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 5, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323873398787, 1680196323445579778, 'base_path', '鍩虹瀛樺偍璺緞', 'varchar(256)', 'String', 'basePath', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323873398788, 1680196323445579778, 'path', '瀛樺偍璺緞', 'varchar(256)', 'String', 'path', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323873398789, 1680196323445579778, 'ext', '鏂囦欢鎵╁睍鍚�', 'varchar(32)', 'String', 'ext', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 8, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323873398790, 1680196323445579778, 'object_id', '鏂囦欢鎵�灞炲璞d', 'varchar(32)', 'String', 'objectId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 9, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323873398791, 1680196323445579778, 'file_type', '鏂囦欢绫诲瀷', 'varchar(32)', 'String', 'fileType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 10, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323932119041, 1680196323445579778, 'attr', '闄勫姞灞炴��', 'text', 'String', 'attr', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 11, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323932119042, 1680196323445579778, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 12, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323940507649, 1680196323445579778, 'create_by', '鍒涘缓鑰�', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 13, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323940507650, 1680196323445579778, 'update_by', '鏇存柊鑰�', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 14, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323940507651, 1680196323445579778, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 15, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323940507652, 1680196323445579778, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 16, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323940507653, 1680196323445579778, 'version', '鐗堟湰', 'int(11)', 'Long', 'version', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 17, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323940507654, 1680196323445579778, 'del_flag', '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 1浠h〃鍒犻櫎锛�', 'char(1)', 'String', 'delFlag', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 18, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323961479170, 1680196323521077249, 'size', '鏂囦欢澶у皬锛屽崟浣嶅瓧鑺�', 'bigint(20)', 'Long', 'size', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323961479171, 1680196323521077249, 'filename', '鏂囦欢鍚嶇О', 'varchar(256)', 'String', 'filename', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323961479172, 1680196323521077249, 'original_filename', '鍘熷鏂囦欢鍚�', 'varchar(256)', 'String', 'originalFilename', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 5, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323961479173, 1680196323521077249, 'base_path', '鍩虹瀛樺偍璺緞', 'varchar(256)', 'String', 'basePath', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323961479174, 1680196323521077249, 'path', '瀛樺偍璺緞', 'varchar(256)', 'String', 'path', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323961479175, 1680196323521077249, 'ext', '鏂囦欢鎵╁睍鍚�', 'varchar(32)', 'String', 'ext', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 8, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323961479176, 1680196323521077249, 'object_id', '鏂囦欢鎵�灞炲璞d', 'varchar(32)', 'String', 'objectId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 9, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323961479177, 1680196323521077249, 'file_type', '鏂囦欢绫诲瀷', 'varchar(32)', 'String', 'fileType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 10, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323961479178, 1680196323521077249, 'attr', '闄勫姞灞炴��', 'text', 'String', 'attr', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 11, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323999227905, 1680196323445579778, 'update_ip', '鏇存柊IP', 'varchar(128)', 'String', 'updateIp', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 19, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196323999227906, 1680196323445579778, 'tenant_id', '绉熸埛Id', 'bigint(20)', 'Long', 'tenantId', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'input', '', 20, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196324020199425, 1680196323521077249, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 12, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196324020199426, 1680196323521077249, 'create_by', '鍒涘缓鑰�', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 13, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196324020199427, 1680196323521077249, 'update_by', '鏇存柊鑰�', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 14, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196324020199428, 1680196323521077249, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 15, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196324020199429, 1680196323521077249, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 16, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196324020199430, 1680196323521077249, 'version', '鐗堟湰', 'int(11)', 'Long', 'version', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 17, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196324020199431, 1680196323521077249, 'del_flag', '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 1浠h〃鍒犻櫎锛�', 'char(1)', 'String', 'delFlag', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 18, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196324020199432, 1680196323521077249, 'update_ip', '鏇存柊IP', 'varchar(128)', 'String', 'updateIp', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 19, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680196324020199433, 1680196323521077249, 'tenant_id', '绉熸埛Id', 'bigint(20)', 'Long', 'tenantId', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'input', '', 20, 103, 1, '2023-07-15 20:43:15', 1, '2023-07-15 20:43:15'); -INSERT INTO `gen_table_column` VALUES (1680199147667853313, 1680199147407806465, 'id', '鏂囦欢id', 'bigint(20) unsigned', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147667853314, 1680199147407806465, 'url', '鏂囦欢璁块棶鍦板潃', 'varchar(512)', 'String', 'url', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 2, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147667853315, 1680199147407806465, 'size', '鏂囦欢澶у皬锛屽崟浣嶅瓧鑺�', 'bigint(20)', 'Long', 'size', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147667853316, 1680199147407806465, 'filename', '鏂囦欢鍚嶇О', 'varchar(256)', 'String', 'filename', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147667853317, 1680199147407806465, 'original_filename', '鍘熷鏂囦欢鍚�', 'varchar(256)', 'String', 'originalFilename', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 5, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147667853318, 1680199147407806465, 'base_path', '鍩虹瀛樺偍璺緞', 'varchar(256)', 'String', 'basePath', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147734962178, 1680199147407806465, 'path', '瀛樺偍璺緞', 'varchar(256)', 'String', 'path', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147734962179, 1680199147407806465, 'ext', '鏂囦欢鎵╁睍鍚�', 'varchar(32)', 'String', 'ext', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 8, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147734962180, 1680199147407806465, 'object_id', '鏂囦欢鎵�灞炲璞d', 'varchar(32)', 'String', 'objectId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 9, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147734962181, 1680199147407806465, 'file_type', '鏂囦欢绫诲瀷', 'varchar(32)', 'String', 'fileType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 10, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147734962182, 1680199147407806465, 'attr', '闄勫姞灞炴��', 'text', 'String', 'attr', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 11, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147734962183, 1680199147407806465, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 12, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147734962184, 1680199147407806465, 'create_by', '鍒涘缓鑰�', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 13, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147734962185, 1680199147407806465, 'update_by', '鏇存柊鑰�', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 14, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147734962186, 1680199147407806465, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 15, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147734962187, 1680199147407806465, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 16, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147734962188, 1680199147407806465, 'version', '鐗堟湰', 'int(11)', 'Long', 'version', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 17, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147734962189, 1680199147407806465, 'del_flag', '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 1浠h〃鍒犻櫎锛�', 'char(1)', 'String', 'delFlag', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 18, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147734962190, 1680199147407806465, 'update_ip', '鏇存柊IP', 'varchar(128)', 'String', 'updateIp', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 19, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680199147734962191, 1680199147407806465, 'tenant_id', '绉熸埛Id', 'bigint(20)', 'Long', 'tenantId', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'input', '', 20, 103, 1, '2023-07-15 20:54:28', 1, '2023-07-15 20:54:28'); -INSERT INTO `gen_table_column` VALUES (1680481753240215553, 1680481752850145282, 'id', 'id', 'bigint(20) unsigned', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215554, 1680481752850145282, 'prompt', '鎻忚堪璇�', 'text', 'String', 'prompt', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 2, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215555, 1680481752850145282, 'negative_prompt', '璐熼潰璇�', 'text', 'String', 'negativePrompt', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 3, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215556, 1680481752850145282, 'model_name', '妯″瀷鍚嶇О', 'varchar(256)', 'String', 'modelName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215557, 1680481752850145282, 'steps', '杩唬姝ユ暟', 'int(10)', 'Integer', 'steps', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215558, 1680481752850145282, 'seed', '绉嶅瓙', 'varchar(256)', 'String', 'seed', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215559, 1680481752850145282, 'width', '鍥剧墖瀹藉害', 'varchar(256)', 'String', 'width', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215560, 1680481752850145282, 'height', '鍥剧墖楂樺害', 'varchar(32)', 'String', 'height', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 8, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215561, 1680481752850145282, 'sampler_name', '閲囨牱鏂规硶', 'varchar(32)', 'String', 'samplerName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 9, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215562, 1680481752850145282, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 10, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215563, 1680481752850145282, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 11, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215564, 1680481752850145282, 'create_by', '鍒涘缓鑰�', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 12, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215565, 1680481752850145282, 'update_by', '鏇存柊鑰�', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 13, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215566, 1680481752850145282, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 14, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215567, 1680481752850145282, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 15, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215568, 1680481752850145282, 'version', '鐗堟湰', 'int(11)', 'Long', 'version', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 16, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215569, 1680481752850145282, 'del_flag', '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 1浠h〃鍒犻櫎锛�', 'char(1)', 'String', 'delFlag', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 17, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215570, 1680481752850145282, 'update_ip', '鏇存柊IP', 'varchar(128)', 'String', 'updateIp', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 18, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1680481753240215571, 1680481752850145282, 'tenant_id', '绉熸埛Id', 'bigint(20)', 'Long', 'tenantId', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'input', '', 19, 103, 1, '2023-07-16 15:37:26', 1, '2023-07-16 15:37:26'); -INSERT INTO `gen_table_column` VALUES (1740573615225053185, 1740573614897897473, 'id', '涓婚敭', 'int(11)', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); -INSERT INTO `gen_table_column` VALUES (1740573615225053186, 1740573614897897473, 'order_no', '璁㈠崟缂栧彿', 'varchar(20)', 'String', 'orderNo', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); -INSERT INTO `gen_table_column` VALUES (1740573615225053187, 1740573614897897473, 'order_name', '璁㈠崟鍚嶇О', 'varchar(100)', 'String', 'orderName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); -INSERT INTO `gen_table_column` VALUES (1740573615225053188, 1740573614897897473, 'amount', '閲戦', 'decimal(10,2)', 'BigDecimal', 'amount', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); -INSERT INTO `gen_table_column` VALUES (1740573615225053189, 1740573614897897473, 'payment_status', '鏀粯鐘舵��', 'char(1)', 'String', 'paymentStatus', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 5, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); -INSERT INTO `gen_table_column` VALUES (1740573615225053190, 1740573614897897473, 'payment_method', '鏀粯鏂瑰紡', 'char(1)', 'String', 'paymentMethod', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); -INSERT INTO `gen_table_column` VALUES (1740573615225053191, 1740573614897897473, 'user_id', '鐢ㄦ埛ID', 'timestamp', 'Date', 'userId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'datetime', '', 7, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); -INSERT INTO `gen_table_column` VALUES (1740573615225053192, 1740573614897897473, 'create_by', '鍒涘缓鑰�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 8, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); -INSERT INTO `gen_table_column` VALUES (1740573615225053193, 1740573614897897473, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 9, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); -INSERT INTO `gen_table_column` VALUES (1740573615225053194, 1740573614897897473, 'update_by', '鏇存柊鑰�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 10, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); -INSERT INTO `gen_table_column` VALUES (1740573615225053195, 1740573614897897473, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 11, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); -INSERT INTO `gen_table_column` VALUES (1740573615225053196, 1740573614897897473, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 12, 103, 1, '2023-12-29 11:21:03', 1, '2023-12-29 11:21:03'); -INSERT INTO `gen_table_column` VALUES (1775895242624061441, 1775895242171076610, 'id', '涓婚敭', 'bigint(20)', 'Long', 'id', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); -INSERT INTO `gen_table_column` VALUES (1775895242624061442, 1775895242171076610, 'model_name', '妯″瀷鍚嶇О', 'varchar(50)', 'String', 'modelName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 2, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); -INSERT INTO `gen_table_column` VALUES (1775895242624061443, 1775895242171076610, 'model_no', '妯″瀷缂栧彿', 'varchar(255)', 'String', 'modelNo', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); -INSERT INTO `gen_table_column` VALUES (1775895242624061444, 1775895242171076610, 'model_describe', '妯″瀷鎻忚堪', 'varchar(255)', 'String', 'modelDescribe', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); -INSERT INTO `gen_table_column` VALUES (1775895242624061445, 1775895242171076610, 'model_price', '妯″瀷浠锋牸', 'double', 'Long', 'modelPrice', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); -INSERT INTO `gen_table_column` VALUES (1775895242624061446, 1775895242171076610, 'model_type', '璁¤垂绫诲瀷', 'char(1)', 'String', 'modelType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 6, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); -INSERT INTO `gen_table_column` VALUES (1775895242624061447, 1775895242171076610, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 7, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); -INSERT INTO `gen_table_column` VALUES (1775895242624061448, 1775895242171076610, 'create_by', '鍒涘缓鑰�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 8, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); -INSERT INTO `gen_table_column` VALUES (1775895242624061449, 1775895242171076610, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 9, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); -INSERT INTO `gen_table_column` VALUES (1775895242624061450, 1775895242171076610, 'update_by', '鏇存柊鑰�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 10, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); -INSERT INTO `gen_table_column` VALUES (1775895242624061451, 1775895242171076610, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 11, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); -INSERT INTO `gen_table_column` VALUES (1775895242624061452, 1775895242171076610, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 12, 103, 1, '2024-04-04 22:36:35', 1, '2024-04-04 22:36:35'); -INSERT INTO `gen_table_column` VALUES (1785390412381896706, 1785390411861803009, 'id', '涓婚敭', 'int(11) unsigned', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); -INSERT INTO `gen_table_column` VALUES (1785390412381896707, 1785390411861803009, 'user_id', '鐢ㄦ埛id', 'bigint(20)', 'Long', 'userId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); -INSERT INTO `gen_table_column` VALUES (1785390412381896708, 1785390411861803009, 'unique_key', '鏈哄櫒鍞竴鐮�', 'varchar(16)', 'String', 'uniqueKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); -INSERT INTO `gen_table_column` VALUES (1785390412381896709, 1785390411861803009, 'remark', '澶囨敞锛堝井淇″彿锛�', 'varchar(64)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'input', '', 4, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); -INSERT INTO `gen_table_column` VALUES (1785390412444811265, 1785390411861803009, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 5, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); -INSERT INTO `gen_table_column` VALUES (1785390412444811266, 1785390411861803009, 'update_time', '淇敼鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 6, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); -INSERT INTO `gen_table_column` VALUES (1785390412444811267, 1785390411861803009, 'to_friend', '鎸囧畾濂藉弸鍥炲寮�鍏�', 'bit(1)', 'Integer', 'toFriend', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); -INSERT INTO `gen_table_column` VALUES (1785390412444811268, 1785390411861803009, 'to_group', '鎸囧畾缇ゅ洖澶嶅紑鍏�', 'bit(1)', 'Integer', 'toGroup', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 8, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); -INSERT INTO `gen_table_column` VALUES (1785390412444811269, 1785390411861803009, 'default_friend', '榛樿濂藉弸鍥炲寮�鍏�', 'bit(1)', 'Integer', 'defaultFriend', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 9, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); -INSERT INTO `gen_table_column` VALUES (1785390412444811270, 1785390411861803009, 'default_group', '榛樿缇ゅ洖澶嶅紑鍏�', 'bit(1)', 'Integer', 'defaultGroup', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 10, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); -INSERT INTO `gen_table_column` VALUES (1785390412444811271, 1785390411861803009, 'from_out', '瀵瑰鎺ュ彛寮�鍏�', 'bit(1)', 'Integer', 'fromOut', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 11, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); -INSERT INTO `gen_table_column` VALUES (1785390412444811272, 1785390411861803009, 'enable', '鏈哄櫒鍚敤1绂佺敤0', 'bit(1)', 'Integer', 'enable', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 12, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-03 21:00:52'); -INSERT INTO `gen_table_column` VALUES (1785390414135115778, 1785390413745045505, 'id', '', 'int(11) unsigned', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); -INSERT INTO `gen_table_column` VALUES (1785390414135115779, 1785390413745045505, 'unique_key', '鏈哄櫒鍞竴鐮�', 'varchar(16)', 'String', 'uniqueKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); -INSERT INTO `gen_table_column` VALUES (1785390414135115780, 1785390413745045505, 'key_data', '鍏抽敭璇�', 'varchar(64)', 'String', 'keyData', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); -INSERT INTO `gen_table_column` VALUES (1785390414135115781, 1785390413745045505, 'value_data', '鍥炲鍐呭', 'varchar(1024)', 'String', 'valueData', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'textarea', '', 4, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); -INSERT INTO `gen_table_column` VALUES (1785390414135115782, 1785390413745045505, 'type_data', '鍥炲绫诲瀷', 'varchar(64)', 'String', 'typeData', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); -INSERT INTO `gen_table_column` VALUES (1785390414135115783, 1785390413745045505, 'nick_name', '鐩爣鏄电О', 'varchar(64)', 'String', 'nickName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 6, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); -INSERT INTO `gen_table_column` VALUES (1785390414135115784, 1785390413745045505, 'to_group', '缇�1濂藉弸0', 'bit(1)', 'Integer', 'toGroup', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); -INSERT INTO `gen_table_column` VALUES (1785390414135115785, 1785390413745045505, 'enable', '鍚敤1绂佺敤0', 'bit(1)', 'Integer', 'enable', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 8, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); -INSERT INTO `gen_table_column` VALUES (1785390414135115786, 1785390413745045505, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 9, 103, 1, '2024-05-01 03:27:00', 1, '2024-05-01 03:27:00'); -INSERT INTO `gen_table_column` VALUES (1785390415250800642, 1785390414860730369, 'id', '', 'int(11) unsigned', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2024-05-01 03:27:01', 1, '2024-05-01 03:27:01'); -INSERT INTO `gen_table_column` VALUES (1785390415250800643, 1785390414860730369, 'out_key', '澶栨帴鍞竴鐮�', 'varchar(16)', 'String', 'outKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 103, 1, '2024-05-01 03:27:01', 1, '2024-05-01 03:27:01'); -INSERT INTO `gen_table_column` VALUES (1785390415250800644, 1785390414860730369, 'unique_key', '鏈哄櫒鍞竴鐮�', 'varchar(16)', 'String', 'uniqueKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2024-05-01 03:27:01', 1, '2024-05-01 03:27:01'); -INSERT INTO `gen_table_column` VALUES (1785390415250800645, 1785390414860730369, 'nick_name', '鐩爣鏄电О', 'varchar(64)', 'String', 'nickName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 103, 1, '2024-05-01 03:27:01', 1, '2024-05-01 03:27:01'); -INSERT INTO `gen_table_column` VALUES (1785390415250800646, 1785390414860730369, 'to_group', '缇�1濂藉弸0', 'bit(1)', 'Integer', 'toGroup', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 103, 1, '2024-05-01 03:27:01', 1, '2024-05-01 03:27:01'); -INSERT INTO `gen_table_column` VALUES (1785390415250800647, 1785390414860730369, 'enable', '鍚敤1绂佺敤0', 'bit(1)', 'Integer', 'enable', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2024-05-01 03:27:01', 1, '2024-05-01 03:27:01'); -INSERT INTO `gen_table_column` VALUES (1785390415250800648, 1785390414860730369, 'white_list', 'IP鐧藉悕鍗�', 'varchar(255)', 'String', 'whiteList', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2024-05-01 03:27:01', 1, '2024-05-01 03:27:01'); -INSERT INTO `gen_table_column` VALUES (1785390415250800649, 1785390414860730369, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', '1', NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 8, 103, 1, '2024-05-01 03:27:01', 1, '2024-05-01 03:27:01'); -INSERT INTO `gen_table_column` VALUES (1786379560827805698, 1786379560181882881, 'id', '涓婚敭', 'bigint(20)', 'Long', 'id', '1', '1', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); -INSERT INTO `gen_table_column` VALUES (1786379560827805699, 1786379560181882881, 'user_id', '鐢ㄦ埛id', 'bigint(20)', 'Long', 'userId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); -INSERT INTO `gen_table_column` VALUES (1786379560827805700, 1786379560181882881, 'code', '鍏戞崲鐮�', 'varchar(255)', 'String', 'code', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); -INSERT INTO `gen_table_column` VALUES (1786379560827805701, 1786379560181882881, 'amount', '鍏戞崲閲戦', 'double(10,2)', 'BigDecimal', 'amount', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); -INSERT INTO `gen_table_column` VALUES (1786379560827805702, 1786379560181882881, 'status', '鍏戞崲鐘舵��', 'char(1)', 'String', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 5, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); -INSERT INTO `gen_table_column` VALUES (1786379560827805703, 1786379560181882881, 'balance_before', '鍏戞崲鍓嶄綑棰�', 'double(10,2)', 'BigDecimal', 'balanceBefore', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 6, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); -INSERT INTO `gen_table_column` VALUES (1786379560827805704, 1786379560181882881, 'balance_after', '鍏戞崲鍚庝綑棰�', 'double(10,2)', 'BigDecimal', 'balanceAfter', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 7, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); -INSERT INTO `gen_table_column` VALUES (1786379560827805705, 1786379560181882881, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 8, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); -INSERT INTO `gen_table_column` VALUES (1786379560827805706, 1786379560181882881, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 9, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); -INSERT INTO `gen_table_column` VALUES (1786379560827805707, 1786379560181882881, 'create_by', '鍒涘缓鑰�', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 10, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); -INSERT INTO `gen_table_column` VALUES (1786379560827805708, 1786379560181882881, 'update_by', '鏇存柊鑰�', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 11, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); -INSERT INTO `gen_table_column` VALUES (1786379560827805709, 1786379560181882881, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 12, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); -INSERT INTO `gen_table_column` VALUES (1786379560890720257, 1786379560181882881, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 13, 103, 1, '2024-05-03 20:57:31', 1, '2024-05-03 20:57:31'); -INSERT INTO `gen_table_column` VALUES (1789155611425452034, 1789155611035381761, 'id', 'ID', 'bigint(20)', 'Long', 'id', '1', '0', '1', NULL, '1', '1', NULL, 'EQ', 'input', '', 1, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); -INSERT INTO `gen_table_column` VALUES (1789155611425452035, 1789155611035381761, 'user_id', '鐢ㄦ埛ID', 'bigint(20)', 'Long', 'userId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); -INSERT INTO `gen_table_column` VALUES (1789155611425452036, 1789155611035381761, 'notice_id', '鍏憡ID', 'bigint(20)', 'Long', 'noticeId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); -INSERT INTO `gen_table_column` VALUES (1789155611425452037, 1789155611035381761, 'read_status', '闃呰鐘舵�侊紙0鏈 1宸茶锛�', 'char(1)', 'String', 'readStatus', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 4, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); -INSERT INTO `gen_table_column` VALUES (1789155611425452038, 1789155611035381761, 'create_dept', '鍒涘缓閮ㄩ棬', 'bigint(20)', 'Long', 'createDept', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 5, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); -INSERT INTO `gen_table_column` VALUES (1789155611425452039, 1789155611035381761, 'create_by', '鍒涘缓鑰�', 'bigint(20)', 'Long', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 6, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); -INSERT INTO `gen_table_column` VALUES (1789155611425452040, 1789155611035381761, 'create_time', '鍒涘缓鏃堕棿', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 7, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); -INSERT INTO `gen_table_column` VALUES (1789155611425452041, 1789155611035381761, 'update_by', '鏇存柊鑰�', 'bigint(20)', 'Long', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 8, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); -INSERT INTO `gen_table_column` VALUES (1789155611425452042, 1789155611035381761, 'update_time', '鏇存柊鏃堕棿', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 9, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); -INSERT INTO `gen_table_column` VALUES (1789155611425452043, 1789155611035381761, 'remark', '澶囨敞', 'varchar(500)', 'String', 'remark', '0', '0', '1', '1', '1', '1', NULL, 'EQ', 'textarea', '', 10, 103, 1, '2024-05-11 12:48:33', 1, '2024-05-11 12:48:33'); - --- ---------------------------- --- Table structure for knowledge_attach --- ---------------------------- -DROP TABLE IF EXISTS `knowledge_attach`; -CREATE TABLE `knowledge_attach` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `kid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐭ヨ瘑搴揑D', - `doc_id` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鏂囨。ID', - `doc_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鏂囨。鍚嶇О', - `doc_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鏂囨。绫诲瀷', - `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '鏂囨。鍐呭', - `create_time` datetime NULL DEFAULT NULL, - `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `idx_kname`(`kid`, `doc_name`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 74 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐭ヨ瘑搴撻檮浠�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of knowledge_attach --- ---------------------------- - --- ---------------------------- --- Table structure for knowledge_fragment --- ---------------------------- -DROP TABLE IF EXISTS `knowledge_fragment`; -CREATE TABLE `knowledge_fragment` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `kid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐭ヨ瘑搴揑D', - `doc_id` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏂囨。ID', - `fid` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐭ヨ瘑鐗囨ID', - `idx` int(11) NOT NULL COMMENT '鐗囨绱㈠紩涓嬫爣', - `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鏂囨。鍐呭', - `create_time` datetime NULL DEFAULT NULL, - `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 5133 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐭ヨ瘑鐗囨' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of knowledge_fragment --- ---------------------------- - --- ---------------------------- --- Table structure for knowledge_info --- ---------------------------- -DROP TABLE IF EXISTS `knowledge_info`; -CREATE TABLE `knowledge_info` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `kid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐭ヨ瘑搴揑D', - `uid` bigint(20) NOT NULL DEFAULT 0 COMMENT '鐢ㄦ埛ID', - `kname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐭ヨ瘑搴撳悕绉�', - `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鎻忚堪', - `create_time` datetime NULL DEFAULT NULL, - `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `idx_kid`(`kid`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 69 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐭ヨ瘑搴�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of knowledge_info --- ---------------------------- - --- ---------------------------- --- Table structure for knowledge_share --- ---------------------------- -DROP TABLE IF EXISTS `knowledge_share`; -CREATE TABLE `knowledge_share` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `kid` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐭ヨ瘑搴揑D', - `uid` int(11) NOT NULL DEFAULT 0 COMMENT '鐢ㄦ埛ID', - `kname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鐭ヨ瘑搴撳悕绉�', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐭ヨ瘑搴撳垎浜〃' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of knowledge_share --- ---------------------------- - --- ---------------------------- --- Table structure for sys_audio_role --- ---------------------------- -DROP TABLE IF EXISTS `sys_audio_role`; -CREATE TABLE `sys_audio_role` ( - `id` bigint(20) NOT NULL COMMENT 'id', - `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '瑙掕壊鍚嶇О', - `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '瑙掕壊鎻忚堪', - `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶村儚', - `voice_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '瑙掕壊id', - `file_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '闊抽鍦板潃', - `create_dept` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `voice_id`(`create_by`, `voice_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '閰嶉煶瑙掕壊' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_audio_role --- ---------------------------- - --- ---------------------------- --- Table structure for sys_config --- ---------------------------- -DROP TABLE IF EXISTS `sys_config`; -CREATE TABLE `sys_config` ( - `config_id` bigint(20) NOT NULL COMMENT '鍙傛暟涓婚敭', - `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', - `config_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鍙傛暟鍚嶇О', - `config_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鍙傛暟閿悕', - `config_value` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鍙傛暟閿��', - `config_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'N' COMMENT '绯荤粺鍐呯疆锛圷鏄� N鍚︼級', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - PRIMARY KEY (`config_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鍙傛暟閰嶇疆琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_config --- ---------------------------- -INSERT INTO `sys_config` VALUES (1, '000000', '涓绘鏋堕〉-榛樿鐨偆鏍峰紡鍚嶇О', 'sys.index.skinName', 'skin-blue', 'Y', 103, 1, '2023-05-14 15:19:42', NULL, NULL, '钃濊壊 skin-blue銆佺豢鑹� skin-green銆佺传鑹� skin-purple銆佺孩鑹� skin-red銆侀粍鑹� skin-yellow'); -INSERT INTO `sys_config` VALUES (2, '000000', '鐢ㄦ埛绠$悊-璐﹀彿鍒濆瀵嗙爜', 'sys.user.initPassword', '123456', 'Y', 103, 1, '2023-05-14 15:19:42', NULL, NULL, '鍒濆鍖栧瘑鐮� 123456'); -INSERT INTO `sys_config` VALUES (3, '000000', '涓绘鏋堕〉-渚ц竟鏍忎富棰�', 'sys.index.sideTheme', 'theme-dark', 'Y', 103, 1, '2023-05-14 15:19:42', NULL, NULL, '娣辫壊涓婚theme-dark锛屾祬鑹蹭富棰榯heme-light'); -INSERT INTO `sys_config` VALUES (5, '000000', '璐﹀彿鑷姪-鏄惁寮�鍚敤鎴锋敞鍐屽姛鑳�', 'sys.account.registerUser', 'false', 'Y', 103, 1, '2023-05-14 15:19:42', NULL, NULL, '鏄惁寮�鍚敞鍐岀敤鎴峰姛鑳斤紙true寮�鍚紝false鍏抽棴锛�'); -INSERT INTO `sys_config` VALUES (11, '000000', 'OSS棰勮鍒楄〃璧勬簮寮�鍏�', 'sys.oss.previewListResource', 'true', 'Y', 103, 1, '2023-05-14 15:19:42', NULL, NULL, 'true:寮�鍚�, false:鍏抽棴'); - --- ---------------------------- --- Table structure for sys_dept --- ---------------------------- -DROP TABLE IF EXISTS `sys_dept`; -CREATE TABLE `sys_dept` ( - `dept_id` bigint(20) NOT NULL COMMENT '閮ㄩ棬id', - `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', - `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '鐖堕儴闂╥d', - `ancestors` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '绁栫骇鍒楄〃', - `dept_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '閮ㄩ棬鍚嶇О', - `order_num` int(4) NULL DEFAULT 0 COMMENT '鏄剧ず椤哄簭', - `leader` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '璐熻矗浜�', - `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鑱旂郴鐢佃瘽', - `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '閭', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '閮ㄩ棬鐘舵�侊紙0姝e父 1鍋滅敤锛�', - `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - PRIMARY KEY (`dept_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '閮ㄩ棬琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_dept --- ---------------------------- -INSERT INTO `sys_dept` VALUES (100, '000000', 0, '0', '鐔婄尗绉戞妧', 0, 'ageerle', '15888888888', 'ageerle@163.com', '0', '0', 103, 1, '2023-05-14 15:19:39', 1, '2023-12-29 11:18:24'); -INSERT INTO `sys_dept` VALUES (101, '000000', 100, '0,100', '娣卞湷鎬诲叕鍙�', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); -INSERT INTO `sys_dept` VALUES (102, '000000', 100, '0,100', '闀挎矙鍒嗗叕鍙�', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); -INSERT INTO `sys_dept` VALUES (103, '000000', 101, '0,100,101', '鐮斿彂閮ㄩ棬', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); -INSERT INTO `sys_dept` VALUES (104, '000000', 101, '0,100,101', '甯傚満閮ㄩ棬', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); -INSERT INTO `sys_dept` VALUES (105, '000000', 101, '0,100,101', '娴嬭瘯閮ㄩ棬', 3, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); -INSERT INTO `sys_dept` VALUES (106, '000000', 101, '0,100,101', '璐㈠姟閮ㄩ棬', 4, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); -INSERT INTO `sys_dept` VALUES (107, '000000', 101, '0,100,101', '杩愮淮閮ㄩ棬', 5, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); -INSERT INTO `sys_dept` VALUES (108, '000000', 102, '0,100,102', '甯傚満閮ㄩ棬', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); -INSERT INTO `sys_dept` VALUES (109, '000000', 102, '0,100,102', '璐㈠姟閮ㄩ棬', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); -INSERT INTO `sys_dept` VALUES (1729685491964084226, '911866', 0, '0', '5126', 0, 'admin', NULL, NULL, '0', '2', 103, 1, '2023-11-29 10:15:32', 1, '2023-11-29 10:15:32'); - --- ---------------------------- --- Table structure for sys_dict_data --- ---------------------------- -DROP TABLE IF EXISTS `sys_dict_data`; -CREATE TABLE `sys_dict_data` ( - `dict_code` bigint(20) NOT NULL COMMENT '瀛楀吀缂栫爜', - `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', - `dict_sort` int(4) NULL DEFAULT 0 COMMENT '瀛楀吀鎺掑簭', - `dict_label` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '瀛楀吀鏍囩', - `dict_value` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '瀛楀吀閿��', - `dict_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '瀛楀吀绫诲瀷', - `css_class` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏍峰紡灞炴�э紙鍏朵粬鏍峰紡鎵╁睍锛�', - `list_class` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '琛ㄦ牸鍥炴樉鏍峰紡', - `is_default` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'N' COMMENT '鏄惁榛樿锛圷鏄� N鍚︼級', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鐘舵�侊紙0姝e父 1鍋滅敤锛�', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - PRIMARY KEY (`dict_code`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '瀛楀吀鏁版嵁琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_dict_data --- ---------------------------- -INSERT INTO `sys_dict_data` VALUES (1, '000000', 1, '鐢�', '0', 'sys_user_sex', '', '', 'Y', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鎬у埆鐢�'); -INSERT INTO `sys_dict_data` VALUES (2, '000000', 2, '濂�', '1', 'sys_user_sex', '', '', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鎬у埆濂�'); -INSERT INTO `sys_dict_data` VALUES (3, '000000', 3, '鏈煡', '2', 'sys_user_sex', '', '', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鎬у埆鏈煡'); -INSERT INTO `sys_dict_data` VALUES (4, '000000', 1, '鏄剧ず', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鏄剧ず鑿滃崟'); -INSERT INTO `sys_dict_data` VALUES (5, '000000', 2, '闅愯棌', '1', 'sys_show_hide', '', 'danger', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '闅愯棌鑿滃崟'); -INSERT INTO `sys_dict_data` VALUES (6, '000000', 1, '姝e父', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '姝e父鐘舵��'); -INSERT INTO `sys_dict_data` VALUES (7, '000000', 2, '鍋滅敤', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鍋滅敤鐘舵��'); -INSERT INTO `sys_dict_data` VALUES (12, '000000', 1, '鏄�', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '绯荤粺榛樿鏄�'); -INSERT INTO `sys_dict_data` VALUES (13, '000000', 2, '鍚�', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '绯荤粺榛樿鍚�'); -INSERT INTO `sys_dict_data` VALUES (14, '000000', 1, '閫氱煡', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '閫氱煡'); -INSERT INTO `sys_dict_data` VALUES (15, '000000', 2, '鍏憡', '2', 'sys_notice_type', '', 'success', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鍏憡'); -INSERT INTO `sys_dict_data` VALUES (16, '000000', 1, '姝e父', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '姝e父鐘舵��'); -INSERT INTO `sys_dict_data` VALUES (17, '000000', 2, '鍏抽棴', '1', 'sys_notice_status', '', 'danger', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鍏抽棴鐘舵��'); -INSERT INTO `sys_dict_data` VALUES (18, '000000', 1, '鏂板', '1', 'sys_oper_type', '', 'info', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鏂板鎿嶄綔'); -INSERT INTO `sys_dict_data` VALUES (19, '000000', 2, '淇敼', '2', 'sys_oper_type', '', 'info', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '淇敼鎿嶄綔'); -INSERT INTO `sys_dict_data` VALUES (20, '000000', 3, '鍒犻櫎', '3', 'sys_oper_type', '', 'danger', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鍒犻櫎鎿嶄綔'); -INSERT INTO `sys_dict_data` VALUES (21, '000000', 4, '鎺堟潈', '4', 'sys_oper_type', '', 'primary', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鎺堟潈鎿嶄綔'); -INSERT INTO `sys_dict_data` VALUES (22, '000000', 5, '瀵煎嚭', '5', 'sys_oper_type', '', 'warning', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '瀵煎嚭鎿嶄綔'); -INSERT INTO `sys_dict_data` VALUES (23, '000000', 6, '瀵煎叆', '6', 'sys_oper_type', '', 'warning', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '瀵煎叆鎿嶄綔'); -INSERT INTO `sys_dict_data` VALUES (24, '000000', 7, '寮洪��', '7', 'sys_oper_type', '', 'danger', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '寮洪��鎿嶄綔'); -INSERT INTO `sys_dict_data` VALUES (25, '000000', 8, '鐢熸垚浠g爜', '8', 'sys_oper_type', '', 'warning', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鐢熸垚鎿嶄綔'); -INSERT INTO `sys_dict_data` VALUES (26, '000000', 9, '娓呯┖鏁版嵁', '9', 'sys_oper_type', '', 'danger', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '娓呯┖鎿嶄綔'); -INSERT INTO `sys_dict_data` VALUES (27, '000000', 1, '鎴愬姛', '0', 'sys_common_status', '', 'primary', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '姝e父鐘舵��'); -INSERT INTO `sys_dict_data` VALUES (28, '000000', 2, '澶辫触', '1', 'sys_common_status', '', 'danger', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鍋滅敤鐘舵��'); -INSERT INTO `sys_dict_data` VALUES (29, '000000', 99, '鍏朵粬', '0', 'sys_oper_type', '', 'info', 'N', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鍏朵粬鎿嶄綔'); -INSERT INTO `sys_dict_data` VALUES (1775756996568993793, '000000', 1, '鍏嶈垂鐢ㄦ埛', '0', 'sys_user_grade', '', 'info', 'N', '0', 103, 1, '2024-04-04 13:27:15', 1, '2024-04-04 13:30:09', ''); -INSERT INTO `sys_dict_data` VALUES (1775757116970684418, '000000', 2, '楂樼骇浼氬憳', '1', 'sys_user_grade', '', 'success', 'N', '0', 103, 1, '2024-04-04 13:27:43', 1, '2024-04-04 13:30:15', ''); -INSERT INTO `sys_dict_data` VALUES (1776109770934677506, '000000', 0, 'token璁¤垂', '1', 'sys_model_billing', '', 'primary', 'N', '0', 103, 1, '2024-04-05 12:49:03', 1, '2024-04-21 00:05:41', ''); -INSERT INTO `sys_dict_data` VALUES (1776109853377916929, '000000', 0, '娆℃暟璁¤垂', '2', 'sys_model_billing', '', 'success', 'N', '0', 103, 1, '2024-04-05 12:49:22', 1, '2024-04-05 12:49:22', ''); -INSERT INTO `sys_dict_data` VALUES (1780264338471858177, '000000', 0, '鏈敮浠�', '1', 'pay_state', '', 'info', 'N', '0', 103, 1, '2024-04-16 23:57:49', 1, '2024-04-16 23:58:29', ''); -INSERT INTO `sys_dict_data` VALUES (1780264431589601282, '000000', 2, '宸叉敮浠�', '2', 'pay_state', '', 'success', 'N', '0', 103, 1, '2024-04-16 23:58:11', 1, '2024-04-16 23:58:21', ''); - --- ---------------------------- --- Table structure for sys_dict_type --- ---------------------------- -DROP TABLE IF EXISTS `sys_dict_type`; -CREATE TABLE `sys_dict_type` ( - `dict_id` bigint(20) NOT NULL COMMENT '瀛楀吀涓婚敭', - `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', - `dict_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '瀛楀吀鍚嶇О', - `dict_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '瀛楀吀绫诲瀷', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鐘舵�侊紙0姝e父 1鍋滅敤锛�', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - PRIMARY KEY (`dict_id`) USING BTREE, - UNIQUE INDEX `tenant_id`(`tenant_id`, `dict_type`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '瀛楀吀绫诲瀷琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_dict_type --- ---------------------------- -INSERT INTO `sys_dict_type` VALUES (1, '000000', '鐢ㄦ埛鎬у埆', 'sys_user_sex', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鐢ㄦ埛鎬у埆鍒楄〃'); -INSERT INTO `sys_dict_type` VALUES (2, '000000', '鑿滃崟鐘舵��', 'sys_show_hide', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鑿滃崟鐘舵�佸垪琛�'); -INSERT INTO `sys_dict_type` VALUES (3, '000000', '绯荤粺寮�鍏�', 'sys_normal_disable', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '绯荤粺寮�鍏冲垪琛�'); -INSERT INTO `sys_dict_type` VALUES (6, '000000', '绯荤粺鏄惁', 'sys_yes_no', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '绯荤粺鏄惁鍒楄〃'); -INSERT INTO `sys_dict_type` VALUES (7, '000000', '閫氱煡绫诲瀷', 'sys_notice_type', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '閫氱煡绫诲瀷鍒楄〃'); -INSERT INTO `sys_dict_type` VALUES (8, '000000', '閫氱煡鐘舵��', 'sys_notice_status', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '閫氱煡鐘舵�佸垪琛�'); -INSERT INTO `sys_dict_type` VALUES (9, '000000', '鎿嶄綔绫诲瀷', 'sys_oper_type', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鎿嶄綔绫诲瀷鍒楄〃'); -INSERT INTO `sys_dict_type` VALUES (10, '000000', '绯荤粺鐘舵��', 'sys_common_status', '0', 103, 1, '2023-05-14 15:19:41', NULL, NULL, '鐧诲綍鐘舵�佸垪琛�'); -INSERT INTO `sys_dict_type` VALUES (1729685494468083714, '911866', '鐢ㄦ埛鎬у埆', 'sys_user_sex', '0', 103, 1, '2023-05-14 15:19:41', 1, '2023-05-14 15:19:41', '鐢ㄦ埛鎬у埆鍒楄〃'); -INSERT INTO `sys_dict_type` VALUES (1729685494468083715, '911866', '鑿滃崟鐘舵��', 'sys_show_hide', '0', 103, 1, '2023-05-14 15:19:41', 1, '2023-05-14 15:19:41', '鑿滃崟鐘舵�佸垪琛�'); -INSERT INTO `sys_dict_type` VALUES (1729685494468083716, '911866', '绯荤粺寮�鍏�', 'sys_normal_disable', '0', 103, 1, '2023-05-14 15:19:41', 1, '2023-05-14 15:19:41', '绯荤粺寮�鍏冲垪琛�'); -INSERT INTO `sys_dict_type` VALUES (1729685494468083717, '911866', '绯荤粺鏄惁', 'sys_yes_no', '0', 103, 1, '2023-05-14 15:19:41', 1, '2023-05-14 15:19:41', '绯荤粺鏄惁鍒楄〃'); -INSERT INTO `sys_dict_type` VALUES (1729685494468083718, '911866', '閫氱煡绫诲瀷', 'sys_notice_type', '0', 103, 1, '2023-05-14 15:19:41', 1, '2023-05-14 15:19:41', '閫氱煡绫诲瀷鍒楄〃'); -INSERT INTO `sys_dict_type` VALUES (1729685494468083719, '911866', '閫氱煡鐘舵��', 'sys_notice_status', '0', 103, 1, '2023-05-14 15:19:41', 1, '2023-05-14 15:19:41', '閫氱煡鐘舵�佸垪琛�'); -INSERT INTO `sys_dict_type` VALUES (1729685494468083720, '911866', '鎿嶄綔绫诲瀷', 'sys_oper_type', '0', 103, 1, '2023-05-14 15:19:41', 1, '2023-05-14 15:19:41', '鎿嶄綔绫诲瀷鍒楄〃'); -INSERT INTO `sys_dict_type` VALUES (1729685494468083721, '911866', '绯荤粺鐘舵��', 'sys_common_status', '0', 103, 1, '2023-05-14 15:19:41', 1, '2023-05-14 15:19:41', '鐧诲綍鐘舵�佸垪琛�'); -INSERT INTO `sys_dict_type` VALUES (1775756736895438849, '000000', '鐢ㄦ埛绛夌骇', 'sys_user_grade', '0', 103, 1, '2024-04-04 13:26:13', 1, '2024-04-04 13:26:13', ''); -INSERT INTO `sys_dict_type` VALUES (1776109665045278721, '000000', '妯″瀷璁¤垂鏂瑰紡', 'sys_model_billing', '0', 103, 1, '2024-04-05 12:48:37', 1, '2024-04-08 11:22:18', '妯″瀷璁¤垂鏂瑰紡'); -INSERT INTO `sys_dict_type` VALUES (1780263881368219649, '000000', '鏀粯鐘舵��', 'pay_state', '0', 103, 1, '2024-04-16 23:56:00', 1, '2024-04-16 23:56:00', '鏀粯鐘舵��'); - --- ---------------------------- --- Table structure for sys_file_info --- ---------------------------- -DROP TABLE IF EXISTS `sys_file_info`; -CREATE TABLE `sys_file_info` ( - `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '鏂囦欢id', - `url` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '鏂囦欢璁块棶鍦板潃', - `size` bigint(20) NULL DEFAULT NULL COMMENT '鏂囦欢澶у皬锛屽崟浣嶅瓧鑺�', - `filename` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '鏂囦欢鍚嶇О', - `original_filename` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '鍘熷鏂囦欢鍚�', - `base_path` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '鍩虹瀛樺偍璺緞', - `path` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '瀛樺偍璺緞', - `ext` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '鏂囦欢鎵╁睍鍚�', - `user_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '鏂囦欢鎵�灞炵敤鎴�', - `file_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '鏂囦欢绫诲瀷', - `attr` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '闄勫姞灞炴��', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鍒涘缓鑰�', - `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - `version` int(11) NULL DEFAULT NULL COMMENT '鐗堟湰', - `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 1浠h〃鍒犻櫎锛�', - `update_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏇存柊IP', - `tenant_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '绉熸埛Id', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1688133688718106627 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '鏂囦欢璁板綍琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_file_info --- ---------------------------- - --- ---------------------------- --- Table structure for sys_logininfor --- ---------------------------- -DROP TABLE IF EXISTS `sys_logininfor`; -CREATE TABLE `sys_logininfor` ( - `info_id` bigint(20) NOT NULL COMMENT '璁块棶ID', - `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', - `user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鐢ㄦ埛璐﹀彿', - `ipaddr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鐧诲綍IP鍦板潃', - `login_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鐧诲綍鍦扮偣', - `browser` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '娴忚鍣ㄧ被鍨�', - `os` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鎿嶄綔绯荤粺', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鐧诲綍鐘舵�侊紙0鎴愬姛 1澶辫触锛�', - `msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鎻愮ず娑堟伅', - `login_time` datetime NULL DEFAULT NULL COMMENT '璁块棶鏃堕棿', - PRIMARY KEY (`info_id`) USING BTREE, - INDEX `idx_sys_logininfor_s`(`status`) USING BTREE, - INDEX `idx_sys_logininfor_lt`(`login_time`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '绯荤粺璁块棶璁板綍' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_logininfor --- ---------------------------- - --- ---------------------------- --- Table structure for sys_menu --- ---------------------------- -DROP TABLE IF EXISTS `sys_menu`; -CREATE TABLE `sys_menu` ( - `menu_id` bigint(20) NOT NULL COMMENT '鑿滃崟ID', - `menu_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鑿滃崟鍚嶇О', - `parent_id` bigint(20) NULL DEFAULT 0 COMMENT '鐖惰彍鍗旾D', - `order_num` int(11) NULL DEFAULT 0 COMMENT '鏄剧ず椤哄簭', - `path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '璺敱鍦板潃', - `component` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '缁勪欢璺緞', - `query_param` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '璺敱鍙傛暟', - `is_frame` int(11) NULL DEFAULT 1 COMMENT '鏄惁涓哄閾撅紙0鏄� 1鍚︼級', - `is_cache` int(11) NULL DEFAULT 0 COMMENT '鏄惁缂撳瓨锛�0缂撳瓨 1涓嶇紦瀛橈級', - `menu_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鑿滃崟绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛�', - `visible` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鏄剧ず鐘舵�侊紙0鏄剧ず 1闅愯棌锛�', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鑿滃崟鐘舵�侊紙0姝e父 1鍋滅敤锛�', - `perms` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏉冮檺鏍囪瘑', - `icon` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '#' COMMENT '鑿滃崟鍥炬爣', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '澶囨敞', - PRIMARY KEY (`menu_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鑿滃崟鏉冮檺琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_menu --- ---------------------------- -INSERT INTO `sys_menu` VALUES (1, '绯荤粺绠$悊', 0, 1, 'system', NULL, '', 1, 0, 'M', '0', '0', '', 'system', 103, 1, '2023-05-14 15:19:39', NULL, NULL, '绯荤粺绠$悊鐩綍'); -INSERT INTO `sys_menu` VALUES (2, '绯荤粺鐩戞帶', 0, 3, 'monitor', NULL, '', 1, 0, 'M', '0', '0', '', 'monitor', 103, 1, '2023-05-14 15:19:39', NULL, NULL, '绯荤粺鐩戞帶鐩綍'); -INSERT INTO `sys_menu` VALUES (6, '绉熸埛绠$悊', 0, 2, 'tenant', NULL, '', 1, 0, 'M', '1', '1', '', 'chart', 103, 1, '2023-05-14 15:19:39', 1, '2024-04-04 22:35:33', '绉熸埛绠$悊鐩綍'); -INSERT INTO `sys_menu` VALUES (100, '鐢ㄦ埛绠$悊', 1775500307898949634, 1, 'user', 'system/user/index', '', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 103, 1, '2023-05-14 15:19:39', 1, '2024-04-03 20:27:27', '鐢ㄦ埛绠$悊鑿滃崟'); -INSERT INTO `sys_menu` VALUES (101, '瑙掕壊绠$悊', 1, 2, 'role', 'system/role/index', '', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 103, 1, '2023-05-14 15:19:39', NULL, NULL, '瑙掕壊绠$悊鑿滃崟'); -INSERT INTO `sys_menu` VALUES (102, '鑿滃崟绠$悊', 1, 3, 'menu', 'system/menu/index', '', 1, 0, 'C', '0', '0', 'system:menu:list', 'tree-table', 103, 1, '2023-05-14 15:19:39', NULL, NULL, '鑿滃崟绠$悊鑿滃崟'); -INSERT INTO `sys_menu` VALUES (103, '閮ㄩ棬绠$悊', 1, 4, 'dept', 'system/dept/index', '', 1, 0, 'C', '1', '1', 'system:dept:list', 'tree', 103, 1, '2023-05-14 15:19:39', 1, '2024-04-04 22:36:07', '閮ㄩ棬绠$悊鑿滃崟'); -INSERT INTO `sys_menu` VALUES (104, '宀椾綅绠$悊', 1, 5, 'post', 'system/post/index', '', 1, 0, 'C', '1', '1', 'system:post:list', 'post', 103, 1, '2023-05-14 15:19:39', 1, '2024-04-04 22:36:15', '宀椾綅绠$悊鑿滃崟'); -INSERT INTO `sys_menu` VALUES (105, '瀛楀吀绠$悊', 1, 6, 'dict', 'system/dict/index', '', 1, 0, 'C', '0', '0', 'system:dict:list', 'dict', 103, 1, '2023-05-14 15:19:40', NULL, NULL, '瀛楀吀绠$悊鑿滃崟'); -INSERT INTO `sys_menu` VALUES (106, '绯荤粺鍙傛暟', 1, 10, 'config', 'system/config/index', '', 1, 0, 'C', '0', '0', 'system:config:list', 'edit', 103, 1, '2023-05-14 15:19:40', 1, '2024-05-19 23:13:49', '鍙傛暟璁剧疆鑿滃崟'); -INSERT INTO `sys_menu` VALUES (107, '閫氱煡鍏憡', 1775500307898949634, 14, 'notice', 'system/notice/index', '', 1, 0, 'C', '0', '0', 'system:notice:list', 'message', 103, 1, '2023-05-14 15:19:40', 1, '2024-05-02 22:35:07', '閫氱煡鍏憡鑿滃崟'); -INSERT INTO `sys_menu` VALUES (108, '鏃ュ織绠$悊', 1, 9, 'log', '', '', 1, 0, 'M', '0', '0', '', 'log', 103, 1, '2023-05-14 15:19:40', NULL, NULL, '鏃ュ織绠$悊鑿滃崟'); -INSERT INTO `sys_menu` VALUES (109, '鍦ㄧ嚎鐢ㄦ埛', 2, 1, 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 103, 1, '2023-05-14 15:19:40', NULL, NULL, '鍦ㄧ嚎鐢ㄦ埛鑿滃崟'); -INSERT INTO `sys_menu` VALUES (113, '缂撳瓨鐩戞帶', 2, 5, 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 103, 1, '2023-05-14 15:19:40', NULL, NULL, '缂撳瓨鐩戞帶鑿滃崟'); -INSERT INTO `sys_menu` VALUES (115, '浠g爜鐢熸垚', 1, 2, 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 103, 1, '2023-05-14 15:19:40', 1, '2023-12-29 11:33:01', '浠g爜鐢熸垚鑿滃崟'); -INSERT INTO `sys_menu` VALUES (118, '瀛樺偍绠$悊', 1775500307898949634, 10, 'oss', 'system/oss/config', '', 1, 0, 'C', '0', '0', 'system:oss:list', 'redis', 103, 1, '2023-05-14 15:19:40', 1, '2024-04-07 19:56:55', '鏂囦欢绠$悊鑿滃崟'); -INSERT INTO `sys_menu` VALUES (121, '绉熸埛绠$悊', 6, 1, 'tenant', 'system/tenant/index', '', 1, 0, 'C', '0', '0', 'system:tenant:list', 'list', 103, 1, '2023-05-14 15:19:40', NULL, NULL, '绉熸埛绠$悊鑿滃崟'); -INSERT INTO `sys_menu` VALUES (122, '绉熸埛濂楅绠$悊', 6, 2, 'tenantPackage', 'system/tenantPackage/index', '', 1, 0, 'C', '0', '0', 'system:tenantPackage:list', 'form', 103, 1, '2023-05-14 15:19:40', NULL, NULL, '绉熸埛濂楅绠$悊鑿滃崟'); -INSERT INTO `sys_menu` VALUES (500, '鎿嶄綔鏃ュ織', 108, 1, 'operlog', 'monitor/operlog/index', '', 1, 0, 'C', '0', '0', 'monitor:operlog:list', 'form', 103, 1, '2023-05-14 15:19:40', NULL, NULL, '鎿嶄綔鏃ュ織鑿滃崟'); -INSERT INTO `sys_menu` VALUES (501, '鐧诲綍鏃ュ織', 108, 2, 'logininfor', 'monitor/logininfor/index', '', 1, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', 103, 1, '2023-05-14 15:19:40', NULL, NULL, '鐧诲綍鏃ュ織鑿滃崟'); -INSERT INTO `sys_menu` VALUES (1001, '鐢ㄦ埛鏌ヨ', 100, 1, '', '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1002, '鐢ㄦ埛鏂板', 100, 2, '', '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1003, '鐢ㄦ埛淇敼', 100, 3, '', '', '', 1, 0, 'F', '0', '0', 'system:user:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1004, '鐢ㄦ埛鍒犻櫎', 100, 4, '', '', '', 1, 0, 'F', '0', '0', 'system:user:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1005, '鐢ㄦ埛瀵煎嚭', 100, 5, '', '', '', 1, 0, 'F', '0', '0', 'system:user:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1006, '鐢ㄦ埛瀵煎叆', 100, 6, '', '', '', 1, 0, 'F', '0', '0', 'system:user:import', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1007, '閲嶇疆瀵嗙爜', 100, 7, '', '', '', 1, 0, 'F', '0', '0', 'system:user:resetPwd', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1008, '瑙掕壊鏌ヨ', 101, 1, '', '', '', 1, 0, 'F', '0', '0', 'system:role:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1009, '瑙掕壊鏂板', 101, 2, '', '', '', 1, 0, 'F', '0', '0', 'system:role:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1010, '瑙掕壊淇敼', 101, 3, '', '', '', 1, 0, 'F', '0', '0', 'system:role:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1011, '瑙掕壊鍒犻櫎', 101, 4, '', '', '', 1, 0, 'F', '0', '0', 'system:role:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1012, '瑙掕壊瀵煎嚭', 101, 5, '', '', '', 1, 0, 'F', '0', '0', 'system:role:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1013, '鑿滃崟鏌ヨ', 102, 1, '', '', '', 1, 0, 'F', '0', '0', 'system:menu:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1014, '鑿滃崟鏂板', 102, 2, '', '', '', 1, 0, 'F', '0', '0', 'system:menu:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1015, '鑿滃崟淇敼', 102, 3, '', '', '', 1, 0, 'F', '0', '0', 'system:menu:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1016, '鑿滃崟鍒犻櫎', 102, 4, '', '', '', 1, 0, 'F', '0', '0', 'system:menu:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1017, '閮ㄩ棬鏌ヨ', 103, 1, '', '', '', 1, 0, 'F', '0', '0', 'system:dept:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1018, '閮ㄩ棬鏂板', 103, 2, '', '', '', 1, 0, 'F', '0', '0', 'system:dept:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1019, '閮ㄩ棬淇敼', 103, 3, '', '', '', 1, 0, 'F', '0', '0', 'system:dept:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1020, '閮ㄩ棬鍒犻櫎', 103, 4, '', '', '', 1, 0, 'F', '0', '0', 'system:dept:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1021, '宀椾綅鏌ヨ', 104, 1, '', '', '', 1, 0, 'F', '0', '0', 'system:post:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1022, '宀椾綅鏂板', 104, 2, '', '', '', 1, 0, 'F', '0', '0', 'system:post:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1023, '宀椾綅淇敼', 104, 3, '', '', '', 1, 0, 'F', '0', '0', 'system:post:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1024, '宀椾綅鍒犻櫎', 104, 4, '', '', '', 1, 0, 'F', '0', '0', 'system:post:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1025, '宀椾綅瀵煎嚭', 104, 5, '', '', '', 1, 0, 'F', '0', '0', 'system:post:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1026, '瀛楀吀鏌ヨ', 105, 1, '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1027, '瀛楀吀鏂板', 105, 2, '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1028, '瀛楀吀淇敼', 105, 3, '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1029, '瀛楀吀鍒犻櫎', 105, 4, '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1030, '瀛楀吀瀵煎嚭', 105, 5, '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1031, '鍙傛暟鏌ヨ', 106, 1, '#', '', '', 1, 0, 'F', '0', '0', 'system:config:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1032, '鍙傛暟鏂板', 106, 2, '#', '', '', 1, 0, 'F', '0', '0', 'system:config:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1033, '鍙傛暟淇敼', 106, 3, '#', '', '', 1, 0, 'F', '0', '0', 'system:config:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1034, '鍙傛暟鍒犻櫎', 106, 4, '#', '', '', 1, 0, 'F', '0', '0', 'system:config:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1035, '鍙傛暟瀵煎嚭', 106, 5, '#', '', '', 1, 0, 'F', '0', '0', 'system:config:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1036, '鍏憡鏌ヨ', 107, 1, '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1037, '鍏憡鏂板', 107, 2, '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1038, '鍏憡淇敼', 107, 3, '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1039, '鍏憡鍒犻櫎', 107, 4, '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1040, '鎿嶄綔鏌ヨ', 500, 1, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1041, '鎿嶄綔鍒犻櫎', 500, 2, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1042, '鏃ュ織瀵煎嚭', 500, 4, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1043, '鐧诲綍鏌ヨ', 501, 1, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1044, '鐧诲綍鍒犻櫎', 501, 2, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1045, '鏃ュ織瀵煎嚭', 501, 3, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1046, '鍦ㄧ嚎鏌ヨ', 109, 1, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1047, '鎵归噺寮洪��', 109, 2, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1048, '鍗曟潯寮洪��', 109, 3, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1050, '璐︽埛瑙i攣', 501, 4, '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:unlock', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1055, '鐢熸垚鏌ヨ', 115, 1, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1056, '鐢熸垚淇敼', 115, 2, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1057, '鐢熸垚鍒犻櫎', 115, 3, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1058, '瀵煎叆浠g爜', 115, 2, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1059, '棰勮浠g爜', 115, 4, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1060, '鐢熸垚浠g爜', 115, 5, '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1600, '鏂囦欢鏌ヨ', 118, 1, '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1601, '鏂囦欢涓婁紶', 118, 2, '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:upload', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1602, '鏂囦欢涓嬭浇', 118, 3, '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:download', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1603, '鏂囦欢鍒犻櫎', 118, 4, '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1605, '閰嶇疆缂栬緫', 118, 6, '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1606, '绉熸埛鏌ヨ', 121, 1, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1607, '绉熸埛鏂板', 121, 2, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1608, '绉熸埛淇敼', 121, 3, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1609, '绉熸埛鍒犻櫎', 121, 4, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1610, '绉熸埛瀵煎嚭', 121, 5, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1611, '绉熸埛濂楅鏌ヨ', 122, 1, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:query', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1612, '绉熸埛濂楅鏂板', 122, 2, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:add', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1613, '绉熸埛濂楅淇敼', 122, 3, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:edit', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1614, '绉熸埛濂楅鍒犻櫎', 122, 4, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:remove', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1615, '绉熸埛濂楅瀵煎嚭', 122, 5, '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:export', '#', 103, 1, '2023-05-14 15:19:40', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1775500307898949634, '杩愯惀绠$悊', 0, 0, 'operate', NULL, NULL, 1, 0, 'M', '0', '0', NULL, 'peoples', 103, 1, '2024-04-03 20:27:15', 1, '2024-04-03 20:27:15', ''); -INSERT INTO `sys_menu` VALUES (1775895273104068610, '绯荤粺妯″瀷', 1775500307898949634, 2, 'model', 'system/model/index', NULL, 1, 0, 'C', '0', '0', 'system:model:list', 'example', 103, 1, '2024-04-05 12:00:38', 1, '2024-04-05 12:14:02', '绯荤粺妯″瀷鑿滃崟'); -INSERT INTO `sys_menu` VALUES (1775895273104068611, '绯荤粺妯″瀷鏌ヨ', 1775895273104068610, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:model:query', '#', 103, 1, '2024-04-05 12:00:38', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1775895273104068612, '绯荤粺妯″瀷鏂板', 1775895273104068610, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:model:add', '#', 103, 1, '2024-04-05 12:00:38', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1775895273104068613, '绯荤粺妯″瀷淇敼', 1775895273104068610, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:model:edit', '#', 103, 1, '2024-04-05 12:00:38', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1775895273104068614, '绯荤粺妯″瀷鍒犻櫎', 1775895273104068610, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:model:remove', '#', 103, 1, '2024-04-05 12:00:38', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1775895273104068615, '绯荤粺妯″瀷瀵煎嚭', 1775895273104068610, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:model:export', '#', 103, 1, '2024-04-05 12:00:38', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1779024740525608962, '閰嶇疆绠$悊', 1775500307898949634, 4, 'chat', 'system/chatconfig/index', NULL, 1, 0, 'C', '0', '0', '', 'dict', 103, 1, '2024-04-13 13:56:30', 1, '2024-04-13 14:47:51', '瀵硅瘽閰嶇疆淇℃伅\r\n鑿滃崟'); -INSERT INTO `sys_menu` VALUES (1779024740525608963, '瀵硅瘽閰嶇疆淇℃伅\r\n鏌ヨ', 1779024740525608962, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:config:query', '#', 103, 1, '2024-04-13 13:56:30', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1779024740525608964, '瀵硅瘽閰嶇疆淇℃伅\r\n鏂板', 1779024740525608962, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:config:add', '#', 103, 1, '2024-04-13 13:56:30', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1779024740525608965, '瀵硅瘽閰嶇疆淇℃伅\r\n淇敼', 1779024740525608962, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:config:edit', '#', 103, 1, '2024-04-13 13:56:30', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1779024740525608966, '瀵硅瘽閰嶇疆淇℃伅\r\n鍒犻櫎', 1779024740525608962, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:config:remove', '#', 103, 1, '2024-04-13 13:56:30', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1779024740525608967, '瀵硅瘽閰嶇疆淇℃伅\r\n瀵煎嚭', 1779024740525608962, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:config:export', '#', 103, 1, '2024-04-13 13:56:30', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1780240077690507266, '鑱婂ぉ娑堟伅', 1775500307898949634, 0, 'chatMessage', 'system/message/index', NULL, 1, 0, 'C', '0', '0', 'system:message:list', 'log', 103, 1, '2024-04-16 22:24:48', 1, '2024-04-16 23:10:47', '鑱婂ぉ娑堟伅鑿滃崟'); -INSERT INTO `sys_menu` VALUES (1780240077690507267, '鑱婂ぉ娑堟伅鏌ヨ', 1780240077690507266, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:message:query', '#', 103, 1, '2024-04-16 22:24:48', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1780240077690507268, '鑱婂ぉ娑堟伅鏂板', 1780240077690507266, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:message:add', '#', 103, 1, '2024-04-16 22:24:48', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1780240077690507269, '鑱婂ぉ娑堟伅淇敼', 1780240077690507266, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:message:edit', '#', 103, 1, '2024-04-16 22:24:48', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1780240077690507270, '鑱婂ぉ娑堟伅鍒犻櫎', 1780240077690507266, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:message:remove', '#', 103, 1, '2024-04-16 22:24:48', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1780240077690507271, '鑱婂ぉ娑堟伅瀵煎嚭', 1780240077690507266, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:message:export', '#', 103, 1, '2024-04-16 22:24:48', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1780255628576018433, '鏀粯璁㈠崟', 1775500307898949634, 9, 'orders', 'system/orders/index', NULL, 1, 0, 'C', '0', '0', 'system:orders:list', 'documentation', 103, 1, '2024-04-16 23:32:48', 1, '2024-04-16 23:51:51', '鏀粯璁㈠崟鑿滃崟'); -INSERT INTO `sys_menu` VALUES (1780255628576018434, '鏀粯璁㈠崟鏌ヨ', 1780255628576018433, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:orders:query', '#', 103, 1, '2024-04-16 23:32:48', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1780255628576018435, '鏀粯璁㈠崟鏂板', 1780255628576018433, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:orders:add', '#', 103, 1, '2024-04-16 23:32:48', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1780255628576018436, '鏀粯璁㈠崟淇敼', 1780255628576018433, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:orders:edit', '#', 103, 1, '2024-04-16 23:32:48', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1780255628576018437, '鏀粯璁㈠崟鍒犻櫎', 1780255628576018433, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:orders:remove', '#', 103, 1, '2024-04-16 23:32:48', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1780255628576018438, '鏀粯璁㈠崟瀵煎嚭', 1780255628576018433, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:orders:export', '#', 103, 1, '2024-04-16 23:32:48', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1786379590171156481, '鍏戞崲绠$悊', 1775500307898949634, 12, 'voucher', 'system/voucher/index', NULL, 1, 0, 'C', '0', '0', 'system:voucher:list', 'druid', 103, 1, '2024-05-03 20:59:54', 1, '2024-05-03 21:11:41', '鐢ㄦ埛鍏戞崲璁板綍鑿滃崟'); -INSERT INTO `sys_menu` VALUES (1786379590171156482, '鐢ㄦ埛鍏戞崲璁板綍鏌ヨ', 1786379590171156481, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:voucher:query', '#', 103, 1, '2024-05-03 20:59:54', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1786379590171156483, '鐢ㄦ埛鍏戞崲璁板綍鏂板', 1786379590171156481, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:voucher:add', '#', 103, 1, '2024-05-03 20:59:54', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1786379590171156484, '鐢ㄦ埛鍏戞崲璁板綍淇敼', 1786379590171156481, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:voucher:edit', '#', 103, 1, '2024-05-03 20:59:55', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1786379590171156485, '鐢ㄦ埛鍏戞崲璁板綍鍒犻櫎', 1786379590171156481, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:voucher:remove', '#', 103, 1, '2024-05-03 20:59:55', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1786379590171156486, '鐢ㄦ埛鍏戞崲璁板綍瀵煎嚭', 1786379590171156481, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:voucher:export', '#', 103, 1, '2024-05-03 20:59:55', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1786380456739528706, '鏈哄櫒绠$悊', 1775500307898949634, 13, 'robConfig', 'system/robConfig/index', NULL, 1, 0, 'C', '0', '0', 'system:robConfig:list', 'people', 103, 1, '2024-05-03 21:02:57', 1, '2024-05-03 21:13:16', 'robot鑿滃崟'); -INSERT INTO `sys_menu` VALUES (1786380456739528707, 'robot鏌ヨ', 1786380456739528706, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:robConfig:query', '#', 103, 1, '2024-05-03 21:02:57', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1786380456739528708, 'robot鏂板', 1786380456739528706, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:robConfig:add', '#', 103, 1, '2024-05-03 21:02:57', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1786380456739528709, 'robot淇敼', 1786380456739528706, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:robConfig:edit', '#', 103, 1, '2024-05-03 21:02:58', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1786380456739528710, 'robot鍒犻櫎', 1786380456739528706, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:robConfig:remove', '#', 103, 1, '2024-05-03 21:02:58', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1786380456739528711, 'robot瀵煎嚭', 1786380456739528706, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:robConfig:export', '#', 103, 1, '2024-05-03 21:02:58', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1787078000285122561, '濂楅绠$悊', 1775500307898949634, 1, 'packagePlan', 'system/packagePlan/index', NULL, 1, 0, 'C', '0', '0', 'system:packagePlan:list', 'tool', 103, 1, '2024-05-05 19:13:53', 1, '2024-05-05 19:38:56', '濂楅绠$悊鑿滃崟'); -INSERT INTO `sys_menu` VALUES (1787078000285122562, '濂楅绠$悊鏌ヨ', 1787078000285122561, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:packagePlan:query', '#', 103, 1, '2024-05-05 19:13:53', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1787078000285122563, '濂楅绠$悊鏂板', 1787078000285122561, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:packagePlan:add', '#', 103, 1, '2024-05-05 19:13:53', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1787078000285122564, '濂楅绠$悊淇敼', 1787078000285122561, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:packagePlan:edit', '#', 103, 1, '2024-05-05 19:13:53', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1787078000285122565, '濂楅绠$悊鍒犻櫎', 1787078000285122561, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:packagePlan:remove', '#', 103, 1, '2024-05-05 19:13:53', NULL, NULL, ''); -INSERT INTO `sys_menu` VALUES (1787078000285122566, '濂楅绠$悊瀵煎嚭', 1787078000285122561, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:packagePlan:export', '#', 103, 1, '2024-05-05 19:13:53', NULL, NULL, ''); - --- ---------------------------- --- Table structure for sys_model --- ---------------------------- -DROP TABLE IF EXISTS `sys_model`; -CREATE TABLE `sys_model` ( - `id` bigint(20) NOT NULL COMMENT '涓婚敭', - `model_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '妯″瀷鍚嶇О', - `model_describe` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '妯″瀷鎻忚堪', - `model_price` double NULL DEFAULT NULL COMMENT '妯″瀷浠锋牸', - `model_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '璁¤垂绫诲瀷', - `model_show` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏄惁鏄剧ず', - `system_prompt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '绯荤粺鎻愮ず璇�', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '绯荤粺妯″瀷' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_model --- ---------------------------- -INSERT INTO `sys_model` VALUES (1776114028757180417, 'gpt-3.5-turbo', 'gpt-3', 0.05, '1', '0', NULL, 103, 1, '2024-04-20 23:40:31', 1, '2024-04-23 21:45:19', 'GPT3.5鏈�鏂版ā鍨�,鐢ㄤ簬鏂囨湰鐢熸垚銆佸璇濈郴缁熴�佸唴瀹规憳瑕佺瓑'); -INSERT INTO `sys_model` VALUES (1781709495515783171, 'gpt-4-all', 'gpt-all', 0.2, '2', '0', NULL, 103, 1, '2024-04-20 23:40:41', 1, '2024-04-23 21:45:23', '鍚屾椂鎷ユ湁鑱旂綉鏌ヨ锛岄珮绾ф暟鎹垎鏋愶紝鐢诲浘 DALL.E鍔熻兘,GPT 浼氳嚜鍔ㄨ瘑鍒苟璋冨彇鐩稿叧鑳藉姏宸ュ叿'); -INSERT INTO `sys_model` VALUES (1781709617662304258, 'gpt-4-turbo-2024-04-09', 'gpt-4', 0.2, '1', '0', '浣跨敤涓枃鍥炲', 103, 1, '2024-04-20 23:40:50', 1, '2024-04-23 21:45:28', '鏈�鏂扮増GPT-4,鐩稿GPT-3.5鏇村厛杩涖�佹嫢鏈夋洿澶氱殑鍙傛暟鍜屾洿寮哄ぇ鐨勮瑷�澶勭悊鑳藉姏'); -INSERT INTO `sys_model` VALUES (1781715781896646657, 'suno-v3', 'suno-v3', 0.5, '2', '0', NULL, 103, 1, '2024-04-21 00:05:20', 1, '2024-04-23 19:34:36', 'SunoAI 鎺ㄥ嚭鐨勬枃鐢熸瓕妯″瀷锛屾敮鎸佺伒鎰熸ā寮忋�佹瓕璇嶆ā寮忥紝涔熸敮鎸佺敓鎴愮函闊充箰'); -INSERT INTO `sys_model` VALUES (1781728235120791553, 'stable-diffusion', 'stable-diffusion', 0.1, '2', '0', NULL, 103, 1, '2024-04-21 00:54:49', 1, '2024-04-23 19:34:40', '楂樼骇鍥惧儚鐢熸垚鍜屽鐞嗘ā鍨嬶紝鎿呴暱鍒涘缓閫肩湡鐨勮瑙夋晥鏋�'); -INSERT INTO `sys_model` VALUES (1781728766161620993, 'claude-3-opus-20240229', 'claude-3-opus-20240229', 0.2, '1', '0', NULL, 103, 1, '2024-04-21 00:56:55', 1, '2024-04-23 19:34:43', 'Claude妯″瀷鐨勬渶鏂扮増鏈紝鍏锋湁鏈�鍏堣繘鐨勮瑷�澶勭悊鎶�鏈�'); -INSERT INTO `sys_model` VALUES (1782734319650418690, 'gpt-4-1106-vision-preview', 'gpt-4-1106-vision-preview', 0.2, '2', '1', '', 103, 1, '2024-04-23 19:32:38', 1, '2024-04-23 19:38:38', 'GPT-4 鐨勪竴涓寘鍚瑙夊鐞嗚兘鍔涚殑棰勮鐗堟湰锛岀粨鍚堜簡瑙嗚淇℃伅澶勭悊鐨勮兘鍔�'); -INSERT INTO `sys_model` VALUES (1782736322308943873, 'dall-e-3', 'dall3', 0.3, '2', '1', '', 103, 1, '2024-04-23 19:40:36', 1, '2024-04-23 21:45:40', 'DALL路E 鏄竴涓笓娉ㄤ簬鍥惧儚鐢熸垚鐨勬ā鍨�'); -INSERT INTO `sys_model` VALUES (1782736729471004673, 'gpt-4-gizmo', 'gpt-4-gizmo', 0.2, '2', '1', NULL, 103, 1, '2024-04-23 19:42:13', 1, '2024-04-23 19:42:13', 'gpts鍟嗗簵涓殑妯″瀷,浣跨敤鏂瑰紡:gpt-4-gizmo-g-xxx'); -INSERT INTO `sys_model` VALUES (1782792839548735490, 'mj-type1', 'Midjourney1', 0.1, '2', '1', NULL, 103, 1, '2024-04-23 23:25:10', 1, '2024-04-23 23:28:04', '鍥剧敓鏂囥�佹斁澶с�佹彁绀鸿瘝鍒嗘瀽璐圭敤'); -INSERT INTO `sys_model` VALUES (1782793100841291778, 'mj-type2', 'Midjourney2', 0.3, '2', '1', NULL, 103, 1, '2024-04-23 23:26:13', 1, '2024-04-23 23:28:13', '鏂囩敓鍥撅紝鍥剧敓鍥撅紝鍙樺寲銆佹崲鑴歌垂鐢�'); -INSERT INTO `sys_model` VALUES (1790237707719991298, 'gpt-4o-2024-05-13', 'gpt-4o-2024-05-13', 0.2, '1', '0', NULL, 103, 1, '2024-05-14 12:28:25', 1, '2024-05-14 12:28:25', ' OpenAI 鏈�鍏堣繘鐨勫妯″紡妯″瀷锛屾瘮 GPT-4 Turbo 鏇村揩銆佹洿渚垮疁锛屽叿鏈夋洿寮虹殑瑙嗚鍔熻兘'); - --- ---------------------------- --- Table structure for sys_notice --- ---------------------------- -DROP TABLE IF EXISTS `sys_notice`; -CREATE TABLE `sys_notice` ( - `notice_id` bigint(20) NOT NULL COMMENT '鍏憡ID', - `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', - `notice_title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鍏憡鏍囬', - `notice_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛�', - `notice_content` longblob NULL COMMENT '鍏憡鍐呭', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鍏憡鐘舵�侊紙0姝e父 1鍏抽棴锛�', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - PRIMARY KEY (`notice_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '閫氱煡鍏憡琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_notice --- ---------------------------- -INSERT INTO `sys_notice` VALUES (1789324923280932865, '000000', '鍏憡', '1', 0x3C68313E3C7370616E207374796C653D226261636B67726F756E642D636F6C6F723A20726762283235352C203235352C2030293B223EE696B0E78988E69CACE58685E5AEB93C2F7370616E3E3C2F68313E3C703EE79BAEE5898DE694AFE68C81E69C80E5A49A3C7370616E207374796C653D226261636B67726F756E642D636F6C6F723A20726762283233302C20302C2030293B223E3530E4BABA3C2F7370616E3EE799BBE5BD95EFBC8CE4B880E4B8AAE794A8E688B7E58FAAE883BDE7BB91E5AE9AE4B880E4B8AAE5BEAEE4BFA1EFBC8CE4B894E4B88DE694AFE68C81E58887E68DA2E6A8A1E59E8BE380823C2F703E3C703EE5BC80E58F91E8AEA1E58892EFBC9A3C2F703E3C703E312E20E58FAFE4BBA5E98089E68BA9E79FA5E8AF86E5BA933C2F703E3C703E322E20E58FAFE4BBA5E58887E68DA2E6A8A1E59E8B3C2F703E3C703E332E3C733E20E5908CE4B880E4B8AAE794A8E688B7E58FAFE4BBA5E799BBE5BD95E5A49AE4B8AAE5BEAEE4BFA13C2F733E3C2F703E, '0', 103, 1, '2024-05-12 00:01:20', 1, '2024-05-12 00:01:20', ''); - --- ---------------------------- --- Table structure for sys_notice_state --- ---------------------------- -DROP TABLE IF EXISTS `sys_notice_state`; -CREATE TABLE `sys_notice_state` ( - `id` bigint(20) NOT NULL COMMENT 'ID', - `user_id` bigint(20) NOT NULL COMMENT '鐢ㄦ埛ID', - `notice_id` bigint(20) NOT NULL COMMENT '鍏憡ID', - `read_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '闃呰鐘舵�侊紙0鏈 1宸茶锛�', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐢ㄦ埛闃呰鐘舵�佽〃' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_notice_state --- ---------------------------- - --- ---------------------------- --- Table structure for sys_oper_log --- ---------------------------- -DROP TABLE IF EXISTS `sys_oper_log`; -CREATE TABLE `sys_oper_log` ( - `oper_id` bigint(20) NOT NULL COMMENT '鏃ュ織涓婚敭', - `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', - `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '妯″潡鏍囬', - `business_type` int(2) NULL DEFAULT 0 COMMENT '涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�', - `method` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鏂规硶鍚嶇О', - `request_method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '璇锋眰鏂瑰紡', - `operator_type` int(1) NULL DEFAULT 0 COMMENT '鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級', - `oper_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鎿嶄綔浜哄憳', - `dept_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '閮ㄩ棬鍚嶇О', - `oper_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '璇锋眰URL', - `oper_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '涓绘満鍦板潃', - `oper_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鎿嶄綔鍦扮偣', - `oper_param` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '璇锋眰鍙傛暟', - `json_result` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '杩斿洖鍙傛暟', - `status` int(1) NULL DEFAULT 0 COMMENT '鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛�', - `error_msg` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '閿欒娑堟伅', - `oper_time` datetime NULL DEFAULT NULL COMMENT '鎿嶄綔鏃堕棿', - `cost_time` bigint(20) NULL DEFAULT 0 COMMENT '娑堣�楁椂闂�', - PRIMARY KEY (`oper_id`) USING BTREE, - INDEX `idx_sys_oper_log_bt`(`business_type`) USING BTREE, - INDEX `idx_sys_oper_log_s`(`status`) USING BTREE, - INDEX `idx_sys_oper_log_ot`(`oper_time`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鎿嶄綔鏃ュ織璁板綍' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_oper_log --- ---------------------------- - --- ---------------------------- --- Table structure for sys_oss --- ---------------------------- -DROP TABLE IF EXISTS `sys_oss`; -CREATE TABLE `sys_oss` ( - `oss_id` bigint(20) NOT NULL COMMENT '瀵硅薄瀛樺偍涓婚敭', - `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', - `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鏂囦欢鍚�', - `original_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鍘熷悕', - `file_suffix` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鏂囦欢鍚庣紑鍚�', - `url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'URL鍦板潃', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '涓婁紶浜�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊浜�', - `service` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'minio' COMMENT '鏈嶅姟鍟�', - PRIMARY KEY (`oss_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'OSS瀵硅薄瀛樺偍琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_oss --- ---------------------------- - --- ---------------------------- --- Table structure for sys_oss_config --- ---------------------------- -DROP TABLE IF EXISTS `sys_oss_config`; -CREATE TABLE `sys_oss_config` ( - `oss_config_id` bigint(20) NOT NULL COMMENT '涓诲缓', - `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', - `config_key` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '閰嶇疆key', - `access_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'accessKey', - `secret_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '绉橀挜', - `bucket_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '妗跺悕绉�', - `prefix` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鍓嶇紑', - `endpoint` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '璁块棶绔欑偣', - `domain` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鑷畾涔夊煙鍚�', - `is_https` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'N' COMMENT '鏄惁https锛圷=鏄�,N=鍚︼級', - `region` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鍩�', - `access_policy` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '妗舵潈闄愮被鍨�(0=private 1=public 2=custom)', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '鏄惁榛樿锛�0=鏄�,1=鍚︼級', - `ext1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鎵╁睍瀛楁', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - PRIMARY KEY (`oss_config_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '瀵硅薄瀛樺偍閰嶇疆琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_oss_config --- ---------------------------- -INSERT INTO `sys_oss_config` VALUES (1, '000000', 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '', 'N', '', '1', '1', '', 103, 1, '2023-05-14 15:19:42', 1, '2023-07-13 23:28:18', NULL); -INSERT INTO `sys_oss_config` VALUES (2, '000000', 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '', 'N', '', '1', '1', '', 103, 1, '2023-05-14 15:19:42', 1, '2023-05-14 15:19:42', NULL); -INSERT INTO `sys_oss_config` VALUES (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '', 'N', '', '1', '1', '', 103, 1, '2023-05-14 15:19:42', 1, '2023-07-13 23:35:23', NULL); -INSERT INTO `sys_oss_config` VALUES (4, '000000', 'qcloud', 'xx', 'xx', 'panda-1253683406', 'panda', 'cos.ap-guangzhou.myqcloud.com', '', 'N', 'ap-guangzhou', '1', '0', '', 103, 1, '2023-05-14 15:19:42', 1, '2023-11-13 23:58:09', ''); -INSERT INTO `sys_oss_config` VALUES (5, '000000', 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '', 'N', '', '1', '1', '', 103, 1, '2023-05-14 15:19:42', 1, '2023-05-14 15:19:42', NULL); - --- ---------------------------- --- Table structure for sys_package_plan --- ---------------------------- -DROP TABLE IF EXISTS `sys_package_plan`; -CREATE TABLE `sys_package_plan` ( - `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '涓婚敭', - `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '濂楅鍚嶇О', - `price` double(10, 2) NOT NULL COMMENT '濂楅浠锋牸', - `duration` int(11) NOT NULL COMMENT '鏈夋晥鏃堕棿', - `plan_detail` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '璁″垝璇︽儏', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1787085903419211779 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '濂楅绠$悊' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_package_plan --- ---------------------------- -INSERT INTO `sys_package_plan` VALUES (1787085620534378498, '鍒濈骇濂楅', 9.90, 30, '瑙i攣鍏ㄩ儴妯″瀷, dall路e 3, midjourney, gpt-3.5-turbo-1106, gpt-4-1106-preview, gpt-4-1106-vision-preview', 103, 1, '2024-05-05 19:43:09', 1, '2024-05-20 00:05:43', '鍒濈骇濂楅'); -INSERT INTO `sys_package_plan` VALUES (1787085808271425538, '涓骇濂楅', 30.00, 30, '瑙i攣鍏ㄩ儴妯″瀷, dall路e 3, midjourney, gpt-3.5-turbo-1106, gpt-4-1106-preview, gpt-4-1106-vision-preview', 103, 1, '2024-05-05 19:43:54', 1, '2024-05-05 22:29:42', '涓骇濂楅'); -INSERT INTO `sys_package_plan` VALUES (1787085903419211778, '楂樼骇濂楅', 60.00, 30, '瑙i攣鍏ㄩ儴妯″瀷, dall路e 3, midjourney, gpt-3.5-turbo-1106, gpt-4-1106-preview, gpt-4-1106-vision-preview', 103, 1, '2024-05-05 19:44:16', 1, '2024-05-05 22:29:45', '楂樼骇濂楅'); - --- ---------------------------- --- Table structure for sys_pay_order --- ---------------------------- -DROP TABLE IF EXISTS `sys_pay_order`; -CREATE TABLE `sys_pay_order` ( - `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '涓婚敭', - `order_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '璁㈠崟缂栧彿', - `order_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '璁㈠崟鍚嶇О', - `amount` decimal(10, 2) NOT NULL COMMENT '閲戦', - `payment_status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏀粯鐘舵��', - `payment_method` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鏀粯鏂瑰紡', - `user_id` bigint(20) NULL DEFAULT NULL COMMENT '鐢ㄦ埛ID', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1794031846814027779 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鏀粯璁㈠崟琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_pay_order --- ---------------------------- - --- ---------------------------- --- Table structure for sys_post --- ---------------------------- -DROP TABLE IF EXISTS `sys_post`; -CREATE TABLE `sys_post` ( - `post_id` bigint(20) NOT NULL COMMENT '宀椾綅ID', - `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', - `post_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '宀椾綅缂栫爜', - `post_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '宀椾綅鍚嶇О', - `post_sort` int(4) NOT NULL COMMENT '鏄剧ず椤哄簭', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐘舵�侊紙0姝e父 1鍋滅敤锛�', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - PRIMARY KEY (`post_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '宀椾綅淇℃伅琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_post --- ---------------------------- -INSERT INTO `sys_post` VALUES (1, '000000', 'ceo', '钁d簨闀�', 1, '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL, ''); -INSERT INTO `sys_post` VALUES (2, '000000', 'se', '椤圭洰缁忕悊', 2, '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL, ''); -INSERT INTO `sys_post` VALUES (3, '000000', 'hr', '浜哄姏璧勬簮', 3, '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL, ''); -INSERT INTO `sys_post` VALUES (4, '000000', 'user', '鏅�氬憳宸�', 4, '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL, ''); - --- ---------------------------- --- Table structure for sys_role --- ---------------------------- -DROP TABLE IF EXISTS `sys_role`; -CREATE TABLE `sys_role` ( - `role_id` bigint(20) NOT NULL COMMENT '瑙掕壊ID', - `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', - `role_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '瑙掕壊鍚嶇О', - `role_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '瑙掕壊鏉冮檺瀛楃涓�', - `role_sort` int(4) NOT NULL COMMENT '鏄剧ず椤哄簭', - `data_scope` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '鏁版嵁鑼冨洿锛�1锛氬叏閮ㄦ暟鎹潈闄� 2锛氳嚜瀹氭暟鎹潈闄� 3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺 4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶級', - `menu_check_strictly` tinyint(1) NULL DEFAULT 1 COMMENT '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�', - `dept_check_strictly` tinyint(1) NULL DEFAULT 1 COMMENT '閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛�', - `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - PRIMARY KEY (`role_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '瑙掕壊淇℃伅琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_role --- ---------------------------- -INSERT INTO `sys_role` VALUES (1, '000000', '瓒呯骇绠$悊鍛�', 'superadmin', 1, '1', 1, 1, '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL, '瓒呯骇绠$悊鍛�'); -INSERT INTO `sys_role` VALUES (2, '000000', '鏅�氳鑹�', 'common', 2, '2', 1, 1, '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL, '鏅�氳鑹�'); -INSERT INTO `sys_role` VALUES (3, '000000', '鏈儴闂ㄥ強浠ヤ笅', 'test1', 3, '4', 1, 1, '0', '0', 103, 1, '2023-05-14 15:20:00', 1, '2023-06-04 10:20:43', NULL); -INSERT INTO `sys_role` VALUES (4, '000000', '浠呮湰浜�', 'test2', 4, '5', 1, 1, '0', '0', 103, 1, '2023-05-14 15:20:00', 1, '2023-06-04 10:21:01', NULL); -INSERT INTO `sys_role` VALUES (1661661183933177857, '000000', '灏忕▼搴忕鐞嗗憳', 'xcxadmin', 1, '1', 1, 1, '0', '0', 103, 1, '2023-05-25 17:11:13', 1, '2023-05-25 17:11:13', ''); -INSERT INTO `sys_role` VALUES (1729685491108446210, '911866', '绠$悊鍛�', 'admin', 1, '1', 1, 1, '0', '0', 103, 1, '2023-11-29 10:15:32', 1, '2023-11-29 10:15:32', NULL); - --- ---------------------------- --- Table structure for sys_role_dept --- ---------------------------- -DROP TABLE IF EXISTS `sys_role_dept`; -CREATE TABLE `sys_role_dept` ( - `role_id` bigint(20) NOT NULL COMMENT '瑙掕壊ID', - `dept_id` bigint(20) NOT NULL COMMENT '閮ㄩ棬ID', - PRIMARY KEY (`role_id`, `dept_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '瑙掕壊鍜岄儴闂ㄥ叧鑱旇〃' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_role_dept --- ---------------------------- -INSERT INTO `sys_role_dept` VALUES (2, 100); -INSERT INTO `sys_role_dept` VALUES (2, 101); -INSERT INTO `sys_role_dept` VALUES (2, 105); -INSERT INTO `sys_role_dept` VALUES (1729685491108446210, 1729685491964084226); - --- ---------------------------- --- Table structure for sys_role_menu --- ---------------------------- -DROP TABLE IF EXISTS `sys_role_menu`; -CREATE TABLE `sys_role_menu` ( - `role_id` bigint(20) NOT NULL COMMENT '瑙掕壊ID', - `menu_id` bigint(20) NOT NULL COMMENT '鑿滃崟ID', - PRIMARY KEY (`role_id`, `menu_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '瑙掕壊鍜岃彍鍗曞叧鑱旇〃' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_role_menu --- ---------------------------- -INSERT INTO `sys_role_menu` VALUES (2, 1); -INSERT INTO `sys_role_menu` VALUES (2, 2); -INSERT INTO `sys_role_menu` VALUES (2, 3); -INSERT INTO `sys_role_menu` VALUES (2, 4); -INSERT INTO `sys_role_menu` VALUES (2, 100); -INSERT INTO `sys_role_menu` VALUES (2, 101); -INSERT INTO `sys_role_menu` VALUES (2, 102); -INSERT INTO `sys_role_menu` VALUES (2, 103); -INSERT INTO `sys_role_menu` VALUES (2, 104); -INSERT INTO `sys_role_menu` VALUES (2, 105); -INSERT INTO `sys_role_menu` VALUES (2, 106); -INSERT INTO `sys_role_menu` VALUES (2, 107); -INSERT INTO `sys_role_menu` VALUES (2, 108); -INSERT INTO `sys_role_menu` VALUES (2, 109); -INSERT INTO `sys_role_menu` VALUES (2, 110); -INSERT INTO `sys_role_menu` VALUES (2, 111); -INSERT INTO `sys_role_menu` VALUES (2, 112); -INSERT INTO `sys_role_menu` VALUES (2, 113); -INSERT INTO `sys_role_menu` VALUES (2, 114); -INSERT INTO `sys_role_menu` VALUES (2, 115); -INSERT INTO `sys_role_menu` VALUES (2, 116); -INSERT INTO `sys_role_menu` VALUES (2, 500); -INSERT INTO `sys_role_menu` VALUES (2, 501); -INSERT INTO `sys_role_menu` VALUES (2, 1000); -INSERT INTO `sys_role_menu` VALUES (2, 1001); -INSERT INTO `sys_role_menu` VALUES (2, 1002); -INSERT INTO `sys_role_menu` VALUES (2, 1003); -INSERT INTO `sys_role_menu` VALUES (2, 1004); -INSERT INTO `sys_role_menu` VALUES (2, 1005); -INSERT INTO `sys_role_menu` VALUES (2, 1006); -INSERT INTO `sys_role_menu` VALUES (2, 1007); -INSERT INTO `sys_role_menu` VALUES (2, 1008); -INSERT INTO `sys_role_menu` VALUES (2, 1009); -INSERT INTO `sys_role_menu` VALUES (2, 1010); -INSERT INTO `sys_role_menu` VALUES (2, 1011); -INSERT INTO `sys_role_menu` VALUES (2, 1012); -INSERT INTO `sys_role_menu` VALUES (2, 1013); -INSERT INTO `sys_role_menu` VALUES (2, 1014); -INSERT INTO `sys_role_menu` VALUES (2, 1015); -INSERT INTO `sys_role_menu` VALUES (2, 1016); -INSERT INTO `sys_role_menu` VALUES (2, 1017); -INSERT INTO `sys_role_menu` VALUES (2, 1018); -INSERT INTO `sys_role_menu` VALUES (2, 1019); -INSERT INTO `sys_role_menu` VALUES (2, 1020); -INSERT INTO `sys_role_menu` VALUES (2, 1021); -INSERT INTO `sys_role_menu` VALUES (2, 1022); -INSERT INTO `sys_role_menu` VALUES (2, 1023); -INSERT INTO `sys_role_menu` VALUES (2, 1024); -INSERT INTO `sys_role_menu` VALUES (2, 1025); -INSERT INTO `sys_role_menu` VALUES (2, 1026); -INSERT INTO `sys_role_menu` VALUES (2, 1027); -INSERT INTO `sys_role_menu` VALUES (2, 1028); -INSERT INTO `sys_role_menu` VALUES (2, 1029); -INSERT INTO `sys_role_menu` VALUES (2, 1030); -INSERT INTO `sys_role_menu` VALUES (2, 1031); -INSERT INTO `sys_role_menu` VALUES (2, 1032); -INSERT INTO `sys_role_menu` VALUES (2, 1033); -INSERT INTO `sys_role_menu` VALUES (2, 1034); -INSERT INTO `sys_role_menu` VALUES (2, 1035); -INSERT INTO `sys_role_menu` VALUES (2, 1036); -INSERT INTO `sys_role_menu` VALUES (2, 1037); -INSERT INTO `sys_role_menu` VALUES (2, 1038); -INSERT INTO `sys_role_menu` VALUES (2, 1039); -INSERT INTO `sys_role_menu` VALUES (2, 1040); -INSERT INTO `sys_role_menu` VALUES (2, 1041); -INSERT INTO `sys_role_menu` VALUES (2, 1042); -INSERT INTO `sys_role_menu` VALUES (2, 1043); -INSERT INTO `sys_role_menu` VALUES (2, 1044); -INSERT INTO `sys_role_menu` VALUES (2, 1045); -INSERT INTO `sys_role_menu` VALUES (2, 1046); -INSERT INTO `sys_role_menu` VALUES (2, 1047); -INSERT INTO `sys_role_menu` VALUES (2, 1048); -INSERT INTO `sys_role_menu` VALUES (2, 1050); -INSERT INTO `sys_role_menu` VALUES (2, 1055); -INSERT INTO `sys_role_menu` VALUES (2, 1056); -INSERT INTO `sys_role_menu` VALUES (2, 1057); -INSERT INTO `sys_role_menu` VALUES (2, 1058); -INSERT INTO `sys_role_menu` VALUES (2, 1059); -INSERT INTO `sys_role_menu` VALUES (2, 1060); -INSERT INTO `sys_role_menu` VALUES (3, 1); -INSERT INTO `sys_role_menu` VALUES (3, 100); -INSERT INTO `sys_role_menu` VALUES (3, 101); -INSERT INTO `sys_role_menu` VALUES (3, 102); -INSERT INTO `sys_role_menu` VALUES (3, 103); -INSERT INTO `sys_role_menu` VALUES (3, 104); -INSERT INTO `sys_role_menu` VALUES (3, 105); -INSERT INTO `sys_role_menu` VALUES (3, 106); -INSERT INTO `sys_role_menu` VALUES (3, 107); -INSERT INTO `sys_role_menu` VALUES (3, 108); -INSERT INTO `sys_role_menu` VALUES (3, 500); -INSERT INTO `sys_role_menu` VALUES (3, 501); -INSERT INTO `sys_role_menu` VALUES (3, 1001); -INSERT INTO `sys_role_menu` VALUES (3, 1002); -INSERT INTO `sys_role_menu` VALUES (3, 1003); -INSERT INTO `sys_role_menu` VALUES (3, 1004); -INSERT INTO `sys_role_menu` VALUES (3, 1005); -INSERT INTO `sys_role_menu` VALUES (3, 1006); -INSERT INTO `sys_role_menu` VALUES (3, 1007); -INSERT INTO `sys_role_menu` VALUES (3, 1008); -INSERT INTO `sys_role_menu` VALUES (3, 1009); -INSERT INTO `sys_role_menu` VALUES (3, 1010); -INSERT INTO `sys_role_menu` VALUES (3, 1011); -INSERT INTO `sys_role_menu` VALUES (3, 1012); -INSERT INTO `sys_role_menu` VALUES (3, 1013); -INSERT INTO `sys_role_menu` VALUES (3, 1014); -INSERT INTO `sys_role_menu` VALUES (3, 1015); -INSERT INTO `sys_role_menu` VALUES (3, 1016); -INSERT INTO `sys_role_menu` VALUES (3, 1017); -INSERT INTO `sys_role_menu` VALUES (3, 1018); -INSERT INTO `sys_role_menu` VALUES (3, 1019); -INSERT INTO `sys_role_menu` VALUES (3, 1020); -INSERT INTO `sys_role_menu` VALUES (3, 1021); -INSERT INTO `sys_role_menu` VALUES (3, 1022); -INSERT INTO `sys_role_menu` VALUES (3, 1023); -INSERT INTO `sys_role_menu` VALUES (3, 1024); -INSERT INTO `sys_role_menu` VALUES (3, 1025); -INSERT INTO `sys_role_menu` VALUES (3, 1026); -INSERT INTO `sys_role_menu` VALUES (3, 1027); -INSERT INTO `sys_role_menu` VALUES (3, 1028); -INSERT INTO `sys_role_menu` VALUES (3, 1029); -INSERT INTO `sys_role_menu` VALUES (3, 1030); -INSERT INTO `sys_role_menu` VALUES (3, 1031); -INSERT INTO `sys_role_menu` VALUES (3, 1032); -INSERT INTO `sys_role_menu` VALUES (3, 1033); -INSERT INTO `sys_role_menu` VALUES (3, 1034); -INSERT INTO `sys_role_menu` VALUES (3, 1035); -INSERT INTO `sys_role_menu` VALUES (3, 1036); -INSERT INTO `sys_role_menu` VALUES (3, 1037); -INSERT INTO `sys_role_menu` VALUES (3, 1038); -INSERT INTO `sys_role_menu` VALUES (3, 1039); -INSERT INTO `sys_role_menu` VALUES (3, 1040); -INSERT INTO `sys_role_menu` VALUES (3, 1041); -INSERT INTO `sys_role_menu` VALUES (3, 1042); -INSERT INTO `sys_role_menu` VALUES (3, 1043); -INSERT INTO `sys_role_menu` VALUES (3, 1044); -INSERT INTO `sys_role_menu` VALUES (3, 1045); -INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1); -INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 100); -INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 107); -INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1001); -INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1002); -INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1003); -INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1004); -INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1005); -INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1006); -INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1007); -INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1036); -INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1037); -INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1038); -INSERT INTO `sys_role_menu` VALUES (1661661183933177857, 1039); -INSERT INTO `sys_role_menu` VALUES (1729685491108446210, 1689201668374556674); -INSERT INTO `sys_role_menu` VALUES (1729685491108446210, 1689205943360188417); -INSERT INTO `sys_role_menu` VALUES (1729685491108446210, 1689243465037561858); -INSERT INTO `sys_role_menu` VALUES (1729685491108446210, 1689243466220355585); - --- ---------------------------- --- Table structure for sys_tenant --- ---------------------------- -DROP TABLE IF EXISTS `sys_tenant`; -CREATE TABLE `sys_tenant` ( - `id` bigint(20) NOT NULL COMMENT 'id', - `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '绉熸埛缂栧彿', - `contact_user_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鑱旂郴浜�', - `contact_phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鑱旂郴鐢佃瘽', - `company_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浼佷笟鍚嶇О', - `license_number` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '缁熶竴绀句細淇$敤浠g爜', - `address` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鍦板潃', - `intro` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浼佷笟绠�浠�', - `domain` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鍩熷悕', - `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - `package_id` bigint(20) NULL DEFAULT NULL COMMENT '绉熸埛濂楅缂栧彿', - `expire_time` datetime NULL DEFAULT NULL COMMENT '杩囨湡鏃堕棿', - `account_count` int(11) NULL DEFAULT -1 COMMENT '鐢ㄦ埛鏁伴噺锛�-1涓嶉檺鍒讹級', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛�', - `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '绉熸埛琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_tenant --- ---------------------------- -INSERT INTO `sys_tenant` VALUES (1, '000000', '绠$悊缁�', '15888888888', 'XXX鏈夐檺鍏徃', NULL, NULL, '澶氱鎴烽�氱敤鍚庡彴绠$悊绠$悊绯荤粺', NULL, NULL, NULL, NULL, -1, '0', '0', 103, 1, '2023-05-14 15:19:39', NULL, NULL); -INSERT INTO `sys_tenant` VALUES (1729685490647072769, '911866', '闄�', '11111111111', '5126', '', '', '', '', '', 1729685389795033090, NULL, 1, '0', '2', 103, 1, '2023-11-29 10:15:32', 1, '2023-11-29 10:15:32'); - --- ---------------------------- --- Table structure for sys_tenant_package --- ---------------------------- -DROP TABLE IF EXISTS `sys_tenant_package`; -CREATE TABLE `sys_tenant_package` ( - `package_id` bigint(20) NOT NULL COMMENT '绉熸埛濂楅id', - `package_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '濂楅鍚嶇О', - `menu_ids` varchar(3000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '鍏宠仈鑿滃崟id', - `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - `menu_check_strictly` tinyint(1) NULL DEFAULT 1 COMMENT '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鐘舵�侊紙0姝e父 1鍋滅敤锛�', - `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - PRIMARY KEY (`package_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '绉熸埛濂楅琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_tenant_package --- ---------------------------- - --- ---------------------------- --- Table structure for sys_user --- ---------------------------- -DROP TABLE IF EXISTS `sys_user`; -CREATE TABLE `sys_user` ( - `user_id` bigint(20) NOT NULL COMMENT '鐢ㄦ埛ID', - `open_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '寰俊鐢ㄦ埛鏍囪瘑', - `user_grade` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鐢ㄦ埛绛夌骇', - `user_balance` double(20, 2) NULL DEFAULT 0.00 COMMENT '璐︽埛浣欓', - `tenant_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '绉熸埛缂栧彿', - `dept_id` bigint(20) NULL DEFAULT NULL COMMENT '閮ㄩ棬ID', - `user_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐢ㄦ埛璐﹀彿', - `nick_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鐢ㄦ埛鏄电О', - `user_type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'sys_user' COMMENT '鐢ㄦ埛绫诲瀷锛坰ys_user绯荤粺鐢ㄦ埛锛�', - `email` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鐢ㄦ埛閭', - `phonenumber` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鎵嬫満鍙风爜', - `sex` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鐢ㄦ埛鎬у埆锛�0鐢� 1濂� 2鏈煡锛�', - `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶村儚鍦板潃', - `wx_avatar` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '寰俊澶村儚鍦板潃', - `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '瀵嗙爜', - `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '甯愬彿鐘舵�侊紙0姝e父 1鍋滅敤锛�', - `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�', - `login_ip` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '鏈�鍚庣櫥褰旾P', - `login_date` datetime NULL DEFAULT NULL COMMENT '鏈�鍚庣櫥褰曟椂闂�', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - PRIMARY KEY (`user_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐢ㄦ埛淇℃伅琛�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_user --- ---------------------------- -INSERT INTO `sys_user` VALUES (1, NULL, '1', 90.00, '00000', 103, 'admin', '鐔婄尗鍔╂墜', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', NULL, NULL, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '0:0:0:0:0:0:0:1', '2024-05-19 23:22:53', 103, 1, '2023-05-14 15:19:39', 1, '2024-05-19 23:22:53', '绠$悊鍛�'); -INSERT INTO `sys_user` VALUES (1784521057603538945, NULL, '1', 99.99, '00000', NULL, 'ageerle@163.com', '鐔婄尗鍔╂墜', 'sys_user', 'ageerle@163.com', '15888888888', '0', 'http://panda-1253683406.cos.ap-guangzhou.myqcloud.com/panda/2024/05/01/62bddbd6c367496fbc6145a3c03ecbc4.jpg', NULL, '$2a$10$PShVg1L1GTMwmrfDZY3yAu5/S5qt6AtzFzPB2CAolJmYIKEOs85X6', '0', '0', '127.0.0.1', '2024-05-27 17:31:13', NULL, NULL, '2024-04-28 17:52:30', 1784521057603538945, '2024-05-27 17:31:13', NULL); - --- ---------------------------- --- Table structure for sys_user_post --- ---------------------------- -DROP TABLE IF EXISTS `sys_user_post`; -CREATE TABLE `sys_user_post` ( - `user_id` bigint(20) NOT NULL COMMENT '鐢ㄦ埛ID', - `post_id` bigint(20) NOT NULL COMMENT '宀椾綅ID', - PRIMARY KEY (`user_id`, `post_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐢ㄦ埛涓庡矖浣嶅叧鑱旇〃' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_user_post --- ---------------------------- -INSERT INTO `sys_user_post` VALUES (1, 1); -INSERT INTO `sys_user_post` VALUES (2, 2); -INSERT INTO `sys_user_post` VALUES (1661660085084250114, 2); -INSERT INTO `sys_user_post` VALUES (1661660804847788034, 1); - --- ---------------------------- --- Table structure for sys_user_role --- ---------------------------- -DROP TABLE IF EXISTS `sys_user_role`; -CREATE TABLE `sys_user_role` ( - `user_id` bigint(20) NOT NULL COMMENT '鐢ㄦ埛ID', - `role_id` bigint(20) NOT NULL COMMENT '瑙掕壊ID', - PRIMARY KEY (`user_id`, `role_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '鐢ㄦ埛鍜岃鑹插叧鑱旇〃' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_user_role --- ---------------------------- -INSERT INTO `sys_user_role` VALUES (1, 1); -INSERT INTO `sys_user_role` VALUES (2, 2); -INSERT INTO `sys_user_role` VALUES (3, 3); -INSERT INTO `sys_user_role` VALUES (4, 4); -INSERT INTO `sys_user_role` VALUES (1661646824293031937, 1661661183933177857); -INSERT INTO `sys_user_role` VALUES (1661660085084250114, 1661661183933177857); -INSERT INTO `sys_user_role` VALUES (1661660804847788034, 2); -INSERT INTO `sys_user_role` VALUES (1713427806956404738, 1); -INSERT INTO `sys_user_role` VALUES (1713439839684689921, 1); -INSERT INTO `sys_user_role` VALUES (1713440206715650049, 1); -INSERT INTO `sys_user_role` VALUES (1713724795803299841, 1); -INSERT INTO `sys_user_role` VALUES (1714176194496339970, 1); -INSERT INTO `sys_user_role` VALUES (1714267685998907393, 1); -INSERT INTO `sys_user_role` VALUES (1714269581270667265, 1); -INSERT INTO `sys_user_role` VALUES (1714270420659949569, 1); -INSERT INTO `sys_user_role` VALUES (1714455864827723777, 1); -INSERT INTO `sys_user_role` VALUES (1714536425072115714, 1); -INSERT INTO `sys_user_role` VALUES (1714819715117105153, 1); -INSERT INTO `sys_user_role` VALUES (1714820415783976961, 1); -INSERT INTO `sys_user_role` VALUES (1714820611611836417, 1); -INSERT INTO `sys_user_role` VALUES (1714820755698761729, 1); -INSERT INTO `sys_user_role` VALUES (1714823588305190914, 1); -INSERT INTO `sys_user_role` VALUES (1714829502936530945, 1); -INSERT INTO `sys_user_role` VALUES (1714835527643185154, 1); -INSERT INTO `sys_user_role` VALUES (1714835835278606337, 1); -INSERT INTO `sys_user_role` VALUES (1714898663033290754, 1); -INSERT INTO `sys_user_role` VALUES (1714942733206175746, 1); -INSERT INTO `sys_user_role` VALUES (1714943378361434113, 1); -INSERT INTO `sys_user_role` VALUES (1714943388671033346, 1); -INSERT INTO `sys_user_role` VALUES (1714945928464711682, 1); -INSERT INTO `sys_user_role` VALUES (1714946100850606082, 1); -INSERT INTO `sys_user_role` VALUES (1714952355237347329, 1); -INSERT INTO `sys_user_role` VALUES (1714954192279584770, 1); -INSERT INTO `sys_user_role` VALUES (1714960721598758913, 1); -INSERT INTO `sys_user_role` VALUES (1714961357132283906, 1); -INSERT INTO `sys_user_role` VALUES (1714963426656403458, 1); -INSERT INTO `sys_user_role` VALUES (1714980339130318850, 1); -INSERT INTO `sys_user_role` VALUES (1714985002550444034, 1); -INSERT INTO `sys_user_role` VALUES (1714996959085084674, 1); -INSERT INTO `sys_user_role` VALUES (1715000784541990913, 1); -INSERT INTO `sys_user_role` VALUES (1715160830886297602, 1); -INSERT INTO `sys_user_role` VALUES (1715174792021426177, 1); -INSERT INTO `sys_user_role` VALUES (1715176760861278209, 1); -INSERT INTO `sys_user_role` VALUES (1715187418688405506, 1); -INSERT INTO `sys_user_role` VALUES (1715263570077564930, 1); -INSERT INTO `sys_user_role` VALUES (1715273299113820162, 1); -INSERT INTO `sys_user_role` VALUES (1715289765028577281, 1); -INSERT INTO `sys_user_role` VALUES (1715642509052624897, 1); -INSERT INTO `sys_user_role` VALUES (1715645217792868353, 1); -INSERT INTO `sys_user_role` VALUES (1715655140035543041, 1); -INSERT INTO `sys_user_role` VALUES (1715688813166346242, 1); -INSERT INTO `sys_user_role` VALUES (1715695623109623810, 1); -INSERT INTO `sys_user_role` VALUES (1716076523383177217, 1); -INSERT INTO `sys_user_role` VALUES (1716077329079615490, 1); -INSERT INTO `sys_user_role` VALUES (1716316658037178370, 1); -INSERT INTO `sys_user_role` VALUES (1716375479287824386, 1); -INSERT INTO `sys_user_role` VALUES (1716376929359380482, 1); -INSERT INTO `sys_user_role` VALUES (1716449431389487106, 1); -INSERT INTO `sys_user_role` VALUES (1716626232627707906, 1); -INSERT INTO `sys_user_role` VALUES (1716668774639484929, 1); -INSERT INTO `sys_user_role` VALUES (1716723582348050434, 1); -INSERT INTO `sys_user_role` VALUES (1717010625036828674, 1); -INSERT INTO `sys_user_role` VALUES (1717112818712723458, 1); -INSERT INTO `sys_user_role` VALUES (1717171039955599361, 1); -INSERT INTO `sys_user_role` VALUES (1717382776042569730, 1); -INSERT INTO `sys_user_role` VALUES (1717383874597896194, 1); -INSERT INTO `sys_user_role` VALUES (1717463477270102018, 1); -INSERT INTO `sys_user_role` VALUES (1717550755342467074, 1); -INSERT INTO `sys_user_role` VALUES (1718643906618605569, 1); -INSERT INTO `sys_user_role` VALUES (1719357065528623105, 1); -INSERT INTO `sys_user_role` VALUES (1719629669720145921, 1); -INSERT INTO `sys_user_role` VALUES (1719631746265530370, 1); -INSERT INTO `sys_user_role` VALUES (1719969371128086529, 1); -INSERT INTO `sys_user_role` VALUES (1719994192431955970, 1); -INSERT INTO `sys_user_role` VALUES (1720001597920264194, 1); -INSERT INTO `sys_user_role` VALUES (1720054174099718145, 1); -INSERT INTO `sys_user_role` VALUES (1720373256426635265, 1); -INSERT INTO `sys_user_role` VALUES (1720615324298264578, 1); -INSERT INTO `sys_user_role` VALUES (1720966085100191746, 1); -INSERT INTO `sys_user_role` VALUES (1721433118342397954, 1); -INSERT INTO `sys_user_role` VALUES (1721798759096270850, 1); -INSERT INTO `sys_user_role` VALUES (1721869407395332097, 1); -INSERT INTO `sys_user_role` VALUES (1721869952080232450, 1); -INSERT INTO `sys_user_role` VALUES (1722083875718737921, 1); -INSERT INTO `sys_user_role` VALUES (1722126825769185282, 1); -INSERT INTO `sys_user_role` VALUES (1722453238653169665, 1); -INSERT INTO `sys_user_role` VALUES (1722501722198552577, 1); -INSERT INTO `sys_user_role` VALUES (1722546398997819394, 1); -INSERT INTO `sys_user_role` VALUES (1722635856464097281, 1); -INSERT INTO `sys_user_role` VALUES (1722652602847768578, 1); -INSERT INTO `sys_user_role` VALUES (1722787874222682114, 1); -INSERT INTO `sys_user_role` VALUES (1722799180870889473, 1); -INSERT INTO `sys_user_role` VALUES (1722872660475817986, 1); -INSERT INTO `sys_user_role` VALUES (1722874592401600514, 1); -INSERT INTO `sys_user_role` VALUES (1722883137289367554, 1); -INSERT INTO `sys_user_role` VALUES (1722918534182645762, 1); -INSERT INTO `sys_user_role` VALUES (1723173295586848769, 1); -INSERT INTO `sys_user_role` VALUES (1723222687891107841, 1); -INSERT INTO `sys_user_role` VALUES (1723224404040921089, 1); -INSERT INTO `sys_user_role` VALUES (1723225015520112641, 1); -INSERT INTO `sys_user_role` VALUES (1723278284531478529, 1); -INSERT INTO `sys_user_role` VALUES (1723330835209564161, 1); -INSERT INTO `sys_user_role` VALUES (1723708198137147393, 1); -INSERT INTO `sys_user_role` VALUES (1723754683843260417, 1); -INSERT INTO `sys_user_role` VALUES (1723878185250369537, 1); -INSERT INTO `sys_user_role` VALUES (1723940614634254337, 1); -INSERT INTO `sys_user_role` VALUES (1723975861757325314, 1); -INSERT INTO `sys_user_role` VALUES (1724306907803725826, 1); -INSERT INTO `sys_user_role` VALUES (1724308252862492673, 1); -INSERT INTO `sys_user_role` VALUES (1724382895124295681, 1); -INSERT INTO `sys_user_role` VALUES (1724727778758406145, 1); -INSERT INTO `sys_user_role` VALUES (1724815478295425026, 1); -INSERT INTO `sys_user_role` VALUES (1725026071145107458, 1); -INSERT INTO `sys_user_role` VALUES (1725026978817658881, 1); -INSERT INTO `sys_user_role` VALUES (1725043562961457154, 1); -INSERT INTO `sys_user_role` VALUES (1725058936893362178, 1); -INSERT INTO `sys_user_role` VALUES (1725363117009162242, 1); -INSERT INTO `sys_user_role` VALUES (1725538633251049474, 1); -INSERT INTO `sys_user_role` VALUES (1725564937467875329, 1); -INSERT INTO `sys_user_role` VALUES (1725891713243021314, 1); -INSERT INTO `sys_user_role` VALUES (1725905000621932546, 1); -INSERT INTO `sys_user_role` VALUES (1726440708294049793, 1); -INSERT INTO `sys_user_role` VALUES (1726443526979584002, 1); -INSERT INTO `sys_user_role` VALUES (1726445663797116929, 1); -INSERT INTO `sys_user_role` VALUES (1726452867329687553, 1); -INSERT INTO `sys_user_role` VALUES (1726472827451998209, 1); -INSERT INTO `sys_user_role` VALUES (1726479651370696705, 1); -INSERT INTO `sys_user_role` VALUES (1726487492674195458, 1); -INSERT INTO `sys_user_role` VALUES (1726496513055784961, 1); -INSERT INTO `sys_user_role` VALUES (1726498781398302722, 1); -INSERT INTO `sys_user_role` VALUES (1726506873632587778, 1); -INSERT INTO `sys_user_role` VALUES (1726529248394739714, 1); -INSERT INTO `sys_user_role` VALUES (1726578079102664705, 1); -INSERT INTO `sys_user_role` VALUES (1726582181383634946, 1); -INSERT INTO `sys_user_role` VALUES (1726583555672506369, 1); -INSERT INTO `sys_user_role` VALUES (1726596448690372609, 1); -INSERT INTO `sys_user_role` VALUES (1726599361261207553, 1); -INSERT INTO `sys_user_role` VALUES (1726604511749079041, 1); -INSERT INTO `sys_user_role` VALUES (1726606973822304258, 1); -INSERT INTO `sys_user_role` VALUES (1726609379524083713, 1); -INSERT INTO `sys_user_role` VALUES (1726616151265640450, 1); -INSERT INTO `sys_user_role` VALUES (1726775811478126594, 1); -INSERT INTO `sys_user_role` VALUES (1726795490141667329, 1); -INSERT INTO `sys_user_role` VALUES (1726798403169681410, 1); -INSERT INTO `sys_user_role` VALUES (1726830794655399937, 1); -INSERT INTO `sys_user_role` VALUES (1726862038013313026, 1); -INSERT INTO `sys_user_role` VALUES (1726919220696186882, 1); -INSERT INTO `sys_user_role` VALUES (1727140184050630658, 1); -INSERT INTO `sys_user_role` VALUES (1727506163368722433, 1); -INSERT INTO `sys_user_role` VALUES (1727518983086931969, 1); -INSERT INTO `sys_user_role` VALUES (1727580969606840321, 1); -INSERT INTO `sys_user_role` VALUES (1727590505323429890, 1); -INSERT INTO `sys_user_role` VALUES (1727918393172164609, 1); -INSERT INTO `sys_user_role` VALUES (1728249002000121857, 1); -INSERT INTO `sys_user_role` VALUES (1728680561446486017, 1); -INSERT INTO `sys_user_role` VALUES (1728964404182577153, 1); -INSERT INTO `sys_user_role` VALUES (1729020459675611137, 1); -INSERT INTO `sys_user_role` VALUES (1729051002043691009, 1); -INSERT INTO `sys_user_role` VALUES (1729423744832172033, 1); -INSERT INTO `sys_user_role` VALUES (1729429590291050497, 1); -INSERT INTO `sys_user_role` VALUES (1729685493222375426, 1729685491108446210); -INSERT INTO `sys_user_role` VALUES (1730050324466036738, 1); -INSERT INTO `sys_user_role` VALUES (1730102403335254018, 1); -INSERT INTO `sys_user_role` VALUES (1730129923250122754, 1); -INSERT INTO `sys_user_role` VALUES (1730155108925763586, 1); -INSERT INTO `sys_user_role` VALUES (1730273428207366145, 1); -INSERT INTO `sys_user_role` VALUES (1730498722784669697, 1); -INSERT INTO `sys_user_role` VALUES (1730815105229713410, 1); -INSERT INTO `sys_user_role` VALUES (1730858886951923714, 1); -INSERT INTO `sys_user_role` VALUES (1731357405659824130, 1); -INSERT INTO `sys_user_role` VALUES (1731475532557090818, 1); -INSERT INTO `sys_user_role` VALUES (1731480953627901953, 1); -INSERT INTO `sys_user_role` VALUES (1731502381106495490, 1); -INSERT INTO `sys_user_role` VALUES (1731524458442162177, 1); -INSERT INTO `sys_user_role` VALUES (1731524630094053377, 1); -INSERT INTO `sys_user_role` VALUES (1731524650293821441, 1); -INSERT INTO `sys_user_role` VALUES (1731529253710233601, 1); -INSERT INTO `sys_user_role` VALUES (1731559936046432258, 1); -INSERT INTO `sys_user_role` VALUES (1731564032228884482, 1); -INSERT INTO `sys_user_role` VALUES (1731565926737281026, 1); -INSERT INTO `sys_user_role` VALUES (1731566918589513729, 1); -INSERT INTO `sys_user_role` VALUES (1731567740094283778, 1); -INSERT INTO `sys_user_role` VALUES (1731575439263563777, 1); -INSERT INTO `sys_user_role` VALUES (1731583864055824385, 1); -INSERT INTO `sys_user_role` VALUES (1731588155382464513, 1); -INSERT INTO `sys_user_role` VALUES (1731589827840212993, 1); -INSERT INTO `sys_user_role` VALUES (1731635461435719682, 1); -INSERT INTO `sys_user_role` VALUES (1731668049902731266, 1); -INSERT INTO `sys_user_role` VALUES (1731922694168412162, 1); -INSERT INTO `sys_user_role` VALUES (1731944975456305153, 1); -INSERT INTO `sys_user_role` VALUES (1731949019394506753, 1); -INSERT INTO `sys_user_role` VALUES (1731951425054343170, 1); -INSERT INTO `sys_user_role` VALUES (1732000242621513729, 1); -INSERT INTO `sys_user_role` VALUES (1732027163380056066, 1); -INSERT INTO `sys_user_role` VALUES (1732289382269353985, 1); -INSERT INTO `sys_user_role` VALUES (1732289439282528258, 1); -INSERT INTO `sys_user_role` VALUES (1732289699585228801, 1); -INSERT INTO `sys_user_role` VALUES (1732290827173527553, 1); -INSERT INTO `sys_user_role` VALUES (1732291549344595969, 1); -INSERT INTO `sys_user_role` VALUES (1732293265184030721, 1); -INSERT INTO `sys_user_role` VALUES (1732329664117506049, 1); -INSERT INTO `sys_user_role` VALUES (1732334104450990081, 1); -INSERT INTO `sys_user_role` VALUES (1732578671045672962, 1); -INSERT INTO `sys_user_role` VALUES (1732584047426174978, 1); -INSERT INTO `sys_user_role` VALUES (1732608690321129474, 1); -INSERT INTO `sys_user_role` VALUES (1732678147815014401, 1); -INSERT INTO `sys_user_role` VALUES (1732731410102910977, 1); -INSERT INTO `sys_user_role` VALUES (1733005266763939841, 1); -INSERT INTO `sys_user_role` VALUES (1733016149837774850, 1); -INSERT INTO `sys_user_role` VALUES (1733053523871432705, 1); -INSERT INTO `sys_user_role` VALUES (1733061400367497218, 1); -INSERT INTO `sys_user_role` VALUES (1733167090469732353, 1); -INSERT INTO `sys_user_role` VALUES (1733298702729641986, 1); -INSERT INTO `sys_user_role` VALUES (1733488544511983617, 1); -INSERT INTO `sys_user_role` VALUES (1733720554119659521, 1); -INSERT INTO `sys_user_role` VALUES (1733846657777827842, 1); -INSERT INTO `sys_user_role` VALUES (1733859832720031745, 1); -INSERT INTO `sys_user_role` VALUES (1734137817339559938, 1); -INSERT INTO `sys_user_role` VALUES (1734227535762849793, 1); -INSERT INTO `sys_user_role` VALUES (1734492373726560257, 1); -INSERT INTO `sys_user_role` VALUES (1734508040978726914, 1); -INSERT INTO `sys_user_role` VALUES (1734513545461661697, 1); -INSERT INTO `sys_user_role` VALUES (1734581580998451202, 1); -INSERT INTO `sys_user_role` VALUES (1734751884580298754, 1); -INSERT INTO `sys_user_role` VALUES (1734781716483612674, 1); -INSERT INTO `sys_user_role` VALUES (1734833221987278849, 1); -INSERT INTO `sys_user_role` VALUES (1734834063154946050, 1); -INSERT INTO `sys_user_role` VALUES (1734880697666576386, 1); -INSERT INTO `sys_user_role` VALUES (1734891995888427009, 1); -INSERT INTO `sys_user_role` VALUES (1735132534701367297, 1); -INSERT INTO `sys_user_role` VALUES (1735242647239991298, 1); -INSERT INTO `sys_user_role` VALUES (1735486862444273666, 1); -INSERT INTO `sys_user_role` VALUES (1735487912727355394, 1); -INSERT INTO `sys_user_role` VALUES (1735542352767426561, 1); -INSERT INTO `sys_user_role` VALUES (1735551915889598466, 1); -INSERT INTO `sys_user_role` VALUES (1735616653411557377, 1); -INSERT INTO `sys_user_role` VALUES (1735835864146714626, 1); -INSERT INTO `sys_user_role` VALUES (1735953007769100289, 1); -INSERT INTO `sys_user_role` VALUES (1735960189784891393, 1); -INSERT INTO `sys_user_role` VALUES (1736265950381547522, 1); -INSERT INTO `sys_user_role` VALUES (1736577606684844034, 1); -INSERT INTO `sys_user_role` VALUES (1736638822375563266, 1); -INSERT INTO `sys_user_role` VALUES (1736779069306511361, 1); -INSERT INTO `sys_user_role` VALUES (1737028378602053634, 1); -INSERT INTO `sys_user_role` VALUES (1737271234797314050, 1); -INSERT INTO `sys_user_role` VALUES (1737315322405920770, 1); -INSERT INTO `sys_user_role` VALUES (1737445221154234370, 1); -INSERT INTO `sys_user_role` VALUES (1737452907568635906, 1); -INSERT INTO `sys_user_role` VALUES (1737453186955419649, 1); -INSERT INTO `sys_user_role` VALUES (1737717777685880833, 1); -INSERT INTO `sys_user_role` VALUES (1737768515594166274, 1); -INSERT INTO `sys_user_role` VALUES (1738108912170246145, 1); -INSERT INTO `sys_user_role` VALUES (1738118086488825858, 1); -INSERT INTO `sys_user_role` VALUES (1738520430804279297, 1); -INSERT INTO `sys_user_role` VALUES (1738802060248817666, 1); -INSERT INTO `sys_user_role` VALUES (1738812447119712257, 1); -INSERT INTO `sys_user_role` VALUES (1738941480197234689, 1); -INSERT INTO `sys_user_role` VALUES (1738963430776840194, 1); -INSERT INTO `sys_user_role` VALUES (1739121784341995522, 1); -INSERT INTO `sys_user_role` VALUES (1739166931951886338, 1); -INSERT INTO `sys_user_role` VALUES (1739272055240073217, 1); -INSERT INTO `sys_user_role` VALUES (1739451838930427905, 1); -INSERT INTO `sys_user_role` VALUES (1739452037375533057, 1); -INSERT INTO `sys_user_role` VALUES (1739452376946384898, 1); -INSERT INTO `sys_user_role` VALUES (1739484503888961537, 1); -INSERT INTO `sys_user_role` VALUES (1739485282335006722, 1); -INSERT INTO `sys_user_role` VALUES (1739577551431999490, 1); -INSERT INTO `sys_user_role` VALUES (1739825609910591489, 1); -INSERT INTO `sys_user_role` VALUES (1739916453439152130, 1); -INSERT INTO `sys_user_role` VALUES (1740188388454629378, 1); -INSERT INTO `sys_user_role` VALUES (1741339991320580097, 1); -INSERT INTO `sys_user_role` VALUES (1741803737633542145, 1); -INSERT INTO `sys_user_role` VALUES (1741823858229923841, 1); -INSERT INTO `sys_user_role` VALUES (1741845883943227393, 1); -INSERT INTO `sys_user_role` VALUES (1742179775941201921, 1); -INSERT INTO `sys_user_role` VALUES (1742437553771458562, 1); -INSERT INTO `sys_user_role` VALUES (1742451201315254273, 1); -INSERT INTO `sys_user_role` VALUES (1742469913120419841, 1); -INSERT INTO `sys_user_role` VALUES (1742798283280568321, 1); -INSERT INTO `sys_user_role` VALUES (1742798987701342210, 1); -INSERT INTO `sys_user_role` VALUES (1742799476950126594, 1); -INSERT INTO `sys_user_role` VALUES (1742799839619010562, 1); -INSERT INTO `sys_user_role` VALUES (1742801019527057410, 1); -INSERT INTO `sys_user_role` VALUES (1742804073915699202, 1); -INSERT INTO `sys_user_role` VALUES (1742821280687149058, 1); -INSERT INTO `sys_user_role` VALUES (1742821467476283394, 1); -INSERT INTO `sys_user_role` VALUES (1742822775600009217, 1); -INSERT INTO `sys_user_role` VALUES (1742823890928357377, 1); -INSERT INTO `sys_user_role` VALUES (1742838225297821697, 1); -INSERT INTO `sys_user_role` VALUES (1742902317295423490, 1); -INSERT INTO `sys_user_role` VALUES (1742910854243373058, 1); -INSERT INTO `sys_user_role` VALUES (1742961994725150721, 1); -INSERT INTO `sys_user_role` VALUES (1742969861079388161, 1); -INSERT INTO `sys_user_role` VALUES (1743068363130228737, 1); -INSERT INTO `sys_user_role` VALUES (1743075924621479938, 1); -INSERT INTO `sys_user_role` VALUES (1743079200725225474, 1); -INSERT INTO `sys_user_role` VALUES (1743085878682144769, 1); -INSERT INTO `sys_user_role` VALUES (1743110774967586818, 1); -INSERT INTO `sys_user_role` VALUES (1743162481042870274, 1); -INSERT INTO `sys_user_role` VALUES (1743166491284033537, 1); -INSERT INTO `sys_user_role` VALUES (1743251016219447297, 1); -INSERT INTO `sys_user_role` VALUES (1743469820367142914, 1); -INSERT INTO `sys_user_role` VALUES (1743514389280522242, 1); -INSERT INTO `sys_user_role` VALUES (1743519646916083714, 1); -INSERT INTO `sys_user_role` VALUES (1743670356026654722, 1); -INSERT INTO `sys_user_role` VALUES (1743892570516815874, 1); -INSERT INTO `sys_user_role` VALUES (1743952049409146882, 1); -INSERT INTO `sys_user_role` VALUES (1744268693259993089, 1); -INSERT INTO `sys_user_role` VALUES (1744351384550567938, 1); -INSERT INTO `sys_user_role` VALUES (1744561041202278402, 1); -INSERT INTO `sys_user_role` VALUES (1744574752277196801, 1); -INSERT INTO `sys_user_role` VALUES (1744619123995373569, 1); -INSERT INTO `sys_user_role` VALUES (1744627110742913025, 1); -INSERT INTO `sys_user_role` VALUES (1744634408357916673, 1); -INSERT INTO `sys_user_role` VALUES (1744645281965207554, 1); -INSERT INTO `sys_user_role` VALUES (1744724410316156930, 1); -INSERT INTO `sys_user_role` VALUES (1744892307919400962, 1); -INSERT INTO `sys_user_role` VALUES (1744903174606090241, 1); -INSERT INTO `sys_user_role` VALUES (1744904968014983169, 1); -INSERT INTO `sys_user_role` VALUES (1744905787204497410, 1); -INSERT INTO `sys_user_role` VALUES (1744911513595473921, 1); -INSERT INTO `sys_user_role` VALUES (1744912178359103490, 1); -INSERT INTO `sys_user_role` VALUES (1744912486720139266, 1); -INSERT INTO `sys_user_role` VALUES (1744915552240463874, 1); -INSERT INTO `sys_user_role` VALUES (1744923917133869058, 1); -INSERT INTO `sys_user_role` VALUES (1744971513579761666, 1); -INSERT INTO `sys_user_role` VALUES (1744984070818426882, 1); -INSERT INTO `sys_user_role` VALUES (1744984147393835010, 1); -INSERT INTO `sys_user_role` VALUES (1744992401243041793, 1); -INSERT INTO `sys_user_role` VALUES (1745011131444424706, 1); -INSERT INTO `sys_user_role` VALUES (1745061549180514306, 1); -INSERT INTO `sys_user_role` VALUES (1745346479991091201, 1); -INSERT INTO `sys_user_role` VALUES (1745346822607007745, 1); -INSERT INTO `sys_user_role` VALUES (1745368346374217730, 1); -INSERT INTO `sys_user_role` VALUES (1745424741765259266, 1); -INSERT INTO `sys_user_role` VALUES (1745426757090582530, 1); -INSERT INTO `sys_user_role` VALUES (1745620173124575234, 1); -INSERT INTO `sys_user_role` VALUES (1745623876426571777, 1); -INSERT INTO `sys_user_role` VALUES (1745654577691664386, 1); -INSERT INTO `sys_user_role` VALUES (1745663259879972865, 1); -INSERT INTO `sys_user_role` VALUES (1745686038692012034, 1); -INSERT INTO `sys_user_role` VALUES (1745738268480675842, 1); -INSERT INTO `sys_user_role` VALUES (1745790952546017281, 1); -INSERT INTO `sys_user_role` VALUES (1746397384551211009, 1); -INSERT INTO `sys_user_role` VALUES (1746400980533551105, 1); -INSERT INTO `sys_user_role` VALUES (1746522414111039489, 1); -INSERT INTO `sys_user_role` VALUES (1746873386528223234, 1); -INSERT INTO `sys_user_role` VALUES (1747067318369333249, 1); -INSERT INTO `sys_user_role` VALUES (1747071365822361602, 1); -INSERT INTO `sys_user_role` VALUES (1747153912031948801, 1); -INSERT INTO `sys_user_role` VALUES (1747197655195922434, 1); -INSERT INTO `sys_user_role` VALUES (1747519480203390977, 1); -INSERT INTO `sys_user_role` VALUES (1747521265550831618, 1); -INSERT INTO `sys_user_role` VALUES (1747523421662162945, 1); -INSERT INTO `sys_user_role` VALUES (1747797864993075201, 1); -INSERT INTO `sys_user_role` VALUES (1747800427213697025, 1); -INSERT INTO `sys_user_role` VALUES (1747910191046275073, 1); -INSERT INTO `sys_user_role` VALUES (1747923453217419265, 1); -INSERT INTO `sys_user_role` VALUES (1748187110132232193, 1); -INSERT INTO `sys_user_role` VALUES (1748260926648823809, 1); -INSERT INTO `sys_user_role` VALUES (1748276826697445377, 1); -INSERT INTO `sys_user_role` VALUES (1748312313952808962, 1); -INSERT INTO `sys_user_role` VALUES (1748635584837529601, 1); -INSERT INTO `sys_user_role` VALUES (1748642479459610625, 1); -INSERT INTO `sys_user_role` VALUES (1748663294624346114, 1); -INSERT INTO `sys_user_role` VALUES (1748703876608503810, 1); -INSERT INTO `sys_user_role` VALUES (1748704145589219329, 1); -INSERT INTO `sys_user_role` VALUES (1748708285178523649, 1); -INSERT INTO `sys_user_role` VALUES (1748728575929430017, 1); -INSERT INTO `sys_user_role` VALUES (1748761666442047490, 1); -INSERT INTO `sys_user_role` VALUES (1748925826178035713, 1); -INSERT INTO `sys_user_role` VALUES (1749259130492235778, 1); -INSERT INTO `sys_user_role` VALUES (1749280237328871426, 1); -INSERT INTO `sys_user_role` VALUES (1749289400549322754, 1); -INSERT INTO `sys_user_role` VALUES (1749327661225291778, 1); -INSERT INTO `sys_user_role` VALUES (1749365593797636097, 1); -INSERT INTO `sys_user_role` VALUES (1749407786692325378, 1); -INSERT INTO `sys_user_role` VALUES (1749519043344805890, 1); -INSERT INTO `sys_user_role` VALUES (1749683041063219202, 1); -INSERT INTO `sys_user_role` VALUES (1749683546774646786, 1); -INSERT INTO `sys_user_role` VALUES (1749691765567860737, 1); -INSERT INTO `sys_user_role` VALUES (1749705571236917249, 1); -INSERT INTO `sys_user_role` VALUES (1749740828837359618, 1); -INSERT INTO `sys_user_role` VALUES (1749741179162406914, 1); -INSERT INTO `sys_user_role` VALUES (1749741340039131137, 1); -INSERT INTO `sys_user_role` VALUES (1749747618241130497, 1); -INSERT INTO `sys_user_role` VALUES (1749747701439344641, 1); -INSERT INTO `sys_user_role` VALUES (1749786825391157250, 1); -INSERT INTO `sys_user_role` VALUES (1749789665819963394, 1); -INSERT INTO `sys_user_role` VALUES (1749797707705823234, 1); -INSERT INTO `sys_user_role` VALUES (1749974903762210818, 1); -INSERT INTO `sys_user_role` VALUES (1749982777750081537, 1); -INSERT INTO `sys_user_role` VALUES (1749990634667134978, 1); -INSERT INTO `sys_user_role` VALUES (1749991325137653761, 1); -INSERT INTO `sys_user_role` VALUES (1749992779328016386, 1); -INSERT INTO `sys_user_role` VALUES (1749993573204905985, 1); -INSERT INTO `sys_user_role` VALUES (1749994406877351937, 1); -INSERT INTO `sys_user_role` VALUES (1749995279187726337, 1); -INSERT INTO `sys_user_role` VALUES (1749995486029828097, 1); -INSERT INTO `sys_user_role` VALUES (1749995707686211586, 1); -INSERT INTO `sys_user_role` VALUES (1750000406883749890, 1); -INSERT INTO `sys_user_role` VALUES (1750000942706085889, 1); -INSERT INTO `sys_user_role` VALUES (1750005079111913473, 1); -INSERT INTO `sys_user_role` VALUES (1750428606466117633, 1); -INSERT INTO `sys_user_role` VALUES (1750553534423126017, 1); -INSERT INTO `sys_user_role` VALUES (1750690119441469441, 1); -INSERT INTO `sys_user_role` VALUES (1750723725312413698, 1); -INSERT INTO `sys_user_role` VALUES (1750724537434525697, 1); -INSERT INTO `sys_user_role` VALUES (1750743381616119810, 1); -INSERT INTO `sys_user_role` VALUES (1750822931356192769, 1); -INSERT INTO `sys_user_role` VALUES (1750823004563574785, 1); -INSERT INTO `sys_user_role` VALUES (1751548639330177026, 1); -INSERT INTO `sys_user_role` VALUES (1751796140318658561, 1); -INSERT INTO `sys_user_role` VALUES (1751889049818763265, 1); -INSERT INTO `sys_user_role` VALUES (1751896081141600258, 1); -INSERT INTO `sys_user_role` VALUES (1751949653564723201, 1); -INSERT INTO `sys_user_role` VALUES (1751955373517443073, 1); -INSERT INTO `sys_user_role` VALUES (1751980511470292993, 1); -INSERT INTO `sys_user_role` VALUES (1752128867307884546, 1); -INSERT INTO `sys_user_role` VALUES (1752128948195037185, 1); -INSERT INTO `sys_user_role` VALUES (1752138835683708930, 1); -INSERT INTO `sys_user_role` VALUES (1752148500127682561, 1); -INSERT INTO `sys_user_role` VALUES (1752276638077816834, 1); -INSERT INTO `sys_user_role` VALUES (1752299834210521089, 1); -INSERT INTO `sys_user_role` VALUES (1752306117726703618, 1); -INSERT INTO `sys_user_role` VALUES (1752504006021222402, 1); -INSERT INTO `sys_user_role` VALUES (1752602885546840066, 1); -INSERT INTO `sys_user_role` VALUES (1752724639351050242, 1); -INSERT INTO `sys_user_role` VALUES (1753215436756357122, 1); -INSERT INTO `sys_user_role` VALUES (1753402656570216449, 1); -INSERT INTO `sys_user_role` VALUES (1753486557368029185, 1); -INSERT INTO `sys_user_role` VALUES (1753797902466551809, 1); -INSERT INTO `sys_user_role` VALUES (1753967757819908098, 1); -INSERT INTO `sys_user_role` VALUES (1754016754462887938, 1); -INSERT INTO `sys_user_role` VALUES (1754029247868440577, 1); -INSERT INTO `sys_user_role` VALUES (1754413960445562882, 1); -INSERT INTO `sys_user_role` VALUES (1754424078633537538, 1); -INSERT INTO `sys_user_role` VALUES (1754764137119354881, 1); -INSERT INTO `sys_user_role` VALUES (1755042084761899009, 1); -INSERT INTO `sys_user_role` VALUES (1755047141691625473, 1); -INSERT INTO `sys_user_role` VALUES (1756274975479173121, 1); -INSERT INTO `sys_user_role` VALUES (1756308183021260801, 1); -INSERT INTO `sys_user_role` VALUES (1757325877958938626, 1); -INSERT INTO `sys_user_role` VALUES (1758445439802675202, 1); -INSERT INTO `sys_user_role` VALUES (1759032628991234049, 1); -INSERT INTO `sys_user_role` VALUES (1759050804781125634, 1); -INSERT INTO `sys_user_role` VALUES (1759089524834045954, 1); -INSERT INTO `sys_user_role` VALUES (1759092949802029057, 1); -INSERT INTO `sys_user_role` VALUES (1759100324189573121, 1); -INSERT INTO `sys_user_role` VALUES (1759103449889771521, 1); -INSERT INTO `sys_user_role` VALUES (1759147026191749121, 1); -INSERT INTO `sys_user_role` VALUES (1759413482020147202, 1); -INSERT INTO `sys_user_role` VALUES (1759427862430486529, 1); -INSERT INTO `sys_user_role` VALUES (1759428010174844929, 1); -INSERT INTO `sys_user_role` VALUES (1759496088514465794, 1); -INSERT INTO `sys_user_role` VALUES (1759764705965510657, 1); -INSERT INTO `sys_user_role` VALUES (1759777481207320578, 1); -INSERT INTO `sys_user_role` VALUES (1759806155667279873, 1); -INSERT INTO `sys_user_role` VALUES (1759812015655227394, 1); -INSERT INTO `sys_user_role` VALUES (1759815447778693121, 1); -INSERT INTO `sys_user_role` VALUES (1759832486966726658, 1); -INSERT INTO `sys_user_role` VALUES (1759858071113830402, 1); -INSERT INTO `sys_user_role` VALUES (1759863475847827458, 1); -INSERT INTO `sys_user_role` VALUES (1759868018195173378, 1); -INSERT INTO `sys_user_role` VALUES (1759869729374736385, 1); -INSERT INTO `sys_user_role` VALUES (1760186079276175362, 1); -INSERT INTO `sys_user_role` VALUES (1760319626808922114, 1); -INSERT INTO `sys_user_role` VALUES (1760347236137963522, 1); -INSERT INTO `sys_user_role` VALUES (1760358546837868546, 1); -INSERT INTO `sys_user_role` VALUES (1760377107434180609, 1); -INSERT INTO `sys_user_role` VALUES (1760472305161998338, 1); -INSERT INTO `sys_user_role` VALUES (1760472829932343298, 1); -INSERT INTO `sys_user_role` VALUES (1760477732188721153, 1); -INSERT INTO `sys_user_role` VALUES (1760502088176504833, 1); -INSERT INTO `sys_user_role` VALUES (1760508166310203394, 1); -INSERT INTO `sys_user_role` VALUES (1760511294409543681, 1); -INSERT INTO `sys_user_role` VALUES (1760562604135682049, 1); -INSERT INTO `sys_user_role` VALUES (1760841877480280066, 1); -INSERT INTO `sys_user_role` VALUES (1760896840365510658, 1); -INSERT INTO `sys_user_role` VALUES (1760903600501428226, 1); -INSERT INTO `sys_user_role` VALUES (1761404022634844162, 1); -INSERT INTO `sys_user_role` VALUES (1761954868732891138, 1); -INSERT INTO `sys_user_role` VALUES (1761955584197267458, 1); -INSERT INTO `sys_user_role` VALUES (1762003524345401345, 1); -INSERT INTO `sys_user_role` VALUES (1762004833618366465, 1); -INSERT INTO `sys_user_role` VALUES (1762010183880937474, 1); -INSERT INTO `sys_user_role` VALUES (1762298283890839554, 1); -INSERT INTO `sys_user_role` VALUES (1762363188014747649, 1); -INSERT INTO `sys_user_role` VALUES (1762389902388367361, 1); -INSERT INTO `sys_user_role` VALUES (1762401081961746434, 1); -INSERT INTO `sys_user_role` VALUES (1762481911417540610, 1); -INSERT INTO `sys_user_role` VALUES (1762482221645041665, 1); -INSERT INTO `sys_user_role` VALUES (1762482243174404097, 1); -INSERT INTO `sys_user_role` VALUES (1762483838461153282, 1); -INSERT INTO `sys_user_role` VALUES (1762487212380262401, 1); -INSERT INTO `sys_user_role` VALUES (1762498553535008770, 1); -INSERT INTO `sys_user_role` VALUES (1762636163465138177, 1); -INSERT INTO `sys_user_role` VALUES (1762655625413185537, 1); -INSERT INTO `sys_user_role` VALUES (1762656108559257601, 1); -INSERT INTO `sys_user_role` VALUES (1762673833499217922, 1); -INSERT INTO `sys_user_role` VALUES (1762677825344163842, 1); -INSERT INTO `sys_user_role` VALUES (1762677876015550465, 1); -INSERT INTO `sys_user_role` VALUES (1762678082262061057, 1); -INSERT INTO `sys_user_role` VALUES (1762678138012749825, 1); -INSERT INTO `sys_user_role` VALUES (1762678144652333057, 1); -INSERT INTO `sys_user_role` VALUES (1762678174192816129, 1); -INSERT INTO `sys_user_role` VALUES (1762678472563019777, 1); -INSERT INTO `sys_user_role` VALUES (1762678534596775938, 1); -INSERT INTO `sys_user_role` VALUES (1762678534894571521, 1); -INSERT INTO `sys_user_role` VALUES (1762678581635895298, 1); -INSERT INTO `sys_user_role` VALUES (1762678844920745985, 1); -INSERT INTO `sys_user_role` VALUES (1762679194973163522, 1); -INSERT INTO `sys_user_role` VALUES (1762679425299173378, 1); -INSERT INTO `sys_user_role` VALUES (1762679810776682498, 1); -INSERT INTO `sys_user_role` VALUES (1762679862656028674, 1); -INSERT INTO `sys_user_role` VALUES (1762679937360777217, 1); -INSERT INTO `sys_user_role` VALUES (1762680184698884098, 1); -INSERT INTO `sys_user_role` VALUES (1762680290076577794, 1); -INSERT INTO `sys_user_role` VALUES (1762680350055124993, 1); -INSERT INTO `sys_user_role` VALUES (1762681014038614017, 1); -INSERT INTO `sys_user_role` VALUES (1762681042207559681, 1); -INSERT INTO `sys_user_role` VALUES (1762681082732924929, 1); -INSERT INTO `sys_user_role` VALUES (1762681088869191682, 1); -INSERT INTO `sys_user_role` VALUES (1762681283195490306, 1); -INSERT INTO `sys_user_role` VALUES (1762681876752420865, 1); -INSERT INTO `sys_user_role` VALUES (1762681980129431553, 1); -INSERT INTO `sys_user_role` VALUES (1762682038488977410, 1); -INSERT INTO `sys_user_role` VALUES (1762682208211488769, 1); -INSERT INTO `sys_user_role` VALUES (1762683406603833346, 1); -INSERT INTO `sys_user_role` VALUES (1762683500048732162, 1); -INSERT INTO `sys_user_role` VALUES (1762683740843724801, 1); -INSERT INTO `sys_user_role` VALUES (1762683806404890625, 1); -INSERT INTO `sys_user_role` VALUES (1762684131715108865, 1); -INSERT INTO `sys_user_role` VALUES (1762684408442703874, 1); -INSERT INTO `sys_user_role` VALUES (1762684686994821121, 1); -INSERT INTO `sys_user_role` VALUES (1762686405808017409, 1); -INSERT INTO `sys_user_role` VALUES (1762687370061729794, 1); -INSERT INTO `sys_user_role` VALUES (1762687537527705602, 1); -INSERT INTO `sys_user_role` VALUES (1762687814947360769, 1); -INSERT INTO `sys_user_role` VALUES (1762688734347186177, 1); -INSERT INTO `sys_user_role` VALUES (1762690035701305346, 1); -INSERT INTO `sys_user_role` VALUES (1762690104575971330, 1); -INSERT INTO `sys_user_role` VALUES (1762691273243283457, 1); -INSERT INTO `sys_user_role` VALUES (1762691277462753282, 1); -INSERT INTO `sys_user_role` VALUES (1762692468406013954, 1); -INSERT INTO `sys_user_role` VALUES (1762693304498573314, 1); -INSERT INTO `sys_user_role` VALUES (1762693710704332801, 1); -INSERT INTO `sys_user_role` VALUES (1762694382220791809, 1); -INSERT INTO `sys_user_role` VALUES (1762696242545610754, 1); -INSERT INTO `sys_user_role` VALUES (1762696275626086402, 1); -INSERT INTO `sys_user_role` VALUES (1762696945854894082, 1); -INSERT INTO `sys_user_role` VALUES (1762698940057702402, 1); -INSERT INTO `sys_user_role` VALUES (1762699511732948994, 1); -INSERT INTO `sys_user_role` VALUES (1762701338956320769, 1); -INSERT INTO `sys_user_role` VALUES (1762701352860438530, 1); -INSERT INTO `sys_user_role` VALUES (1762703221934575617, 1); -INSERT INTO `sys_user_role` VALUES (1762705239214444546, 1); -INSERT INTO `sys_user_role` VALUES (1762705858788642817, 1); -INSERT INTO `sys_user_role` VALUES (1762706220585111553, 1); -INSERT INTO `sys_user_role` VALUES (1762707979655237633, 1); -INSERT INTO `sys_user_role` VALUES (1762709372369686529, 1); -INSERT INTO `sys_user_role` VALUES (1762717698755186689, 1); -INSERT INTO `sys_user_role` VALUES (1762719280540471297, 1); -INSERT INTO `sys_user_role` VALUES (1762719395619590146, 1); -INSERT INTO `sys_user_role` VALUES (1762721161459322881, 1); -INSERT INTO `sys_user_role` VALUES (1762721300685049857, 1); -INSERT INTO `sys_user_role` VALUES (1762724284441612290, 1); -INSERT INTO `sys_user_role` VALUES (1762728759105474561, 1); -INSERT INTO `sys_user_role` VALUES (1762732886506131458, 1); -INSERT INTO `sys_user_role` VALUES (1762744418904354818, 1); -INSERT INTO `sys_user_role` VALUES (1762749711537188865, 1); -INSERT INTO `sys_user_role` VALUES (1762749741056700418, 1); -INSERT INTO `sys_user_role` VALUES (1762750396991320065, 1); -INSERT INTO `sys_user_role` VALUES (1762752966828797954, 1); -INSERT INTO `sys_user_role` VALUES (1762753464445218817, 1); -INSERT INTO `sys_user_role` VALUES (1762753558548623362, 1); -INSERT INTO `sys_user_role` VALUES (1762755306625478657, 1); -INSERT INTO `sys_user_role` VALUES (1762756726481268737, 1); -INSERT INTO `sys_user_role` VALUES (1762756744172843010, 1); -INSERT INTO `sys_user_role` VALUES (1762760948073410562, 1); -INSERT INTO `sys_user_role` VALUES (1762768424588062721, 1); -INSERT INTO `sys_user_role` VALUES (1762770353779159041, 1); -INSERT INTO `sys_user_role` VALUES (1762770690174922754, 1); -INSERT INTO `sys_user_role` VALUES (1762773352299671554, 1); -INSERT INTO `sys_user_role` VALUES (1762809323107954689, 1); -INSERT INTO `sys_user_role` VALUES (1762839585439133698, 1); -INSERT INTO `sys_user_role` VALUES (1762854389474177026, 1); -INSERT INTO `sys_user_role` VALUES (1762962461110611969, 1); -INSERT INTO `sys_user_role` VALUES (1763011242199920642, 1); -INSERT INTO `sys_user_role` VALUES (1763014994155843586, 1); -INSERT INTO `sys_user_role` VALUES (1763017291741048833, 1); -INSERT INTO `sys_user_role` VALUES (1763021759299760129, 1); -INSERT INTO `sys_user_role` VALUES (1763033286434140162, 1); -INSERT INTO `sys_user_role` VALUES (1763034914528735233, 1); -INSERT INTO `sys_user_role` VALUES (1763039329885138945, 1); -INSERT INTO `sys_user_role` VALUES (1763046791925248001, 1); -INSERT INTO `sys_user_role` VALUES (1763059898533851137, 1); -INSERT INTO `sys_user_role` VALUES (1763074956366229505, 1); -INSERT INTO `sys_user_role` VALUES (1763083906738335746, 1); -INSERT INTO `sys_user_role` VALUES (1763087371808059394, 1); -INSERT INTO `sys_user_role` VALUES (1763110723763351554, 1); -INSERT INTO `sys_user_role` VALUES (1763119583433633794, 1); -INSERT INTO `sys_user_role` VALUES (1763121912195100674, 1); -INSERT INTO `sys_user_role` VALUES (1763150617374142466, 1); -INSERT INTO `sys_user_role` VALUES (1763219512067928065, 1); -INSERT INTO `sys_user_role` VALUES (1763232955600777217, 1); -INSERT INTO `sys_user_role` VALUES (1763234635201425410, 1); -INSERT INTO `sys_user_role` VALUES (1763246126281568257, 1); -INSERT INTO `sys_user_role` VALUES (1763323873230106626, 1); -INSERT INTO `sys_user_role` VALUES (1763384782623387650, 1); -INSERT INTO `sys_user_role` VALUES (1763386804647014401, 1); -INSERT INTO `sys_user_role` VALUES (1763396269777661953, 1); -INSERT INTO `sys_user_role` VALUES (1763405607485353985, 1); -INSERT INTO `sys_user_role` VALUES (1763432831823425537, 1); -INSERT INTO `sys_user_role` VALUES (1763453676952268802, 1); -INSERT INTO `sys_user_role` VALUES (1763456811204653057, 1); -INSERT INTO `sys_user_role` VALUES (1763461579713064962, 1); -INSERT INTO `sys_user_role` VALUES (1763491204732379137, 1); -INSERT INTO `sys_user_role` VALUES (1763497378051612674, 1); -INSERT INTO `sys_user_role` VALUES (1763559058706096130, 1); -INSERT INTO `sys_user_role` VALUES (1763577018824876033, 1); -INSERT INTO `sys_user_role` VALUES (1763633124087521281, 1); -INSERT INTO `sys_user_role` VALUES (1763886812869775362, 1); -INSERT INTO `sys_user_role` VALUES (1763913997563285506, 1); -INSERT INTO `sys_user_role` VALUES (1764173595432013826, 1); -INSERT INTO `sys_user_role` VALUES (1764261292183998465, 1); -INSERT INTO `sys_user_role` VALUES (1764287995094585346, 1); -INSERT INTO `sys_user_role` VALUES (1764461290695774209, 1); -INSERT INTO `sys_user_role` VALUES (1764474718197993473, 1); -INSERT INTO `sys_user_role` VALUES (1764482496870305794, 1); -INSERT INTO `sys_user_role` VALUES (1764495637402439682, 1); -INSERT INTO `sys_user_role` VALUES (1764498159743619073, 1); -INSERT INTO `sys_user_role` VALUES (1764498751559913473, 1); -INSERT INTO `sys_user_role` VALUES (1764514945641828354, 1); -INSERT INTO `sys_user_role` VALUES (1764519088087453698, 1); -INSERT INTO `sys_user_role` VALUES (1764520899728986114, 1); -INSERT INTO `sys_user_role` VALUES (1764525084016988161, 1); -INSERT INTO `sys_user_role` VALUES (1764539443405475842, 1); -INSERT INTO `sys_user_role` VALUES (1764564174649249794, 1); -INSERT INTO `sys_user_role` VALUES (1764583176607977474, 1); -INSERT INTO `sys_user_role` VALUES (1764607755468505089, 1); -INSERT INTO `sys_user_role` VALUES (1764634462757920770, 1); -INSERT INTO `sys_user_role` VALUES (1764827973771915265, 1); -INSERT INTO `sys_user_role` VALUES (1764831906313596929, 1); -INSERT INTO `sys_user_role` VALUES (1764857801929715713, 1); -INSERT INTO `sys_user_role` VALUES (1764882243925913602, 1); -INSERT INTO `sys_user_role` VALUES (1764897874259816449, 1); -INSERT INTO `sys_user_role` VALUES (1764945289142677505, 1); -INSERT INTO `sys_user_role` VALUES (1764973230396354562, 1); -INSERT INTO `sys_user_role` VALUES (1765026702110044161, 1); -INSERT INTO `sys_user_role` VALUES (1765029529888829441, 1); -INSERT INTO `sys_user_role` VALUES (1765032464647532546, 1); -INSERT INTO `sys_user_role` VALUES (1765189908342321154, 1); -INSERT INTO `sys_user_role` VALUES (1765214567611838465, 1); -INSERT INTO `sys_user_role` VALUES (1765219002413035521, 1); -INSERT INTO `sys_user_role` VALUES (1765220951434801153, 1); -INSERT INTO `sys_user_role` VALUES (1765248990147325954, 1); -INSERT INTO `sys_user_role` VALUES (1765249652247572481, 1); -INSERT INTO `sys_user_role` VALUES (1765256689840893953, 1); -INSERT INTO `sys_user_role` VALUES (1765258070287003649, 1); -INSERT INTO `sys_user_role` VALUES (1765276219292069890, 1); -INSERT INTO `sys_user_role` VALUES (1765276256986279938, 1); -INSERT INTO `sys_user_role` VALUES (1765288006737539074, 1); -INSERT INTO `sys_user_role` VALUES (1765312970979094529, 1); -INSERT INTO `sys_user_role` VALUES (1765626857976840193, 1); -INSERT INTO `sys_user_role` VALUES (1765662415604236289, 1); -INSERT INTO `sys_user_role` VALUES (1765673187432546306, 1); -INSERT INTO `sys_user_role` VALUES (1765733893087510530, 1); -INSERT INTO `sys_user_role` VALUES (1765927148689326081, 1); -INSERT INTO `sys_user_role` VALUES (1765946481549279233, 1); -INSERT INTO `sys_user_role` VALUES (1765987575418880002, 1); -INSERT INTO `sys_user_role` VALUES (1765991619675848705, 1); -INSERT INTO `sys_user_role` VALUES (1765997037533822977, 1); -INSERT INTO `sys_user_role` VALUES (1766008273063411714, 1); -INSERT INTO `sys_user_role` VALUES (1766011496348286978, 1); -INSERT INTO `sys_user_role` VALUES (1766017335771561986, 1); -INSERT INTO `sys_user_role` VALUES (1766020112446947329, 1); -INSERT INTO `sys_user_role` VALUES (1766085955713269762, 1); -INSERT INTO `sys_user_role` VALUES (1766102635604639746, 1); -INSERT INTO `sys_user_role` VALUES (1766323008493355009, 1); -INSERT INTO `sys_user_role` VALUES (1766387294112612353, 1); -INSERT INTO `sys_user_role` VALUES (1766842982618136577, 1); -INSERT INTO `sys_user_role` VALUES (1767018925722730497, 1); -INSERT INTO `sys_user_role` VALUES (1767098572703563778, 1); -INSERT INTO `sys_user_role` VALUES (1767193870939488258, 1); -INSERT INTO `sys_user_role` VALUES (1767371461667356673, 1); -INSERT INTO `sys_user_role` VALUES (1767472876167397377, 1); -INSERT INTO `sys_user_role` VALUES (1767484503956684801, 1); -INSERT INTO `sys_user_role` VALUES (1767494435045146626, 1); -INSERT INTO `sys_user_role` VALUES (1767502928200368129, 1); -INSERT INTO `sys_user_role` VALUES (1767790695329333250, 1); -INSERT INTO `sys_user_role` VALUES (1767797421759823874, 1); -INSERT INTO `sys_user_role` VALUES (1767867514107756545, 1); -INSERT INTO `sys_user_role` VALUES (1768123513418842114, 1); -INSERT INTO `sys_user_role` VALUES (1768125846164897794, 1); -INSERT INTO `sys_user_role` VALUES (1768137512021688322, 1); -INSERT INTO `sys_user_role` VALUES (1768172797870768129, 1); -INSERT INTO `sys_user_role` VALUES (1768257272084463617, 1); -INSERT INTO `sys_user_role` VALUES (1768452168263172097, 1); -INSERT INTO `sys_user_role` VALUES (1768487959811096578, 1); -INSERT INTO `sys_user_role` VALUES (1768522172358754306, 1); -INSERT INTO `sys_user_role` VALUES (1768523379651411969, 1); -INSERT INTO `sys_user_role` VALUES (1768528826072596482, 1); -INSERT INTO `sys_user_role` VALUES (1768554562896560130, 1); -INSERT INTO `sys_user_role` VALUES (1768560191165988866, 1); -INSERT INTO `sys_user_role` VALUES (1768560307197214722, 1); -INSERT INTO `sys_user_role` VALUES (1768561334289989633, 1); -INSERT INTO `sys_user_role` VALUES (1768565063735083009, 1); -INSERT INTO `sys_user_role` VALUES (1768570261782167553, 1); -INSERT INTO `sys_user_role` VALUES (1768598711431626753, 1); -INSERT INTO `sys_user_role` VALUES (1768635967806668802, 1); -INSERT INTO `sys_user_role` VALUES (1768887604487946241, 1); -INSERT INTO `sys_user_role` VALUES (1768911351987077122, 1); -INSERT INTO `sys_user_role` VALUES (1769186172289449986, 1); -INSERT INTO `sys_user_role` VALUES (1769408371134857218, 1); -INSERT INTO `sys_user_role` VALUES (1769520576635371521, 1); -INSERT INTO `sys_user_role` VALUES (1769561862704758786, 1); -INSERT INTO `sys_user_role` VALUES (1769569234722521089, 1); -INSERT INTO `sys_user_role` VALUES (1769607528399273986, 1); -INSERT INTO `sys_user_role` VALUES (1769617177890553857, 1); -INSERT INTO `sys_user_role` VALUES (1769663440459694082, 1); -INSERT INTO `sys_user_role` VALUES (1769908456541233154, 1); -INSERT INTO `sys_user_role` VALUES (1769957357877043201, 1); -INSERT INTO `sys_user_role` VALUES (1770021611783168002, 1); -INSERT INTO `sys_user_role` VALUES (1770063295095087106, 1); -INSERT INTO `sys_user_role` VALUES (1770063700436819970, 1); -INSERT INTO `sys_user_role` VALUES (1770281104395837442, 1); -INSERT INTO `sys_user_role` VALUES (1770288338521661441, 1); -INSERT INTO `sys_user_role` VALUES (1770322814056333313, 1); -INSERT INTO `sys_user_role` VALUES (1770338641849679874, 1); -INSERT INTO `sys_user_role` VALUES (1770351581952802817, 1); -INSERT INTO `sys_user_role` VALUES (1770357305466486786, 1); -INSERT INTO `sys_user_role` VALUES (1770364755406028802, 1); -INSERT INTO `sys_user_role` VALUES (1770381062524436482, 1); -INSERT INTO `sys_user_role` VALUES (1770470677998534657, 1); -INSERT INTO `sys_user_role` VALUES (1770642413331218434, 1); -INSERT INTO `sys_user_role` VALUES (1770648858382630914, 1); -INSERT INTO `sys_user_role` VALUES (1770715116272680962, 1); -INSERT INTO `sys_user_role` VALUES (1770720646688997377, 1); -INSERT INTO `sys_user_role` VALUES (1770726609303175170, 1); -INSERT INTO `sys_user_role` VALUES (1770757521378181121, 1); -INSERT INTO `sys_user_role` VALUES (1770759021907214338, 1); -INSERT INTO `sys_user_role` VALUES (1771002145573240833, 1); -INSERT INTO `sys_user_role` VALUES (1771019340902629377, 1); -INSERT INTO `sys_user_role` VALUES (1771085212270788610, 1); -INSERT INTO `sys_user_role` VALUES (1771091102206066689, 1); -INSERT INTO `sys_user_role` VALUES (1771105696307806210, 1); -INSERT INTO `sys_user_role` VALUES (1771529088861274114, 1); -INSERT INTO `sys_user_role` VALUES (1772148936234565634, 1); -INSERT INTO `sys_user_role` VALUES (1772170742823714818, 1); -INSERT INTO `sys_user_role` VALUES (1772173596070313986, 1); -INSERT INTO `sys_user_role` VALUES (1772181791232819201, 1); -INSERT INTO `sys_user_role` VALUES (1772807697592832001, 1); -INSERT INTO `sys_user_role` VALUES (1772821509767254018, 1); -INSERT INTO `sys_user_role` VALUES (1772947270113251330, 1); -INSERT INTO `sys_user_role` VALUES (1773149840576434178, 1); -INSERT INTO `sys_user_role` VALUES (1773180693536919554, 1); -INSERT INTO `sys_user_role` VALUES (1773192472325345282, 1); -INSERT INTO `sys_user_role` VALUES (1773200350612377601, 1); -INSERT INTO `sys_user_role` VALUES (1773307685607395329, 1); -INSERT INTO `sys_user_role` VALUES (1773529379840282625, 1); -INSERT INTO `sys_user_role` VALUES (1773543535003914241, 1); -INSERT INTO `sys_user_role` VALUES (1773615949826052097, 1); -INSERT INTO `sys_user_role` VALUES (1773714968015278082, 1); -INSERT INTO `sys_user_role` VALUES (1773741523022123010, 1); -INSERT INTO `sys_user_role` VALUES (1773774290929848321, 1); -INSERT INTO `sys_user_role` VALUES (1773969452180258818, 1); -INSERT INTO `sys_user_role` VALUES (1774094144111198210, 1); -INSERT INTO `sys_user_role` VALUES (1774326191970926594, 1); -INSERT INTO `sys_user_role` VALUES (1774595110106685441, 1); -INSERT INTO `sys_user_role` VALUES (1774603290157113346, 1); -INSERT INTO `sys_user_role` VALUES (1774671916088287233, 1); -INSERT INTO `sys_user_role` VALUES (1774712059876728833, 1); -INSERT INTO `sys_user_role` VALUES (1775005868787359746, 1); -INSERT INTO `sys_user_role` VALUES (1775039514470637569, 1); -INSERT INTO `sys_user_role` VALUES (1775046202846208002, 1); -INSERT INTO `sys_user_role` VALUES (1775055115012399106, 1); -INSERT INTO `sys_user_role` VALUES (1775058985780371458, 1); -INSERT INTO `sys_user_role` VALUES (1775066829695082497, 1); -INSERT INTO `sys_user_role` VALUES (1775078808497283074, 1); -INSERT INTO `sys_user_role` VALUES (1775109977754427393, 1); -INSERT INTO `sys_user_role` VALUES (1775109977771204609, 1); -INSERT INTO `sys_user_role` VALUES (1775192704981786626, 1); -INSERT INTO `sys_user_role` VALUES (1775421589681987586, 1); -INSERT INTO `sys_user_role` VALUES (1776124571507613697, 1); -INSERT INTO `sys_user_role` VALUES (1776550027549597698, 1); -INSERT INTO `sys_user_role` VALUES (1776815081159254018, 1); -INSERT INTO `sys_user_role` VALUES (1776827459129171969, 1); -INSERT INTO `sys_user_role` VALUES (1776861348769947650, 1); -INSERT INTO `sys_user_role` VALUES (1776864185373548546, 1); -INSERT INTO `sys_user_role` VALUES (1776871215274516482, 1); -INSERT INTO `sys_user_role` VALUES (1776872376396275714, 1); -INSERT INTO `sys_user_role` VALUES (1776889562355589122, 1); -INSERT INTO `sys_user_role` VALUES (1777118704363757570, 1); -INSERT INTO `sys_user_role` VALUES (1777126438664527874, 1); -INSERT INTO `sys_user_role` VALUES (1777157190659727362, 1); -INSERT INTO `sys_user_role` VALUES (1777217669537062914, 1); -INSERT INTO `sys_user_role` VALUES (1777220647320936449, 1); -INSERT INTO `sys_user_role` VALUES (1777252116550508545, 1); -INSERT INTO `sys_user_role` VALUES (1777260896986193921, 1); -INSERT INTO `sys_user_role` VALUES (1777296499484254210, 1); -INSERT INTO `sys_user_role` VALUES (1777301747972038657, 1); -INSERT INTO `sys_user_role` VALUES (1777363539016409089, 1); -INSERT INTO `sys_user_role` VALUES (1777483372982820866, 1); -INSERT INTO `sys_user_role` VALUES (1777537906459402242, 1); -INSERT INTO `sys_user_role` VALUES (1777610641428570114, 1); -INSERT INTO `sys_user_role` VALUES (1777613556604067842, 1); -INSERT INTO `sys_user_role` VALUES (1777718773123244034, 1); -INSERT INTO `sys_user_role` VALUES (1777743939492503554, 1); -INSERT INTO `sys_user_role` VALUES (1777887539056467969, 1); -INSERT INTO `sys_user_role` VALUES (1777887799262699521, 1); -INSERT INTO `sys_user_role` VALUES (1777890253115088897, 1); -INSERT INTO `sys_user_role` VALUES (1777909423068274689, 1); -INSERT INTO `sys_user_role` VALUES (1777930481544585218, 1); -INSERT INTO `sys_user_role` VALUES (1777954050559303681, 1); -INSERT INTO `sys_user_role` VALUES (1778078614597525506, 1); -INSERT INTO `sys_user_role` VALUES (1778307871026307073, 1); -INSERT INTO `sys_user_role` VALUES (1778341191034462209, 1); -INSERT INTO `sys_user_role` VALUES (1778352526686281729, 1); -INSERT INTO `sys_user_role` VALUES (1778591039688138754, 1); -INSERT INTO `sys_user_role` VALUES (1778625241280274433, 1); -INSERT INTO `sys_user_role` VALUES (1778645603636338689, 1); -INSERT INTO `sys_user_role` VALUES (1779329016437530626, 1); -INSERT INTO `sys_user_role` VALUES (1779509451201306625, 1); -INSERT INTO `sys_user_role` VALUES (1781359789389049858, 1); -INSERT INTO `sys_user_role` VALUES (1781463900025450497, 1); -INSERT INTO `sys_user_role` VALUES (1781519961809940482, 1); -INSERT INTO `sys_user_role` VALUES (1781570458679963650, 1); -INSERT INTO `sys_user_role` VALUES (1781679536911609858, 1); -INSERT INTO `sys_user_role` VALUES (1781680345497923586, 1); -INSERT INTO `sys_user_role` VALUES (1781938051479711745, 1); -INSERT INTO `sys_user_role` VALUES (1781979644345659393, 1); -INSERT INTO `sys_user_role` VALUES (1781982608724537345, 1); -INSERT INTO `sys_user_role` VALUES (1782339521316294658, 1); -INSERT INTO `sys_user_role` VALUES (1782584811885596674, 1); -INSERT INTO `sys_user_role` VALUES (1782597966938411009, 1); -INSERT INTO `sys_user_role` VALUES (1782598345608564738, 1); -INSERT INTO `sys_user_role` VALUES (1782599696132509698, 1); -INSERT INTO `sys_user_role` VALUES (1782655923667505153, 1); -INSERT INTO `sys_user_role` VALUES (1782658558470557698, 1); -INSERT INTO `sys_user_role` VALUES (1782697212870037505, 1); -INSERT INTO `sys_user_role` VALUES (1782711689380270082, 1); -INSERT INTO `sys_user_role` VALUES (1782733890905083906, 1); -INSERT INTO `sys_user_role` VALUES (1782734018948796418, 1); -INSERT INTO `sys_user_role` VALUES (1782741134992379906, 1); -INSERT INTO `sys_user_role` VALUES (1782926062560382978, 1); -INSERT INTO `sys_user_role` VALUES (1782941277477834753, 1); -INSERT INTO `sys_user_role` VALUES (1782982532157050881, 1); -INSERT INTO `sys_user_role` VALUES (1783068876598317057, 1); -INSERT INTO `sys_user_role` VALUES (1783086777506107393, 1); -INSERT INTO `sys_user_role` VALUES (1783144268357079041, 1); -INSERT INTO `sys_user_role` VALUES (1783297415947915265, 1); -INSERT INTO `sys_user_role` VALUES (1783310569679523841, 1); -INSERT INTO `sys_user_role` VALUES (1783326930816372738, 1); -INSERT INTO `sys_user_role` VALUES (1783358421143293953, 1); -INSERT INTO `sys_user_role` VALUES (1783421941125910530, 1); -INSERT INTO `sys_user_role` VALUES (1783439451980206081, 1); -INSERT INTO `sys_user_role` VALUES (1783471940098494466, 1); -INSERT INTO `sys_user_role` VALUES (1783777388311777281, 1); -INSERT INTO `sys_user_role` VALUES (1783796572785643521, 1); -INSERT INTO `sys_user_role` VALUES (1783877442208960514, 1); -INSERT INTO `sys_user_role` VALUES (1784199358216048642, 1); -INSERT INTO `sys_user_role` VALUES (1784389326918029313, 1); -INSERT INTO `sys_user_role` VALUES (1784400528377286657, 1); -INSERT INTO `sys_user_role` VALUES (1784435756558880770, 1); -INSERT INTO `sys_user_role` VALUES (1784457537797656577, 1); -INSERT INTO `sys_user_role` VALUES (1784521057603538945, 1); -INSERT INTO `sys_user_role` VALUES (1784522252246724609, 1); -INSERT INTO `sys_user_role` VALUES (1784548227567202306, 1); -INSERT INTO `sys_user_role` VALUES (1784569508068995073, 1); -INSERT INTO `sys_user_role` VALUES (1784777389905162242, 1); -INSERT INTO `sys_user_role` VALUES (1784783910114308097, 1); -INSERT INTO `sys_user_role` VALUES (1784821184902344705, 1); -INSERT INTO `sys_user_role` VALUES (1784838825360633858, 1); -INSERT INTO `sys_user_role` VALUES (1784870260805087233, 1); -INSERT INTO `sys_user_role` VALUES (1784910451020279810, 1); -INSERT INTO `sys_user_role` VALUES (1785130539233193985, 1); -INSERT INTO `sys_user_role` VALUES (1785240710601125890, 1); -INSERT INTO `sys_user_role` VALUES (1785360485289439233, 1); -INSERT INTO `sys_user_role` VALUES (1785588726424023041, 1); -INSERT INTO `sys_user_role` VALUES (1785975035152019458, 1); -INSERT INTO `sys_user_role` VALUES (1786448824117735425, 1); -INSERT INTO `sys_user_role` VALUES (1787036511853850625, 1); -INSERT INTO `sys_user_role` VALUES (1787040098730356738, 1); -INSERT INTO `sys_user_role` VALUES (1787442869522636802, 1); -INSERT INTO `sys_user_role` VALUES (1787802087576530946, 1); -INSERT INTO `sys_user_role` VALUES (1787878100067119105, 1); -INSERT INTO `sys_user_role` VALUES (1788016335816716290, 1); -INSERT INTO `sys_user_role` VALUES (1788135951385718786, 1); -INSERT INTO `sys_user_role` VALUES (1788136924611047425, 1); -INSERT INTO `sys_user_role` VALUES (1788564791958401026, 1); -INSERT INTO `sys_user_role` VALUES (1788861563763126273, 1); -INSERT INTO `sys_user_role` VALUES (1789104577664217090, 1); -INSERT INTO `sys_user_role` VALUES (1789215891946434561, 1); -INSERT INTO `sys_user_role` VALUES (1789891068120231937, 1); -INSERT INTO `sys_user_role` VALUES (1789916787885961218, 1); -INSERT INTO `sys_user_role` VALUES (1790285085844664322, 1); -INSERT INTO `sys_user_role` VALUES (1790395963663413250, 1); -INSERT INTO `sys_user_role` VALUES (1790626495441698817, 1); -INSERT INTO `sys_user_role` VALUES (1790733204311015425, 1); -INSERT INTO `sys_user_role` VALUES (1790747738857832449, 1); -INSERT INTO `sys_user_role` VALUES (1790893072141549570, 1); -INSERT INTO `sys_user_role` VALUES (1790953693902045186, 1); -INSERT INTO `sys_user_role` VALUES (1790986267617689601, 1); -INSERT INTO `sys_user_role` VALUES (1791058271444172801, 1); -INSERT INTO `sys_user_role` VALUES (1791123542645178370, 1); -INSERT INTO `sys_user_role` VALUES (1791170948304764929, 1); -INSERT INTO `sys_user_role` VALUES (1791173160204533762, 1); -INSERT INTO `sys_user_role` VALUES (1791181681805524994, 1); -INSERT INTO `sys_user_role` VALUES (1791184448041287681, 1); -INSERT INTO `sys_user_role` VALUES (1791281872491544578, 1); -INSERT INTO `sys_user_role` VALUES (1791281970680201217, 1); -INSERT INTO `sys_user_role` VALUES (1791283037744693249, 1); -INSERT INTO `sys_user_role` VALUES (1791285337913589762, 1); -INSERT INTO `sys_user_role` VALUES (1791289816255856641, 1); -INSERT INTO `sys_user_role` VALUES (1791296357612683266, 1); -INSERT INTO `sys_user_role` VALUES (1791299213191315457, 1); -INSERT INTO `sys_user_role` VALUES (1791308308178829314, 1); -INSERT INTO `sys_user_role` VALUES (1791318977032781826, 1); -INSERT INTO `sys_user_role` VALUES (1791371260403687425, 1); -INSERT INTO `sys_user_role` VALUES (1791387421707116546, 1); -INSERT INTO `sys_user_role` VALUES (1791447204858470402, 1); -INSERT INTO `sys_user_role` VALUES (1791729117863124993, 1); -INSERT INTO `sys_user_role` VALUES (1793165965818912770, 1); -INSERT INTO `sys_user_role` VALUES (1793568337082740737, 1); -INSERT INTO `sys_user_role` VALUES (1794560044937154561, 1); -INSERT INTO `sys_user_role` VALUES (1794749939555143681, 1); - --- ---------------------------- --- Table structure for wx_rob_config --- ---------------------------- -DROP TABLE IF EXISTS `wx_rob_config`; -CREATE TABLE `wx_rob_config` ( - `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '涓婚敭', - `user_id` bigint(20) NULL DEFAULT NULL COMMENT '鎵�灞炵敤鎴�', - `bot_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '鏈哄櫒浜哄悕绉�', - `unique_key` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鏈哄櫒鍞竴鐮�', - `default_friend` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '\0' COMMENT '榛樿濂藉弸鍥炲寮�鍏�', - `default_group` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '\0' COMMENT '榛樿缇ゅ洖澶嶅紑鍏�', - `enable` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '鏈哄櫒浜虹姸鎬� 0姝e父 1鍚敤', - `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓閮ㄩ棬', - `create_by` bigint(20) NULL DEFAULT NULL COMMENT '鍒涘缓鑰�', - `create_time` datetime NULL DEFAULT NULL COMMENT '鍒涘缓鏃堕棿', - `update_by` bigint(20) NULL DEFAULT NULL COMMENT '鏇存柊鑰�', - `update_time` datetime NULL DEFAULT NULL COMMENT '鏇存柊鏃堕棿', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '澶囨敞', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `udx_wx_rob_config_uniquekey`(`unique_key`) USING BTREE, - UNIQUE INDEX `udx_wx_name`(`bot_name`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1791353611728023554 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '寰俊鏈哄櫒浜洪厤缃�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of wx_rob_config --- ---------------------------- - --- ---------------------------- --- Table structure for wx_rob_keyword --- ---------------------------- -DROP TABLE IF EXISTS `wx_rob_keyword`; -CREATE TABLE `wx_rob_keyword` ( - `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, - `unique_key` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鏈哄櫒鍞竴鐮�', - `key_data` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鍏抽敭璇�', - `value_data` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鍥炲鍐呭', - `type_data` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鍥炲绫诲瀷', - `nick_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '鐩爣鏄电О', - `to_group` bit(1) NOT NULL DEFAULT b'1' COMMENT '缇�1濂藉弸0', - `enable` bit(1) NOT NULL DEFAULT b'1' COMMENT '鍚敤1绂佺敤0', - `create_time` datetime NOT NULL COMMENT '鍒涘缓鏃堕棿', - PRIMARY KEY (`id`) USING BTREE, - INDEX `idx_wx_rob_keyword_unikey`(`unique_key`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '寰俊鍏抽敭璇�' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of wx_rob_keyword --- ---------------------------- - -SET FOREIGN_KEY_CHECKS = 1; diff --git a/script/docker/weaviate/docker-compose.yml b/script/docker/weaviate/docker-compose.yml new file mode 100644 index 0000000..b43bd5d --- /dev/null +++ b/script/docker/weaviate/docker-compose.yml @@ -0,0 +1,28 @@ +--- +version: '3.4' +services: + weaviate: + command: + - --host + - 0.0.0.0 + - --port + - '6038' + - --scheme + - http + image: cr.weaviate.io/semitechnologies/weaviate:1.19.7 + ports: + - 6038:6038 + - 50051:50051 + volumes: + - weaviate_data:/var/lib/weaviate + restart: on-failure:0 + environment: + QUERY_DEFAULTS_LIMIT: 25 + AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true' + PERSISTENCE_DATA_PATH: '/var/lib/weaviate' + DEFAULT_VECTORIZER_MODULE: 'none' + ENABLE_MODULES: 'text2vec-cohere,text2vec-huggingface,text2vec-palm,text2vec-openai,generative-openai,generative-cohere,generative-palm,ref2vec-centroid,reranker-cohere,qna-openai' + CLUSTER_HOSTNAME: 'node1' +volumes: + weaviate_data: +... diff --git a/script/sql/oracle/oracle_ry_vue_5.X.sql b/script/sql/oracle/oracle_ry_vue_5.X.sql deleted file mode 100644 index 0456f11..0000000 --- a/script/sql/oracle/oracle_ry_vue_5.X.sql +++ /dev/null @@ -1,1119 +0,0 @@ --- ---------------------------- --- 绉熸埛琛� --- ---------------------------- -create table sys_tenant ( - id number(20) not null, - tenant_id varchar2(20) not null, - contact_user_name varchar2(20) default '', - contact_phone varchar2(20) default '', - company_name varchar2(50) default '', - license_number varchar2(30) default '', - address varchar2(200) default '', - intro varchar2(200) default '', - domain varchar2(200) default '', - remark varchar2(200) default '', - package_id number(20) default null, - expire_time date default null, - account_count number(4) default -1, - status char(1) default '0', - del_flag char(1) default '0', - create_dept number(20) default null, - create_by number(20) default null, - create_time date, - update_by number(20) default null, - update_time date -); - -alter table sys_tenant add constraint pk_sys_tenant primary key (id); - -comment on table sys_tenant is '绉熸埛琛�'; -comment on column sys_tenant.tenant_id is '绉熸埛缂栧彿'; -comment on column sys_tenant.contact_phone is '鑱旂郴鐢佃瘽'; -comment on column sys_tenant.company_name is '浼佷笟鍚嶇О'; -comment on column sys_tenant.company_name is '鑱旂郴浜�'; -comment on column sys_tenant.license_number is '缁熶竴绀句細淇$敤浠g爜'; -comment on column sys_tenant.address is '鍦板潃'; -comment on column sys_tenant.intro is '浼佷笟绠�浠�'; -comment on column sys_tenant.remark is '澶囨敞'; -comment on column sys_tenant.package_id is '绉熸埛濂楅缂栧彿'; -comment on column sys_tenant.expire_time is '杩囨湡鏃堕棿'; -comment on column sys_tenant.account_count is '鐢ㄦ埛鏁伴噺锛�-1涓嶉檺鍒讹級'; -comment on column sys_tenant.status is '绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛�'; -comment on column sys_tenant.del_flag is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�'; -comment on column sys_tenant.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_tenant.create_by is '鍒涘缓鑰�'; -comment on column sys_tenant.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_tenant.update_by is '鏇存柊鑰�'; -comment on column sys_tenant.update_time is '鏇存柊鏃堕棿'; - --- ---------------------------- --- 鍒濆鍖�-绉熸埛琛ㄦ暟鎹� --- ---------------------------- - -insert into sys_tenant values(1, '000000', '绠$悊缁�', '15888888888', 'XXX鏈夐檺鍏徃', null, null, '澶氱鎴烽�氱敤鍚庡彴绠$悊绠$悊绯荤粺', null, null, null, null, -1, '0', '0', 103, 1, sysdate, null, null); - - --- ---------------------------- --- 绉熸埛濂楅琛� --- ---------------------------- -create table sys_tenant_package ( - package_id number(20) not null, - package_name varchar2(20) default '', - menu_ids varchar2(3000) default '', - remark varchar2(200) default '', - menu_check_strictly number(1) default 1, - status char(1) default '0', - del_flag char(1) default '0', - create_dept number(20) default null, - create_by number(20) default null, - create_time date, - update_by number(20) default null, - update_time date -); - -alter table sys_tenant_package add constraint pk_sys_tenant_package primary key (package_id); - -comment on table sys_tenant_package is '绉熸埛濂楅琛�'; -comment on column sys_tenant_package.package_id is '绉熸埛濂楅id'; -comment on column sys_tenant_package.package_name is '濂楅鍚嶇О'; -comment on column sys_tenant_package.menu_ids is '鍏宠仈鑿滃崟id'; -comment on column sys_tenant_package.remark is '澶囨敞'; -comment on column sys_tenant_package.status is '鐘舵�侊紙0姝e父 1鍋滅敤锛�'; -comment on column sys_tenant_package.del_flag is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�'; -comment on column sys_tenant_package.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_tenant_package.create_by is '鍒涘缓鑰�'; -comment on column sys_tenant_package.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_tenant_package.update_by is '鏇存柊鑰�'; -comment on column sys_tenant_package.update_time is '鏇存柊鏃堕棿'; - - --- ---------------------------- --- 1銆侀儴闂ㄨ〃 --- ---------------------------- -create table sys_dept ( - dept_id number(20) not null, - tenant_id varchar2(20) default '000000', - parent_id number(20) default 0, - ancestors varchar2(500) default '', - dept_name varchar2(30) default '', - order_num number(4) default 0, - leader varchar2(20) default null, - phone varchar2(11) default null, - email varchar2(50) default null, - status char(1) default '0', - del_flag char(1) default '0', - create_dept number(20) default null, - create_by number(20) default null, - create_time date, - update_by number(20) default null, - update_time date -); - -alter table sys_dept add constraint pk_sys_dept primary key (dept_id); - -comment on table sys_dept is '閮ㄩ棬琛�'; -comment on column sys_dept.dept_id is '閮ㄩ棬id'; -comment on column sys_dept.tenant_id is '绉熸埛缂栧彿'; -comment on column sys_dept.parent_id is '鐖堕儴闂╥d'; -comment on column sys_dept.ancestors is '绁栫骇鍒楄〃'; -comment on column sys_dept.dept_name is '閮ㄩ棬鍚嶇О'; -comment on column sys_dept.order_num is '鏄剧ず椤哄簭'; -comment on column sys_dept.leader is '璐熻矗浜�'; -comment on column sys_dept.phone is '鑱旂郴鐢佃瘽'; -comment on column sys_dept.email is '閭'; -comment on column sys_dept.status is '閮ㄩ棬鐘舵�侊紙0姝e父 1鍋滅敤锛�'; -comment on column sys_dept.del_flag is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�'; -comment on column sys_dept.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_dept.create_by is '鍒涘缓鑰�'; -comment on column sys_dept.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_dept.update_by is '鏇存柊鑰�'; -comment on column sys_dept.update_time is '鏇存柊鏃堕棿'; - --- ---------------------------- --- 鍒濆鍖�-閮ㄩ棬琛ㄦ暟鎹� --- ---------------------------- -insert into sys_dept values(100, '000000', 0, '0', 'XXX绉戞妧', 0, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(101, '000000', 100, '0,100', '娣卞湷鎬诲叕鍙�', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(102, '000000', 100, '0,100', '闀挎矙鍒嗗叕鍙�', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(103, '000000', 101, '0,100,101', '鐮斿彂閮ㄩ棬', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(104, '000000', 101, '0,100,101', '甯傚満閮ㄩ棬', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(105, '000000', 101, '0,100,101', '娴嬭瘯閮ㄩ棬', 3, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(106, '000000', 101, '0,100,101', '璐㈠姟閮ㄩ棬', 4, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(107, '000000', 101, '0,100,101', '杩愮淮閮ㄩ棬', 5, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(108, '000000', 102, '0,100,102', '甯傚満閮ㄩ棬', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); -insert into sys_dept values(109, '000000', 102, '0,100,102', '璐㈠姟閮ㄩ棬', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, sysdate, null, null); - - --- ---------------------------- --- 2銆佺敤鎴蜂俊鎭〃 --- ---------------------------- -create table sys_user ( - user_id number(20) not null, - tenant_id varchar2(20) default '000000', - dept_id number(20) default null, - user_name varchar2(40) not null, - nick_name varchar2(40) not null, - user_type varchar2(10) default 'sys_user', - email varchar2(50) default '', - phonenumber varchar2(11) default '', - sex char(1) default '0', - avatar number(20) default null, - password varchar2(100) default '', - status char(1) default '0', - del_flag char(1) default '0', - login_ip varchar2(128) default '', - login_date date, - create_dept number(20) default null, - create_by number(20) default null, - create_time date, - update_by number(20) default null, - update_time date, - remark varchar2(500) default '' -); - -alter table sys_user add constraint pk_sys_user primary key (user_id); - -comment on table sys_user is '鐢ㄦ埛淇℃伅琛�'; -comment on column sys_user.user_id is '鐢ㄦ埛ID'; -comment on column sys_user.tenant_id is '绉熸埛缂栧彿'; -comment on column sys_user.dept_id is '閮ㄩ棬ID'; -comment on column sys_user.user_name is '鐢ㄦ埛璐﹀彿'; -comment on column sys_user.nick_name is '鐢ㄦ埛鏄电О'; -comment on column sys_user.user_type is '鐢ㄦ埛绫诲瀷锛坰ys_user绯荤粺鐢ㄦ埛锛�'; -comment on column sys_user.email is '鐢ㄦ埛閭'; -comment on column sys_user.phonenumber is '鎵嬫満鍙风爜'; -comment on column sys_user.sex is '鐢ㄦ埛鎬у埆锛�0鐢� 1濂� 2鏈煡锛�'; -comment on column sys_user.avatar is '澶村儚璺緞'; -comment on column sys_user.password is '瀵嗙爜'; -comment on column sys_user.status is '甯愬彿鐘舵�侊紙0姝e父 1鍋滅敤锛�'; -comment on column sys_user.del_flag is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�'; -comment on column sys_user.login_ip is '鏈�鍚庣櫥褰旾P'; -comment on column sys_user.login_date is '鏈�鍚庣櫥褰曟椂闂�'; -comment on column sys_user.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_user.create_by is '鍒涘缓鑰�'; -comment on column sys_user.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_user.update_by is '鏇存柊鑰�'; -comment on column sys_user.update_time is '鏇存柊鏃堕棿'; -comment on column sys_user.remark is '澶囨敞'; - --- ---------------------------- --- 鍒濆鍖�-鐢ㄦ埛淇℃伅琛ㄦ暟鎹� --- ---------------------------- -insert into sys_user values(1, '000000', 103, 'admin', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate, 103, 1, sysdate, null, null, '绠$悊鍛�'); -insert into sys_user values(2, '000000', 105, 'lionli', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@qq.com', '15666666666', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate, 103, 1, sysdate, null, null, '娴嬭瘯鍛�'); - - --- ---------------------------- --- 3銆佸矖浣嶄俊鎭〃 --- ---------------------------- -create table sys_post ( - post_id number(20) not null, - tenant_id varchar2(20) default '000000', - post_code varchar2(64) not null, - post_name varchar2(50) not null, - post_sort number(4) not null, - status char(1) not null, - create_dept number(20) default null, - create_by number(20) default null, - create_time date, - update_by number(20) default null, - update_time date, - remark varchar2(500) -); - -alter table sys_post add constraint pk_sys_post primary key (post_id); - -comment on table sys_post is '宀椾綅淇℃伅琛�'; -comment on column sys_post.post_id is '宀椾綅ID'; -comment on column sys_post.tenant_id is '绉熸埛缂栧彿'; -comment on column sys_post.post_code is '宀椾綅缂栫爜'; -comment on column sys_post.post_name is '宀椾綅鍚嶇О'; -comment on column sys_post.post_sort is '鏄剧ず椤哄簭'; -comment on column sys_post.status is '鐘舵�侊紙0姝e父 1鍋滅敤锛�'; -comment on column sys_post.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_post.create_by is '鍒涘缓鑰�'; -comment on column sys_post.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_post.update_by is '鏇存柊鑰�'; -comment on column sys_post.update_time is '鏇存柊鏃堕棿'; -comment on column sys_post.remark is '澶囨敞'; - --- ---------------------------- --- 鍒濆鍖�-宀椾綅淇℃伅琛ㄦ暟鎹� --- ---------------------------- -insert into sys_post values(1, '000000', 'ceo', '钁d簨闀�', 1, '0', 103, 1, sysdate, null, null, ''); -insert into sys_post values(2, '000000', 'se', '椤圭洰缁忕悊', 2, '0', 103, 1, sysdate, null, null, ''); -insert into sys_post values(3, '000000', 'hr', '浜哄姏璧勬簮', 3, '0', 103, 1, sysdate, null, null, ''); -insert into sys_post values(4, '000000', 'user', '鏅�氬憳宸�', 4, '0', 103, 1, sysdate, null, null, ''); - - --- ---------------------------- --- 4銆佽鑹蹭俊鎭〃 --- ---------------------------- -create table sys_role ( - role_id number(20) not null, - tenant_id varchar2(20) default '000000', - role_name varchar2(30) not null, - role_key varchar2(100) not null, - role_sort number(4) not null, - data_scope char(1) default '1', - menu_check_strictly number(1) default 1, - dept_check_strictly number(1) default 1, - status char(1) not null, - del_flag char(1) default '0', - create_dept number(20) default null, - create_by number(20) default null, - create_time date, - update_by number(20) default null, - update_time date, - remark varchar2(500) default null -); - -alter table sys_role add constraint pk_sys_role primary key (role_id); - -comment on table sys_role is '瑙掕壊淇℃伅琛�'; -comment on column sys_role.role_id is '瑙掕壊ID'; -comment on column sys_role.tenant_id is '绉熸埛缂栧彿'; -comment on column sys_role.role_name is '瑙掕壊鍚嶇О'; -comment on column sys_role.role_key is '瑙掕壊鏉冮檺瀛楃涓�'; -comment on column sys_role.role_sort is '鏄剧ず椤哄簭'; -comment on column sys_role.data_scope is '鏁版嵁鑼冨洿锛�1锛氬叏閮ㄦ暟鎹潈闄� 2锛氳嚜瀹氭暟鎹潈闄� 3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺 4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶級'; -comment on column sys_role.menu_check_strictly is '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�'; -comment on column sys_role.dept_check_strictly is '閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�'; -comment on column sys_role.status is '瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛�'; -comment on column sys_role.del_flag is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�'; -comment on column sys_role.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_role.create_by is '鍒涘缓鑰�'; -comment on column sys_role.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_role.update_by is '鏇存柊鑰�'; -comment on column sys_role.update_time is '鏇存柊鏃堕棿'; -comment on column sys_role.remark is '澶囨敞'; - --- ---------------------------- --- 鍒濆鍖�-瑙掕壊淇℃伅琛ㄦ暟鎹� --- ---------------------------- -insert into sys_role values('1', '000000', '瓒呯骇绠$悊鍛�', 'superadmin', 1, 1, 1, 1, '0', '0', 103, 1, sysdate, null, null, '瓒呯骇绠$悊鍛�'); -insert into sys_role values('2', '000000', '鏅�氳鑹�', 'common', 2, 2, 1, 1, '0', '0', 103, 1, sysdate, null, null, '鏅�氳鑹�'); - - --- ---------------------------- --- 5銆佽彍鍗曟潈闄愯〃 --- ---------------------------- -create table sys_menu ( - menu_id number(20) not null, - menu_name varchar2(50) not null, - parent_id number(20) default 0, - order_num number(4) default 0, - path varchar(200) default '', - component varchar(255) default null, - query_param varchar(255) default null, - is_frame number(1) default 1, - is_cache number(1) default 0, - menu_type char(1) default '', - visible char(1) default 0, - status char(1) default 0, - perms varchar2(100) default null, - icon varchar2(100) default '#', - create_dept number(20) default null, - create_by number(20) default null, - create_time date, - update_by number(20) default null, - update_time date , - remark varchar2(500) default '' -); - -alter table sys_menu add constraint pk_sys_menu primary key (menu_id); - -comment on table sys_menu is '鑿滃崟鏉冮檺琛�'; -comment on column sys_menu.menu_id is '鑿滃崟ID'; -comment on column sys_menu.menu_name is '鑿滃崟鍚嶇О'; -comment on column sys_menu.parent_id is '鐖惰彍鍗旾D'; -comment on column sys_menu.order_num is '鏄剧ず椤哄簭'; -comment on column sys_menu.path is '璇锋眰鍦板潃'; -comment on column sys_menu.component is '璺敱鍦板潃'; -comment on column sys_menu.query_param is '璺敱鍙傛暟'; -comment on column sys_menu.is_frame is '鏄惁涓哄閾撅紙0鏄� 1鍚︼級'; -comment on column sys_menu.is_cache is '鏄惁缂撳瓨锛�0缂撳瓨 1涓嶇紦瀛橈級'; -comment on column sys_menu.menu_type is '鑿滃崟绫诲瀷锛圡鐩綍 C鑿滃崟 F鎸夐挳锛�'; -comment on column sys_menu.visible is '鏄剧ず鐘舵�侊紙0鏄剧ず 1闅愯棌锛�'; -comment on column sys_menu.status is '鑿滃崟鐘舵�侊紙0姝e父 1鍋滅敤锛�'; -comment on column sys_menu.perms is '鏉冮檺鏍囪瘑'; -comment on column sys_menu.icon is '鑿滃崟鍥炬爣'; -comment on column sys_menu.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_menu.create_by is '鍒涘缓鑰�'; -comment on column sys_menu.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_menu.update_by is '鏇存柊鑰�'; -comment on column sys_menu.update_time is '鏇存柊鏃堕棿'; -comment on column sys_menu.remark is '澶囨敞'; - --- ---------------------------- --- 鍒濆鍖�-鑿滃崟淇℃伅琛ㄦ暟鎹� --- ---------------------------- --- 涓�绾ц彍鍗� -insert into sys_menu values('1', '绯荤粺绠$悊', '0', '1', 'system', null, '', 1, 0, 'M', '0', '0', '', 'system', 103, 1, sysdate, null, null, '绯荤粺绠$悊鐩綍'); -insert into sys_menu values('6', '绉熸埛绠$悊', '0', '2', 'tenant', null, '', 1, 0, 'M', '0', '0', '', 'chart', 103, 1, sysdate, null, null, '绉熸埛绠$悊鐩綍'); -insert into sys_menu values('2', '绯荤粺鐩戞帶', '0', '3', 'monitor', null, '', 1, 0, 'M', '0', '0', '', 'monitor', 103, 1, sysdate, null, null, '绯荤粺鐩戞帶鐩綍'); -insert into sys_menu values('3', '绯荤粺宸ュ叿', '0', '4', 'tool', null, '', 1, 0, 'M', '0', '0', '', 'tool', 103, 1, sysdate, null, null, '绯荤粺宸ュ叿鐩綍'); -insert into sys_menu values('4', 'PLUS瀹樼綉', '0', '5', 'https://gitee.com/dromara/RuoYi-Vue-Plus', null, '', 0, 0, 'M', '0', '0', '', 'guide', 103, 1, sysdate, null, null, 'RuoYi-Vue-Plus瀹樼綉鍦板潃'); --- 浜岀骇鑿滃崟 -insert into sys_menu values('100', '鐢ㄦ埛绠$悊', '1', '1', 'user', 'system/user/index', '', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 103, 1, sysdate, null, null, '鐢ㄦ埛绠$悊鑿滃崟'); -insert into sys_menu values('101', '瑙掕壊绠$悊', '1', '2', 'role', 'system/role/index', '', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 103, 1, sysdate, null, null, '瑙掕壊绠$悊鑿滃崟'); -insert into sys_menu values('102', '鑿滃崟绠$悊', '1', '3', 'menu', 'system/menu/index', '', 1, 0, 'C', '0', '0', 'system:menu:list', 'tree-table', 103, 1, sysdate, null, null, '鑿滃崟绠$悊鑿滃崟'); -insert into sys_menu values('103', '閮ㄩ棬绠$悊', '1', '4', 'dept', 'system/dept/index', '', 1, 0, 'C', '0', '0', 'system:dept:list', 'tree', 103, 1, sysdate, null, null, '閮ㄩ棬绠$悊鑿滃崟'); -insert into sys_menu values('104', '宀椾綅绠$悊', '1', '5', 'post', 'system/post/index', '', 1, 0, 'C', '0', '0', 'system:post:list', 'post', 103, 1, sysdate, null, null, '宀椾綅绠$悊鑿滃崟'); -insert into sys_menu values('105', '瀛楀吀绠$悊', '1', '6', 'dict', 'system/dict/index', '', 1, 0, 'C', '0', '0', 'system:dict:list', 'dict', 103, 1, sysdate, null, null, '瀛楀吀绠$悊鑿滃崟'); -insert into sys_menu values('106', '鍙傛暟璁剧疆', '1', '7', 'config', 'system/config/index', '', 1, 0, 'C', '0', '0', 'system:config:list', 'edit', 103, 1, sysdate, null, null, '鍙傛暟璁剧疆鑿滃崟'); -insert into sys_menu values('107', '閫氱煡鍏憡', '1', '8', 'notice', 'system/notice/index', '', 1, 0, 'C', '0', '0', 'system:notice:list', 'message', 103, 1, sysdate, null, null, '閫氱煡鍏憡鑿滃崟'); -insert into sys_menu values('108', '鏃ュ織绠$悊', '1', '9', 'log', '', '', 1, 0, 'M', '0', '0', '', 'log', 103, 1, sysdate, null, null, '鏃ュ織绠$悊鑿滃崟'); -insert into sys_menu values('109', '鍦ㄧ嚎鐢ㄦ埛', '2', '1', 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 103, 1, sysdate, null, null, '鍦ㄧ嚎鐢ㄦ埛鑿滃崟'); -insert into sys_menu values('113', '缂撳瓨鐩戞帶', '2', '5', 'cache', 'monitor/cache/index', '', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 103, 1, sysdate, null, null, '缂撳瓨鐩戞帶鑿滃崟'); -insert into sys_menu values('114', '琛ㄥ崟鏋勫缓', '3', '1', 'build', 'tool/build/index', '', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 103, 1, sysdate, null, null, '琛ㄥ崟鏋勫缓鑿滃崟'); -insert into sys_menu values('115', '浠g爜鐢熸垚', '3', '2', 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 103, 1, sysdate, null, null, '浠g爜鐢熸垚鑿滃崟'); -insert into sys_menu values('121', '绉熸埛绠$悊', '6', '1', 'tenant', 'system/tenant/index', '', 1, 0, 'C', '0', '0', 'system:tenant:list', 'list', 103, 1, sysdate, null, null, '绉熸埛绠$悊鑿滃崟'); -insert into sys_menu values('122', '绉熸埛濂楅绠$悊', '6', '2', 'tenantPackage', 'system/tenantPackage/index', '', 1, 0, 'C', '0', '0', 'system:tenantPackage:list', 'form', 103, 1, sysdate, null, null, '绉熸埛濂楅绠$悊鑿滃崟'); --- springboot-admin鐩戞帶 -insert into sys_menu values('117', 'Admin鐩戞帶', '2', '5', 'Admin', 'monitor/admin/index', '', 1, 0, 'C', '0', '0', 'monitor:admin:list', 'dashboard', 103, 1, sysdate, null, null, 'Admin鐩戞帶鑿滃崟'); --- oss鑿滃崟 -insert into sys_menu values('118', '鏂囦欢绠$悊', '1', '10', 'oss', 'system/oss/index', '', 1, 0, 'C', '0', '0', 'system:oss:list', 'upload', 103, 1, sysdate, null, null, '鏂囦欢绠$悊鑿滃崟'); --- xxl-job-admin鎺у埗鍙� -insert into sys_menu values('120', '浠诲姟璋冨害涓績', '2', '5', 'XxlJob', 'monitor/xxljob/index', '', 1, 0, 'C', '0', '0', 'monitor:xxljob:list', 'job', 103, 1, sysdate, null, null, 'Xxl-Job鎺у埗鍙拌彍鍗�'); - --- 涓夌骇鑿滃崟 -insert into sys_menu values('500', '鎿嶄綔鏃ュ織', '108', '1', 'operlog', 'monitor/operlog/index', '', 1, 0, 'C', '0', '0', 'monitor:operlog:list', 'form', 103, 1, sysdate, null, null, '鎿嶄綔鏃ュ織鑿滃崟'); -insert into sys_menu values('501', '鐧诲綍鏃ュ織', '108', '2', 'logininfor', 'monitor/logininfor/index', '', 1, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', 103, 1, sysdate, null, null, '鐧诲綍鏃ュ織鑿滃崟'); --- 鐢ㄦ埛绠$悊鎸夐挳 -insert into sys_menu values('1001', '鐢ㄦ埛鏌ヨ', '100', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1002', '鐢ㄦ埛鏂板', '100', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1003', '鐢ㄦ埛淇敼', '100', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:user:edit', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1004', '鐢ㄦ埛鍒犻櫎', '100', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:user:remove', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1005', '鐢ㄦ埛瀵煎嚭', '100', '5', '', '', '', 1, 0, 'F', '0', '0', 'system:user:export', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1006', '鐢ㄦ埛瀵煎叆', '100', '6', '', '', '', 1, 0, 'F', '0', '0', 'system:user:import', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1007', '閲嶇疆瀵嗙爜', '100', '7', '', '', '', 1, 0, 'F', '0', '0', 'system:user:resetPwd', '#', 103, 1, sysdate, null, null, ''); --- 瑙掕壊绠$悊鎸夐挳 -insert into sys_menu values('1008', '瑙掕壊鏌ヨ', '101', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:role:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1009', '瑙掕壊鏂板', '101', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:role:add', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1010', '瑙掕壊淇敼', '101', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:role:edit', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1011', '瑙掕壊鍒犻櫎', '101', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:role:remove', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1012', '瑙掕壊瀵煎嚭', '101', '5', '', '', '', 1, 0, 'F', '0', '0', 'system:role:export', '#', 103, 1, sysdate, null, null, ''); --- 鑿滃崟绠$悊鎸夐挳 -insert into sys_menu values('1013', '鑿滃崟鏌ヨ', '102', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1014', '鑿滃崟鏂板', '102', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:add', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1015', '鑿滃崟淇敼', '102', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:edit', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1016', '鑿滃崟鍒犻櫎', '102', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:remove', '#', 103, 1, sysdate, null, null, ''); --- 閮ㄩ棬绠$悊鎸夐挳 -insert into sys_menu values('1017', '閮ㄩ棬鏌ヨ', '103', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1018', '閮ㄩ棬鏂板', '103', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:add', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1019', '閮ㄩ棬淇敼', '103', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:edit', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1020', '閮ㄩ棬鍒犻櫎', '103', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:remove', '#', 103, 1, sysdate, null, null, ''); --- 宀椾綅绠$悊鎸夐挳 -insert into sys_menu values('1021', '宀椾綅鏌ヨ', '104', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:post:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1022', '宀椾綅鏂板', '104', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:post:add', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1023', '宀椾綅淇敼', '104', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:post:edit', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1024', '宀椾綅鍒犻櫎', '104', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:post:remove', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1025', '宀椾綅瀵煎嚭', '104', '5', '', '', '', 1, 0, 'F', '0', '0', 'system:post:export', '#', 103, 1, sysdate, null, null, ''); --- 瀛楀吀绠$悊鎸夐挳 -insert into sys_menu values('1026', '瀛楀吀鏌ヨ', '105', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1027', '瀛楀吀鏂板', '105', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:add', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1028', '瀛楀吀淇敼', '105', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:edit', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1029', '瀛楀吀鍒犻櫎', '105', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:remove', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1030', '瀛楀吀瀵煎嚭', '105', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:export', '#', 103, 1, sysdate, null, null, ''); --- 鍙傛暟璁剧疆鎸夐挳 -insert into sys_menu values('1031', '鍙傛暟鏌ヨ', '106', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1032', '鍙傛暟鏂板', '106', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:add', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1033', '鍙傛暟淇敼', '106', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:edit', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1034', '鍙傛暟鍒犻櫎', '106', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:remove', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1035', '鍙傛暟瀵煎嚭', '106', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:export', '#', 103, 1, sysdate, null, null, ''); --- 閫氱煡鍏憡鎸夐挳 -insert into sys_menu values('1036', '鍏憡鏌ヨ', '107', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1037', '鍏憡鏂板', '107', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:add', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1038', '鍏憡淇敼', '107', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:edit', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1039', '鍏憡鍒犻櫎', '107', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:remove', '#', 103, 1, sysdate, null, null, ''); --- 鎿嶄綔鏃ュ織鎸夐挳 -insert into sys_menu values('1040', '鎿嶄綔鏌ヨ', '500', '1', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1041', '鎿嶄綔鍒犻櫎', '500', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:remove', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1042', '鏃ュ織瀵煎嚭', '500', '4', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:export', '#', 103, 1, sysdate, null, null, ''); --- 鐧诲綍鏃ュ織鎸夐挳 -insert into sys_menu values('1043', '鐧诲綍鏌ヨ', '501', '1', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1044', '鐧诲綍鍒犻櫎', '501', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:remove', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1045', '鏃ュ織瀵煎嚭', '501', '3', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:export', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1050', '璐︽埛瑙i攣', '501', '4', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:unlock', '#', 103, 1, sysdate, null, null, ''); --- 鍦ㄧ嚎鐢ㄦ埛鎸夐挳 -insert into sys_menu values('1046', '鍦ㄧ嚎鏌ヨ', '109', '1', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1047', '鎵归噺寮洪��', '109', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1048', '鍗曟潯寮洪��', '109', '3', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 103, 1, sysdate, null, null, ''); --- 浠g爜鐢熸垚鎸夐挳 -insert into sys_menu values('1055', '鐢熸垚鏌ヨ', '115', '1', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1056', '鐢熸垚淇敼', '115', '2', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:edit', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1057', '鐢熸垚鍒犻櫎', '115', '3', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1058', '瀵煎叆浠g爜', '115', '2', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1059', '棰勮浠g爜', '115', '4', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1060', '鐢熸垚浠g爜', '115', '5', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 103, 1, sysdate, null, null, ''); --- oss鐩稿叧鎸夐挳 -insert into sys_menu values('1600', '鏂囦欢鏌ヨ', '118', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1601', '鏂囦欢涓婁紶', '118', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:upload', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1602', '鏂囦欢涓嬭浇', '118', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:download', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1603', '鏂囦欢鍒犻櫎', '118', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:remove', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1604', '閰嶇疆娣诲姞', '118', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:add', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1605', '閰嶇疆缂栬緫', '118', '6', '#', '', '', 1, 0, 'F', '0', '0', 'system:oss:edit', '#', 103, 1, sysdate, null, null, ''); --- 绉熸埛绠$悊鐩稿叧鎸夐挳 -insert into sys_menu values('1606', '绉熸埛鏌ヨ', '121', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1607', '绉熸埛鏂板', '121', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:add', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1608', '绉熸埛淇敼', '121', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:edit', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1609', '绉熸埛鍒犻櫎', '121', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:remove', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1610', '绉熸埛瀵煎嚭', '121', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenant:export', '#', 103, 1, sysdate, null, null, ''); --- 绉熸埛濂楅绠$悊鐩稿叧鎸夐挳 -insert into sys_menu values('1611', '绉熸埛濂楅鏌ヨ', '122', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1612', '绉熸埛濂楅鏂板', '122', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:add', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1613', '绉熸埛濂楅淇敼', '122', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:edit', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1614', '绉熸埛濂楅鍒犻櫎', '122', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:remove', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu values('1615', '绉熸埛濂楅瀵煎嚭', '122', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:tenantPackage:export', '#', 103, 1, sysdate, null, null, ''); - - --- ---------------------------- --- 6銆佺敤鎴峰拰瑙掕壊鍏宠仈琛� 鐢ㄦ埛N-1瑙掕壊 --- ---------------------------- -create table sys_user_role ( - user_id number(20) not null, - role_id number(20) not null -); - -alter table sys_user_role add constraint pk_sys_user_role primary key (user_id, role_id); - -comment on table sys_user_role is '鐢ㄦ埛鍜岃鑹插叧鑱旇〃'; -comment on column sys_user_role.user_id is '鐢ㄦ埛ID'; -comment on column sys_user_role.role_id is '瑙掕壊ID'; - --- ---------------------------- --- 鍒濆鍖�-鐢ㄦ埛鍜岃鑹插叧鑱旇〃鏁版嵁 --- ---------------------------- -insert into sys_user_role values ('1', '1'); -insert into sys_user_role values ('2', '2'); - - --- ---------------------------- --- 7銆佽鑹插拰鑿滃崟鍏宠仈琛� 瑙掕壊1-N鑿滃崟 --- ---------------------------- -create table sys_role_menu ( - role_id number(20) not null, - menu_id number(20) not null -); - -alter table sys_role_menu add constraint pk_sys_role_menu primary key (role_id, menu_id); - -comment on table sys_role_menu is '瑙掕壊鍜岃彍鍗曞叧鑱旇〃'; -comment on column sys_role_menu.role_id is '瑙掕壊ID'; -comment on column sys_role_menu.menu_id is '鑿滃崟ID'; - --- ---------------------------- --- 鍒濆鍖�-瑙掕壊鍜岃彍鍗曞叧鑱旇〃鏁版嵁 --- ---------------------------- -insert into sys_role_menu values ('2', '1'); -insert into sys_role_menu values ('2', '2'); -insert into sys_role_menu values ('2', '3'); -insert into sys_role_menu values ('2', '4'); -insert into sys_role_menu values ('2', '100'); -insert into sys_role_menu values ('2', '101'); -insert into sys_role_menu values ('2', '102'); -insert into sys_role_menu values ('2', '103'); -insert into sys_role_menu values ('2', '104'); -insert into sys_role_menu values ('2', '105'); -insert into sys_role_menu values ('2', '106'); -insert into sys_role_menu values ('2', '107'); -insert into sys_role_menu values ('2', '108'); -insert into sys_role_menu values ('2', '109'); -insert into sys_role_menu values ('2', '110'); -insert into sys_role_menu values ('2', '111'); -insert into sys_role_menu values ('2', '112'); -insert into sys_role_menu values ('2', '113'); -insert into sys_role_menu values ('2', '114'); -insert into sys_role_menu values ('2', '115'); -insert into sys_role_menu values ('2', '116'); -insert into sys_role_menu values ('2', '500'); -insert into sys_role_menu values ('2', '501'); -insert into sys_role_menu values ('2', '1000'); -insert into sys_role_menu values ('2', '1001'); -insert into sys_role_menu values ('2', '1002'); -insert into sys_role_menu values ('2', '1003'); -insert into sys_role_menu values ('2', '1004'); -insert into sys_role_menu values ('2', '1005'); -insert into sys_role_menu values ('2', '1006'); -insert into sys_role_menu values ('2', '1007'); -insert into sys_role_menu values ('2', '1008'); -insert into sys_role_menu values ('2', '1009'); -insert into sys_role_menu values ('2', '1010'); -insert into sys_role_menu values ('2', '1011'); -insert into sys_role_menu values ('2', '1012'); -insert into sys_role_menu values ('2', '1013'); -insert into sys_role_menu values ('2', '1014'); -insert into sys_role_menu values ('2', '1015'); -insert into sys_role_menu values ('2', '1016'); -insert into sys_role_menu values ('2', '1017'); -insert into sys_role_menu values ('2', '1018'); -insert into sys_role_menu values ('2', '1019'); -insert into sys_role_menu values ('2', '1020'); -insert into sys_role_menu values ('2', '1021'); -insert into sys_role_menu values ('2', '1022'); -insert into sys_role_menu values ('2', '1023'); -insert into sys_role_menu values ('2', '1024'); -insert into sys_role_menu values ('2', '1025'); -insert into sys_role_menu values ('2', '1026'); -insert into sys_role_menu values ('2', '1027'); -insert into sys_role_menu values ('2', '1028'); -insert into sys_role_menu values ('2', '1029'); -insert into sys_role_menu values ('2', '1030'); -insert into sys_role_menu values ('2', '1031'); -insert into sys_role_menu values ('2', '1032'); -insert into sys_role_menu values ('2', '1033'); -insert into sys_role_menu values ('2', '1034'); -insert into sys_role_menu values ('2', '1035'); -insert into sys_role_menu values ('2', '1036'); -insert into sys_role_menu values ('2', '1037'); -insert into sys_role_menu values ('2', '1038'); -insert into sys_role_menu values ('2', '1039'); -insert into sys_role_menu values ('2', '1040'); -insert into sys_role_menu values ('2', '1041'); -insert into sys_role_menu values ('2', '1042'); -insert into sys_role_menu values ('2', '1043'); -insert into sys_role_menu values ('2', '1044'); -insert into sys_role_menu values ('2', '1045'); -insert into sys_role_menu values ('2', '1050'); -insert into sys_role_menu values ('2', '1046'); -insert into sys_role_menu values ('2', '1047'); -insert into sys_role_menu values ('2', '1048'); -insert into sys_role_menu values ('2', '1055'); -insert into sys_role_menu values ('2', '1056'); -insert into sys_role_menu values ('2', '1057'); -insert into sys_role_menu values ('2', '1058'); -insert into sys_role_menu values ('2', '1059'); -insert into sys_role_menu values ('2', '1060'); - --- ---------------------------- --- 8銆佽鑹插拰閮ㄩ棬鍏宠仈琛� 瑙掕壊1-N閮ㄩ棬 --- ---------------------------- -create table sys_role_dept ( - role_id number(20) not null, - dept_id number(20) not null -); - -alter table sys_role_dept add constraint pk_sys_role_dept primary key (role_id, dept_id); - -comment on table sys_role_dept is '瑙掕壊鍜岄儴闂ㄥ叧鑱旇〃'; -comment on column sys_role_dept.role_id is '瑙掕壊ID'; -comment on column sys_role_dept.dept_id is '閮ㄩ棬ID'; - --- ---------------------------- --- 鍒濆鍖�-瑙掕壊鍜岄儴闂ㄥ叧鑱旇〃鏁版嵁 --- ---------------------------- -insert into sys_role_dept values ('2', '100'); -insert into sys_role_dept values ('2', '101'); -insert into sys_role_dept values ('2', '105'); - - --- ---------------------------- --- 9銆佺敤鎴蜂笌宀椾綅鍏宠仈琛� 鐢ㄦ埛1-N宀椾綅 --- ---------------------------- -create table sys_user_post ( - user_id number(20) not null, - post_id number(20) not null -); - -alter table sys_user_post add constraint pk_sys_user_post primary key (user_id, post_id); - -comment on table sys_user_post is '鐢ㄦ埛涓庡矖浣嶅叧鑱旇〃'; -comment on column sys_user_post.user_id is '鐢ㄦ埛ID'; -comment on column sys_user_post.post_id is '宀椾綅ID'; - --- ---------------------------- --- 鍒濆鍖�-鐢ㄦ埛涓庡矖浣嶅叧鑱旇〃鏁版嵁 --- ---------------------------- -insert into sys_user_post values ('1', '1'); -insert into sys_user_post values ('2', '2'); - - --- ---------------------------- --- 10銆佹搷浣滄棩蹇楄褰� --- ---------------------------- -create table sys_oper_log ( - oper_id number(20) not null, - tenant_id varchar2(20) default '000000', - title varchar2(50) default '', - business_type number(2) default 0, - method varchar2(100) default '', - request_method varchar(10) default '', - operator_type number(1) default 0, - oper_name varchar2(50) default '', - dept_name varchar2(50) default '', - oper_url varchar2(255) default '', - oper_ip varchar2(128) default '', - oper_location varchar2(255) default '', - oper_param varchar2(2100) default '', - json_result varchar2(2100) default '', - status number(1) default 0, - error_msg varchar2(2100) default '', - oper_time date, - cost_time number(20) default 0 -); - -alter table sys_oper_log add constraint pk_sys_oper_log primary key (oper_id); -create index idx_sys_oper_log_bt on sys_oper_log (business_type); -create index idx_sys_oper_log_s on sys_oper_log (status); -create index idx_sys_oper_log_ot on sys_oper_log (oper_time); - -comment on table sys_oper_log is '鎿嶄綔鏃ュ織璁板綍'; -comment on column sys_oper_log.oper_id is '鏃ュ織涓婚敭'; -comment on column sys_oper_log.tenant_id is '绉熸埛缂栧彿'; -comment on column sys_oper_log.title is '妯″潡鏍囬'; -comment on column sys_oper_log.business_type is '涓氬姟绫诲瀷锛�0鍏跺畠 1鏂板 2淇敼 3鍒犻櫎锛�'; -comment on column sys_oper_log.method is '鏂规硶鍚嶇О'; -comment on column sys_oper_log.request_method is '璇锋眰鏂瑰紡'; -comment on column sys_oper_log.operator_type is '鎿嶄綔绫诲埆锛�0鍏跺畠 1鍚庡彴鐢ㄦ埛 2鎵嬫満绔敤鎴凤級'; -comment on column sys_oper_log.oper_name is '鎿嶄綔浜哄憳'; -comment on column sys_oper_log.dept_name is '閮ㄩ棬鍚嶇О'; -comment on column sys_oper_log.oper_url is '璇锋眰URL'; -comment on column sys_oper_log.oper_ip is '涓绘満鍦板潃'; -comment on column sys_oper_log.oper_location is '鎿嶄綔鍦扮偣'; -comment on column sys_oper_log.oper_param is '璇锋眰鍙傛暟'; -comment on column sys_oper_log.json_result is '杩斿洖鍙傛暟'; -comment on column sys_oper_log.status is '鎿嶄綔鐘舵�侊紙0姝e父 1寮傚父锛�'; -comment on column sys_oper_log.error_msg is '閿欒娑堟伅'; -comment on column sys_oper_log.oper_time is '鎿嶄綔鏃堕棿'; -comment on column sys_oper_log.cost_time is '娑堣�楁椂闂�'; - - --- ---------------------------- --- 11銆佸瓧鍏哥被鍨嬭〃 --- ---------------------------- -create table sys_dict_type ( - dict_id number(20) not null, - tenant_id varchar2(20) default '000000', - dict_name varchar2(100) default '', - dict_type varchar2(100) default '', - status char(1) default '0', - create_dept number(20) default null, - create_by number(20) default null, - create_time date, - update_by number(20) default null, - update_time date, - remark varchar2(500) default null -); - -alter table sys_dict_type add constraint pk_sys_dict_type primary key (dict_id); -create unique index sys_dict_type_index1 on sys_dict_type (tenant_id, dict_type); - -comment on table sys_dict_type is '瀛楀吀绫诲瀷琛�'; -comment on column sys_dict_type.dict_id is '瀛楀吀涓婚敭'; -comment on column sys_dict_type.tenant_id is '绉熸埛缂栧彿'; -comment on column sys_dict_type.dict_name is '瀛楀吀鍚嶇О'; -comment on column sys_dict_type.dict_type is '瀛楀吀绫诲瀷'; -comment on column sys_dict_type.status is '鐘舵�侊紙0姝e父 1鍋滅敤锛�'; -comment on column sys_dict_type.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_dict_type.create_by is '鍒涘缓鑰�'; -comment on column sys_dict_type.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_dict_type.update_by is '鏇存柊鑰�'; -comment on column sys_dict_type.update_time is '鏇存柊鏃堕棿'; -comment on column sys_dict_type.remark is '澶囨敞'; - -insert into sys_dict_type values(1, '000000', '鐢ㄦ埛鎬у埆', 'sys_user_sex', '0', 103, 1, sysdate, null, null, '鐢ㄦ埛鎬у埆鍒楄〃'); -insert into sys_dict_type values(2, '000000', '鑿滃崟鐘舵��', 'sys_show_hide', '0', 103, 1, sysdate, null, null, '鑿滃崟鐘舵�佸垪琛�'); -insert into sys_dict_type values(3, '000000', '绯荤粺寮�鍏�', 'sys_normal_disable', '0', 103, 1, sysdate, null, null, '绯荤粺寮�鍏冲垪琛�'); -insert into sys_dict_type values(6, '000000', '绯荤粺鏄惁', 'sys_yes_no', '0', 103, 1, sysdate, null, null, '绯荤粺鏄惁鍒楄〃'); -insert into sys_dict_type values(7, '000000', '閫氱煡绫诲瀷', 'sys_notice_type', '0', 103, 1, sysdate, null, null, '閫氱煡绫诲瀷鍒楄〃'); -insert into sys_dict_type values(8, '000000', '閫氱煡鐘舵��', 'sys_notice_status', '0', 103, 1, sysdate, null, null, '閫氱煡鐘舵�佸垪琛�'); -insert into sys_dict_type values(9, '000000', '鎿嶄綔绫诲瀷', 'sys_oper_type', '0', 103, 1, sysdate, null, null, '鎿嶄綔绫诲瀷鍒楄〃'); -insert into sys_dict_type values(10, '000000', '绯荤粺鐘舵��', 'sys_common_status', '0', 103, 1, sysdate, null, null, '鐧诲綍鐘舵�佸垪琛�'); - - --- ---------------------------- --- 12銆佸瓧鍏告暟鎹〃 --- ---------------------------- -create table sys_dict_data ( - dict_code number(20) not null, - tenant_id varchar2(20) default '000000', - dict_sort number(4) default 0, - dict_label varchar2(100) default '', - dict_value varchar2(100) default '', - dict_type varchar2(100) default '', - css_class varchar2(100) default null, - list_class varchar2(100) default null, - is_default char(1) default 'N', - status char(1) default '0', - create_dept number(20) default null, - create_by number(20) default null, - create_time date, - update_by number(20) default null, - update_time date, - remark varchar2(500) default null -); - -alter table sys_dict_data add constraint pk_sys_dict_data primary key (dict_code); - -comment on table sys_dict_data is '瀛楀吀鏁版嵁琛�'; -comment on column sys_dict_data.dict_code is '瀛楀吀涓婚敭'; -comment on column sys_dict_data.tenant_id is '绉熸埛缂栧彿'; -comment on column sys_dict_data.dict_sort is '瀛楀吀鎺掑簭'; -comment on column sys_dict_data.dict_label is '瀛楀吀鏍囩'; -comment on column sys_dict_data.dict_value is '瀛楀吀閿��'; -comment on column sys_dict_data.dict_type is '瀛楀吀绫诲瀷'; -comment on column sys_dict_data.css_class is '鏍峰紡灞炴�э紙鍏朵粬鏍峰紡鎵╁睍锛�'; -comment on column sys_dict_data.list_class is '琛ㄦ牸鍥炴樉鏍峰紡'; -comment on column sys_dict_data.is_default is '鏄惁榛樿锛圷鏄� N鍚︼級'; -comment on column sys_dict_data.status is '鐘舵�侊紙0姝e父 1鍋滅敤锛�'; -comment on column sys_dict_data.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_dict_data.create_by is '鍒涘缓鑰�'; -comment on column sys_dict_data.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_dict_data.update_by is '鏇存柊鑰�'; -comment on column sys_dict_data.update_time is '鏇存柊鏃堕棿'; -comment on column sys_dict_data.remark is '澶囨敞'; - -insert into sys_dict_data values(1, '000000', 1, '鐢�', '0', 'sys_user_sex', '', '', 'Y', '0', 103, 1, sysdate, null, null, '鎬у埆鐢�'); -insert into sys_dict_data values(2, '000000', 2, '濂�', '1', 'sys_user_sex', '', '', 'N', '0', 103, 1, sysdate, null, null, '鎬у埆濂�'); -insert into sys_dict_data values(3, '000000', 3, '鏈煡', '2', 'sys_user_sex', '', '', 'N', '0', 103, 1, sysdate, null, null, '鎬у埆鏈煡'); -insert into sys_dict_data values(4, '000000', 1, '鏄剧ず', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 103, 1, sysdate, null, null, '鏄剧ず鑿滃崟'); -insert into sys_dict_data values(5, '000000', 2, '闅愯棌', '1', 'sys_show_hide', '', 'danger', 'N', '0', 103, 1, sysdate, null, null, '闅愯棌鑿滃崟'); -insert into sys_dict_data values(6, '000000', 1, '姝e父', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 103, 1, sysdate, null, null, '姝e父鐘舵��'); -insert into sys_dict_data values(7, '000000', 2, '鍋滅敤', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 103, 1, sysdate, null, null, '鍋滅敤鐘舵��'); -insert into sys_dict_data values(12, '000000', 1, '鏄�', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 103, 1, sysdate, null, null, '绯荤粺榛樿鏄�'); -insert into sys_dict_data values(13, '000000', 2, '鍚�', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 103, 1, sysdate, null, null, '绯荤粺榛樿鍚�'); -insert into sys_dict_data values(14, '000000', 1, '閫氱煡', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 103, 1, sysdate, null, null, '閫氱煡'); -insert into sys_dict_data values(15, '000000', 2, '鍏憡', '2', 'sys_notice_type', '', 'success', 'N', '0', 103, 1, sysdate, null, null, '鍏憡'); -insert into sys_dict_data values(16, '000000', 1, '姝e父', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 103, 1, sysdate, null, null, '姝e父鐘舵��'); -insert into sys_dict_data values(17, '000000', 2, '鍏抽棴', '1', 'sys_notice_status', '', 'danger', 'N', '0', 103, 1, sysdate, null, null, '鍏抽棴鐘舵��'); -insert into sys_dict_data values(29, '000000', 99, '鍏朵粬', '0', 'sys_oper_type', '', 'info', 'N', '0', 103, 1, sysdate, null, null, '鍏朵粬鎿嶄綔'); -insert into sys_dict_data values(18, '000000', 1, '鏂板', '1', 'sys_oper_type', '', 'info', 'N', '0', 103, 1, sysdate, null, null, '鏂板鎿嶄綔'); -insert into sys_dict_data values(19, '000000', 2, '淇敼', '2', 'sys_oper_type', '', 'info', 'N', '0', 103, 1, sysdate, null, null, '淇敼鎿嶄綔'); -insert into sys_dict_data values(20, '000000', 3, '鍒犻櫎', '3', 'sys_oper_type', '', 'danger', 'N', '0', 103, 1, sysdate, null, null, '鍒犻櫎鎿嶄綔'); -insert into sys_dict_data values(21, '000000', 4, '鎺堟潈', '4', 'sys_oper_type', '', 'primary', 'N', '0', 103, 1, sysdate, null, null, '鎺堟潈鎿嶄綔'); -insert into sys_dict_data values(22, '000000', 5, '瀵煎嚭', '5', 'sys_oper_type', '', 'warning', 'N', '0', 103, 1, sysdate, null, null, '瀵煎嚭鎿嶄綔'); -insert into sys_dict_data values(23, '000000', 6, '瀵煎叆', '6', 'sys_oper_type', '', 'warning', 'N', '0', 103, 1, sysdate, null, null, '瀵煎叆鎿嶄綔'); -insert into sys_dict_data values(24, '000000', 7, '寮洪��', '7', 'sys_oper_type', '', 'danger', 'N', '0', 103, 1, sysdate, null, null, '寮洪��鎿嶄綔'); -insert into sys_dict_data values(25, '000000', 8, '鐢熸垚浠g爜', '8', 'sys_oper_type', '', 'warning', 'N', '0', 103, 1, sysdate, null, null, '鐢熸垚鎿嶄綔'); -insert into sys_dict_data values(26, '000000', 9, '娓呯┖鏁版嵁', '9', 'sys_oper_type', '', 'danger', 'N', '0', 103, 1, sysdate, null, null, '娓呯┖鎿嶄綔'); -insert into sys_dict_data values(27, '000000', 1, '鎴愬姛', '0', 'sys_common_status', '', 'primary', 'N', '0', 103, 1, sysdate, null, null, '姝e父鐘舵��'); -insert into sys_dict_data values(28, '000000', 2, '澶辫触', '1', 'sys_common_status', '', 'danger', 'N', '0', 103, 1, sysdate, null, null, '鍋滅敤鐘舵��'); - - --- ---------------------------- --- 13銆佸弬鏁伴厤缃〃 --- ---------------------------- -create table sys_config ( - config_id number(20) not null, - tenant_id varchar2(20) default '000000', - config_name varchar2(100) default '', - config_key varchar2(100) default '', - config_value varchar2(100) default '', - config_type char(1) default 'N', - create_dept number(20) default null, - create_by number(20) default null, - create_time date, - update_by number(20) default null, - update_time date, - remark varchar2(500) default null -); -alter table sys_config add constraint pk_sys_config primary key (config_id); - -comment on table sys_config is '鍙傛暟閰嶇疆琛�'; -comment on column sys_config.config_id is '鍙傛暟涓婚敭'; -comment on column sys_config.tenant_id is '绉熸埛缂栧彿'; -comment on column sys_config.config_name is '鍙傛暟鍚嶇О'; -comment on column sys_config.config_key is '鍙傛暟閿悕'; -comment on column sys_config.config_value is '鍙傛暟閿��'; -comment on column sys_config.config_type is '绯荤粺鍐呯疆锛圷鏄� N鍚︼級'; -comment on column sys_config.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_config.create_by is '鍒涘缓鑰�'; -comment on column sys_config.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_config.update_by is '鏇存柊鑰�'; -comment on column sys_config.update_time is '鏇存柊鏃堕棿'; -comment on column sys_config.remark is '澶囨敞'; - -insert into sys_config values(1, '000000', '涓绘鏋堕〉-榛樿鐨偆鏍峰紡鍚嶇О', 'sys.index.skinName', 'skin-blue', 'Y', 103, 1, sysdate, null, null, '钃濊壊 skin-blue銆佺豢鑹� skin-green銆佺传鑹� skin-purple銆佺孩鑹� skin-red銆侀粍鑹� skin-yellow' ); -insert into sys_config values(2, '000000', '鐢ㄦ埛绠$悊-璐﹀彿鍒濆瀵嗙爜', 'sys.user.initPassword', '123456', 'Y', 103, 1, sysdate, null, null, '鍒濆鍖栧瘑鐮� 123456' ); -insert into sys_config values(3, '000000', '涓绘鏋堕〉-渚ц竟鏍忎富棰�', 'sys.index.sideTheme', 'theme-dark', 'Y', 103, 1, sysdate, null, null, '娣辫壊涓婚theme-dark锛屾祬鑹蹭富棰榯heme-light' ); -insert into sys_config values(5, '000000', '璐﹀彿鑷姪-鏄惁寮�鍚敤鎴锋敞鍐屽姛鑳�', 'sys.account.registerUser', 'false', 'Y', 103, 1, sysdate, null, null, '鏄惁寮�鍚敞鍐岀敤鎴峰姛鑳斤紙true寮�鍚紝false鍏抽棴锛�'); -insert into sys_config values(11, '000000', 'OSS棰勮鍒楄〃璧勬簮寮�鍏�', 'sys.oss.previewListResource', 'true', 'Y', 103, 1, sysdate, null, null, 'true:寮�鍚�, false:鍏抽棴'); - - --- ---------------------------- --- 14銆佺郴缁熻闂褰� --- ---------------------------- -create table sys_logininfor ( - info_id number(20) not null, - tenant_id varchar2(20) default '000000', - user_name varchar2(50) default '', - ipaddr varchar2(128) default '', - login_location varchar2(255) default '', - browser varchar2(50) default '', - os varchar2(50) default '', - status char(1) default '0', - msg varchar2(255) default '', - login_time date -); - -alter table sys_logininfor add constraint pk_sys_logininfor primary key (info_id); -create index idx_sys_logininfor_s on sys_logininfor (status); -create index idx_sys_logininfor_lt on sys_logininfor (login_time); - -comment on table sys_logininfor is '绯荤粺璁块棶璁板綍'; -comment on column sys_logininfor.info_id is '璁块棶ID'; -comment on column sys_logininfor.tenant_id is '绉熸埛缂栧彿'; -comment on column sys_logininfor.user_name is '鐧诲綍璐﹀彿'; -comment on column sys_logininfor.ipaddr is '鐧诲綍IP鍦板潃'; -comment on column sys_logininfor.login_location is '鐧诲綍鍦扮偣'; -comment on column sys_logininfor.browser is '娴忚鍣ㄧ被鍨�'; -comment on column sys_logininfor.os is '鎿嶄綔绯荤粺'; -comment on column sys_logininfor.status is '鐧诲綍鐘舵�侊紙0鎴愬姛 1澶辫触锛�'; -comment on column sys_logininfor.msg is '鎻愮ず娑堟伅'; -comment on column sys_logininfor.login_time is '璁块棶鏃堕棿'; - - --- ---------------------------- --- 17銆侀�氱煡鍏憡琛� --- ---------------------------- -create table sys_notice ( - notice_id number(20) not null, - tenant_id varchar2(20) default '000000', - notice_title varchar2(50) not null, - notice_type char(1) not null, - notice_content clob default null, - status char(1) default '0', - create_dept number(20) default null, - create_by number(20) default null, - create_time date, - update_by number(20) default null, - update_time date, - remark varchar2(255) default null -); - -alter table sys_notice add constraint pk_sys_notice primary key (notice_id); - -comment on table sys_notice is '閫氱煡鍏憡琛�'; -comment on column sys_notice.notice_id is '鍏憡涓婚敭'; -comment on column sys_notice.tenant_id is '绉熸埛缂栧彿'; -comment on column sys_notice.notice_title is '鍏憡鏍囬'; -comment on column sys_notice.notice_type is '鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛�'; -comment on column sys_notice.notice_content is '鍏憡鍐呭'; -comment on column sys_notice.status is '鍏憡鐘舵�侊紙0姝e父 1鍏抽棴锛�'; -comment on column sys_notice.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_notice.create_by is '鍒涘缓鑰�'; -comment on column sys_notice.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_notice.update_by is '鏇存柊鑰�'; -comment on column sys_notice.update_time is '鏇存柊鏃堕棿'; -comment on column sys_notice.remark is '澶囨敞'; - --- ---------------------------- --- 鍒濆鍖�-鍏憡淇℃伅琛ㄦ暟鎹� --- ---------------------------- -insert into sys_notice values('1', '000000', '娓╅Θ鎻愰啋锛�2018-07-01 鏂扮増鏈彂甯冨暒', '2', '鏂扮増鏈唴瀹�', '0', 103, 1, sysdate, null, null, '绠$悊鍛�'); -insert into sys_notice values('2', '000000', '缁存姢閫氱煡锛�2018-07-01 绯荤粺鍑屾櫒缁存姢', '1', '缁存姢鍐呭', '0', 103, 1, sysdate, null, null, '绠$悊鍛�'); - - --- ---------------------------- --- 18銆佷唬鐮佺敓鎴愪笟鍔¤〃 --- ---------------------------- -create table gen_table ( - table_id number(20) not null, - table_name varchar2(200) default '', - table_comment varchar2(500) default '', - sub_table_name varchar(64) default null, - sub_table_fk_name varchar(64) default null, - class_name varchar2(100) default '', - tpl_category varchar2(200) default 'crud', - package_name varchar2(100), - module_name varchar2(30), - business_name varchar2(30), - function_name varchar2(50), - function_author varchar2(50), - gen_type char(1) default '0', - gen_path varchar2(200) default '/', - options varchar2(1000), - create_dept number(20) default null, - create_by number(20) default null, - create_time date, - update_by number(20) default null, - update_time date, - remark varchar2(500) default null -); - -alter table gen_table add constraint pk_gen_table primary key (table_id); - -comment on table gen_table is '浠g爜鐢熸垚涓氬姟琛�'; -comment on column gen_table.table_id is '缂栧彿'; -comment on column gen_table.table_name is '琛ㄥ悕绉�'; -comment on column gen_table.table_comment is '琛ㄦ弿杩�'; -comment on column gen_table.sub_table_name is '鍏宠仈瀛愯〃鐨勮〃鍚�'; -comment on column gen_table.sub_table_fk_name is '瀛愯〃鍏宠仈鐨勫閿悕'; -comment on column gen_table.class_name is '瀹炰綋绫诲悕绉�'; -comment on column gen_table.tpl_category is '浣跨敤鐨勬ā鏉匡紙crud鍗曡〃鎿嶄綔 tree鏍戣〃鎿嶄綔锛�'; -comment on column gen_table.package_name is '鐢熸垚鍖呰矾寰�'; -comment on column gen_table.module_name is '鐢熸垚妯″潡鍚�'; -comment on column gen_table.business_name is '鐢熸垚涓氬姟鍚�'; -comment on column gen_table.function_name is '鐢熸垚鍔熻兘鍚�'; -comment on column gen_table.function_author is '鐢熸垚鍔熻兘浣滆��'; -comment on column gen_table.gen_type is '鐢熸垚浠g爜鏂瑰紡锛�0zip鍘嬬缉鍖� 1鑷畾涔夎矾寰勶級'; -comment on column gen_table.gen_path is '鐢熸垚璺緞锛堜笉濉粯璁ら」鐩矾寰勶級'; -comment on column gen_table.options is '鍏跺畠鐢熸垚閫夐」'; -comment on column gen_table.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column gen_table.create_by is '鍒涘缓鑰�'; -comment on column gen_table.create_time is '鍒涘缓鏃堕棿'; -comment on column gen_table.update_by is '鏇存柊鑰�'; -comment on column gen_table.update_time is '鏇存柊鏃堕棿'; -comment on column gen_table.remark is '澶囨敞'; - - --- ---------------------------- --- 19銆佷唬鐮佺敓鎴愪笟鍔¤〃瀛楁 --- ---------------------------- -create table gen_table_column ( - column_id number(20) not null, - table_id number(20), - column_name varchar2(200), - column_comment varchar2(500), - column_type varchar2(100), - java_type varchar2(500), - java_field varchar2(200), - is_pk char(1), - is_increment char(1), - is_required char(1), - is_insert char(1), - is_edit char(1), - is_list char(1), - is_query char(1), - query_type varchar(200) default 'EQ', - html_type varchar(200), - dict_type varchar(200) default '', - sort number(4), - create_dept number(20) default null, - create_by number(20) default null, - create_time date , - update_by number(20) default null, - update_time date -); - -alter table gen_table_column add constraint pk_gen_table_column primary key (column_id); - -comment on table gen_table_column is '浠g爜鐢熸垚涓氬姟琛ㄥ瓧娈�'; -comment on column gen_table_column.column_id is '缂栧彿'; -comment on column gen_table_column.table_id is '褰掑睘琛ㄧ紪鍙�'; -comment on column gen_table_column.column_name is '鍒楀悕绉�'; -comment on column gen_table_column.column_comment is '鍒楁弿杩�'; -comment on column gen_table_column.column_type is '鍒楃被鍨�'; -comment on column gen_table_column.java_type is 'JAVA绫诲瀷'; -comment on column gen_table_column.java_field is 'JAVA瀛楁鍚�'; -comment on column gen_table_column.is_pk is '鏄惁涓婚敭锛�1鏄級'; -comment on column gen_table_column.is_increment is '鏄惁鑷锛�1鏄級'; -comment on column gen_table_column.is_required is '鏄惁蹇呭~锛�1鏄級'; -comment on column gen_table_column.is_insert is '鏄惁涓烘彃鍏ュ瓧娈碉紙1鏄級'; -comment on column gen_table_column.is_edit is '鏄惁缂栬緫瀛楁锛�1鏄級'; -comment on column gen_table_column.is_list is '鏄惁鍒楄〃瀛楁锛�1鏄級'; -comment on column gen_table_column.is_query is '鏄惁鏌ヨ瀛楁锛�1鏄級'; -comment on column gen_table_column.query_type is '鏌ヨ鏂瑰紡锛堢瓑浜庛�佷笉绛変簬銆佸ぇ浜庛�佸皬浜庛�佽寖鍥达級'; -comment on column gen_table_column.html_type is '鏄剧ず绫诲瀷锛堟枃鏈銆佹枃鏈煙銆佷笅鎷夋銆佸閫夋銆佸崟閫夋銆佹棩鏈熸帶浠讹級'; -comment on column gen_table_column.dict_type is '瀛楀吀绫诲瀷'; -comment on column gen_table_column.sort is '鎺掑簭'; -comment on column gen_table_column.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column gen_table_column.create_by is '鍒涘缓鑰�'; -comment on column gen_table_column.create_time is '鍒涘缓鏃堕棿'; -comment on column gen_table_column.update_by is '鏇存柊鑰�'; -comment on column gen_table_column.update_time is '鏇存柊鏃堕棿'; - - --- ---------------------------- --- OSS瀵硅薄瀛樺偍琛� --- ---------------------------- -create table sys_oss ( - oss_id number(20) not null, - tenant_id varchar2(20) default '000000', - file_name varchar(255) not null, - original_name varchar(255) not null, - file_suffix varchar(10) not null, - url varchar(500) not null, - service varchar(20) default 'minio' not null, - create_dept number(20) default null, - create_by number(20) default null, - create_time date, - update_by number(20) default null, - update_time date -); - -alter table sys_oss add constraint pk_sys_oss primary key (oss_id); - -comment on table sys_oss is 'OSS瀵硅薄瀛樺偍琛�'; -comment on column sys_oss.oss_id is '瀵硅薄瀛樺偍涓婚敭'; -comment on column sys_oss.tenant_id is '绉熸埛缂栫爜'; -comment on column sys_oss.file_name is '鏂囦欢鍚�'; -comment on column sys_oss.original_name is '鍘熷悕'; -comment on column sys_oss.file_suffix is '鏂囦欢鍚庣紑鍚�'; -comment on column sys_oss.url is 'URL鍦板潃'; -comment on column sys_oss.service is '鏈嶅姟鍟�'; -comment on column sys_oss.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_oss.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_oss.create_by is '涓婁紶鑰�'; -comment on column sys_oss.update_time is '鏇存柊鏃堕棿'; -comment on column sys_oss.update_by is '鏇存柊鑰�'; - - --- ---------------------------- --- OSS瀵硅薄瀛樺偍鍔ㄦ�侀厤缃〃 --- ---------------------------- -create table sys_oss_config ( - oss_config_id number(20) not null, - tenant_id varchar2(20) default '000000', - config_key varchar(20) not null, - access_key varchar(255) default '', - secret_key varchar(255) default '', - bucket_name varchar(255) default '', - prefix varchar(255) default '', - endpoint varchar(255) default '', - domain varchar(255) default '', - is_https char(1) default 'N', - region varchar(255) default '', - access_policy char(1) default '1' not null, - status char(1) default '1', - ext1 varchar(255) default '', - remark varchar(500) default null, - create_dept number(20) default null, - create_by number(20) default null, - create_time date, - update_by number(20) default null, - update_time date -); - -alter table sys_oss_config add constraint pk_sys_oss_config primary key (oss_config_id); - -comment on table sys_oss_config is '瀵硅薄瀛樺偍閰嶇疆琛�'; -comment on column sys_oss_config.oss_config_id is '涓诲缓'; -comment on column sys_oss_config.tenant_id is '绉熸埛缂栫爜'; -comment on column sys_oss_config.config_key is '閰嶇疆key'; -comment on column sys_oss_config.access_key is 'accesskey'; -comment on column sys_oss_config.secret_key is '绉橀挜'; -comment on column sys_oss_config.bucket_name is '妗跺悕绉�'; -comment on column sys_oss_config.prefix is '鍓嶇紑'; -comment on column sys_oss_config.endpoint is '璁块棶绔欑偣'; -comment on column sys_oss_config.domain is '鑷畾涔夊煙鍚�'; -comment on column sys_oss_config.is_https is '鏄惁https锛圷=鏄�,N=鍚︼級'; -comment on column sys_oss_config.region is '鍩�'; -comment on column sys_oss_config.access_policy is '妗舵潈闄愮被鍨�(0=private 1=public 2=custom)'; -comment on column sys_oss_config.status is '鏄惁榛樿锛�0=鏄�,1=鍚︼級'; -comment on column sys_oss_config.ext1 is '鎵╁睍瀛楁'; -comment on column sys_oss_config.remark is '澶囨敞'; -comment on column sys_oss_config.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_oss_config.create_by is '鍒涘缓鑰�'; -comment on column sys_oss_config.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_oss_config.update_by is '鏇存柊鑰�'; -comment on column sys_oss_config.update_time is '鏇存柊鏃堕棿'; - -insert into sys_oss_config values (1, '000000', 'minio', 'ruoyi', 'ruoyi123', 'ruoyi', '', '127.0.0.1:9000', '','N', '', '1', '0', '', NULL, 103, 1, sysdate, 1, sysdate); -insert into sys_oss_config values (2, '000000', 'qiniu', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 's3-cn-north-1.qiniucs.com', '','N', '', '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate); -insert into sys_oss_config values (3, '000000', 'aliyun', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi', '', 'oss-cn-beijing.aliyuncs.com', '','N', '', '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate); -insert into sys_oss_config values (4, '000000', 'qcloud', 'XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXX', 'ruoyi-1250000000', '', 'cos.ap-beijing.myqcloud.com', '','N', 'ap-beijing', '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate); -insert into sys_oss_config values (5, '000000', 'image', 'ruoyi', 'ruoyi123', 'ruoyi', 'image', '127.0.0.1:9000', '','N', '', '1', '1', '', NULL, 103, 1, sysdate, 1, sysdate); - - --- ---------------------------- --- 閽╁瓙 锛岀敤浜巗ession杩炴帴涔嬪悗 鑷姩璁剧疆榛樿鐨刣ate绫诲瀷鏍煎紡鍖� 绠�鍖栨椂闂存煡璇� --- 濡傞渶璁剧疆鍏跺畠閰嶇疆 鍙湪姝ら挬瀛愬唴浠绘剰澧炲姞澶勭悊璇彞 --- 渚嬪锛� SELECT * FROM sys_user WHERE create_time BETWEEN '2022-03-01 00:00:00' AND '2022-04-01 00:00:00' --- ---------------------------- -create or replace trigger login_trg -after logon on database -begin -execute immediate 'alter session set nls_date_format=''YYYY-MM-DD HH24:MI:SS'''; -end; diff --git a/script/sql/oracle/oracle_test.sql b/script/sql/oracle/oracle_test.sql deleted file mode 100644 index fd93786..0000000 --- a/script/sql/oracle/oracle_test.sql +++ /dev/null @@ -1,204 +0,0 @@ -create table test_demo ( - id number(20) not null, - tenant_id varchar2(20) default '000000', - dept_id number(20) default null, - user_id number(20) default null, - order_num number(10) default 0, - test_key varchar2(255) default null, - value varchar2(255) default null, - version number(10) default 0, - create_dept number(20) default null, - create_time date, - create_by number(20) default null, - update_time date, - update_by number(20) default null, - del_flag number(2) default 0 -); - -alter table test_demo add constraint pk_test_demo primary key (id); - -comment on table test_demo is '娴嬭瘯鍗曡〃'; -comment on column test_demo.id is '涓婚敭'; -comment on column test_demo.tenant_id is '绉熸埛缂栧彿'; -comment on column test_demo.dept_id is '閮ㄩ棬id'; -comment on column test_demo.user_id is '鐢ㄦ埛id'; -comment on column test_demo.order_num is '鎺掑簭鍙�'; -comment on column test_demo.test_key is 'key閿�'; -comment on column test_demo.value is '鍊�'; -comment on column test_demo.version is '鐗堟湰'; -comment on column test_demo.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column test_demo.create_time is '鍒涘缓鏃堕棿'; -comment on column test_demo.create_by is '鍒涘缓浜�'; -comment on column test_demo.update_time is '鏇存柊鏃堕棿'; -comment on column test_demo.update_by is '鏇存柊浜�'; -comment on column test_demo.del_flag is '鍒犻櫎鏍囧織'; - -create table test_tree ( - id number(20) not null, - tenant_id varchar2(20) default '000000', - parent_id number(20) default 0, - dept_id number(20) default null, - user_id number(20) default null, - tree_name varchar2(255) default null, - version number(10) default 0, - create_dept number(20) default null, - create_time date, - create_by number(20) default null, - update_time date, - update_by number(20) default null, - del_flag number(2) default 0 -); - -alter table test_tree add constraint pk_test_tree primary key (id); - -comment on table test_tree is '娴嬭瘯鏍戣〃'; -comment on column test_tree.id is '涓婚敭'; -comment on column test_tree.tenant_id is '绉熸埛缂栧彿'; -comment on column test_tree.parent_id is '鐖秈d'; -comment on column test_tree.dept_id is '閮ㄩ棬id'; -comment on column test_tree.user_id is '鐢ㄦ埛id'; -comment on column test_tree.tree_name is '鍊�'; -comment on column test_tree.version is '鐗堟湰'; -comment on column test_tree.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column test_tree.create_time is '鍒涘缓鏃堕棿'; -comment on column test_tree.create_by is '鍒涘缓浜�'; -comment on column test_tree.update_time is '鏇存柊鏃堕棿'; -comment on column test_tree.update_by is '鏇存柊浜�'; -comment on column test_tree.del_flag is '鍒犻櫎鏍囧織'; - -insert into sys_user(user_id, tenant_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) values (3, '000000', 108, 'test', '鏈儴闂ㄥ強浠ヤ笅 瀵嗙爜666666', 'sys_user', '', '', '0', null, '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', sysdate, 103, 1, sysdate, 3, sysdate, null); -insert into sys_user(user_id, tenant_id, dept_id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, password, status, del_flag, login_ip, login_date, create_dept, create_by, create_time, update_by, update_time, remark) values (4, '000000', 102, 'test1', '浠呮湰浜� 瀵嗙爜666666', 'sys_user', '', '', '0', null, '$2a$10$b8yUzN0C71sbz.PhNOCgJe.Tu1yWC3RNrTyjSQ8p1W0.aaUXUJ.Ne', '0', '0', '127.0.0.1', sysdate, 103, 1, sysdate, 4, sysdate, null); - -insert into sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) values (5, '娴嬭瘯鑿滃崟', 0, 5, 'demo', null, 1, 0, 'M', '0', '0', null, 'star', 103, 1, sysdate, 1, sysdate, ''); - -insert into sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) values (1500, '娴嬭瘯鍗曡〃', 5, 1, 'demo', 'demo/demo/index', 1, 0, 'C', '0', '0', 'demo:demo:list', '#', 103, 1, sysdate, null, null, '娴嬭瘯鍗曡〃鑿滃崟'); -insert into sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) values (1501, '娴嬭瘯鍗曡〃鏌ヨ', 1500, 1, '#', '', 1, 0, 'F', '0', '0', 'demo:demo:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) values (1502, '娴嬭瘯鍗曡〃鏂板', 1500, 2, '#', '', 1, 0, 'F', '0', '0', 'demo:demo:add', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) values (1503, '娴嬭瘯鍗曡〃淇敼', 1500, 3, '#', '', 1, 0, 'F', '0', '0', 'demo:demo:edit', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) values (1504, '娴嬭瘯鍗曡〃鍒犻櫎', 1500, 4, '#', '', 1, 0, 'F', '0', '0', 'demo:demo:remove', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) values (1505, '娴嬭瘯鍗曡〃瀵煎嚭', 1500, 5, '#', '', 1, 0, 'F', '0', '0', 'demo:demo:export', '#', 103, 1, sysdate, null, null, ''); - -insert into sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) values (1506, '娴嬭瘯鏍戣〃', 5, 1, 'tree', 'demo/tree/index', 1, 0, 'C', '0', '0', 'demo:tree:list', '#', 103, 1, sysdate, null, null, '娴嬭瘯鏍戣〃鑿滃崟'); -insert into sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) values (1507, '娴嬭瘯鏍戣〃鏌ヨ', 1506, 1, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:query', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) values (1508, '娴嬭瘯鏍戣〃鏂板', 1506, 2, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:add', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) values (1509, '娴嬭瘯鏍戣〃淇敼', 1506, 3, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:edit', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) values (1510, '娴嬭瘯鏍戣〃鍒犻櫎', 1506, 4, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:remove', '#', 103, 1, sysdate, null, null, ''); -insert into sys_menu(menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_dept, create_by, create_time, update_by, update_time, remark) values (1511, '娴嬭瘯鏍戣〃瀵煎嚭', 1506, 5, '#', '', 1, 0, 'F', '0', '0', 'demo:tree:export', '#', 103, 1, sysdate, null, null, ''); - -insert into sys_role(role_id, tenant_id, role_name, role_key, role_sort, data_scope, menu_check_strictly, dept_check_strictly, status, del_flag, create_dept, create_by, create_time, update_by, update_time, remark) values (3, '000000', '鏈儴闂ㄥ強浠ヤ笅', 'test1', 3, '4', 1, 1, '0', '0', 103, 1, sysdate, null, null, null); -insert into sys_role(role_id, tenant_id, role_name, role_key, role_sort, data_scope, menu_check_strictly, dept_check_strictly, status, del_flag, create_dept, create_by, create_time, update_by, update_time, remark) values (4, '000000', '浠呮湰浜�', 'test2', 4, '5', 1, 1, '0', '0', 103, 1, sysdate, null, null, null); - -insert into sys_role_menu(role_id, menu_id) values (3, 1); -insert into sys_role_menu(role_id, menu_id) values (3, 5); -insert into sys_role_menu(role_id, menu_id) values (3, 100); -insert into sys_role_menu(role_id, menu_id) values (3, 101); -insert into sys_role_menu(role_id, menu_id) values (3, 102); -insert into sys_role_menu(role_id, menu_id) values (3, 103); -insert into sys_role_menu(role_id, menu_id) values (3, 104); -insert into sys_role_menu(role_id, menu_id) values (3, 105); -insert into sys_role_menu(role_id, menu_id) values (3, 106); -insert into sys_role_menu(role_id, menu_id) values (3, 107); -insert into sys_role_menu(role_id, menu_id) values (3, 108); -insert into sys_role_menu(role_id, menu_id) values (3, 500); -insert into sys_role_menu(role_id, menu_id) values (3, 501); -insert into sys_role_menu(role_id, menu_id) values (3, 1001); -insert into sys_role_menu(role_id, menu_id) values (3, 1002); -insert into sys_role_menu(role_id, menu_id) values (3, 1003); -insert into sys_role_menu(role_id, menu_id) values (3, 1004); -insert into sys_role_menu(role_id, menu_id) values (3, 1005); -insert into sys_role_menu(role_id, menu_id) values (3, 1006); -insert into sys_role_menu(role_id, menu_id) values (3, 1007); -insert into sys_role_menu(role_id, menu_id) values (3, 1008); -insert into sys_role_menu(role_id, menu_id) values (3, 1009); -insert into sys_role_menu(role_id, menu_id) values (3, 1010); -insert into sys_role_menu(role_id, menu_id) values (3, 1011); -insert into sys_role_menu(role_id, menu_id) values (3, 1012); -insert into sys_role_menu(role_id, menu_id) values (3, 1013); -insert into sys_role_menu(role_id, menu_id) values (3, 1014); -insert into sys_role_menu(role_id, menu_id) values (3, 1015); -insert into sys_role_menu(role_id, menu_id) values (3, 1016); -insert into sys_role_menu(role_id, menu_id) values (3, 1017); -insert into sys_role_menu(role_id, menu_id) values (3, 1018); -insert into sys_role_menu(role_id, menu_id) values (3, 1019); -insert into sys_role_menu(role_id, menu_id) values (3, 1020); -insert into sys_role_menu(role_id, menu_id) values (3, 1021); -insert into sys_role_menu(role_id, menu_id) values (3, 1022); -insert into sys_role_menu(role_id, menu_id) values (3, 1023); -insert into sys_role_menu(role_id, menu_id) values (3, 1024); -insert into sys_role_menu(role_id, menu_id) values (3, 1025); -insert into sys_role_menu(role_id, menu_id) values (3, 1026); -insert into sys_role_menu(role_id, menu_id) values (3, 1027); -insert into sys_role_menu(role_id, menu_id) values (3, 1028); -insert into sys_role_menu(role_id, menu_id) values (3, 1029); -insert into sys_role_menu(role_id, menu_id) values (3, 1030); -insert into sys_role_menu(role_id, menu_id) values (3, 1031); -insert into sys_role_menu(role_id, menu_id) values (3, 1032); -insert into sys_role_menu(role_id, menu_id) values (3, 1033); -insert into sys_role_menu(role_id, menu_id) values (3, 1034); -insert into sys_role_menu(role_id, menu_id) values (3, 1035); -insert into sys_role_menu(role_id, menu_id) values (3, 1036); -insert into sys_role_menu(role_id, menu_id) values (3, 1037); -insert into sys_role_menu(role_id, menu_id) values (3, 1038); -insert into sys_role_menu(role_id, menu_id) values (3, 1039); -insert into sys_role_menu(role_id, menu_id) values (3, 1040); -insert into sys_role_menu(role_id, menu_id) values (3, 1041); -insert into sys_role_menu(role_id, menu_id) values (3, 1042); -insert into sys_role_menu(role_id, menu_id) values (3, 1043); -insert into sys_role_menu(role_id, menu_id) values (3, 1044); -insert into sys_role_menu(role_id, menu_id) values (3, 1045); -insert into sys_role_menu(role_id, menu_id) values (3, 1500); -insert into sys_role_menu(role_id, menu_id) values (3, 1501); -insert into sys_role_menu(role_id, menu_id) values (3, 1502); -insert into sys_role_menu(role_id, menu_id) values (3, 1503); -insert into sys_role_menu(role_id, menu_id) values (3, 1504); -insert into sys_role_menu(role_id, menu_id) values (3, 1505); -insert into sys_role_menu(role_id, menu_id) values (3, 1506); -insert into sys_role_menu(role_id, menu_id) values (3, 1507); -insert into sys_role_menu(role_id, menu_id) values (3, 1508); -insert into sys_role_menu(role_id, menu_id) values (3, 1509); -insert into sys_role_menu(role_id, menu_id) values (3, 1510); -insert into sys_role_menu(role_id, menu_id) values (3, 1511); -insert into sys_role_menu(role_id, menu_id) values (4, 5); -insert into sys_role_menu(role_id, menu_id) values (4, 1500); -insert into sys_role_menu(role_id, menu_id) values (4, 1501); -insert into sys_role_menu(role_id, menu_id) values (4, 1502); -insert into sys_role_menu(role_id, menu_id) values (4, 1503); -insert into sys_role_menu(role_id, menu_id) values (4, 1504); -insert into sys_role_menu(role_id, menu_id) values (4, 1505); -insert into sys_role_menu(role_id, menu_id) values (4, 1506); -insert into sys_role_menu(role_id, menu_id) values (4, 1507); -insert into sys_role_menu(role_id, menu_id) values (4, 1508); -insert into sys_role_menu(role_id, menu_id) values (4, 1509); -insert into sys_role_menu(role_id, menu_id) values (4, 1510); -insert into sys_role_menu(role_id, menu_id) values (4, 1511); - -insert into sys_user_role(user_id, role_id) values (3, 3); -insert into sys_user_role(user_id, role_id) values (4, 4); - -insert into test_demo(id, tenant_id, dept_id, user_id, order_num, test_key, value, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (1, '000000', 102, 4, 1, '娴嬭瘯鏁版嵁鏉冮檺', '娴嬭瘯', 0, 103, sysdate, 1, null, null, 0); -insert into test_demo(id, tenant_id, dept_id, user_id, order_num, test_key, value, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (2, '000000', 102, 3, 2, '瀛愯妭鐐�1', '111', 0, 103, sysdate, 1, null, null, 0); -insert into test_demo(id, tenant_id, dept_id, user_id, order_num, test_key, value, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (3, '000000', 102, 3, 3, '瀛愯妭鐐�2', '222', 0, 103, sysdate, 1, null, null, 0); -insert into test_demo(id, tenant_id, dept_id, user_id, order_num, test_key, value, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (4, '000000', 108, 4, 4, '娴嬭瘯鏁版嵁', 'demo', 0, 103, sysdate, 1, null, null, 0); -insert into test_demo(id, tenant_id, dept_id, user_id, order_num, test_key, value, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (5, '000000', 108, 3, 13, '瀛愯妭鐐�11', '1111', 0, 103, sysdate, 1, null, null, 0); -insert into test_demo(id, tenant_id, dept_id, user_id, order_num, test_key, value, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (6, '000000', 108, 3, 12, '瀛愯妭鐐�22', '2222', 0, 103, sysdate, 1, null, null, 0); -insert into test_demo(id, tenant_id, dept_id, user_id, order_num, test_key, value, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (7, '000000', 108, 3, 11, '瀛愯妭鐐�33', '3333', 0, 103, sysdate, 1, null, null, 0); -insert into test_demo(id, tenant_id, dept_id, user_id, order_num, test_key, value, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (8, '000000', 108, 3, 10, '瀛愯妭鐐�44', '4444', 0, 103, sysdate, 1, null, null, 0); -insert into test_demo(id, tenant_id, dept_id, user_id, order_num, test_key, value, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (9, '000000', 108, 3, 9, '瀛愯妭鐐�55', '5555', 0, 103, sysdate, 1, null, null, 0); -insert into test_demo(id, tenant_id, dept_id, user_id, order_num, test_key, value, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (10, '000000', 108, 3, 8, '瀛愯妭鐐�66', '6666', 0, 103, sysdate, 1, null, null, 0); -insert into test_demo(id, tenant_id, dept_id, user_id, order_num, test_key, value, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (11, '000000', 108, 3, 7, '瀛愯妭鐐�77', '7777', 0, 103, sysdate, 1, null, null, 0); -insert into test_demo(id, tenant_id, dept_id, user_id, order_num, test_key, value, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (12, '000000', 108, 3, 6, '瀛愯妭鐐�88', '8888', 0, 103, sysdate, 1, null, null, 0); -insert into test_demo(id, tenant_id, dept_id, user_id, order_num, test_key, value, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (13, '000000', 108, 3, 5, '瀛愯妭鐐�99', '9999', 0, 103, sysdate, 1, null, null, 0); - -insert into test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (1, '000000', 0, 102, 4, '娴嬭瘯鏁版嵁鏉冮檺', 0, 103, sysdate, 1, null, null, 0); -insert into test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (2, '000000', 1, 102, 3, '瀛愯妭鐐�1', 0, 103, sysdate, 1, null, null, 0); -insert into test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (3, '000000', 2, 102, 3, '瀛愯妭鐐�2', 0, 103, sysdate, 1, null, null, 0); -insert into test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (4, '000000', 0, 108, 4, '娴嬭瘯鏍�1', 0, 103, sysdate, 1, null, null, 0); -insert into test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (5, '000000', 4, 108, 3, '瀛愯妭鐐�11', 0, 103, sysdate, 1, null, null, 0); -insert into test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (6, '000000', 4, 108, 3, '瀛愯妭鐐�22', 0, 103, sysdate, 1, null, null, 0); -insert into test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (7, '000000', 4, 108, 3, '瀛愯妭鐐�33', 0, 103, sysdate, 1, null, null, 0); -insert into test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (8, '000000', 5, 108, 3, '瀛愯妭鐐�44', 0, 103, sysdate, 1, null, null, 0); -insert into test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (9, '000000', 6, 108, 3, '瀛愯妭鐐�55', 0, 103, sysdate, 1, null, null, 0); -insert into test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (10, '000000', 7, 108, 3, '瀛愯妭鐐�66', 0, 103, sysdate, 1, null, null, 0); -insert into test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (11, '000000', 7, 108, 3, '瀛愯妭鐐�77', 0, 103, sysdate, 1, null, null, 0); -insert into test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (12, '000000', 10, 108, 3, '瀛愯妭鐐�88', 0, 103, sysdate, 1, null, null, 0); -insert into test_tree(id, tenant_id, parent_id, dept_id, user_id, tree_name, version, create_dept, create_time, create_by, update_time, update_by, del_flag) values (13, '000000', 10, 108, 3, '瀛愯妭鐐�99', 0, 103, sysdate, 1, null, null, 0); diff --git a/script/sql/postgres/postgres_ry_vue_5.X.sql b/script/sql/postgres/postgres_ry_vue_5.X.sql deleted file mode 100644 index bdf28b4..0000000 --- a/script/sql/postgres/postgres_ry_vue_5.X.sql +++ /dev/null @@ -1,1138 +0,0 @@ --- ---------------------------- --- 绉熸埛琛� --- ---------------------------- -drop table if exists sys_tenant; -create table if not exists sys_tenant -( - id int8, - tenant_id varchar(20) not null, - contact_user_name varchar(20) default null::varchar, - contact_phone varchar(20) default null::varchar, - company_name varchar(50) default null::varchar, - license_number varchar(30) default null::varchar, - address varchar(200) default null::varchar, - intro varchar(200) default null::varchar, - domain varchar(200) default null::varchar, - remark varchar(200) default null::varchar, - package_id int8, - expire_time timestamp, - account_count int4 default -1, - status char default '0'::bpchar, - del_flag char default '0'::bpchar, - create_dept int8, - create_by int8, - create_time timestamp, - update_by int8, - update_time timestamp, - constraint "pk_sys_tenant" primary key (id) -); - - -comment on table sys_tenant is '绉熸埛琛�'; -comment on column sys_tenant.tenant_id is '绉熸埛缂栧彿'; -comment on column sys_tenant.contact_phone is '鑱旂郴鐢佃瘽'; -comment on column sys_tenant.company_name is '浼佷笟鍚嶇О'; -comment on column sys_tenant.company_name is '鑱旂郴浜�'; -comment on column sys_tenant.license_number is '缁熶竴绀句細淇$敤浠g爜'; -comment on column sys_tenant.address is '鍦板潃'; -comment on column sys_tenant.intro is '浼佷笟绠�浠�'; -comment on column sys_tenant.domain is '鍩熷悕'; -comment on column sys_tenant.remark is '澶囨敞'; -comment on column sys_tenant.package_id is '绉熸埛濂楅缂栧彿'; -comment on column sys_tenant.expire_time is '杩囨湡鏃堕棿'; -comment on column sys_tenant.account_count is '鐢ㄦ埛鏁伴噺锛�-1涓嶉檺鍒讹級'; -comment on column sys_tenant.status is '绉熸埛鐘舵�侊紙0姝e父 1鍋滅敤锛�'; -comment on column sys_tenant.del_flag is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�'; -comment on column sys_tenant.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_tenant.create_by is '鍒涘缓鑰�'; -comment on column sys_tenant.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_tenant.update_by is '鏇存柊鑰�'; -comment on column sys_tenant.update_time is '鏇存柊鏃堕棿'; - - --- ---------------------------- --- 鍒濆鍖�-绉熸埛琛ㄦ暟鎹� --- ---------------------------- - -insert into sys_tenant values(1, '000000', '绠$悊缁�', '15888888888', 'XXX鏈夐檺鍏徃', null, null, '澶氱鎴烽�氱敤鍚庡彴绠$悊绠$悊绯荤粺', null, null, null, null, -1, '0', '0', 103, 1, now(), null, null); - - --- ---------------------------- --- 绉熸埛濂楅琛� --- ---------------------------- -drop table if exists sys_tenant_package; -create table if not exists sys_tenant_package -( - package_id int8, - package_name varchar(20) default ''::varchar, - menu_ids varchar(3000) default ''::varchar, - remark varchar(200) default ''::varchar, - menu_check_strictly bool default true, - status char default '0'::bpchar, - del_flag char default '0'::bpchar, - create_dept int8, - create_by int8, - create_time timestamp, - update_by int8, - update_time timestamp, - constraint "pk_sys_tenant_package" primary key (package_id) -); - - -comment on table sys_tenant_package is '绉熸埛濂楅琛�'; -comment on column sys_tenant_package.package_id is '绉熸埛濂楅id'; -comment on column sys_tenant_package.package_name is '濂楅鍚嶇О'; -comment on column sys_tenant_package.menu_ids is '鍏宠仈鑿滃崟id'; -comment on column sys_tenant_package.remark is '澶囨敞'; -comment on column sys_tenant_package.status is '鐘舵�侊紙0姝e父 1鍋滅敤锛�'; -comment on column sys_tenant_package.del_flag is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�'; -comment on column sys_tenant_package.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_tenant_package.create_by is '鍒涘缓鑰�'; -comment on column sys_tenant_package.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_tenant_package.update_by is '鏇存柊鑰�'; -comment on column sys_tenant_package.update_time is '鏇存柊鏃堕棿'; - - --- ---------------------------- --- 1銆侀儴闂ㄨ〃 --- ---------------------------- -drop table if exists sys_dept; -create table if not exists sys_dept -( - dept_id int8, - tenant_id varchar(20) default '000000'::varchar, - parent_id int8 default 0, - ancestors varchar(500)default ''::varchar, - dept_name varchar(30) default ''::varchar, - order_num int4 default 0, - leader varchar(20) default null::varchar, - phone varchar(11) default null::varchar, - email varchar(50) default null::varchar, - status char default '0'::bpchar, - del_flag char default '0'::bpchar, - create_dept int8, - create_by int8, - create_time timestamp, - update_by int8, - update_time timestamp, - constraint "sys_dept_pk" primary key (dept_id) -); - -comment on table sys_dept is '閮ㄩ棬琛�'; -comment on column sys_dept.dept_id is '閮ㄩ棬ID'; -comment on column sys_dept.tenant_id is '绉熸埛缂栧彿'; -comment on column sys_dept.parent_id is '鐖堕儴闂↖D'; -comment on column sys_dept.ancestors is '绁栫骇鍒楄〃'; -comment on column sys_dept.dept_name is '閮ㄩ棬鍚嶇О'; -comment on column sys_dept.order_num is '鏄剧ず椤哄簭'; -comment on column sys_dept.leader is '璐熻矗浜�'; -comment on column sys_dept.phone is '鑱旂郴鐢佃瘽'; -comment on column sys_dept.email is '閭'; -comment on column sys_dept.status is '閮ㄩ棬鐘舵�侊紙0姝e父 1鍋滅敤锛�'; -comment on column sys_dept.del_flag is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�'; -comment on column sys_dept.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_dept.create_by is '鍒涘缓鑰�'; -comment on column sys_dept.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_dept.update_by is '鏇存柊鑰�'; -comment on column sys_dept.update_time is '鏇存柊鏃堕棿'; - --- ---------------------------- --- 鍒濆鍖�-閮ㄩ棬琛ㄦ暟鎹� --- ---------------------------- -insert into sys_dept values(100, '000000', 0, '0', 'XXX绉戞妧', 0, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(101, '000000', 100, '0,100', '娣卞湷鎬诲叕鍙�', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(102, '000000', 100, '0,100', '闀挎矙鍒嗗叕鍙�', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(103, '000000', 101, '0,100,101', '鐮斿彂閮ㄩ棬', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(104, '000000', 101, '0,100,101', '甯傚満閮ㄩ棬', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(105, '000000', 101, '0,100,101', '娴嬭瘯閮ㄩ棬', 3, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(106, '000000', 101, '0,100,101', '璐㈠姟閮ㄩ棬', 4, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(107, '000000', 101, '0,100,101', '杩愮淮閮ㄩ棬', 5, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(108, '000000', 102, '0,100,102', '甯傚満閮ㄩ棬', 1, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); -insert into sys_dept values(109, '000000', 102, '0,100,102', '璐㈠姟閮ㄩ棬', 2, '鐤媯鐨勭嫯瀛怢i', '15888888888', 'xxx@qq.com', '0', '0', 103, 1, now(), null, null); - --- ---------------------------- --- 2銆佺敤鎴蜂俊鎭〃 --- ---------------------------- -drop table if exists sys_user; -create table if not exists sys_user -( - user_id int8, - tenant_id varchar(20) default '000000'::varchar, - dept_id int8, - user_name varchar(30) not null, - nick_name varchar(30) not null, - user_type varchar(10) default 'sys_user'::varchar, - email varchar(50) default ''::varchar, - phonenumber varchar(11) default ''::varchar, - sex char default '0'::bpchar, - avatar int8, - password varchar(100) default ''::varchar, - status char default '0'::bpchar, - del_flag char default '0'::bpchar, - login_ip varchar(128) default ''::varchar, - login_date timestamp, - create_dept int8, - create_by int8, - create_time timestamp, - update_by int8, - update_time timestamp, - remark varchar(500) default null::varchar, - constraint "sys_user_pk" primary key (user_id) -); - -comment on table sys_user is '鐢ㄦ埛淇℃伅琛�'; -comment on column sys_user.user_id is '鐢ㄦ埛ID'; -comment on column sys_user.tenant_id is '绉熸埛缂栧彿'; -comment on column sys_user.dept_id is '閮ㄩ棬ID'; -comment on column sys_user.user_name is '鐢ㄦ埛璐﹀彿'; -comment on column sys_user.nick_name is '鐢ㄦ埛鏄电О'; -comment on column sys_user.user_type is '鐢ㄦ埛绫诲瀷锛坰ys_user绯荤粺鐢ㄦ埛锛�'; -comment on column sys_user.email is '鐢ㄦ埛閭'; -comment on column sys_user.phonenumber is '鎵嬫満鍙风爜'; -comment on column sys_user.sex is '鐢ㄦ埛鎬у埆锛�0鐢� 1濂� 2鏈煡锛�'; -comment on column sys_user.avatar is '澶村儚鍦板潃'; -comment on column sys_user.password is '瀵嗙爜'; -comment on column sys_user.status is '甯愬彿鐘舵�侊紙0姝e父 1鍋滅敤锛�'; -comment on column sys_user.del_flag is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�'; -comment on column sys_user.login_ip is '鏈�鍚庣櫥闄咺P'; -comment on column sys_user.login_date is '鏈�鍚庣櫥闄嗘椂闂�'; -comment on column sys_user.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_user.create_by is '鍒涘缓鑰�'; -comment on column sys_user.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_user.update_by is '鏇存柊鑰�'; -comment on column sys_user.update_time is '鏇存柊鏃堕棿'; -comment on column sys_user.remark is '澶囨敞'; - --- ---------------------------- - --- 鍒濆鍖�-鐢ㄦ埛淇℃伅琛ㄦ暟鎹� --- ---------------------------- -insert into sys_user values(1, '000000', 103, 'admin', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@163.com', '15888888888', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', now(), 103, 1, now(), null, null, '绠$悊鍛�'); -insert into sys_user values(2, '000000', 105, 'lionli', '鐤媯鐨勭嫯瀛怢i', 'sys_user', 'crazyLionLi@qq.com', '15666666666', '1', null, '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', now(), 103, 1, now(), null, null, '娴嬭瘯鍛�'); - - --- ---------------------------- --- 3銆佸矖浣嶄俊鎭〃 --- ---------------------------- -drop table if exists sys_post; -create table if not exists sys_post -( - post_id int8, - tenant_id varchar(20) default '000000'::varchar, - post_code varchar(64) not null, - post_name varchar(50) not null, - post_sort int4 not null, - status char not null, - create_dept int8, - create_by int8, - create_time timestamp, - update_by int8, - update_time timestamp, - remark varchar(500) default null::varchar, - constraint "sys_post_pk" primary key (post_id) -); - -comment on table sys_post is '宀椾綅淇℃伅琛�'; -comment on column sys_post.post_id is '宀椾綅ID'; -comment on column sys_post.tenant_id is '绉熸埛缂栧彿'; -comment on column sys_post.post_code is '宀椾綅缂栫爜'; -comment on column sys_post.post_name is '宀椾綅鍚嶇О'; -comment on column sys_post.post_sort is '鏄剧ず椤哄簭'; -comment on column sys_post.status is '鐘舵�侊紙0姝e父 1鍋滅敤锛�'; -comment on column sys_post.create_dept is '鍒涘缓閮ㄩ棬'; -comment on column sys_post.create_by is '鍒涘缓鑰�'; -comment on column sys_post.create_time is '鍒涘缓鏃堕棿'; -comment on column sys_post.update_by is '鏇存柊鑰�'; -comment on column sys_post.update_time is '鏇存柊鏃堕棿'; -comment on column sys_post.remark is '澶囨敞'; - --- ---------------------------- --- 鍒濆鍖�-宀椾綅淇℃伅琛ㄦ暟鎹� --- ---------------------------- -insert into sys_post values(1, '000000', 'ceo', '钁d簨闀�', 1, '0', 103, 1, now(), null, null, ''); -insert into sys_post values(2, '000000', 'se', '椤圭洰缁忕悊', 2, '0', 103, 1, now(), null, null, ''); -insert into sys_post values(3, '000000', 'hr', '浜哄姏璧勬簮', 3, '0', 103, 1, now(), null, null, ''); -insert into sys_post values(4, '000000', 'user', '鏅�氬憳宸�', 4, '0', 103, 1, now(), null, null, ''); - --- ---------------------------- --- 4銆佽鑹蹭俊鎭〃 --- ---------------------------- -drop table if exists sys_role; -create table if not exists sys_role -( - role_id int8, - tenant_id varchar(20) default '000000'::varchar, - role_name varchar(30) not null, - role_key varchar(100) not null, - role_sort int4 not null, - data_scope char default '1'::bpchar, - menu_check_strictly bool default true, - dept_check_strictly bool default true, - status char not null, - del_flag char default '0'::bpchar, - create_dept int8, - create_by int8, - create_time timestamp, - update_by int8, - update_time timestamp, - remark varchar(500) default null::varchar, - constraint "sys_role_pk" primary key (role_id) -); - -comment on table sys_role is '瑙掕壊淇℃伅琛�'; -comment on column sys_role.role_id is '瑙掕壊ID'; -comment on column sys_role.tenant_id is '绉熸埛缂栧彿'; -comment on column sys_role.role_name is '瑙掕壊鍚嶇О'; -comment on column sys_role.role_key is '瑙掕壊鏉冮檺瀛楃涓�'; -comment on column sys_role.role_sort is '鏄剧ず椤哄簭'; -comment on column sys_role.data_scope is '鏁版嵁鑼冨洿锛�1锛氬叏閮ㄦ暟鎹潈闄� 2锛氳嚜瀹氭暟鎹潈闄� 3锛氭湰閮ㄩ棬鏁版嵁鏉冮檺 4锛氭湰閮ㄩ棬鍙婁互涓嬫暟鎹潈闄愶級'; -comment on column sys_role.menu_check_strictly is '鑿滃崟鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�'; -comment on column sys_role.dept_check_strictly is '閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�'; -comment on column sys_role.status is '瑙掕壊鐘舵�侊紙0姝e父 1鍋滅敤锛�'; -comment on column sys_role.del_flag is '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�'